From 313cfc718793bb76fcc89fb3fdc31657d964c32d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 15 Jun 2022 04:55:45 +0300 Subject: [PATCH 001/732] Bug fix error processing for installation cubits --- assets/translations/en.json | 3 +++ assets/translations/ru.json | 3 +++ .../initializing/backblaze_form_cubit.dart | 5 +++-- .../initializing/cloudflare_form_cubit.dart | 4 +++- .../initializing/hetzner_form_cubit.dart | 4 +++- .../server_installation_repository.dart | 19 ++++++++++++------- 6 files changed, 27 insertions(+), 11 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 46cee9b8..c0e95639 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -259,6 +259,9 @@ "1": "Connect a server", "2": "A place where your data and SelfPrivacy services will reside:", "how": "How to obtain API token", + "hetzner_bad_key_error": "Hetzner API key is invalid", + "cloudflare_bad_key_error": "Cloudflare API key is invalid", + "backblaze_bad_key_error": "Backblaze storage information is invalid", "3": "Connect CloudFlare", "4": "To manage your domain's DNS", "5": "CloudFlare API Token", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 68665e26..e2048024 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -260,6 +260,9 @@ "1": "Подключите сервер", "2": "Здесь будут жить наши данные и SelfPrivacy-сервисы", "how": "Как получить API Token", + "hetzner_bad_key_error": "Hetzner API ключ неверен", + "cloudflare_bad_key_error": "Cloudflare API ключ неверен", + "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", "3": "Подключите CloudFlare", "4": "Для управления DNS вашего домена", "5": "CloudFlare API Token", diff --git a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart index 4769286d..04d2993e 100644 --- a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart @@ -55,10 +55,11 @@ class BackblazeFormCubit extends FormCubit { } if (!isKeyValid) { - keyId.setError('bad key'); - applicationKey.setError('bad key'); + keyId.setError('initializing.backblaze_bad_key_error'.tr()); + applicationKey.setError('initializing.backblaze_bad_key_error'.tr()); return false; } + return true; } } diff --git a/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart index 01d26835..6a4b3b30 100644 --- a/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart @@ -42,12 +42,14 @@ class CloudFlareFormCubit extends FormCubit { isKeyValid = await apiClient.isValid(apiKey.state.value); } catch (e) { addError(e); + isKeyValid = false; } if (!isKeyValid) { - apiKey.setError('bad key'); + apiKey.setError('initializing.cloudflare_bad_key_error'.tr()); return false; } + return true; } } diff --git a/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart index b8f47e10..11465d9d 100644 --- a/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart @@ -42,12 +42,14 @@ class HetznerFormCubit extends FormCubit { isKeyValid = await apiClient.isValid(apiKey.state.value); } catch (e) { addError(e); + isKeyValid = false; } if (!isKeyValid) { - apiKey.setError('bad key'); + apiKey.setError('initializing.hetzner_bad_key_error'.tr()); return false; } + return true; } } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 5d4db8fe..2a0f84f4 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -242,13 +242,18 @@ class ServerInstallationRepository { domainName: domainName, ); - final ServerHostingDetails? serverDetails = - await hetznerApi.createServer( - cloudFlareKey: cloudFlareKey, - rootUser: rootUser, - domainName: domainName, - dataBase: dataBase, - ); + ServerHostingDetails? serverDetails; + try { + serverDetails = await hetznerApi.createServer( + cloudFlareKey: cloudFlareKey, + rootUser: rootUser, + domainName: domainName, + dataBase: dataBase, + ); + } catch (e) { + print(e); + } + if (serverDetails == null) { print('Server is not initialized!'); return; From 6a22e2db6fded6cc6aa7db291d54321c018723ab Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 15 Jun 2022 06:23:54 +0300 Subject: [PATCH 002/732] Fix revert routing errors --- .../server_installation_cubit.dart | 18 ++++++++++++++++++ .../server_installation_repository.dart | 15 +++++++++++++++ lib/logic/get_it/api_config.dart | 2 -- .../recovering/recovery_confirm_backblaze.dart | 2 ++ .../recovery_confirm_cloudflare.dart | 2 ++ .../recovering/recovery_confirm_server.dart | 2 ++ .../recovery_hentzner_connected.dart | 2 ++ 7 files changed, 41 insertions(+), 2 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index ef83104d..36928f08 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -411,6 +411,7 @@ class ServerInstallationCubit extends Cubit { case RecoveryStep.recoveryKey: case RecoveryStep.newDeviceKey: case RecoveryStep.oldToken: + case RecoveryStep.hetznerToken: emit( dataState.copyWith( currentStep: RecoveryStep.selecting, @@ -425,6 +426,23 @@ class ServerInstallationCubit extends Cubit { ), ); break; + case RecoveryStep.cloudflareToken: + repository.deleteDomain(); + repository.deleteServerDetails(); + emit( + dataState.copyWith( + currentStep: RecoveryStep.serverSelection, + ), + ); + break; + case RecoveryStep.backblazeToken: + repository.deleteBackblazeKey(); + emit( + dataState.copyWith( + currentStep: RecoveryStep.cloudflareToken, + ), + ); + break; // We won't revert steps after client is authorized default: break; diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 2a0f84f4..e6eaf3c6 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -603,6 +603,11 @@ class ServerInstallationRepository { await getIt().storeServerDetails(serverDetails); } + Future deleteServerDetails() async { + await box.delete(BNames.serverDetails); + getIt().init(); + } + Future saveHetznerKey(final String key) async { print('saved'); await getIt().storeHetznerKey(key); @@ -619,10 +624,20 @@ class ServerInstallationRepository { await getIt().storeBackblazeCredential(backblazeCredential); } + Future deleteBackblazeKey() async { + await box.delete(BNames.backblazeCredential); + getIt().init(); + } + Future saveCloudFlareKey(final String key) async { await getIt().storeCloudFlareKey(key); } + Future deleteCloudFlareKey() async { + await box.delete(BNames.cloudFlareKey); + getIt().init(); + } + Future saveDomain(final ServerDomain serverDomain) async { await getIt().storeServerDomain(serverDomain); } diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 3f3e5ac0..ec2feb55 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -34,7 +34,6 @@ class ApiConfigModel { Future storeBackblazeCredential(final BackblazeCredential value) async { await _box.put(BNames.backblazeCredential, value); - _backblazeCredential = value; } @@ -64,7 +63,6 @@ class ApiConfigModel { void init() { _hetznerKey = _box.get(BNames.hetznerKey); - _cloudFlareKey = _box.get(BNames.cloudFlareKey); _backblazeCredential = _box.get(BNames.backblazeCredential); _serverDomain = _box.get(BNames.serverDomain); diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index 2b558727..02b68acf 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -28,6 +28,8 @@ class RecoveryConfirmBackblaze extends StatelessWidget { heroTitle: 'recovering.confirm_backblaze'.tr(), heroSubtitle: 'recovering.confirm_backblaze_description'.tr(), hasBackButton: true, + onBackButtonPressed: + context.read().revertRecoveryStep, hasFlashButton: false, children: [ CubitFormTextField( diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index 8cbdbe6c..0e12b51e 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -31,6 +31,8 @@ class RecoveryConfirmCloudflare extends StatelessWidget { ), hasBackButton: true, hasFlashButton: false, + onBackButtonPressed: + context.read().revertRecoveryStep, children: [ CubitFormTextField( formFieldCubit: context.read().apiKey, diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 110425ef..19fcbb6b 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -39,6 +39,8 @@ class _RecoveryConfirmServerState extends State { ? 'recovering.choose_server_description'.tr() : 'recovering.confirm_server_description'.tr(), hasBackButton: true, + onBackButtonPressed: + context.read().revertRecoveryStep, hasFlashButton: false, children: [ FutureBuilder>( diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart index e1812b32..36b5f130 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart @@ -32,6 +32,8 @@ class RecoveryHetznerConnected extends StatelessWidget { ), hasBackButton: true, hasFlashButton: false, + onBackButtonPressed: + context.read().revertRecoveryStep, children: [ CubitFormTextField( formFieldCubit: context.read().apiKey, From 9d4f7b4786189692fb2d1893495ed1a216d76a2e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 15 Jun 2022 06:27:05 +0300 Subject: [PATCH 003/732] Add changelog for 0.6.1 --- fastlane/metadata/android/en-US/changelogs/0.6.1.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/0.6.1.txt diff --git a/fastlane/metadata/android/en-US/changelogs/0.6.1.txt b/fastlane/metadata/android/en-US/changelogs/0.6.1.txt new file mode 100644 index 00000000..0f5c3964 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/0.6.1.txt @@ -0,0 +1,3 @@ +- Fixed routing errors and broken "back" buttons on recovery stages +- Fixed broken validation on api token fields +- Minor improvements \ No newline at end of file From 7870cf9f990a0044acaf5b0de0e76c22ae8bb848 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 15 Jun 2022 07:06:57 +0300 Subject: [PATCH 004/732] Update pubsec version to 0.6.1 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 71a5f2f9..1e052155 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: selfprivacy description: selfprivacy.org publish_to: 'none' -version: 0.6.0+15 +version: 0.6.1+15 environment: sdk: '>=2.17.0 <3.0.0' From 0feb9bc299333ccae1dd0e800e4026eec9725ca0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 15 Jun 2022 07:51:32 +0300 Subject: [PATCH 005/732] Return to main page on backbutton press for some recovery pages --- .../server_installation_cubit.dart | 18 ------------------ .../recovering/recovery_confirm_backblaze.dart | 5 +++-- .../recovering/recovery_confirm_server.dart | 5 +++-- .../recovery_hentzner_connected.dart | 5 +++-- 4 files changed, 9 insertions(+), 24 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 36928f08..05198229 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -411,23 +411,13 @@ class ServerInstallationCubit extends Cubit { case RecoveryStep.recoveryKey: case RecoveryStep.newDeviceKey: case RecoveryStep.oldToken: - case RecoveryStep.hetznerToken: emit( dataState.copyWith( currentStep: RecoveryStep.selecting, ), ); break; - case RecoveryStep.serverSelection: - repository.deleteHetznerKey(); - emit( - dataState.copyWith( - currentStep: RecoveryStep.hetznerToken, - ), - ); - break; case RecoveryStep.cloudflareToken: - repository.deleteDomain(); repository.deleteServerDetails(); emit( dataState.copyWith( @@ -435,14 +425,6 @@ class ServerInstallationCubit extends Cubit { ), ); break; - case RecoveryStep.backblazeToken: - repository.deleteBackblazeKey(); - emit( - dataState.copyWith( - currentStep: RecoveryStep.cloudflareToken, - ), - ); - break; // We won't revert steps after client is authorized default: break; diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index 02b68acf..cbd40ff0 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -28,8 +28,9 @@ class RecoveryConfirmBackblaze extends StatelessWidget { heroTitle: 'recovering.confirm_backblaze'.tr(), heroSubtitle: 'recovering.confirm_backblaze_description'.tr(), hasBackButton: true, - onBackButtonPressed: - context.read().revertRecoveryStep, + onBackButtonPressed: () { + Navigator.of(context).popUntil((final route) => route.isFirst); + }, hasFlashButton: false, children: [ CubitFormTextField( diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 19fcbb6b..063bd890 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -39,8 +39,9 @@ class _RecoveryConfirmServerState extends State { ? 'recovering.choose_server_description'.tr() : 'recovering.confirm_server_description'.tr(), hasBackButton: true, - onBackButtonPressed: - context.read().revertRecoveryStep, + onBackButtonPressed: () { + Navigator.of(context).popUntil((final route) => route.isFirst); + }, hasFlashButton: false, children: [ FutureBuilder>( diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart index 36b5f130..6976283c 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart @@ -32,8 +32,9 @@ class RecoveryHetznerConnected extends StatelessWidget { ), hasBackButton: true, hasFlashButton: false, - onBackButtonPressed: - context.read().revertRecoveryStep, + onBackButtonPressed: () { + Navigator.of(context).popUntil((final route) => route.isFirst); + }, children: [ CubitFormTextField( formFieldCubit: context.read().apiKey, From 7e2319bf21eaa1239cbd1f8ab80d4986a281fd21 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 22 Jun 2022 22:42:38 +0300 Subject: [PATCH 006/732] Force domain to lowercase on recovery pages --- .../forms/setup/recovering/recovery_domain_form_cubit.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart index 664b87b8..2d029bec 100644 --- a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart @@ -18,8 +18,9 @@ class RecoveryDomainFormCubit extends FormCubit { @override FutureOr onSubmit() async { - initializingCubit - .submitDomainForAccessRecovery(serverDomainField.state.value); + initializingCubit.submitDomainForAccessRecovery( + serverDomainField.state.value.toLowerCase(), + ); } @override From 352351663f096fc41c01c7081b2d8dd2447f70c2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 24 Jun 2022 00:34:09 +0300 Subject: [PATCH 007/732] Implement endpoints for hetzner volumes --- lib/logic/api_maps/hetzner.dart | 172 ++++++++++++++++-- .../server_installation_repository.dart | 9 +- 2 files changed, 163 insertions(+), 18 deletions(-) diff --git a/lib/logic/api_maps/hetzner.dart b/lib/logic/api_maps/hetzner.dart index 4de4f36f..d672b358 100644 --- a/lib/logic/api_maps/hetzner.dart +++ b/lib/logic/api_maps/hetzner.dart @@ -56,24 +56,162 @@ class HetznerApi extends ApiMap { } } - Future createVolume() async { + Future createVolume() async { + ServerVolume? volume; + + final Response dbCreateResponse; final Dio client = await getClient(); - final Response dbCreateResponse = await client.post( - '/volumes', - data: { - 'size': 10, - 'name': StringGenerators.dbStorageName(), - 'labels': {'labelkey': 'value'}, - 'location': 'fsn1', - 'automount': false, - 'format': 'ext4' - }, - ); - final dbId = dbCreateResponse.data['volume']['id']; - return ServerVolume( - id: dbId, - name: dbCreateResponse.data['volume']['name'], - ); + try { + dbCreateResponse = await client.post( + '/volumes', + data: { + 'size': 10, + 'name': StringGenerators.dbStorageName(), + 'labels': {'labelkey': 'value'}, + 'location': 'fsn1', + 'automount': false, + 'format': 'ext4' + }, + ); + final dbId = dbCreateResponse.data['volume']['id']; + final dbName = dbCreateResponse.data['volume']['name']; + volume = ServerVolume( + id: dbId, + name: dbName, + ); + } catch (e) { + print(e); + } finally { + client.close(); + } + + return volume; + } + + Future> getVolumes(final String? status) async { + final List volumes = []; + + final Response dbGetResponse; + final Dio client = await getClient(); + try { + dbGetResponse = await client.get( + '/volumes', + queryParameters: { + 'status': status, + }, + ); + final List rawVolumes = dbGetResponse.data['volumes']; + for (final rawVolume in rawVolumes) { + final int dbId = rawVolume['id']; + final String dbName = rawVolume['name']; + final volume = ServerVolume( + id: dbId, + name: dbName, + ); + volumes.add(volume); + } + } catch (e) { + print(e); + } finally { + client.close(); + } + + return volumes; + } + + Future getVolume(final int id) async { + ServerVolume? volume; + + final Response dbGetResponse; + final Dio client = await getClient(); + try { + dbGetResponse = await client.get('/volumes/$id'); + final int dbId = dbGetResponse.data['volume']['id']; + final String dbName = dbGetResponse.data['volume']['name']; + volume = ServerVolume( + id: dbId, + name: dbName, + ); + } catch (e) { + print(e); + } finally { + client.close(); + } + + return volume; + } + + void deleteVolume(final int id) async { + final Dio client = await getClient(); + try { + await client.delete('/volumes/$id'); + } catch (e) { + print(e); + } finally { + client.close(); + } + } + + Future attachVolume(final int volumeId, final int serverId) async { + bool success = false; + + final Response dbPostResponse; + final Dio client = await getClient(); + try { + dbPostResponse = await client.post( + '/volumes/$volumeId/actions/attach', + data: { + 'automount': true, + 'server': serverId, + }, + ); + success = dbPostResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return success; + } + + Future detachVolume(final int volumeId) async { + bool success = false; + + final Response dbPostResponse; + final Dio client = await getClient(); + try { + dbPostResponse = await client.post('/volumes/$volumeId/actions/detach'); + success = dbPostResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return success; + } + + Future resizeVolume(final int volumeId, final int sizeGb) async { + bool success = false; + + final Response dbPostResponse; + final Dio client = await getClient(); + try { + dbPostResponse = await client.post( + '/volumes/$volumeId/actions/resize', + data: { + 'size': sizeGb, + }, + ); + success = dbPostResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return success; } Future createServer({ diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index e6eaf3c6..ad23f698 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -212,7 +212,13 @@ class ServerInstallationRepository { late ServerVolume dataBase; try { - dataBase = await hetznerApi.createVolume(); + final ServerVolume? createdVolume = await hetznerApi.createVolume(); + if (createdVolume == null) { + print('Volume is not created!'); + return; + } + + dataBase = createdVolume; final ServerHostingDetails? serverDetails = await hetznerApi.createServer( cloudFlareKey: cloudFlareKey, @@ -220,6 +226,7 @@ class ServerInstallationRepository { domainName: domainName, dataBase: dataBase, ); + if (serverDetails == null) { print('Server is not initialized!'); return; From 0a919907c8291aaadda240899061cefe65f036fe Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 27 Jun 2022 10:07:11 +0300 Subject: [PATCH 008/732] Implement hetzner volumes cubit --- lib/logic/api_maps/hetzner.dart | 14 +++- lib/logic/cubit/devices/devices_cubit.dart | 11 ++- .../server_installation_cubit.dart | 2 + .../server_installation_repository.dart | 8 +++ lib/logic/cubit/volumes/volumes_cubit.dart | 70 +++++++++++++++++++ lib/logic/cubit/volumes/volumes_state.dart | 23 ++++++ lib/logic/models/hive/server_details.dart | 6 ++ 7 files changed, 127 insertions(+), 7 deletions(-) create mode 100644 lib/logic/cubit/volumes/volumes_cubit.dart create mode 100644 lib/logic/cubit/volumes/volumes_state.dart diff --git a/lib/logic/api_maps/hetzner.dart b/lib/logic/api_maps/hetzner.dart index d672b358..361b369a 100644 --- a/lib/logic/api_maps/hetzner.dart +++ b/lib/logic/api_maps/hetzner.dart @@ -74,10 +74,14 @@ class HetznerApi extends ApiMap { }, ); final dbId = dbCreateResponse.data['volume']['id']; + final dbSize = dbCreateResponse.data['volume']['size']; + final dbServer = dbCreateResponse.data['volume']['server']; final dbName = dbCreateResponse.data['volume']['name']; volume = ServerVolume( id: dbId, name: dbName, + sizeGb: dbSize, + serverId: dbServer, ); } catch (e) { print(e); @@ -88,7 +92,7 @@ class HetznerApi extends ApiMap { return volume; } - Future> getVolumes(final String? status) async { + Future> getVolumes({final String? status}) async { final List volumes = []; final Response dbGetResponse; @@ -103,10 +107,14 @@ class HetznerApi extends ApiMap { final List rawVolumes = dbGetResponse.data['volumes']; for (final rawVolume in rawVolumes) { final int dbId = rawVolume['id']; + final int dbSize = rawVolume['size']; + final dbServer = rawVolume['server']; final String dbName = rawVolume['name']; final volume = ServerVolume( id: dbId, name: dbName, + sizeGb: dbSize, + serverId: dbServer, ); volumes.add(volume); } @@ -127,10 +135,14 @@ class HetznerApi extends ApiMap { try { dbGetResponse = await client.get('/volumes/$id'); final int dbId = dbGetResponse.data['volume']['id']; + final int dbSize = dbGetResponse.data['volume']['size']; + final int dbServer = dbGetResponse.data['volume']['server']; final String dbName = dbGetResponse.data['volume']['name']; volume = ServerVolume( id: dbId, name: dbName, + sizeGb: dbSize, + serverId: dbServer, ); } catch (e) { print(e); diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index f0380635..a7e80e17 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -16,17 +16,16 @@ class ApiDevicesCubit @override void load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { - final List? devices = await _getApiTokens(); - if (devices != null) { - emit(ApiDevicesState(devices, LoadingStatus.success)); - } else { - emit(const ApiDevicesState([], LoadingStatus.error)); - } + _refetch(); } } Future refresh() async { emit(const ApiDevicesState([], LoadingStatus.refreshing)); + _refetch(); + } + + void _refetch() async { final List? devices = await _getApiTokens(); if (devices != null) { emit(ApiDevicesState(devices, LoadingStatus.success)); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 05198229..2c982ff2 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -491,6 +491,8 @@ class ServerInstallationCubit extends Cubit { volume: ServerVolume( id: server.volumeId, name: 'recovered_volume', + sizeGb: 10, // ????? + serverId: server.id, ), apiToken: dataState.serverDetails!.apiToken, provider: ServerProvider.hetzner, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index ad23f698..bdf08afe 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -451,6 +451,8 @@ class ServerInstallationRepository { volume: ServerVolume( id: 0, name: '', + sizeGb: 10, + serverId: 0, ), provider: ServerProvider.unknown, id: 0, @@ -485,6 +487,8 @@ class ServerInstallationRepository { volume: ServerVolume( id: 0, name: '', + sizeGb: 10, + serverId: 0, ), provider: ServerProvider.unknown, id: 0, @@ -519,6 +523,8 @@ class ServerInstallationRepository { volume: ServerVolume( id: 0, name: '', + serverId: 0, + sizeGb: 10, ), provider: ServerProvider.unknown, id: 0, @@ -544,6 +550,8 @@ class ServerInstallationRepository { volume: ServerVolume( id: 0, name: '', + sizeGb: 10, + serverId: 0, ), provider: ServerProvider.unknown, id: 0, diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart new file mode 100644 index 00000000..5444ae4d --- /dev/null +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -0,0 +1,70 @@ +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; + +part 'volumes_state.dart'; + +class ApiVolumesCubit + extends ServerInstallationDependendCubit { + ApiVolumesCubit(final ServerInstallationCubit serverInstallationCubit) + : super(serverInstallationCubit, const ApiVolumesState.initial()); + + final ServerApi api = ServerApi(); + + @override + void load() async { + if (serverInstallationCubit.state is ServerInstallationFinished) { + _refetch(); + } + } + + void refresh() async { + emit(const ApiVolumesState([], LoadingStatus.refreshing)); + _refetch(); + } + + void _refetch() async { + final List volumes = await HetznerApi().getVolumes(); + if (volumes.isNotEmpty) { + emit(ApiVolumesState(volumes, LoadingStatus.success)); + } else { + emit(const ApiVolumesState([], LoadingStatus.error)); + } + } + + void attachVolume(final ServerVolume volume) async { + final ServerHostingDetails server = getIt().serverDetails!; + HetznerApi().attachVolume(volume.id, server.id); + refresh(); + } + + void detachVolume(final ServerVolume volume) async { + HetznerApi().detachVolume(volume.id); + refresh(); + } + + void resizeVolume(final ServerVolume volume, final int newSizeGb) { + if (volume.sizeGb < newSizeGb) { + HetznerApi().resizeVolume(volume.id, newSizeGb); + refresh(); + } + } + + void createVolume() async { + HetznerApi().createVolume(); + refresh(); + } + + void deleteVolume(final ServerVolume volume) async { + HetznerApi().deleteVolume(volume.id); + refresh(); + } + + @override + void clear() { + emit(const ApiVolumesState.initial()); + } +} diff --git a/lib/logic/cubit/volumes/volumes_state.dart b/lib/logic/cubit/volumes/volumes_state.dart new file mode 100644 index 00000000..cdc14272 --- /dev/null +++ b/lib/logic/cubit/volumes/volumes_state.dart @@ -0,0 +1,23 @@ +part of 'volumes_cubit.dart'; + +class ApiVolumesState extends ServerInstallationDependendState { + const ApiVolumesState(this._volumes, this.status); + + const ApiVolumesState.initial() : this(const [], LoadingStatus.uninitialized); + final List _volumes; + final LoadingStatus status; + + List get volumes => _volumes; + + ApiVolumesState copyWith({ + final List? volumes, + final LoadingStatus? status, + }) => + ApiVolumesState( + volumes ?? _volumes, + status ?? this.status, + ); + + @override + List get props => [_volumes]; +} diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index 5188e62e..5924f807 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -55,12 +55,18 @@ class ServerVolume { ServerVolume({ required this.id, required this.name, + required this.sizeGb, + required this.serverId, }); @HiveField(1) int id; @HiveField(2) String name; + @HiveField(3, defaultValue: 10) + int sizeGb; + @HiveField(4, defaultValue: null) + int? serverId; } @HiveType(typeId: 101) From 5fd8a6859763bc8aba5c838172de745582ce24e0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 28 Jun 2022 21:06:52 +0300 Subject: [PATCH 009/732] Change volume size from Gb to Byte --- lib/logic/api_maps/hetzner.dart | 6 +++--- .../server_installation/server_installation_cubit.dart | 2 +- .../server_installation_repository.dart | 8 ++++---- lib/logic/cubit/volumes/volumes_cubit.dart | 2 +- lib/logic/models/hive/server_details.dart | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/logic/api_maps/hetzner.dart b/lib/logic/api_maps/hetzner.dart index 361b369a..3345633f 100644 --- a/lib/logic/api_maps/hetzner.dart +++ b/lib/logic/api_maps/hetzner.dart @@ -80,7 +80,7 @@ class HetznerApi extends ApiMap { volume = ServerVolume( id: dbId, name: dbName, - sizeGb: dbSize, + sizeByte: dbSize, serverId: dbServer, ); } catch (e) { @@ -113,7 +113,7 @@ class HetznerApi extends ApiMap { final volume = ServerVolume( id: dbId, name: dbName, - sizeGb: dbSize, + sizeByte: dbSize, serverId: dbServer, ); volumes.add(volume); @@ -141,7 +141,7 @@ class HetznerApi extends ApiMap { volume = ServerVolume( id: dbId, name: dbName, - sizeGb: dbSize, + sizeByte: dbSize, serverId: dbServer, ); } catch (e) { diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 2c982ff2..30bc828b 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -491,7 +491,7 @@ class ServerInstallationCubit extends Cubit { volume: ServerVolume( id: server.volumeId, name: 'recovered_volume', - sizeGb: 10, // ????? + sizeByte: 0, serverId: server.id, ), apiToken: dataState.serverDetails!.apiToken, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index bdf08afe..842c1db2 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -451,7 +451,7 @@ class ServerInstallationRepository { volume: ServerVolume( id: 0, name: '', - sizeGb: 10, + sizeByte: 0, serverId: 0, ), provider: ServerProvider.unknown, @@ -487,7 +487,7 @@ class ServerInstallationRepository { volume: ServerVolume( id: 0, name: '', - sizeGb: 10, + sizeByte: 0, serverId: 0, ), provider: ServerProvider.unknown, @@ -524,7 +524,7 @@ class ServerInstallationRepository { id: 0, name: '', serverId: 0, - sizeGb: 10, + sizeByte: 0, ), provider: ServerProvider.unknown, id: 0, @@ -550,7 +550,7 @@ class ServerInstallationRepository { volume: ServerVolume( id: 0, name: '', - sizeGb: 10, + sizeByte: 0, serverId: 0, ), provider: ServerProvider.unknown, diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart index 5444ae4d..8fcc6d55 100644 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -47,7 +47,7 @@ class ApiVolumesCubit } void resizeVolume(final ServerVolume volume, final int newSizeGb) { - if (volume.sizeGb < newSizeGb) { + if (volume.sizeByte < newSizeGb) { HetznerApi().resizeVolume(volume.id, newSizeGb); refresh(); } diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index 5924f807..44c8d5b3 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -55,7 +55,7 @@ class ServerVolume { ServerVolume({ required this.id, required this.name, - required this.sizeGb, + required this.sizeByte, required this.serverId, }); @@ -63,8 +63,8 @@ class ServerVolume { int id; @HiveField(2) String name; - @HiveField(3, defaultValue: 10) - int sizeGb; + @HiveField(3, defaultValue: 10737418240) // 10 Gb + int sizeByte; @HiveField(4, defaultValue: null) int? serverId; } From 37b7e9f839f8ddd47e48b57db589aff28b3c20ab Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 12 Jul 2022 15:54:16 +0300 Subject: [PATCH 010/732] Implement Provider Api Abstractions --- build.yaml | 13 +- .../schema/get_api_tokens.graphql | 9 + .../schema/get_api_tokens.graphql.g.dart | 34 ++++ .../schema/get_api_version.graphql | 5 + .../schema/get_api_version.graphql.g.dart | 22 +++ .../graphql_maps/schema/schema.graphql | 151 +++++++++++++++ .../graphql_maps/schema/schema.graphql.g.dart | 28 +++ .../rest_maps/api_factory_creator.dart | 39 ++++ .../api_maps/{ => rest_maps}/api_map.dart | 0 .../api_maps/{ => rest_maps}/backblaze.dart | 2 +- .../api_maps/{ => rest_maps}/cloudflare.dart | 2 +- .../providers/hetzner}/hetzner.dart | 151 ++++++++++----- .../providers/hetzner/hetzner_factory.dart | 25 +++ .../rest_maps/providers/provider.dart | 32 ++++ .../rest_maps/providers/provider_factory.dart | 20 ++ .../rest_maps/providers/volume_provider.dart | 17 ++ .../api_maps/{ => rest_maps}/server.dart | 2 +- lib/logic/cubit/backups/backups_cubit.dart | 4 +- lib/logic/cubit/devices/devices_cubit.dart | 2 +- .../cubit/dns_records/dns_records_cubit.dart | 4 +- .../initializing/backblaze_form_cubit.dart | 2 +- .../initializing/cloudflare_form_cubit.dart | 2 +- .../setup/initializing/domain_cloudflare.dart | 2 +- .../initializing/hetzner_form_cubit.dart | 13 +- .../recovery_domain_form_cubit.dart | 2 +- .../hetzner_metrics_repository.dart | 2 +- lib/logic/cubit/jobs/jobs_cubit.dart | 2 +- .../recovery_key/recovery_key_cubit.dart | 2 +- .../server_detailed_info_cubit.dart | 2 +- .../server_detailed_info_repository.dart | 8 +- .../server_detailed_info_state.dart | 2 +- .../server_installation_cubit.dart | 60 +++++- .../server_installation_repository.dart | 140 +++++++++----- .../server_installation_state.dart | 38 ++-- lib/logic/cubit/services/services_cubit.dart | 2 +- lib/logic/cubit/users/users_cubit.dart | 2 +- lib/logic/cubit/volumes/volumes_cubit.dart | 30 +-- lib/logic/models/hive/server_details.g.dart | 10 +- lib/logic/models/hive/user.g.dart | 10 +- .../models/json/hetzner_server_info.dart | 115 ------------ .../models/json/provider_server_info.dart | 115 ++++++++++++ ...nfo.g.dart => provider_server_info.g.dart} | 39 ++-- lib/ui/pages/setup/initializing.dart | 14 +- .../recovery_hentzner_connected.dart | 8 +- lib/utils/scalars.dart | 7 + pubspec.lock | 175 ++++++++++++++++++ pubspec.yaml | 4 + .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 49 files changed, 1058 insertions(+), 316 deletions(-) create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/schema.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart create mode 100644 lib/logic/api_maps/rest_maps/api_factory_creator.dart rename lib/logic/api_maps/{ => rest_maps}/api_map.dart (100%) rename lib/logic/api_maps/{ => rest_maps}/backblaze.dart (98%) rename lib/logic/api_maps/{ => rest_maps}/cloudflare.dart (99%) rename lib/logic/api_maps/{ => rest_maps/providers/hetzner}/hetzner.dart (78%) create mode 100644 lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart create mode 100644 lib/logic/api_maps/rest_maps/providers/provider.dart create mode 100644 lib/logic/api_maps/rest_maps/providers/provider_factory.dart create mode 100644 lib/logic/api_maps/rest_maps/providers/volume_provider.dart rename lib/logic/api_maps/{ => rest_maps}/server.dart (99%) delete mode 100644 lib/logic/models/json/hetzner_server_info.dart create mode 100644 lib/logic/models/json/provider_server_info.dart rename lib/logic/models/json/{hetzner_server_info.g.dart => provider_server_info.g.dart} (58%) create mode 100644 lib/utils/scalars.dart diff --git a/build.yaml b/build.yaml index 709b623e..15417c7c 100644 --- a/build.yaml +++ b/build.yaml @@ -1,7 +1,18 @@ targets: $default: builders: + graphql_codegen: + options: + scalars: + DateTime: + type: DateTime + fromJsonFunctionName: dateTimeFromJson + toJsonFunctionName: dateTimeToJson + import: package:selfprivacy/utils/scalars.dart + clients: + - graphql + - graphql_flutter json_serializable: options: create_factory: true - create_to_json: false \ No newline at end of file + create_to_json: false diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql new file mode 100644 index 00000000..df9569c0 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql @@ -0,0 +1,9 @@ +query GetApiTokensQuery { + api { + devices { + creationDate + isCaller + name + } + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart new file mode 100644 index 00000000..508d8010 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart @@ -0,0 +1,34 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'get_api_tokens.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Query$GetApiTokensQuery _$Query$GetApiTokensQueryFromJson( + Map json) => + Query$GetApiTokensQuery( + api: Query$GetApiTokensQuery$api.fromJson( + json['api'] as Map), + $__typename: json['__typename'] as String, + ); + +Query$GetApiTokensQuery$api _$Query$GetApiTokensQuery$apiFromJson( + Map json) => + Query$GetApiTokensQuery$api( + devices: (json['devices'] as List) + .map((e) => Query$GetApiTokensQuery$api$devices.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Query$GetApiTokensQuery$api$devices + _$Query$GetApiTokensQuery$api$devicesFromJson(Map json) => + Query$GetApiTokensQuery$api$devices( + creationDate: dateTimeFromJson(json['creationDate']), + isCaller: json['isCaller'] as bool, + name: json['name'] as String, + $__typename: json['__typename'] as String, + ); diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql new file mode 100644 index 00000000..cbfeb870 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql @@ -0,0 +1,5 @@ +query GetApiVersionQuery { + api { + version + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart new file mode 100644 index 00000000..c0b5a378 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'get_api_version.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Query$GetApiVersionQuery _$Query$GetApiVersionQueryFromJson( + Map json) => + Query$GetApiVersionQuery( + api: Query$GetApiVersionQuery$api.fromJson( + json['api'] as Map), + $__typename: json['__typename'] as String, + ); + +Query$GetApiVersionQuery$api _$Query$GetApiVersionQuery$apiFromJson( + Map json) => + Query$GetApiVersionQuery$api( + version: json['version'] as String, + $__typename: json['__typename'] as String, + ); diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql new file mode 100644 index 00000000..c4b3246d --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -0,0 +1,151 @@ +scalar DateTime + +type Alert { + severity: Severity! + title: String! + message: String! + timestamp: DateTime +} + +type Api { + version: String! + devices: [ApiDevice!]! + recoveryKey: ApiRecoveryKeyStatus! +} + +type ApiDevice { + name: String! + creationDate: DateTime! + isCaller: Boolean! +} + +type ApiKeyMutationReturn implements MutationReturnInterface { + success: Boolean! + message: String! + code: Int! + key: String +} + +type ApiRecoveryKeyStatus { + exists: Boolean! + valid: Boolean! + creationDate: DateTime + expirationDate: DateTime + usesLeft: Int +} + +type AutoUpgradeOptions { + enable: Boolean! + allowReboot: Boolean! +} + +type DeviceApiTokenMutationReturn implements MutationReturnInterface { + success: Boolean! + message: String! + code: Int! + token: String +} + +enum DnsProvider { + CLOUDFLARE +} + +type DnsRecord { + recordType: String! + name: String! + content: String! + ttl: Int! + priority: Int +} + +type GenericMutationReturn implements MutationReturnInterface { + success: Boolean! + message: String! + code: Int! +} + +type Mutation { + getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput!): ApiKeyMutationReturn! + useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! + refreshDeviceApiToken: DeviceApiTokenMutationReturn! + deleteDeviceApiToken(device: String!): GenericMutationReturn! + getNewDeviceApiKey: ApiKeyMutationReturn! + invalidateNewDeviceApiKey: GenericMutationReturn! + authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! +} + +interface MutationReturnInterface { + success: Boolean! + message: String! + code: Int! +} + +type Query { + system: System! + api: Api! +} + +input RecoveryKeyLimitsInput { + expirationDate: DateTime + uses: Int +} + +enum ServerProvider { + HETZNER +} + +enum Severity { + INFO + WARNING + ERROR + CRITICAL + SUCCESS +} + +type SshSettings { + enable: Boolean! + passwordAuthentication: Boolean! + rootSshKeys: [String!]! +} + +type System { + status: Alert! + domain: SystemDomainInfo! + settings: SystemSettings! + info: SystemInfo! + provider: SystemProviderInfo! + busy: Boolean! +} + +type SystemDomainInfo { + domain: String! + hostname: String! + provider: DnsProvider! + requiredDnsRecords: [DnsRecord!]! +} + +type SystemInfo { + systemVersion: String! + pythonVersion: String! +} + +type SystemProviderInfo { + provider: ServerProvider! + id: String! +} + +type SystemSettings { + autoUpgrade: AutoUpgradeOptions! + ssh: SshSettings! + timezone: String! +} + +input UseNewDeviceKeyInput { + key: String! + deviceName: String! +} + +input UseRecoveryKeyInput { + key: String! + deviceName: String! +} diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart new file mode 100644 index 00000000..84a4c38f --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart @@ -0,0 +1,28 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'schema.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Input$RecoveryKeyLimitsInput _$Input$RecoveryKeyLimitsInputFromJson( + Map json) => + Input$RecoveryKeyLimitsInput( + expirationDate: _nullable$dateTimeFromJson(json['expirationDate']), + uses: json['uses'] as int?, + ); + +Input$UseNewDeviceKeyInput _$Input$UseNewDeviceKeyInputFromJson( + Map json) => + Input$UseNewDeviceKeyInput( + key: json['key'] as String, + deviceName: json['deviceName'] as String, + ); + +Input$UseRecoveryKeyInput _$Input$UseRecoveryKeyInputFromJson( + Map json) => + Input$UseRecoveryKeyInput( + key: json['key'] as String, + deviceName: json['deviceName'] as String, + ); diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart new file mode 100644 index 00000000..0343f402 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -0,0 +1,39 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; + +class ApiFactoryCreator { + static ProviderApiFactory createProviderApiFactory( + final ServerProvider provider, + ) { + switch (provider) { + case ServerProvider.hetzner: + case ServerProvider.unknown: // ?? :) + return HetznerApiFactory(); + } + } + + // createDnsApiFactory + + // createStorageApiFactory + + // etc . . . +} + +class VolumeApiFactoryCreator { + static VolumeProviderApiFactory createVolumeProviderApiFactory( + final ServerProvider provider, + ) { + switch (provider) { + case ServerProvider.hetzner: + case ServerProvider.unknown: // ?? :) + return HetznerApiFactory(); + } + } + + // createDnsApiFactory + + // createStorageApiFactory + + // etc . . . +} diff --git a/lib/logic/api_maps/api_map.dart b/lib/logic/api_maps/rest_maps/api_map.dart similarity index 100% rename from lib/logic/api_maps/api_map.dart rename to lib/logic/api_maps/rest_maps/api_map.dart diff --git a/lib/logic/api_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart similarity index 98% rename from lib/logic/api_maps/backblaze.dart rename to lib/logic/api_maps/rest_maps/backblaze.dart index 8d827e78..5140311d 100644 --- a/lib/logic/api_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -2,7 +2,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; class BackblazeApiAuth { diff --git a/lib/logic/api_maps/cloudflare.dart b/lib/logic/api_maps/rest_maps/cloudflare.dart similarity index 99% rename from lib/logic/api_maps/cloudflare.dart rename to lib/logic/api_maps/rest_maps/cloudflare.dart index 9141d5fe..2b78c6fe 100644 --- a/lib/logic/api_maps/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/cloudflare.dart @@ -2,7 +2,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; diff --git a/lib/logic/api_maps/hetzner.dart b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart similarity index 78% rename from lib/logic/api_maps/hetzner.dart rename to lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart index 3345633f..57582fee 100644 --- a/lib/logic/api_maps/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart @@ -3,18 +3,15 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/api_map.dart'; -import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/utils/password_generator.dart'; -class HetznerApi extends ApiMap { - HetznerApi({this.hasLogger = false, this.isWithToken = true}); - @override - bool hasLogger; - @override - bool isWithToken; +class HetznerApi extends VolumeProviderApi { + HetznerApi({final super.hasLogger = false, final super.isWithToken = true}); @override BaseOptions get options { @@ -35,27 +32,43 @@ class HetznerApi extends ApiMap { @override String rootAddress = 'https://api.hetzner.cloud/v1'; - Future isValid(final String token) async { - validateStatus = (final int? status) => - status == HttpStatus.ok || status == HttpStatus.unauthorized; + @override + Future isApiTokenValid(final String token) async { + bool isValid = false; + Response? response; final Dio client = await getClient(); - final Response response = await client.get( - '/servers', - options: Options( - headers: {'Authorization': 'Bearer $token'}, - ), - ); - close(client); - - if (response.statusCode == HttpStatus.ok) { - return true; - } else if (response.statusCode == HttpStatus.unauthorized) { - return false; - } else { - throw Exception('code: ${response.statusCode}'); + try { + response = await client.get( + '/servers', + options: Options( + headers: {'Authorization': 'Bearer $token'}, + ), + ); + } catch (e) { + print(e); + isValid = false; + } finally { + close(client); } + + if (response != null) { + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + } + + return isValid; } + @override + RegExp getApiTokenValidation() => + RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + + @override Future createVolume() async { ServerVolume? volume; @@ -92,6 +105,7 @@ class HetznerApi extends ApiMap { return volume; } + @override Future> getVolumes({final String? status}) async { final List volumes = []; @@ -127,6 +141,7 @@ class HetznerApi extends ApiMap { return volumes; } + @override Future getVolume(final int id) async { ServerVolume? volume; @@ -153,7 +168,8 @@ class HetznerApi extends ApiMap { return volume; } - void deleteVolume(final int id) async { + @override + Future deleteVolume(final int id) async { final Dio client = await getClient(); try { await client.delete('/volumes/$id'); @@ -164,6 +180,7 @@ class HetznerApi extends ApiMap { } } + @override Future attachVolume(final int volumeId, final int serverId) async { bool success = false; @@ -187,6 +204,7 @@ class HetznerApi extends ApiMap { return success; } + @override Future detachVolume(final int volumeId) async { bool success = false; @@ -204,6 +222,7 @@ class HetznerApi extends ApiMap { return success; } + @override Future resizeVolume(final int volumeId, final int sizeGb) async { bool success = false; @@ -226,8 +245,35 @@ class HetznerApi extends ApiMap { return success; } + @override Future createServer({ - required final String cloudFlareKey, + required final String dnsApiToken, + required final User rootUser, + required final String domainName, + }) async { + ServerHostingDetails? details; + + final ServerVolume? newVolume = await createVolume(); + if (newVolume == null) { + return details; + } + + details = await createServerByVolume( + dnsApiToken: dnsApiToken, + rootUser: rootUser, + domainName: domainName, + dataBase: newVolume, + ); + + if (details == null) { + deleteVolume(newVolume.id); + } + + return details; + } + + Future createServerByVolume({ + required final String dnsApiToken, required final User rootUser, required final String domainName, required final ServerVolume dataBase, @@ -250,7 +296,7 @@ class HetznerApi extends ApiMap { /// check the branch name, it could be "development" or "master". /// final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$cloudFlareKey DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); final Map data = { @@ -285,6 +331,7 @@ class HetznerApi extends ApiMap { ); } on DioError catch (e) { print(e); + deleteVolume(dataBase.id); rethrow; } catch (e) { print(e); @@ -312,7 +359,8 @@ class HetznerApi extends ApiMap { return hostname; } - Future deleteSelfprivacyServerAndAllVolumes({ + @override + Future deleteServer({ required final String domainName, }) async { final Dio client = await getClient(); @@ -339,22 +387,34 @@ class HetznerApi extends ApiMap { close(client); } - Future reset() async { + @override + Future restart() async { final ServerHostingDetails server = getIt().serverDetails!; final Dio client = await getClient(); - await client.post('/servers/${server.id}/actions/reset'); - close(client); + try { + await client.post('/servers/${server.id}/actions/reset'); + } catch (e) { + print(e); + } finally { + close(client); + } return server.copyWith(startTime: DateTime.now()); } + @override Future powerOn() async { final ServerHostingDetails server = getIt().serverDetails!; final Dio client = await getClient(); - await client.post('/servers/${server.id}/actions/poweron'); - close(client); + try { + await client.post('/servers/${server.id}/actions/poweron'); + } catch (e) { + print(e); + } finally { + close(client); + } return server.copyWith(startTime: DateTime.now()); } @@ -381,41 +441,40 @@ class HetznerApi extends ApiMap { return res.data; } - Future getInfo() async { + Future getInfo() async { final ServerHostingDetails? hetznerServer = getIt().serverDetails; final Dio client = await getClient(); final Response response = await client.get('/servers/${hetznerServer!.id}'); close(client); - return HetznerServerInfo.fromJson(response.data!['server']); + return ProviderServerInfo.fromJson(response.data!['server']); } - Future> getServers() async { + @override + Future> getServers() async { final Dio client = await getClient(); final Response response = await client.get('/servers'); close(client); return (response.data!['servers'] as List) // ignore: unnecessary_lambdas - .map((final e) => HetznerServerInfo.fromJson(e)) + .map((final e) => ProviderServerInfo.fromJson(e)) .toList(); } + @override Future createReverseDns({ - required final String ip4, - required final String domainName, + required final ServerHostingDetails serverDetails, + required final ServerDomain domain, }) async { - final ServerHostingDetails? hetznerServer = - getIt().serverDetails; - final Dio client = await getClient(); try { await client.post( - '/servers/${hetznerServer!.id}/actions/change_dns_ptr', + '/servers/${serverDetails.id}/actions/change_dns_ptr', data: { - 'ip': ip4, - 'dns_ptr': domainName, + 'ip': serverDetails.ip4, + 'dns_ptr': domain.domainName, }, ); } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart new file mode 100644 index 00000000..e047da13 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart @@ -0,0 +1,25 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.dart'; + +class HetznerApiFactory extends ProviderApiFactory + with VolumeProviderApiFactory { + @override + ProviderApi getProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }) => + HetznerApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + ); + + @override + VolumeProviderApi getVolumeProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }) => + HetznerApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + ); +} diff --git a/lib/logic/api_maps/rest_maps/providers/provider.dart b/lib/logic/api_maps/rest_maps/providers/provider.dart new file mode 100644 index 00000000..c431379e --- /dev/null +++ b/lib/logic/api_maps/rest_maps/providers/provider.dart @@ -0,0 +1,32 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; + +abstract class ProviderApi extends ApiMap { + ProviderApi({this.hasLogger = false, this.isWithToken = true}); + @override + bool hasLogger; + @override + bool isWithToken; + + Future> getServers(); + + Future restart(); + Future powerOn(); + + Future deleteServer({required final String domainName}); + Future createServer({ + required final String dnsApiToken, + required final User rootUser, + required final String domainName, + }); + Future createReverseDns({ + required final ServerHostingDetails serverDetails, + required final ServerDomain domain, + }); + + Future isApiTokenValid(final String token); + RegExp getApiTokenValidation(); +} diff --git a/lib/logic/api_maps/rest_maps/providers/provider_factory.dart b/lib/logic/api_maps/rest_maps/providers/provider_factory.dart new file mode 100644 index 00000000..a899b28c --- /dev/null +++ b/lib/logic/api_maps/rest_maps/providers/provider_factory.dart @@ -0,0 +1,20 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.dart'; + +class ProviderApiSettings { + const ProviderApiSettings({this.hasLogger = false, this.isWithToken = true}); + final bool hasLogger; + final bool isWithToken; +} + +abstract class ProviderApiFactory { + ProviderApi getProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }); +} + +mixin VolumeProviderApiFactory { + VolumeProviderApi getVolumeProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }); +} diff --git a/lib/logic/api_maps/rest_maps/providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/providers/volume_provider.dart new file mode 100644 index 00000000..cf598f18 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/providers/volume_provider.dart @@ -0,0 +1,17 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; + +abstract class VolumeProviderApi extends ProviderApi { + VolumeProviderApi({ + final super.hasLogger = false, + final super.isWithToken = true, + }); + + Future createVolume(); + Future> getVolumes({final String? status}); + Future getVolume(final int id); + Future attachVolume(final int volumeId, final int serverId); + Future detachVolume(final int volumeId); + Future resizeVolume(final int volumeId, final int sizeGb); + Future deleteVolume(final int id); +} diff --git a/lib/logic/api_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart similarity index 99% rename from lib/logic/api_maps/server.dart rename to lib/logic/api_maps/rest_maps/server.dart index 67a0739c..3cb2ed73 100644 --- a/lib/logic/api_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -15,7 +15,7 @@ import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; -import 'package:selfprivacy/logic/api_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; class ApiResponse { ApiResponse({ diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 63cdfb3e..bb89bb49 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/backblaze.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index a7e80e17..6aa71400 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 0590b065..8d8ae496 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -3,8 +3,8 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -import 'package:selfprivacy/logic/api_maps/cloudflare.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; part 'dns_records_state.dart'; diff --git a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart index 04d2993e..2a9f4662 100644 --- a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart @@ -1,6 +1,6 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/api_maps/backblaze.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:easy_localization/easy_localization.dart'; diff --git a/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart index 6a4b3b30..20c99f38 100644 --- a/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/logic/api_maps/cloudflare.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; diff --git a/lib/logic/cubit/forms/setup/initializing/domain_cloudflare.dart b/lib/logic/cubit/forms/setup/initializing/domain_cloudflare.dart index 89b50a62..b38e8313 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_cloudflare.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_cloudflare.dart @@ -1,5 +1,5 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/api_maps/cloudflare.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; diff --git a/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart index 11465d9d..24910ad1 100644 --- a/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart @@ -2,13 +2,13 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/logic/api_maps/hetzner.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; -class HetznerFormCubit extends FormCubit { - HetznerFormCubit(this.serverInstallationCubit) { - final RegExp regExp = RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); +class ProviderFormCubit extends FormCubit { + ProviderFormCubit(this.serverInstallationCubit) { + final RegExp regExp = + serverInstallationCubit.getProviderApiTokenValidation(); apiKey = FieldCubit( initalValue: '', validations: [ @@ -30,16 +30,15 @@ class HetznerFormCubit extends FormCubit { } final ServerInstallationCubit serverInstallationCubit; - late final FieldCubit apiKey; @override FutureOr asyncValidation() async { late bool isKeyValid; - final HetznerApi apiClient = HetznerApi(isWithToken: false); try { - isKeyValid = await apiClient.isValid(apiKey.state.value); + isKeyValid = await serverInstallationCubit + .isProviderApiTokenValid(apiKey.state.value); } catch (e) { addError(e); isKeyValid = false; diff --git a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart index 2d029bec..400fdff4 100644 --- a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart index de7f3d43..9b09d7f6 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; diff --git a/lib/logic/cubit/jobs/jobs_cubit.dart b/lib/logic/cubit/jobs/jobs_cubit.dart index 6de64677..8485621f 100644 --- a/lib/logic/cubit/jobs/jobs_cubit.dart +++ b/lib/logic/cubit/jobs/jobs_cubit.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index abd7b2fa..9692ca4b 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart index 613069b0..3de8970f 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart @@ -3,7 +3,7 @@ import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_repository.dart'; import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; part 'server_detailed_info_state.dart'; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index 97dc6292..9dc2d46e 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,7 +1,7 @@ -import 'package:selfprivacy/logic/api_maps/hetzner.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ServerDetailsRepository { @@ -24,7 +24,7 @@ class ServerDetailsRepositoryDto { required this.serverTimezone, required this.autoUpgradeSettings, }); - final HetznerServerInfo hetznerServerInfo; + final ProviderServerInfo hetznerServerInfo; final TimeZoneSettings serverTimezone; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart index ef226c1e..d4cd113a 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart @@ -22,7 +22,7 @@ class Loaded extends ServerDetailsState { required this.autoUpgradeSettings, required this.checkTime, }); - final HetznerServerInfo serverInfo; + final ProviderServerInfo serverInfo; final TimeZoneSettings serverTimezone; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 30bc828b..7261fec2 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -49,13 +50,37 @@ class ServerInstallationCubit extends Cubit { } } + RegExp getProviderApiTokenValidation() { + if (repository.providerApiFactory == null) { + print( + "validateProviderApiToken: Factory for API provider doesn't exist!", + ); + return RegExp(r''); + } + + return repository.providerApiFactory!.getProvider().getApiTokenValidation(); + } + + Future isProviderApiTokenValid(final String providerToken) async { + if (repository.providerApiFactory == null) { + print( + "validateProviderApiToken: Factory for API provider doesn't exist!", + ); + return false; + } + + return repository.providerApiFactory! + .getProvider(settings: const ProviderApiSettings(isWithToken: false)) + .isApiTokenValid(providerToken); + } + void setHetznerKey(final String hetznerKey) async { await repository.saveHetznerKey(hetznerKey); if (state is ServerInstallationRecovery) { emit( (state as ServerInstallationRecovery).copyWith( - hetznerKey: hetznerKey, + providerApiToken: hetznerKey, currentStep: RecoveryStep.serverSelection, ), ); @@ -63,7 +88,9 @@ class ServerInstallationCubit extends Cubit { } emit( - (state as ServerInstallationNotFinished).copyWith(hetznerKey: hetznerKey), + (state as ServerInstallationNotFinished).copyWith( + providerApiToken: hetznerKey, + ), ); } @@ -116,12 +143,16 @@ class ServerInstallationCubit extends Cubit { ); Future onSuccess(final ServerHostingDetails serverDetails) async { - await repository.createDnsRecords( + final bool dnsRecordsCreated = await repository.createDnsRecords( serverDetails.ip4, state.serverDomain!, onCancel: onCancel, ); + if (dnsRecordsCreated) { + repository.onCreationSuccess(serverDetails, state.serverDomain!); + } + emit( (state as ServerInstallationNotFinished).copyWith( isLoading: false, @@ -164,9 +195,24 @@ class ServerInstallationCubit extends Cubit { ); if (matches.values.every((final bool value) => value)) { - final ServerHostingDetails server = await repository.startServer( + final ServerHostingDetails? server = await repository.startServer( dataState.serverDetails!, ); + + if (server == null) { + final ServerInstallationNotFinished newState = dataState.copyWith( + isLoading: false, + dnsMatches: matches, + ); + emit(newState); + runDelayed( + startServerIfDnsIsOkay, + const Duration(seconds: 30), + newState, + ); + return; + } + await repository.saveServerDetails(server); await repository.saveIsServerStarted(true); @@ -464,7 +510,7 @@ class ServerInstallationCubit extends Cubit { final ServerInstallationRecovery dataState = state as ServerInstallationRecovery; final List servers = - await repository.getServersOnHetznerAccount(); + await repository.getServersOnProviderAccount(); final Iterable validated = servers.map( (final ServerBasicInfo server) => ServerBasicInfoWithValidators.fromServerBasicInfo( @@ -566,7 +612,7 @@ class ServerInstallationCubit extends Cubit { print('================================'); print('ServerInstallationState changed!'); print('Current type: ${change.nextState.runtimeType}'); - print('Hetzner key: ${change.nextState.hetznerKey}'); + print('Hetzner key: ${change.nextState.providerApiToken}'); print('Cloudflare key: ${change.nextState.cloudFlareKey}'); print('Domain: ${change.nextState.serverDomain}'); print('BackblazeCredential: ${change.nextState.backblazeCredential}'); @@ -599,7 +645,7 @@ class ServerInstallationCubit extends Cubit { await repository.deleteServerRelatedRecords(); emit( ServerInstallationNotFinished( - hetznerKey: state.hetznerKey, + providerApiToken: state.providerApiToken, serverDomain: state.serverDomain, cloudFlareKey: state.cloudFlareKey, backblazeCredential: state.backblazeCredential, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 842c1db2..920dcbf9 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -9,16 +9,18 @@ import 'package:hive/hive.dart'; import 'package:pub_semver/pub_semver.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; -import 'package:selfprivacy/logic/api_maps/cloudflare.dart'; -import 'package:selfprivacy/logic/api_maps/hetzner.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; -import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; @@ -39,9 +41,13 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); + ProviderApiFactory? providerApiFactory = + ApiFactoryCreator.createProviderApiFactory( + ServerProvider.hetzner, // HARDCODE FOR NOW!!! + ); // Remove when provider selection is implemented. Future load() async { - final String? hetznerToken = getIt().hetznerKey; + final String? providerApiToken = getIt().hetznerKey; final String? cloudflareToken = getIt().cloudFlareKey; final ServerDomain? serverDomain = getIt().serverDomain; final BackblazeCredential? backblazeCredential = @@ -49,9 +55,14 @@ class ServerInstallationRepository { final ServerHostingDetails? serverDetails = getIt().serverDetails; + if (serverDetails != null) { + providerApiFactory = + ApiFactoryCreator.createProviderApiFactory(serverDetails.provider); + } + if (box.get(BNames.hasFinalChecked, defaultValue: false)) { return ServerInstallationFinished( - hetznerKey: hetznerToken!, + providerApiToken: providerApiToken!, cloudFlareKey: cloudflareToken!, serverDomain: serverDomain!, backblazeCredential: backblazeCredential!, @@ -68,14 +79,14 @@ class ServerInstallationRepository { if (box.get(BNames.isRecoveringServer, defaultValue: false) && serverDomain != null) { return ServerInstallationRecovery( - hetznerKey: hetznerToken, + providerApiToken: providerApiToken, cloudFlareKey: cloudflareToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), currentStep: _getCurrentRecoveryStep( - hetznerToken, + providerApiToken, cloudflareToken, serverDomain, serverDetails, @@ -85,7 +96,7 @@ class ServerInstallationRepository { } return ServerInstallationNotFinished( - hetznerKey: hetznerToken, + providerApiToken: providerApiToken, cloudFlareKey: cloudflareToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, @@ -127,11 +138,18 @@ class ServerInstallationRepository { usersBox.clear(); } - Future startServer( + Future startServer( final ServerHostingDetails hetznerServer, ) async { - final HetznerApi hetznerApi = HetznerApi(); - final ServerHostingDetails serverDetails = await hetznerApi.powerOn(); + ServerHostingDetails? details; + + if (providerApiFactory == null) { + print("startServer: Factory for API provider doesn't exist!"); + return details; + } + + final ProviderApi api = providerApiFactory!.getProvider(); + final ServerHostingDetails serverDetails = await api.powerOn(); return serverDetails; } @@ -208,23 +226,17 @@ class ServerInstallationRepository { required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { - final HetznerApi hetznerApi = HetznerApi(); - late ServerVolume dataBase; + if (providerApiFactory == null) { + print("createServer: Factory for API provider doesn't exist!"); + return; + } + final ProviderApi api = providerApiFactory!.getProvider(); try { - final ServerVolume? createdVolume = await hetznerApi.createVolume(); - if (createdVolume == null) { - print('Volume is not created!'); - return; - } - - dataBase = createdVolume; - - final ServerHostingDetails? serverDetails = await hetznerApi.createServer( - cloudFlareKey: cloudFlareKey, + final ServerHostingDetails? serverDetails = await api.createServer( + dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, - dataBase: dataBase, ); if (serverDetails == null) { @@ -245,17 +257,16 @@ class ServerInstallationRepository { text: 'basis.delete'.tr(), isRed: true, onPressed: () async { - await hetznerApi.deleteSelfprivacyServerAndAllVolumes( + await api.deleteServer( domainName: domainName, ); ServerHostingDetails? serverDetails; try { - serverDetails = await hetznerApi.createServer( - cloudFlareKey: cloudFlareKey, + serverDetails = await api.createServer( + dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, - dataBase: dataBase, ); } catch (e) { print(e); @@ -280,25 +291,45 @@ class ServerInstallationRepository { } } - Future createDnsRecords( + Future onCreationSuccess( + final ServerHostingDetails serverDetails, + final ServerDomain domain, + ) async { + if (providerApiFactory == null) { + print("onCreationSuccess: Factory for API provider doesn't exist!"); + return; + } + final ProviderApi api = providerApiFactory!.getProvider(); + return api.createReverseDns( + serverDetails: serverDetails, + domain: domain, + ); + } + + Future createDnsRecords( final String ip4, - final ServerDomain cloudFlareDomain, { + final ServerDomain domain, { required final void Function() onCancel, }) async { final CloudflareApi cloudflareApi = CloudflareApi(); + if (providerApiFactory == null) { + print("createServer: Factory for API provider doesn't exist!"); + return false; + } + final ProviderApi api = providerApiFactory!.getProvider(); + await cloudflareApi.removeSimilarRecords( ip4: ip4, - cloudFlareDomain: cloudFlareDomain, + cloudFlareDomain: domain, ); try { await cloudflareApi.createMultipleDnsRecords( ip4: ip4, - cloudFlareDomain: cloudFlareDomain, + cloudFlareDomain: domain, ); } on DioError catch (e) { - final HetznerApi hetznerApi = HetznerApi(); final NavigationService nav = getIt.get(); nav.showPopUpDialog( BrandAlert( @@ -311,8 +342,8 @@ class ServerInstallationRepository { text: 'basis.delete'.tr(), isRed: true, onPressed: () async { - await hetznerApi.deleteSelfprivacyServerAndAllVolumes( - domainName: cloudFlareDomain.domainName, + await api.deleteServer( + domainName: domain.domainName, ); onCancel(); @@ -325,12 +356,10 @@ class ServerInstallationRepository { ], ), ); + return false; } - await HetznerApi().createReverseDns( - ip4: ip4, - domainName: cloudFlareDomain.domainName, - ); + return true; } Future createDkimRecord(final ServerDomain cloudFlareDomain) async { @@ -354,13 +383,13 @@ class ServerInstallationRepository { } Future restart() async { - final HetznerApi hetznerApi = HetznerApi(); - return hetznerApi.reset(); + final ProviderApi api = providerApiFactory!.getProvider(); + return api.restart(); } Future powerOn() async { - final HetznerApi hetznerApi = HetznerApi(); - return hetznerApi.powerOn(); + final ProviderApi api = providerApiFactory!.getProvider(); + return api.powerOn(); } Future getRecoveryCapabilities( @@ -595,12 +624,19 @@ class ServerInstallationRepository { } } - Future> getServersOnHetznerAccount() async { - final HetznerApi hetznerApi = HetznerApi(); - final List servers = await hetznerApi.getServers(); + Future> getServersOnProviderAccount() async { + if (providerApiFactory == null) { + print( + 'getServersOnProviderAccount: ' + "Factory for API provider doesn't exist!", + ); + return []; + } + final ProviderApi api = providerApiFactory!.getProvider(); + final List servers = await api.getServers(); return servers .map( - (final HetznerServerInfo server) => ServerBasicInfo( + (final ProviderServerInfo server) => ServerBasicInfo( id: server.id, name: server.name, ip: server.publicNet.ipv4.ip, @@ -687,10 +723,14 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final HetznerApi hetznerApi = HetznerApi(); + if (providerApiFactory == null) { + print("deleteServer: Factory for API provider doesn't exist!"); + return; + } + final ProviderApi api = providerApiFactory!.getProvider(); final CloudflareApi cloudFlare = CloudflareApi(); - await hetznerApi.deleteSelfprivacyServerAndAllVolumes( + await api.deleteServer( domainName: serverDomain.domainName, ); diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index b3128e71..5bb59275 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -2,7 +2,7 @@ part of '../server_installation/server_installation_cubit.dart'; abstract class ServerInstallationState extends Equatable { const ServerInstallationState({ - required this.hetznerKey, + required this.providerApiToken, required this.cloudFlareKey, required this.backblazeCredential, required this.serverDomain, @@ -15,7 +15,7 @@ abstract class ServerInstallationState extends Equatable { @override List get props => [ - hetznerKey, + providerApiToken, cloudFlareKey, backblazeCredential, serverDomain, @@ -25,7 +25,7 @@ abstract class ServerInstallationState extends Equatable { isServerResetedFirstTime, ]; - final String? hetznerKey; + final String? providerApiToken; final String? cloudFlareKey; final BackblazeCredential? backblazeCredential; final ServerDomain? serverDomain; @@ -35,7 +35,7 @@ abstract class ServerInstallationState extends Equatable { final bool isServerResetedFirstTime; final bool isServerResetedSecondTime; - bool get isHetznerFilled => hetznerKey != null; + bool get isProviderFilled => providerApiToken != null; bool get isCloudFlareFilled => cloudFlareKey != null; bool get isBackblazeFilled => backblazeCredential != null; bool get isDomainFilled => serverDomain != null; @@ -58,7 +58,7 @@ abstract class ServerInstallationState extends Equatable { List get _fulfilementList { final List res = [ - isHetznerFilled, + isProviderFilled, isCloudFlareFilled, isBackblazeFilled, isDomainFilled, @@ -80,7 +80,7 @@ class TimerState extends ServerInstallationNotFinished { this.timerStart, this.duration, }) : super( - hetznerKey: dataState.hetznerKey, + providerApiToken: dataState.providerApiToken, cloudFlareKey: dataState.cloudFlareKey, backblazeCredential: dataState.backblazeCredential, serverDomain: dataState.serverDomain, @@ -124,7 +124,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { required final super.isServerResetedSecondTime, required final this.isLoading, required this.dnsMatches, - final super.hetznerKey, + final super.providerApiToken, final super.cloudFlareKey, final super.backblazeCredential, final super.serverDomain, @@ -136,7 +136,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { @override List get props => [ - hetznerKey, + providerApiToken, cloudFlareKey, backblazeCredential, serverDomain, @@ -149,7 +149,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ]; ServerInstallationNotFinished copyWith({ - final String? hetznerKey, + final String? providerApiToken, final String? cloudFlareKey, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, @@ -162,7 +162,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { final Map? dnsMatches, }) => ServerInstallationNotFinished( - hetznerKey: hetznerKey ?? this.hetznerKey, + providerApiToken: providerApiToken ?? this.providerApiToken, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, @@ -178,7 +178,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ); ServerInstallationFinished finish() => ServerInstallationFinished( - hetznerKey: hetznerKey!, + providerApiToken: providerApiToken!, cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, @@ -193,7 +193,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { class ServerInstallationEmpty extends ServerInstallationNotFinished { const ServerInstallationEmpty() : super( - hetznerKey: null, + providerApiToken: null, cloudFlareKey: null, backblazeCredential: null, serverDomain: null, @@ -209,7 +209,7 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ - required final String super.hetznerKey, + required final String super.providerApiToken, required final String super.cloudFlareKey, required final BackblazeCredential super.backblazeCredential, required final ServerDomain super.serverDomain, @@ -222,7 +222,7 @@ class ServerInstallationFinished extends ServerInstallationState { @override List get props => [ - hetznerKey, + providerApiToken, cloudFlareKey, backblazeCredential, serverDomain, @@ -260,7 +260,7 @@ class ServerInstallationRecovery extends ServerInstallationState { const ServerInstallationRecovery({ required this.currentStep, required this.recoveryCapabilities, - final super.hetznerKey, + final super.providerApiToken, final super.cloudFlareKey, final super.backblazeCredential, final super.serverDomain, @@ -276,7 +276,7 @@ class ServerInstallationRecovery extends ServerInstallationState { @override List get props => [ - hetznerKey, + providerApiToken, cloudFlareKey, backblazeCredential, serverDomain, @@ -288,7 +288,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ]; ServerInstallationRecovery copyWith({ - final String? hetznerKey, + final String? providerApiToken, final String? cloudFlareKey, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, @@ -298,7 +298,7 @@ class ServerInstallationRecovery extends ServerInstallationState { final ServerRecoveryCapabilities? recoveryCapabilities, }) => ServerInstallationRecovery( - hetznerKey: hetznerKey ?? this.hetznerKey, + providerApiToken: providerApiToken ?? this.providerApiToken, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, @@ -309,7 +309,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ); ServerInstallationFinished finish() => ServerInstallationFinished( - hetznerKey: hetznerKey!, + providerApiToken: providerApiToken!, cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart index f83a2a9a..19160af1 100644 --- a/lib/logic/cubit/services/services_cubit.dart +++ b/lib/logic/cubit/services/services_cubit.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 9b86c109..3ce0d18e 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -3,7 +3,7 @@ import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; export 'package:provider/provider.dart'; diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart index 8fcc6d55..d724e121 100644 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -1,6 +1,6 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/hetzner.dart'; -import 'package:selfprivacy/logic/api_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -12,7 +12,10 @@ class ApiVolumesCubit ApiVolumesCubit(final ServerInstallationCubit serverInstallationCubit) : super(serverInstallationCubit, const ApiVolumesState.initial()); - final ServerApi api = ServerApi(); + final VolumeProviderApiFactory providerApi = + VolumeApiFactoryCreator.createVolumeProviderApiFactory( + getIt().serverDetails!.provider, + ); @override void load() async { @@ -27,7 +30,8 @@ class ApiVolumesCubit } void _refetch() async { - final List volumes = await HetznerApi().getVolumes(); + final List volumes = + await providerApi.getVolumeProvider().getVolumes(); if (volumes.isNotEmpty) { emit(ApiVolumesState(volumes, LoadingStatus.success)); } else { @@ -37,29 +41,29 @@ class ApiVolumesCubit void attachVolume(final ServerVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; - HetznerApi().attachVolume(volume.id, server.id); + await providerApi.getVolumeProvider().attachVolume(volume.id, server.id); refresh(); } void detachVolume(final ServerVolume volume) async { - HetznerApi().detachVolume(volume.id); + await providerApi.getVolumeProvider().detachVolume(volume.id); refresh(); } - void resizeVolume(final ServerVolume volume, final int newSizeGb) { - if (volume.sizeByte < newSizeGb) { - HetznerApi().resizeVolume(volume.id, newSizeGb); - refresh(); - } + void resizeVolume(final ServerVolume volume, final int newSizeGb) async { + //if (volume.sizeByte < newSizeGb) { + await providerApi.getVolumeProvider().resizeVolume(volume.id, newSizeGb); + refresh(); + //} } void createVolume() async { - HetznerApi().createVolume(); + await providerApi.getVolumeProvider().createVolume(); refresh(); } void deleteVolume(final ServerVolume volume) async { - HetznerApi().deleteVolume(volume.id); + await providerApi.getVolumeProvider().deleteVolume(volume.id); refresh(); } diff --git a/lib/logic/models/hive/server_details.g.dart b/lib/logic/models/hive/server_details.g.dart index f10628e7..d4ea9b01 100644 --- a/lib/logic/models/hive/server_details.g.dart +++ b/lib/logic/models/hive/server_details.g.dart @@ -73,17 +73,23 @@ class ServerVolumeAdapter extends TypeAdapter { return ServerVolume( id: fields[1] as int, name: fields[2] as String, + sizeByte: fields[3] == null ? 10737418240 : fields[3] as int, + serverId: fields[4] as int?, ); } @override void write(BinaryWriter writer, ServerVolume obj) { writer - ..writeByte(2) + ..writeByte(4) ..writeByte(1) ..write(obj.id) ..writeByte(2) - ..write(obj.name); + ..write(obj.name) + ..writeByte(3) + ..write(obj.sizeByte) + ..writeByte(4) + ..write(obj.serverId); } @override diff --git a/lib/logic/models/hive/user.g.dart b/lib/logic/models/hive/user.g.dart index d9b28d65..a1889dc1 100644 --- a/lib/logic/models/hive/user.g.dart +++ b/lib/logic/models/hive/user.g.dart @@ -11,9 +11,9 @@ class UserAdapter extends TypeAdapter { final int typeId = 1; @override - User read(final BinaryReader reader) { - final int numOfFields = reader.readByte(); - final Map fields = { + User read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), }; return User( @@ -26,7 +26,7 @@ class UserAdapter extends TypeAdapter { } @override - void write(final BinaryWriter writer, final User obj) { + void write(BinaryWriter writer, User obj) { writer ..writeByte(5) ..writeByte(0) @@ -45,7 +45,7 @@ class UserAdapter extends TypeAdapter { int get hashCode => typeId.hashCode; @override - bool operator ==(final Object other) => + bool operator ==(Object other) => identical(this, other) || other is UserAdapter && runtimeType == other.runtimeType && diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart deleted file mode 100644 index ccf036a1..00000000 --- a/lib/logic/models/json/hetzner_server_info.dart +++ /dev/null @@ -1,115 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'hetzner_server_info.g.dart'; - -@JsonSerializable() -class HetznerServerInfo { - HetznerServerInfo( - this.id, - this.name, - this.status, - this.created, - this.serverType, - this.location, - this.publicNet, - this.volumes, - ); - final int id; - final String name; - final ServerStatus status; - final DateTime created; - final List volumes; - - @JsonKey(name: 'server_type') - final HetznerServerTypeInfo serverType; - - @JsonKey(name: 'datacenter', fromJson: HetznerServerInfo.locationFromJson) - final HetznerLocation location; - - @JsonKey(name: 'public_net') - final HetznerPublicNetInfo publicNet; - - static HetznerLocation locationFromJson(final Map json) => - HetznerLocation.fromJson(json['location']); - - static HetznerServerInfo fromJson(final Map json) => - _$HetznerServerInfoFromJson(json); -} - -@JsonSerializable() -class HetznerPublicNetInfo { - HetznerPublicNetInfo(this.ipv4); - final HetznerIp4 ipv4; - - static HetznerPublicNetInfo fromJson(final Map json) => - _$HetznerPublicNetInfoFromJson(json); -} - -@JsonSerializable() -class HetznerIp4 { - HetznerIp4(this.id, this.ip, this.blocked, this.reverseDns); - final bool blocked; - @JsonKey(name: 'dns_ptr') - final String reverseDns; - final int id; - final String ip; - - static HetznerIp4 fromJson(final Map json) => - _$HetznerIp4FromJson(json); -} - -enum ServerStatus { - running, - initializing, - starting, - stopping, - off, - deleting, - migrating, - rebuilding, - unknown, -} - -@JsonSerializable() -class HetznerServerTypeInfo { - HetznerServerTypeInfo(this.cores, this.memory, this.disk, this.prices); - final int cores; - final num memory; - final int disk; - - final List prices; - - static HetznerServerTypeInfo fromJson(final Map json) => - _$HetznerServerTypeInfoFromJson(json); -} - -@JsonSerializable() -class HetznerPriceInfo { - HetznerPriceInfo(this.hourly, this.monthly); - - @JsonKey(name: 'price_hourly', fromJson: HetznerPriceInfo.getPrice) - final double hourly; - - @JsonKey(name: 'price_monthly', fromJson: HetznerPriceInfo.getPrice) - final double monthly; - - static HetznerPriceInfo fromJson(final Map json) => - _$HetznerPriceInfoFromJson(json); - - static double getPrice(final Map json) => - double.parse(json['gross'] as String); -} - -@JsonSerializable() -class HetznerLocation { - HetznerLocation(this.country, this.city, this.description, this.zone); - final String country; - final String city; - final String description; - - @JsonKey(name: 'network_zone') - final String zone; - - static HetznerLocation fromJson(final Map json) => - _$HetznerLocationFromJson(json); -} diff --git a/lib/logic/models/json/provider_server_info.dart b/lib/logic/models/json/provider_server_info.dart new file mode 100644 index 00000000..cc0166db --- /dev/null +++ b/lib/logic/models/json/provider_server_info.dart @@ -0,0 +1,115 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'provider_server_info.g.dart'; + +@JsonSerializable() +class ProviderServerInfo { + ProviderServerInfo( + this.id, + this.name, + this.status, + this.created, + this.serverType, + this.location, + this.publicNet, + this.volumes, + ); + final int id; + final String name; + final ServerStatus status; + final DateTime created; + final List volumes; + + @JsonKey(name: 'server_type') + final ProviderServerTypeInfo serverType; + + @JsonKey(name: 'datacenter', fromJson: ProviderServerInfo.locationFromJson) + final ProviderLocation location; + + @JsonKey(name: 'public_net') + final ProviderPublicNetInfo publicNet; + + static ProviderLocation locationFromJson(final Map json) => + ProviderLocation.fromJson(json['location']); + + static ProviderServerInfo fromJson(final Map json) => + _$ProviderServerInfoFromJson(json); +} + +@JsonSerializable() +class ProviderPublicNetInfo { + ProviderPublicNetInfo(this.ipv4); + final ProviderIp4 ipv4; + + static ProviderPublicNetInfo fromJson(final Map json) => + _$ProviderPublicNetInfoFromJson(json); +} + +@JsonSerializable() +class ProviderIp4 { + ProviderIp4(this.id, this.ip, this.blocked, this.reverseDns); + final bool blocked; + @JsonKey(name: 'dns_ptr') + final String reverseDns; + final int id; + final String ip; + + static ProviderIp4 fromJson(final Map json) => + _$ProviderIp4FromJson(json); +} + +enum ServerStatus { + running, + initializing, + starting, + stopping, + off, + deleting, + migrating, + rebuilding, + unknown, +} + +@JsonSerializable() +class ProviderServerTypeInfo { + ProviderServerTypeInfo(this.cores, this.memory, this.disk, this.prices); + final int cores; + final num memory; + final int disk; + + final List prices; + + static ProviderServerTypeInfo fromJson(final Map json) => + _$ProviderServerTypeInfoFromJson(json); +} + +@JsonSerializable() +class ProviderPriceInfo { + ProviderPriceInfo(this.hourly, this.monthly); + + @JsonKey(name: 'price_hourly', fromJson: ProviderPriceInfo.getPrice) + final double hourly; + + @JsonKey(name: 'price_monthly', fromJson: ProviderPriceInfo.getPrice) + final double monthly; + + static ProviderPriceInfo fromJson(final Map json) => + _$ProviderPriceInfoFromJson(json); + + static double getPrice(final Map json) => + double.parse(json['gross'] as String); +} + +@JsonSerializable() +class ProviderLocation { + ProviderLocation(this.country, this.city, this.description, this.zone); + final String country; + final String city; + final String description; + + @JsonKey(name: 'network_zone') + final String zone; + + static ProviderLocation fromJson(final Map json) => + _$ProviderLocationFromJson(json); +} diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/provider_server_info.g.dart similarity index 58% rename from lib/logic/models/json/hetzner_server_info.g.dart rename to lib/logic/models/json/provider_server_info.g.dart index e8c21917..6a4f7aac 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/provider_server_info.g.dart @@ -1,21 +1,22 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'hetzner_server_info.dart'; +part of 'provider_server_info.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -HetznerServerInfo _$HetznerServerInfoFromJson(Map json) => - HetznerServerInfo( +ProviderServerInfo _$ProviderServerInfoFromJson(Map json) => + ProviderServerInfo( json['id'] as int, json['name'] as String, $enumDecode(_$ServerStatusEnumMap, json['status']), DateTime.parse(json['created'] as String), - HetznerServerTypeInfo.fromJson( + ProviderServerTypeInfo.fromJson( json['server_type'] as Map), - HetznerServerInfo.locationFromJson(json['datacenter'] as Map), - HetznerPublicNetInfo.fromJson(json['public_net'] as Map), + ProviderServerInfo.locationFromJson(json['datacenter'] as Map), + ProviderPublicNetInfo.fromJson( + json['public_net'] as Map), (json['volumes'] as List).map((e) => e as int).toList(), ); @@ -31,38 +32,38 @@ const _$ServerStatusEnumMap = { ServerStatus.unknown: 'unknown', }; -HetznerPublicNetInfo _$HetznerPublicNetInfoFromJson( +ProviderPublicNetInfo _$ProviderPublicNetInfoFromJson( Map json) => - HetznerPublicNetInfo( - HetznerIp4.fromJson(json['ipv4'] as Map), + ProviderPublicNetInfo( + ProviderIp4.fromJson(json['ipv4'] as Map), ); -HetznerIp4 _$HetznerIp4FromJson(Map json) => HetznerIp4( +ProviderIp4 _$ProviderIp4FromJson(Map json) => ProviderIp4( json['id'] as int, json['ip'] as String, json['blocked'] as bool, json['dns_ptr'] as String, ); -HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson( +ProviderServerTypeInfo _$ProviderServerTypeInfoFromJson( Map json) => - HetznerServerTypeInfo( + ProviderServerTypeInfo( json['cores'] as int, json['memory'] as num, json['disk'] as int, (json['prices'] as List) - .map((e) => HetznerPriceInfo.fromJson(e as Map)) + .map((e) => ProviderPriceInfo.fromJson(e as Map)) .toList(), ); -HetznerPriceInfo _$HetznerPriceInfoFromJson(Map json) => - HetznerPriceInfo( - HetznerPriceInfo.getPrice(json['price_hourly'] as Map), - HetznerPriceInfo.getPrice(json['price_monthly'] as Map), +ProviderPriceInfo _$ProviderPriceInfoFromJson(Map json) => + ProviderPriceInfo( + ProviderPriceInfo.getPrice(json['price_hourly'] as Map), + ProviderPriceInfo.getPrice(json['price_monthly'] as Map), ); -HetznerLocation _$HetznerLocationFromJson(Map json) => - HetznerLocation( +ProviderLocation _$ProviderLocationFromJson(Map json) => + ProviderLocation( json['country'] as String, json['city'] as String, json['description'] as String, diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 9c92f161..6025d621 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -21,7 +21,9 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class InitializingPage extends StatelessWidget { - const InitializingPage({final super.key}); + const InitializingPage({ + final super.key, + }); @override Widget build(final BuildContext context) { @@ -135,10 +137,12 @@ class InitializingPage extends StatelessWidget { Widget _stepHetzner(final ServerInstallationCubit serverInstallationCubit) => BlocProvider( - create: (final context) => HetznerFormCubit(serverInstallationCubit), + create: (final context) => ProviderFormCubit( + serverInstallationCubit, + ), child: Builder( builder: (final context) { - final formCubitState = context.watch().state; + final formCubitState = context.watch().state; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -152,7 +156,7 @@ class InitializingPage extends StatelessWidget { BrandText.body2('initializing.2'.tr()), const Spacer(), CubitFormTextField( - formFieldCubit: context.read().apiKey, + formFieldCubit: context.read().apiKey, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), decoration: const InputDecoration( @@ -163,7 +167,7 @@ class InitializingPage extends StatelessWidget { BrandButton.rised( onPressed: formCubitState.isSubmitting ? null - : () => context.read().trySubmit(), + : () => context.read().trySubmit(), text: 'basis.connect'.tr(), ), const SizedBox(height: 10), diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart index 6976283c..819cbea2 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart @@ -19,11 +19,11 @@ class RecoveryHetznerConnected extends StatelessWidget { context.watch(); return BlocProvider( - create: (final BuildContext context) => HetznerFormCubit(appConfig), + create: (final BuildContext context) => ProviderFormCubit(appConfig), child: Builder( builder: (final BuildContext context) { final FormCubitState formCubitState = - context.watch().state; + context.watch().state; return BrandHeroScreen( heroTitle: 'recovering.hetzner_connected'.tr(), @@ -37,7 +37,7 @@ class RecoveryHetznerConnected extends StatelessWidget { }, children: [ CubitFormTextField( - formFieldCubit: context.read().apiKey, + formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), labelText: 'recovering.hetzner_connected_placeholder'.tr(), @@ -48,7 +48,7 @@ class RecoveryHetznerConnected extends StatelessWidget { title: 'more.continue'.tr(), onPressed: formCubitState.isSubmitting ? null - : () => context.read().trySubmit(), + : () => context.read().trySubmit(), ), const SizedBox(height: 16), BrandButton.text( diff --git a/lib/utils/scalars.dart b/lib/utils/scalars.dart new file mode 100644 index 00000000..71a571e7 --- /dev/null +++ b/lib/utils/scalars.dart @@ -0,0 +1,7 @@ +String dateTimeToJson(DateTime data) { + return data.toIso8601String(); +} + +DateTime dateTimeFromJson(dynamic data) { + return DateTime.parse(data as String); +} diff --git a/pubspec.lock b/pubspec.lock index e3faf1b6..cb308ae6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -169,6 +169,48 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" + connectivity_plus: + dependency: transitive + description: + name: connectivity_plus + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.5" + connectivity_plus_linux: + dependency: transitive + description: + name: connectivity_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + connectivity_plus_macos: + dependency: transitive + description: + name: connectivity_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + connectivity_plus_platform_interface: + dependency: transitive + description: + name: connectivity_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + connectivity_plus_web: + dependency: transitive + description: + name: connectivity_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + connectivity_plus_windows: + dependency: transitive + description: + name: connectivity_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" convert: dependency: transitive description: @@ -218,6 +260,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.2.3" + dbus: + dependency: transitive + description: + name: dbus + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.3" device_info_plus: dependency: "direct main" description: @@ -356,6 +405,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "8.0.1" + flutter_hooks: + dependency: transitive + description: + name: flutter_hooks + url: "https://pub.dartlang.org" + source: hosted + version: "0.18.5+1" flutter_launcher_icons: dependency: "direct dev" description: @@ -462,6 +518,90 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.2" + gql: + dependency: "direct main" + description: + name: gql + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.1" + gql_code_builder: + dependency: transitive + description: + name: gql_code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.1" + gql_dedupe_link: + dependency: transitive + description: + name: gql_dedupe_link + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + gql_error_link: + dependency: transitive + description: + name: gql_error_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.2" + gql_exec: + dependency: transitive + description: + name: gql_exec + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + gql_http_link: + dependency: transitive + description: + name: gql_http_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + gql_link: + dependency: transitive + description: + name: gql_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + gql_transform_link: + dependency: transitive + description: + name: gql_transform_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.2" + graphql: + dependency: "direct main" + description: + name: graphql + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" + graphql_codegen: + dependency: "direct main" + description: + name: graphql_codegen + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.0" + graphql_codegen_config: + dependency: transitive + description: + name: graphql_codegen_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + graphql_flutter: + dependency: "direct main" + description: + name: graphql_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" graphs: dependency: transitive description: @@ -672,6 +812,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.0" + nm: + dependency: transitive + description: + name: nm + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.0" node_preamble: dependency: transitive description: @@ -679,6 +826,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + normalize: + dependency: transitive + description: + name: normalize + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.0+1" package_config: dependency: transitive description: @@ -826,6 +980,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.0" + recase: + dependency: transitive + description: + name: recase + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + rxdart: + dependency: transitive + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.27.4" share_plus: dependency: "direct main" description: @@ -1153,6 +1321,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.1" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1e052155..f5367d99 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,6 +26,10 @@ dependencies: flutter_markdown: ^0.6.9 flutter_secure_storage: ^5.0.2 get_it: ^7.2.0 + gql: ^0.13.1 + graphql: ^5.1.1 + graphql_codegen: ^0.9.0 + graphql_flutter: ^5.1.0 gtk_theme_fl: ^0.0.1 hive: ^2.0.5 hive_flutter: ^1.1.0 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 37b7695e..070eb3b5 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,11 +6,14 @@ #include "generated_plugin_registrant.h" +#include #include #include #include void RegisterPlugins(flutter::PluginRegistry* registry) { + ConnectivityPlusWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); FlutterSecureStorageWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); SystemThemePluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index a1aaa278..a26e37b0 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + connectivity_plus_windows flutter_secure_storage_windows system_theme url_launcher_windows From 9993b09e7f80d26518edbcf3762f8c574a5b8ffc Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 13 Jul 2022 14:58:23 +0300 Subject: [PATCH 011/732] Turn VolumeApiProvider into a mixin --- build.yaml | 1 - .../rest_maps/providers/hetzner/hetzner.dart | 56 ++++++--- .../providers/hetzner/hetzner_factory.dart | 2 +- .../rest_maps/providers/provider.dart | 12 +- .../rest_maps/providers/provider_factory.dart | 2 +- .../rest_maps/providers/volume_provider.dart | 9 +- ...rm_cubit.dart => provider_form_cubit.dart} | 0 .../server_detailed_info_cubit.dart | 2 +- .../server_detailed_info_repository.dart | 4 +- .../server_detailed_info_state.dart | 2 +- .../server_installation_cubit.dart | 37 ++---- .../server_installation_repository.dart | 91 ++++---------- .../models/json/hetzner_server_info.dart | 115 ++++++++++++++++++ ...info.g.dart => hetzner_server_info.g.dart} | 39 +++--- .../models/json/provider_server_info.dart | 115 ------------------ lib/ui/pages/setup/initializing.dart | 2 +- .../recovery_hentzner_connected.dart | 2 +- lib/utils/scalars.dart | 2 + 18 files changed, 220 insertions(+), 273 deletions(-) rename lib/logic/cubit/forms/setup/initializing/{hetzner_form_cubit.dart => provider_form_cubit.dart} (100%) create mode 100644 lib/logic/models/json/hetzner_server_info.dart rename lib/logic/models/json/{provider_server_info.g.dart => hetzner_server_info.g.dart} (58%) delete mode 100644 lib/logic/models/json/provider_server_info.dart diff --git a/build.yaml b/build.yaml index 15417c7c..2fb31704 100644 --- a/build.yaml +++ b/build.yaml @@ -11,7 +11,6 @@ targets: import: package:selfprivacy/utils/scalars.dart clients: - graphql - - graphql_flutter json_serializable: options: create_factory: true diff --git a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart index 57582fee..3b0dfd42 100644 --- a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart @@ -4,14 +4,20 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; +import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; -class HetznerApi extends VolumeProviderApi { - HetznerApi({final super.hasLogger = false, final super.isWithToken = true}); +class HetznerApi extends ServerProviderApi with VolumeProviderApi { + HetznerApi({final this.hasLogger = false, final this.isWithToken = true}); + @override + bool hasLogger; + @override + bool isWithToken; @override BaseOptions get options { @@ -258,7 +264,7 @@ class HetznerApi extends VolumeProviderApi { return details; } - details = await createServerByVolume( + details = await createServerWithVolume( dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, @@ -272,7 +278,7 @@ class HetznerApi extends VolumeProviderApi { return details; } - Future createServerByVolume({ + Future createServerWithVolume({ required final String dnsApiToken, required final User rootUser, required final String domainName, @@ -441,26 +447,46 @@ class HetznerApi extends VolumeProviderApi { return res.data; } - Future getInfo() async { + Future getInfo() async { final ServerHostingDetails? hetznerServer = getIt().serverDetails; final Dio client = await getClient(); final Response response = await client.get('/servers/${hetznerServer!.id}'); close(client); - return ProviderServerInfo.fromJson(response.data!['server']); + return HetznerServerInfo.fromJson(response.data!['server']); } @override - Future> getServers() async { - final Dio client = await getClient(); - final Response response = await client.get('/servers'); - close(client); + Future> getServers() async { + List servers = []; - return (response.data!['servers'] as List) - // ignore: unnecessary_lambdas - .map((final e) => ProviderServerInfo.fromJson(e)) - .toList(); + final Dio client = await getClient(); + try { + final Response response = await client.get('/servers'); + servers = (response.data!['servers'] as List) + .map( + (final e) => HetznerServerInfo.fromJson(e), + ) + .toList() + .map( + (final HetznerServerInfo server) => ServerBasicInfo( + id: server.id, + name: server.name, + ip: server.publicNet.ipv4.ip, + reverseDns: server.publicNet.ipv4.reverseDns, + created: server.created, + volumeId: server.volumes.isNotEmpty ? server.volumes[0] : 0, + ), + ) + .toList(); + } catch (e) { + print(e); + } finally { + close(client); + } + + return servers; } @override diff --git a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart index e047da13..301d4b61 100644 --- a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart +++ b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.d class HetznerApiFactory extends ProviderApiFactory with VolumeProviderApiFactory { @override - ProviderApi getProvider({ + ServerProviderApi getProvider({ final ProviderApiSettings settings = const ProviderApiSettings(), }) => HetznerApi( diff --git a/lib/logic/api_maps/rest_maps/providers/provider.dart b/lib/logic/api_maps/rest_maps/providers/provider.dart index c431379e..010ebd75 100644 --- a/lib/logic/api_maps/rest_maps/providers/provider.dart +++ b/lib/logic/api_maps/rest_maps/providers/provider.dart @@ -2,16 +2,10 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; +import 'package:selfprivacy/logic/models/server_basic_info.dart'; -abstract class ProviderApi extends ApiMap { - ProviderApi({this.hasLogger = false, this.isWithToken = true}); - @override - bool hasLogger; - @override - bool isWithToken; - - Future> getServers(); +abstract class ServerProviderApi extends ApiMap { + Future> getServers(); Future restart(); Future powerOn(); diff --git a/lib/logic/api_maps/rest_maps/providers/provider_factory.dart b/lib/logic/api_maps/rest_maps/providers/provider_factory.dart index a899b28c..b238d299 100644 --- a/lib/logic/api_maps/rest_maps/providers/provider_factory.dart +++ b/lib/logic/api_maps/rest_maps/providers/provider_factory.dart @@ -8,7 +8,7 @@ class ProviderApiSettings { } abstract class ProviderApiFactory { - ProviderApi getProvider({ + ServerProviderApi getProvider({ final ProviderApiSettings settings = const ProviderApiSettings(), }); } diff --git a/lib/logic/api_maps/rest_maps/providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/providers/volume_provider.dart index cf598f18..63a692dd 100644 --- a/lib/logic/api_maps/rest_maps/providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/providers/volume_provider.dart @@ -1,12 +1,7 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -abstract class VolumeProviderApi extends ProviderApi { - VolumeProviderApi({ - final super.hasLogger = false, - final super.isWithToken = true, - }); - +mixin VolumeProviderApi on ApiMap { Future createVolume(); Future> getVolumes({final String? status}); Future getVolume(final int id); diff --git a/lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart similarity index 100% rename from lib/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart rename to lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart index 3de8970f..613069b0 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart @@ -3,7 +3,7 @@ import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_repository.dart'; import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; +import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; part 'server_detailed_info_state.dart'; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index 9dc2d46e..8fd3e711 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,7 +1,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; +import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ServerDetailsRepository { @@ -24,7 +24,7 @@ class ServerDetailsRepositoryDto { required this.serverTimezone, required this.autoUpgradeSettings, }); - final ProviderServerInfo hetznerServerInfo; + final HetznerServerInfo hetznerServerInfo; final TimeZoneSettings serverTimezone; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart index d4cd113a..ef226c1e 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart @@ -22,7 +22,7 @@ class Loaded extends ServerDetailsState { required this.autoUpgradeSettings, required this.checkTime, }); - final ProviderServerInfo serverInfo; + final HetznerServerInfo serverInfo; final TimeZoneSettings serverTimezone; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 7261fec2..e6402836 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -50,29 +50,14 @@ class ServerInstallationCubit extends Cubit { } } - RegExp getProviderApiTokenValidation() { - if (repository.providerApiFactory == null) { - print( - "validateProviderApiToken: Factory for API provider doesn't exist!", - ); - return RegExp(r''); - } + RegExp getProviderApiTokenValidation() => repository.serverProviderApiFactory! + .getProvider() + .getApiTokenValidation(); - return repository.providerApiFactory!.getProvider().getApiTokenValidation(); - } - - Future isProviderApiTokenValid(final String providerToken) async { - if (repository.providerApiFactory == null) { - print( - "validateProviderApiToken: Factory for API provider doesn't exist!", - ); - return false; - } - - return repository.providerApiFactory! - .getProvider(settings: const ProviderApiSettings(isWithToken: false)) - .isApiTokenValid(providerToken); - } + Future isProviderApiTokenValid(final String providerToken) async => + repository.serverProviderApiFactory! + .getProvider(settings: const ProviderApiSettings(isWithToken: false)) + .isApiTokenValid(providerToken); void setHetznerKey(final String hetznerKey) async { await repository.saveHetznerKey(hetznerKey); @@ -143,16 +128,12 @@ class ServerInstallationCubit extends Cubit { ); Future onSuccess(final ServerHostingDetails serverDetails) async { - final bool dnsRecordsCreated = await repository.createDnsRecords( - serverDetails.ip4, + await repository.createDnsRecords( + serverDetails, state.serverDomain!, onCancel: onCancel, ); - if (dnsRecordsCreated) { - repository.onCreationSuccess(serverDetails, state.serverDomain!); - } - emit( (state as ServerInstallationNotFinished).copyWith( isLoading: false, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 920dcbf9..a91432dc 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -20,7 +20,6 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; -import 'package:selfprivacy/logic/models/json/provider_server_info.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; @@ -41,7 +40,7 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); - ProviderApiFactory? providerApiFactory = + ProviderApiFactory? serverProviderApiFactory = ApiFactoryCreator.createProviderApiFactory( ServerProvider.hetzner, // HARDCODE FOR NOW!!! ); // Remove when provider selection is implemented. @@ -56,7 +55,7 @@ class ServerInstallationRepository { getIt().serverDetails; if (serverDetails != null) { - providerApiFactory = + serverProviderApiFactory = ApiFactoryCreator.createProviderApiFactory(serverDetails.provider); } @@ -141,15 +140,10 @@ class ServerInstallationRepository { Future startServer( final ServerHostingDetails hetznerServer, ) async { - ServerHostingDetails? details; + ServerHostingDetails? serverDetails; - if (providerApiFactory == null) { - print("startServer: Factory for API provider doesn't exist!"); - return details; - } - - final ProviderApi api = providerApiFactory!.getProvider(); - final ServerHostingDetails serverDetails = await api.powerOn(); + final ServerProviderApi api = serverProviderApiFactory!.getProvider(); + serverDetails = await api.powerOn(); return serverDetails; } @@ -226,12 +220,7 @@ class ServerInstallationRepository { required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { - if (providerApiFactory == null) { - print("createServer: Factory for API provider doesn't exist!"); - return; - } - - final ProviderApi api = providerApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getProvider(); try { final ServerHostingDetails? serverDetails = await api.createServer( dnsApiToken: cloudFlareKey, @@ -291,42 +280,22 @@ class ServerInstallationRepository { } } - Future onCreationSuccess( - final ServerHostingDetails serverDetails, - final ServerDomain domain, - ) async { - if (providerApiFactory == null) { - print("onCreationSuccess: Factory for API provider doesn't exist!"); - return; - } - final ProviderApi api = providerApiFactory!.getProvider(); - return api.createReverseDns( - serverDetails: serverDetails, - domain: domain, - ); - } - Future createDnsRecords( - final String ip4, + final ServerHostingDetails serverDetails, final ServerDomain domain, { required final void Function() onCancel, }) async { final CloudflareApi cloudflareApi = CloudflareApi(); - - if (providerApiFactory == null) { - print("createServer: Factory for API provider doesn't exist!"); - return false; - } - final ProviderApi api = providerApiFactory!.getProvider(); + final ServerProviderApi serverApi = serverProviderApiFactory!.getProvider(); await cloudflareApi.removeSimilarRecords( - ip4: ip4, + ip4: serverDetails.ip4, cloudFlareDomain: domain, ); try { await cloudflareApi.createMultipleDnsRecords( - ip4: ip4, + ip4: serverDetails.ip4, cloudFlareDomain: domain, ); } on DioError catch (e) { @@ -342,7 +311,7 @@ class ServerInstallationRepository { text: 'basis.delete'.tr(), isRed: true, onPressed: () async { - await api.deleteServer( + await serverApi.deleteServer( domainName: domain.domainName, ); @@ -359,6 +328,11 @@ class ServerInstallationRepository { return false; } + await serverApi.createReverseDns( + serverDetails: serverDetails, + domain: domain, + ); + return true; } @@ -383,12 +357,12 @@ class ServerInstallationRepository { } Future restart() async { - final ProviderApi api = providerApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getProvider(); return api.restart(); } Future powerOn() async { - final ProviderApi api = providerApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getProvider(); return api.powerOn(); } @@ -625,27 +599,8 @@ class ServerInstallationRepository { } Future> getServersOnProviderAccount() async { - if (providerApiFactory == null) { - print( - 'getServersOnProviderAccount: ' - "Factory for API provider doesn't exist!", - ); - return []; - } - final ProviderApi api = providerApiFactory!.getProvider(); - final List servers = await api.getServers(); - return servers - .map( - (final ProviderServerInfo server) => ServerBasicInfo( - id: server.id, - name: server.name, - ip: server.publicNet.ipv4.ip, - reverseDns: server.publicNet.ipv4.reverseDns, - created: server.created, - volumeId: server.volumes.isNotEmpty ? server.volumes[0] : 0, - ), - ) - .toList(); + final ServerProviderApi api = serverProviderApiFactory!.getProvider(); + return api.getServers(); } Future saveServerDetails( @@ -723,11 +678,7 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - if (providerApiFactory == null) { - print("deleteServer: Factory for API provider doesn't exist!"); - return; - } - final ProviderApi api = providerApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getProvider(); final CloudflareApi cloudFlare = CloudflareApi(); await api.deleteServer( diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart new file mode 100644 index 00000000..ccf036a1 --- /dev/null +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -0,0 +1,115 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'hetzner_server_info.g.dart'; + +@JsonSerializable() +class HetznerServerInfo { + HetznerServerInfo( + this.id, + this.name, + this.status, + this.created, + this.serverType, + this.location, + this.publicNet, + this.volumes, + ); + final int id; + final String name; + final ServerStatus status; + final DateTime created; + final List volumes; + + @JsonKey(name: 'server_type') + final HetznerServerTypeInfo serverType; + + @JsonKey(name: 'datacenter', fromJson: HetznerServerInfo.locationFromJson) + final HetznerLocation location; + + @JsonKey(name: 'public_net') + final HetznerPublicNetInfo publicNet; + + static HetznerLocation locationFromJson(final Map json) => + HetznerLocation.fromJson(json['location']); + + static HetznerServerInfo fromJson(final Map json) => + _$HetznerServerInfoFromJson(json); +} + +@JsonSerializable() +class HetznerPublicNetInfo { + HetznerPublicNetInfo(this.ipv4); + final HetznerIp4 ipv4; + + static HetznerPublicNetInfo fromJson(final Map json) => + _$HetznerPublicNetInfoFromJson(json); +} + +@JsonSerializable() +class HetznerIp4 { + HetznerIp4(this.id, this.ip, this.blocked, this.reverseDns); + final bool blocked; + @JsonKey(name: 'dns_ptr') + final String reverseDns; + final int id; + final String ip; + + static HetznerIp4 fromJson(final Map json) => + _$HetznerIp4FromJson(json); +} + +enum ServerStatus { + running, + initializing, + starting, + stopping, + off, + deleting, + migrating, + rebuilding, + unknown, +} + +@JsonSerializable() +class HetznerServerTypeInfo { + HetznerServerTypeInfo(this.cores, this.memory, this.disk, this.prices); + final int cores; + final num memory; + final int disk; + + final List prices; + + static HetznerServerTypeInfo fromJson(final Map json) => + _$HetznerServerTypeInfoFromJson(json); +} + +@JsonSerializable() +class HetznerPriceInfo { + HetznerPriceInfo(this.hourly, this.monthly); + + @JsonKey(name: 'price_hourly', fromJson: HetznerPriceInfo.getPrice) + final double hourly; + + @JsonKey(name: 'price_monthly', fromJson: HetznerPriceInfo.getPrice) + final double monthly; + + static HetznerPriceInfo fromJson(final Map json) => + _$HetznerPriceInfoFromJson(json); + + static double getPrice(final Map json) => + double.parse(json['gross'] as String); +} + +@JsonSerializable() +class HetznerLocation { + HetznerLocation(this.country, this.city, this.description, this.zone); + final String country; + final String city; + final String description; + + @JsonKey(name: 'network_zone') + final String zone; + + static HetznerLocation fromJson(final Map json) => + _$HetznerLocationFromJson(json); +} diff --git a/lib/logic/models/json/provider_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart similarity index 58% rename from lib/logic/models/json/provider_server_info.g.dart rename to lib/logic/models/json/hetzner_server_info.g.dart index 6a4f7aac..e8c21917 100644 --- a/lib/logic/models/json/provider_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -1,22 +1,21 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'provider_server_info.dart'; +part of 'hetzner_server_info.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -ProviderServerInfo _$ProviderServerInfoFromJson(Map json) => - ProviderServerInfo( +HetznerServerInfo _$HetznerServerInfoFromJson(Map json) => + HetznerServerInfo( json['id'] as int, json['name'] as String, $enumDecode(_$ServerStatusEnumMap, json['status']), DateTime.parse(json['created'] as String), - ProviderServerTypeInfo.fromJson( + HetznerServerTypeInfo.fromJson( json['server_type'] as Map), - ProviderServerInfo.locationFromJson(json['datacenter'] as Map), - ProviderPublicNetInfo.fromJson( - json['public_net'] as Map), + HetznerServerInfo.locationFromJson(json['datacenter'] as Map), + HetznerPublicNetInfo.fromJson(json['public_net'] as Map), (json['volumes'] as List).map((e) => e as int).toList(), ); @@ -32,38 +31,38 @@ const _$ServerStatusEnumMap = { ServerStatus.unknown: 'unknown', }; -ProviderPublicNetInfo _$ProviderPublicNetInfoFromJson( +HetznerPublicNetInfo _$HetznerPublicNetInfoFromJson( Map json) => - ProviderPublicNetInfo( - ProviderIp4.fromJson(json['ipv4'] as Map), + HetznerPublicNetInfo( + HetznerIp4.fromJson(json['ipv4'] as Map), ); -ProviderIp4 _$ProviderIp4FromJson(Map json) => ProviderIp4( +HetznerIp4 _$HetznerIp4FromJson(Map json) => HetznerIp4( json['id'] as int, json['ip'] as String, json['blocked'] as bool, json['dns_ptr'] as String, ); -ProviderServerTypeInfo _$ProviderServerTypeInfoFromJson( +HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson( Map json) => - ProviderServerTypeInfo( + HetznerServerTypeInfo( json['cores'] as int, json['memory'] as num, json['disk'] as int, (json['prices'] as List) - .map((e) => ProviderPriceInfo.fromJson(e as Map)) + .map((e) => HetznerPriceInfo.fromJson(e as Map)) .toList(), ); -ProviderPriceInfo _$ProviderPriceInfoFromJson(Map json) => - ProviderPriceInfo( - ProviderPriceInfo.getPrice(json['price_hourly'] as Map), - ProviderPriceInfo.getPrice(json['price_monthly'] as Map), +HetznerPriceInfo _$HetznerPriceInfoFromJson(Map json) => + HetznerPriceInfo( + HetznerPriceInfo.getPrice(json['price_hourly'] as Map), + HetznerPriceInfo.getPrice(json['price_monthly'] as Map), ); -ProviderLocation _$ProviderLocationFromJson(Map json) => - ProviderLocation( +HetznerLocation _$HetznerLocationFromJson(Map json) => + HetznerLocation( json['country'] as String, json['city'] as String, json['description'] as String, diff --git a/lib/logic/models/json/provider_server_info.dart b/lib/logic/models/json/provider_server_info.dart deleted file mode 100644 index cc0166db..00000000 --- a/lib/logic/models/json/provider_server_info.dart +++ /dev/null @@ -1,115 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'provider_server_info.g.dart'; - -@JsonSerializable() -class ProviderServerInfo { - ProviderServerInfo( - this.id, - this.name, - this.status, - this.created, - this.serverType, - this.location, - this.publicNet, - this.volumes, - ); - final int id; - final String name; - final ServerStatus status; - final DateTime created; - final List volumes; - - @JsonKey(name: 'server_type') - final ProviderServerTypeInfo serverType; - - @JsonKey(name: 'datacenter', fromJson: ProviderServerInfo.locationFromJson) - final ProviderLocation location; - - @JsonKey(name: 'public_net') - final ProviderPublicNetInfo publicNet; - - static ProviderLocation locationFromJson(final Map json) => - ProviderLocation.fromJson(json['location']); - - static ProviderServerInfo fromJson(final Map json) => - _$ProviderServerInfoFromJson(json); -} - -@JsonSerializable() -class ProviderPublicNetInfo { - ProviderPublicNetInfo(this.ipv4); - final ProviderIp4 ipv4; - - static ProviderPublicNetInfo fromJson(final Map json) => - _$ProviderPublicNetInfoFromJson(json); -} - -@JsonSerializable() -class ProviderIp4 { - ProviderIp4(this.id, this.ip, this.blocked, this.reverseDns); - final bool blocked; - @JsonKey(name: 'dns_ptr') - final String reverseDns; - final int id; - final String ip; - - static ProviderIp4 fromJson(final Map json) => - _$ProviderIp4FromJson(json); -} - -enum ServerStatus { - running, - initializing, - starting, - stopping, - off, - deleting, - migrating, - rebuilding, - unknown, -} - -@JsonSerializable() -class ProviderServerTypeInfo { - ProviderServerTypeInfo(this.cores, this.memory, this.disk, this.prices); - final int cores; - final num memory; - final int disk; - - final List prices; - - static ProviderServerTypeInfo fromJson(final Map json) => - _$ProviderServerTypeInfoFromJson(json); -} - -@JsonSerializable() -class ProviderPriceInfo { - ProviderPriceInfo(this.hourly, this.monthly); - - @JsonKey(name: 'price_hourly', fromJson: ProviderPriceInfo.getPrice) - final double hourly; - - @JsonKey(name: 'price_monthly', fromJson: ProviderPriceInfo.getPrice) - final double monthly; - - static ProviderPriceInfo fromJson(final Map json) => - _$ProviderPriceInfoFromJson(json); - - static double getPrice(final Map json) => - double.parse(json['gross'] as String); -} - -@JsonSerializable() -class ProviderLocation { - ProviderLocation(this.country, this.city, this.description, this.zone); - final String country; - final String city; - final String description; - - @JsonKey(name: 'network_zone') - final String zone; - - static ProviderLocation fromJson(final Map json) => - _$ProviderLocationFromJson(json); -} diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 6025d621..01b3cb35 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_cloudflare.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart index 819cbea2..5ee461a7 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/hetzner_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; diff --git a/lib/utils/scalars.dart b/lib/utils/scalars.dart index 71a571e7..278fb80a 100644 --- a/lib/utils/scalars.dart +++ b/lib/utils/scalars.dart @@ -1,3 +1,5 @@ +// ignore_for_file: prefer_final_parameters, prefer_expression_function_bodies + String dateTimeToJson(DateTime data) { return data.toIso8601String(); } From dac310f9138ebda065073375c1a7a88c87e881f9 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 14 Jul 2022 16:34:08 +0300 Subject: [PATCH 012/732] Implement Dns Provider Api Abstractions --- .../rest_maps/api_factory_creator.dart | 41 +++++---- .../cloudflare}/cloudflare.dart | 84 +++++++++++-------- .../cloudflare/cloudflare_factory.dart | 15 ++++ .../rest_maps/dns_providers/dns_provider.dart | 31 +++++++ .../dns_providers/dns_provider_factory.dart | 17 ++++ .../rest_maps/provider_api_settings.dart | 5 ++ .../providers/hetzner/hetzner_factory.dart | 25 ------ .../rest_maps/providers/provider_factory.dart | 20 ----- .../hetzner/hetzner.dart | 4 +- .../hetzner/hetzner_factory.dart | 26 ++++++ .../server_provider.dart} | 0 .../server_provider_factory.dart | 15 ++++ .../volume_provider.dart | 0 .../cubit/dns_records/dns_records_cubit.dart | 27 ++++-- ...ubit.dart => dns_provider_form_cubit.dart} | 12 ++- ...loudflare.dart => domain_setup_cubit.dart} | 14 ++-- .../initializing/provider_form_cubit.dart | 4 +- .../hetzner_metrics_repository.dart | 2 +- .../server_detailed_info_repository.dart | 2 +- .../server_installation_cubit.dart | 29 +++++-- .../server_installation_repository.dart | 78 ++++++++++------- lib/logic/cubit/volumes/volumes_cubit.dart | 2 +- lib/ui/pages/setup/initializing.dart | 12 +-- .../recovery_confirm_cloudflare.dart | 10 +-- 24 files changed, 305 insertions(+), 170 deletions(-) rename lib/logic/api_maps/rest_maps/{ => dns_providers/cloudflare}/cloudflare.dart (79%) create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart create mode 100644 lib/logic/api_maps/rest_maps/provider_api_settings.dart delete mode 100644 lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart delete mode 100644 lib/logic/api_maps/rest_maps/providers/provider_factory.dart rename lib/logic/api_maps/rest_maps/{providers => server_providers}/hetzner/hetzner.dart (98%) create mode 100644 lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart rename lib/logic/api_maps/rest_maps/{providers/provider.dart => server_providers/server_provider.dart} (100%) create mode 100644 lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart rename lib/logic/api_maps/rest_maps/{providers => server_providers}/volume_provider.dart (100%) rename lib/logic/cubit/forms/setup/initializing/{cloudflare_form_cubit.dart => dns_provider_form_cubit.dart} (75%) rename lib/logic/cubit/forms/setup/initializing/{domain_cloudflare.dart => domain_setup_cubit.dart} (83%) diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 0343f402..18b4ea33 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -1,23 +1,37 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; + +class UnknownApiProviderException implements Exception { + UnknownApiProviderException(this.message); + final String message; +} class ApiFactoryCreator { - static ProviderApiFactory createProviderApiFactory( + static ServerProviderApiFactory createServerProviderApiFactory( final ServerProvider provider, ) { switch (provider) { case ServerProvider.hetzner: - case ServerProvider.unknown: // ?? :) return HetznerApiFactory(); + case ServerProvider.unknown: + throw UnknownApiProviderException('Unknown server provider'); } } - // createDnsApiFactory - - // createStorageApiFactory - - // etc . . . + static DnsProviderApiFactory createDnsProviderApiFactory( + final DnsProvider provider, + ) { + switch (provider) { + case DnsProvider.cloudflare: + return CloudflareApiFactory(); + case DnsProvider.unknown: + throw UnknownApiProviderException('Unknown DNS provider'); + } + } } class VolumeApiFactoryCreator { @@ -26,14 +40,9 @@ class VolumeApiFactoryCreator { ) { switch (provider) { case ServerProvider.hetzner: - case ServerProvider.unknown: // ?? :) return HetznerApiFactory(); + case ServerProvider.unknown: + throw UnknownApiProviderException('Unknown volume provider'); } } - - // createDnsApiFactory - - // createStorageApiFactory - - // etc . . . } diff --git a/lib/logic/api_maps/rest_maps/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart similarity index 79% rename from lib/logic/api_maps/rest_maps/cloudflare.dart rename to lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 2b78c6fe..46dc72ac 100644 --- a/lib/logic/api_maps/rest_maps/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -2,16 +2,11 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -class DomainNotFoundException implements Exception { - DomainNotFoundException(this.message); - final String message; -} - -class CloudflareApi extends ApiMap { +class CloudflareApi extends DnsProviderApi { CloudflareApi({ this.hasLogger = false, this.isWithToken = true, @@ -24,6 +19,10 @@ class CloudflareApi extends ApiMap { final String? customToken; + @override + RegExp getApiTokenValidation() => + RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + @override BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); @@ -46,27 +45,37 @@ class CloudflareApi extends ApiMap { @override String rootAddress = 'https://api.cloudflare.com/client/v4'; - Future isValid(final String token) async { - validateStatus = (final status) => - status == HttpStatus.ok || status == HttpStatus.unauthorized; - + @override + Future isApiTokenValid(final String token) async { + bool isValid = false; + Response? response; final Dio client = await getClient(); - final Response response = await client.get( - '/user/tokens/verify', - options: Options(headers: {'Authorization': 'Bearer $token'}), - ); - - close(client); - - if (response.statusCode == HttpStatus.ok) { - return true; - } else if (response.statusCode == HttpStatus.unauthorized) { - return false; - } else { - throw Exception('code: ${response.statusCode}'); + try { + response = await client.get( + '/user/tokens/verify', + options: Options(headers: {'Authorization': 'Bearer $token'}), + ); + } catch (e) { + print(e); + isValid = false; + } finally { + close(client); } + + if (response != null) { + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + } + + return isValid; } + @override Future getZoneId(final String domain) async { validateStatus = (final status) => status == HttpStatus.ok || status == HttpStatus.forbidden; @@ -85,12 +94,13 @@ class CloudflareApi extends ApiMap { } } + @override Future removeSimilarRecords({ - required final ServerDomain cloudFlareDomain, + required final ServerDomain domain, final String? ip4, }) async { - final String domainName = cloudFlareDomain.domainName; - final String domainZoneId = cloudFlareDomain.zoneId; + final String domainName = domain.domainName; + final String domainZoneId = domain.zoneId; final String url = '/zones/$domainZoneId/dns_records'; @@ -112,11 +122,12 @@ class CloudflareApi extends ApiMap { close(client); } + @override Future> getDnsRecords({ - required final ServerDomain cloudFlareDomain, + required final ServerDomain domain, }) async { - final String domainName = cloudFlareDomain.domainName; - final String domainZoneId = cloudFlareDomain.zoneId; + final String domainName = domain.domainName; + final String domainZoneId = domain.zoneId; final String url = '/zones/$domainZoneId/dns_records'; @@ -144,12 +155,13 @@ class CloudflareApi extends ApiMap { return allRecords; } + @override Future createMultipleDnsRecords({ - required final ServerDomain cloudFlareDomain, + required final ServerDomain domain, final String? ip4, }) async { - final String domainName = cloudFlareDomain.domainName; - final String domainZoneId = cloudFlareDomain.zoneId; + final String domainName = domain.domainName; + final String domainZoneId = domain.zoneId; final List listDnsRecords = projectDnsRecords(domainName, ip4); final List allCreateFutures = []; @@ -219,11 +231,12 @@ class CloudflareApi extends ApiMap { ]; } + @override Future setDkim( final String dkimRecordString, - final ServerDomain cloudFlareDomain, + final ServerDomain domain, ) async { - final String domainZoneId = cloudFlareDomain.zoneId; + final String domainZoneId = domain.zoneId; final String url = '$rootAddress/zones/$domainZoneId/dns_records'; final DnsRecord dkimRecord = DnsRecord( @@ -242,6 +255,7 @@ class CloudflareApi extends ApiMap { client.close(); } + @override Future> domainList() async { final String url = '$rootAddress/zones'; final Dio client = await getClient(); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart new file mode 100644 index 00000000..9266471b --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart @@ -0,0 +1,15 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; + +class CloudflareApiFactory extends DnsProviderApiFactory { + @override + DnsProviderApi getDnsProvider({ + final DnsProviderApiSettings settings = const DnsProviderApiSettings(), + }) => + CloudflareApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + customToken: settings.customToken, + ); +} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart new file mode 100644 index 00000000..5c2a9369 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -0,0 +1,31 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; + +class DomainNotFoundException implements Exception { + DomainNotFoundException(this.message); + final String message; +} + +abstract class DnsProviderApi extends ApiMap { + Future> getDnsRecords({ + required final ServerDomain domain, + }); + Future removeSimilarRecords({ + required final ServerDomain domain, + final String? ip4, + }); + Future createMultipleDnsRecords({ + required final ServerDomain domain, + final String? ip4, + }); + Future setDkim( + final String dkimRecordString, + final ServerDomain domain, + ); + Future getZoneId(final String domain); + Future> domainList(); + + Future isApiTokenValid(final String token); + RegExp getApiTokenValidation(); +} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart new file mode 100644 index 00000000..01f59e98 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart @@ -0,0 +1,17 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; + +class DnsProviderApiSettings extends ProviderApiSettings { + const DnsProviderApiSettings({ + final super.hasLogger = false, + final super.isWithToken = true, + final this.customToken, + }); + final String? customToken; +} + +abstract class DnsProviderApiFactory { + DnsProviderApi getDnsProvider({ + final DnsProviderApiSettings settings = const DnsProviderApiSettings(), + }); +} diff --git a/lib/logic/api_maps/rest_maps/provider_api_settings.dart b/lib/logic/api_maps/rest_maps/provider_api_settings.dart new file mode 100644 index 00000000..4350fbe7 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/provider_api_settings.dart @@ -0,0 +1,5 @@ +class ProviderApiSettings { + const ProviderApiSettings({this.hasLogger = false, this.isWithToken = true}); + final bool hasLogger; + final bool isWithToken; +} diff --git a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart b/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart deleted file mode 100644 index 301d4b61..00000000 --- a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner_factory.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.dart'; - -class HetznerApiFactory extends ProviderApiFactory - with VolumeProviderApiFactory { - @override - ServerProviderApi getProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), - }) => - HetznerApi( - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - ); - - @override - VolumeProviderApi getVolumeProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), - }) => - HetznerApi( - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - ); -} diff --git a/lib/logic/api_maps/rest_maps/providers/provider_factory.dart b/lib/logic/api_maps/rest_maps/providers/provider_factory.dart deleted file mode 100644 index b238d299..00000000 --- a/lib/logic/api_maps/rest_maps/providers/provider_factory.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.dart'; - -class ProviderApiSettings { - const ProviderApiSettings({this.hasLogger = false, this.isWithToken = true}); - final bool hasLogger; - final bool isWithToken; -} - -abstract class ProviderApiFactory { - ServerProviderApi getProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), - }); -} - -mixin VolumeProviderApiFactory { - VolumeProviderApi getVolumeProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), - }); -} diff --git a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart similarity index 98% rename from lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart rename to lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 3b0dfd42..fa75db17 100644 --- a/lib/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -3,8 +3,8 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/volume_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart new file mode 100644 index 00000000..60f61d1b --- /dev/null +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart @@ -0,0 +1,26 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; + +class HetznerApiFactory extends ServerProviderApiFactory + with VolumeProviderApiFactory { + @override + ServerProviderApi getServerProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }) => + HetznerApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + ); + + @override + VolumeProviderApi getVolumeProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }) => + HetznerApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + ); +} diff --git a/lib/logic/api_maps/rest_maps/providers/provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart similarity index 100% rename from lib/logic/api_maps/rest_maps/providers/provider.dart rename to lib/logic/api_maps/rest_maps/server_providers/server_provider.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart new file mode 100644 index 00000000..10f4c40f --- /dev/null +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart @@ -0,0 +1,15 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; + +abstract class ServerProviderApiFactory { + ServerProviderApi getServerProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }); +} + +mixin VolumeProviderApiFactory { + VolumeProviderApi getVolumeProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }); +} diff --git a/lib/logic/api_maps/rest_maps/providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart similarity index 100% rename from lib/logic/api_maps/rest_maps/providers/volume_provider.dart rename to lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 8d8ae496..e0ab4d42 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,9 +1,11 @@ import 'package:cubit_form/cubit_form.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; part 'dns_records_state.dart'; @@ -16,8 +18,12 @@ class DnsRecordsCubit const DnsRecordsState(dnsState: DnsRecordsStatus.refreshing), ); + DnsProviderApiFactory? dnsProviderApiFactory = + ApiFactoryCreator.createDnsProviderApiFactory( + DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! + ); // TODO: Remove when provider selection is implemented. + final ServerApi api = ServerApi(); - final CloudflareApi cloudflare = CloudflareApi(); @override Future load() async { @@ -31,14 +37,15 @@ class DnsRecordsCubit ), ), ); - print('Loading DNS status'); + if (serverInstallationCubit.state is ServerInstallationFinished) { final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; if (domain != null && ipAddress != null) { - final List records = - await cloudflare.getDnsRecords(cloudFlareDomain: domain); + final List records = await dnsProviderApiFactory! + .getDnsProvider() + .getDnsRecords(domain: domain); final String? dkimPublicKey = await api.getDkim(); final List desiredRecords = _getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey); @@ -116,12 +123,14 @@ class DnsRecordsCubit final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; final String? dkimPublicKey = await api.getDkim(); - await cloudflare.removeSimilarRecords(cloudFlareDomain: domain!); - await cloudflare.createMultipleDnsRecords( - cloudFlareDomain: domain, + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); + await dnsProviderApi.removeSimilarRecords(domain: domain!); + await dnsProviderApi.createMultipleDnsRecords( + domain: domain, ip4: ipAddress, ); - await cloudflare.setDkim(dkimPublicKey ?? '', domain); + await dnsProviderApi.setDkim(dkimPublicKey ?? '', domain); await load(); } diff --git a/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart similarity index 75% rename from lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart rename to lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index 20c99f38..d27d7053 100644 --- a/lib/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -2,13 +2,12 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; -class CloudFlareFormCubit extends FormCubit { - CloudFlareFormCubit(this.initializingCubit) { - final RegExp regExp = RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); +class DnsProviderFormCubit extends FormCubit { + DnsProviderFormCubit(this.initializingCubit) { + final RegExp regExp = initializingCubit.getDnsProviderApiTokenValidation(); apiKey = FieldCubit( initalValue: '', validations: [ @@ -30,16 +29,15 @@ class CloudFlareFormCubit extends FormCubit { } final ServerInstallationCubit initializingCubit; - late final FieldCubit apiKey; @override FutureOr asyncValidation() async { late bool isKeyValid; - final CloudflareApi apiClient = CloudflareApi(isWithToken: false); try { - isKeyValid = await apiClient.isValid(apiKey.state.value); + isKeyValid = await initializingCubit + .isDnsProviderApiTokenValid(apiKey.state.value); } catch (e) { addError(e); isKeyValid = false; diff --git a/lib/logic/cubit/forms/setup/initializing/domain_cloudflare.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart similarity index 83% rename from lib/logic/cubit/forms/setup/initializing/domain_cloudflare.dart rename to lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index b38e8313..4a14b862 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_cloudflare.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -1,5 +1,4 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -10,9 +9,10 @@ class DomainSetupCubit extends Cubit { Future load() async { emit(Loading(LoadingTypes.loadingDomain)); - final CloudflareApi api = CloudflareApi(); - - final List list = await api.domainList(); + final List list = await serverInstallationCubit + .repository.dnsProviderApiFactory! + .getDnsProvider() + .domainList(); if (list.isEmpty) { emit(Empty()); } else if (list.length == 1) { @@ -28,11 +28,13 @@ class DomainSetupCubit extends Cubit { Future saveDomain() async { assert(state is Loaded, 'wrong state'); final String domainName = (state as Loaded).domain; - final CloudflareApi api = CloudflareApi(); emit(Loading(LoadingTypes.saving)); - final String zoneId = await api.getZoneId(domainName); + final String zoneId = await serverInstallationCubit + .repository.dnsProviderApiFactory! + .getDnsProvider() + .getZoneId(domainName); final ServerDomain domain = ServerDomain( domainName: domainName, diff --git a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart index 24910ad1..9f3b5d58 100644 --- a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class ProviderFormCubit extends FormCubit { ProviderFormCubit(this.serverInstallationCubit) { final RegExp regExp = - serverInstallationCubit.getProviderApiTokenValidation(); + serverInstallationCubit.getServerProviderApiTokenValidation(); apiKey = FieldCubit( initalValue: '', validations: [ @@ -38,7 +38,7 @@ class ProviderFormCubit extends FormCubit { try { isKeyValid = await serverInstallationCubit - .isProviderApiTokenValid(apiKey.state.value); + .isServerProviderApiTokenValid(apiKey.state.value); } catch (e) { addError(e); isKeyValid = false; diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart index 9b09d7f6..0fb780ae 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index 8fd3e711..e5858d2d 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/hetzner/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index e6402836..6899240f 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -4,7 +4,8 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -50,13 +51,31 @@ class ServerInstallationCubit extends Cubit { } } - RegExp getProviderApiTokenValidation() => repository.serverProviderApiFactory! - .getProvider() + RegExp getServerProviderApiTokenValidation() => + repository.serverProviderApiFactory! + .getServerProvider() + .getApiTokenValidation(); + + RegExp getDnsProviderApiTokenValidation() => repository.dnsProviderApiFactory! + .getDnsProvider() .getApiTokenValidation(); - Future isProviderApiTokenValid(final String providerToken) async => + Future isServerProviderApiTokenValid( + final String providerToken, + ) async => repository.serverProviderApiFactory! - .getProvider(settings: const ProviderApiSettings(isWithToken: false)) + .getServerProvider( + settings: const ProviderApiSettings(isWithToken: false), + ) + .isApiTokenValid(providerToken); + + Future isDnsProviderApiTokenValid( + final String providerToken, + ) async => + repository.dnsProviderApiFactory! + .getDnsProvider( + settings: const DnsProviderApiSettings(isWithToken: false), + ) .isApiTokenValid(providerToken); void setHetznerKey(final String hetznerKey) async { diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index a91432dc..1c94a2d0 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -10,9 +10,10 @@ import 'package:pub_semver/pub_semver.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/cloudflare.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; @@ -40,10 +41,14 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); - ProviderApiFactory? serverProviderApiFactory = - ApiFactoryCreator.createProviderApiFactory( - ServerProvider.hetzner, // HARDCODE FOR NOW!!! - ); // Remove when provider selection is implemented. + ServerProviderApiFactory? serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory( + ServerProvider.hetzner, // TODO: HARDCODE FOR NOW!!! + ); // TODO: Remove when provider selection is implemented. + DnsProviderApiFactory? dnsProviderApiFactory = + ApiFactoryCreator.createDnsProviderApiFactory( + DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! + ); Future load() async { final String? providerApiToken = getIt().hetznerKey; @@ -54,9 +59,18 @@ class ServerInstallationRepository { final ServerHostingDetails? serverDetails = getIt().serverDetails; - if (serverDetails != null) { + if (serverDetails != null && + serverDetails.provider != ServerProvider.unknown) { serverProviderApiFactory = - ApiFactoryCreator.createProviderApiFactory(serverDetails.provider); + ApiFactoryCreator.createServerProviderApiFactory( + serverDetails.provider, + ); + } + + if (serverDomain != null && serverDomain.provider != DnsProvider.unknown) { + dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( + serverDomain.provider, + ); } if (box.get(BNames.hasFinalChecked, defaultValue: false)) { @@ -142,20 +156,22 @@ class ServerInstallationRepository { ) async { ServerHostingDetails? serverDetails; - final ServerProviderApi api = serverProviderApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); serverDetails = await api.powerOn(); return serverDetails; } Future getDomainId(final String token, final String domain) async { - final CloudflareApi cloudflareApi = CloudflareApi( - isWithToken: false, - customToken: token, + final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider( + settings: DnsProviderApiSettings( + isWithToken: false, + customToken: token, + ), ); try { - final String domainId = await cloudflareApi.getZoneId(domain); + final String domainId = await dnsProviderApi.getZoneId(domain); return domainId; } on DomainNotFoundException { return null; @@ -220,7 +236,7 @@ class ServerInstallationRepository { required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { - final ServerProviderApi api = serverProviderApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); try { final ServerHostingDetails? serverDetails = await api.createServer( dnsApiToken: cloudFlareKey, @@ -285,18 +301,20 @@ class ServerInstallationRepository { final ServerDomain domain, { required final void Function() onCancel, }) async { - final CloudflareApi cloudflareApi = CloudflareApi(); - final ServerProviderApi serverApi = serverProviderApiFactory!.getProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); + final ServerProviderApi serverApi = + serverProviderApiFactory!.getServerProvider(); - await cloudflareApi.removeSimilarRecords( + await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, - cloudFlareDomain: domain, + domain: domain, ); try { - await cloudflareApi.createMultipleDnsRecords( + await dnsProviderApi.createMultipleDnsRecords( ip4: serverDetails.ip4, - cloudFlareDomain: domain, + domain: domain, ); } on DioError catch (e) { final NavigationService nav = getIt.get(); @@ -337,12 +355,13 @@ class ServerInstallationRepository { } Future createDkimRecord(final ServerDomain cloudFlareDomain) async { - final CloudflareApi cloudflareApi = CloudflareApi(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); final String? dkimRecordString = await api.getDkim(); - await cloudflareApi.setDkim(dkimRecordString ?? '', cloudFlareDomain); + await dnsProviderApi.setDkim(dkimRecordString ?? '', cloudFlareDomain); } Future isHttpServerWorking() async { @@ -357,12 +376,12 @@ class ServerInstallationRepository { } Future restart() async { - final ServerProviderApi api = serverProviderApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); return api.restart(); } Future powerOn() async { - final ServerProviderApi api = serverProviderApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); return api.powerOn(); } @@ -599,7 +618,7 @@ class ServerInstallationRepository { } Future> getServersOnProviderAccount() async { - final ServerProviderApi api = serverProviderApiFactory!.getProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); return api.getServers(); } @@ -678,8 +697,9 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final ServerProviderApi api = serverProviderApiFactory!.getProvider(); - final CloudflareApi cloudFlare = CloudflareApi(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); await api.deleteServer( domainName: serverDomain.domainName, @@ -692,7 +712,7 @@ class ServerInstallationRepository { await box.put(BNames.isLoading, false); await box.put(BNames.serverDetails, null); - await cloudFlare.removeSimilarRecords(cloudFlareDomain: serverDomain); + await dnsProviderApi.removeSimilarRecords(domain: serverDomain); } Future deleteServerRelatedRecords() async { diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart index d724e121..2645e502 100644 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -1,6 +1,6 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/providers/provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 01b3cb35..b4a504b8 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -5,8 +5,8 @@ import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_cloudflare.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; @@ -195,10 +195,10 @@ class InitializingPage extends StatelessWidget { Widget _stepCloudflare(final ServerInstallationCubit initializingCubit) => BlocProvider( - create: (final context) => CloudFlareFormCubit(initializingCubit), + create: (final context) => DnsProviderFormCubit(initializingCubit), child: Builder( builder: (final context) { - final formCubitState = context.watch().state; + final formCubitState = context.watch().state; return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -213,7 +213,7 @@ class InitializingPage extends StatelessWidget { BrandText.body2('initializing.4'.tr()), const Spacer(), CubitFormTextField( - formFieldCubit: context.read().apiKey, + formFieldCubit: context.read().apiKey, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), decoration: InputDecoration( @@ -224,7 +224,7 @@ class InitializingPage extends StatelessWidget { BrandButton.rised( onPressed: formCubitState.isSubmitting ? null - : () => context.read().trySubmit(), + : () => context.read().trySubmit(), text: 'basis.connect'.tr(), ), const SizedBox(height: 10), diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index 0e12b51e..b7891bc1 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -2,7 +2,7 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/cloudflare_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; @@ -18,11 +18,11 @@ class RecoveryConfirmCloudflare extends StatelessWidget { context.watch(); return BlocProvider( - create: (final BuildContext context) => CloudFlareFormCubit(appConfig), + create: (final BuildContext context) => DnsProviderFormCubit(appConfig), child: Builder( builder: (final BuildContext context) { final FormCubitState formCubitState = - context.watch().state; + context.watch().state; return BrandHeroScreen( heroTitle: 'recovering.confirm_cloudflare'.tr(), @@ -35,7 +35,7 @@ class RecoveryConfirmCloudflare extends StatelessWidget { context.read().revertRecoveryStep, children: [ CubitFormTextField( - formFieldCubit: context.read().apiKey, + formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), labelText: 'initializing.5'.tr(), @@ -45,7 +45,7 @@ class RecoveryConfirmCloudflare extends StatelessWidget { BrandButton.rised( onPressed: formCubitState.isSubmitting ? null - : () => context.read().trySubmit(), + : () => context.read().trySubmit(), text: 'basis.connect'.tr(), ), const SizedBox(height: 16), From dab2c569ec044c1216abf274ccfa57f5746e105b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 22 Jul 2022 19:22:10 +0300 Subject: [PATCH 013/732] Fix installation Timer errors Co-authored-by: Inex Code --- assets/translations/en.json | 2 +- lib/logic/api_maps/rest_maps/server.dart | 17 ++++++--- .../server_providers/hetzner/hetzner.dart | 1 + .../cubit/forms/user/ssh_form_cubit.dart | 3 +- .../server_installation_cubit.dart | 36 +++++++++---------- .../server_installation_repository.dart | 22 ++++++------ .../server_installation_state.dart | 20 +++++------ lib/ui/pages/providers/providers.dart | 2 +- lib/ui/pages/setup/initializing.dart | 4 +-- lib/utils/ui_helpers.dart | 2 +- 10 files changed, 58 insertions(+), 51 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index c0e95639..4f32320e 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -284,7 +284,7 @@ "22": "Create master account", "23": "Enter a nickname and strong password", "finish": "Everything is initialized", - "checks": "Checks have been completed \n{} ouf of {}" + "checks": "Checks have been completed \n{} out of {}" }, "recovering": { "recovery_main_header": "Connect to an existing server", diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 3cb2ed73..c0ef23b0 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -46,7 +46,10 @@ class ServerApi extends ApiMap { @override BaseOptions get options { - BaseOptions options = BaseOptions(); + BaseOptions options = BaseOptions( + connectTimeout: 10000, + receiveTimeout: 10000, + ); if (isWithToken) { final ServerDomain? cloudFlareDomain = @@ -56,6 +59,8 @@ class ServerApi extends ApiMap { options = BaseOptions( baseUrl: 'https://api.$domainName', + connectTimeout: 10000, + receiveTimeout: 10000, headers: { 'Authorization': 'Bearer $apiToken', }, @@ -65,6 +70,8 @@ class ServerApi extends ApiMap { if (overrideDomain != null) { options = BaseOptions( baseUrl: 'https://api.$overrideDomain', + connectTimeout: 10000, + receiveTimeout: 10000, headers: customToken != null ? {'Authorization': 'Bearer $customToken'} : null, @@ -619,7 +626,7 @@ class ServerApi extends ApiMap { } } - Future getDkim() async { + Future getDkim() async { Response response; final Dio client = await getClient(); @@ -627,13 +634,13 @@ class ServerApi extends ApiMap { response = await client.get('/services/mailserver/dkim'); } on DioError catch (e) { print(e.message); - return null; + throw Exception('No DKIM key found'); } finally { close(client); } if (response.statusCode == null) { - return null; + throw Exception('No DKIM key found'); } if (response.statusCode == HttpStatus.notFound || response.data == null) { @@ -641,7 +648,7 @@ class ServerApi extends ApiMap { } if (response.statusCode != HttpStatus.ok) { - return ''; + throw Exception('No DKIM key found'); } final Codec base64toString = utf8.fuse(base64); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index fa75db17..0a2c3c73 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -341,6 +341,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { rethrow; } catch (e) { print(e); + deleteVolume(dataBase.id); } finally { client.close(); } diff --git a/lib/logic/cubit/forms/user/ssh_form_cubit.dart b/lib/logic/cubit/forms/user/ssh_form_cubit.dart index ba38a642..b6493ee7 100644 --- a/lib/logic/cubit/forms/user/ssh_form_cubit.dart +++ b/lib/logic/cubit/forms/user/ssh_form_cubit.dart @@ -41,7 +41,8 @@ class SshFormCubit extends FormCubit { @override FutureOr onSubmit() { print(key.state.isValid); - jobsCubit.addJob(CreateSSHKeyJob(user: user, publicKey: key.state.value)); + jobsCubit + .addJob(CreateSSHKeyJob(user: user, publicKey: key.state.value.trim())); } late FieldCubit key; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 6899240f..39f5bf61 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -195,24 +195,10 @@ class ServerInstallationCubit extends Cubit { ); if (matches.values.every((final bool value) => value)) { - final ServerHostingDetails? server = await repository.startServer( + final ServerHostingDetails server = await repository.startServer( dataState.serverDetails!, ); - if (server == null) { - final ServerInstallationNotFinished newState = dataState.copyWith( - isLoading: false, - dnsMatches: matches, - ); - emit(newState); - runDelayed( - startServerIfDnsIsOkay, - const Duration(seconds: 30), - newState, - ); - return; - } - await repository.saveServerDetails(server); await repository.saveIsServerStarted(true); @@ -338,10 +324,22 @@ class ServerInstallationCubit extends Cubit { final bool isServerWorking = await repository.isHttpServerWorking(); if (isServerWorking) { - await repository.createDkimRecord(dataState.serverDomain!); - await repository.saveHasFinalChecked(true); - - emit(dataState.finish()); + bool dkimCreated = true; + try { + await repository.createDkimRecord(dataState.serverDomain!); + } catch (e) { + dkimCreated = false; + } + if (dkimCreated) { + await repository.saveHasFinalChecked(true); + emit(dataState.finish()); + } else { + runDelayed( + finishCheckIfServerIsOkay, + const Duration(seconds: 60), + dataState, + ); + } } else { runDelayed( finishCheckIfServerIsOkay, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 1c94a2d0..6236052a 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -151,10 +151,10 @@ class ServerInstallationRepository { usersBox.clear(); } - Future startServer( + Future startServer( final ServerHostingDetails hetznerServer, ) async { - ServerHostingDetails? serverDetails; + ServerHostingDetails serverDetails; final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); serverDetails = await api.powerOn(); @@ -359,20 +359,20 @@ class ServerInstallationRepository { dnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); - final String? dkimRecordString = await api.getDkim(); + String dkimRecordString = ''; + try { + dkimRecordString = await api.getDkim(); + } catch (e) { + print(e); + rethrow; + } - await dnsProviderApi.setDkim(dkimRecordString ?? '', cloudFlareDomain); + await dnsProviderApi.setDkim(dkimRecordString, cloudFlareDomain); } Future isHttpServerWorking() async { final ServerApi api = ServerApi(); - final bool isHttpServerWorking = await api.isHttpServerWorking(); - try { - await api.getDkim(); - } catch (e) { - return false; - } - return isHttpServerWorking; + return api.isHttpServerWorking(); } Future restart() async { diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 5bb59275..bb04c07d 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -35,11 +35,11 @@ abstract class ServerInstallationState extends Equatable { final bool isServerResetedFirstTime; final bool isServerResetedSecondTime; - bool get isProviderFilled => providerApiToken != null; - bool get isCloudFlareFilled => cloudFlareKey != null; - bool get isBackblazeFilled => backblazeCredential != null; - bool get isDomainFilled => serverDomain != null; - bool get isUserFilled => rootUser != null; + bool get isServerProviderFilled => providerApiToken != null; + bool get isDnsProviderFilled => cloudFlareKey != null; + bool get isBackupsProviderFilled => backblazeCredential != null; + bool get isDomainSelected => serverDomain != null; + bool get isPrimaryUserFilled => rootUser != null; bool get isServerCreated => serverDetails != null; bool get isFullyInitilized => _fulfilementList.every((final el) => el!); @@ -58,11 +58,11 @@ abstract class ServerInstallationState extends Equatable { List get _fulfilementList { final List res = [ - isProviderFilled, - isCloudFlareFilled, - isBackblazeFilled, - isDomainFilled, - isUserFilled, + isServerProviderFilled, + isDnsProviderFilled, + isBackupsProviderFilled, + isDomainSelected, + isPrimaryUserFilled, isServerCreated, isServerStarted, isServerResetedFirstTime, diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 97e4aeeb..640e620f 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -104,7 +104,7 @@ class _Card extends StatelessWidget { context.watch().state; final String domainName = - appConfig.isDomainFilled ? appConfig.serverDomain!.domainName : ''; + appConfig.isDomainSelected ? appConfig.serverDomain!.domainName : ''; switch (provider.type) { case ProviderType.server: diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index b4a504b8..2cde89ce 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -42,7 +42,7 @@ class InitializingPage extends StatelessWidget { () => _stepCheck(cubit), () => _stepCheck(cubit), () => _stepCheck(cubit), - () => Center(child: Text('initializing.finish'.tr())) + () => _stepCheck(cubit) ][cubit.state.progress.index](); return BlocListener( @@ -60,7 +60,7 @@ class InitializingPage extends StatelessWidget { children: [ Padding( padding: paddingH15V0.copyWith(top: 10, bottom: 10), - child: cubit.state.isFullyInitilized + child: cubit.state is ServerInstallationFinished ? const SizedBox( height: 80, ) diff --git a/lib/utils/ui_helpers.dart b/lib/utils/ui_helpers.dart index c34721e1..f4d58a05 100644 --- a/lib/utils/ui_helpers.dart +++ b/lib/utils/ui_helpers.dart @@ -4,5 +4,5 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ class UiHelpers { static String getDomainName(final ServerInstallationState config) => - config.isDomainFilled ? config.serverDomain!.domainName : 'example.com'; + config.isDomainSelected ? config.serverDomain!.domainName : 'example.com'; } From d8ea5286214ede7a7fcf26a8961a3b1f2e91ca47 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 25 Jul 2022 03:03:19 +0300 Subject: [PATCH 014/732] Add magic sleep before deleteVolume on creation failure It seems Hetzner fails to accept our deleteVolume request so quickly after failing. We need to wait for about 10 seconds, I guess. The same magic sleep happens on deleteServer pack of requests. Please have patience... --- .../server_providers/hetzner/hetzner.dart | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 0a2c3c73..4c9664bb 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -271,10 +271,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { dataBase: newVolume, ); - if (details == null) { - deleteVolume(newVolume.id); - } - return details; } @@ -320,6 +316,8 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { print('Decoded data: $data'); ServerHostingDetails? serverDetails; + DioError? hetznerError; + bool success = false; try { final Response serverCreateResponse = await client.post( @@ -335,17 +333,25 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { apiToken: apiToken, provider: ServerProvider.hetzner, ); + success = true; } on DioError catch (e) { print(e); - deleteVolume(dataBase.id); - rethrow; + hetznerError = e; } catch (e) { print(e); - deleteVolume(dataBase.id); } finally { client.close(); } + if (!success) { + await Future.delayed(const Duration(seconds: 10)); + await deleteVolume(dbId); + } + + if (hetznerError != null) { + throw hetznerError; + } + return serverDetails; } From 7ead9a29ea9ec615cee6577f7b2de7f084e79c65 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 25 Jul 2022 17:06:55 +0300 Subject: [PATCH 015/732] Implement basic graphql api map structure --- assets/translations/en.json | 3 +- assets/translations/ru.json | 3 +- build.yaml | 2 +- lib/logic/api_maps/graphql_maps/api_map.dart | 25 + .../schema/get_api_tokens.graphql.dart | 474 ++++++++++++++++++ .../schema/get_api_tokens.graphql.g.dart | 23 + .../schema/get_api_version.graphql.dart | 301 +++++++++++ .../schema/get_api_version.graphql.g.dart | 14 + .../graphql_maps/schema/schema.graphql.dart | 274 ++++++++++ .../graphql_maps/schema/schema.graphql.g.dart | 21 + .../api_maps/graphql_maps/schema/server.dart | 39 ++ lib/logic/api_maps/rest_maps/server.dart | 5 +- lib/logic/models/json/api_token.g.dart | 6 + lib/logic/models/json/backup.g.dart | 12 + lib/logic/models/json/device_token.g.dart | 6 + .../models/json/hetzner_server_info.g.dart | 49 ++ .../models/json/recovery_token_status.g.dart | 9 + lib/ui/pages/more/info/info.dart | 25 +- pubspec.lock | 82 +-- pubspec.yaml | 18 +- .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 22 files changed, 1321 insertions(+), 74 deletions(-) create mode 100644 lib/logic/api_maps/graphql_maps/api_map.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/server.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index c0e95639..4fdb0626 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -52,7 +52,8 @@ "copied_ssh": "SSH copied to clipboard", "delete_ssh_text": "Delete SSH key?", "about_app_page": { - "text": "Application version v.{}" + "application_version_text": "Application version v.{}", + "api_version_text": "Server API version v.{}" }, "settings": { "title": "Application settings", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index e2048024..a93e122a 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -52,7 +52,8 @@ "copied_ssh": "SSH ключ cкопирован в буфер", "delete_ssh_text": "Удалить SSH ключ?", "about_app_page": { - "text": "Версия приложения: v.{}" + "application_version_text": "Версия приложения v.{}", + "api_version_text": "Версия API сервера v.{}" }, "settings": { "title": "Настройки приложения", diff --git a/build.yaml b/build.yaml index 2fb31704..993e8dd4 100644 --- a/build.yaml +++ b/build.yaml @@ -14,4 +14,4 @@ targets: json_serializable: options: create_factory: true - create_to_json: false + create_to_json: true diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart new file mode 100644 index 00000000..90d6a349 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -0,0 +1,25 @@ +import 'package:graphql_flutter/graphql_flutter.dart'; + +abstract class ApiMap { + Future getClient() async { + final httpLink = HttpLink( + 'https://api.$rootAddress/graphql', + ); + + final Link graphQLLink = isWithToken + ? AuthLink( + getToken: () async => authToken, + ).concat(httpLink) + : httpLink; + + return GraphQLClient( + cache: GraphQLCache(), + link: graphQLLink, + ); + } + + abstract final String? rootAddress; + abstract final bool hasLogger; + abstract final bool isWithToken; + abstract final String authToken; +} diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart new file mode 100644 index 00000000..763ffcc4 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart @@ -0,0 +1,474 @@ +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/utils/scalars.dart'; +part 'get_api_tokens.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Query$GetApiTokensQuery { + Query$GetApiTokensQuery({required this.api, required this.$__typename}); + + @override + factory Query$GetApiTokensQuery.fromJson(Map json) => + _$Query$GetApiTokensQueryFromJson(json); + + final Query$GetApiTokensQuery$api api; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiTokensQueryToJson(this); + int get hashCode { + final l$api = api; + final l$$__typename = $__typename; + return Object.hashAll([l$api, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiTokensQuery) || runtimeType != other.runtimeType) + return false; + final l$api = api; + final lOther$api = other.api; + if (l$api != lOther$api) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiTokensQuery on Query$GetApiTokensQuery { + CopyWith$Query$GetApiTokensQuery get copyWith => + CopyWith$Query$GetApiTokensQuery(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiTokensQuery { + factory CopyWith$Query$GetApiTokensQuery(Query$GetApiTokensQuery instance, + TRes Function(Query$GetApiTokensQuery) then) = + _CopyWithImpl$Query$GetApiTokensQuery; + + factory CopyWith$Query$GetApiTokensQuery.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiTokensQuery; + + TRes call({Query$GetApiTokensQuery$api? api, String? $__typename}); + CopyWith$Query$GetApiTokensQuery$api get api; +} + +class _CopyWithImpl$Query$GetApiTokensQuery + implements CopyWith$Query$GetApiTokensQuery { + _CopyWithImpl$Query$GetApiTokensQuery(this._instance, this._then); + + final Query$GetApiTokensQuery _instance; + + final TRes Function(Query$GetApiTokensQuery) _then; + + static const _undefined = {}; + + TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiTokensQuery( + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiTokensQuery$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetApiTokensQuery$api get api { + final local$api = _instance.api; + return CopyWith$Query$GetApiTokensQuery$api(local$api, (e) => call(api: e)); + } +} + +class _CopyWithStubImpl$Query$GetApiTokensQuery + implements CopyWith$Query$GetApiTokensQuery { + _CopyWithStubImpl$Query$GetApiTokensQuery(this._res); + + TRes _res; + + call({Query$GetApiTokensQuery$api? api, String? $__typename}) => _res; + CopyWith$Query$GetApiTokensQuery$api get api => + CopyWith$Query$GetApiTokensQuery$api.stub(_res); +} + +const documentNodeQueryGetApiTokensQuery = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetApiTokensQuery'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'devices'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'creationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isCaller'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetApiTokensQuery _parserFn$Query$GetApiTokensQuery( + Map data) => + Query$GetApiTokensQuery.fromJson(data); + +class Options$Query$GetApiTokensQuery + extends graphql.QueryOptions { + Options$Query$GetApiTokensQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiTokensQuery, + parserFn: _parserFn$Query$GetApiTokensQuery); +} + +class WatchOptions$Query$GetApiTokensQuery + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiTokensQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiTokensQuery, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiTokensQuery); +} + +class FetchMoreOptions$Query$GetApiTokensQuery + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiTokensQuery( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryGetApiTokensQuery); +} + +extension ClientExtension$Query$GetApiTokensQuery on graphql.GraphQLClient { + Future> query$GetApiTokensQuery( + [Options$Query$GetApiTokensQuery? options]) async => + await this.query(options ?? Options$Query$GetApiTokensQuery()); + graphql.ObservableQuery watchQuery$GetApiTokensQuery( + [WatchOptions$Query$GetApiTokensQuery? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiTokensQuery()); + void writeQuery$GetApiTokensQuery( + {required Query$GetApiTokensQuery data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetApiTokensQuery)), + data: data.toJson(), + broadcast: broadcast); + Query$GetApiTokensQuery? readQuery$GetApiTokensQuery( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetApiTokensQuery)), + optimistic: optimistic); + return result == null ? null : Query$GetApiTokensQuery.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiTokensQuery$api { + Query$GetApiTokensQuery$api( + {required this.devices, required this.$__typename}); + + @override + factory Query$GetApiTokensQuery$api.fromJson(Map json) => + _$Query$GetApiTokensQuery$apiFromJson(json); + + final List devices; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiTokensQuery$apiToJson(this); + int get hashCode { + final l$devices = devices; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$devices.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiTokensQuery$api) || + runtimeType != other.runtimeType) return false; + final l$devices = devices; + final lOther$devices = other.devices; + if (l$devices.length != lOther$devices.length) return false; + for (int i = 0; i < l$devices.length; i++) { + final l$devices$entry = l$devices[i]; + final lOther$devices$entry = lOther$devices[i]; + if (l$devices$entry != lOther$devices$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiTokensQuery$api + on Query$GetApiTokensQuery$api { + CopyWith$Query$GetApiTokensQuery$api + get copyWith => CopyWith$Query$GetApiTokensQuery$api(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiTokensQuery$api { + factory CopyWith$Query$GetApiTokensQuery$api( + Query$GetApiTokensQuery$api instance, + TRes Function(Query$GetApiTokensQuery$api) then) = + _CopyWithImpl$Query$GetApiTokensQuery$api; + + factory CopyWith$Query$GetApiTokensQuery$api.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiTokensQuery$api; + + TRes call( + {List? devices, + String? $__typename}); + TRes devices( + Iterable Function( + Iterable< + CopyWith$Query$GetApiTokensQuery$api$devices< + Query$GetApiTokensQuery$api$devices>>) + _fn); +} + +class _CopyWithImpl$Query$GetApiTokensQuery$api + implements CopyWith$Query$GetApiTokensQuery$api { + _CopyWithImpl$Query$GetApiTokensQuery$api(this._instance, this._then); + + final Query$GetApiTokensQuery$api _instance; + + final TRes Function(Query$GetApiTokensQuery$api) _then; + + static const _undefined = {}; + + TRes call({Object? devices = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiTokensQuery$api( + devices: devices == _undefined || devices == null + ? _instance.devices + : (devices as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes devices( + Iterable Function( + Iterable< + CopyWith$Query$GetApiTokensQuery$api$devices< + Query$GetApiTokensQuery$api$devices>>) + _fn) => + call( + devices: _fn(_instance.devices.map((e) => + CopyWith$Query$GetApiTokensQuery$api$devices(e, (i) => i))) + .toList()); +} + +class _CopyWithStubImpl$Query$GetApiTokensQuery$api + implements CopyWith$Query$GetApiTokensQuery$api { + _CopyWithStubImpl$Query$GetApiTokensQuery$api(this._res); + + TRes _res; + + call( + {List? devices, + String? $__typename}) => + _res; + devices(_fn) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiTokensQuery$api$devices { + Query$GetApiTokensQuery$api$devices( + {required this.creationDate, + required this.isCaller, + required this.name, + required this.$__typename}); + + @override + factory Query$GetApiTokensQuery$api$devices.fromJson( + Map json) => + _$Query$GetApiTokensQuery$api$devicesFromJson(json); + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime creationDate; + + final bool isCaller; + + final String name; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetApiTokensQuery$api$devicesToJson(this); + int get hashCode { + final l$creationDate = creationDate; + final l$isCaller = isCaller; + final l$name = name; + final l$$__typename = $__typename; + return Object.hashAll([l$creationDate, l$isCaller, l$name, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiTokensQuery$api$devices) || + runtimeType != other.runtimeType) return false; + final l$creationDate = creationDate; + final lOther$creationDate = other.creationDate; + if (l$creationDate != lOther$creationDate) return false; + final l$isCaller = isCaller; + final lOther$isCaller = other.isCaller; + if (l$isCaller != lOther$isCaller) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiTokensQuery$api$devices + on Query$GetApiTokensQuery$api$devices { + CopyWith$Query$GetApiTokensQuery$api$devices< + Query$GetApiTokensQuery$api$devices> + get copyWith => + CopyWith$Query$GetApiTokensQuery$api$devices(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiTokensQuery$api$devices { + factory CopyWith$Query$GetApiTokensQuery$api$devices( + Query$GetApiTokensQuery$api$devices instance, + TRes Function(Query$GetApiTokensQuery$api$devices) then) = + _CopyWithImpl$Query$GetApiTokensQuery$api$devices; + + factory CopyWith$Query$GetApiTokensQuery$api$devices.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices; + + TRes call( + {DateTime? creationDate, + bool? isCaller, + String? name, + String? $__typename}); +} + +class _CopyWithImpl$Query$GetApiTokensQuery$api$devices + implements CopyWith$Query$GetApiTokensQuery$api$devices { + _CopyWithImpl$Query$GetApiTokensQuery$api$devices(this._instance, this._then); + + final Query$GetApiTokensQuery$api$devices _instance; + + final TRes Function(Query$GetApiTokensQuery$api$devices) _then; + + static const _undefined = {}; + + TRes call( + {Object? creationDate = _undefined, + Object? isCaller = _undefined, + Object? name = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetApiTokensQuery$api$devices( + creationDate: creationDate == _undefined || creationDate == null + ? _instance.creationDate + : (creationDate as DateTime), + isCaller: isCaller == _undefined || isCaller == null + ? _instance.isCaller + : (isCaller as bool), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices + implements CopyWith$Query$GetApiTokensQuery$api$devices { + _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices(this._res); + + TRes _res; + + call( + {DateTime? creationDate, + bool? isCaller, + String? name, + String? $__typename}) => + _res; +} diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart index 508d8010..bb5e5bae 100644 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart @@ -14,6 +14,13 @@ Query$GetApiTokensQuery _$Query$GetApiTokensQueryFromJson( $__typename: json['__typename'] as String, ); +Map _$Query$GetApiTokensQueryToJson( + Query$GetApiTokensQuery instance) => + { + 'api': instance.api.toJson(), + '__typename': instance.$__typename, + }; + Query$GetApiTokensQuery$api _$Query$GetApiTokensQuery$apiFromJson( Map json) => Query$GetApiTokensQuery$api( @@ -24,6 +31,13 @@ Query$GetApiTokensQuery$api _$Query$GetApiTokensQuery$apiFromJson( $__typename: json['__typename'] as String, ); +Map _$Query$GetApiTokensQuery$apiToJson( + Query$GetApiTokensQuery$api instance) => + { + 'devices': instance.devices.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + Query$GetApiTokensQuery$api$devices _$Query$GetApiTokensQuery$api$devicesFromJson(Map json) => Query$GetApiTokensQuery$api$devices( @@ -32,3 +46,12 @@ Query$GetApiTokensQuery$api$devices name: json['name'] as String, $__typename: json['__typename'] as String, ); + +Map _$Query$GetApiTokensQuery$api$devicesToJson( + Query$GetApiTokensQuery$api$devices instance) => + { + 'creationDate': dateTimeToJson(instance.creationDate), + 'isCaller': instance.isCaller, + 'name': instance.name, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart new file mode 100644 index 00000000..8d255fe6 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart @@ -0,0 +1,301 @@ +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +part 'get_api_version.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersionQuery { + Query$GetApiVersionQuery({required this.api, required this.$__typename}); + + @override + factory Query$GetApiVersionQuery.fromJson(Map json) => + _$Query$GetApiVersionQueryFromJson(json); + + final Query$GetApiVersionQuery$api api; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersionQueryToJson(this); + int get hashCode { + final l$api = api; + final l$$__typename = $__typename; + return Object.hashAll([l$api, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiVersionQuery) || + runtimeType != other.runtimeType) return false; + final l$api = api; + final lOther$api = other.api; + if (l$api != lOther$api) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiVersionQuery + on Query$GetApiVersionQuery { + CopyWith$Query$GetApiVersionQuery get copyWith => + CopyWith$Query$GetApiVersionQuery(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiVersionQuery { + factory CopyWith$Query$GetApiVersionQuery(Query$GetApiVersionQuery instance, + TRes Function(Query$GetApiVersionQuery) then) = + _CopyWithImpl$Query$GetApiVersionQuery; + + factory CopyWith$Query$GetApiVersionQuery.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiVersionQuery; + + TRes call({Query$GetApiVersionQuery$api? api, String? $__typename}); + CopyWith$Query$GetApiVersionQuery$api get api; +} + +class _CopyWithImpl$Query$GetApiVersionQuery + implements CopyWith$Query$GetApiVersionQuery { + _CopyWithImpl$Query$GetApiVersionQuery(this._instance, this._then); + + final Query$GetApiVersionQuery _instance; + + final TRes Function(Query$GetApiVersionQuery) _then; + + static const _undefined = {}; + + TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiVersionQuery( + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiVersionQuery$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetApiVersionQuery$api get api { + final local$api = _instance.api; + return CopyWith$Query$GetApiVersionQuery$api( + local$api, (e) => call(api: e)); + } +} + +class _CopyWithStubImpl$Query$GetApiVersionQuery + implements CopyWith$Query$GetApiVersionQuery { + _CopyWithStubImpl$Query$GetApiVersionQuery(this._res); + + TRes _res; + + call({Query$GetApiVersionQuery$api? api, String? $__typename}) => _res; + CopyWith$Query$GetApiVersionQuery$api get api => + CopyWith$Query$GetApiVersionQuery$api.stub(_res); +} + +const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetApiVersionQuery'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'version'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetApiVersionQuery _parserFn$Query$GetApiVersionQuery( + Map data) => + Query$GetApiVersionQuery.fromJson(data); + +class Options$Query$GetApiVersionQuery + extends graphql.QueryOptions { + Options$Query$GetApiVersionQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiVersionQuery, + parserFn: _parserFn$Query$GetApiVersionQuery); +} + +class WatchOptions$Query$GetApiVersionQuery + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiVersionQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiVersionQuery, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiVersionQuery); +} + +class FetchMoreOptions$Query$GetApiVersionQuery + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiVersionQuery( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryGetApiVersionQuery); +} + +extension ClientExtension$Query$GetApiVersionQuery on graphql.GraphQLClient { + Future> + query$GetApiVersionQuery( + [Options$Query$GetApiVersionQuery? options]) async => + await this.query(options ?? Options$Query$GetApiVersionQuery()); + graphql.ObservableQuery + watchQuery$GetApiVersionQuery( + [WatchOptions$Query$GetApiVersionQuery? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiVersionQuery()); + void writeQuery$GetApiVersionQuery( + {required Query$GetApiVersionQuery data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetApiVersionQuery)), + data: data.toJson(), + broadcast: broadcast); + Query$GetApiVersionQuery? readQuery$GetApiVersionQuery( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetApiVersionQuery)), + optimistic: optimistic); + return result == null ? null : Query$GetApiVersionQuery.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersionQuery$api { + Query$GetApiVersionQuery$api( + {required this.version, required this.$__typename}); + + @override + factory Query$GetApiVersionQuery$api.fromJson(Map json) => + _$Query$GetApiVersionQuery$apiFromJson(json); + + final String version; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersionQuery$apiToJson(this); + int get hashCode { + final l$version = version; + final l$$__typename = $__typename; + return Object.hashAll([l$version, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiVersionQuery$api) || + runtimeType != other.runtimeType) return false; + final l$version = version; + final lOther$version = other.version; + if (l$version != lOther$version) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiVersionQuery$api + on Query$GetApiVersionQuery$api { + CopyWith$Query$GetApiVersionQuery$api + get copyWith => CopyWith$Query$GetApiVersionQuery$api(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiVersionQuery$api { + factory CopyWith$Query$GetApiVersionQuery$api( + Query$GetApiVersionQuery$api instance, + TRes Function(Query$GetApiVersionQuery$api) then) = + _CopyWithImpl$Query$GetApiVersionQuery$api; + + factory CopyWith$Query$GetApiVersionQuery$api.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiVersionQuery$api; + + TRes call({String? version, String? $__typename}); +} + +class _CopyWithImpl$Query$GetApiVersionQuery$api + implements CopyWith$Query$GetApiVersionQuery$api { + _CopyWithImpl$Query$GetApiVersionQuery$api(this._instance, this._then); + + final Query$GetApiVersionQuery$api _instance; + + final TRes Function(Query$GetApiVersionQuery$api) _then; + + static const _undefined = {}; + + TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiVersionQuery$api( + version: version == _undefined || version == null + ? _instance.version + : (version as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetApiVersionQuery$api + implements CopyWith$Query$GetApiVersionQuery$api { + _CopyWithStubImpl$Query$GetApiVersionQuery$api(this._res); + + TRes _res; + + call({String? version, String? $__typename}) => _res; +} diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart index c0b5a378..0c051786 100644 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart @@ -14,9 +14,23 @@ Query$GetApiVersionQuery _$Query$GetApiVersionQueryFromJson( $__typename: json['__typename'] as String, ); +Map _$Query$GetApiVersionQueryToJson( + Query$GetApiVersionQuery instance) => + { + 'api': instance.api.toJson(), + '__typename': instance.$__typename, + }; + Query$GetApiVersionQuery$api _$Query$GetApiVersionQuery$apiFromJson( Map json) => Query$GetApiVersionQuery$api( version: json['version'] as String, $__typename: json['__typename'] as String, ); + +Map _$Query$GetApiVersionQuery$apiToJson( + Query$GetApiVersionQuery$api instance) => + { + 'version': instance.version, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart new file mode 100644 index 00000000..27f902e2 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -0,0 +1,274 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/utils/scalars.dart'; +part 'schema.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Input$RecoveryKeyLimitsInput { + Input$RecoveryKeyLimitsInput({this.expirationDate, this.uses}); + + @override + factory Input$RecoveryKeyLimitsInput.fromJson(Map json) => + _$Input$RecoveryKeyLimitsInputFromJson(json); + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? expirationDate; + + final int? uses; + + Map toJson() => _$Input$RecoveryKeyLimitsInputToJson(this); + int get hashCode { + final l$expirationDate = expirationDate; + final l$uses = uses; + return Object.hashAll([l$expirationDate, l$uses]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$RecoveryKeyLimitsInput) || + runtimeType != other.runtimeType) return false; + final l$expirationDate = expirationDate; + final lOther$expirationDate = other.expirationDate; + if (l$expirationDate != lOther$expirationDate) return false; + final l$uses = uses; + final lOther$uses = other.uses; + if (l$uses != lOther$uses) return false; + return true; + } + + CopyWith$Input$RecoveryKeyLimitsInput + get copyWith => CopyWith$Input$RecoveryKeyLimitsInput(this, (i) => i); +} + +abstract class CopyWith$Input$RecoveryKeyLimitsInput { + factory CopyWith$Input$RecoveryKeyLimitsInput( + Input$RecoveryKeyLimitsInput instance, + TRes Function(Input$RecoveryKeyLimitsInput) then) = + _CopyWithImpl$Input$RecoveryKeyLimitsInput; + + factory CopyWith$Input$RecoveryKeyLimitsInput.stub(TRes res) = + _CopyWithStubImpl$Input$RecoveryKeyLimitsInput; + + TRes call({DateTime? expirationDate, int? uses}); +} + +class _CopyWithImpl$Input$RecoveryKeyLimitsInput + implements CopyWith$Input$RecoveryKeyLimitsInput { + _CopyWithImpl$Input$RecoveryKeyLimitsInput(this._instance, this._then); + + final Input$RecoveryKeyLimitsInput _instance; + + final TRes Function(Input$RecoveryKeyLimitsInput) _then; + + static const _undefined = {}; + + TRes call({Object? expirationDate = _undefined, Object? uses = _undefined}) => + _then(Input$RecoveryKeyLimitsInput( + expirationDate: expirationDate == _undefined + ? _instance.expirationDate + : (expirationDate as DateTime?), + uses: uses == _undefined ? _instance.uses : (uses as int?))); +} + +class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput + implements CopyWith$Input$RecoveryKeyLimitsInput { + _CopyWithStubImpl$Input$RecoveryKeyLimitsInput(this._res); + + TRes _res; + + call({DateTime? expirationDate, int? uses}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Input$UseNewDeviceKeyInput { + Input$UseNewDeviceKeyInput({required this.key, required this.deviceName}); + + @override + factory Input$UseNewDeviceKeyInput.fromJson(Map json) => + _$Input$UseNewDeviceKeyInputFromJson(json); + + final String key; + + final String deviceName; + + Map toJson() => _$Input$UseNewDeviceKeyInputToJson(this); + int get hashCode { + final l$key = key; + final l$deviceName = deviceName; + return Object.hashAll([l$key, l$deviceName]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$UseNewDeviceKeyInput) || + runtimeType != other.runtimeType) return false; + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) return false; + final l$deviceName = deviceName; + final lOther$deviceName = other.deviceName; + if (l$deviceName != lOther$deviceName) return false; + return true; + } + + CopyWith$Input$UseNewDeviceKeyInput + get copyWith => CopyWith$Input$UseNewDeviceKeyInput(this, (i) => i); +} + +abstract class CopyWith$Input$UseNewDeviceKeyInput { + factory CopyWith$Input$UseNewDeviceKeyInput( + Input$UseNewDeviceKeyInput instance, + TRes Function(Input$UseNewDeviceKeyInput) then) = + _CopyWithImpl$Input$UseNewDeviceKeyInput; + + factory CopyWith$Input$UseNewDeviceKeyInput.stub(TRes res) = + _CopyWithStubImpl$Input$UseNewDeviceKeyInput; + + TRes call({String? key, String? deviceName}); +} + +class _CopyWithImpl$Input$UseNewDeviceKeyInput + implements CopyWith$Input$UseNewDeviceKeyInput { + _CopyWithImpl$Input$UseNewDeviceKeyInput(this._instance, this._then); + + final Input$UseNewDeviceKeyInput _instance; + + final TRes Function(Input$UseNewDeviceKeyInput) _then; + + static const _undefined = {}; + + TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => + _then(Input$UseNewDeviceKeyInput( + key: key == _undefined || key == null + ? _instance.key + : (key as String), + deviceName: deviceName == _undefined || deviceName == null + ? _instance.deviceName + : (deviceName as String))); +} + +class _CopyWithStubImpl$Input$UseNewDeviceKeyInput + implements CopyWith$Input$UseNewDeviceKeyInput { + _CopyWithStubImpl$Input$UseNewDeviceKeyInput(this._res); + + TRes _res; + + call({String? key, String? deviceName}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Input$UseRecoveryKeyInput { + Input$UseRecoveryKeyInput({required this.key, required this.deviceName}); + + @override + factory Input$UseRecoveryKeyInput.fromJson(Map json) => + _$Input$UseRecoveryKeyInputFromJson(json); + + final String key; + + final String deviceName; + + Map toJson() => _$Input$UseRecoveryKeyInputToJson(this); + int get hashCode { + final l$key = key; + final l$deviceName = deviceName; + return Object.hashAll([l$key, l$deviceName]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$UseRecoveryKeyInput) || + runtimeType != other.runtimeType) return false; + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) return false; + final l$deviceName = deviceName; + final lOther$deviceName = other.deviceName; + if (l$deviceName != lOther$deviceName) return false; + return true; + } + + CopyWith$Input$UseRecoveryKeyInput get copyWith => + CopyWith$Input$UseRecoveryKeyInput(this, (i) => i); +} + +abstract class CopyWith$Input$UseRecoveryKeyInput { + factory CopyWith$Input$UseRecoveryKeyInput(Input$UseRecoveryKeyInput instance, + TRes Function(Input$UseRecoveryKeyInput) then) = + _CopyWithImpl$Input$UseRecoveryKeyInput; + + factory CopyWith$Input$UseRecoveryKeyInput.stub(TRes res) = + _CopyWithStubImpl$Input$UseRecoveryKeyInput; + + TRes call({String? key, String? deviceName}); +} + +class _CopyWithImpl$Input$UseRecoveryKeyInput + implements CopyWith$Input$UseRecoveryKeyInput { + _CopyWithImpl$Input$UseRecoveryKeyInput(this._instance, this._then); + + final Input$UseRecoveryKeyInput _instance; + + final TRes Function(Input$UseRecoveryKeyInput) _then; + + static const _undefined = {}; + + TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => + _then(Input$UseRecoveryKeyInput( + key: key == _undefined || key == null + ? _instance.key + : (key as String), + deviceName: deviceName == _undefined || deviceName == null + ? _instance.deviceName + : (deviceName as String))); +} + +class _CopyWithStubImpl$Input$UseRecoveryKeyInput + implements CopyWith$Input$UseRecoveryKeyInput { + _CopyWithStubImpl$Input$UseRecoveryKeyInput(this._res); + + TRes _res; + + call({String? key, String? deviceName}) => _res; +} + +enum Enum$DnsProvider { + @JsonValue('CLOUDFLARE') + CLOUDFLARE, + $unknown +} + +enum Enum$ServerProvider { + @JsonValue('HETZNER') + HETZNER, + $unknown +} + +enum Enum$Severity { + @JsonValue('INFO') + INFO, + @JsonValue('WARNING') + WARNING, + @JsonValue('ERROR') + ERROR, + @JsonValue('CRITICAL') + CRITICAL, + @JsonValue('SUCCESS') + SUCCESS, + $unknown +} + +const possibleTypesMap = { + 'MutationReturnInterface': { + 'ApiKeyMutationReturn', + 'DeviceApiTokenMutationReturn', + 'GenericMutationReturn' + } +}; +DateTime? _nullable$dateTimeFromJson(dynamic data) => + data == null ? null : dateTimeFromJson(data); +dynamic _nullable$dateTimeToJson(DateTime? data) => + data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart index 84a4c38f..9002a8e1 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart @@ -13,6 +13,13 @@ Input$RecoveryKeyLimitsInput _$Input$RecoveryKeyLimitsInputFromJson( uses: json['uses'] as int?, ); +Map _$Input$RecoveryKeyLimitsInputToJson( + Input$RecoveryKeyLimitsInput instance) => + { + 'expirationDate': _nullable$dateTimeToJson(instance.expirationDate), + 'uses': instance.uses, + }; + Input$UseNewDeviceKeyInput _$Input$UseNewDeviceKeyInputFromJson( Map json) => Input$UseNewDeviceKeyInput( @@ -20,9 +27,23 @@ Input$UseNewDeviceKeyInput _$Input$UseNewDeviceKeyInputFromJson( deviceName: json['deviceName'] as String, ); +Map _$Input$UseNewDeviceKeyInputToJson( + Input$UseNewDeviceKeyInput instance) => + { + 'key': instance.key, + 'deviceName': instance.deviceName, + }; + Input$UseRecoveryKeyInput _$Input$UseRecoveryKeyInputFromJson( Map json) => Input$UseRecoveryKeyInput( key: json['key'] as String, deviceName: json['deviceName'] as String, ); + +Map _$Input$UseRecoveryKeyInputToJson( + Input$UseRecoveryKeyInput instance) => + { + 'key': instance.key, + 'deviceName': instance.deviceName, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server.dart b/lib/logic/api_maps/graphql_maps/schema/server.dart new file mode 100644 index 00000000..cc0a6c38 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/server.dart @@ -0,0 +1,39 @@ +import 'package:graphql/client.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; + +class ServerApi extends ApiMap { + ServerApi({ + this.hasLogger = false, + this.isWithToken = true, + this.authToken = '', + }) { + final ServerDomain? serverDomain = getIt().serverDomain; + rootAddress = serverDomain?.domainName ?? ''; + } + @override + bool hasLogger; + @override + bool isWithToken; + @override + String authToken; + @override + String? rootAddress; + + Future getApiVersion() async { + QueryResult response; + + final GraphQLClient client = await getClient(); + String? apiVersion; + + try { + response = await client.query$GetApiVersionQuery(); + apiVersion = response.data!['api']['version']; + } catch (e) { + print(e); + } + return apiVersion; + } +} diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 3cb2ed73..4139d3e2 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -49,9 +49,8 @@ class ServerApi extends ApiMap { BaseOptions options = BaseOptions(); if (isWithToken) { - final ServerDomain? cloudFlareDomain = - getIt().serverDomain; - final String domainName = cloudFlareDomain!.domainName; + final ServerDomain? serverDomain = getIt().serverDomain; + final String domainName = serverDomain!.domainName; final String? apiToken = getIt().serverDetails?.apiToken; options = BaseOptions( diff --git a/lib/logic/models/json/api_token.g.dart b/lib/logic/models/json/api_token.g.dart index b6c8b8db..7f7af88c 100644 --- a/lib/logic/models/json/api_token.g.dart +++ b/lib/logic/models/json/api_token.g.dart @@ -11,3 +11,9 @@ ApiToken _$ApiTokenFromJson(Map json) => ApiToken( date: DateTime.parse(json['date'] as String), isCaller: json['is_caller'] as bool, ); + +Map _$ApiTokenToJson(ApiToken instance) => { + 'name': instance.name, + 'date': instance.date.toIso8601String(), + 'is_caller': instance.isCaller, + }; diff --git a/lib/logic/models/json/backup.g.dart b/lib/logic/models/json/backup.g.dart index c784abe1..dea4847d 100644 --- a/lib/logic/models/json/backup.g.dart +++ b/lib/logic/models/json/backup.g.dart @@ -11,12 +11,24 @@ Backup _$BackupFromJson(Map json) => Backup( id: json['short_id'] as String, ); +Map _$BackupToJson(Backup instance) => { + 'time': instance.time.toIso8601String(), + 'short_id': instance.id, + }; + BackupStatus _$BackupStatusFromJson(Map json) => BackupStatus( status: $enumDecode(_$BackupStatusEnumEnumMap, json['status']), progress: (json['progress'] as num).toDouble(), errorMessage: json['error_message'] as String?, ); +Map _$BackupStatusToJson(BackupStatus instance) => + { + 'status': _$BackupStatusEnumEnumMap[instance.status]!, + 'progress': instance.progress, + 'error_message': instance.errorMessage, + }; + const _$BackupStatusEnumEnumMap = { BackupStatusEnum.noKey: 'NO_KEY', BackupStatusEnum.notInitialized: 'NOT_INITIALIZED', diff --git a/lib/logic/models/json/device_token.g.dart b/lib/logic/models/json/device_token.g.dart index efe976c5..406530df 100644 --- a/lib/logic/models/json/device_token.g.dart +++ b/lib/logic/models/json/device_token.g.dart @@ -10,3 +10,9 @@ DeviceToken _$DeviceTokenFromJson(Map json) => DeviceToken( device: json['device'] as String, token: json['token'] as String, ); + +Map _$DeviceTokenToJson(DeviceToken instance) => + { + 'device': instance.device, + 'token': instance.token, + }; diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart index e8c21917..6c178ea4 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -19,6 +19,18 @@ HetznerServerInfo _$HetznerServerInfoFromJson(Map json) => (json['volumes'] as List).map((e) => e as int).toList(), ); +Map _$HetznerServerInfoToJson(HetznerServerInfo instance) => + { + 'id': instance.id, + 'name': instance.name, + 'status': _$ServerStatusEnumMap[instance.status]!, + 'created': instance.created.toIso8601String(), + 'volumes': instance.volumes, + 'server_type': instance.serverType, + 'datacenter': instance.location, + 'public_net': instance.publicNet, + }; + const _$ServerStatusEnumMap = { ServerStatus.running: 'running', ServerStatus.initializing: 'initializing', @@ -37,6 +49,12 @@ HetznerPublicNetInfo _$HetznerPublicNetInfoFromJson( HetznerIp4.fromJson(json['ipv4'] as Map), ); +Map _$HetznerPublicNetInfoToJson( + HetznerPublicNetInfo instance) => + { + 'ipv4': instance.ipv4, + }; + HetznerIp4 _$HetznerIp4FromJson(Map json) => HetznerIp4( json['id'] as int, json['ip'] as String, @@ -44,6 +62,14 @@ HetznerIp4 _$HetznerIp4FromJson(Map json) => HetznerIp4( json['dns_ptr'] as String, ); +Map _$HetznerIp4ToJson(HetznerIp4 instance) => + { + 'blocked': instance.blocked, + 'dns_ptr': instance.reverseDns, + 'id': instance.id, + 'ip': instance.ip, + }; + HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson( Map json) => HetznerServerTypeInfo( @@ -55,12 +81,27 @@ HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson( .toList(), ); +Map _$HetznerServerTypeInfoToJson( + HetznerServerTypeInfo instance) => + { + 'cores': instance.cores, + 'memory': instance.memory, + 'disk': instance.disk, + 'prices': instance.prices, + }; + HetznerPriceInfo _$HetznerPriceInfoFromJson(Map json) => HetznerPriceInfo( HetznerPriceInfo.getPrice(json['price_hourly'] as Map), HetznerPriceInfo.getPrice(json['price_monthly'] as Map), ); +Map _$HetznerPriceInfoToJson(HetznerPriceInfo instance) => + { + 'price_hourly': instance.hourly, + 'price_monthly': instance.monthly, + }; + HetznerLocation _$HetznerLocationFromJson(Map json) => HetznerLocation( json['country'] as String, @@ -68,3 +109,11 @@ HetznerLocation _$HetznerLocationFromJson(Map json) => json['description'] as String, json['network_zone'] as String, ); + +Map _$HetznerLocationToJson(HetznerLocation instance) => + { + 'country': instance.country, + 'city': instance.city, + 'description': instance.description, + 'network_zone': instance.zone, + }; diff --git a/lib/logic/models/json/recovery_token_status.g.dart b/lib/logic/models/json/recovery_token_status.g.dart index cef9abbd..9fb6d6cd 100644 --- a/lib/logic/models/json/recovery_token_status.g.dart +++ b/lib/logic/models/json/recovery_token_status.g.dart @@ -17,3 +17,12 @@ RecoveryKeyStatus _$RecoveryKeyStatusFromJson(Map json) => : DateTime.parse(json['expiration'] as String), usesLeft: json['uses_left'] as int?, ); + +Map _$RecoveryKeyStatusToJson(RecoveryKeyStatus instance) => + { + 'exists': instance.exists, + 'date': instance.date?.toIso8601String(), + 'expiration': instance.expiration?.toIso8601String(), + 'uses_left': instance.usesLeft, + 'valid': instance.valid, + }; diff --git a/lib/ui/pages/more/info/info.dart b/lib/ui/pages/more/info/info.dart index d4c4863b..0860ca80 100644 --- a/lib/ui/pages/more/info/info.dart +++ b/lib/ui/pages/more/info/info.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; @@ -23,9 +24,16 @@ class InfoPage extends StatelessWidget { const BrandDivider(), const SizedBox(height: 10), FutureBuilder( - future: _version(), + future: _packageVersion(), builder: (final context, final snapshot) => BrandText.body1( - 'more.about_app_page.text' + 'more.about_app_page.application_version_text' + .tr(args: [snapshot.data.toString()]), + ), + ), + FutureBuilder( + future: _apiVersion(), + builder: (final context, final snapshot) => BrandText.body1( + 'more.about_app_page.api_version_text' .tr(args: [snapshot.data.toString()]), ), ), @@ -34,7 +42,7 @@ class InfoPage extends StatelessWidget { ), ); - Future _version() async { + Future _packageVersion() async { String packageVersion = 'unknown'; try { final PackageInfo packageInfo = await PackageInfo.fromPlatform(); @@ -45,4 +53,15 @@ class InfoPage extends StatelessWidget { return packageVersion; } + + Future _apiVersion() async { + String apiVersion = 'unknown'; + try { + apiVersion = await ServerApi().getApiVersion() ?? apiVersion; + } catch (e) { + print(e); + } + + return apiVersion; + } } diff --git a/pubspec.lock b/pubspec.lock index cb308ae6..e40f6b5c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -29,13 +29,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.3.1" - asn1lib: - dependency: transitive - description: - name: asn1lib - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" async: dependency: transitive description: @@ -84,7 +77,7 @@ packages: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_daemon: dependency: transitive description: @@ -105,7 +98,7 @@ packages: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.1.11" + version: "2.2.0" build_runner_core: dependency: transitive description: @@ -175,14 +168,14 @@ packages: name: connectivity_plus url: "https://pub.dartlang.org" source: hosted - version: "2.3.5" + version: "2.1.0" connectivity_plus_linux: dependency: transitive description: name: connectivity_plus_linux url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.1.0" connectivity_plus_macos: dependency: transitive description: @@ -203,7 +196,7 @@ packages: name: connectivity_plus_web url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.2.3" connectivity_plus_windows: dependency: transitive description: @@ -246,13 +239,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" dart_style: dependency: transitive description: @@ -266,14 +252,14 @@ packages: name: dbus url: "https://pub.dartlang.org" source: hosted - version: "0.7.3" + version: "0.5.4" device_info_plus: dependency: "direct main" description: name: device_info_plus url: "https://pub.dartlang.org" source: hosted - version: "3.2.3" + version: "4.0.1" device_info_plus_linux: dependency: transitive description: @@ -308,7 +294,7 @@ packages: name: device_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "3.0.1" dio: dependency: "direct main" description: @@ -322,7 +308,7 @@ packages: name: dynamic_color url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.4.0" easy_localization: dependency: "direct main" description: @@ -371,7 +357,7 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "2.0.1" file: dependency: transitive description: @@ -587,7 +573,7 @@ packages: name: graphql_codegen url: "https://pub.dartlang.org" source: hosted - version: "0.9.0" + version: "0.10.2" graphql_codegen_config: dependency: transitive description: @@ -622,7 +608,7 @@ packages: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.3" hive_flutter: dependency: "direct main" description: @@ -636,7 +622,7 @@ packages: name: hive_generator url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" http: dependency: transitive description: @@ -699,14 +685,14 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.5.0" + version: "4.6.0" json_serializable: dependency: "direct dev" description: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "6.2.0" + version: "6.3.1" lints: dependency: transitive description: @@ -818,7 +804,7 @@ packages: name: nm url: "https://pub.dartlang.org" source: hosted - version: "0.5.0" + version: "0.3.0" node_preamble: dependency: transitive description: @@ -881,7 +867,7 @@ packages: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.6" + version: "2.1.7" path_provider_macos: dependency: transitive description: @@ -902,7 +888,14 @@ packages: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.1.0" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" petitparser: dependency: transitive description: @@ -973,13 +966,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" recase: dependency: transitive description: @@ -993,7 +979,7 @@ packages: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.27.4" + version: "0.27.5" share_plus: dependency: "direct main" description: @@ -1160,13 +1146,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" - ssh_key: - dependency: "direct main" - description: - name: ssh_key - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" stack_trace: dependency: transitive description: @@ -1251,13 +1230,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.0" - tuple: - dependency: transitive - description: - name: tuple - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" typed_data: dependency: transitive description: @@ -1404,7 +1376,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.7.0" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index f5367d99..114723f1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,10 +12,9 @@ dependencies: basic_utils: ^4.2.0 crypt: ^4.2.1 cubit_form: ^2.0.1 - cupertino_icons: ^1.0.4 - device_info_plus: ^3.2.3 + device_info_plus: ^4.0.1 dio: ^4.0.4 - dynamic_color: ^1.2.2 + dynamic_color: ^1.4.0 easy_localization: ^3.0.0 either_option: ^2.0.1-dev.1 equatable: ^2.0.3 @@ -28,14 +27,14 @@ dependencies: get_it: ^7.2.0 gql: ^0.13.1 graphql: ^5.1.1 - graphql_codegen: ^0.9.0 + graphql_codegen: ^0.10.2 graphql_flutter: ^5.1.0 gtk_theme_fl: ^0.0.1 - hive: ^2.0.5 + hive: ^2.2.3 hive_flutter: ^1.1.0 intl: ^0.17.0 ionicons: ^0.1.2 - json_annotation: ^4.4.0 + json_annotation: ^4.6.0 local_auth: ^2.0.2 modal_bottom_sheet: ^2.0.1 nanoid: ^1.0.0 @@ -44,7 +43,6 @@ dependencies: provider: ^6.0.2 pub_semver: ^2.1.1 share_plus: ^4.0.4 - ssh_key: ^0.7.1 system_theme: ^2.0.0 timezone: ^0.8.0 url_launcher: ^6.0.20 @@ -53,10 +51,10 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - build_runner: ^2.1.1 + build_runner: ^2.2.0 flutter_launcher_icons: ^0.9.2 - hive_generator: ^1.0.0 - json_serializable: ^6.1.4 + hive_generator: ^1.1.3 + json_serializable: ^6.3.1 flutter_lints: ^2.0.1 flutter_icons: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 070eb3b5..1feb1b08 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,6 +7,7 @@ #include "generated_plugin_registrant.h" #include +#include #include #include #include @@ -14,6 +15,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { ConnectivityPlusWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); + DynamicColorPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); FlutterSecureStorageWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); SystemThemePluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index a26e37b0..fa5d72de 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST connectivity_plus_windows + dynamic_color flutter_secure_storage_windows system_theme url_launcher_windows From c56a0f597680ba9fc83e9f9ad42e95bf3e6a645c Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 25 Jul 2022 19:08:46 +0300 Subject: [PATCH 016/732] Implement getApiTokens for graphql API map --- .../api_maps/graphql_maps/schema/server.dart | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/server.dart b/lib/logic/api_maps/graphql_maps/schema/server.dart index cc0a6c38..1ddf49f7 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server.dart @@ -1,8 +1,10 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/api_token.dart'; class ServerApi extends ApiMap { ServerApi({ @@ -24,10 +26,9 @@ class ServerApi extends ApiMap { Future getApiVersion() async { QueryResult response; - - final GraphQLClient client = await getClient(); String? apiVersion; + final GraphQLClient client = await getClient(); try { response = await client.query$GetApiVersionQuery(); apiVersion = response.data!['api']['version']; @@ -36,4 +37,21 @@ class ServerApi extends ApiMap { } return apiVersion; } + + Future> getApiTokens() async { + QueryResult response; + List tokens = []; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetApiTokensQuery(); + tokens = response.data!['api']['devices'] + .map((final e) => ApiToken.fromJson(e)) + .toList(); + } catch (e) { + print(e); + } + + return tokens; + } } From c747dcd4ae3cffb9dc2ccce434288382d61bc6b1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 29 Jul 2022 08:38:21 +0300 Subject: [PATCH 017/732] Implement Server Storage card for provider menu Co-authored-by: Inex Code --- analysis_options.yaml | 1 + assets/translations/en.json | 10 + .../schema/get_server_disk_volumes.graphql | 11 + .../get_server_disk_volumes.graphql.dart | 542 ++++++++++++++++++ .../get_server_disk_volumes.graphql.g.dart | 64 +++ .../graphql_maps/schema/schema.graphql | 13 + .../api_maps/graphql_maps/schema/server.dart | 19 + .../server_installation_cubit.dart | 6 + lib/logic/models/json/server_disk_volume.dart | 22 + .../models/json/server_disk_volume.g.dart | 25 + lib/logic/models/state_types.dart | 2 +- .../brand_linear_indicator.dart | 37 ++ .../icon_status_mask/icon_status_mask.dart | 6 + lib/ui/pages/providers/providers.dart | 19 + lib/ui/pages/providers/storage_card.dart | 152 +++++ 15 files changed, 928 insertions(+), 1 deletion(-) create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart create mode 100644 lib/logic/models/json/server_disk_volume.dart create mode 100644 lib/logic/models/json/server_disk_volume.g.dart create mode 100644 lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart create mode 100644 lib/ui/pages/providers/storage_card.dart diff --git a/analysis_options.yaml b/analysis_options.yaml index 9d16cb20..aa344a69 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -13,6 +13,7 @@ analyzer: exclude: - lib/generated_plugin_registrant.dart - lib/**.g.dart + - lib/**.graphql.dart linter: # The lint rules applied to this project can be customized in the diff --git a/assets/translations/en.json b/assets/translations/en.json index 4fdb0626..6c48f966 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -163,6 +163,16 @@ "refresh": "Refresh status", "refetchBackups": "Refetch backup list", "refetchingList": "In a few minutes list will be updated" + }, + "storage": { + "card_title": "Server Storage", + "status_ok": "Disk usage is OK", + "status_error": "Low disk space", + "disk_usage": "{} GB used", + "disk_total": "{} GB total · {}", + "gb": "{} GB", + "mb": "{} MB", + "extend_volume_button": "Extend volume" } }, "not_ready_card": { diff --git a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql new file mode 100644 index 00000000..2a566271 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql @@ -0,0 +1,11 @@ +query GetServerDiskVolumesQuery { + storage { + volumes { + freeSpace + name + root + totalSpace + usedSpace + } + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart new file mode 100644 index 00000000..007adc55 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart @@ -0,0 +1,542 @@ +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +part 'get_server_disk_volumes.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumesQuery { + Query$GetServerDiskVolumesQuery( + {required this.storage, required this.$__typename}); + + @override + factory Query$GetServerDiskVolumesQuery.fromJson(Map json) => + _$Query$GetServerDiskVolumesQueryFromJson(json); + + final Query$GetServerDiskVolumesQuery$storage storage; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumesQueryToJson(this); + int get hashCode { + final l$storage = storage; + final l$$__typename = $__typename; + return Object.hashAll([l$storage, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumesQuery) || + runtimeType != other.runtimeType) return false; + final l$storage = storage; + final lOther$storage = other.storage; + if (l$storage != lOther$storage) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumesQuery + on Query$GetServerDiskVolumesQuery { + CopyWith$Query$GetServerDiskVolumesQuery + get copyWith => CopyWith$Query$GetServerDiskVolumesQuery(this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumesQuery { + factory CopyWith$Query$GetServerDiskVolumesQuery( + Query$GetServerDiskVolumesQuery instance, + TRes Function(Query$GetServerDiskVolumesQuery) then) = + _CopyWithImpl$Query$GetServerDiskVolumesQuery; + + factory CopyWith$Query$GetServerDiskVolumesQuery.stub(TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery; + + TRes call( + {Query$GetServerDiskVolumesQuery$storage? storage, String? $__typename}); + CopyWith$Query$GetServerDiskVolumesQuery$storage get storage; +} + +class _CopyWithImpl$Query$GetServerDiskVolumesQuery + implements CopyWith$Query$GetServerDiskVolumesQuery { + _CopyWithImpl$Query$GetServerDiskVolumesQuery(this._instance, this._then); + + final Query$GetServerDiskVolumesQuery _instance; + + final TRes Function(Query$GetServerDiskVolumesQuery) _then; + + static const _undefined = {}; + + TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumesQuery( + storage: storage == _undefined || storage == null + ? _instance.storage + : (storage as Query$GetServerDiskVolumesQuery$storage), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetServerDiskVolumesQuery$storage get storage { + final local$storage = _instance.storage; + return CopyWith$Query$GetServerDiskVolumesQuery$storage( + local$storage, (e) => call(storage: e)); + } +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery + implements CopyWith$Query$GetServerDiskVolumesQuery { + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery(this._res); + + TRes _res; + + call( + {Query$GetServerDiskVolumesQuery$storage? storage, + String? $__typename}) => + _res; + CopyWith$Query$GetServerDiskVolumesQuery$storage get storage => + CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(_res); +} + +const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetServerDiskVolumesQuery'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'storage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'volumes'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'freeSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'root'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'totalSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetServerDiskVolumesQuery _parserFn$Query$GetServerDiskVolumesQuery( + Map data) => + Query$GetServerDiskVolumesQuery.fromJson(data); + +class Options$Query$GetServerDiskVolumesQuery + extends graphql.QueryOptions { + Options$Query$GetServerDiskVolumesQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetServerDiskVolumesQuery, + parserFn: _parserFn$Query$GetServerDiskVolumesQuery); +} + +class WatchOptions$Query$GetServerDiskVolumesQuery + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetServerDiskVolumesQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetServerDiskVolumesQuery, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetServerDiskVolumesQuery); +} + +class FetchMoreOptions$Query$GetServerDiskVolumesQuery + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetServerDiskVolumesQuery( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryGetServerDiskVolumesQuery); +} + +extension ClientExtension$Query$GetServerDiskVolumesQuery + on graphql.GraphQLClient { + Future> + query$GetServerDiskVolumesQuery( + [Options$Query$GetServerDiskVolumesQuery? options]) async => + await this + .query(options ?? Options$Query$GetServerDiskVolumesQuery()); + graphql.ObservableQuery + watchQuery$GetServerDiskVolumesQuery( + [WatchOptions$Query$GetServerDiskVolumesQuery? options]) => + this.watchQuery( + options ?? WatchOptions$Query$GetServerDiskVolumesQuery()); + void writeQuery$GetServerDiskVolumesQuery( + {required Query$GetServerDiskVolumesQuery data, + bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetServerDiskVolumesQuery)), + data: data.toJson(), + broadcast: broadcast); + Query$GetServerDiskVolumesQuery? readQuery$GetServerDiskVolumesQuery( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetServerDiskVolumesQuery)), + optimistic: optimistic); + return result == null + ? null + : Query$GetServerDiskVolumesQuery.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumesQuery$storage { + Query$GetServerDiskVolumesQuery$storage( + {required this.volumes, required this.$__typename}); + + @override + factory Query$GetServerDiskVolumesQuery$storage.fromJson( + Map json) => + _$Query$GetServerDiskVolumesQuery$storageFromJson(json); + + final List volumes; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumesQuery$storageToJson(this); + int get hashCode { + final l$volumes = volumes; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$volumes.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumesQuery$storage) || + runtimeType != other.runtimeType) return false; + final l$volumes = volumes; + final lOther$volumes = other.volumes; + if (l$volumes.length != lOther$volumes.length) return false; + for (int i = 0; i < l$volumes.length; i++) { + final l$volumes$entry = l$volumes[i]; + final lOther$volumes$entry = lOther$volumes[i]; + if (l$volumes$entry != lOther$volumes$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage + on Query$GetServerDiskVolumesQuery$storage { + CopyWith$Query$GetServerDiskVolumesQuery$storage< + Query$GetServerDiskVolumesQuery$storage> + get copyWith => + CopyWith$Query$GetServerDiskVolumesQuery$storage(this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage { + factory CopyWith$Query$GetServerDiskVolumesQuery$storage( + Query$GetServerDiskVolumesQuery$storage instance, + TRes Function(Query$GetServerDiskVolumesQuery$storage) then) = + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage; + + factory CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage; + + TRes call( + {List? volumes, + String? $__typename}); + TRes volumes( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< + Query$GetServerDiskVolumesQuery$storage$volumes>>) + _fn); +} + +class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage + implements CopyWith$Query$GetServerDiskVolumesQuery$storage { + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage( + this._instance, this._then); + + final Query$GetServerDiskVolumesQuery$storage _instance; + + final TRes Function(Query$GetServerDiskVolumesQuery$storage) _then; + + static const _undefined = {}; + + TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumesQuery$storage( + volumes: volumes == _undefined || volumes == null + ? _instance.volumes + : (volumes + as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes volumes( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< + Query$GetServerDiskVolumesQuery$storage$volumes>>) + _fn) => + call( + volumes: _fn(_instance.volumes.map((e) => + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( + e, (i) => i))).toList()); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage + implements CopyWith$Query$GetServerDiskVolumesQuery$storage { + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage(this._res); + + TRes _res; + + call( + {List? volumes, + String? $__typename}) => + _res; + volumes(_fn) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumesQuery$storage$volumes { + Query$GetServerDiskVolumesQuery$storage$volumes( + {required this.freeSpace, + required this.name, + required this.root, + required this.totalSpace, + required this.usedSpace, + required this.$__typename}); + + @override + factory Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( + Map json) => + _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson(json); + + final String freeSpace; + + final String name; + + final bool root; + + final String totalSpace; + + final String usedSpace; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumesQuery$storage$volumesToJson(this); + int get hashCode { + final l$freeSpace = freeSpace; + final l$name = name; + final l$root = root; + final l$totalSpace = totalSpace; + final l$usedSpace = usedSpace; + final l$$__typename = $__typename; + return Object.hashAll([ + l$freeSpace, + l$name, + l$root, + l$totalSpace, + l$usedSpace, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumesQuery$storage$volumes) || + runtimeType != other.runtimeType) return false; + final l$freeSpace = freeSpace; + final lOther$freeSpace = other.freeSpace; + if (l$freeSpace != lOther$freeSpace) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$root = root; + final lOther$root = other.root; + if (l$root != lOther$root) return false; + final l$totalSpace = totalSpace; + final lOther$totalSpace = other.totalSpace; + if (l$totalSpace != lOther$totalSpace) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage$volumes + on Query$GetServerDiskVolumesQuery$storage$volumes { + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< + Query$GetServerDiskVolumesQuery$storage$volumes> + get copyWith => CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( + this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { + factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( + Query$GetServerDiskVolumesQuery$storage$volumes instance, + TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) then) = + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes; + + factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes.stub( + TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes; + + TRes call( + {String? freeSpace, + String? name, + bool? root, + String? totalSpace, + String? usedSpace, + String? $__typename}); +} + +class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes + implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes( + this._instance, this._then); + + final Query$GetServerDiskVolumesQuery$storage$volumes _instance; + + final TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) _then; + + static const _undefined = {}; + + TRes call( + {Object? freeSpace = _undefined, + Object? name = _undefined, + Object? root = _undefined, + Object? totalSpace = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumesQuery$storage$volumes( + freeSpace: freeSpace == _undefined || freeSpace == null + ? _instance.freeSpace + : (freeSpace as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + root: root == _undefined || root == null + ? _instance.root + : (root as bool), + totalSpace: totalSpace == _undefined || totalSpace == null + ? _instance.totalSpace + : (totalSpace as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes + implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes(this._res); + + TRes _res; + + call( + {String? freeSpace, + String? name, + bool? root, + String? totalSpace, + String? usedSpace, + String? $__typename}) => + _res; +} diff --git a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart new file mode 100644 index 00000000..ecbd5a02 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart @@ -0,0 +1,64 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'get_server_disk_volumes.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Query$GetServerDiskVolumesQuery _$Query$GetServerDiskVolumesQueryFromJson( + Map json) => + Query$GetServerDiskVolumesQuery( + storage: Query$GetServerDiskVolumesQuery$storage.fromJson( + json['storage'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetServerDiskVolumesQueryToJson( + Query$GetServerDiskVolumesQuery instance) => + { + 'storage': instance.storage.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumesQuery$storage + _$Query$GetServerDiskVolumesQuery$storageFromJson( + Map json) => + Query$GetServerDiskVolumesQuery$storage( + volumes: (json['volumes'] as List) + .map((e) => + Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetServerDiskVolumesQuery$storageToJson( + Query$GetServerDiskVolumesQuery$storage instance) => + { + 'volumes': instance.volumes.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumesQuery$storage$volumes + _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson( + Map json) => + Query$GetServerDiskVolumesQuery$storage$volumes( + freeSpace: json['freeSpace'] as String, + name: json['name'] as String, + root: json['root'] as bool, + totalSpace: json['totalSpace'] as String, + usedSpace: json['usedSpace'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetServerDiskVolumesQuery$storage$volumesToJson( + Query$GetServerDiskVolumesQuery$storage$volumes instance) => + { + 'freeSpace': instance.freeSpace, + 'name': instance.name, + 'root': instance.root, + 'totalSpace': instance.totalSpace, + 'usedSpace': instance.usedSpace, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index c4b3246d..3ad04e3f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -7,6 +7,18 @@ type Alert { timestamp: DateTime } +type Storage { + volumes: [StorageVolume!]! +} + +type StorageVolume { + freeSpace: String! + name: String! + root: Boolean! + totalSpace: String! + usedSpace: String! +} + type Api { version: String! devices: [ApiDevice!]! @@ -82,6 +94,7 @@ interface MutationReturnInterface { type Query { system: System! + storage: Storage! api: Api! } diff --git a/lib/logic/api_maps/graphql_maps/schema/server.dart b/lib/logic/api_maps/graphql_maps/schema/server.dart index 1ddf49f7..ab4fe197 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server.dart @@ -3,8 +3,10 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; class ServerApi extends ApiMap { ServerApi({ @@ -54,4 +56,21 @@ class ServerApi extends ApiMap { return tokens; } + + Future> getServerDiskVolumes() async { + QueryResult response; + List volumes = []; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetServerDiskVolumesQuery(); + volumes = response.data!['storage']['volumes'] + .map((final e) => ServerDiskVolume.fromJson(e)) + .toList(); + } catch (e) { + print(e); + } + + return volumes; + } } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 6899240f..4ed0d382 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -4,12 +4,14 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_repository.dart'; @@ -553,6 +555,10 @@ class ServerInstallationCubit extends Cubit { ); } + Future> getServerDiskVolumes() async => + ServerApi(authToken: 'HARDCODE OUR BEARER HERE FOR NOW') + .getServerDiskVolumes(); + Future setAndValidateCloudflareToken(final String token) async { final ServerInstallationRecovery dataState = state as ServerInstallationRecovery; diff --git a/lib/logic/models/json/server_disk_volume.dart b/lib/logic/models/json/server_disk_volume.dart new file mode 100644 index 00000000..b7d4bfca --- /dev/null +++ b/lib/logic/models/json/server_disk_volume.dart @@ -0,0 +1,22 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'server_disk_volume.g.dart'; + +@JsonSerializable() +class ServerDiskVolume { + factory ServerDiskVolume.fromJson(final Map json) => + _$ServerDiskVolumeFromJson(json); + ServerDiskVolume({ + required this.freeSpace, + required this.name, + required this.root, + required this.totalSpace, + required this.usedSpace, + }); + + final String freeSpace; + final String name; + final bool root; + final String totalSpace; + final String usedSpace; +} diff --git a/lib/logic/models/json/server_disk_volume.g.dart b/lib/logic/models/json/server_disk_volume.g.dart new file mode 100644 index 00000000..95f5788b --- /dev/null +++ b/lib/logic/models/json/server_disk_volume.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'server_disk_volume.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ServerDiskVolume _$ServerDiskVolumeFromJson(Map json) => + ServerDiskVolume( + freeSpace: json['freeSpace'] as String, + name: json['name'] as String, + root: json['root'] as bool, + totalSpace: json['totalSpace'] as String, + usedSpace: json['usedSpace'] as String, + ); + +Map _$ServerDiskVolumeToJson(ServerDiskVolume instance) => + { + 'freeSpace': instance.freeSpace, + 'name': instance.name, + 'root': instance.root, + 'totalSpace': instance.totalSpace, + 'usedSpace': instance.usedSpace, + }; diff --git a/lib/logic/models/state_types.dart b/lib/logic/models/state_types.dart index cd79de6c..3fb110c0 100644 --- a/lib/logic/models/state_types.dart +++ b/lib/logic/models/state_types.dart @@ -1 +1 @@ -enum StateType { uninitialized, stable, warning } +enum StateType { uninitialized, stable, warning, error } diff --git a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart new file mode 100644 index 00000000..807d3224 --- /dev/null +++ b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; + +class BrandLinearIndicator extends StatelessWidget { + const BrandLinearIndicator({ + required this.value, + required this.color, + required this.backgroundColor, + required this.height, + final super.key, + }); + + final double value; + final Color color; + final Color backgroundColor; + final double height; + + @override + Widget build(final BuildContext context) => Container( + height: height, + width: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + color: backgroundColor, + borderRadius: BorderRadius.circular(height), + ), + alignment: Alignment.centerLeft, + child: FractionallySizedBox( + widthFactor: value, + child: Container( + decoration: BoxDecoration( + color: color, + borderRadius: BorderRadius.circular(height), + ), + ), + ), + ); +} diff --git a/lib/ui/components/icon_status_mask/icon_status_mask.dart b/lib/ui/components/icon_status_mask/icon_status_mask.dart index 0c507ede..cda75049 100644 --- a/lib/ui/components/icon_status_mask/icon_status_mask.dart +++ b/lib/ui/components/icon_status_mask/icon_status_mask.dart @@ -28,6 +28,12 @@ class IconStatusMask extends StatelessWidget { case StateType.warning: colors = BrandColors.warningGradientColors; break; + case StateType.error: + colors = [ + Theme.of(context).colorScheme.error, + Theme.of(context).colorScheme.error, + ]; + break; } return ShaderMask( shaderCallback: (final bounds) => LinearGradient( diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 97e4aeeb..36903d1f 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/provider.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; @@ -15,6 +16,7 @@ import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; +import 'package:selfprivacy/ui/pages/providers/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -67,6 +69,23 @@ class _ProvidersPageState extends State { ), ) .toList(); + cards.add( + Padding( + padding: const EdgeInsets.only(bottom: 30), + child: FutureBuilder( + future: + context.read().getServerDiskVolumes(), + builder: ( + final BuildContext context, + final AsyncSnapshot snapshot, + ) => + StorageCard( + volumes: + snapshot.hasData ? snapshot.data as List : [], + ), + ), + ), + ); return Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(52), diff --git a/lib/ui/pages/providers/storage_card.dart b/lib/ui/pages/providers/storage_card.dart new file mode 100644 index 00000000..51c510e4 --- /dev/null +++ b/lib/ui/pages/providers/storage_card.dart @@ -0,0 +1,152 @@ +import 'dart:ffi'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; +import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; +import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; + +class DiskVolume { + int gbUsed = 0; + int gbTotal = 0; + String name = ''; + bool root = false; + + /// from 0.0 to 1.0 + double percentage = 0.0; +} + +class DiskStatus { + bool isDiskOkay = false; + List diskVolumes = []; +} + +class StorageCard extends StatelessWidget { + const StorageCard({required this.volumes, final super.key}); + + final List volumes; + + @override + Widget build( + final BuildContext context, + ) { + final DiskStatus diskStatus = toDiskStatus(volumes); + + final List sections = []; + for (final DiskVolume volume in diskStatus.diskVolumes) { + sections.add( + const SizedBox(height: 16), + ); + sections.add( + Text( + 'providers.storage.disk_usage'.tr(args: [volume.gbUsed.toString()]), + style: Theme.of(context).textTheme.titleMedium, + ), + ); + sections.add( + const SizedBox(height: 4), + ); + sections.add( + BrandLinearIndicator( + value: volume.percentage, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 14.0, + ), + ); + sections.add( + const SizedBox(height: 4), + ); + sections.add( + Text( + 'providers.storage.disk_total'.tr(args: [ + volume.gbTotal.toString(), + volume.name, + ]), + style: Theme.of(context).textTheme.bodySmall, + ), + ); + } + + return GestureDetector( + onTap: null, + child: BrandCards.big( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const IconStatusMask( + status: StateType.stable, + child: Icon( + Icons.storage_outlined, + size: 30, + color: Colors.white, + ), + ), + IconStatusMask( + status: StateType.stable, + child: Icon( + diskStatus.isDiskOkay + ? Icons.check_circle_outline + : Icons.error_outline, + size: 24, + color: Colors.white, + ), + ), + ], + ), + const SizedBox(height: 16), + Text( + 'providers.storage.card_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + Text( + diskStatus.isDiskOkay + ? 'providers.storage.status_ok'.tr() + : 'providers.storage.status_error'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + ...sections, + const SizedBox(height: 8), + ], + ), + ), + ); + } + + DiskStatus toDiskStatus(final List status) { + final DiskStatus diskStatus = DiskStatus(); + diskStatus.isDiskOkay = true; + + diskStatus.diskVolumes = status.map(( + final ServerDiskVolume volume, + ) { + final DiskVolume diskVolume = DiskVolume(); + diskVolume.gbUsed = volume.usedSpace == 'None' + ? 0 + : int.parse(volume.usedSpace) ~/ 1000000000; + diskVolume.gbTotal = volume.totalSpace == 'None' + ? 0 + : int.parse(volume.totalSpace) ~/ 1000000000; + diskVolume.name = volume.name; + diskVolume.root = volume.root; + diskVolume.percentage = + volume.usedSpace != 'None' && volume.totalSpace != 'None' + ? 1.0 / int.parse(volume.totalSpace) * int.parse(volume.usedSpace) + : 0.0; + if (diskVolume.percentage >= 0.8 || + diskVolume.gbTotal - diskVolume.gbUsed <= 2) { + diskStatus.isDiskOkay = false; + } + return diskVolume; + }).toList(); + + return diskStatus; + } +} From 96c7d7966a1b6d7a92ad4b5ee354dfe28f3ae547 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 1 Aug 2022 02:10:37 +0300 Subject: [PATCH 018/732] Update cubit for volume management and graphql --- lib/logic/api_maps/graphql_maps/api_map.dart | 7 +- .../graphql_maps/schema/disk_volumes.graphql | 38 + .../schema/disk_volumes.graphql.dart | 1915 +++++++++++++++++ .../schema/disk_volumes.graphql.g.dart | 211 ++ .../schema/get_api_version.graphql | 5 - .../schema/get_api_version.graphql.dart | 301 --- .../schema/get_api_version.graphql.g.dart | 36 - .../schema/get_server_disk_volumes.graphql | 11 - .../get_server_disk_volumes.graphql.dart | 542 ----- .../get_server_disk_volumes.graphql.g.dart | 64 - .../graphql_maps/schema/schema.graphql | 16 +- .../api_maps/graphql_maps/schema/server.dart | 48 +- ..._api_tokens.graphql => server_api.graphql} | 6 + ...s.graphql.dart => server_api.graphql.dart} | 299 ++- ...aphql.g.dart => server_api.graphql.g.dart} | 31 +- .../server_providers/hetzner/hetzner.dart | 6 + .../server_installation_cubit.dart | 4 +- .../server_installation_repository.dart | 4 + lib/logic/cubit/volumes/volumes_cubit.dart | 98 +- lib/logic/models/hive/server_details.dart | 3 + lib/logic/models/hive/server_details.g.dart | 7 +- lib/logic/models/json/server_disk_volume.dart | 6 + .../models/json/server_disk_volume.g.dart | 6 + lib/ui/pages/providers/providers.dart | 6 +- lib/ui/pages/providers/storage_card.dart | 48 +- lib/ui/pages/server_storage/disk_status.dart | 14 + .../pages/server_storage/server_storage.dart | 96 + 27 files changed, 2808 insertions(+), 1020 deletions(-) create mode 100644 lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql delete mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql delete mode 100644 lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart rename lib/logic/api_maps/graphql_maps/schema/{get_api_tokens.graphql => server_api.graphql} (65%) rename lib/logic/api_maps/graphql_maps/schema/{get_api_tokens.graphql.dart => server_api.graphql.dart} (61%) rename lib/logic/api_maps/graphql_maps/schema/{get_api_tokens.graphql.g.dart => server_api.graphql.g.dart} (67%) create mode 100644 lib/ui/pages/server_storage/disk_status.dart create mode 100644 lib/ui/pages/server_storage/server_storage.dart diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index 90d6a349..c9240f00 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -1,4 +1,5 @@ import 'package:graphql_flutter/graphql_flutter.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; abstract class ApiMap { Future getClient() async { @@ -8,7 +9,9 @@ abstract class ApiMap { final Link graphQLLink = isWithToken ? AuthLink( - getToken: () async => authToken, + getToken: () async => customToken == '' + ? getIt().serverDetails!.apiToken + : customToken, ).concat(httpLink) : httpLink; @@ -21,5 +24,5 @@ abstract class ApiMap { abstract final String? rootAddress; abstract final bool hasLogger; abstract final bool isWithToken; - abstract final String authToken; + abstract final String customToken; } diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql new file mode 100644 index 00000000..c85d05d9 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql @@ -0,0 +1,38 @@ +query GetServerDiskVolumesQuery { + storage { + volumes { + freeSpace + model + name + root + serial + totalSpace + type + usedSpace + } + } +} + +mutation MountVolumeMutation($name: String!) { + mountVolume(name: $name) { + code + message + success + } +} + +mutation ResizeVolumeMutation($name: String!) { + resizeVolume(name: $name) { + code + message + success + } +} + +mutation UnmountVolumeMutation($name: String!) { + unmountVolume(name: $name) { + code + message + success + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart new file mode 100644 index 00000000..527b7168 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -0,0 +1,1915 @@ +import 'dart:async'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +part 'disk_volumes.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumesQuery { + Query$GetServerDiskVolumesQuery( + {required this.storage, required this.$__typename}); + + @override + factory Query$GetServerDiskVolumesQuery.fromJson(Map json) => + _$Query$GetServerDiskVolumesQueryFromJson(json); + + final Query$GetServerDiskVolumesQuery$storage storage; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumesQueryToJson(this); + int get hashCode { + final l$storage = storage; + final l$$__typename = $__typename; + return Object.hashAll([l$storage, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumesQuery) || + runtimeType != other.runtimeType) return false; + final l$storage = storage; + final lOther$storage = other.storage; + if (l$storage != lOther$storage) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumesQuery + on Query$GetServerDiskVolumesQuery { + CopyWith$Query$GetServerDiskVolumesQuery + get copyWith => CopyWith$Query$GetServerDiskVolumesQuery(this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumesQuery { + factory CopyWith$Query$GetServerDiskVolumesQuery( + Query$GetServerDiskVolumesQuery instance, + TRes Function(Query$GetServerDiskVolumesQuery) then) = + _CopyWithImpl$Query$GetServerDiskVolumesQuery; + + factory CopyWith$Query$GetServerDiskVolumesQuery.stub(TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery; + + TRes call( + {Query$GetServerDiskVolumesQuery$storage? storage, String? $__typename}); + CopyWith$Query$GetServerDiskVolumesQuery$storage get storage; +} + +class _CopyWithImpl$Query$GetServerDiskVolumesQuery + implements CopyWith$Query$GetServerDiskVolumesQuery { + _CopyWithImpl$Query$GetServerDiskVolumesQuery(this._instance, this._then); + + final Query$GetServerDiskVolumesQuery _instance; + + final TRes Function(Query$GetServerDiskVolumesQuery) _then; + + static const _undefined = {}; + + TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumesQuery( + storage: storage == _undefined || storage == null + ? _instance.storage + : (storage as Query$GetServerDiskVolumesQuery$storage), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetServerDiskVolumesQuery$storage get storage { + final local$storage = _instance.storage; + return CopyWith$Query$GetServerDiskVolumesQuery$storage( + local$storage, (e) => call(storage: e)); + } +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery + implements CopyWith$Query$GetServerDiskVolumesQuery { + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery(this._res); + + TRes _res; + + call( + {Query$GetServerDiskVolumesQuery$storage? storage, + String? $__typename}) => + _res; + CopyWith$Query$GetServerDiskVolumesQuery$storage get storage => + CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(_res); +} + +const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetServerDiskVolumesQuery'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'storage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'volumes'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'freeSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'model'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'root'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'serial'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'totalSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'type'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetServerDiskVolumesQuery _parserFn$Query$GetServerDiskVolumesQuery( + Map data) => + Query$GetServerDiskVolumesQuery.fromJson(data); + +class Options$Query$GetServerDiskVolumesQuery + extends graphql.QueryOptions { + Options$Query$GetServerDiskVolumesQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetServerDiskVolumesQuery, + parserFn: _parserFn$Query$GetServerDiskVolumesQuery); +} + +class WatchOptions$Query$GetServerDiskVolumesQuery + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetServerDiskVolumesQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetServerDiskVolumesQuery, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetServerDiskVolumesQuery); +} + +class FetchMoreOptions$Query$GetServerDiskVolumesQuery + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetServerDiskVolumesQuery( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryGetServerDiskVolumesQuery); +} + +extension ClientExtension$Query$GetServerDiskVolumesQuery + on graphql.GraphQLClient { + Future> + query$GetServerDiskVolumesQuery( + [Options$Query$GetServerDiskVolumesQuery? options]) async => + await this + .query(options ?? Options$Query$GetServerDiskVolumesQuery()); + graphql.ObservableQuery + watchQuery$GetServerDiskVolumesQuery( + [WatchOptions$Query$GetServerDiskVolumesQuery? options]) => + this.watchQuery( + options ?? WatchOptions$Query$GetServerDiskVolumesQuery()); + void writeQuery$GetServerDiskVolumesQuery( + {required Query$GetServerDiskVolumesQuery data, + bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetServerDiskVolumesQuery)), + data: data.toJson(), + broadcast: broadcast); + Query$GetServerDiskVolumesQuery? readQuery$GetServerDiskVolumesQuery( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetServerDiskVolumesQuery)), + optimistic: optimistic); + return result == null + ? null + : Query$GetServerDiskVolumesQuery.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumesQuery$storage { + Query$GetServerDiskVolumesQuery$storage( + {required this.volumes, required this.$__typename}); + + @override + factory Query$GetServerDiskVolumesQuery$storage.fromJson( + Map json) => + _$Query$GetServerDiskVolumesQuery$storageFromJson(json); + + final List volumes; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumesQuery$storageToJson(this); + int get hashCode { + final l$volumes = volumes; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$volumes.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumesQuery$storage) || + runtimeType != other.runtimeType) return false; + final l$volumes = volumes; + final lOther$volumes = other.volumes; + if (l$volumes.length != lOther$volumes.length) return false; + for (int i = 0; i < l$volumes.length; i++) { + final l$volumes$entry = l$volumes[i]; + final lOther$volumes$entry = lOther$volumes[i]; + if (l$volumes$entry != lOther$volumes$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage + on Query$GetServerDiskVolumesQuery$storage { + CopyWith$Query$GetServerDiskVolumesQuery$storage< + Query$GetServerDiskVolumesQuery$storage> + get copyWith => + CopyWith$Query$GetServerDiskVolumesQuery$storage(this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage { + factory CopyWith$Query$GetServerDiskVolumesQuery$storage( + Query$GetServerDiskVolumesQuery$storage instance, + TRes Function(Query$GetServerDiskVolumesQuery$storage) then) = + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage; + + factory CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage; + + TRes call( + {List? volumes, + String? $__typename}); + TRes volumes( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< + Query$GetServerDiskVolumesQuery$storage$volumes>>) + _fn); +} + +class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage + implements CopyWith$Query$GetServerDiskVolumesQuery$storage { + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage( + this._instance, this._then); + + final Query$GetServerDiskVolumesQuery$storage _instance; + + final TRes Function(Query$GetServerDiskVolumesQuery$storage) _then; + + static const _undefined = {}; + + TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumesQuery$storage( + volumes: volumes == _undefined || volumes == null + ? _instance.volumes + : (volumes + as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes volumes( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< + Query$GetServerDiskVolumesQuery$storage$volumes>>) + _fn) => + call( + volumes: _fn(_instance.volumes.map((e) => + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( + e, (i) => i))).toList()); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage + implements CopyWith$Query$GetServerDiskVolumesQuery$storage { + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage(this._res); + + TRes _res; + + call( + {List? volumes, + String? $__typename}) => + _res; + volumes(_fn) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumesQuery$storage$volumes { + Query$GetServerDiskVolumesQuery$storage$volumes( + {required this.freeSpace, + required this.model, + required this.name, + required this.root, + required this.serial, + required this.totalSpace, + required this.type, + required this.usedSpace, + required this.$__typename}); + + @override + factory Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( + Map json) => + _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson(json); + + final String freeSpace; + + final String model; + + final String name; + + final bool root; + + final String serial; + + final String totalSpace; + + final String type; + + final String usedSpace; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumesQuery$storage$volumesToJson(this); + int get hashCode { + final l$freeSpace = freeSpace; + final l$model = model; + final l$name = name; + final l$root = root; + final l$serial = serial; + final l$totalSpace = totalSpace; + final l$type = type; + final l$usedSpace = usedSpace; + final l$$__typename = $__typename; + return Object.hashAll([ + l$freeSpace, + l$model, + l$name, + l$root, + l$serial, + l$totalSpace, + l$type, + l$usedSpace, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumesQuery$storage$volumes) || + runtimeType != other.runtimeType) return false; + final l$freeSpace = freeSpace; + final lOther$freeSpace = other.freeSpace; + if (l$freeSpace != lOther$freeSpace) return false; + final l$model = model; + final lOther$model = other.model; + if (l$model != lOther$model) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$root = root; + final lOther$root = other.root; + if (l$root != lOther$root) return false; + final l$serial = serial; + final lOther$serial = other.serial; + if (l$serial != lOther$serial) return false; + final l$totalSpace = totalSpace; + final lOther$totalSpace = other.totalSpace; + if (l$totalSpace != lOther$totalSpace) return false; + final l$type = type; + final lOther$type = other.type; + if (l$type != lOther$type) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage$volumes + on Query$GetServerDiskVolumesQuery$storage$volumes { + CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< + Query$GetServerDiskVolumesQuery$storage$volumes> + get copyWith => CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( + this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { + factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( + Query$GetServerDiskVolumesQuery$storage$volumes instance, + TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) then) = + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes; + + factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes.stub( + TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes; + + TRes call( + {String? freeSpace, + String? model, + String? name, + bool? root, + String? serial, + String? totalSpace, + String? type, + String? usedSpace, + String? $__typename}); +} + +class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes + implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { + _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes( + this._instance, this._then); + + final Query$GetServerDiskVolumesQuery$storage$volumes _instance; + + final TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) _then; + + static const _undefined = {}; + + TRes call( + {Object? freeSpace = _undefined, + Object? model = _undefined, + Object? name = _undefined, + Object? root = _undefined, + Object? serial = _undefined, + Object? totalSpace = _undefined, + Object? type = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumesQuery$storage$volumes( + freeSpace: freeSpace == _undefined || freeSpace == null + ? _instance.freeSpace + : (freeSpace as String), + model: model == _undefined || model == null + ? _instance.model + : (model as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + root: root == _undefined || root == null + ? _instance.root + : (root as bool), + serial: serial == _undefined || serial == null + ? _instance.serial + : (serial as String), + totalSpace: totalSpace == _undefined || totalSpace == null + ? _instance.totalSpace + : (totalSpace as String), + type: type == _undefined || type == null + ? _instance.type + : (type as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes + implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { + _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes(this._res); + + TRes _res; + + call( + {String? freeSpace, + String? model, + String? name, + bool? root, + String? serial, + String? totalSpace, + String? type, + String? usedSpace, + String? $__typename}) => + _res; +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$MountVolumeMutation { + Variables$Mutation$MountVolumeMutation({required this.name}); + + @override + factory Variables$Mutation$MountVolumeMutation.fromJson( + Map json) => + _$Variables$Mutation$MountVolumeMutationFromJson(json); + + final String name; + + Map toJson() => + _$Variables$Mutation$MountVolumeMutationToJson(this); + int get hashCode { + final l$name = name; + return Object.hashAll([l$name]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$MountVolumeMutation) || + runtimeType != other.runtimeType) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + return true; + } + + CopyWith$Variables$Mutation$MountVolumeMutation< + Variables$Mutation$MountVolumeMutation> + get copyWith => + CopyWith$Variables$Mutation$MountVolumeMutation(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$MountVolumeMutation { + factory CopyWith$Variables$Mutation$MountVolumeMutation( + Variables$Mutation$MountVolumeMutation instance, + TRes Function(Variables$Mutation$MountVolumeMutation) then) = + _CopyWithImpl$Variables$Mutation$MountVolumeMutation; + + factory CopyWith$Variables$Mutation$MountVolumeMutation.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation; + + TRes call({String? name}); +} + +class _CopyWithImpl$Variables$Mutation$MountVolumeMutation + implements CopyWith$Variables$Mutation$MountVolumeMutation { + _CopyWithImpl$Variables$Mutation$MountVolumeMutation( + this._instance, this._then); + + final Variables$Mutation$MountVolumeMutation _instance; + + final TRes Function(Variables$Mutation$MountVolumeMutation) _then; + + static const _undefined = {}; + + TRes call({Object? name = _undefined}) => + _then(Variables$Mutation$MountVolumeMutation( + name: name == _undefined || name == null + ? _instance.name + : (name as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation + implements CopyWith$Variables$Mutation$MountVolumeMutation { + _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation(this._res); + + TRes _res; + + call({String? name}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MountVolumeMutation { + Mutation$MountVolumeMutation( + {required this.mountVolume, required this.$__typename}); + + @override + factory Mutation$MountVolumeMutation.fromJson(Map json) => + _$Mutation$MountVolumeMutationFromJson(json); + + final Mutation$MountVolumeMutation$mountVolume mountVolume; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$MountVolumeMutationToJson(this); + int get hashCode { + final l$mountVolume = mountVolume; + final l$$__typename = $__typename; + return Object.hashAll([l$mountVolume, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MountVolumeMutation) || + runtimeType != other.runtimeType) return false; + final l$mountVolume = mountVolume; + final lOther$mountVolume = other.mountVolume; + if (l$mountVolume != lOther$mountVolume) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MountVolumeMutation + on Mutation$MountVolumeMutation { + CopyWith$Mutation$MountVolumeMutation + get copyWith => CopyWith$Mutation$MountVolumeMutation(this, (i) => i); +} + +abstract class CopyWith$Mutation$MountVolumeMutation { + factory CopyWith$Mutation$MountVolumeMutation( + Mutation$MountVolumeMutation instance, + TRes Function(Mutation$MountVolumeMutation) then) = + _CopyWithImpl$Mutation$MountVolumeMutation; + + factory CopyWith$Mutation$MountVolumeMutation.stub(TRes res) = + _CopyWithStubImpl$Mutation$MountVolumeMutation; + + TRes call( + {Mutation$MountVolumeMutation$mountVolume? mountVolume, + String? $__typename}); + CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume; +} + +class _CopyWithImpl$Mutation$MountVolumeMutation + implements CopyWith$Mutation$MountVolumeMutation { + _CopyWithImpl$Mutation$MountVolumeMutation(this._instance, this._then); + + final Mutation$MountVolumeMutation _instance; + + final TRes Function(Mutation$MountVolumeMutation) _then; + + static const _undefined = {}; + + TRes call( + {Object? mountVolume = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MountVolumeMutation( + mountVolume: mountVolume == _undefined || mountVolume == null + ? _instance.mountVolume + : (mountVolume as Mutation$MountVolumeMutation$mountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume { + final local$mountVolume = _instance.mountVolume; + return CopyWith$Mutation$MountVolumeMutation$mountVolume( + local$mountVolume, (e) => call(mountVolume: e)); + } +} + +class _CopyWithStubImpl$Mutation$MountVolumeMutation + implements CopyWith$Mutation$MountVolumeMutation { + _CopyWithStubImpl$Mutation$MountVolumeMutation(this._res); + + TRes _res; + + call( + {Mutation$MountVolumeMutation$mountVolume? mountVolume, + String? $__typename}) => + _res; + CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume => + CopyWith$Mutation$MountVolumeMutation$mountVolume.stub(_res); +} + +const documentNodeMutationMountVolumeMutation = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'MountVolumeMutation'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'mountVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Mutation$MountVolumeMutation _parserFn$Mutation$MountVolumeMutation( + Map data) => + Mutation$MountVolumeMutation.fromJson(data); +typedef OnMutationCompleted$Mutation$MountVolumeMutation = FutureOr + Function(dynamic, Mutation$MountVolumeMutation?); + +class Options$Mutation$MountVolumeMutation + extends graphql.MutationOptions { + Options$Mutation$MountVolumeMutation( + {String? operationName, + required Variables$Mutation$MountVolumeMutation variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MountVolumeMutation? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$MountVolumeMutation(data)), + update: update, + onError: onError, + document: documentNodeMutationMountVolumeMutation, + parserFn: _parserFn$Mutation$MountVolumeMutation); + + final OnMutationCompleted$Mutation$MountVolumeMutation? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$MountVolumeMutation + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$MountVolumeMutation( + {String? operationName, + required Variables$Mutation$MountVolumeMutation variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMountVolumeMutation, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MountVolumeMutation); +} + +extension ClientExtension$Mutation$MountVolumeMutation + on graphql.GraphQLClient { + Future> + mutate$MountVolumeMutation( + Options$Mutation$MountVolumeMutation options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$MountVolumeMutation( + WatchOptions$Mutation$MountVolumeMutation options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MountVolumeMutation$mountVolume { + Mutation$MountVolumeMutation$mountVolume( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$MountVolumeMutation$mountVolume.fromJson( + Map json) => + _$Mutation$MountVolumeMutation$mountVolumeFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$MountVolumeMutation$mountVolumeToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MountVolumeMutation$mountVolume) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MountVolumeMutation$mountVolume + on Mutation$MountVolumeMutation$mountVolume { + CopyWith$Mutation$MountVolumeMutation$mountVolume< + Mutation$MountVolumeMutation$mountVolume> + get copyWith => + CopyWith$Mutation$MountVolumeMutation$mountVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$MountVolumeMutation$mountVolume { + factory CopyWith$Mutation$MountVolumeMutation$mountVolume( + Mutation$MountVolumeMutation$mountVolume instance, + TRes Function(Mutation$MountVolumeMutation$mountVolume) then) = + _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume; + + factory CopyWith$Mutation$MountVolumeMutation$mountVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume + implements CopyWith$Mutation$MountVolumeMutation$mountVolume { + _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume( + this._instance, this._then); + + final Mutation$MountVolumeMutation$mountVolume _instance; + + final TRes Function(Mutation$MountVolumeMutation$mountVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MountVolumeMutation$mountVolume( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume + implements CopyWith$Mutation$MountVolumeMutation$mountVolume { + _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$ResizeVolumeMutation { + Variables$Mutation$ResizeVolumeMutation({required this.name}); + + @override + factory Variables$Mutation$ResizeVolumeMutation.fromJson( + Map json) => + _$Variables$Mutation$ResizeVolumeMutationFromJson(json); + + final String name; + + Map toJson() => + _$Variables$Mutation$ResizeVolumeMutationToJson(this); + int get hashCode { + final l$name = name; + return Object.hashAll([l$name]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$ResizeVolumeMutation) || + runtimeType != other.runtimeType) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + return true; + } + + CopyWith$Variables$Mutation$ResizeVolumeMutation< + Variables$Mutation$ResizeVolumeMutation> + get copyWith => + CopyWith$Variables$Mutation$ResizeVolumeMutation(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$ResizeVolumeMutation { + factory CopyWith$Variables$Mutation$ResizeVolumeMutation( + Variables$Mutation$ResizeVolumeMutation instance, + TRes Function(Variables$Mutation$ResizeVolumeMutation) then) = + _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation; + + factory CopyWith$Variables$Mutation$ResizeVolumeMutation.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation; + + TRes call({String? name}); +} + +class _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation + implements CopyWith$Variables$Mutation$ResizeVolumeMutation { + _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation( + this._instance, this._then); + + final Variables$Mutation$ResizeVolumeMutation _instance; + + final TRes Function(Variables$Mutation$ResizeVolumeMutation) _then; + + static const _undefined = {}; + + TRes call({Object? name = _undefined}) => + _then(Variables$Mutation$ResizeVolumeMutation( + name: name == _undefined || name == null + ? _instance.name + : (name as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation + implements CopyWith$Variables$Mutation$ResizeVolumeMutation { + _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation(this._res); + + TRes _res; + + call({String? name}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ResizeVolumeMutation { + Mutation$ResizeVolumeMutation( + {required this.resizeVolume, required this.$__typename}); + + @override + factory Mutation$ResizeVolumeMutation.fromJson(Map json) => + _$Mutation$ResizeVolumeMutationFromJson(json); + + final Mutation$ResizeVolumeMutation$resizeVolume resizeVolume; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$ResizeVolumeMutationToJson(this); + int get hashCode { + final l$resizeVolume = resizeVolume; + final l$$__typename = $__typename; + return Object.hashAll([l$resizeVolume, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ResizeVolumeMutation) || + runtimeType != other.runtimeType) return false; + final l$resizeVolume = resizeVolume; + final lOther$resizeVolume = other.resizeVolume; + if (l$resizeVolume != lOther$resizeVolume) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ResizeVolumeMutation + on Mutation$ResizeVolumeMutation { + CopyWith$Mutation$ResizeVolumeMutation + get copyWith => CopyWith$Mutation$ResizeVolumeMutation(this, (i) => i); +} + +abstract class CopyWith$Mutation$ResizeVolumeMutation { + factory CopyWith$Mutation$ResizeVolumeMutation( + Mutation$ResizeVolumeMutation instance, + TRes Function(Mutation$ResizeVolumeMutation) then) = + _CopyWithImpl$Mutation$ResizeVolumeMutation; + + factory CopyWith$Mutation$ResizeVolumeMutation.stub(TRes res) = + _CopyWithStubImpl$Mutation$ResizeVolumeMutation; + + TRes call( + {Mutation$ResizeVolumeMutation$resizeVolume? resizeVolume, + String? $__typename}); + CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume; +} + +class _CopyWithImpl$Mutation$ResizeVolumeMutation + implements CopyWith$Mutation$ResizeVolumeMutation { + _CopyWithImpl$Mutation$ResizeVolumeMutation(this._instance, this._then); + + final Mutation$ResizeVolumeMutation _instance; + + final TRes Function(Mutation$ResizeVolumeMutation) _then; + + static const _undefined = {}; + + TRes call( + {Object? resizeVolume = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$ResizeVolumeMutation( + resizeVolume: resizeVolume == _undefined || resizeVolume == null + ? _instance.resizeVolume + : (resizeVolume as Mutation$ResizeVolumeMutation$resizeVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume { + final local$resizeVolume = _instance.resizeVolume; + return CopyWith$Mutation$ResizeVolumeMutation$resizeVolume( + local$resizeVolume, (e) => call(resizeVolume: e)); + } +} + +class _CopyWithStubImpl$Mutation$ResizeVolumeMutation + implements CopyWith$Mutation$ResizeVolumeMutation { + _CopyWithStubImpl$Mutation$ResizeVolumeMutation(this._res); + + TRes _res; + + call( + {Mutation$ResizeVolumeMutation$resizeVolume? resizeVolume, + String? $__typename}) => + _res; + CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume => + CopyWith$Mutation$ResizeVolumeMutation$resizeVolume.stub(_res); +} + +const documentNodeMutationResizeVolumeMutation = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'ResizeVolumeMutation'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'resizeVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Mutation$ResizeVolumeMutation _parserFn$Mutation$ResizeVolumeMutation( + Map data) => + Mutation$ResizeVolumeMutation.fromJson(data); +typedef OnMutationCompleted$Mutation$ResizeVolumeMutation = FutureOr + Function(dynamic, Mutation$ResizeVolumeMutation?); + +class Options$Mutation$ResizeVolumeMutation + extends graphql.MutationOptions { + Options$Mutation$ResizeVolumeMutation( + {String? operationName, + required Variables$Mutation$ResizeVolumeMutation variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ResizeVolumeMutation? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$ResizeVolumeMutation(data)), + update: update, + onError: onError, + document: documentNodeMutationResizeVolumeMutation, + parserFn: _parserFn$Mutation$ResizeVolumeMutation); + + final OnMutationCompleted$Mutation$ResizeVolumeMutation? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$ResizeVolumeMutation + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ResizeVolumeMutation( + {String? operationName, + required Variables$Mutation$ResizeVolumeMutation variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationResizeVolumeMutation, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ResizeVolumeMutation); +} + +extension ClientExtension$Mutation$ResizeVolumeMutation + on graphql.GraphQLClient { + Future> + mutate$ResizeVolumeMutation( + Options$Mutation$ResizeVolumeMutation options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$ResizeVolumeMutation( + WatchOptions$Mutation$ResizeVolumeMutation options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ResizeVolumeMutation$resizeVolume { + Mutation$ResizeVolumeMutation$resizeVolume( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$ResizeVolumeMutation$resizeVolume.fromJson( + Map json) => + _$Mutation$ResizeVolumeMutation$resizeVolumeFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$ResizeVolumeMutation$resizeVolumeToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ResizeVolumeMutation$resizeVolume) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ResizeVolumeMutation$resizeVolume + on Mutation$ResizeVolumeMutation$resizeVolume { + CopyWith$Mutation$ResizeVolumeMutation$resizeVolume< + Mutation$ResizeVolumeMutation$resizeVolume> + get copyWith => + CopyWith$Mutation$ResizeVolumeMutation$resizeVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { + factory CopyWith$Mutation$ResizeVolumeMutation$resizeVolume( + Mutation$ResizeVolumeMutation$resizeVolume instance, + TRes Function(Mutation$ResizeVolumeMutation$resizeVolume) then) = + _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume; + + factory CopyWith$Mutation$ResizeVolumeMutation$resizeVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume + implements CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { + _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume( + this._instance, this._then); + + final Mutation$ResizeVolumeMutation$resizeVolume _instance; + + final TRes Function(Mutation$ResizeVolumeMutation$resizeVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$ResizeVolumeMutation$resizeVolume( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume + implements CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { + _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$UnmountVolumeMutation { + Variables$Mutation$UnmountVolumeMutation({required this.name}); + + @override + factory Variables$Mutation$UnmountVolumeMutation.fromJson( + Map json) => + _$Variables$Mutation$UnmountVolumeMutationFromJson(json); + + final String name; + + Map toJson() => + _$Variables$Mutation$UnmountVolumeMutationToJson(this); + int get hashCode { + final l$name = name; + return Object.hashAll([l$name]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$UnmountVolumeMutation) || + runtimeType != other.runtimeType) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + return true; + } + + CopyWith$Variables$Mutation$UnmountVolumeMutation< + Variables$Mutation$UnmountVolumeMutation> + get copyWith => + CopyWith$Variables$Mutation$UnmountVolumeMutation(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$UnmountVolumeMutation { + factory CopyWith$Variables$Mutation$UnmountVolumeMutation( + Variables$Mutation$UnmountVolumeMutation instance, + TRes Function(Variables$Mutation$UnmountVolumeMutation) then) = + _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation; + + factory CopyWith$Variables$Mutation$UnmountVolumeMutation.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation; + + TRes call({String? name}); +} + +class _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation + implements CopyWith$Variables$Mutation$UnmountVolumeMutation { + _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation( + this._instance, this._then); + + final Variables$Mutation$UnmountVolumeMutation _instance; + + final TRes Function(Variables$Mutation$UnmountVolumeMutation) _then; + + static const _undefined = {}; + + TRes call({Object? name = _undefined}) => + _then(Variables$Mutation$UnmountVolumeMutation( + name: name == _undefined || name == null + ? _instance.name + : (name as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation + implements CopyWith$Variables$Mutation$UnmountVolumeMutation { + _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation(this._res); + + TRes _res; + + call({String? name}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UnmountVolumeMutation { + Mutation$UnmountVolumeMutation( + {required this.unmountVolume, required this.$__typename}); + + @override + factory Mutation$UnmountVolumeMutation.fromJson(Map json) => + _$Mutation$UnmountVolumeMutationFromJson(json); + + final Mutation$UnmountVolumeMutation$unmountVolume unmountVolume; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$UnmountVolumeMutationToJson(this); + int get hashCode { + final l$unmountVolume = unmountVolume; + final l$$__typename = $__typename; + return Object.hashAll([l$unmountVolume, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UnmountVolumeMutation) || + runtimeType != other.runtimeType) return false; + final l$unmountVolume = unmountVolume; + final lOther$unmountVolume = other.unmountVolume; + if (l$unmountVolume != lOther$unmountVolume) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UnmountVolumeMutation + on Mutation$UnmountVolumeMutation { + CopyWith$Mutation$UnmountVolumeMutation + get copyWith => CopyWith$Mutation$UnmountVolumeMutation(this, (i) => i); +} + +abstract class CopyWith$Mutation$UnmountVolumeMutation { + factory CopyWith$Mutation$UnmountVolumeMutation( + Mutation$UnmountVolumeMutation instance, + TRes Function(Mutation$UnmountVolumeMutation) then) = + _CopyWithImpl$Mutation$UnmountVolumeMutation; + + factory CopyWith$Mutation$UnmountVolumeMutation.stub(TRes res) = + _CopyWithStubImpl$Mutation$UnmountVolumeMutation; + + TRes call( + {Mutation$UnmountVolumeMutation$unmountVolume? unmountVolume, + String? $__typename}); + CopyWith$Mutation$UnmountVolumeMutation$unmountVolume get unmountVolume; +} + +class _CopyWithImpl$Mutation$UnmountVolumeMutation + implements CopyWith$Mutation$UnmountVolumeMutation { + _CopyWithImpl$Mutation$UnmountVolumeMutation(this._instance, this._then); + + final Mutation$UnmountVolumeMutation _instance; + + final TRes Function(Mutation$UnmountVolumeMutation) _then; + + static const _undefined = {}; + + TRes call( + {Object? unmountVolume = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UnmountVolumeMutation( + unmountVolume: unmountVolume == _undefined || unmountVolume == null + ? _instance.unmountVolume + : (unmountVolume as Mutation$UnmountVolumeMutation$unmountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$UnmountVolumeMutation$unmountVolume + get unmountVolume { + final local$unmountVolume = _instance.unmountVolume; + return CopyWith$Mutation$UnmountVolumeMutation$unmountVolume( + local$unmountVolume, (e) => call(unmountVolume: e)); + } +} + +class _CopyWithStubImpl$Mutation$UnmountVolumeMutation + implements CopyWith$Mutation$UnmountVolumeMutation { + _CopyWithStubImpl$Mutation$UnmountVolumeMutation(this._res); + + TRes _res; + + call( + {Mutation$UnmountVolumeMutation$unmountVolume? unmountVolume, + String? $__typename}) => + _res; + CopyWith$Mutation$UnmountVolumeMutation$unmountVolume + get unmountVolume => + CopyWith$Mutation$UnmountVolumeMutation$unmountVolume.stub(_res); +} + +const documentNodeMutationUnmountVolumeMutation = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'UnmountVolumeMutation'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'unmountVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Mutation$UnmountVolumeMutation _parserFn$Mutation$UnmountVolumeMutation( + Map data) => + Mutation$UnmountVolumeMutation.fromJson(data); +typedef OnMutationCompleted$Mutation$UnmountVolumeMutation = FutureOr + Function(dynamic, Mutation$UnmountVolumeMutation?); + +class Options$Mutation$UnmountVolumeMutation + extends graphql.MutationOptions { + Options$Mutation$UnmountVolumeMutation( + {String? operationName, + required Variables$Mutation$UnmountVolumeMutation variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UnmountVolumeMutation? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$UnmountVolumeMutation(data)), + update: update, + onError: onError, + document: documentNodeMutationUnmountVolumeMutation, + parserFn: _parserFn$Mutation$UnmountVolumeMutation); + + final OnMutationCompleted$Mutation$UnmountVolumeMutation? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$UnmountVolumeMutation + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$UnmountVolumeMutation( + {String? operationName, + required Variables$Mutation$UnmountVolumeMutation variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUnmountVolumeMutation, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UnmountVolumeMutation); +} + +extension ClientExtension$Mutation$UnmountVolumeMutation + on graphql.GraphQLClient { + Future> + mutate$UnmountVolumeMutation( + Options$Mutation$UnmountVolumeMutation options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$UnmountVolumeMutation( + WatchOptions$Mutation$UnmountVolumeMutation options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UnmountVolumeMutation$unmountVolume { + Mutation$UnmountVolumeMutation$unmountVolume( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$UnmountVolumeMutation$unmountVolume.fromJson( + Map json) => + _$Mutation$UnmountVolumeMutation$unmountVolumeFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$UnmountVolumeMutation$unmountVolumeToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UnmountVolumeMutation$unmountVolume) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UnmountVolumeMutation$unmountVolume + on Mutation$UnmountVolumeMutation$unmountVolume { + CopyWith$Mutation$UnmountVolumeMutation$unmountVolume< + Mutation$UnmountVolumeMutation$unmountVolume> + get copyWith => + CopyWith$Mutation$UnmountVolumeMutation$unmountVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { + factory CopyWith$Mutation$UnmountVolumeMutation$unmountVolume( + Mutation$UnmountVolumeMutation$unmountVolume instance, + TRes Function(Mutation$UnmountVolumeMutation$unmountVolume) then) = + _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume; + + factory CopyWith$Mutation$UnmountVolumeMutation$unmountVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume + implements CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { + _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume( + this._instance, this._then); + + final Mutation$UnmountVolumeMutation$unmountVolume _instance; + + final TRes Function(Mutation$UnmountVolumeMutation$unmountVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UnmountVolumeMutation$unmountVolume( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume + implements CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { + _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; +} diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart new file mode 100644 index 00000000..49a749fe --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart @@ -0,0 +1,211 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'disk_volumes.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Query$GetServerDiskVolumesQuery _$Query$GetServerDiskVolumesQueryFromJson( + Map json) => + Query$GetServerDiskVolumesQuery( + storage: Query$GetServerDiskVolumesQuery$storage.fromJson( + json['storage'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetServerDiskVolumesQueryToJson( + Query$GetServerDiskVolumesQuery instance) => + { + 'storage': instance.storage.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumesQuery$storage + _$Query$GetServerDiskVolumesQuery$storageFromJson( + Map json) => + Query$GetServerDiskVolumesQuery$storage( + volumes: (json['volumes'] as List) + .map((e) => + Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetServerDiskVolumesQuery$storageToJson( + Query$GetServerDiskVolumesQuery$storage instance) => + { + 'volumes': instance.volumes.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumesQuery$storage$volumes + _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson( + Map json) => + Query$GetServerDiskVolumesQuery$storage$volumes( + freeSpace: json['freeSpace'] as String, + model: json['model'] as String, + name: json['name'] as String, + root: json['root'] as bool, + serial: json['serial'] as String, + totalSpace: json['totalSpace'] as String, + type: json['type'] as String, + usedSpace: json['usedSpace'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetServerDiskVolumesQuery$storage$volumesToJson( + Query$GetServerDiskVolumesQuery$storage$volumes instance) => + { + 'freeSpace': instance.freeSpace, + 'model': instance.model, + 'name': instance.name, + 'root': instance.root, + 'serial': instance.serial, + 'totalSpace': instance.totalSpace, + 'type': instance.type, + 'usedSpace': instance.usedSpace, + '__typename': instance.$__typename, + }; + +Variables$Mutation$MountVolumeMutation + _$Variables$Mutation$MountVolumeMutationFromJson( + Map json) => + Variables$Mutation$MountVolumeMutation( + name: json['name'] as String, + ); + +Map _$Variables$Mutation$MountVolumeMutationToJson( + Variables$Mutation$MountVolumeMutation instance) => + { + 'name': instance.name, + }; + +Mutation$MountVolumeMutation _$Mutation$MountVolumeMutationFromJson( + Map json) => + Mutation$MountVolumeMutation( + mountVolume: Mutation$MountVolumeMutation$mountVolume.fromJson( + json['mountVolume'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MountVolumeMutationToJson( + Mutation$MountVolumeMutation instance) => + { + 'mountVolume': instance.mountVolume.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$MountVolumeMutation$mountVolume + _$Mutation$MountVolumeMutation$mountVolumeFromJson( + Map json) => + Mutation$MountVolumeMutation$mountVolume( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MountVolumeMutation$mountVolumeToJson( + Mutation$MountVolumeMutation$mountVolume instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$ResizeVolumeMutation + _$Variables$Mutation$ResizeVolumeMutationFromJson( + Map json) => + Variables$Mutation$ResizeVolumeMutation( + name: json['name'] as String, + ); + +Map _$Variables$Mutation$ResizeVolumeMutationToJson( + Variables$Mutation$ResizeVolumeMutation instance) => + { + 'name': instance.name, + }; + +Mutation$ResizeVolumeMutation _$Mutation$ResizeVolumeMutationFromJson( + Map json) => + Mutation$ResizeVolumeMutation( + resizeVolume: Mutation$ResizeVolumeMutation$resizeVolume.fromJson( + json['resizeVolume'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$ResizeVolumeMutationToJson( + Mutation$ResizeVolumeMutation instance) => + { + 'resizeVolume': instance.resizeVolume.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$ResizeVolumeMutation$resizeVolume + _$Mutation$ResizeVolumeMutation$resizeVolumeFromJson( + Map json) => + Mutation$ResizeVolumeMutation$resizeVolume( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$ResizeVolumeMutation$resizeVolumeToJson( + Mutation$ResizeVolumeMutation$resizeVolume instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$UnmountVolumeMutation + _$Variables$Mutation$UnmountVolumeMutationFromJson( + Map json) => + Variables$Mutation$UnmountVolumeMutation( + name: json['name'] as String, + ); + +Map _$Variables$Mutation$UnmountVolumeMutationToJson( + Variables$Mutation$UnmountVolumeMutation instance) => + { + 'name': instance.name, + }; + +Mutation$UnmountVolumeMutation _$Mutation$UnmountVolumeMutationFromJson( + Map json) => + Mutation$UnmountVolumeMutation( + unmountVolume: Mutation$UnmountVolumeMutation$unmountVolume.fromJson( + json['unmountVolume'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UnmountVolumeMutationToJson( + Mutation$UnmountVolumeMutation instance) => + { + 'unmountVolume': instance.unmountVolume.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$UnmountVolumeMutation$unmountVolume + _$Mutation$UnmountVolumeMutation$unmountVolumeFromJson( + Map json) => + Mutation$UnmountVolumeMutation$unmountVolume( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UnmountVolumeMutation$unmountVolumeToJson( + Mutation$UnmountVolumeMutation$unmountVolume instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql deleted file mode 100644 index cbfeb870..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql +++ /dev/null @@ -1,5 +0,0 @@ -query GetApiVersionQuery { - api { - version - } -} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart deleted file mode 100644 index 8d255fe6..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart +++ /dev/null @@ -1,301 +0,0 @@ -import 'package:gql/ast.dart'; -import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; -part 'get_api_version.graphql.g.dart'; - -@JsonSerializable(explicitToJson: true) -class Query$GetApiVersionQuery { - Query$GetApiVersionQuery({required this.api, required this.$__typename}); - - @override - factory Query$GetApiVersionQuery.fromJson(Map json) => - _$Query$GetApiVersionQueryFromJson(json); - - final Query$GetApiVersionQuery$api api; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$GetApiVersionQueryToJson(this); - int get hashCode { - final l$api = api; - final l$$__typename = $__typename; - return Object.hashAll([l$api, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiVersionQuery) || - runtimeType != other.runtimeType) return false; - final l$api = api; - final lOther$api = other.api; - if (l$api != lOther$api) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetApiVersionQuery - on Query$GetApiVersionQuery { - CopyWith$Query$GetApiVersionQuery get copyWith => - CopyWith$Query$GetApiVersionQuery(this, (i) => i); -} - -abstract class CopyWith$Query$GetApiVersionQuery { - factory CopyWith$Query$GetApiVersionQuery(Query$GetApiVersionQuery instance, - TRes Function(Query$GetApiVersionQuery) then) = - _CopyWithImpl$Query$GetApiVersionQuery; - - factory CopyWith$Query$GetApiVersionQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiVersionQuery; - - TRes call({Query$GetApiVersionQuery$api? api, String? $__typename}); - CopyWith$Query$GetApiVersionQuery$api get api; -} - -class _CopyWithImpl$Query$GetApiVersionQuery - implements CopyWith$Query$GetApiVersionQuery { - _CopyWithImpl$Query$GetApiVersionQuery(this._instance, this._then); - - final Query$GetApiVersionQuery _instance; - - final TRes Function(Query$GetApiVersionQuery) _then; - - static const _undefined = {}; - - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiVersionQuery( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiVersionQuery$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetApiVersionQuery$api get api { - final local$api = _instance.api; - return CopyWith$Query$GetApiVersionQuery$api( - local$api, (e) => call(api: e)); - } -} - -class _CopyWithStubImpl$Query$GetApiVersionQuery - implements CopyWith$Query$GetApiVersionQuery { - _CopyWithStubImpl$Query$GetApiVersionQuery(this._res); - - TRes _res; - - call({Query$GetApiVersionQuery$api? api, String? $__typename}) => _res; - CopyWith$Query$GetApiVersionQuery$api get api => - CopyWith$Query$GetApiVersionQuery$api.stub(_res); -} - -const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ - OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetApiVersionQuery'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'api'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'version'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), -]); -Query$GetApiVersionQuery _parserFn$Query$GetApiVersionQuery( - Map data) => - Query$GetApiVersionQuery.fromJson(data); - -class Options$Query$GetApiVersionQuery - extends graphql.QueryOptions { - Options$Query$GetApiVersionQuery( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetApiVersionQuery, - parserFn: _parserFn$Query$GetApiVersionQuery); -} - -class WatchOptions$Query$GetApiVersionQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiVersionQuery( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetApiVersionQuery, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiVersionQuery); -} - -class FetchMoreOptions$Query$GetApiVersionQuery - extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetApiVersionQuery( - {required graphql.UpdateQuery updateQuery}) - : super( - updateQuery: updateQuery, - document: documentNodeQueryGetApiVersionQuery); -} - -extension ClientExtension$Query$GetApiVersionQuery on graphql.GraphQLClient { - Future> - query$GetApiVersionQuery( - [Options$Query$GetApiVersionQuery? options]) async => - await this.query(options ?? Options$Query$GetApiVersionQuery()); - graphql.ObservableQuery - watchQuery$GetApiVersionQuery( - [WatchOptions$Query$GetApiVersionQuery? options]) => - this.watchQuery(options ?? WatchOptions$Query$GetApiVersionQuery()); - void writeQuery$GetApiVersionQuery( - {required Query$GetApiVersionQuery data, bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiVersionQuery)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiVersionQuery? readQuery$GetApiVersionQuery( - {bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiVersionQuery)), - optimistic: optimistic); - return result == null ? null : Query$GetApiVersionQuery.fromJson(result); - } -} - -@JsonSerializable(explicitToJson: true) -class Query$GetApiVersionQuery$api { - Query$GetApiVersionQuery$api( - {required this.version, required this.$__typename}); - - @override - factory Query$GetApiVersionQuery$api.fromJson(Map json) => - _$Query$GetApiVersionQuery$apiFromJson(json); - - final String version; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$GetApiVersionQuery$apiToJson(this); - int get hashCode { - final l$version = version; - final l$$__typename = $__typename; - return Object.hashAll([l$version, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiVersionQuery$api) || - runtimeType != other.runtimeType) return false; - final l$version = version; - final lOther$version = other.version; - if (l$version != lOther$version) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetApiVersionQuery$api - on Query$GetApiVersionQuery$api { - CopyWith$Query$GetApiVersionQuery$api - get copyWith => CopyWith$Query$GetApiVersionQuery$api(this, (i) => i); -} - -abstract class CopyWith$Query$GetApiVersionQuery$api { - factory CopyWith$Query$GetApiVersionQuery$api( - Query$GetApiVersionQuery$api instance, - TRes Function(Query$GetApiVersionQuery$api) then) = - _CopyWithImpl$Query$GetApiVersionQuery$api; - - factory CopyWith$Query$GetApiVersionQuery$api.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiVersionQuery$api; - - TRes call({String? version, String? $__typename}); -} - -class _CopyWithImpl$Query$GetApiVersionQuery$api - implements CopyWith$Query$GetApiVersionQuery$api { - _CopyWithImpl$Query$GetApiVersionQuery$api(this._instance, this._then); - - final Query$GetApiVersionQuery$api _instance; - - final TRes Function(Query$GetApiVersionQuery$api) _then; - - static const _undefined = {}; - - TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiVersionQuery$api( - version: version == _undefined || version == null - ? _instance.version - : (version as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$GetApiVersionQuery$api - implements CopyWith$Query$GetApiVersionQuery$api { - _CopyWithStubImpl$Query$GetApiVersionQuery$api(this._res); - - TRes _res; - - call({String? version, String? $__typename}) => _res; -} diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart deleted file mode 100644 index 0c051786..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_version.graphql.g.dart +++ /dev/null @@ -1,36 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_api_version.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Query$GetApiVersionQuery _$Query$GetApiVersionQueryFromJson( - Map json) => - Query$GetApiVersionQuery( - api: Query$GetApiVersionQuery$api.fromJson( - json['api'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiVersionQueryToJson( - Query$GetApiVersionQuery instance) => - { - 'api': instance.api.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetApiVersionQuery$api _$Query$GetApiVersionQuery$apiFromJson( - Map json) => - Query$GetApiVersionQuery$api( - version: json['version'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiVersionQuery$apiToJson( - Query$GetApiVersionQuery$api instance) => - { - 'version': instance.version, - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql deleted file mode 100644 index 2a566271..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql +++ /dev/null @@ -1,11 +0,0 @@ -query GetServerDiskVolumesQuery { - storage { - volumes { - freeSpace - name - root - totalSpace - usedSpace - } - } -} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart deleted file mode 100644 index 007adc55..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart +++ /dev/null @@ -1,542 +0,0 @@ -import 'package:gql/ast.dart'; -import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; -part 'get_server_disk_volumes.graphql.g.dart'; - -@JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery { - Query$GetServerDiskVolumesQuery( - {required this.storage, required this.$__typename}); - - @override - factory Query$GetServerDiskVolumesQuery.fromJson(Map json) => - _$Query$GetServerDiskVolumesQueryFromJson(json); - - final Query$GetServerDiskVolumesQuery$storage storage; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Query$GetServerDiskVolumesQueryToJson(this); - int get hashCode { - final l$storage = storage; - final l$$__typename = $__typename; - return Object.hashAll([l$storage, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery) || - runtimeType != other.runtimeType) return false; - final l$storage = storage; - final lOther$storage = other.storage; - if (l$storage != lOther$storage) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetServerDiskVolumesQuery - on Query$GetServerDiskVolumesQuery { - CopyWith$Query$GetServerDiskVolumesQuery - get copyWith => CopyWith$Query$GetServerDiskVolumesQuery(this, (i) => i); -} - -abstract class CopyWith$Query$GetServerDiskVolumesQuery { - factory CopyWith$Query$GetServerDiskVolumesQuery( - Query$GetServerDiskVolumesQuery instance, - TRes Function(Query$GetServerDiskVolumesQuery) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery; - - factory CopyWith$Query$GetServerDiskVolumesQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery; - - TRes call( - {Query$GetServerDiskVolumesQuery$storage? storage, String? $__typename}); - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage; -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery - implements CopyWith$Query$GetServerDiskVolumesQuery { - _CopyWithImpl$Query$GetServerDiskVolumesQuery(this._instance, this._then); - - final Query$GetServerDiskVolumesQuery _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery) _then; - - static const _undefined = {}; - - TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery( - storage: storage == _undefined || storage == null - ? _instance.storage - : (storage as Query$GetServerDiskVolumesQuery$storage), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage { - final local$storage = _instance.storage; - return CopyWith$Query$GetServerDiskVolumesQuery$storage( - local$storage, (e) => call(storage: e)); - } -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery - implements CopyWith$Query$GetServerDiskVolumesQuery { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery(this._res); - - TRes _res; - - call( - {Query$GetServerDiskVolumesQuery$storage? storage, - String? $__typename}) => - _res; - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage => - CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(_res); -} - -const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ - OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetServerDiskVolumesQuery'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'storage'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'volumes'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'freeSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'root'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'totalSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'usedSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), -]); -Query$GetServerDiskVolumesQuery _parserFn$Query$GetServerDiskVolumesQuery( - Map data) => - Query$GetServerDiskVolumesQuery.fromJson(data); - -class Options$Query$GetServerDiskVolumesQuery - extends graphql.QueryOptions { - Options$Query$GetServerDiskVolumesQuery( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetServerDiskVolumesQuery, - parserFn: _parserFn$Query$GetServerDiskVolumesQuery); -} - -class WatchOptions$Query$GetServerDiskVolumesQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetServerDiskVolumesQuery( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetServerDiskVolumesQuery, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetServerDiskVolumesQuery); -} - -class FetchMoreOptions$Query$GetServerDiskVolumesQuery - extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetServerDiskVolumesQuery( - {required graphql.UpdateQuery updateQuery}) - : super( - updateQuery: updateQuery, - document: documentNodeQueryGetServerDiskVolumesQuery); -} - -extension ClientExtension$Query$GetServerDiskVolumesQuery - on graphql.GraphQLClient { - Future> - query$GetServerDiskVolumesQuery( - [Options$Query$GetServerDiskVolumesQuery? options]) async => - await this - .query(options ?? Options$Query$GetServerDiskVolumesQuery()); - graphql.ObservableQuery - watchQuery$GetServerDiskVolumesQuery( - [WatchOptions$Query$GetServerDiskVolumesQuery? options]) => - this.watchQuery( - options ?? WatchOptions$Query$GetServerDiskVolumesQuery()); - void writeQuery$GetServerDiskVolumesQuery( - {required Query$GetServerDiskVolumesQuery data, - bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumesQuery)), - data: data.toJson(), - broadcast: broadcast); - Query$GetServerDiskVolumesQuery? readQuery$GetServerDiskVolumesQuery( - {bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumesQuery)), - optimistic: optimistic); - return result == null - ? null - : Query$GetServerDiskVolumesQuery.fromJson(result); - } -} - -@JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery$storage { - Query$GetServerDiskVolumesQuery$storage( - {required this.volumes, required this.$__typename}); - - @override - factory Query$GetServerDiskVolumesQuery$storage.fromJson( - Map json) => - _$Query$GetServerDiskVolumesQuery$storageFromJson(json); - - final List volumes; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Query$GetServerDiskVolumesQuery$storageToJson(this); - int get hashCode { - final l$volumes = volumes; - final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$volumes.map((v) => v)), l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery$storage) || - runtimeType != other.runtimeType) return false; - final l$volumes = volumes; - final lOther$volumes = other.volumes; - if (l$volumes.length != lOther$volumes.length) return false; - for (int i = 0; i < l$volumes.length; i++) { - final l$volumes$entry = l$volumes[i]; - final lOther$volumes$entry = lOther$volumes[i]; - if (l$volumes$entry != lOther$volumes$entry) return false; - } - - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage - on Query$GetServerDiskVolumesQuery$storage { - CopyWith$Query$GetServerDiskVolumesQuery$storage< - Query$GetServerDiskVolumesQuery$storage> - get copyWith => - CopyWith$Query$GetServerDiskVolumesQuery$storage(this, (i) => i); -} - -abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage { - factory CopyWith$Query$GetServerDiskVolumesQuery$storage( - Query$GetServerDiskVolumesQuery$storage instance, - TRes Function(Query$GetServerDiskVolumesQuery$storage) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage; - - factory CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage; - - TRes call( - {List? volumes, - String? $__typename}); - TRes volumes( - Iterable Function( - Iterable< - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes>>) - _fn); -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage - implements CopyWith$Query$GetServerDiskVolumesQuery$storage { - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage( - this._instance, this._then); - - final Query$GetServerDiskVolumesQuery$storage _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery$storage) _then; - - static const _undefined = {}; - - TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery$storage( - volumes: volumes == _undefined || volumes == null - ? _instance.volumes - : (volumes - as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - TRes volumes( - Iterable Function( - Iterable< - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes>>) - _fn) => - call( - volumes: _fn(_instance.volumes.map((e) => - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - e, (i) => i))).toList()); -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage - implements CopyWith$Query$GetServerDiskVolumesQuery$storage { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage(this._res); - - TRes _res; - - call( - {List? volumes, - String? $__typename}) => - _res; - volumes(_fn) => _res; -} - -@JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery$storage$volumes { - Query$GetServerDiskVolumesQuery$storage$volumes( - {required this.freeSpace, - required this.name, - required this.root, - required this.totalSpace, - required this.usedSpace, - required this.$__typename}); - - @override - factory Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( - Map json) => - _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson(json); - - final String freeSpace; - - final String name; - - final bool root; - - final String totalSpace; - - final String usedSpace; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Query$GetServerDiskVolumesQuery$storage$volumesToJson(this); - int get hashCode { - final l$freeSpace = freeSpace; - final l$name = name; - final l$root = root; - final l$totalSpace = totalSpace; - final l$usedSpace = usedSpace; - final l$$__typename = $__typename; - return Object.hashAll([ - l$freeSpace, - l$name, - l$root, - l$totalSpace, - l$usedSpace, - l$$__typename - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery$storage$volumes) || - runtimeType != other.runtimeType) return false; - final l$freeSpace = freeSpace; - final lOther$freeSpace = other.freeSpace; - if (l$freeSpace != lOther$freeSpace) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - final l$root = root; - final lOther$root = other.root; - if (l$root != lOther$root) return false; - final l$totalSpace = totalSpace; - final lOther$totalSpace = other.totalSpace; - if (l$totalSpace != lOther$totalSpace) return false; - final l$usedSpace = usedSpace; - final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage$volumes - on Query$GetServerDiskVolumesQuery$storage$volumes { - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes> - get copyWith => CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - this, (i) => i); -} - -abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - Query$GetServerDiskVolumesQuery$storage$volumes instance, - TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes; - - factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes.stub( - TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes; - - TRes call( - {String? freeSpace, - String? name, - bool? root, - String? totalSpace, - String? usedSpace, - String? $__typename}); -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes - implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes( - this._instance, this._then); - - final Query$GetServerDiskVolumesQuery$storage$volumes _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) _then; - - static const _undefined = {}; - - TRes call( - {Object? freeSpace = _undefined, - Object? name = _undefined, - Object? root = _undefined, - Object? totalSpace = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery$storage$volumes( - freeSpace: freeSpace == _undefined || freeSpace == null - ? _instance.freeSpace - : (freeSpace as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - root: root == _undefined || root == null - ? _instance.root - : (root as bool), - totalSpace: totalSpace == _undefined || totalSpace == null - ? _instance.totalSpace - : (totalSpace as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes - implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes(this._res); - - TRes _res; - - call( - {String? freeSpace, - String? name, - bool? root, - String? totalSpace, - String? usedSpace, - String? $__typename}) => - _res; -} diff --git a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart deleted file mode 100644 index ecbd5a02..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.g.dart +++ /dev/null @@ -1,64 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_server_disk_volumes.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Query$GetServerDiskVolumesQuery _$Query$GetServerDiskVolumesQueryFromJson( - Map json) => - Query$GetServerDiskVolumesQuery( - storage: Query$GetServerDiskVolumesQuery$storage.fromJson( - json['storage'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumesQueryToJson( - Query$GetServerDiskVolumesQuery instance) => - { - 'storage': instance.storage.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumesQuery$storage - _$Query$GetServerDiskVolumesQuery$storageFromJson( - Map json) => - Query$GetServerDiskVolumesQuery$storage( - volumes: (json['volumes'] as List) - .map((e) => - Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumesQuery$storageToJson( - Query$GetServerDiskVolumesQuery$storage instance) => - { - 'volumes': instance.volumes.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumesQuery$storage$volumes - _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson( - Map json) => - Query$GetServerDiskVolumesQuery$storage$volumes( - freeSpace: json['freeSpace'] as String, - name: json['name'] as String, - root: json['root'] as bool, - totalSpace: json['totalSpace'] as String, - usedSpace: json['usedSpace'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumesQuery$storage$volumesToJson( - Query$GetServerDiskVolumesQuery$storage$volumes instance) => - { - 'freeSpace': instance.freeSpace, - 'name': instance.name, - 'root': instance.root, - 'totalSpace': instance.totalSpace, - 'usedSpace': instance.usedSpace, - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 3ad04e3f..81ab4bc5 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -7,18 +7,21 @@ type Alert { timestamp: DateTime } -type Storage { - volumes: [StorageVolume!]! -} - type StorageVolume { freeSpace: String! + model: String! name: String! root: Boolean! + serial: String! totalSpace: String! + type: String! usedSpace: String! } +type Storage { + volumes: [StorageVolume!]! +} + type Api { version: String! devices: [ApiDevice!]! @@ -84,6 +87,9 @@ type Mutation { getNewDeviceApiKey: ApiKeyMutationReturn! invalidateNewDeviceApiKey: GenericMutationReturn! authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! + resizeVolume(name: String!): GenericMutationReturn! + unmountVolume(name: String!): GenericMutationReturn! + mountVolume(name: String!): GenericMutationReturn! } interface MutationReturnInterface { @@ -161,4 +167,4 @@ input UseNewDeviceKeyInput { input UseRecoveryKeyInput { key: String! deviceName: String! -} +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/server.dart b/lib/logic/api_maps/graphql_maps/schema/server.dart index ab4fe197..4b419a15 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server.dart @@ -1,9 +1,8 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_api_version.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/get_server_disk_volumes.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; @@ -12,7 +11,7 @@ class ServerApi extends ApiMap { ServerApi({ this.hasLogger = false, this.isWithToken = true, - this.authToken = '', + this.customToken = '', }) { final ServerDomain? serverDomain = getIt().serverDomain; rootAddress = serverDomain?.domainName ?? ''; @@ -22,7 +21,7 @@ class ServerApi extends ApiMap { @override bool isWithToken; @override - String authToken; + String customToken; @override String? rootAddress; @@ -73,4 +72,43 @@ class ServerApi extends ApiMap { return volumes; } + + Future mountVolume(final String volumeName) async { + try { + final GraphQLClient client = await getClient(); + final variables = + Variables$Mutation$MountVolumeMutation(name: volumeName); + final mountVolumeMutation = + Options$Mutation$MountVolumeMutation(variables: variables); + await client.mutate$MountVolumeMutation(mountVolumeMutation); + } catch (e) { + print(e); + } + } + + Future unmountVolume(final String volumeName) async { + try { + final GraphQLClient client = await getClient(); + final variables = + Variables$Mutation$UnmountVolumeMutation(name: volumeName); + final unmountVolumeMutation = + Options$Mutation$UnmountVolumeMutation(variables: variables); + await client.mutate$UnmountVolumeMutation(unmountVolumeMutation); + } catch (e) { + print(e); + } + } + + Future resizeVolume(final String volumeName) async { + try { + final GraphQLClient client = await getClient(); + final variables = + Variables$Mutation$ResizeVolumeMutation(name: volumeName); + final resizeVolumeMutation = + Options$Mutation$ResizeVolumeMutation(variables: variables); + await client.mutate$ResizeVolumeMutation(resizeVolumeMutation); + } catch (e) { + print(e); + } + } } diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql similarity index 65% rename from lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql rename to lib/logic/api_maps/graphql_maps/schema/server_api.graphql index df9569c0..f88b3346 100644 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -6,4 +6,10 @@ query GetApiTokensQuery { name } } +} + +query GetApiVersionQuery { + api { + version + } } \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart similarity index 61% rename from lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart rename to lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 763ffcc4..2394d113 100644 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -2,7 +2,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; -part 'get_api_tokens.graphql.g.dart'; +part 'server_api.graphql.g.dart'; @JsonSerializable(explicitToJson: true) class Query$GetApiTokensQuery { @@ -472,3 +472,300 @@ class _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices String? $__typename}) => _res; } + +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersionQuery { + Query$GetApiVersionQuery({required this.api, required this.$__typename}); + + @override + factory Query$GetApiVersionQuery.fromJson(Map json) => + _$Query$GetApiVersionQueryFromJson(json); + + final Query$GetApiVersionQuery$api api; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersionQueryToJson(this); + int get hashCode { + final l$api = api; + final l$$__typename = $__typename; + return Object.hashAll([l$api, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiVersionQuery) || + runtimeType != other.runtimeType) return false; + final l$api = api; + final lOther$api = other.api; + if (l$api != lOther$api) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiVersionQuery + on Query$GetApiVersionQuery { + CopyWith$Query$GetApiVersionQuery get copyWith => + CopyWith$Query$GetApiVersionQuery(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiVersionQuery { + factory CopyWith$Query$GetApiVersionQuery(Query$GetApiVersionQuery instance, + TRes Function(Query$GetApiVersionQuery) then) = + _CopyWithImpl$Query$GetApiVersionQuery; + + factory CopyWith$Query$GetApiVersionQuery.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiVersionQuery; + + TRes call({Query$GetApiVersionQuery$api? api, String? $__typename}); + CopyWith$Query$GetApiVersionQuery$api get api; +} + +class _CopyWithImpl$Query$GetApiVersionQuery + implements CopyWith$Query$GetApiVersionQuery { + _CopyWithImpl$Query$GetApiVersionQuery(this._instance, this._then); + + final Query$GetApiVersionQuery _instance; + + final TRes Function(Query$GetApiVersionQuery) _then; + + static const _undefined = {}; + + TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiVersionQuery( + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiVersionQuery$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetApiVersionQuery$api get api { + final local$api = _instance.api; + return CopyWith$Query$GetApiVersionQuery$api( + local$api, (e) => call(api: e)); + } +} + +class _CopyWithStubImpl$Query$GetApiVersionQuery + implements CopyWith$Query$GetApiVersionQuery { + _CopyWithStubImpl$Query$GetApiVersionQuery(this._res); + + TRes _res; + + call({Query$GetApiVersionQuery$api? api, String? $__typename}) => _res; + CopyWith$Query$GetApiVersionQuery$api get api => + CopyWith$Query$GetApiVersionQuery$api.stub(_res); +} + +const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetApiVersionQuery'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'version'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetApiVersionQuery _parserFn$Query$GetApiVersionQuery( + Map data) => + Query$GetApiVersionQuery.fromJson(data); + +class Options$Query$GetApiVersionQuery + extends graphql.QueryOptions { + Options$Query$GetApiVersionQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiVersionQuery, + parserFn: _parserFn$Query$GetApiVersionQuery); +} + +class WatchOptions$Query$GetApiVersionQuery + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiVersionQuery( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiVersionQuery, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiVersionQuery); +} + +class FetchMoreOptions$Query$GetApiVersionQuery + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiVersionQuery( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryGetApiVersionQuery); +} + +extension ClientExtension$Query$GetApiVersionQuery on graphql.GraphQLClient { + Future> + query$GetApiVersionQuery( + [Options$Query$GetApiVersionQuery? options]) async => + await this.query(options ?? Options$Query$GetApiVersionQuery()); + graphql.ObservableQuery + watchQuery$GetApiVersionQuery( + [WatchOptions$Query$GetApiVersionQuery? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiVersionQuery()); + void writeQuery$GetApiVersionQuery( + {required Query$GetApiVersionQuery data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetApiVersionQuery)), + data: data.toJson(), + broadcast: broadcast); + Query$GetApiVersionQuery? readQuery$GetApiVersionQuery( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetApiVersionQuery)), + optimistic: optimistic); + return result == null ? null : Query$GetApiVersionQuery.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersionQuery$api { + Query$GetApiVersionQuery$api( + {required this.version, required this.$__typename}); + + @override + factory Query$GetApiVersionQuery$api.fromJson(Map json) => + _$Query$GetApiVersionQuery$apiFromJson(json); + + final String version; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersionQuery$apiToJson(this); + int get hashCode { + final l$version = version; + final l$$__typename = $__typename; + return Object.hashAll([l$version, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiVersionQuery$api) || + runtimeType != other.runtimeType) return false; + final l$version = version; + final lOther$version = other.version; + if (l$version != lOther$version) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiVersionQuery$api + on Query$GetApiVersionQuery$api { + CopyWith$Query$GetApiVersionQuery$api + get copyWith => CopyWith$Query$GetApiVersionQuery$api(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiVersionQuery$api { + factory CopyWith$Query$GetApiVersionQuery$api( + Query$GetApiVersionQuery$api instance, + TRes Function(Query$GetApiVersionQuery$api) then) = + _CopyWithImpl$Query$GetApiVersionQuery$api; + + factory CopyWith$Query$GetApiVersionQuery$api.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiVersionQuery$api; + + TRes call({String? version, String? $__typename}); +} + +class _CopyWithImpl$Query$GetApiVersionQuery$api + implements CopyWith$Query$GetApiVersionQuery$api { + _CopyWithImpl$Query$GetApiVersionQuery$api(this._instance, this._then); + + final Query$GetApiVersionQuery$api _instance; + + final TRes Function(Query$GetApiVersionQuery$api) _then; + + static const _undefined = {}; + + TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiVersionQuery$api( + version: version == _undefined || version == null + ? _instance.version + : (version as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetApiVersionQuery$api + implements CopyWith$Query$GetApiVersionQuery$api { + _CopyWithStubImpl$Query$GetApiVersionQuery$api(this._res); + + TRes _res; + + call({String? version, String? $__typename}) => _res; +} diff --git a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart similarity index 67% rename from lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart rename to lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart index bb5e5bae..dcb8ba01 100644 --- a/lib/logic/api_maps/graphql_maps/schema/get_api_tokens.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'get_api_tokens.graphql.dart'; +part of 'server_api.graphql.dart'; // ************************************************************************** // JsonSerializableGenerator @@ -55,3 +55,32 @@ Map _$Query$GetApiTokensQuery$api$devicesToJson( 'name': instance.name, '__typename': instance.$__typename, }; + +Query$GetApiVersionQuery _$Query$GetApiVersionQueryFromJson( + Map json) => + Query$GetApiVersionQuery( + api: Query$GetApiVersionQuery$api.fromJson( + json['api'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiVersionQueryToJson( + Query$GetApiVersionQuery instance) => + { + 'api': instance.api.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetApiVersionQuery$api _$Query$GetApiVersionQuery$apiFromJson( + Map json) => + Query$GetApiVersionQuery$api( + version: json['version'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiVersionQuery$apiToJson( + Query$GetApiVersionQuery$api instance) => + { + 'version': instance.version, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index fa75db17..c944efe6 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -96,11 +96,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final dbSize = dbCreateResponse.data['volume']['size']; final dbServer = dbCreateResponse.data['volume']['server']; final dbName = dbCreateResponse.data['volume']['name']; + final dbDevice = dbCreateResponse.data['volume']['linux_device']; volume = ServerVolume( id: dbId, name: dbName, sizeByte: dbSize, serverId: dbServer, + linuxDevice: dbDevice, ); } catch (e) { print(e); @@ -130,11 +132,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final int dbSize = rawVolume['size']; final dbServer = rawVolume['server']; final String dbName = rawVolume['name']; + final dbDevice = rawVolume['linux_device']; final volume = ServerVolume( id: dbId, name: dbName, sizeByte: dbSize, serverId: dbServer, + linuxDevice: dbDevice, ); volumes.add(volume); } @@ -159,11 +163,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final int dbSize = dbGetResponse.data['volume']['size']; final int dbServer = dbGetResponse.data['volume']['server']; final String dbName = dbGetResponse.data['volume']['name']; + final dbDevice = dbGetResponse.data['volume']['linux_device']; volume = ServerVolume( id: dbId, name: dbName, sizeByte: dbSize, serverId: dbServer, + linuxDevice: dbDevice, ); } catch (e) { print(e); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 4ed0d382..c17c1ff2 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -541,6 +541,7 @@ class ServerInstallationCubit extends Cubit { name: 'recovered_volume', sizeByte: 0, serverId: server.id, + linuxDevice: '', ), apiToken: dataState.serverDetails!.apiToken, provider: ServerProvider.hetzner, @@ -556,8 +557,7 @@ class ServerInstallationCubit extends Cubit { } Future> getServerDiskVolumes() async => - ServerApi(authToken: 'HARDCODE OUR BEARER HERE FOR NOW') - .getServerDiskVolumes(); + ServerApi().getServerDiskVolumes(); Future setAndValidateCloudflareToken(final String token) async { final ServerInstallationRecovery dataState = diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 1c94a2d0..f09599eb 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -475,6 +475,7 @@ class ServerInstallationRepository { name: '', sizeByte: 0, serverId: 0, + linuxDevice: '', ), provider: ServerProvider.unknown, id: 0, @@ -511,6 +512,7 @@ class ServerInstallationRepository { name: '', sizeByte: 0, serverId: 0, + linuxDevice: '', ), provider: ServerProvider.unknown, id: 0, @@ -547,6 +549,7 @@ class ServerInstallationRepository { name: '', serverId: 0, sizeByte: 0, + linuxDevice: '', ), provider: ServerProvider.unknown, id: 0, @@ -574,6 +577,7 @@ class ServerInstallationRepository { name: '', sizeByte: 0, serverId: 0, + linuxDevice: '', ), provider: ServerProvider.unknown, id: 0, diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart index 2645e502..4e494f3a 100644 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -1,9 +1,11 @@ import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; part 'volumes_state.dart'; @@ -18,18 +20,18 @@ class ApiVolumesCubit ); @override - void load() async { + Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { _refetch(); } } - void refresh() async { + Future refresh() async { emit(const ApiVolumesState([], LoadingStatus.refreshing)); _refetch(); } - void _refetch() async { + Future _refetch() async { final List volumes = await providerApi.getVolumeProvider().getVolumes(); if (volumes.isNotEmpty) { @@ -39,31 +41,51 @@ class ApiVolumesCubit } } - void attachVolume(final ServerVolume volume) async { + Future attachVolume(final ServerVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; await providerApi.getVolumeProvider().attachVolume(volume.id, server.id); refresh(); } - void detachVolume(final ServerVolume volume) async { + Future detachVolume(final ServerVolume volume) async { await providerApi.getVolumeProvider().detachVolume(volume.id); refresh(); } - void resizeVolume(final ServerVolume volume, final int newSizeGb) async { - //if (volume.sizeByte < newSizeGb) { - await providerApi.getVolumeProvider().resizeVolume(volume.id, newSizeGb); + Future resizeVolume( + final ServerDiskVolume volume, + final int newSizeGb, + ) async { + final ServerVolume? providerVolume = await fetchProdiverVolume(volume); + final bool resized = await providerApi.getVolumeProvider().resizeVolume( + providerVolume!.id, + newSizeGb, + ); + + if (!resized) { + return false; + } + + await ServerApi().resizeVolume(volume.name); refresh(); - //} + return true; } - void createVolume() async { - await providerApi.getVolumeProvider().createVolume(); + Future createVolume() async { + final ServerVolume? volume = + await providerApi.getVolumeProvider().createVolume(); + await attachVolume(volume!); + + await Future.delayed(const Duration(seconds: 10)); + + final ServerDiskVolume? diskVolume = await fetchServerDiskVolume(volume); + await ServerApi().mountVolume(diskVolume!.name); refresh(); } - void deleteVolume(final ServerVolume volume) async { - await providerApi.getVolumeProvider().deleteVolume(volume.id); + Future deleteVolume(final ServerDiskVolume volume) async { + final ServerVolume? providerVolume = await fetchProdiverVolume(volume); + await providerApi.getVolumeProvider().deleteVolume(providerVolume!.id); refresh(); } @@ -71,4 +93,54 @@ class ApiVolumesCubit void clear() { emit(const ApiVolumesState.initial()); } + + Future fetchProdiverVolume( + final ServerDiskVolume volume, + ) async { + ServerVolume? fetchedVolume; + final List volumes = + await providerApi.getVolumeProvider().getVolumes(); + + for (final ServerVolume providerVolume in volumes) { + if (providerVolume.linuxDevice == null) { + continue; + } + + final String deviceId = providerVolume.linuxDevice!.split('/').last; + if (deviceId.contains(volume.model!) && + deviceId.contains(volume.serial!)) { + fetchedVolume = providerVolume; + break; + } + } + + return fetchedVolume; + } + + Future fetchServerDiskVolume( + final ServerVolume volume, + ) async { + ServerDiskVolume? fetchedVolume; + if (volume.linuxDevice == null) { + return fetchedVolume; + } + + final List volumes = + await ServerApi().getServerDiskVolumes(); + + for (final ServerDiskVolume serverDiskVolumes in volumes) { + if (serverDiskVolumes.model == null || serverDiskVolumes.serial == null) { + continue; + } + + final String deviceId = volume.linuxDevice!.split('/').last; + if (deviceId.contains(serverDiskVolumes.model!) && + deviceId.contains(serverDiskVolumes.serial!)) { + fetchedVolume = serverDiskVolumes; + break; + } + } + + return fetchedVolume; + } } diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index 44c8d5b3..3791c664 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -57,6 +57,7 @@ class ServerVolume { required this.name, required this.sizeByte, required this.serverId, + required this.linuxDevice, }); @HiveField(1) @@ -67,6 +68,8 @@ class ServerVolume { int sizeByte; @HiveField(4, defaultValue: null) int? serverId; + @HiveField(5, defaultValue: null) + String? linuxDevice; } @HiveType(typeId: 101) diff --git a/lib/logic/models/hive/server_details.g.dart b/lib/logic/models/hive/server_details.g.dart index d4ea9b01..29716607 100644 --- a/lib/logic/models/hive/server_details.g.dart +++ b/lib/logic/models/hive/server_details.g.dart @@ -75,13 +75,14 @@ class ServerVolumeAdapter extends TypeAdapter { name: fields[2] as String, sizeByte: fields[3] == null ? 10737418240 : fields[3] as int, serverId: fields[4] as int?, + linuxDevice: fields[5] as String?, ); } @override void write(BinaryWriter writer, ServerVolume obj) { writer - ..writeByte(4) + ..writeByte(5) ..writeByte(1) ..write(obj.id) ..writeByte(2) @@ -89,7 +90,9 @@ class ServerVolumeAdapter extends TypeAdapter { ..writeByte(3) ..write(obj.sizeByte) ..writeByte(4) - ..write(obj.serverId); + ..write(obj.serverId) + ..writeByte(5) + ..write(obj.linuxDevice); } @override diff --git a/lib/logic/models/json/server_disk_volume.dart b/lib/logic/models/json/server_disk_volume.dart index b7d4bfca..873b5d97 100644 --- a/lib/logic/models/json/server_disk_volume.dart +++ b/lib/logic/models/json/server_disk_volume.dart @@ -8,15 +8,21 @@ class ServerDiskVolume { _$ServerDiskVolumeFromJson(json); ServerDiskVolume({ required this.freeSpace, + required this.model, required this.name, required this.root, + required this.serial, required this.totalSpace, + required this.type, required this.usedSpace, }); final String freeSpace; + final String? model; final String name; final bool root; + final String? serial; final String totalSpace; + final String type; final String usedSpace; } diff --git a/lib/logic/models/json/server_disk_volume.g.dart b/lib/logic/models/json/server_disk_volume.g.dart index 95f5788b..81a9d86e 100644 --- a/lib/logic/models/json/server_disk_volume.g.dart +++ b/lib/logic/models/json/server_disk_volume.g.dart @@ -9,17 +9,23 @@ part of 'server_disk_volume.dart'; ServerDiskVolume _$ServerDiskVolumeFromJson(Map json) => ServerDiskVolume( freeSpace: json['freeSpace'] as String, + model: json['model'] as String?, name: json['name'] as String, root: json['root'] as bool, + serial: json['serial'] as String?, totalSpace: json['totalSpace'] as String, + type: json['type'] as String, usedSpace: json['usedSpace'] as String, ); Map _$ServerDiskVolumeToJson(ServerDiskVolume instance) => { 'freeSpace': instance.freeSpace, + 'model': instance.model, 'name': instance.name, 'root': instance.root, + 'serial': instance.serial, 'totalSpace': instance.totalSpace, + 'type': instance.type, 'usedSpace': instance.usedSpace, }; diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 36903d1f..fa231c45 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -122,9 +122,6 @@ class _Card extends StatelessWidget { final ServerInstallationState appConfig = context.watch().state; - final String domainName = - appConfig.isDomainFilled ? appConfig.serverDomain!.domainName : ''; - switch (provider.type) { case ProviderType.server: title = 'providers.server.card_title'.tr(); @@ -140,7 +137,8 @@ class _Card extends StatelessWidget { break; case ProviderType.domain: title = 'providers.domain.screen_title'.tr(); - message = domainName; + message = + appConfig.isDomainFilled ? appConfig.serverDomain!.domainName : ''; stableText = 'providers.domain.status'.tr(); onTap = () => Navigator.of(context).push( diff --git a/lib/ui/pages/providers/storage_card.dart b/lib/ui/pages/providers/storage_card.dart index 51c510e4..74e0770f 100644 --- a/lib/ui/pages/providers/storage_card.dart +++ b/lib/ui/pages/providers/storage_card.dart @@ -1,5 +1,3 @@ -import 'dart:ffi'; - import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; @@ -7,21 +5,9 @@ import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; - -class DiskVolume { - int gbUsed = 0; - int gbTotal = 0; - String name = ''; - bool root = false; - - /// from 0.0 to 1.0 - double percentage = 0.0; -} - -class DiskStatus { - bool isDiskOkay = false; - List diskVolumes = []; -} +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; class StorageCard extends StatelessWidget { const StorageCard({required this.volumes, final super.key}); @@ -29,9 +15,7 @@ class StorageCard extends StatelessWidget { final List volumes; @override - Widget build( - final BuildContext context, - ) { + Widget build(final BuildContext context) { final DiskStatus diskStatus = toDiskStatus(volumes); final List sections = []; @@ -41,7 +25,11 @@ class StorageCard extends StatelessWidget { ); sections.add( Text( - 'providers.storage.disk_usage'.tr(args: [volume.gbUsed.toString()]), + 'providers.storage.disk_usage'.tr( + args: [ + volume.gbUsed.toString(), + ], + ), style: Theme.of(context).textTheme.titleMedium, ), ); @@ -63,17 +51,25 @@ class StorageCard extends StatelessWidget { ); sections.add( Text( - 'providers.storage.disk_total'.tr(args: [ - volume.gbTotal.toString(), - volume.name, - ]), + 'providers.storage.disk_total'.tr( + args: [ + volume.gbTotal.toString(), + volume.name, + ], + ), style: Theme.of(context).textTheme.bodySmall, ), ); } return GestureDetector( - onTap: null, + onTap: () => Navigator.of(context).push( + materialRoute( + ServerStoragePage( + diskStatus: diskStatus, + ), + ), + ), child: BrandCards.big( child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart new file mode 100644 index 00000000..ec2d2872 --- /dev/null +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -0,0 +1,14 @@ +class DiskVolume { + int gbUsed = 0; + int gbTotal = 0; + String name = ''; + bool root = false; + + /// from 0.0 to 1.0 + double percentage = 0.0; +} + +class DiskStatus { + bool isDiskOkay = false; + List diskVolumes = []; +} diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart new file mode 100644 index 00000000..82d59c2c --- /dev/null +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -0,0 +1,96 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; + +class ServerStoragePage extends StatefulWidget { + const ServerStoragePage({required this.diskStatus, final super.key}); + + final DiskStatus diskStatus; + + @override + State createState() => _ServerStoragePageState(); +} + +class _ServerStoragePageState extends State { + @override + Widget build(final BuildContext context) { + final bool isReady = context.watch().state + is ServerInstallationFinished; + + if (!isReady) { + return BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.card_title'.tr(), + children: const [], + ); + } + + final List sections = []; + for (final DiskVolume volume in widget.diskStatus.diskVolumes) { + sections.add( + const SizedBox(height: 16), + ); + sections.add( + Text( + 'providers.storage.disk_usage'.tr( + args: [ + volume.gbUsed.toString(), + ], + ), + style: Theme.of(context).textTheme.titleMedium, + ), + ); + sections.add( + const SizedBox(height: 4), + ); + sections.add( + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + const Icon( + Icons.storage_outlined, + size: 24, + color: Colors.white, + ), + Expanded( + child: BrandLinearIndicator( + value: volume.percentage, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 14.0, + ), + ), + ], + ), + ); + sections.add( + const SizedBox(height: 4), + ); + sections.add( + Text( + 'providers.storage.disk_total'.tr( + args: [ + volume.gbTotal.toString(), + volume.name, + ], + ), + style: Theme.of(context).textTheme.bodySmall, + ), + ); + } + + return BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.card_title'.tr(), + children: [ + ...sections, + const SizedBox(height: 8), + ], + ); + } +} From c230037351b9390453dbfabb2f197476b44eb9fd Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 3 Aug 2022 05:25:33 +0300 Subject: [PATCH 019/732] Implement data_migration page and logic --- assets/translations/en.json | 10 +- .../server_providers/hetzner/hetzner.dart | 21 +++ .../server_providers/volume_provider.dart | 1 + lib/logic/cubit/volumes/volumes_cubit.dart | 3 + lib/ui/pages/recovery_key/recovery_key.dart | 3 +- .../pages/server_storage/data_migration.dart | 135 ++++++++++++++++ .../server_storage/extending_volume.dart | 145 ++++++++++++++++++ .../pages/server_storage/server_storage.dart | 115 +++++++++----- 8 files changed, 393 insertions(+), 40 deletions(-) create mode 100644 lib/ui/pages/server_storage/data_migration.dart create mode 100644 lib/ui/pages/server_storage/extending_volume.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 6c48f966..708da384 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -172,7 +172,15 @@ "disk_total": "{} GB total · {}", "gb": "{} GB", "mb": "{} MB", - "extend_volume_button": "Extend volume" + "extend_volume_button": "Extend volume", + "extending_volume_title": "Extending volume", + "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", + "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner.", + "size": "Size", + "euro": "Euro", + "data_migration_title": "Data migration", + "data_migration_notice": "During migration all services will be turned off.", + "start_migration_button": "Start migration" } }, "not_ready_card": { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index c944efe6..098db0f9 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -74,6 +74,27 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { RegExp getApiTokenValidation() => RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + @override + Future getPricePerGb() async { + double? price; + + final Response dbGetResponse; + final Dio client = await getClient(); + try { + dbGetResponse = await client.post('/pricing'); + + final volume = dbGetResponse.data['pricing']['volume']; + final volumePrice = volume['price_per_gb_month']['gross']; + price = volumePrice as double; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return price; + } + @override Future createVolume() async { ServerVolume? volume; diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart index 63a692dd..bdff72f2 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart @@ -9,4 +9,5 @@ mixin VolumeProviderApi on ApiMap { Future detachVolume(final int volumeId); Future resizeVolume(final int volumeId, final int sizeGb); Future deleteVolume(final int id); + Future getPricePerGb(); } diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart index 4e494f3a..c4f74df5 100644 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -26,6 +26,9 @@ class ApiVolumesCubit } } + Future getPricePerGb() async => + providerApi.getVolumeProvider().getPricePerGb(); + Future refresh() async { emit(const ApiVolumesState([], LoadingStatus.refreshing)); _refetch(); diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index 44147f57..ba3069ae 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -294,7 +294,6 @@ class _RecoveryKeyConfigurationState extends State { } _amountController.addListener(_updateErrorStatuses); - _expirationController.addListener(_updateErrorStatuses); return Column( @@ -321,6 +320,7 @@ class _RecoveryKeyConfigurationState extends State { children: [ const SizedBox(height: 8), TextField( + textInputAction: TextInputAction.next, enabled: _isAmountToggled, controller: _amountController, decoration: InputDecoration( @@ -360,6 +360,7 @@ class _RecoveryKeyConfigurationState extends State { children: [ const SizedBox(height: 8), TextField( + textInputAction: TextInputAction.next, enabled: _isExpirationToggled, controller: _expirationController, onTap: () { diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart new file mode 100644 index 00000000..8523ce1d --- /dev/null +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -0,0 +1,135 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; + +class ServerStoragePage extends StatefulWidget { + const ServerStoragePage({required this.diskStatus, final super.key}); + + final DiskStatus diskStatus; + + @override + State createState() => _ServerStoragePageState(); +} + +class _ServerStoragePageState extends State { + List _expandedSections = []; + + @override + Widget build(final BuildContext context) { + final bool isReady = context.watch().state + is ServerInstallationFinished; + + if (!isReady) { + return BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.card_title'.tr(), + children: const [], + ); + } + + /// The first section is expanded, the rest are hidden by default. + /// ( true, false, false, etc... ) + _expandedSections = [ + true, + ...List.filled( + widget.diskStatus.diskVolumes.length - 1, + false, + ), + ]; + + int sectionId = 0; + final List sections = []; + for (final DiskVolume volume in widget.diskStatus.diskVolumes) { + sections.add( + const SizedBox(height: 16), + ); + sections.add( + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const Icon( + Icons.storage_outlined, + size: 24, + color: Colors.white, + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + 'providers.storage.disk_usage'.tr( + args: [ + volume.gbUsed.toString(), + ], + ), + style: Theme.of(context).textTheme.titleMedium, + ), + Expanded( + child: BrandLinearIndicator( + value: volume.percentage, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: + Theme.of(context).colorScheme.surfaceVariant, + height: 14.0, + ), + ), + Text( + 'providers.storage.disk_total'.tr( + args: [ + volume.gbTotal.toString(), + volume.name, + ], + ), + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), + ), + ], + ), + ), + ); + sections.add( + AnimatedCrossFade( + duration: const Duration(milliseconds: 200), + crossFadeState: _expandedSections[sectionId] + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + firstChild: FilledButton( + title: 'providers.extend_volume_button.title'.tr(), + onPressed: () => Navigator.of(context).push( + materialRoute( + ExtendingVolumePage( + diskVolume: volume, + ), + ), + ), + ), + secondChild: Container(), + ), + ); + + ++sectionId; + } + + return BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.card_title'.tr(), + children: [ + ...sections, + const SizedBox(height: 8), + ], + ); + } +} diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart new file mode 100644 index 00000000..43ad38c2 --- /dev/null +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -0,0 +1,145 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; + +class ExtendingVolumePage extends StatefulWidget { + const ExtendingVolumePage({required this.diskVolume, final super.key}); + + final DiskVolume diskVolume; + + @override + State createState() => _ExtendingVolumePageState(); +} + +class _ExtendingVolumePageState extends State { + bool _isSizeError = false; + bool _isPriceError = false; + + double _currentSliderGbValue = 20.0; + double _euroPerGb = 1.0; + + final double maxGb = 500.0; + double minGb = 0.0; + + final TextEditingController _sizeController = TextEditingController(); + late final TextEditingController _priceController; + + void _updateByPrice() { + final double price = double.parse(_priceController.text); + _currentSliderGbValue = price / _euroPerGb; + _sizeController.text = _currentSliderGbValue.round.toString(); + + /// Now we need to convert size back to price to round + /// it properly and display it in text field as well, + /// because size in GB can ONLY(!) be discrete. + _updateBySize(); + } + + void _updateBySize() { + final double size = double.parse(_sizeController.text); + _priceController.text = (size * _euroPerGb).toString(); + _updateErrorStatuses(); + } + + void _updateErrorStatuses() { + final bool error = minGb > _currentSliderGbValue; + _isSizeError = error; + _isPriceError = error; + } + + @override + Widget build(final BuildContext context) => FutureBuilder( + future: context.read().getPricePerGb(), + builder: ( + final BuildContext context, + final AsyncSnapshot snapshot, + ) { + _euroPerGb = snapshot.data as double; + _sizeController.text = _currentSliderGbValue.toString(); + _priceController.text = + (_euroPerGb * double.parse(_sizeController.text)).toString(); + _sizeController.addListener(_updateBySize); + _priceController.addListener(_updateByPrice); + minGb = widget.diskVolume.gbTotal + 1 < maxGb + ? widget.diskVolume.gbTotal + 1 + : maxGb; + + return BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.extending_volume_title'.tr(), + heroSubtitle: 'providers.storage.extending_volume_description'.tr(), + children: [ + const SizedBox(height: 16), + Row( + children: [ + TextField( + textInputAction: TextInputAction.next, + enabled: true, + controller: _sizeController, + decoration: InputDecoration( + border: const OutlineInputBorder(), + errorText: _isSizeError ? ' ' : null, + labelText: 'providers.storage.size'.tr(), + ), + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], // Only numbers can be entered + ), + const SizedBox(height: 16), + TextField( + textInputAction: TextInputAction.next, + enabled: true, + controller: _priceController, + decoration: InputDecoration( + border: const OutlineInputBorder(), + errorText: _isPriceError ? ' ' : null, + labelText: 'providers.storage.euro'.tr(), + ), + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], // Only numbers can be entered + ), + ], + ), + const SizedBox(height: 16), + Slider( + min: minGb, + value: widget.diskVolume.gbTotal + 5 < maxGb + ? widget.diskVolume.gbTotal + 5 + : maxGb, + max: maxGb, + divisions: 1, + label: _currentSliderGbValue.round().toString(), + onChanged: (final double value) { + setState(() { + _currentSliderGbValue = value; + _updateErrorStatuses(); + }); + }, + ), + const SizedBox(height: 16), + FilledButton( + title: 'providers.extend_volume_button.title'.tr(), + onPressed: null, + ), + const SizedBox(height: 16), + const Divider( + height: 1.0, + ), + const SizedBox(height: 16), + const Icon(Icons.info_outlined, size: 24), + const SizedBox(height: 16), + Text('providers.storage.extending_volume_price_info'.tr()), + const SizedBox(height: 16), + ], + ); + }, + ); +} diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 82d59c2c..8523ce1d 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -1,9 +1,12 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ServerStoragePage extends StatefulWidget { const ServerStoragePage({required this.diskStatus, final super.key}); @@ -15,6 +18,8 @@ class ServerStoragePage extends StatefulWidget { } class _ServerStoragePageState extends State { + List _expandedSections = []; + @override Widget build(final BuildContext context) { final bool isReady = context.watch().state @@ -28,60 +33,94 @@ class _ServerStoragePageState extends State { ); } + /// The first section is expanded, the rest are hidden by default. + /// ( true, false, false, etc... ) + _expandedSections = [ + true, + ...List.filled( + widget.diskStatus.diskVolumes.length - 1, + false, + ), + ]; + + int sectionId = 0; final List sections = []; for (final DiskVolume volume in widget.diskStatus.diskVolumes) { sections.add( const SizedBox(height: 16), ); sections.add( - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.gbUsed.toString(), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const Icon( + Icons.storage_outlined, + size: 24, + color: Colors.white, + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + 'providers.storage.disk_usage'.tr( + args: [ + volume.gbUsed.toString(), + ], + ), + style: Theme.of(context).textTheme.titleMedium, + ), + Expanded( + child: BrandLinearIndicator( + value: volume.percentage, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: + Theme.of(context).colorScheme.surfaceVariant, + height: 14.0, + ), + ), + Text( + 'providers.storage.disk_total'.tr( + args: [ + volume.gbTotal.toString(), + volume.name, + ], + ), + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), + ), ], ), - style: Theme.of(context).textTheme.titleMedium, ), ); sections.add( - const SizedBox(height: 4), - ); - sections.add( - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - const Icon( - Icons.storage_outlined, - size: 24, - color: Colors.white, - ), - Expanded( - child: BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, + AnimatedCrossFade( + duration: const Duration(milliseconds: 200), + crossFadeState: _expandedSections[sectionId] + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + firstChild: FilledButton( + title: 'providers.extend_volume_button.title'.tr(), + onPressed: () => Navigator.of(context).push( + materialRoute( + ExtendingVolumePage( + diskVolume: volume, + ), ), ), - ], - ), - ); - sections.add( - const SizedBox(height: 4), - ); - sections.add( - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.gbTotal.toString(), - volume.name, - ], ), - style: Theme.of(context).textTheme.bodySmall, + secondChild: Container(), ), ); + + ++sectionId; } return BrandHeroScreen( From 7bbdaf2ebe25cc2763c54a953ef135cd540b6576 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 24 Aug 2022 08:35:49 +0300 Subject: [PATCH 020/732] Last changes on storage pages and job backend logic --- assets/translations/en.json | 13 +- assets/translations/ru.json | 4 +- lib/config/bloc_config.dart | 5 + lib/logic/api_maps/graphql_maps/api_map.dart | 33 +- .../graphql_maps/schema/disk_volumes.graphql | 59 +- .../schema/disk_volumes.graphql.dart | 2221 ++++---- .../schema/disk_volumes.graphql.g.dart | 345 +- .../graphql_maps/schema/schema.graphql | 295 +- .../graphql_maps/schema/schema.graphql.dart | 405 +- .../graphql_maps/schema/schema.graphql.g.dart | 76 + .../api_maps/graphql_maps/schema/server.dart | 153 +- .../graphql_maps/schema/server_api.graphql | 127 +- .../schema/server_api.graphql.dart | 4833 +++++++++++++++-- .../schema/server_api.graphql.g.dart | 727 ++- .../schema/server_settings.graphql | 54 + .../schema/server_settings.graphql.dart | 1707 ++++++ .../schema/server_settings.graphql.g.dart | 300 + .../graphql_maps/schema/services.graphql | 84 + .../graphql_maps/schema/services.graphql.dart | 2771 ++++++++++ .../schema/services.graphql.g.dart | 482 ++ .../graphql_maps/schema/users.graphql | 76 + .../graphql_maps/schema/users.graphql.dart | 2642 +++++++++ .../graphql_maps/schema/users.graphql.g.dart | 471 ++ lib/logic/api_maps/rest_maps/server.dart | 4 +- .../server_providers/hetzner/hetzner.dart | 4 +- lib/logic/cubit/jobs/jobs_cubit.dart | 80 +- lib/logic/cubit/jobs/jobs_state.dart | 26 +- .../server_installation_repository.dart | 37 + lib/logic/cubit/volumes/volumes_cubit.dart | 39 +- lib/logic/models/disk_size.dart | 9 + lib/logic/models/job.dart | 14 +- lib/logic/models/json/backup.g.dart | 2 +- .../models/json/hetzner_server_info.g.dart | 2 +- lib/logic/models/json/server_job.dart | 39 + lib/logic/models/json/server_job.g.dart | 35 + .../brand_button/outlined_button.dart | 34 + .../components/jobs_content/jobs_content.dart | 2 +- .../components/progress_bar/progress_bar.dart | 18 +- lib/ui/pages/providers/providers.dart | 94 +- lib/ui/pages/providers/storage_card.dart | 128 +- .../pages/server_storage/data_migration.dart | 142 +- lib/ui/pages/server_storage/disk_status.dart | 11 +- .../server_storage/extending_volume.dart | 144 +- .../pages/server_storage/server_storage.dart | 147 +- .../server_storage_list_item.dart | 74 + lib/ui/pages/services/service_page.dart | 87 + lib/ui/pages/services/services.dart | 4 +- lib/ui/pages/setup/initializing.dart | 2 +- lib/ui/pages/ssh_keys/new_ssh_key.dart | 2 +- lib/ui/pages/users/new_user.dart | 2 +- 50 files changed, 16907 insertions(+), 2158 deletions(-) create mode 100644 lib/logic/api_maps/graphql_maps/schema/server_settings.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/services.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/services.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/users.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/users.graphql.dart create mode 100644 lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart create mode 100644 lib/logic/models/disk_size.dart create mode 100644 lib/logic/models/json/server_job.dart create mode 100644 lib/logic/models/json/server_job.g.dart create mode 100644 lib/ui/components/brand_button/outlined_button.dart create mode 100644 lib/ui/pages/server_storage/server_storage_list_item.dart create mode 100644 lib/ui/pages/services/service_page.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 53fb30d9..52409913 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -256,6 +256,15 @@ "bottom_sheet": { "1": "Openconnect VPN Server. Engine for secure and scalable VPN infrastructure" } + }, + "page": { + "up_and_running": "Up and running", + "resource_usage": "Resource usage", + "disk_used": "{} of disk space used", + "users": "Users", + "controlled_by": "Controlled by {}", + "apps": "Apps", + "settings": "Settings and maintenance" } }, "users": { @@ -395,8 +404,10 @@ }, "modals": { "_comment": "messages in modals", - "1": "Server with such name, already exist", + "1": "Server with such name, already exist.", + "1_1": "Unexpected error during placement from the provider side.", "2": "Destroy server and create a new one?", + "2_2": "Try again?", "3": "Are you sure?", "4": "Purge all authentication keys?", "5": "Yes, purge all my tokens", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index a93e122a..40bb2a9a 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -375,8 +375,10 @@ }, "modals": { "_comment": "messages in modals", - "1": "Сервер с таким именем уже существует", + "1": "Сервер с таким именем уже существует.", + "1.1": "Непредвиденная ошибка при создании со стороны провайдера.", "2": "Уничтожить сервер и создать новый?", + "2.2": "Попробовать ещё раз?", "3": "Подтвердите", "4": "Сбросить все ключи?", "5": "Да, сбросить", diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index 3946d3b9..94508aa4 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; +import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; class BlocAndProviderConfig extends StatelessWidget { const BlocAndProviderConfig({final super.key, this.child}); @@ -26,6 +27,7 @@ class BlocAndProviderConfig extends StatelessWidget { final dnsRecordsCubit = DnsRecordsCubit(serverInstallationCubit); final recoveryKeyCubit = RecoveryKeyCubit(serverInstallationCubit); final apiDevicesCubit = ApiDevicesCubit(serverInstallationCubit); + final apiVolumesCubit = ApiVolumesCubit(serverInstallationCubit); return MultiProvider( providers: [ BlocProvider( @@ -60,6 +62,9 @@ class BlocAndProviderConfig extends StatelessWidget { BlocProvider( create: (final _) => apiDevicesCubit..load(), ), + BlocProvider( + create: (final _) => apiVolumesCubit..load(), + ), BlocProvider( create: (final _) => JobsCubit(usersCubit: usersCubit, servicesCubit: servicesCubit), diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index c9240f00..c01f1837 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -7,11 +7,12 @@ abstract class ApiMap { 'https://api.$rootAddress/graphql', ); + final String token = _getApiToken(); + final Link graphQLLink = isWithToken ? AuthLink( - getToken: () async => customToken == '' - ? getIt().serverDetails!.apiToken - : customToken, + getToken: () async => + customToken == '' ? 'Bearer $token' : customToken, ).concat(httpLink) : httpLink; @@ -21,6 +22,32 @@ abstract class ApiMap { ); } + Future getSubscriptionClient() async { + final String token = _getApiToken(); + + final WebSocketLink webSocketLink = WebSocketLink( + 'ws://api.$rootAddress/graphql', + config: SocketClientConfig( + autoReconnect: true, + headers: token.isEmpty ? null : {'Authorization': 'Bearer $token'}, + ), + ); + + return GraphQLClient( + cache: GraphQLCache(), + link: webSocketLink, + ); + } + + String _getApiToken() { + String token = ''; + final serverDetails = getIt().serverDetails; + if (serverDetails != null) { + token = getIt().serverDetails!.apiToken; + } + return token; + } + abstract final String? rootAddress; abstract final bool hasLogger; abstract final bool isWithToken; diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql index c85d05d9..a5947f5e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql @@ -1,4 +1,10 @@ -query GetServerDiskVolumesQuery { +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query GetServerDiskVolumes { storage { volumes { freeSpace @@ -8,31 +14,56 @@ query GetServerDiskVolumesQuery { serial totalSpace type + usages { + title + usedSpace + __typename + ... on ServiceStorageUsage { + service { + id + isMovable + displayName + } + } + } usedSpace } } } -mutation MountVolumeMutation($name: String!) { +mutation MountVolume($name: String!) { mountVolume(name: $name) { - code - message - success + ...basicMutationReturnFields } } -mutation ResizeVolumeMutation($name: String!) { +mutation ResizeVolume($name: String!) { resizeVolume(name: $name) { - code - message - success + ...basicMutationReturnFields } } -mutation UnmountVolumeMutation($name: String!) { +mutation UnmountVolume($name: String!) { unmountVolume(name: $name) { - code - message - success + ...basicMutationReturnFields } -} \ No newline at end of file +} + +mutation MigrateToBinds($input: MigrateToBindsInput!) { + migrateToBinds(input: $input) { + ...basicMutationReturnFields + job { + createdAt + description + error + finishedAt + name + progress + result + status + statusText + uid + updatedAt + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 527b7168..c435da09 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -2,24 +2,156 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; part 'disk_volumes.graphql.g.dart'; @JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery { - Query$GetServerDiskVolumesQuery( - {required this.storage, required this.$__typename}); +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Query$GetServerDiskVolumesQuery.fromJson(Map json) => - _$Query$GetServerDiskVolumesQueryFromJson(json); + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); - final Query$GetServerDiskVolumesQuery$storage storage; + final int code; + + final String message; + + final bool success; @JsonKey(name: '__typename') final String $__typename; Map toJson() => - _$Query$GetServerDiskVolumesQueryToJson(this); + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Fragment$basicMutationReturnFields) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( + {required Map idFields, bool optimistic = true}) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumes { + Query$GetServerDiskVolumes( + {required this.storage, required this.$__typename}); + + @override + factory Query$GetServerDiskVolumes.fromJson(Map json) => + _$Query$GetServerDiskVolumesFromJson(json); + + final Query$GetServerDiskVolumes$storage storage; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetServerDiskVolumesToJson(this); int get hashCode { final l$storage = storage; final l$$__typename = $__typename; @@ -29,7 +161,7 @@ class Query$GetServerDiskVolumesQuery { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery) || + if (!(other is Query$GetServerDiskVolumes) || runtimeType != other.runtimeType) return false; final l$storage = storage; final lOther$storage = other.storage; @@ -41,69 +173,19 @@ class Query$GetServerDiskVolumesQuery { } } -extension UtilityExtension$Query$GetServerDiskVolumesQuery - on Query$GetServerDiskVolumesQuery { - CopyWith$Query$GetServerDiskVolumesQuery - get copyWith => CopyWith$Query$GetServerDiskVolumesQuery(this, (i) => i); +extension UtilityExtension$Query$GetServerDiskVolumes + on Query$GetServerDiskVolumes { + Query$GetServerDiskVolumes copyWith( + {Query$GetServerDiskVolumes$storage? storage, String? $__typename}) => + Query$GetServerDiskVolumes( + storage: storage == null ? this.storage : storage, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetServerDiskVolumesQuery { - factory CopyWith$Query$GetServerDiskVolumesQuery( - Query$GetServerDiskVolumesQuery instance, - TRes Function(Query$GetServerDiskVolumesQuery) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery; - - factory CopyWith$Query$GetServerDiskVolumesQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery; - - TRes call( - {Query$GetServerDiskVolumesQuery$storage? storage, String? $__typename}); - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage; -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery - implements CopyWith$Query$GetServerDiskVolumesQuery { - _CopyWithImpl$Query$GetServerDiskVolumesQuery(this._instance, this._then); - - final Query$GetServerDiskVolumesQuery _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery) _then; - - static const _undefined = {}; - - TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery( - storage: storage == _undefined || storage == null - ? _instance.storage - : (storage as Query$GetServerDiskVolumesQuery$storage), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage { - final local$storage = _instance.storage; - return CopyWith$Query$GetServerDiskVolumesQuery$storage( - local$storage, (e) => call(storage: e)); - } -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery - implements CopyWith$Query$GetServerDiskVolumesQuery { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery(this._res); - - TRes _res; - - call( - {Query$GetServerDiskVolumesQuery$storage? storage, - String? $__typename}) => - _res; - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage => - CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(_res); -} - -const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ +const documentNodeQueryGetServerDiskVolumes = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, - name: NameNode(value: 'GetServerDiskVolumesQuery'), + name: NameNode(value: 'GetServerDiskVolumes'), variableDefinitions: [], directives: [], selectionSet: SelectionSetNode(selections: [ @@ -161,6 +243,77 @@ const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: null), + FieldNode( + name: NameNode(value: 'usages'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + InlineFragmentNode( + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode( + value: 'ServiceStorageUsage'), + isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'service'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])) + ])), FieldNode( name: NameNode(value: 'usedSpace'), alias: null, @@ -189,13 +342,13 @@ const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ selectionSet: null) ])), ]); -Query$GetServerDiskVolumesQuery _parserFn$Query$GetServerDiskVolumesQuery( +Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes( Map data) => - Query$GetServerDiskVolumesQuery.fromJson(data); + Query$GetServerDiskVolumes.fromJson(data); -class Options$Query$GetServerDiskVolumesQuery - extends graphql.QueryOptions { - Options$Query$GetServerDiskVolumesQuery( +class Options$Query$GetServerDiskVolumes + extends graphql.QueryOptions { + Options$Query$GetServerDiskVolumes( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -211,13 +364,13 @@ class Options$Query$GetServerDiskVolumesQuery optimisticResult: optimisticResult, pollInterval: pollInterval, context: context, - document: documentNodeQueryGetServerDiskVolumesQuery, - parserFn: _parserFn$Query$GetServerDiskVolumesQuery); + document: documentNodeQueryGetServerDiskVolumes, + parserFn: _parserFn$Query$GetServerDiskVolumes); } -class WatchOptions$Query$GetServerDiskVolumesQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetServerDiskVolumesQuery( +class WatchOptions$Query$GetServerDiskVolumes + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetServerDiskVolumes( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -235,74 +388,68 @@ class WatchOptions$Query$GetServerDiskVolumesQuery cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeQueryGetServerDiskVolumesQuery, + document: documentNodeQueryGetServerDiskVolumes, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Query$GetServerDiskVolumesQuery); + parserFn: _parserFn$Query$GetServerDiskVolumes); } -class FetchMoreOptions$Query$GetServerDiskVolumesQuery +class FetchMoreOptions$Query$GetServerDiskVolumes extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetServerDiskVolumesQuery( + FetchMoreOptions$Query$GetServerDiskVolumes( {required graphql.UpdateQuery updateQuery}) : super( updateQuery: updateQuery, - document: documentNodeQueryGetServerDiskVolumesQuery); + document: documentNodeQueryGetServerDiskVolumes); } -extension ClientExtension$Query$GetServerDiskVolumesQuery - on graphql.GraphQLClient { - Future> - query$GetServerDiskVolumesQuery( - [Options$Query$GetServerDiskVolumesQuery? options]) async => - await this - .query(options ?? Options$Query$GetServerDiskVolumesQuery()); - graphql.ObservableQuery - watchQuery$GetServerDiskVolumesQuery( - [WatchOptions$Query$GetServerDiskVolumesQuery? options]) => - this.watchQuery( - options ?? WatchOptions$Query$GetServerDiskVolumesQuery()); - void writeQuery$GetServerDiskVolumesQuery( - {required Query$GetServerDiskVolumesQuery data, - bool broadcast = true}) => +extension ClientExtension$Query$GetServerDiskVolumes on graphql.GraphQLClient { + Future> + query$GetServerDiskVolumes( + [Options$Query$GetServerDiskVolumes? options]) async => + await this.query(options ?? Options$Query$GetServerDiskVolumes()); + graphql.ObservableQuery + watchQuery$GetServerDiskVolumes( + [WatchOptions$Query$GetServerDiskVolumes? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetServerDiskVolumes()); + void writeQuery$GetServerDiskVolumes( + {required Query$GetServerDiskVolumes data, bool broadcast = true}) => this.writeQuery( graphql.Request( operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumesQuery)), + document: documentNodeQueryGetServerDiskVolumes)), data: data.toJson(), broadcast: broadcast); - Query$GetServerDiskVolumesQuery? readQuery$GetServerDiskVolumesQuery( + Query$GetServerDiskVolumes? readQuery$GetServerDiskVolumes( {bool optimistic = true}) { final result = this.readQuery( graphql.Request( operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumesQuery)), + document: documentNodeQueryGetServerDiskVolumes)), optimistic: optimistic); - return result == null - ? null - : Query$GetServerDiskVolumesQuery.fromJson(result); + return result == null ? null : Query$GetServerDiskVolumes.fromJson(result); } } @JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery$storage { - Query$GetServerDiskVolumesQuery$storage( +class Query$GetServerDiskVolumes$storage { + Query$GetServerDiskVolumes$storage( {required this.volumes, required this.$__typename}); @override - factory Query$GetServerDiskVolumesQuery$storage.fromJson( + factory Query$GetServerDiskVolumes$storage.fromJson( Map json) => - _$Query$GetServerDiskVolumesQuery$storageFromJson(json); + _$Query$GetServerDiskVolumes$storageFromJson(json); - final List volumes; + final List volumes; @JsonKey(name: '__typename') final String $__typename; Map toJson() => - _$Query$GetServerDiskVolumesQuery$storageToJson(this); + _$Query$GetServerDiskVolumes$storageToJson(this); int get hashCode { final l$volumes = volumes; final l$$__typename = $__typename; @@ -313,7 +460,7 @@ class Query$GetServerDiskVolumesQuery$storage { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery$storage) || + if (!(other is Query$GetServerDiskVolumes$storage) || runtimeType != other.runtimeType) return false; final l$volumes = volumes; final lOther$volumes = other.volumes; @@ -331,118 +478,58 @@ class Query$GetServerDiskVolumesQuery$storage { } } -extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage - on Query$GetServerDiskVolumesQuery$storage { - CopyWith$Query$GetServerDiskVolumesQuery$storage< - Query$GetServerDiskVolumesQuery$storage> - get copyWith => - CopyWith$Query$GetServerDiskVolumesQuery$storage(this, (i) => i); -} - -abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage { - factory CopyWith$Query$GetServerDiskVolumesQuery$storage( - Query$GetServerDiskVolumesQuery$storage instance, - TRes Function(Query$GetServerDiskVolumesQuery$storage) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage; - - factory CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage; - - TRes call( - {List? volumes, - String? $__typename}); - TRes volumes( - Iterable Function( - Iterable< - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes>>) - _fn); -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage - implements CopyWith$Query$GetServerDiskVolumesQuery$storage { - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage( - this._instance, this._then); - - final Query$GetServerDiskVolumesQuery$storage _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery$storage) _then; - - static const _undefined = {}; - - TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery$storage( - volumes: volumes == _undefined || volumes == null - ? _instance.volumes - : (volumes - as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - TRes volumes( - Iterable Function( - Iterable< - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes>>) - _fn) => - call( - volumes: _fn(_instance.volumes.map((e) => - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - e, (i) => i))).toList()); -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage - implements CopyWith$Query$GetServerDiskVolumesQuery$storage { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage(this._res); - - TRes _res; - - call( - {List? volumes, +extension UtilityExtension$Query$GetServerDiskVolumes$storage + on Query$GetServerDiskVolumes$storage { + Query$GetServerDiskVolumes$storage copyWith( + {List? volumes, String? $__typename}) => - _res; - volumes(_fn) => _res; + Query$GetServerDiskVolumes$storage( + volumes: volumes == null ? this.volumes : volumes, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery$storage$volumes { - Query$GetServerDiskVolumesQuery$storage$volumes( +class Query$GetServerDiskVolumes$storage$volumes { + Query$GetServerDiskVolumes$storage$volumes( {required this.freeSpace, - required this.model, + this.model, required this.name, required this.root, - required this.serial, + this.serial, required this.totalSpace, required this.type, + required this.usages, required this.usedSpace, required this.$__typename}); @override - factory Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( + factory Query$GetServerDiskVolumes$storage$volumes.fromJson( Map json) => - _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson(json); + _$Query$GetServerDiskVolumes$storage$volumesFromJson(json); final String freeSpace; - final String model; + final String? model; final String name; final bool root; - final String serial; + final String? serial; final String totalSpace; final String type; + final List usages; + final String usedSpace; @JsonKey(name: '__typename') final String $__typename; Map toJson() => - _$Query$GetServerDiskVolumesQuery$storage$volumesToJson(this); + _$Query$GetServerDiskVolumes$storage$volumesToJson(this); int get hashCode { final l$freeSpace = freeSpace; final l$model = model; @@ -451,6 +538,7 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { final l$serial = serial; final l$totalSpace = totalSpace; final l$type = type; + final l$usages = usages; final l$usedSpace = usedSpace; final l$$__typename = $__typename; return Object.hashAll([ @@ -461,6 +549,7 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { l$serial, l$totalSpace, l$type, + Object.hashAll(l$usages.map((v) => v)), l$usedSpace, l$$__typename ]); @@ -469,7 +558,7 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery$storage$volumes) || + if (!(other is Query$GetServerDiskVolumes$storage$volumes) || runtimeType != other.runtimeType) return false; final l$freeSpace = freeSpace; final lOther$freeSpace = other.freeSpace; @@ -492,6 +581,15 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { final l$type = type; final lOther$type = other.type; if (l$type != lOther$type) return false; + final l$usages = usages; + final lOther$usages = other.usages; + if (l$usages.length != lOther$usages.length) return false; + for (int i = 0; i < l$usages.length; i++) { + final l$usages$entry = l$usages[i]; + final lOther$usages$entry = lOther$usages[i]; + if (l$usages$entry != lOther$usages$entry) return false; + } + final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; if (l$usedSpace != lOther$usedSpace) return false; @@ -502,119 +600,253 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { } } -extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage$volumes - on Query$GetServerDiskVolumesQuery$storage$volumes { - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes> - get copyWith => CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - this, (i) => i); -} - -abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - Query$GetServerDiskVolumesQuery$storage$volumes instance, - TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes; - - factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes.stub( - TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes; - - TRes call( - {String? freeSpace, - String? model, - String? name, - bool? root, - String? serial, - String? totalSpace, - String? type, - String? usedSpace, - String? $__typename}); -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes - implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes( - this._instance, this._then); - - final Query$GetServerDiskVolumesQuery$storage$volumes _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) _then; - - static const _undefined = {}; - - TRes call( - {Object? freeSpace = _undefined, - Object? model = _undefined, - Object? name = _undefined, - Object? root = _undefined, - Object? serial = _undefined, - Object? totalSpace = _undefined, - Object? type = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery$storage$volumes( - freeSpace: freeSpace == _undefined || freeSpace == null - ? _instance.freeSpace - : (freeSpace as String), - model: model == _undefined || model == null - ? _instance.model - : (model as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - root: root == _undefined || root == null - ? _instance.root - : (root as bool), - serial: serial == _undefined || serial == null - ? _instance.serial - : (serial as String), - totalSpace: totalSpace == _undefined || totalSpace == null - ? _instance.totalSpace - : (totalSpace as String), - type: type == _undefined || type == null - ? _instance.type - : (type as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes - implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes(this._res); - - TRes _res; - - call( +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes + on Query$GetServerDiskVolumes$storage$volumes { + Query$GetServerDiskVolumes$storage$volumes copyWith( {String? freeSpace, - String? model, + String? Function()? model, String? name, bool? root, - String? serial, + String? Function()? serial, String? totalSpace, String? type, + List? usages, String? usedSpace, String? $__typename}) => - _res; + Query$GetServerDiskVolumes$storage$volumes( + freeSpace: freeSpace == null ? this.freeSpace : freeSpace, + model: model == null ? this.model : model(), + name: name == null ? this.name : name, + root: root == null ? this.root : root, + serial: serial == null ? this.serial : serial(), + totalSpace: totalSpace == null ? this.totalSpace : totalSpace, + type: type == null ? this.type : type, + usages: usages == null ? this.usages : usages, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Variables$Mutation$MountVolumeMutation { - Variables$Mutation$MountVolumeMutation({required this.name}); +class Query$GetServerDiskVolumes$storage$volumes$usages { + Query$GetServerDiskVolumes$storage$volumes$usages( + {required this.title, + required this.usedSpace, + required this.$__typename}); @override - factory Variables$Mutation$MountVolumeMutation.fromJson( + factory Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( + Map json) { + switch (json["__typename"] as String) { + case "ServiceStorageUsage": + return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + .fromJson(json); + default: + return _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( + json); + } + } + + final String title; + + final String usedSpace; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson(this); + int get hashCode { + final l$title = title; + final l$usedSpace = usedSpace; + final l$$__typename = $__typename; + return Object.hashAll([l$title, l$usedSpace, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages) || + runtimeType != other.runtimeType) return false; + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages + on Query$GetServerDiskVolumes$storage$volumes$usages { + Query$GetServerDiskVolumes$storage$volumes$usages copyWith( + {String? title, String? usedSpace, String? $__typename}) => + Query$GetServerDiskVolumes$storage$volumes$usages( + title: title == null ? this.title : title, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + implements Query$GetServerDiskVolumes$storage$volumes$usages { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + {required this.title, + required this.usedSpace, + required this.$__typename, + this.service}); + + @override + factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage.fromJson( Map json) => - _$Variables$Mutation$MountVolumeMutationFromJson(json); + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( + json); + + final String title; + + final String usedSpace; + + @JsonKey(name: '__typename') + final String $__typename; + + final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service; + + Map toJson() => + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( + this); + int get hashCode { + final l$title = title; + final l$usedSpace = usedSpace; + final l$$__typename = $__typename; + final l$service = service; + return Object.hashAll([l$title, l$usedSpace, l$$__typename, l$service]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) || + runtimeType != other.runtimeType) return false; + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$service = service; + final lOther$service = other.service; + if (l$service != lOther$service) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + on Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage copyWith( + {String? title, + String? usedSpace, + String? $__typename, + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + Function()? + service}) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + title: title == null ? this.title : title, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + $__typename: $__typename == null ? this.$__typename : $__typename, + service: service == null ? this.service : service()); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + {required this.id, + required this.isMovable, + required this.displayName, + required this.$__typename}); + + @override + factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.fromJson( + Map json) => + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( + json); + + final String id; + + final bool isMovable; + + final String displayName; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( + this); + int get hashCode { + final l$id = id; + final l$isMovable = isMovable; + final l$displayName = displayName; + final l$$__typename = $__typename; + return Object.hashAll([l$id, l$isMovable, l$displayName, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) || + runtimeType != other.runtimeType) return false; + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) return false; + final l$isMovable = isMovable; + final lOther$isMovable = other.isMovable; + if (l$isMovable != lOther$isMovable) return false; + final l$displayName = displayName; + final lOther$displayName = other.displayName; + if (l$displayName != lOther$displayName) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + on Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + copyWith( + {String? id, + bool? isMovable, + String? displayName, + String? $__typename}) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + id: id == null ? this.id : id, + isMovable: isMovable == null ? this.isMovable : isMovable, + displayName: displayName == null ? this.displayName : displayName, + $__typename: + $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$MountVolume { + Variables$Mutation$MountVolume({required this.name}); + + @override + factory Variables$Mutation$MountVolume.fromJson(Map json) => + _$Variables$Mutation$MountVolumeFromJson(json); final String name; - Map toJson() => - _$Variables$Mutation$MountVolumeMutationToJson(this); + Map toJson() => _$Variables$Mutation$MountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); @@ -623,7 +855,7 @@ class Variables$Mutation$MountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MountVolumeMutation) || + if (!(other is Variables$Mutation$MountVolume) || runtimeType != other.runtimeType) return false; final l$name = name; final lOther$name = other.name; @@ -631,66 +863,24 @@ class Variables$Mutation$MountVolumeMutation { return true; } - CopyWith$Variables$Mutation$MountVolumeMutation< - Variables$Mutation$MountVolumeMutation> - get copyWith => - CopyWith$Variables$Mutation$MountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$MountVolumeMutation { - factory CopyWith$Variables$Mutation$MountVolumeMutation( - Variables$Mutation$MountVolumeMutation instance, - TRes Function(Variables$Mutation$MountVolumeMutation) then) = - _CopyWithImpl$Variables$Mutation$MountVolumeMutation; - - factory CopyWith$Variables$Mutation$MountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation; - - TRes call({String? name}); -} - -class _CopyWithImpl$Variables$Mutation$MountVolumeMutation - implements CopyWith$Variables$Mutation$MountVolumeMutation { - _CopyWithImpl$Variables$Mutation$MountVolumeMutation( - this._instance, this._then); - - final Variables$Mutation$MountVolumeMutation _instance; - - final TRes Function(Variables$Mutation$MountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$MountVolumeMutation( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); -} - -class _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation - implements CopyWith$Variables$Mutation$MountVolumeMutation { - _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation(this._res); - - TRes _res; - - call({String? name}) => _res; + Variables$Mutation$MountVolume copyWith({String? name}) => + Variables$Mutation$MountVolume(name: name == null ? this.name : name); } @JsonSerializable(explicitToJson: true) -class Mutation$MountVolumeMutation { - Mutation$MountVolumeMutation( - {required this.mountVolume, required this.$__typename}); +class Mutation$MountVolume { + Mutation$MountVolume({required this.mountVolume, required this.$__typename}); @override - factory Mutation$MountVolumeMutation.fromJson(Map json) => - _$Mutation$MountVolumeMutationFromJson(json); + factory Mutation$MountVolume.fromJson(Map json) => + _$Mutation$MountVolumeFromJson(json); - final Mutation$MountVolumeMutation$mountVolume mountVolume; + final Mutation$MountVolume$mountVolume mountVolume; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MountVolumeMutationToJson(this); + Map toJson() => _$Mutation$MountVolumeToJson(this); int get hashCode { final l$mountVolume = mountVolume; final l$$__typename = $__typename; @@ -700,8 +890,8 @@ class Mutation$MountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$MountVolumeMutation) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$MountVolume) || runtimeType != other.runtimeType) + return false; final l$mountVolume = mountVolume; final lOther$mountVolume = other.mountVolume; if (l$mountVolume != lOther$mountVolume) return false; @@ -712,72 +902,19 @@ class Mutation$MountVolumeMutation { } } -extension UtilityExtension$Mutation$MountVolumeMutation - on Mutation$MountVolumeMutation { - CopyWith$Mutation$MountVolumeMutation - get copyWith => CopyWith$Mutation$MountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Mutation$MountVolumeMutation { - factory CopyWith$Mutation$MountVolumeMutation( - Mutation$MountVolumeMutation instance, - TRes Function(Mutation$MountVolumeMutation) then) = - _CopyWithImpl$Mutation$MountVolumeMutation; - - factory CopyWith$Mutation$MountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Mutation$MountVolumeMutation; - - TRes call( - {Mutation$MountVolumeMutation$mountVolume? mountVolume, - String? $__typename}); - CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume; -} - -class _CopyWithImpl$Mutation$MountVolumeMutation - implements CopyWith$Mutation$MountVolumeMutation { - _CopyWithImpl$Mutation$MountVolumeMutation(this._instance, this._then); - - final Mutation$MountVolumeMutation _instance; - - final TRes Function(Mutation$MountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call( - {Object? mountVolume = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$MountVolumeMutation( - mountVolume: mountVolume == _undefined || mountVolume == null - ? _instance.mountVolume - : (mountVolume as Mutation$MountVolumeMutation$mountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume { - final local$mountVolume = _instance.mountVolume; - return CopyWith$Mutation$MountVolumeMutation$mountVolume( - local$mountVolume, (e) => call(mountVolume: e)); - } -} - -class _CopyWithStubImpl$Mutation$MountVolumeMutation - implements CopyWith$Mutation$MountVolumeMutation { - _CopyWithStubImpl$Mutation$MountVolumeMutation(this._res); - - TRes _res; - - call( - {Mutation$MountVolumeMutation$mountVolume? mountVolume, +extension UtilityExtension$Mutation$MountVolume on Mutation$MountVolume { + Mutation$MountVolume copyWith( + {Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}) => - _res; - CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume => - CopyWith$Mutation$MountVolumeMutation$mountVolume.stub(_res); + Mutation$MountVolume( + mountVolume: mountVolume == null ? this.mountVolume : mountVolume, + $__typename: $__typename == null ? this.$__typename : $__typename); } -const documentNodeMutationMountVolumeMutation = DocumentNode(definitions: [ +const documentNodeMutationMountVolume = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.mutation, - name: NameNode(value: 'MountVolumeMutation'), + name: NameNode(value: 'MountVolume'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'name')), @@ -798,24 +935,9 @@ const documentNodeMutationMountVolumeMutation = DocumentNode(definitions: [ ], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -830,25 +952,26 @@ const documentNodeMutationMountVolumeMutation = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$MountVolumeMutation _parserFn$Mutation$MountVolumeMutation( +Mutation$MountVolume _parserFn$Mutation$MountVolume( Map data) => - Mutation$MountVolumeMutation.fromJson(data); -typedef OnMutationCompleted$Mutation$MountVolumeMutation = FutureOr - Function(dynamic, Mutation$MountVolumeMutation?); + Mutation$MountVolume.fromJson(data); +typedef OnMutationCompleted$Mutation$MountVolume = FutureOr Function( + dynamic, Mutation$MountVolume?); -class Options$Mutation$MountVolumeMutation - extends graphql.MutationOptions { - Options$Mutation$MountVolumeMutation( +class Options$Mutation$MountVolume + extends graphql.MutationOptions { + Options$Mutation$MountVolume( {String? operationName, - required Variables$Mutation$MountVolumeMutation variables, + required Variables$Mutation$MountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, graphql.Context? context, - OnMutationCompleted$Mutation$MountVolumeMutation? onCompleted, - graphql.OnMutationUpdate? update, + OnMutationCompleted$Mutation$MountVolume? onCompleted, + graphql.OnMutationUpdate? update, graphql.OnError? onError}) : onCompletedWithParsed = onCompleted, super( @@ -861,17 +984,14 @@ class Options$Mutation$MountVolumeMutation context: context, onCompleted: onCompleted == null ? null - : (data) => onCompleted( - data, - data == null - ? null - : _parserFn$Mutation$MountVolumeMutation(data)), + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$MountVolume(data)), update: update, onError: onError, - document: documentNodeMutationMountVolumeMutation, - parserFn: _parserFn$Mutation$MountVolumeMutation); + document: documentNodeMutationMountVolume, + parserFn: _parserFn$Mutation$MountVolume); - final OnMutationCompleted$Mutation$MountVolumeMutation? onCompletedWithParsed; + final OnMutationCompleted$Mutation$MountVolume? onCompletedWithParsed; @override List get properties => [ @@ -882,11 +1002,11 @@ class Options$Mutation$MountVolumeMutation ]; } -class WatchOptions$Mutation$MountVolumeMutation - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MountVolumeMutation( +class WatchOptions$Mutation$MountVolume + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$MountVolume( {String? operationName, - required Variables$Mutation$MountVolumeMutation variables, + required Variables$Mutation$MountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -904,38 +1024,36 @@ class WatchOptions$Mutation$MountVolumeMutation cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeMutationMountVolumeMutation, + document: documentNodeMutationMountVolume, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MountVolumeMutation); + parserFn: _parserFn$Mutation$MountVolume); } -extension ClientExtension$Mutation$MountVolumeMutation - on graphql.GraphQLClient { - Future> - mutate$MountVolumeMutation( - Options$Mutation$MountVolumeMutation options) async => - await this.mutate(options); - graphql.ObservableQuery - watchMutation$MountVolumeMutation( - WatchOptions$Mutation$MountVolumeMutation options) => - this.watchMutation(options); +extension ClientExtension$Mutation$MountVolume on graphql.GraphQLClient { + Future> mutate$MountVolume( + Options$Mutation$MountVolume options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$MountVolume( + WatchOptions$Mutation$MountVolume options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$MountVolumeMutation$mountVolume { - Mutation$MountVolumeMutation$mountVolume( +class Mutation$MountVolume$mountVolume + implements Fragment$basicMutationReturnFields { + Mutation$MountVolume$mountVolume( {required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Mutation$MountVolumeMutation$mountVolume.fromJson( + factory Mutation$MountVolume$mountVolume.fromJson( Map json) => - _$Mutation$MountVolumeMutation$mountVolumeFromJson(json); + _$Mutation$MountVolume$mountVolumeFromJson(json); final int code; @@ -947,7 +1065,7 @@ class Mutation$MountVolumeMutation$mountVolume { final String $__typename; Map toJson() => - _$Mutation$MountVolumeMutation$mountVolumeToJson(this); + _$Mutation$MountVolume$mountVolumeToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -959,7 +1077,7 @@ class Mutation$MountVolumeMutation$mountVolume { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$MountVolumeMutation$mountVolume) || + if (!(other is Mutation$MountVolume$mountVolume) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; @@ -977,80 +1095,29 @@ class Mutation$MountVolumeMutation$mountVolume { } } -extension UtilityExtension$Mutation$MountVolumeMutation$mountVolume - on Mutation$MountVolumeMutation$mountVolume { - CopyWith$Mutation$MountVolumeMutation$mountVolume< - Mutation$MountVolumeMutation$mountVolume> - get copyWith => - CopyWith$Mutation$MountVolumeMutation$mountVolume(this, (i) => i); -} - -abstract class CopyWith$Mutation$MountVolumeMutation$mountVolume { - factory CopyWith$Mutation$MountVolumeMutation$mountVolume( - Mutation$MountVolumeMutation$mountVolume instance, - TRes Function(Mutation$MountVolumeMutation$mountVolume) then) = - _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume; - - factory CopyWith$Mutation$MountVolumeMutation$mountVolume.stub(TRes res) = - _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume; - - TRes call({int? code, String? message, bool? success, String? $__typename}); -} - -class _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume - implements CopyWith$Mutation$MountVolumeMutation$mountVolume { - _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume( - this._instance, this._then); - - final Mutation$MountVolumeMutation$mountVolume _instance; - - final TRes Function(Mutation$MountVolumeMutation$mountVolume) _then; - - static const _undefined = {}; - - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$MountVolumeMutation$mountVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume - implements CopyWith$Mutation$MountVolumeMutation$mountVolume { - _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume(this._res); - - TRes _res; - - call({int? code, String? message, bool? success, String? $__typename}) => - _res; +extension UtilityExtension$Mutation$MountVolume$mountVolume + on Mutation$MountVolume$mountVolume { + Mutation$MountVolume$mountVolume copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$MountVolume$mountVolume( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Variables$Mutation$ResizeVolumeMutation { - Variables$Mutation$ResizeVolumeMutation({required this.name}); +class Variables$Mutation$ResizeVolume { + Variables$Mutation$ResizeVolume({required this.name}); @override - factory Variables$Mutation$ResizeVolumeMutation.fromJson( - Map json) => - _$Variables$Mutation$ResizeVolumeMutationFromJson(json); + factory Variables$Mutation$ResizeVolume.fromJson(Map json) => + _$Variables$Mutation$ResizeVolumeFromJson(json); final String name; Map toJson() => - _$Variables$Mutation$ResizeVolumeMutationToJson(this); + _$Variables$Mutation$ResizeVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); @@ -1059,7 +1126,7 @@ class Variables$Mutation$ResizeVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ResizeVolumeMutation) || + if (!(other is Variables$Mutation$ResizeVolume) || runtimeType != other.runtimeType) return false; final l$name = name; final lOther$name = other.name; @@ -1067,66 +1134,25 @@ class Variables$Mutation$ResizeVolumeMutation { return true; } - CopyWith$Variables$Mutation$ResizeVolumeMutation< - Variables$Mutation$ResizeVolumeMutation> - get copyWith => - CopyWith$Variables$Mutation$ResizeVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$ResizeVolumeMutation { - factory CopyWith$Variables$Mutation$ResizeVolumeMutation( - Variables$Mutation$ResizeVolumeMutation instance, - TRes Function(Variables$Mutation$ResizeVolumeMutation) then) = - _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation; - - factory CopyWith$Variables$Mutation$ResizeVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation; - - TRes call({String? name}); -} - -class _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation - implements CopyWith$Variables$Mutation$ResizeVolumeMutation { - _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation( - this._instance, this._then); - - final Variables$Mutation$ResizeVolumeMutation _instance; - - final TRes Function(Variables$Mutation$ResizeVolumeMutation) _then; - - static const _undefined = {}; - - TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$ResizeVolumeMutation( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); -} - -class _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation - implements CopyWith$Variables$Mutation$ResizeVolumeMutation { - _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation(this._res); - - TRes _res; - - call({String? name}) => _res; + Variables$Mutation$ResizeVolume copyWith({String? name}) => + Variables$Mutation$ResizeVolume(name: name == null ? this.name : name); } @JsonSerializable(explicitToJson: true) -class Mutation$ResizeVolumeMutation { - Mutation$ResizeVolumeMutation( +class Mutation$ResizeVolume { + Mutation$ResizeVolume( {required this.resizeVolume, required this.$__typename}); @override - factory Mutation$ResizeVolumeMutation.fromJson(Map json) => - _$Mutation$ResizeVolumeMutationFromJson(json); + factory Mutation$ResizeVolume.fromJson(Map json) => + _$Mutation$ResizeVolumeFromJson(json); - final Mutation$ResizeVolumeMutation$resizeVolume resizeVolume; + final Mutation$ResizeVolume$resizeVolume resizeVolume; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$ResizeVolumeMutationToJson(this); + Map toJson() => _$Mutation$ResizeVolumeToJson(this); int get hashCode { final l$resizeVolume = resizeVolume; final l$$__typename = $__typename; @@ -1136,8 +1162,8 @@ class Mutation$ResizeVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$ResizeVolumeMutation) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$ResizeVolume) || runtimeType != other.runtimeType) + return false; final l$resizeVolume = resizeVolume; final lOther$resizeVolume = other.resizeVolume; if (l$resizeVolume != lOther$resizeVolume) return false; @@ -1148,72 +1174,19 @@ class Mutation$ResizeVolumeMutation { } } -extension UtilityExtension$Mutation$ResizeVolumeMutation - on Mutation$ResizeVolumeMutation { - CopyWith$Mutation$ResizeVolumeMutation - get copyWith => CopyWith$Mutation$ResizeVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Mutation$ResizeVolumeMutation { - factory CopyWith$Mutation$ResizeVolumeMutation( - Mutation$ResizeVolumeMutation instance, - TRes Function(Mutation$ResizeVolumeMutation) then) = - _CopyWithImpl$Mutation$ResizeVolumeMutation; - - factory CopyWith$Mutation$ResizeVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Mutation$ResizeVolumeMutation; - - TRes call( - {Mutation$ResizeVolumeMutation$resizeVolume? resizeVolume, - String? $__typename}); - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume; -} - -class _CopyWithImpl$Mutation$ResizeVolumeMutation - implements CopyWith$Mutation$ResizeVolumeMutation { - _CopyWithImpl$Mutation$ResizeVolumeMutation(this._instance, this._then); - - final Mutation$ResizeVolumeMutation _instance; - - final TRes Function(Mutation$ResizeVolumeMutation) _then; - - static const _undefined = {}; - - TRes call( - {Object? resizeVolume = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$ResizeVolumeMutation( - resizeVolume: resizeVolume == _undefined || resizeVolume == null - ? _instance.resizeVolume - : (resizeVolume as Mutation$ResizeVolumeMutation$resizeVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume { - final local$resizeVolume = _instance.resizeVolume; - return CopyWith$Mutation$ResizeVolumeMutation$resizeVolume( - local$resizeVolume, (e) => call(resizeVolume: e)); - } -} - -class _CopyWithStubImpl$Mutation$ResizeVolumeMutation - implements CopyWith$Mutation$ResizeVolumeMutation { - _CopyWithStubImpl$Mutation$ResizeVolumeMutation(this._res); - - TRes _res; - - call( - {Mutation$ResizeVolumeMutation$resizeVolume? resizeVolume, +extension UtilityExtension$Mutation$ResizeVolume on Mutation$ResizeVolume { + Mutation$ResizeVolume copyWith( + {Mutation$ResizeVolume$resizeVolume? resizeVolume, String? $__typename}) => - _res; - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume => - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume.stub(_res); + Mutation$ResizeVolume( + resizeVolume: resizeVolume == null ? this.resizeVolume : resizeVolume, + $__typename: $__typename == null ? this.$__typename : $__typename); } -const documentNodeMutationResizeVolumeMutation = DocumentNode(definitions: [ +const documentNodeMutationResizeVolume = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.mutation, - name: NameNode(value: 'ResizeVolumeMutation'), + name: NameNode(value: 'ResizeVolume'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'name')), @@ -1234,24 +1207,9 @@ const documentNodeMutationResizeVolumeMutation = DocumentNode(definitions: [ ], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -1266,25 +1224,26 @@ const documentNodeMutationResizeVolumeMutation = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$ResizeVolumeMutation _parserFn$Mutation$ResizeVolumeMutation( +Mutation$ResizeVolume _parserFn$Mutation$ResizeVolume( Map data) => - Mutation$ResizeVolumeMutation.fromJson(data); -typedef OnMutationCompleted$Mutation$ResizeVolumeMutation = FutureOr - Function(dynamic, Mutation$ResizeVolumeMutation?); + Mutation$ResizeVolume.fromJson(data); +typedef OnMutationCompleted$Mutation$ResizeVolume = FutureOr Function( + dynamic, Mutation$ResizeVolume?); -class Options$Mutation$ResizeVolumeMutation - extends graphql.MutationOptions { - Options$Mutation$ResizeVolumeMutation( +class Options$Mutation$ResizeVolume + extends graphql.MutationOptions { + Options$Mutation$ResizeVolume( {String? operationName, - required Variables$Mutation$ResizeVolumeMutation variables, + required Variables$Mutation$ResizeVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, graphql.Context? context, - OnMutationCompleted$Mutation$ResizeVolumeMutation? onCompleted, - graphql.OnMutationUpdate? update, + OnMutationCompleted$Mutation$ResizeVolume? onCompleted, + graphql.OnMutationUpdate? update, graphql.OnError? onError}) : onCompletedWithParsed = onCompleted, super( @@ -1301,14 +1260,13 @@ class Options$Mutation$ResizeVolumeMutation data, data == null ? null - : _parserFn$Mutation$ResizeVolumeMutation(data)), + : _parserFn$Mutation$ResizeVolume(data)), update: update, onError: onError, - document: documentNodeMutationResizeVolumeMutation, - parserFn: _parserFn$Mutation$ResizeVolumeMutation); + document: documentNodeMutationResizeVolume, + parserFn: _parserFn$Mutation$ResizeVolume); - final OnMutationCompleted$Mutation$ResizeVolumeMutation? - onCompletedWithParsed; + final OnMutationCompleted$Mutation$ResizeVolume? onCompletedWithParsed; @override List get properties => [ @@ -1319,11 +1277,11 @@ class Options$Mutation$ResizeVolumeMutation ]; } -class WatchOptions$Mutation$ResizeVolumeMutation - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ResizeVolumeMutation( +class WatchOptions$Mutation$ResizeVolume + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ResizeVolume( {String? operationName, - required Variables$Mutation$ResizeVolumeMutation variables, + required Variables$Mutation$ResizeVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -1341,38 +1299,36 @@ class WatchOptions$Mutation$ResizeVolumeMutation cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeMutationResizeVolumeMutation, + document: documentNodeMutationResizeVolume, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ResizeVolumeMutation); + parserFn: _parserFn$Mutation$ResizeVolume); } -extension ClientExtension$Mutation$ResizeVolumeMutation - on graphql.GraphQLClient { - Future> - mutate$ResizeVolumeMutation( - Options$Mutation$ResizeVolumeMutation options) async => - await this.mutate(options); - graphql.ObservableQuery - watchMutation$ResizeVolumeMutation( - WatchOptions$Mutation$ResizeVolumeMutation options) => - this.watchMutation(options); +extension ClientExtension$Mutation$ResizeVolume on graphql.GraphQLClient { + Future> mutate$ResizeVolume( + Options$Mutation$ResizeVolume options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$ResizeVolume( + WatchOptions$Mutation$ResizeVolume options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$ResizeVolumeMutation$resizeVolume { - Mutation$ResizeVolumeMutation$resizeVolume( +class Mutation$ResizeVolume$resizeVolume + implements Fragment$basicMutationReturnFields { + Mutation$ResizeVolume$resizeVolume( {required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Mutation$ResizeVolumeMutation$resizeVolume.fromJson( + factory Mutation$ResizeVolume$resizeVolume.fromJson( Map json) => - _$Mutation$ResizeVolumeMutation$resizeVolumeFromJson(json); + _$Mutation$ResizeVolume$resizeVolumeFromJson(json); final int code; @@ -1384,7 +1340,7 @@ class Mutation$ResizeVolumeMutation$resizeVolume { final String $__typename; Map toJson() => - _$Mutation$ResizeVolumeMutation$resizeVolumeToJson(this); + _$Mutation$ResizeVolume$resizeVolumeToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -1396,7 +1352,7 @@ class Mutation$ResizeVolumeMutation$resizeVolume { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$ResizeVolumeMutation$resizeVolume) || + if (!(other is Mutation$ResizeVolume$resizeVolume) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; @@ -1414,80 +1370,30 @@ class Mutation$ResizeVolumeMutation$resizeVolume { } } -extension UtilityExtension$Mutation$ResizeVolumeMutation$resizeVolume - on Mutation$ResizeVolumeMutation$resizeVolume { - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume< - Mutation$ResizeVolumeMutation$resizeVolume> - get copyWith => - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume(this, (i) => i); -} - -abstract class CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { - factory CopyWith$Mutation$ResizeVolumeMutation$resizeVolume( - Mutation$ResizeVolumeMutation$resizeVolume instance, - TRes Function(Mutation$ResizeVolumeMutation$resizeVolume) then) = - _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume; - - factory CopyWith$Mutation$ResizeVolumeMutation$resizeVolume.stub(TRes res) = - _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume; - - TRes call({int? code, String? message, bool? success, String? $__typename}); -} - -class _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume - implements CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { - _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume( - this._instance, this._then); - - final Mutation$ResizeVolumeMutation$resizeVolume _instance; - - final TRes Function(Mutation$ResizeVolumeMutation$resizeVolume) _then; - - static const _undefined = {}; - - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$ResizeVolumeMutation$resizeVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume - implements CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { - _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume(this._res); - - TRes _res; - - call({int? code, String? message, bool? success, String? $__typename}) => - _res; +extension UtilityExtension$Mutation$ResizeVolume$resizeVolume + on Mutation$ResizeVolume$resizeVolume { + Mutation$ResizeVolume$resizeVolume copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$ResizeVolume$resizeVolume( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Variables$Mutation$UnmountVolumeMutation { - Variables$Mutation$UnmountVolumeMutation({required this.name}); +class Variables$Mutation$UnmountVolume { + Variables$Mutation$UnmountVolume({required this.name}); @override - factory Variables$Mutation$UnmountVolumeMutation.fromJson( + factory Variables$Mutation$UnmountVolume.fromJson( Map json) => - _$Variables$Mutation$UnmountVolumeMutationFromJson(json); + _$Variables$Mutation$UnmountVolumeFromJson(json); final String name; Map toJson() => - _$Variables$Mutation$UnmountVolumeMutationToJson(this); + _$Variables$Mutation$UnmountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); @@ -1496,7 +1402,7 @@ class Variables$Mutation$UnmountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UnmountVolumeMutation) || + if (!(other is Variables$Mutation$UnmountVolume) || runtimeType != other.runtimeType) return false; final l$name = name; final lOther$name = other.name; @@ -1504,66 +1410,25 @@ class Variables$Mutation$UnmountVolumeMutation { return true; } - CopyWith$Variables$Mutation$UnmountVolumeMutation< - Variables$Mutation$UnmountVolumeMutation> - get copyWith => - CopyWith$Variables$Mutation$UnmountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$UnmountVolumeMutation { - factory CopyWith$Variables$Mutation$UnmountVolumeMutation( - Variables$Mutation$UnmountVolumeMutation instance, - TRes Function(Variables$Mutation$UnmountVolumeMutation) then) = - _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation; - - factory CopyWith$Variables$Mutation$UnmountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation; - - TRes call({String? name}); -} - -class _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation - implements CopyWith$Variables$Mutation$UnmountVolumeMutation { - _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation( - this._instance, this._then); - - final Variables$Mutation$UnmountVolumeMutation _instance; - - final TRes Function(Variables$Mutation$UnmountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$UnmountVolumeMutation( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); -} - -class _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation - implements CopyWith$Variables$Mutation$UnmountVolumeMutation { - _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation(this._res); - - TRes _res; - - call({String? name}) => _res; + Variables$Mutation$UnmountVolume copyWith({String? name}) => + Variables$Mutation$UnmountVolume(name: name == null ? this.name : name); } @JsonSerializable(explicitToJson: true) -class Mutation$UnmountVolumeMutation { - Mutation$UnmountVolumeMutation( +class Mutation$UnmountVolume { + Mutation$UnmountVolume( {required this.unmountVolume, required this.$__typename}); @override - factory Mutation$UnmountVolumeMutation.fromJson(Map json) => - _$Mutation$UnmountVolumeMutationFromJson(json); + factory Mutation$UnmountVolume.fromJson(Map json) => + _$Mutation$UnmountVolumeFromJson(json); - final Mutation$UnmountVolumeMutation$unmountVolume unmountVolume; + final Mutation$UnmountVolume$unmountVolume unmountVolume; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UnmountVolumeMutationToJson(this); + Map toJson() => _$Mutation$UnmountVolumeToJson(this); int get hashCode { final l$unmountVolume = unmountVolume; final l$$__typename = $__typename; @@ -1573,8 +1438,8 @@ class Mutation$UnmountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UnmountVolumeMutation) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$UnmountVolume) || runtimeType != other.runtimeType) + return false; final l$unmountVolume = unmountVolume; final lOther$unmountVolume = other.unmountVolume; if (l$unmountVolume != lOther$unmountVolume) return false; @@ -1585,74 +1450,20 @@ class Mutation$UnmountVolumeMutation { } } -extension UtilityExtension$Mutation$UnmountVolumeMutation - on Mutation$UnmountVolumeMutation { - CopyWith$Mutation$UnmountVolumeMutation - get copyWith => CopyWith$Mutation$UnmountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Mutation$UnmountVolumeMutation { - factory CopyWith$Mutation$UnmountVolumeMutation( - Mutation$UnmountVolumeMutation instance, - TRes Function(Mutation$UnmountVolumeMutation) then) = - _CopyWithImpl$Mutation$UnmountVolumeMutation; - - factory CopyWith$Mutation$UnmountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Mutation$UnmountVolumeMutation; - - TRes call( - {Mutation$UnmountVolumeMutation$unmountVolume? unmountVolume, - String? $__typename}); - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume get unmountVolume; -} - -class _CopyWithImpl$Mutation$UnmountVolumeMutation - implements CopyWith$Mutation$UnmountVolumeMutation { - _CopyWithImpl$Mutation$UnmountVolumeMutation(this._instance, this._then); - - final Mutation$UnmountVolumeMutation _instance; - - final TRes Function(Mutation$UnmountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call( - {Object? unmountVolume = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$UnmountVolumeMutation( - unmountVolume: unmountVolume == _undefined || unmountVolume == null - ? _instance.unmountVolume - : (unmountVolume as Mutation$UnmountVolumeMutation$unmountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume - get unmountVolume { - final local$unmountVolume = _instance.unmountVolume; - return CopyWith$Mutation$UnmountVolumeMutation$unmountVolume( - local$unmountVolume, (e) => call(unmountVolume: e)); - } -} - -class _CopyWithStubImpl$Mutation$UnmountVolumeMutation - implements CopyWith$Mutation$UnmountVolumeMutation { - _CopyWithStubImpl$Mutation$UnmountVolumeMutation(this._res); - - TRes _res; - - call( - {Mutation$UnmountVolumeMutation$unmountVolume? unmountVolume, +extension UtilityExtension$Mutation$UnmountVolume on Mutation$UnmountVolume { + Mutation$UnmountVolume copyWith( + {Mutation$UnmountVolume$unmountVolume? unmountVolume, String? $__typename}) => - _res; - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume - get unmountVolume => - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume.stub(_res); + Mutation$UnmountVolume( + unmountVolume: + unmountVolume == null ? this.unmountVolume : unmountVolume, + $__typename: $__typename == null ? this.$__typename : $__typename); } -const documentNodeMutationUnmountVolumeMutation = DocumentNode(definitions: [ +const documentNodeMutationUnmountVolume = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.mutation, - name: NameNode(value: 'UnmountVolumeMutation'), + name: NameNode(value: 'UnmountVolume'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'name')), @@ -1673,24 +1484,9 @@ const documentNodeMutationUnmountVolumeMutation = DocumentNode(definitions: [ ], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -1705,25 +1501,26 @@ const documentNodeMutationUnmountVolumeMutation = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$UnmountVolumeMutation _parserFn$Mutation$UnmountVolumeMutation( +Mutation$UnmountVolume _parserFn$Mutation$UnmountVolume( Map data) => - Mutation$UnmountVolumeMutation.fromJson(data); -typedef OnMutationCompleted$Mutation$UnmountVolumeMutation = FutureOr - Function(dynamic, Mutation$UnmountVolumeMutation?); + Mutation$UnmountVolume.fromJson(data); +typedef OnMutationCompleted$Mutation$UnmountVolume = FutureOr Function( + dynamic, Mutation$UnmountVolume?); -class Options$Mutation$UnmountVolumeMutation - extends graphql.MutationOptions { - Options$Mutation$UnmountVolumeMutation( +class Options$Mutation$UnmountVolume + extends graphql.MutationOptions { + Options$Mutation$UnmountVolume( {String? operationName, - required Variables$Mutation$UnmountVolumeMutation variables, + required Variables$Mutation$UnmountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, graphql.Context? context, - OnMutationCompleted$Mutation$UnmountVolumeMutation? onCompleted, - graphql.OnMutationUpdate? update, + OnMutationCompleted$Mutation$UnmountVolume? onCompleted, + graphql.OnMutationUpdate? update, graphql.OnError? onError}) : onCompletedWithParsed = onCompleted, super( @@ -1740,14 +1537,13 @@ class Options$Mutation$UnmountVolumeMutation data, data == null ? null - : _parserFn$Mutation$UnmountVolumeMutation(data)), + : _parserFn$Mutation$UnmountVolume(data)), update: update, onError: onError, - document: documentNodeMutationUnmountVolumeMutation, - parserFn: _parserFn$Mutation$UnmountVolumeMutation); + document: documentNodeMutationUnmountVolume, + parserFn: _parserFn$Mutation$UnmountVolume); - final OnMutationCompleted$Mutation$UnmountVolumeMutation? - onCompletedWithParsed; + final OnMutationCompleted$Mutation$UnmountVolume? onCompletedWithParsed; @override List get properties => [ @@ -1758,11 +1554,11 @@ class Options$Mutation$UnmountVolumeMutation ]; } -class WatchOptions$Mutation$UnmountVolumeMutation - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UnmountVolumeMutation( +class WatchOptions$Mutation$UnmountVolume + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$UnmountVolume( {String? operationName, - required Variables$Mutation$UnmountVolumeMutation variables, + required Variables$Mutation$UnmountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -1780,38 +1576,36 @@ class WatchOptions$Mutation$UnmountVolumeMutation cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeMutationUnmountVolumeMutation, + document: documentNodeMutationUnmountVolume, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UnmountVolumeMutation); + parserFn: _parserFn$Mutation$UnmountVolume); } -extension ClientExtension$Mutation$UnmountVolumeMutation - on graphql.GraphQLClient { - Future> - mutate$UnmountVolumeMutation( - Options$Mutation$UnmountVolumeMutation options) async => - await this.mutate(options); - graphql.ObservableQuery - watchMutation$UnmountVolumeMutation( - WatchOptions$Mutation$UnmountVolumeMutation options) => - this.watchMutation(options); +extension ClientExtension$Mutation$UnmountVolume on graphql.GraphQLClient { + Future> mutate$UnmountVolume( + Options$Mutation$UnmountVolume options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$UnmountVolume( + WatchOptions$Mutation$UnmountVolume options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$UnmountVolumeMutation$unmountVolume { - Mutation$UnmountVolumeMutation$unmountVolume( +class Mutation$UnmountVolume$unmountVolume + implements Fragment$basicMutationReturnFields { + Mutation$UnmountVolume$unmountVolume( {required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Mutation$UnmountVolumeMutation$unmountVolume.fromJson( + factory Mutation$UnmountVolume$unmountVolume.fromJson( Map json) => - _$Mutation$UnmountVolumeMutation$unmountVolumeFromJson(json); + _$Mutation$UnmountVolume$unmountVolumeFromJson(json); final int code; @@ -1823,7 +1617,7 @@ class Mutation$UnmountVolumeMutation$unmountVolume { final String $__typename; Map toJson() => - _$Mutation$UnmountVolumeMutation$unmountVolumeToJson(this); + _$Mutation$UnmountVolume$unmountVolumeToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -1835,7 +1629,7 @@ class Mutation$UnmountVolumeMutation$unmountVolume { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UnmountVolumeMutation$unmountVolume) || + if (!(other is Mutation$UnmountVolume$unmountVolume) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; @@ -1853,63 +1647,544 @@ class Mutation$UnmountVolumeMutation$unmountVolume { } } -extension UtilityExtension$Mutation$UnmountVolumeMutation$unmountVolume - on Mutation$UnmountVolumeMutation$unmountVolume { - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume< - Mutation$UnmountVolumeMutation$unmountVolume> - get copyWith => - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume(this, (i) => i); +extension UtilityExtension$Mutation$UnmountVolume$unmountVolume + on Mutation$UnmountVolume$unmountVolume { + Mutation$UnmountVolume$unmountVolume copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$UnmountVolume$unmountVolume( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { - factory CopyWith$Mutation$UnmountVolumeMutation$unmountVolume( - Mutation$UnmountVolumeMutation$unmountVolume instance, - TRes Function(Mutation$UnmountVolumeMutation$unmountVolume) then) = - _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume; +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$MigrateToBinds { + Variables$Mutation$MigrateToBinds({required this.input}); - factory CopyWith$Mutation$UnmountVolumeMutation$unmountVolume.stub(TRes res) = - _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume; + @override + factory Variables$Mutation$MigrateToBinds.fromJson( + Map json) => + _$Variables$Mutation$MigrateToBindsFromJson(json); - TRes call({int? code, String? message, bool? success, String? $__typename}); + final Input$MigrateToBindsInput input; + + Map toJson() => + _$Variables$Mutation$MigrateToBindsToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$MigrateToBinds) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$MigrateToBinds copyWith( + {Input$MigrateToBindsInput? input}) => + Variables$Mutation$MigrateToBinds( + input: input == null ? this.input : input); } -class _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume - implements CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { - _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume( - this._instance, this._then); +@JsonSerializable(explicitToJson: true) +class Mutation$MigrateToBinds { + Mutation$MigrateToBinds( + {required this.migrateToBinds, required this.$__typename}); - final Mutation$UnmountVolumeMutation$unmountVolume _instance; + @override + factory Mutation$MigrateToBinds.fromJson(Map json) => + _$Mutation$MigrateToBindsFromJson(json); - final TRes Function(Mutation$UnmountVolumeMutation$unmountVolume) _then; + final Mutation$MigrateToBinds$migrateToBinds migrateToBinds; - static const _undefined = {}; + @JsonKey(name: '__typename') + final String $__typename; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$UnmountVolumeMutation$unmountVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + Map toJson() => _$Mutation$MigrateToBindsToJson(this); + int get hashCode { + final l$migrateToBinds = migrateToBinds; + final l$$__typename = $__typename; + return Object.hashAll([l$migrateToBinds, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MigrateToBinds) || runtimeType != other.runtimeType) + return false; + final l$migrateToBinds = migrateToBinds; + final lOther$migrateToBinds = other.migrateToBinds; + if (l$migrateToBinds != lOther$migrateToBinds) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } } -class _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume - implements CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { - _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume(this._res); - - TRes _res; - - call({int? code, String? message, bool? success, String? $__typename}) => - _res; +extension UtilityExtension$Mutation$MigrateToBinds on Mutation$MigrateToBinds { + Mutation$MigrateToBinds copyWith( + {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, + String? $__typename}) => + Mutation$MigrateToBinds( + migrateToBinds: + migrateToBinds == null ? this.migrateToBinds : migrateToBinds, + $__typename: $__typename == null ? this.$__typename : $__typename); } + +const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'MigrateToBinds'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MigrateToBindsInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'migrateToBinds'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'job'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds( + Map data) => + Mutation$MigrateToBinds.fromJson(data); +typedef OnMutationCompleted$Mutation$MigrateToBinds = FutureOr Function( + dynamic, Mutation$MigrateToBinds?); + +class Options$Mutation$MigrateToBinds + extends graphql.MutationOptions { + Options$Mutation$MigrateToBinds( + {String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MigrateToBinds? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$MigrateToBinds(data)), + update: update, + onError: onError, + document: documentNodeMutationMigrateToBinds, + parserFn: _parserFn$Mutation$MigrateToBinds); + + final OnMutationCompleted$Mutation$MigrateToBinds? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$MigrateToBinds + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$MigrateToBinds( + {String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMigrateToBinds, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MigrateToBinds); +} + +extension ClientExtension$Mutation$MigrateToBinds on graphql.GraphQLClient { + Future> mutate$MigrateToBinds( + Options$Mutation$MigrateToBinds options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$MigrateToBinds( + WatchOptions$Mutation$MigrateToBinds options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MigrateToBinds$migrateToBinds + implements Fragment$basicMutationReturnFields { + Mutation$MigrateToBinds$migrateToBinds( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job}); + + @override + factory Mutation$MigrateToBinds$migrateToBinds.fromJson( + Map json) => + _$Mutation$MigrateToBinds$migrateToBindsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$MigrateToBinds$migrateToBinds$job? job; + + Map toJson() => + _$Mutation$MigrateToBinds$migrateToBindsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$job = job; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MigrateToBinds$migrateToBinds) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$job = job; + final lOther$job = other.job; + if (l$job != lOther$job) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds + on Mutation$MigrateToBinds$migrateToBinds { + Mutation$MigrateToBinds$migrateToBinds copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MigrateToBinds$migrateToBinds$job? Function()? job}) => + Mutation$MigrateToBinds$migrateToBinds( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + job: job == null ? this.job : job()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MigrateToBinds$migrateToBinds$job { + Mutation$MigrateToBinds$migrateToBinds$job( + {required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename}); + + @override + factory Mutation$MigrateToBinds$migrateToBinds$job.fromJson( + Map json) => + _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson(json); + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime createdAt; + + final String description; + + final String? error; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? finishedAt; + + final String name; + + final int? progress; + + final String? result; + + final String status; + + final String? statusText; + + final String uid; + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime updatedAt; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$MigrateToBinds$migrateToBinds$jobToJson(this); + int get hashCode { + final l$createdAt = createdAt; + final l$description = description; + final l$error = error; + final l$finishedAt = finishedAt; + final l$name = name; + final l$progress = progress; + final l$result = result; + final l$status = status; + final l$statusText = statusText; + final l$uid = uid; + final l$updatedAt = updatedAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$createdAt, + l$description, + l$error, + l$finishedAt, + l$name, + l$progress, + l$result, + l$status, + l$statusText, + l$uid, + l$updatedAt, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MigrateToBinds$migrateToBinds$job) || + runtimeType != other.runtimeType) return false; + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$error = error; + final lOther$error = other.error; + if (l$error != lOther$error) return false; + final l$finishedAt = finishedAt; + final lOther$finishedAt = other.finishedAt; + if (l$finishedAt != lOther$finishedAt) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$progress = progress; + final lOther$progress = other.progress; + if (l$progress != lOther$progress) return false; + final l$result = result; + final lOther$result = other.result; + if (l$result != lOther$result) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$statusText = statusText; + final lOther$statusText = other.statusText; + if (l$statusText != lOther$statusText) return false; + final l$uid = uid; + final lOther$uid = other.uid; + if (l$uid != lOther$uid) return false; + final l$updatedAt = updatedAt; + final lOther$updatedAt = other.updatedAt; + if (l$updatedAt != lOther$updatedAt) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds$job + on Mutation$MigrateToBinds$migrateToBinds$job { + Mutation$MigrateToBinds$migrateToBinds$job copyWith( + {DateTime? createdAt, + String? description, + String? Function()? error, + DateTime? Function()? finishedAt, + String? name, + int? Function()? progress, + String? Function()? result, + String? status, + String? Function()? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}) => + Mutation$MigrateToBinds$migrateToBinds$job( + createdAt: createdAt == null ? this.createdAt : createdAt, + description: description == null ? this.description : description, + error: error == null ? this.error : error(), + finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), + name: name == null ? this.name : name, + progress: progress == null ? this.progress : progress(), + result: result == null ? this.result : result(), + status: status == null ? this.status : status, + statusText: statusText == null ? this.statusText : statusText(), + uid: uid == null ? this.uid : uid, + updatedAt: updatedAt == null ? this.updatedAt : updatedAt, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +DateTime? _nullable$dateTimeFromJson(dynamic data) => + data == null ? null : dateTimeFromJson(data); +dynamic _nullable$dateTimeToJson(DateTime? data) => + data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart index 49a749fe..c1ab4fba 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart @@ -6,57 +6,78 @@ part of 'disk_volumes.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** -Query$GetServerDiskVolumesQuery _$Query$GetServerDiskVolumesQueryFromJson( +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( Map json) => - Query$GetServerDiskVolumesQuery( - storage: Query$GetServerDiskVolumesQuery$storage.fromJson( + Fragment$basicMutationReturnFields( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumes _$Query$GetServerDiskVolumesFromJson( + Map json) => + Query$GetServerDiskVolumes( + storage: Query$GetServerDiskVolumes$storage.fromJson( json['storage'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetServerDiskVolumesQueryToJson( - Query$GetServerDiskVolumesQuery instance) => +Map _$Query$GetServerDiskVolumesToJson( + Query$GetServerDiskVolumes instance) => { 'storage': instance.storage.toJson(), '__typename': instance.$__typename, }; -Query$GetServerDiskVolumesQuery$storage - _$Query$GetServerDiskVolumesQuery$storageFromJson( - Map json) => - Query$GetServerDiskVolumesQuery$storage( - volumes: (json['volumes'] as List) - .map((e) => - Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); +Query$GetServerDiskVolumes$storage _$Query$GetServerDiskVolumes$storageFromJson( + Map json) => + Query$GetServerDiskVolumes$storage( + volumes: (json['volumes'] as List) + .map((e) => Query$GetServerDiskVolumes$storage$volumes.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); -Map _$Query$GetServerDiskVolumesQuery$storageToJson( - Query$GetServerDiskVolumesQuery$storage instance) => +Map _$Query$GetServerDiskVolumes$storageToJson( + Query$GetServerDiskVolumes$storage instance) => { 'volumes': instance.volumes.map((e) => e.toJson()).toList(), '__typename': instance.$__typename, }; -Query$GetServerDiskVolumesQuery$storage$volumes - _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson( +Query$GetServerDiskVolumes$storage$volumes + _$Query$GetServerDiskVolumes$storage$volumesFromJson( Map json) => - Query$GetServerDiskVolumesQuery$storage$volumes( + Query$GetServerDiskVolumes$storage$volumes( freeSpace: json['freeSpace'] as String, - model: json['model'] as String, + model: json['model'] as String?, name: json['name'] as String, root: json['root'] as bool, - serial: json['serial'] as String, + serial: json['serial'] as String?, totalSpace: json['totalSpace'] as String, type: json['type'] as String, + usages: (json['usages'] as List) + .map((e) => + Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( + e as Map)) + .toList(), usedSpace: json['usedSpace'] as String, $__typename: json['__typename'] as String, ); -Map _$Query$GetServerDiskVolumesQuery$storage$volumesToJson( - Query$GetServerDiskVolumesQuery$storage$volumes instance) => +Map _$Query$GetServerDiskVolumes$storage$volumesToJson( + Query$GetServerDiskVolumes$storage$volumes instance) => { 'freeSpace': instance.freeSpace, 'model': instance.model, @@ -65,50 +86,111 @@ Map _$Query$GetServerDiskVolumesQuery$storage$volumesToJson( 'serial': instance.serial, 'totalSpace': instance.totalSpace, 'type': instance.type, + 'usages': instance.usages.map((e) => e.toJson()).toList(), 'usedSpace': instance.usedSpace, '__typename': instance.$__typename, }; -Variables$Mutation$MountVolumeMutation - _$Variables$Mutation$MountVolumeMutationFromJson( +Query$GetServerDiskVolumes$storage$volumes$usages + _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( Map json) => - Variables$Mutation$MountVolumeMutation( - name: json['name'] as String, + Query$GetServerDiskVolumes$storage$volumes$usages( + title: json['title'] as String, + usedSpace: json['usedSpace'] as String, + $__typename: json['__typename'] as String, ); -Map _$Variables$Mutation$MountVolumeMutationToJson( - Variables$Mutation$MountVolumeMutation instance) => +Map _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson( + Query$GetServerDiskVolumes$storage$volumes$usages instance) => + { + 'title': instance.title, + 'usedSpace': instance.usedSpace, + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( + Map json) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + title: json['title'] as String, + usedSpace: json['usedSpace'] as String, + $__typename: json['__typename'] as String, + service: json['service'] == null + ? null + : Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + .fromJson(json['service'] as Map), + ); + +Map + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + instance) => + { + 'title': instance.title, + 'usedSpace': instance.usedSpace, + '__typename': instance.$__typename, + 'service': instance.service?.toJson(), + }; + +Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( + Map json) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + id: json['id'] as String, + isMovable: json['isMovable'] as bool, + displayName: json['displayName'] as String, + $__typename: json['__typename'] as String, + ); + +Map + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + instance) => + { + 'id': instance.id, + 'isMovable': instance.isMovable, + 'displayName': instance.displayName, + '__typename': instance.$__typename, + }; + +Variables$Mutation$MountVolume _$Variables$Mutation$MountVolumeFromJson( + Map json) => + Variables$Mutation$MountVolume( + name: json['name'] as String, + ); + +Map _$Variables$Mutation$MountVolumeToJson( + Variables$Mutation$MountVolume instance) => { 'name': instance.name, }; -Mutation$MountVolumeMutation _$Mutation$MountVolumeMutationFromJson( +Mutation$MountVolume _$Mutation$MountVolumeFromJson( Map json) => - Mutation$MountVolumeMutation( - mountVolume: Mutation$MountVolumeMutation$mountVolume.fromJson( + Mutation$MountVolume( + mountVolume: Mutation$MountVolume$mountVolume.fromJson( json['mountVolume'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$MountVolumeMutationToJson( - Mutation$MountVolumeMutation instance) => +Map _$Mutation$MountVolumeToJson( + Mutation$MountVolume instance) => { 'mountVolume': instance.mountVolume.toJson(), '__typename': instance.$__typename, }; -Mutation$MountVolumeMutation$mountVolume - _$Mutation$MountVolumeMutation$mountVolumeFromJson( - Map json) => - Mutation$MountVolumeMutation$mountVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); +Mutation$MountVolume$mountVolume _$Mutation$MountVolume$mountVolumeFromJson( + Map json) => + Mutation$MountVolume$mountVolume( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); -Map _$Mutation$MountVolumeMutation$mountVolumeToJson( - Mutation$MountVolumeMutation$mountVolume instance) => +Map _$Mutation$MountVolume$mountVolumeToJson( + Mutation$MountVolume$mountVolume instance) => { 'code': instance.code, 'message': instance.message, @@ -116,46 +198,44 @@ Map _$Mutation$MountVolumeMutation$mountVolumeToJson( '__typename': instance.$__typename, }; -Variables$Mutation$ResizeVolumeMutation - _$Variables$Mutation$ResizeVolumeMutationFromJson( - Map json) => - Variables$Mutation$ResizeVolumeMutation( - name: json['name'] as String, - ); +Variables$Mutation$ResizeVolume _$Variables$Mutation$ResizeVolumeFromJson( + Map json) => + Variables$Mutation$ResizeVolume( + name: json['name'] as String, + ); -Map _$Variables$Mutation$ResizeVolumeMutationToJson( - Variables$Mutation$ResizeVolumeMutation instance) => +Map _$Variables$Mutation$ResizeVolumeToJson( + Variables$Mutation$ResizeVolume instance) => { 'name': instance.name, }; -Mutation$ResizeVolumeMutation _$Mutation$ResizeVolumeMutationFromJson( +Mutation$ResizeVolume _$Mutation$ResizeVolumeFromJson( Map json) => - Mutation$ResizeVolumeMutation( - resizeVolume: Mutation$ResizeVolumeMutation$resizeVolume.fromJson( + Mutation$ResizeVolume( + resizeVolume: Mutation$ResizeVolume$resizeVolume.fromJson( json['resizeVolume'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$ResizeVolumeMutationToJson( - Mutation$ResizeVolumeMutation instance) => +Map _$Mutation$ResizeVolumeToJson( + Mutation$ResizeVolume instance) => { 'resizeVolume': instance.resizeVolume.toJson(), '__typename': instance.$__typename, }; -Mutation$ResizeVolumeMutation$resizeVolume - _$Mutation$ResizeVolumeMutation$resizeVolumeFromJson( - Map json) => - Mutation$ResizeVolumeMutation$resizeVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); +Mutation$ResizeVolume$resizeVolume _$Mutation$ResizeVolume$resizeVolumeFromJson( + Map json) => + Mutation$ResizeVolume$resizeVolume( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); -Map _$Mutation$ResizeVolumeMutation$resizeVolumeToJson( - Mutation$ResizeVolumeMutation$resizeVolume instance) => +Map _$Mutation$ResizeVolume$resizeVolumeToJson( + Mutation$ResizeVolume$resizeVolume instance) => { 'code': instance.code, 'message': instance.message, @@ -163,49 +243,134 @@ Map _$Mutation$ResizeVolumeMutation$resizeVolumeToJson( '__typename': instance.$__typename, }; -Variables$Mutation$UnmountVolumeMutation - _$Variables$Mutation$UnmountVolumeMutationFromJson( - Map json) => - Variables$Mutation$UnmountVolumeMutation( - name: json['name'] as String, - ); +Variables$Mutation$UnmountVolume _$Variables$Mutation$UnmountVolumeFromJson( + Map json) => + Variables$Mutation$UnmountVolume( + name: json['name'] as String, + ); -Map _$Variables$Mutation$UnmountVolumeMutationToJson( - Variables$Mutation$UnmountVolumeMutation instance) => +Map _$Variables$Mutation$UnmountVolumeToJson( + Variables$Mutation$UnmountVolume instance) => { 'name': instance.name, }; -Mutation$UnmountVolumeMutation _$Mutation$UnmountVolumeMutationFromJson( +Mutation$UnmountVolume _$Mutation$UnmountVolumeFromJson( Map json) => - Mutation$UnmountVolumeMutation( - unmountVolume: Mutation$UnmountVolumeMutation$unmountVolume.fromJson( + Mutation$UnmountVolume( + unmountVolume: Mutation$UnmountVolume$unmountVolume.fromJson( json['unmountVolume'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$UnmountVolumeMutationToJson( - Mutation$UnmountVolumeMutation instance) => +Map _$Mutation$UnmountVolumeToJson( + Mutation$UnmountVolume instance) => { 'unmountVolume': instance.unmountVolume.toJson(), '__typename': instance.$__typename, }; -Mutation$UnmountVolumeMutation$unmountVolume - _$Mutation$UnmountVolumeMutation$unmountVolumeFromJson( - Map json) => - Mutation$UnmountVolumeMutation$unmountVolume( +Mutation$UnmountVolume$unmountVolume + _$Mutation$UnmountVolume$unmountVolumeFromJson(Map json) => + Mutation$UnmountVolume$unmountVolume( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Mutation$UnmountVolumeMutation$unmountVolumeToJson( - Mutation$UnmountVolumeMutation$unmountVolume instance) => +Map _$Mutation$UnmountVolume$unmountVolumeToJson( + Mutation$UnmountVolume$unmountVolume instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; + +Variables$Mutation$MigrateToBinds _$Variables$Mutation$MigrateToBindsFromJson( + Map json) => + Variables$Mutation$MigrateToBinds( + input: Input$MigrateToBindsInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$MigrateToBindsToJson( + Variables$Mutation$MigrateToBinds instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$MigrateToBinds _$Mutation$MigrateToBindsFromJson( + Map json) => + Mutation$MigrateToBinds( + migrateToBinds: Mutation$MigrateToBinds$migrateToBinds.fromJson( + json['migrateToBinds'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MigrateToBindsToJson( + Mutation$MigrateToBinds instance) => + { + 'migrateToBinds': instance.migrateToBinds.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$MigrateToBinds$migrateToBinds + _$Mutation$MigrateToBinds$migrateToBindsFromJson( + Map json) => + Mutation$MigrateToBinds$migrateToBinds( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + job: json['job'] == null + ? null + : Mutation$MigrateToBinds$migrateToBinds$job.fromJson( + json['job'] as Map), + ); + +Map _$Mutation$MigrateToBinds$migrateToBindsToJson( + Mutation$MigrateToBinds$migrateToBinds instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'job': instance.job?.toJson(), + }; + +Mutation$MigrateToBinds$migrateToBinds$job + _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson( + Map json) => + Mutation$MigrateToBinds$migrateToBinds$job( + createdAt: dateTimeFromJson(json['createdAt']), + description: json['description'] as String, + error: json['error'] as String?, + finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), + name: json['name'] as String, + progress: json['progress'] as int?, + result: json['result'] as String?, + status: json['status'] as String, + statusText: json['statusText'] as String?, + uid: json['uid'] as String, + updatedAt: dateTimeFromJson(json['updatedAt']), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MigrateToBinds$migrateToBinds$jobToJson( + Mutation$MigrateToBinds$migrateToBinds$job instance) => + { + 'createdAt': dateTimeToJson(instance.createdAt), + 'description': instance.description, + 'error': instance.error, + 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), + 'name': instance.name, + 'progress': instance.progress, + 'result': instance.result, + 'status': instance.status, + 'statusText': instance.statusText, + 'uid': instance.uid, + 'updatedAt': dateTimeToJson(instance.updatedAt), + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 81ab4bc5..2f60c969 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -1,63 +1,76 @@ -scalar DateTime - type Alert { - severity: Severity! - title: String! message: String! + severity: Severity! timestamp: DateTime -} - -type StorageVolume { - freeSpace: String! - model: String! - name: String! - root: Boolean! - serial: String! - totalSpace: String! - type: String! - usedSpace: String! -} - -type Storage { - volumes: [StorageVolume!]! + title: String! } type Api { - version: String! devices: [ApiDevice!]! recoveryKey: ApiRecoveryKeyStatus! + version: String! } type ApiDevice { - name: String! creationDate: DateTime! isCaller: Boolean! + name: String! +} + +type ApiJob { + createdAt: DateTime! + description: String! + error: String + finishedAt: DateTime + name: String! + progress: Int + result: String + status: String! + statusText: String + uid: String! + updatedAt: DateTime! } type ApiKeyMutationReturn implements MutationReturnInterface { - success: Boolean! - message: String! code: Int! key: String + message: String! + success: Boolean! } type ApiRecoveryKeyStatus { - exists: Boolean! - valid: Boolean! creationDate: DateTime + exists: Boolean! expirationDate: DateTime usesLeft: Int + valid: Boolean! } type AutoUpgradeOptions { - enable: Boolean! allowReboot: Boolean! + enable: Boolean! } -type DeviceApiTokenMutationReturn implements MutationReturnInterface { - success: Boolean! - message: String! +input AutoUpgradeSettingsInput { + enableAutoUpgrade: Boolean = null + allowReboot: Boolean = null +} + +type AutoUpgradeSettingsMutationReturn implements MutationReturnInterface { + allowReboot: Boolean! code: Int! + enableAutoUpgrade: Boolean! + message: String! + success: Boolean! +} + +"""Date with time (isoformat)""" +scalar DateTime + +type DeviceApiTokenMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + success: Boolean! token: String } @@ -66,59 +79,163 @@ enum DnsProvider { } type DnsRecord { - recordType: String! - name: String! content: String! - ttl: Int! + name: String! priority: Int + recordType: String! + ttl: Int! +} + +type GenericJobButationReturn implements MutationReturnInterface { + code: Int! + job: ApiJob + message: String! + success: Boolean! } type GenericMutationReturn implements MutationReturnInterface { - success: Boolean! - message: String! code: Int! + message: String! + success: Boolean! +} + +type Job { + getJob(jobId: String!): ApiJob + getJobs: [ApiJob!]! +} + +input MigrateToBindsInput { + emailBlockDevice: String! + bitwardenBlockDevice: String! + giteaBlockDevice: String! + nextcloudBlockDevice: String! + pleromaBlockDevice: String! +} + +input MoveServiceInput { + serviceId: String! + location: String! } type Mutation { - getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput!): ApiKeyMutationReturn! - useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! - refreshDeviceApiToken: DeviceApiTokenMutationReturn! - deleteDeviceApiToken(device: String!): GenericMutationReturn! - getNewDeviceApiKey: ApiKeyMutationReturn! - invalidateNewDeviceApiKey: GenericMutationReturn! + addSshKey(sshInput: SshMutationInput!): UserMutationReturn! authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! - resizeVolume(name: String!): GenericMutationReturn! - unmountVolume(name: String!): GenericMutationReturn! + changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! + changeTimezone(timezone: String!): TimezoneMutationReturn! + createUser(user: UserMutationInput!): UserMutationReturn! + deleteDeviceApiToken(device: String!): GenericMutationReturn! + deleteUser(username: String!): GenericMutationReturn! + disableService(serviceId: String!): ServiceMutationReturn! + enableService(serviceId: String!): ServiceMutationReturn! + getNewDeviceApiKey: ApiKeyMutationReturn! + getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput = null): ApiKeyMutationReturn! + invalidateNewDeviceApiKey: GenericMutationReturn! + migrateToBinds(input: MigrateToBindsInput!): GenericJobButationReturn! mountVolume(name: String!): GenericMutationReturn! + moveService(input: MoveServiceInput!): ServiceJobMutationReturn! + pullRepositoryChanges: GenericMutationReturn! + rebootSystem: GenericMutationReturn! + refreshDeviceApiToken: DeviceApiTokenMutationReturn! + removeJob(jobId: String!): GenericMutationReturn! + removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! + resizeVolume(name: String!): GenericMutationReturn! + restartService(serviceId: String!): ServiceMutationReturn! + runSystemRebuild: GenericMutationReturn! + runSystemRollback: GenericMutationReturn! + runSystemUpgrade: GenericMutationReturn! + startService(serviceId: String!): ServiceMutationReturn! + stopService(serviceId: String!): ServiceMutationReturn! + testMutation: GenericMutationReturn! + unmountVolume(name: String!): GenericMutationReturn! + updateUser(user: UserMutationInput!): UserMutationReturn! + useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! } interface MutationReturnInterface { - success: Boolean! - message: String! code: Int! + message: String! + success: Boolean! } type Query { - system: System! - storage: Storage! api: Api! + jobs: Job! + services: Services! + storage: Storage! + system: System! + users: Users! } input RecoveryKeyLimitsInput { - expirationDate: DateTime - uses: Int + expirationDate: DateTime = null + uses: Int = null } enum ServerProvider { HETZNER } +type Service { + description: String! + displayName: String! + dnsRecords: [DnsRecord!] + id: String! + isEnabled: Boolean! + isMovable: Boolean! + isRequired: Boolean! + status: ServiceStatusEnum! + storageUsage: ServiceStorageUsage! + svgIcon: String! + url: String +} + +type ServiceJobMutationReturn implements MutationReturnInterface { + code: Int! + job: ApiJob + message: String! + service: Service + success: Boolean! +} + +type ServiceMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + service: Service + success: Boolean! +} + +enum ServiceStatusEnum { + ACTIVATING + ACTIVE + DEACTIVATING + FAILED + INACTIVE + OFF + RELOADING +} + +type ServiceStorageUsage implements StorageUsageInterface { + service: Service + title: String! + usedSpace: String! + volume: StorageVolume +} + +type Services { + allServices: [Service!]! +} + enum Severity { - INFO - WARNING - ERROR CRITICAL + ERROR + INFO SUCCESS + WARNING +} + +input SshMutationInput { + username: String! + sshKey: String! } type SshSettings { @@ -127,13 +244,40 @@ type SshSettings { rootSshKeys: [String!]! } +type Storage { + volumes: [StorageVolume!]! +} + +interface StorageUsageInterface { + title: String! + usedSpace: String! + volume: StorageVolume +} + +type StorageVolume { + freeSpace: String! + model: String + name: String! + root: Boolean! + serial: String + totalSpace: String! + type: String! + usages: [StorageUsageInterface!]! + usedSpace: String! +} + +type Subscription { + count(target: Int! = 100): Int! +} + type System { - status: Alert! - domain: SystemDomainInfo! - settings: SystemSettings! + busy: Boolean! + domainInfo: SystemDomainInfo! info: SystemInfo! provider: SystemProviderInfo! - busy: Boolean! + settings: SystemSettings! + status: Alert! + workingDirectory: String! } type SystemDomainInfo { @@ -144,13 +288,14 @@ type SystemDomainInfo { } type SystemInfo { - systemVersion: String! pythonVersion: String! + systemVersion: String! + usingBinds: Boolean! } type SystemProviderInfo { - provider: ServerProvider! id: String! + provider: ServerProvider! } type SystemSettings { @@ -159,6 +304,13 @@ type SystemSettings { timezone: String! } +type TimezoneMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + success: Boolean! + timezone: String +} + input UseNewDeviceKeyInput { key: String! deviceName: String! @@ -167,4 +319,33 @@ input UseNewDeviceKeyInput { input UseRecoveryKeyInput { key: String! deviceName: String! +} + +type User { + sshKeys: [String!]! + userType: UserType! + username: String! +} + +input UserMutationInput { + username: String! + password: String! +} + +type UserMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + success: Boolean! + user: User +} + +enum UserType { + NORMAL + PRIMARY + ROOT +} + +type Users { + allUsers: [User!]! + getUser(username: String!): User } \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 27f902e2..cd86d73a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -2,6 +2,174 @@ import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; part 'schema.graphql.g.dart'; +@JsonSerializable(explicitToJson: true) +class Input$AutoUpgradeSettingsInput { + Input$AutoUpgradeSettingsInput({this.enableAutoUpgrade, this.allowReboot}); + + @override + factory Input$AutoUpgradeSettingsInput.fromJson(Map json) => + _$Input$AutoUpgradeSettingsInputFromJson(json); + + final bool? enableAutoUpgrade; + + final bool? allowReboot; + + Map toJson() => _$Input$AutoUpgradeSettingsInputToJson(this); + int get hashCode { + final l$enableAutoUpgrade = enableAutoUpgrade; + final l$allowReboot = allowReboot; + return Object.hashAll([l$enableAutoUpgrade, l$allowReboot]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$AutoUpgradeSettingsInput) || + runtimeType != other.runtimeType) return false; + final l$enableAutoUpgrade = enableAutoUpgrade; + final lOther$enableAutoUpgrade = other.enableAutoUpgrade; + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (l$allowReboot != lOther$allowReboot) return false; + return true; + } + + Input$AutoUpgradeSettingsInput copyWith( + {bool? Function()? enableAutoUpgrade, + bool? Function()? allowReboot}) => + Input$AutoUpgradeSettingsInput( + enableAutoUpgrade: enableAutoUpgrade == null + ? this.enableAutoUpgrade + : enableAutoUpgrade(), + allowReboot: allowReboot == null ? this.allowReboot : allowReboot()); +} + +@JsonSerializable(explicitToJson: true) +class Input$MigrateToBindsInput { + Input$MigrateToBindsInput( + {required this.emailBlockDevice, + required this.bitwardenBlockDevice, + required this.giteaBlockDevice, + required this.nextcloudBlockDevice, + required this.pleromaBlockDevice}); + + @override + factory Input$MigrateToBindsInput.fromJson(Map json) => + _$Input$MigrateToBindsInputFromJson(json); + + final String emailBlockDevice; + + final String bitwardenBlockDevice; + + final String giteaBlockDevice; + + final String nextcloudBlockDevice; + + final String pleromaBlockDevice; + + Map toJson() => _$Input$MigrateToBindsInputToJson(this); + int get hashCode { + final l$emailBlockDevice = emailBlockDevice; + final l$bitwardenBlockDevice = bitwardenBlockDevice; + final l$giteaBlockDevice = giteaBlockDevice; + final l$nextcloudBlockDevice = nextcloudBlockDevice; + final l$pleromaBlockDevice = pleromaBlockDevice; + return Object.hashAll([ + l$emailBlockDevice, + l$bitwardenBlockDevice, + l$giteaBlockDevice, + l$nextcloudBlockDevice, + l$pleromaBlockDevice + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$MigrateToBindsInput) || + runtimeType != other.runtimeType) return false; + final l$emailBlockDevice = emailBlockDevice; + final lOther$emailBlockDevice = other.emailBlockDevice; + if (l$emailBlockDevice != lOther$emailBlockDevice) return false; + final l$bitwardenBlockDevice = bitwardenBlockDevice; + final lOther$bitwardenBlockDevice = other.bitwardenBlockDevice; + if (l$bitwardenBlockDevice != lOther$bitwardenBlockDevice) return false; + final l$giteaBlockDevice = giteaBlockDevice; + final lOther$giteaBlockDevice = other.giteaBlockDevice; + if (l$giteaBlockDevice != lOther$giteaBlockDevice) return false; + final l$nextcloudBlockDevice = nextcloudBlockDevice; + final lOther$nextcloudBlockDevice = other.nextcloudBlockDevice; + if (l$nextcloudBlockDevice != lOther$nextcloudBlockDevice) return false; + final l$pleromaBlockDevice = pleromaBlockDevice; + final lOther$pleromaBlockDevice = other.pleromaBlockDevice; + if (l$pleromaBlockDevice != lOther$pleromaBlockDevice) return false; + return true; + } + + Input$MigrateToBindsInput copyWith( + {String? emailBlockDevice, + String? bitwardenBlockDevice, + String? giteaBlockDevice, + String? nextcloudBlockDevice, + String? pleromaBlockDevice}) => + Input$MigrateToBindsInput( + emailBlockDevice: emailBlockDevice == null + ? this.emailBlockDevice + : emailBlockDevice, + bitwardenBlockDevice: bitwardenBlockDevice == null + ? this.bitwardenBlockDevice + : bitwardenBlockDevice, + giteaBlockDevice: giteaBlockDevice == null + ? this.giteaBlockDevice + : giteaBlockDevice, + nextcloudBlockDevice: nextcloudBlockDevice == null + ? this.nextcloudBlockDevice + : nextcloudBlockDevice, + pleromaBlockDevice: pleromaBlockDevice == null + ? this.pleromaBlockDevice + : pleromaBlockDevice); +} + +@JsonSerializable(explicitToJson: true) +class Input$MoveServiceInput { + Input$MoveServiceInput({required this.serviceId, required this.location}); + + @override + factory Input$MoveServiceInput.fromJson(Map json) => + _$Input$MoveServiceInputFromJson(json); + + final String serviceId; + + final String location; + + Map toJson() => _$Input$MoveServiceInputToJson(this); + int get hashCode { + final l$serviceId = serviceId; + final l$location = location; + return Object.hashAll([l$serviceId, l$location]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$MoveServiceInput) || runtimeType != other.runtimeType) + return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + final l$location = location; + final lOther$location = other.location; + if (l$location != lOther$location) return false; + return true; + } + + Input$MoveServiceInput copyWith({String? serviceId, String? location}) => + Input$MoveServiceInput( + serviceId: serviceId == null ? this.serviceId : serviceId, + location: location == null ? this.location : location); +} + @JsonSerializable(explicitToJson: true) class Input$RecoveryKeyLimitsInput { Input$RecoveryKeyLimitsInput({this.expirationDate, this.uses}); @@ -37,47 +205,51 @@ class Input$RecoveryKeyLimitsInput { return true; } - CopyWith$Input$RecoveryKeyLimitsInput - get copyWith => CopyWith$Input$RecoveryKeyLimitsInput(this, (i) => i); + Input$RecoveryKeyLimitsInput copyWith( + {DateTime? Function()? expirationDate, int? Function()? uses}) => + Input$RecoveryKeyLimitsInput( + expirationDate: + expirationDate == null ? this.expirationDate : expirationDate(), + uses: uses == null ? this.uses : uses()); } -abstract class CopyWith$Input$RecoveryKeyLimitsInput { - factory CopyWith$Input$RecoveryKeyLimitsInput( - Input$RecoveryKeyLimitsInput instance, - TRes Function(Input$RecoveryKeyLimitsInput) then) = - _CopyWithImpl$Input$RecoveryKeyLimitsInput; +@JsonSerializable(explicitToJson: true) +class Input$SshMutationInput { + Input$SshMutationInput({required this.username, required this.sshKey}); - factory CopyWith$Input$RecoveryKeyLimitsInput.stub(TRes res) = - _CopyWithStubImpl$Input$RecoveryKeyLimitsInput; + @override + factory Input$SshMutationInput.fromJson(Map json) => + _$Input$SshMutationInputFromJson(json); - TRes call({DateTime? expirationDate, int? uses}); -} + final String username; -class _CopyWithImpl$Input$RecoveryKeyLimitsInput - implements CopyWith$Input$RecoveryKeyLimitsInput { - _CopyWithImpl$Input$RecoveryKeyLimitsInput(this._instance, this._then); + final String sshKey; - final Input$RecoveryKeyLimitsInput _instance; + Map toJson() => _$Input$SshMutationInputToJson(this); + int get hashCode { + final l$username = username; + final l$sshKey = sshKey; + return Object.hashAll([l$username, l$sshKey]); + } - final TRes Function(Input$RecoveryKeyLimitsInput) _then; + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$SshMutationInput) || runtimeType != other.runtimeType) + return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$sshKey = sshKey; + final lOther$sshKey = other.sshKey; + if (l$sshKey != lOther$sshKey) return false; + return true; + } - static const _undefined = {}; - - TRes call({Object? expirationDate = _undefined, Object? uses = _undefined}) => - _then(Input$RecoveryKeyLimitsInput( - expirationDate: expirationDate == _undefined - ? _instance.expirationDate - : (expirationDate as DateTime?), - uses: uses == _undefined ? _instance.uses : (uses as int?))); -} - -class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput - implements CopyWith$Input$RecoveryKeyLimitsInput { - _CopyWithStubImpl$Input$RecoveryKeyLimitsInput(this._res); - - TRes _res; - - call({DateTime? expirationDate, int? uses}) => _res; + Input$SshMutationInput copyWith({String? username, String? sshKey}) => + Input$SshMutationInput( + username: username == null ? this.username : username, + sshKey: sshKey == null ? this.sshKey : sshKey); } @JsonSerializable(explicitToJson: true) @@ -113,49 +285,10 @@ class Input$UseNewDeviceKeyInput { return true; } - CopyWith$Input$UseNewDeviceKeyInput - get copyWith => CopyWith$Input$UseNewDeviceKeyInput(this, (i) => i); -} - -abstract class CopyWith$Input$UseNewDeviceKeyInput { - factory CopyWith$Input$UseNewDeviceKeyInput( - Input$UseNewDeviceKeyInput instance, - TRes Function(Input$UseNewDeviceKeyInput) then) = - _CopyWithImpl$Input$UseNewDeviceKeyInput; - - factory CopyWith$Input$UseNewDeviceKeyInput.stub(TRes res) = - _CopyWithStubImpl$Input$UseNewDeviceKeyInput; - - TRes call({String? key, String? deviceName}); -} - -class _CopyWithImpl$Input$UseNewDeviceKeyInput - implements CopyWith$Input$UseNewDeviceKeyInput { - _CopyWithImpl$Input$UseNewDeviceKeyInput(this._instance, this._then); - - final Input$UseNewDeviceKeyInput _instance; - - final TRes Function(Input$UseNewDeviceKeyInput) _then; - - static const _undefined = {}; - - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseNewDeviceKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); -} - -class _CopyWithStubImpl$Input$UseNewDeviceKeyInput - implements CopyWith$Input$UseNewDeviceKeyInput { - _CopyWithStubImpl$Input$UseNewDeviceKeyInput(this._res); - - TRes _res; - - call({String? key, String? deviceName}) => _res; + Input$UseNewDeviceKeyInput copyWith({String? key, String? deviceName}) => + Input$UseNewDeviceKeyInput( + key: key == null ? this.key : key, + deviceName: deviceName == null ? this.deviceName : deviceName); } @JsonSerializable(explicitToJson: true) @@ -191,48 +324,49 @@ class Input$UseRecoveryKeyInput { return true; } - CopyWith$Input$UseRecoveryKeyInput get copyWith => - CopyWith$Input$UseRecoveryKeyInput(this, (i) => i); + Input$UseRecoveryKeyInput copyWith({String? key, String? deviceName}) => + Input$UseRecoveryKeyInput( + key: key == null ? this.key : key, + deviceName: deviceName == null ? this.deviceName : deviceName); } -abstract class CopyWith$Input$UseRecoveryKeyInput { - factory CopyWith$Input$UseRecoveryKeyInput(Input$UseRecoveryKeyInput instance, - TRes Function(Input$UseRecoveryKeyInput) then) = - _CopyWithImpl$Input$UseRecoveryKeyInput; +@JsonSerializable(explicitToJson: true) +class Input$UserMutationInput { + Input$UserMutationInput({required this.username, required this.password}); - factory CopyWith$Input$UseRecoveryKeyInput.stub(TRes res) = - _CopyWithStubImpl$Input$UseRecoveryKeyInput; + @override + factory Input$UserMutationInput.fromJson(Map json) => + _$Input$UserMutationInputFromJson(json); - TRes call({String? key, String? deviceName}); -} + final String username; -class _CopyWithImpl$Input$UseRecoveryKeyInput - implements CopyWith$Input$UseRecoveryKeyInput { - _CopyWithImpl$Input$UseRecoveryKeyInput(this._instance, this._then); + final String password; - final Input$UseRecoveryKeyInput _instance; + Map toJson() => _$Input$UserMutationInputToJson(this); + int get hashCode { + final l$username = username; + final l$password = password; + return Object.hashAll([l$username, l$password]); + } - final TRes Function(Input$UseRecoveryKeyInput) _then; + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$UserMutationInput) || runtimeType != other.runtimeType) + return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$password = password; + final lOther$password = other.password; + if (l$password != lOther$password) return false; + return true; + } - static const _undefined = {}; - - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseRecoveryKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); -} - -class _CopyWithStubImpl$Input$UseRecoveryKeyInput - implements CopyWith$Input$UseRecoveryKeyInput { - _CopyWithStubImpl$Input$UseRecoveryKeyInput(this._res); - - TRes _res; - - call({String? key, String? deviceName}) => _res; + Input$UserMutationInput copyWith({String? username, String? password}) => + Input$UserMutationInput( + username: username == null ? this.username : username, + password: password == null ? this.password : password); } enum Enum$DnsProvider { @@ -247,26 +381,61 @@ enum Enum$ServerProvider { $unknown } +enum Enum$ServiceStatusEnum { + @JsonValue('ACTIVATING') + ACTIVATING, + @JsonValue('ACTIVE') + ACTIVE, + @JsonValue('DEACTIVATING') + DEACTIVATING, + @JsonValue('FAILED') + FAILED, + @JsonValue('INACTIVE') + INACTIVE, + @JsonValue('OFF') + OFF, + @JsonValue('RELOADING') + RELOADING, + $unknown +} + enum Enum$Severity { - @JsonValue('INFO') - INFO, - @JsonValue('WARNING') - WARNING, - @JsonValue('ERROR') - ERROR, @JsonValue('CRITICAL') CRITICAL, + @JsonValue('ERROR') + ERROR, + @JsonValue('INFO') + INFO, @JsonValue('SUCCESS') SUCCESS, + @JsonValue('WARNING') + WARNING, + $unknown +} + +enum Enum$UserType { + @JsonValue('NORMAL') + NORMAL, + @JsonValue('PRIMARY') + PRIMARY, + @JsonValue('ROOT') + ROOT, $unknown } const possibleTypesMap = { 'MutationReturnInterface': { 'ApiKeyMutationReturn', + 'AutoUpgradeSettingsMutationReturn', 'DeviceApiTokenMutationReturn', - 'GenericMutationReturn' - } + 'GenericJobButationReturn', + 'GenericMutationReturn', + 'ServiceJobMutationReturn', + 'ServiceMutationReturn', + 'TimezoneMutationReturn', + 'UserMutationReturn' + }, + 'StorageUsageInterface': {'ServiceStorageUsage'} }; DateTime? _nullable$dateTimeFromJson(dynamic data) => data == null ? null : dateTimeFromJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart index 9002a8e1..d3008d30 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart @@ -6,6 +6,54 @@ part of 'schema.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** +Input$AutoUpgradeSettingsInput _$Input$AutoUpgradeSettingsInputFromJson( + Map json) => + Input$AutoUpgradeSettingsInput( + enableAutoUpgrade: json['enableAutoUpgrade'] as bool?, + allowReboot: json['allowReboot'] as bool?, + ); + +Map _$Input$AutoUpgradeSettingsInputToJson( + Input$AutoUpgradeSettingsInput instance) => + { + 'enableAutoUpgrade': instance.enableAutoUpgrade, + 'allowReboot': instance.allowReboot, + }; + +Input$MigrateToBindsInput _$Input$MigrateToBindsInputFromJson( + Map json) => + Input$MigrateToBindsInput( + emailBlockDevice: json['emailBlockDevice'] as String, + bitwardenBlockDevice: json['bitwardenBlockDevice'] as String, + giteaBlockDevice: json['giteaBlockDevice'] as String, + nextcloudBlockDevice: json['nextcloudBlockDevice'] as String, + pleromaBlockDevice: json['pleromaBlockDevice'] as String, + ); + +Map _$Input$MigrateToBindsInputToJson( + Input$MigrateToBindsInput instance) => + { + 'emailBlockDevice': instance.emailBlockDevice, + 'bitwardenBlockDevice': instance.bitwardenBlockDevice, + 'giteaBlockDevice': instance.giteaBlockDevice, + 'nextcloudBlockDevice': instance.nextcloudBlockDevice, + 'pleromaBlockDevice': instance.pleromaBlockDevice, + }; + +Input$MoveServiceInput _$Input$MoveServiceInputFromJson( + Map json) => + Input$MoveServiceInput( + serviceId: json['serviceId'] as String, + location: json['location'] as String, + ); + +Map _$Input$MoveServiceInputToJson( + Input$MoveServiceInput instance) => + { + 'serviceId': instance.serviceId, + 'location': instance.location, + }; + Input$RecoveryKeyLimitsInput _$Input$RecoveryKeyLimitsInputFromJson( Map json) => Input$RecoveryKeyLimitsInput( @@ -20,6 +68,20 @@ Map _$Input$RecoveryKeyLimitsInputToJson( 'uses': instance.uses, }; +Input$SshMutationInput _$Input$SshMutationInputFromJson( + Map json) => + Input$SshMutationInput( + username: json['username'] as String, + sshKey: json['sshKey'] as String, + ); + +Map _$Input$SshMutationInputToJson( + Input$SshMutationInput instance) => + { + 'username': instance.username, + 'sshKey': instance.sshKey, + }; + Input$UseNewDeviceKeyInput _$Input$UseNewDeviceKeyInputFromJson( Map json) => Input$UseNewDeviceKeyInput( @@ -47,3 +109,17 @@ Map _$Input$UseRecoveryKeyInputToJson( 'key': instance.key, 'deviceName': instance.deviceName, }; + +Input$UserMutationInput _$Input$UserMutationInputFromJson( + Map json) => + Input$UserMutationInput( + username: json['username'] as String, + password: json['password'] as String, + ); + +Map _$Input$UserMutationInputToJson( + Input$UserMutationInput instance) => + { + 'username': instance.username, + 'password': instance.password, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server.dart b/lib/logic/api_maps/graphql_maps/schema/server.dart index 4b419a15..794cff51 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server.dart @@ -3,9 +3,11 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; class ServerApi extends ApiMap { ServerApi({ @@ -25,13 +27,35 @@ class ServerApi extends ApiMap { @override String? rootAddress; + Future _commonBoolRequest(final Function graphQLMethod) async { + QueryResult response; + bool result = false; + + try { + response = await graphQLMethod(); + if (response.hasException) { + print(response.exception.toString()); + result = false; + } else { + result = true; + } + } catch (e) { + print(e); + } + + return result; + } + Future getApiVersion() async { QueryResult response; String? apiVersion; - final GraphQLClient client = await getClient(); try { - response = await client.query$GetApiVersionQuery(); + final GraphQLClient client = await getClient(); + response = await client.query$GetApiVersion(); + if (response.hasException) { + print(response.exception.toString()); + } apiVersion = response.data!['api']['version']; } catch (e) { print(e); @@ -45,7 +69,10 @@ class ServerApi extends ApiMap { try { final GraphQLClient client = await getClient(); - response = await client.query$GetApiTokensQuery(); + response = await client.query$GetApiTokens(); + if (response.hasException) { + print(response.exception.toString()); + } tokens = response.data!['api']['devices'] .map((final e) => ApiToken.fromJson(e)) .toList(); @@ -62,7 +89,10 @@ class ServerApi extends ApiMap { try { final GraphQLClient client = await getClient(); - response = await client.query$GetServerDiskVolumesQuery(); + response = await client.query$GetServerDiskVolumes(); + if (response.hasException) { + print(response.exception.toString()); + } volumes = response.data!['storage']['volumes'] .map((final e) => ServerDiskVolume.fromJson(e)) .toList(); @@ -76,11 +106,10 @@ class ServerApi extends ApiMap { Future mountVolume(final String volumeName) async { try { final GraphQLClient client = await getClient(); - final variables = - Variables$Mutation$MountVolumeMutation(name: volumeName); + final variables = Variables$Mutation$MountVolume(name: volumeName); final mountVolumeMutation = - Options$Mutation$MountVolumeMutation(variables: variables); - await client.mutate$MountVolumeMutation(mountVolumeMutation); + Options$Mutation$MountVolume(variables: variables); + await client.mutate$MountVolume(mountVolumeMutation); } catch (e) { print(e); } @@ -89,11 +118,10 @@ class ServerApi extends ApiMap { Future unmountVolume(final String volumeName) async { try { final GraphQLClient client = await getClient(); - final variables = - Variables$Mutation$UnmountVolumeMutation(name: volumeName); + final variables = Variables$Mutation$UnmountVolume(name: volumeName); final unmountVolumeMutation = - Options$Mutation$UnmountVolumeMutation(variables: variables); - await client.mutate$UnmountVolumeMutation(unmountVolumeMutation); + Options$Mutation$UnmountVolume(variables: variables); + await client.mutate$UnmountVolume(unmountVolumeMutation); } catch (e) { print(e); } @@ -102,11 +130,104 @@ class ServerApi extends ApiMap { Future resizeVolume(final String volumeName) async { try { final GraphQLClient client = await getClient(); - final variables = - Variables$Mutation$ResizeVolumeMutation(name: volumeName); + final variables = Variables$Mutation$ResizeVolume(name: volumeName); final resizeVolumeMutation = - Options$Mutation$ResizeVolumeMutation(variables: variables); - await client.mutate$ResizeVolumeMutation(resizeVolumeMutation); + Options$Mutation$ResizeVolume(variables: variables); + await client.mutate$ResizeVolume(resizeVolumeMutation); + } catch (e) { + print(e); + } + } + + Future> getServerJobs() async { + QueryResult response; + List jobs = []; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetApiJobs(); + if (response.hasException) { + print(response.exception.toString()); + } + jobs = response.data!['jobs'] + .map((final e) => ServerJob.fromJson(e)) + .toList(); + } catch (e) { + print(e); + } + + return jobs; + } + + Future removeApiJob(final String uid) async { + try { + final GraphQLClient client = await getClient(); + //await client.query$GetApiJobsQuery(); + } catch (e) { + print(e); + } + } + + Future reboot() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$RebootSystem(); + }, + ); + } catch (e) { + return false; + } + } + + Future pullConfigurationUpdate() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$PullRepositoryChanges(); + }, + ); + } catch (e) { + return false; + } + } + + Future upgrade() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$RunSystemUpgrade(); + }, + ); + } catch (e) { + return false; + } + } + + Future switchService(final String uid, final bool needTurnOn) async { + try { + final GraphQLClient client = await getClient(); + if (needTurnOn) { + final variables = Variables$Mutation$EnableService(serviceId: uid); + final mutation = Options$Mutation$EnableService(variables: variables); + await client.mutate$EnableService(mutation); + } else { + final variables = Variables$Mutation$DisableService(serviceId: uid); + final mutation = Options$Mutation$DisableService(variables: variables); + await client.mutate$DisableService(mutation); + } + } catch (e) { + print(e); + } + } + + Future apply() async { + try { + final GraphQLClient client = await getClient(); + await client.mutate$RunSystemRebuild(); } catch (e) { print(e); } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index f88b3346..96374fad 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -1,4 +1,70 @@ -query GetApiTokensQuery { +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query GetApiVersion { + api { + version + } +} + +query GetApiJobs { + jobs { + getJobs { + createdAt + description + error + finishedAt + name + progress + result + status + statusText + uid + updatedAt + } + } +} + +mutation RemoveJob($jobId: String!) { + removeJob(jobId: $jobId) { + ...basicMutationReturnFields + } +} + +mutation RunSystemRebuild { + runSystemRebuild { + ...basicMutationReturnFields + } +} + +mutation RunSystemRollback { + runSystemRollback { + ...basicMutationReturnFields + } +} + +mutation RunSystemUpgrade { + runSystemUpgrade { + ...basicMutationReturnFields + } +} + +mutation PullRepositoryChanges { + pullRepositoryChanges { + ...basicMutationReturnFields + } +} + +mutation RebootSystem { + rebootSystem { + ...basicMutationReturnFields + } +} + +query GetApiTokens { api { devices { creationDate @@ -8,8 +74,61 @@ query GetApiTokensQuery { } } -query GetApiVersionQuery { +query RecoveryKey { api { - version + recoveryKey { + creationDate + exists + expirationDate + usesLeft + valid + } } -} \ No newline at end of file +} + +mutation GetNewRecoveryApiKey($limits: RecoveryKeyLimitsInput) { + getNewRecoveryApiKey(limits: $limits) { + ...basicMutationReturnFields + key + } +} + +mutation UseRecoveryApiKey($input: UseRecoveryKeyInput!) { + useRecoveryApiKey(input: $input) { + ...basicMutationReturnFields + token + } +} + +mutation RefreshDeviceApiToken { + refreshDeviceApiToken { + ...basicMutationReturnFields + token + } +} + +mutation DeleteDeviceApiToken($device: String!) { + deleteDeviceApiToken(device: $device) { + ...basicMutationReturnFields + } +} + +mutation GetNewDeviceApiKey { + getNewDeviceApiKey { + ...basicMutationReturnFields + key + } +} + +mutation InvalidateNewDeviceApiKey { + invalidateNewDeviceApiKey { + ...basicMutationReturnFields + } +} + +mutation AuthorizeWithNewDeviceApiKey($input: UseNewDeviceKeyInput!) { + authorizeWithNewDeviceApiKey(input: $input) { + ...basicMutationReturnFields + token + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 2394d113..c9d6fe1a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,23 +1,157 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; part 'server_api.graphql.g.dart'; @JsonSerializable(explicitToJson: true) -class Query$GetApiTokensQuery { - Query$GetApiTokensQuery({required this.api, required this.$__typename}); +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Query$GetApiTokensQuery.fromJson(Map json) => - _$Query$GetApiTokensQueryFromJson(json); + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); - final Query$GetApiTokensQuery$api api; + final int code; + + final String message; + + final bool success; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokensQueryToJson(this); + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Fragment$basicMutationReturnFields) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( + {required Map idFields, bool optimistic = true}) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersion { + Query$GetApiVersion({required this.api, required this.$__typename}); + + @override + factory Query$GetApiVersion.fromJson(Map json) => + _$Query$GetApiVersionFromJson(json); + + final Query$GetApiVersion$api api; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersionToJson(this); int get hashCode { final l$api = api; final l$$__typename = $__typename; @@ -27,7 +161,7 @@ class Query$GetApiTokensQuery { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiTokensQuery) || runtimeType != other.runtimeType) + if (!(other is Query$GetApiVersion) || runtimeType != other.runtimeType) return false; final l$api = api; final lOther$api = other.api; @@ -39,62 +173,2091 @@ class Query$GetApiTokensQuery { } } -extension UtilityExtension$Query$GetApiTokensQuery on Query$GetApiTokensQuery { - CopyWith$Query$GetApiTokensQuery get copyWith => - CopyWith$Query$GetApiTokensQuery(this, (i) => i); +extension UtilityExtension$Query$GetApiVersion on Query$GetApiVersion { + Query$GetApiVersion copyWith( + {Query$GetApiVersion$api? api, String? $__typename}) => + Query$GetApiVersion( + api: api == null ? this.api : api, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetApiTokensQuery { - factory CopyWith$Query$GetApiTokensQuery(Query$GetApiTokensQuery instance, - TRes Function(Query$GetApiTokensQuery) then) = - _CopyWithImpl$Query$GetApiTokensQuery; +const documentNodeQueryGetApiVersion = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetApiVersion'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'version'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetApiVersion _parserFn$Query$GetApiVersion(Map data) => + Query$GetApiVersion.fromJson(data); - factory CopyWith$Query$GetApiTokensQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiTokensQuery; - - TRes call({Query$GetApiTokensQuery$api? api, String? $__typename}); - CopyWith$Query$GetApiTokensQuery$api get api; +class Options$Query$GetApiVersion + extends graphql.QueryOptions { + Options$Query$GetApiVersion( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiVersion, + parserFn: _parserFn$Query$GetApiVersion); } -class _CopyWithImpl$Query$GetApiTokensQuery - implements CopyWith$Query$GetApiTokensQuery { - _CopyWithImpl$Query$GetApiTokensQuery(this._instance, this._then); +class WatchOptions$Query$GetApiVersion + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiVersion( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiVersion, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiVersion); +} - final Query$GetApiTokensQuery _instance; +class FetchMoreOptions$Query$GetApiVersion extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiVersion( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, document: documentNodeQueryGetApiVersion); +} - final TRes Function(Query$GetApiTokensQuery) _then; - - static const _undefined = {}; - - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiTokensQuery( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiTokensQuery$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetApiTokensQuery$api get api { - final local$api = _instance.api; - return CopyWith$Query$GetApiTokensQuery$api(local$api, (e) => call(api: e)); +extension ClientExtension$Query$GetApiVersion on graphql.GraphQLClient { + Future> query$GetApiVersion( + [Options$Query$GetApiVersion? options]) async => + await this.query(options ?? Options$Query$GetApiVersion()); + graphql.ObservableQuery watchQuery$GetApiVersion( + [WatchOptions$Query$GetApiVersion? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiVersion()); + void writeQuery$GetApiVersion( + {required Query$GetApiVersion data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiVersion)), + data: data.toJson(), + broadcast: broadcast); + Query$GetApiVersion? readQuery$GetApiVersion({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiVersion)), + optimistic: optimistic); + return result == null ? null : Query$GetApiVersion.fromJson(result); } } -class _CopyWithStubImpl$Query$GetApiTokensQuery - implements CopyWith$Query$GetApiTokensQuery { - _CopyWithStubImpl$Query$GetApiTokensQuery(this._res); +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersion$api { + Query$GetApiVersion$api({required this.version, required this.$__typename}); - TRes _res; + @override + factory Query$GetApiVersion$api.fromJson(Map json) => + _$Query$GetApiVersion$apiFromJson(json); - call({Query$GetApiTokensQuery$api? api, String? $__typename}) => _res; - CopyWith$Query$GetApiTokensQuery$api get api => - CopyWith$Query$GetApiTokensQuery$api.stub(_res); + final String version; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersion$apiToJson(this); + int get hashCode { + final l$version = version; + final l$$__typename = $__typename; + return Object.hashAll([l$version, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiVersion$api) || runtimeType != other.runtimeType) + return false; + final l$version = version; + final lOther$version = other.version; + if (l$version != lOther$version) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } } -const documentNodeQueryGetApiTokensQuery = DocumentNode(definitions: [ +extension UtilityExtension$Query$GetApiVersion$api on Query$GetApiVersion$api { + Query$GetApiVersion$api copyWith({String? version, String? $__typename}) => + Query$GetApiVersion$api( + version: version == null ? this.version : version, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiJobs { + Query$GetApiJobs({required this.jobs, required this.$__typename}); + + @override + factory Query$GetApiJobs.fromJson(Map json) => + _$Query$GetApiJobsFromJson(json); + + final Query$GetApiJobs$jobs jobs; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiJobsToJson(this); + int get hashCode { + final l$jobs = jobs; + final l$$__typename = $__typename; + return Object.hashAll([l$jobs, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiJobs) || runtimeType != other.runtimeType) + return false; + final l$jobs = jobs; + final lOther$jobs = other.jobs; + if (l$jobs != lOther$jobs) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiJobs on Query$GetApiJobs { + Query$GetApiJobs copyWith( + {Query$GetApiJobs$jobs? jobs, String? $__typename}) => + Query$GetApiJobs( + jobs: jobs == null ? this.jobs : jobs, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, - name: NameNode(value: 'GetApiTokensQuery'), + name: NameNode(value: 'GetApiJobs'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'jobs'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getJobs'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetApiJobs _parserFn$Query$GetApiJobs(Map data) => + Query$GetApiJobs.fromJson(data); + +class Options$Query$GetApiJobs extends graphql.QueryOptions { + Options$Query$GetApiJobs( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiJobs, + parserFn: _parserFn$Query$GetApiJobs); +} + +class WatchOptions$Query$GetApiJobs + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiJobs( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiJobs, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiJobs); +} + +class FetchMoreOptions$Query$GetApiJobs extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiJobs({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryGetApiJobs); +} + +extension ClientExtension$Query$GetApiJobs on graphql.GraphQLClient { + Future> query$GetApiJobs( + [Options$Query$GetApiJobs? options]) async => + await this.query(options ?? Options$Query$GetApiJobs()); + graphql.ObservableQuery watchQuery$GetApiJobs( + [WatchOptions$Query$GetApiJobs? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiJobs()); + void writeQuery$GetApiJobs( + {required Query$GetApiJobs data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiJobs)), + data: data.toJson(), + broadcast: broadcast); + Query$GetApiJobs? readQuery$GetApiJobs({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiJobs)), + optimistic: optimistic); + return result == null ? null : Query$GetApiJobs.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiJobs$jobs { + Query$GetApiJobs$jobs({required this.getJobs, required this.$__typename}); + + @override + factory Query$GetApiJobs$jobs.fromJson(Map json) => + _$Query$GetApiJobs$jobsFromJson(json); + + final List getJobs; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiJobs$jobsToJson(this); + int get hashCode { + final l$getJobs = getJobs; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$getJobs.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiJobs$jobs) || runtimeType != other.runtimeType) + return false; + final l$getJobs = getJobs; + final lOther$getJobs = other.getJobs; + if (l$getJobs.length != lOther$getJobs.length) return false; + for (int i = 0; i < l$getJobs.length; i++) { + final l$getJobs$entry = l$getJobs[i]; + final lOther$getJobs$entry = lOther$getJobs[i]; + if (l$getJobs$entry != lOther$getJobs$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiJobs$jobs on Query$GetApiJobs$jobs { + Query$GetApiJobs$jobs copyWith( + {List? getJobs, + String? $__typename}) => + Query$GetApiJobs$jobs( + getJobs: getJobs == null ? this.getJobs : getJobs, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiJobs$jobs$getJobs { + Query$GetApiJobs$jobs$getJobs( + {required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename}); + + @override + factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) => + _$Query$GetApiJobs$jobs$getJobsFromJson(json); + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime createdAt; + + final String description; + + final String? error; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? finishedAt; + + final String name; + + final int? progress; + + final String? result; + + final String status; + + final String? statusText; + + final String uid; + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime updatedAt; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiJobs$jobs$getJobsToJson(this); + int get hashCode { + final l$createdAt = createdAt; + final l$description = description; + final l$error = error; + final l$finishedAt = finishedAt; + final l$name = name; + final l$progress = progress; + final l$result = result; + final l$status = status; + final l$statusText = statusText; + final l$uid = uid; + final l$updatedAt = updatedAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$createdAt, + l$description, + l$error, + l$finishedAt, + l$name, + l$progress, + l$result, + l$status, + l$statusText, + l$uid, + l$updatedAt, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiJobs$jobs$getJobs) || + runtimeType != other.runtimeType) return false; + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$error = error; + final lOther$error = other.error; + if (l$error != lOther$error) return false; + final l$finishedAt = finishedAt; + final lOther$finishedAt = other.finishedAt; + if (l$finishedAt != lOther$finishedAt) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$progress = progress; + final lOther$progress = other.progress; + if (l$progress != lOther$progress) return false; + final l$result = result; + final lOther$result = other.result; + if (l$result != lOther$result) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$statusText = statusText; + final lOther$statusText = other.statusText; + if (l$statusText != lOther$statusText) return false; + final l$uid = uid; + final lOther$uid = other.uid; + if (l$uid != lOther$uid) return false; + final l$updatedAt = updatedAt; + final lOther$updatedAt = other.updatedAt; + if (l$updatedAt != lOther$updatedAt) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiJobs$jobs$getJobs + on Query$GetApiJobs$jobs$getJobs { + Query$GetApiJobs$jobs$getJobs copyWith( + {DateTime? createdAt, + String? description, + String? Function()? error, + DateTime? Function()? finishedAt, + String? name, + int? Function()? progress, + String? Function()? result, + String? status, + String? Function()? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}) => + Query$GetApiJobs$jobs$getJobs( + createdAt: createdAt == null ? this.createdAt : createdAt, + description: description == null ? this.description : description, + error: error == null ? this.error : error(), + finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), + name: name == null ? this.name : name, + progress: progress == null ? this.progress : progress(), + result: result == null ? this.result : result(), + status: status == null ? this.status : status, + statusText: statusText == null ? this.statusText : statusText(), + uid: uid == null ? this.uid : uid, + updatedAt: updatedAt == null ? this.updatedAt : updatedAt, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$RemoveJob { + Variables$Mutation$RemoveJob({required this.jobId}); + + @override + factory Variables$Mutation$RemoveJob.fromJson(Map json) => + _$Variables$Mutation$RemoveJobFromJson(json); + + final String jobId; + + Map toJson() => _$Variables$Mutation$RemoveJobToJson(this); + int get hashCode { + final l$jobId = jobId; + return Object.hashAll([l$jobId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$RemoveJob) || + runtimeType != other.runtimeType) return false; + final l$jobId = jobId; + final lOther$jobId = other.jobId; + if (l$jobId != lOther$jobId) return false; + return true; + } + + Variables$Mutation$RemoveJob copyWith({String? jobId}) => + Variables$Mutation$RemoveJob(jobId: jobId == null ? this.jobId : jobId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveJob { + Mutation$RemoveJob({required this.removeJob, required this.$__typename}); + + @override + factory Mutation$RemoveJob.fromJson(Map json) => + _$Mutation$RemoveJobFromJson(json); + + final Mutation$RemoveJob$removeJob removeJob; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RemoveJobToJson(this); + int get hashCode { + final l$removeJob = removeJob; + final l$$__typename = $__typename; + return Object.hashAll([l$removeJob, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveJob) || runtimeType != other.runtimeType) + return false; + final l$removeJob = removeJob; + final lOther$removeJob = other.removeJob; + if (l$removeJob != lOther$removeJob) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveJob on Mutation$RemoveJob { + Mutation$RemoveJob copyWith( + {Mutation$RemoveJob$removeJob? removeJob, String? $__typename}) => + Mutation$RemoveJob( + removeJob: removeJob == null ? this.removeJob : removeJob, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRemoveJob = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RemoveJob'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'jobId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeJob'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'jobId'), + value: VariableNode(name: NameNode(value: 'jobId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RemoveJob _parserFn$Mutation$RemoveJob(Map data) => + Mutation$RemoveJob.fromJson(data); +typedef OnMutationCompleted$Mutation$RemoveJob = FutureOr Function( + dynamic, Mutation$RemoveJob?); + +class Options$Mutation$RemoveJob + extends graphql.MutationOptions { + Options$Mutation$RemoveJob( + {String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveJob? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$RemoveJob(data)), + update: update, + onError: onError, + document: documentNodeMutationRemoveJob, + parserFn: _parserFn$Mutation$RemoveJob); + + final OnMutationCompleted$Mutation$RemoveJob? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RemoveJob + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RemoveJob( + {String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveJob, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveJob); +} + +extension ClientExtension$Mutation$RemoveJob on graphql.GraphQLClient { + Future> mutate$RemoveJob( + Options$Mutation$RemoveJob options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$RemoveJob( + WatchOptions$Mutation$RemoveJob options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveJob$removeJob + implements Fragment$basicMutationReturnFields { + Mutation$RemoveJob$removeJob( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RemoveJob$removeJob.fromJson(Map json) => + _$Mutation$RemoveJob$removeJobFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RemoveJob$removeJobToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveJob$removeJob) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveJob$removeJob + on Mutation$RemoveJob$removeJob { + Mutation$RemoveJob$removeJob copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RemoveJob$removeJob( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRebuild { + Mutation$RunSystemRebuild( + {required this.runSystemRebuild, required this.$__typename}); + + @override + factory Mutation$RunSystemRebuild.fromJson(Map json) => + _$Mutation$RunSystemRebuildFromJson(json); + + final Mutation$RunSystemRebuild$runSystemRebuild runSystemRebuild; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RunSystemRebuildToJson(this); + int get hashCode { + final l$runSystemRebuild = runSystemRebuild; + final l$$__typename = $__typename; + return Object.hashAll([l$runSystemRebuild, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRebuild) || + runtimeType != other.runtimeType) return false; + final l$runSystemRebuild = runSystemRebuild; + final lOther$runSystemRebuild = other.runSystemRebuild; + if (l$runSystemRebuild != lOther$runSystemRebuild) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRebuild + on Mutation$RunSystemRebuild { + Mutation$RunSystemRebuild copyWith( + {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, + String? $__typename}) => + Mutation$RunSystemRebuild( + runSystemRebuild: runSystemRebuild == null + ? this.runSystemRebuild + : runSystemRebuild, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRunSystemRebuild = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRebuild'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRebuild'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RunSystemRebuild _parserFn$Mutation$RunSystemRebuild( + Map data) => + Mutation$RunSystemRebuild.fromJson(data); +typedef OnMutationCompleted$Mutation$RunSystemRebuild = FutureOr Function( + dynamic, Mutation$RunSystemRebuild?); + +class Options$Mutation$RunSystemRebuild + extends graphql.MutationOptions { + Options$Mutation$RunSystemRebuild( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRebuild? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RunSystemRebuild(data)), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRebuild, + parserFn: _parserFn$Mutation$RunSystemRebuild); + + final OnMutationCompleted$Mutation$RunSystemRebuild? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RunSystemRebuild + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RunSystemRebuild( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRebuild, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRebuild); +} + +extension ClientExtension$Mutation$RunSystemRebuild on graphql.GraphQLClient { + Future> + mutate$RunSystemRebuild( + [Options$Mutation$RunSystemRebuild? options]) async => + await this.mutate(options ?? Options$Mutation$RunSystemRebuild()); + graphql.ObservableQuery< + Mutation$RunSystemRebuild> watchMutation$RunSystemRebuild( + [WatchOptions$Mutation$RunSystemRebuild? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRebuild()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRebuild$runSystemRebuild + implements Fragment$basicMutationReturnFields { + Mutation$RunSystemRebuild$runSystemRebuild( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RunSystemRebuild$runSystemRebuild.fromJson( + Map json) => + _$Mutation$RunSystemRebuild$runSystemRebuildFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RunSystemRebuild$runSystemRebuildToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRebuild$runSystemRebuild) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRebuild$runSystemRebuild + on Mutation$RunSystemRebuild$runSystemRebuild { + Mutation$RunSystemRebuild$runSystemRebuild copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RunSystemRebuild$runSystemRebuild( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRollback { + Mutation$RunSystemRollback( + {required this.runSystemRollback, required this.$__typename}); + + @override + factory Mutation$RunSystemRollback.fromJson(Map json) => + _$Mutation$RunSystemRollbackFromJson(json); + + final Mutation$RunSystemRollback$runSystemRollback runSystemRollback; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RunSystemRollbackToJson(this); + int get hashCode { + final l$runSystemRollback = runSystemRollback; + final l$$__typename = $__typename; + return Object.hashAll([l$runSystemRollback, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRollback) || + runtimeType != other.runtimeType) return false; + final l$runSystemRollback = runSystemRollback; + final lOther$runSystemRollback = other.runSystemRollback; + if (l$runSystemRollback != lOther$runSystemRollback) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRollback + on Mutation$RunSystemRollback { + Mutation$RunSystemRollback copyWith( + {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, + String? $__typename}) => + Mutation$RunSystemRollback( + runSystemRollback: runSystemRollback == null + ? this.runSystemRollback + : runSystemRollback, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRunSystemRollback = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRollback'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRollback'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RunSystemRollback _parserFn$Mutation$RunSystemRollback( + Map data) => + Mutation$RunSystemRollback.fromJson(data); +typedef OnMutationCompleted$Mutation$RunSystemRollback = FutureOr + Function(dynamic, Mutation$RunSystemRollback?); + +class Options$Mutation$RunSystemRollback + extends graphql.MutationOptions { + Options$Mutation$RunSystemRollback( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRollback? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RunSystemRollback(data)), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRollback, + parserFn: _parserFn$Mutation$RunSystemRollback); + + final OnMutationCompleted$Mutation$RunSystemRollback? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RunSystemRollback + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RunSystemRollback( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRollback, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRollback); +} + +extension ClientExtension$Mutation$RunSystemRollback on graphql.GraphQLClient { + Future> + mutate$RunSystemRollback( + [Options$Mutation$RunSystemRollback? options]) async => + await this.mutate(options ?? Options$Mutation$RunSystemRollback()); + graphql.ObservableQuery< + Mutation$RunSystemRollback> watchMutation$RunSystemRollback( + [WatchOptions$Mutation$RunSystemRollback? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRollback()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRollback$runSystemRollback + implements Fragment$basicMutationReturnFields { + Mutation$RunSystemRollback$runSystemRollback( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RunSystemRollback$runSystemRollback.fromJson( + Map json) => + _$Mutation$RunSystemRollback$runSystemRollbackFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RunSystemRollback$runSystemRollbackToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRollback$runSystemRollback) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRollback$runSystemRollback + on Mutation$RunSystemRollback$runSystemRollback { + Mutation$RunSystemRollback$runSystemRollback copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RunSystemRollback$runSystemRollback( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemUpgrade { + Mutation$RunSystemUpgrade( + {required this.runSystemUpgrade, required this.$__typename}); + + @override + factory Mutation$RunSystemUpgrade.fromJson(Map json) => + _$Mutation$RunSystemUpgradeFromJson(json); + + final Mutation$RunSystemUpgrade$runSystemUpgrade runSystemUpgrade; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RunSystemUpgradeToJson(this); + int get hashCode { + final l$runSystemUpgrade = runSystemUpgrade; + final l$$__typename = $__typename; + return Object.hashAll([l$runSystemUpgrade, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemUpgrade) || + runtimeType != other.runtimeType) return false; + final l$runSystemUpgrade = runSystemUpgrade; + final lOther$runSystemUpgrade = other.runSystemUpgrade; + if (l$runSystemUpgrade != lOther$runSystemUpgrade) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemUpgrade + on Mutation$RunSystemUpgrade { + Mutation$RunSystemUpgrade copyWith( + {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, + String? $__typename}) => + Mutation$RunSystemUpgrade( + runSystemUpgrade: runSystemUpgrade == null + ? this.runSystemUpgrade + : runSystemUpgrade, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRunSystemUpgrade = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RunSystemUpgrade'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RunSystemUpgrade _parserFn$Mutation$RunSystemUpgrade( + Map data) => + Mutation$RunSystemUpgrade.fromJson(data); +typedef OnMutationCompleted$Mutation$RunSystemUpgrade = FutureOr Function( + dynamic, Mutation$RunSystemUpgrade?); + +class Options$Mutation$RunSystemUpgrade + extends graphql.MutationOptions { + Options$Mutation$RunSystemUpgrade( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemUpgrade? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RunSystemUpgrade(data)), + update: update, + onError: onError, + document: documentNodeMutationRunSystemUpgrade, + parserFn: _parserFn$Mutation$RunSystemUpgrade); + + final OnMutationCompleted$Mutation$RunSystemUpgrade? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RunSystemUpgrade + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RunSystemUpgrade( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemUpgrade, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemUpgrade); +} + +extension ClientExtension$Mutation$RunSystemUpgrade on graphql.GraphQLClient { + Future> + mutate$RunSystemUpgrade( + [Options$Mutation$RunSystemUpgrade? options]) async => + await this.mutate(options ?? Options$Mutation$RunSystemUpgrade()); + graphql.ObservableQuery< + Mutation$RunSystemUpgrade> watchMutation$RunSystemUpgrade( + [WatchOptions$Mutation$RunSystemUpgrade? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RunSystemUpgrade()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemUpgrade$runSystemUpgrade + implements Fragment$basicMutationReturnFields { + Mutation$RunSystemUpgrade$runSystemUpgrade( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( + Map json) => + _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemUpgrade$runSystemUpgrade) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemUpgrade$runSystemUpgrade + on Mutation$RunSystemUpgrade$runSystemUpgrade { + Mutation$RunSystemUpgrade$runSystemUpgrade copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RunSystemUpgrade$runSystemUpgrade( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$PullRepositoryChanges { + Mutation$PullRepositoryChanges( + {required this.pullRepositoryChanges, required this.$__typename}); + + @override + factory Mutation$PullRepositoryChanges.fromJson(Map json) => + _$Mutation$PullRepositoryChangesFromJson(json); + + final Mutation$PullRepositoryChanges$pullRepositoryChanges + pullRepositoryChanges; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$PullRepositoryChangesToJson(this); + int get hashCode { + final l$pullRepositoryChanges = pullRepositoryChanges; + final l$$__typename = $__typename; + return Object.hashAll([l$pullRepositoryChanges, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$PullRepositoryChanges) || + runtimeType != other.runtimeType) return false; + final l$pullRepositoryChanges = pullRepositoryChanges; + final lOther$pullRepositoryChanges = other.pullRepositoryChanges; + if (l$pullRepositoryChanges != lOther$pullRepositoryChanges) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$PullRepositoryChanges + on Mutation$PullRepositoryChanges { + Mutation$PullRepositoryChanges copyWith( + {Mutation$PullRepositoryChanges$pullRepositoryChanges? + pullRepositoryChanges, + String? $__typename}) => + Mutation$PullRepositoryChanges( + pullRepositoryChanges: pullRepositoryChanges == null + ? this.pullRepositoryChanges + : pullRepositoryChanges, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationPullRepositoryChanges = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'PullRepositoryChanges'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'pullRepositoryChanges'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$PullRepositoryChanges _parserFn$Mutation$PullRepositoryChanges( + Map data) => + Mutation$PullRepositoryChanges.fromJson(data); +typedef OnMutationCompleted$Mutation$PullRepositoryChanges = FutureOr + Function(dynamic, Mutation$PullRepositoryChanges?); + +class Options$Mutation$PullRepositoryChanges + extends graphql.MutationOptions { + Options$Mutation$PullRepositoryChanges( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$PullRepositoryChanges? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$PullRepositoryChanges(data)), + update: update, + onError: onError, + document: documentNodeMutationPullRepositoryChanges, + parserFn: _parserFn$Mutation$PullRepositoryChanges); + + final OnMutationCompleted$Mutation$PullRepositoryChanges? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$PullRepositoryChanges + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$PullRepositoryChanges( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationPullRepositoryChanges, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$PullRepositoryChanges); +} + +extension ClientExtension$Mutation$PullRepositoryChanges + on graphql.GraphQLClient { + Future> + mutate$PullRepositoryChanges( + [Options$Mutation$PullRepositoryChanges? options]) async => + await this + .mutate(options ?? Options$Mutation$PullRepositoryChanges()); + graphql.ObservableQuery + watchMutation$PullRepositoryChanges( + [WatchOptions$Mutation$PullRepositoryChanges? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$PullRepositoryChanges()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$PullRepositoryChanges$pullRepositoryChanges + implements Fragment$basicMutationReturnFields { + Mutation$PullRepositoryChanges$pullRepositoryChanges( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( + Map json) => + _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$PullRepositoryChanges$pullRepositoryChanges) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$PullRepositoryChanges$pullRepositoryChanges + on Mutation$PullRepositoryChanges$pullRepositoryChanges { + Mutation$PullRepositoryChanges$pullRepositoryChanges copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$PullRepositoryChanges$pullRepositoryChanges( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RebootSystem { + Mutation$RebootSystem( + {required this.rebootSystem, required this.$__typename}); + + @override + factory Mutation$RebootSystem.fromJson(Map json) => + _$Mutation$RebootSystemFromJson(json); + + final Mutation$RebootSystem$rebootSystem rebootSystem; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RebootSystemToJson(this); + int get hashCode { + final l$rebootSystem = rebootSystem; + final l$$__typename = $__typename; + return Object.hashAll([l$rebootSystem, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RebootSystem) || runtimeType != other.runtimeType) + return false; + final l$rebootSystem = rebootSystem; + final lOther$rebootSystem = other.rebootSystem; + if (l$rebootSystem != lOther$rebootSystem) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RebootSystem on Mutation$RebootSystem { + Mutation$RebootSystem copyWith( + {Mutation$RebootSystem$rebootSystem? rebootSystem, + String? $__typename}) => + Mutation$RebootSystem( + rebootSystem: rebootSystem == null ? this.rebootSystem : rebootSystem, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRebootSystem = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RebootSystem'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'rebootSystem'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RebootSystem _parserFn$Mutation$RebootSystem( + Map data) => + Mutation$RebootSystem.fromJson(data); +typedef OnMutationCompleted$Mutation$RebootSystem = FutureOr Function( + dynamic, Mutation$RebootSystem?); + +class Options$Mutation$RebootSystem + extends graphql.MutationOptions { + Options$Mutation$RebootSystem( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RebootSystem? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RebootSystem(data)), + update: update, + onError: onError, + document: documentNodeMutationRebootSystem, + parserFn: _parserFn$Mutation$RebootSystem); + + final OnMutationCompleted$Mutation$RebootSystem? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RebootSystem + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RebootSystem( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRebootSystem, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RebootSystem); +} + +extension ClientExtension$Mutation$RebootSystem on graphql.GraphQLClient { + Future> mutate$RebootSystem( + [Options$Mutation$RebootSystem? options]) async => + await this.mutate(options ?? Options$Mutation$RebootSystem()); + graphql.ObservableQuery watchMutation$RebootSystem( + [WatchOptions$Mutation$RebootSystem? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RebootSystem()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RebootSystem$rebootSystem + implements Fragment$basicMutationReturnFields { + Mutation$RebootSystem$rebootSystem( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RebootSystem$rebootSystem.fromJson( + Map json) => + _$Mutation$RebootSystem$rebootSystemFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RebootSystem$rebootSystemToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RebootSystem$rebootSystem) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RebootSystem$rebootSystem + on Mutation$RebootSystem$rebootSystem { + Mutation$RebootSystem$rebootSystem copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RebootSystem$rebootSystem( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiTokens { + Query$GetApiTokens({required this.api, required this.$__typename}); + + @override + factory Query$GetApiTokens.fromJson(Map json) => + _$Query$GetApiTokensFromJson(json); + + final Query$GetApiTokens$api api; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiTokensToJson(this); + int get hashCode { + final l$api = api; + final l$$__typename = $__typename; + return Object.hashAll([l$api, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiTokens) || runtimeType != other.runtimeType) + return false; + final l$api = api; + final lOther$api = other.api; + if (l$api != lOther$api) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiTokens on Query$GetApiTokens { + Query$GetApiTokens copyWith( + {Query$GetApiTokens$api? api, String? $__typename}) => + Query$GetApiTokens( + api: api == null ? this.api : api, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryGetApiTokens = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetApiTokens'), variableDefinitions: [], directives: [], selectionSet: SelectionSetNode(selections: [ @@ -150,13 +2313,12 @@ const documentNodeQueryGetApiTokensQuery = DocumentNode(definitions: [ selectionSet: null) ])), ]); -Query$GetApiTokensQuery _parserFn$Query$GetApiTokensQuery( - Map data) => - Query$GetApiTokensQuery.fromJson(data); +Query$GetApiTokens _parserFn$Query$GetApiTokens(Map data) => + Query$GetApiTokens.fromJson(data); -class Options$Query$GetApiTokensQuery - extends graphql.QueryOptions { - Options$Query$GetApiTokensQuery( +class Options$Query$GetApiTokens + extends graphql.QueryOptions { + Options$Query$GetApiTokens( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -172,13 +2334,13 @@ class Options$Query$GetApiTokensQuery optimisticResult: optimisticResult, pollInterval: pollInterval, context: context, - document: documentNodeQueryGetApiTokensQuery, - parserFn: _parserFn$Query$GetApiTokensQuery); + document: documentNodeQueryGetApiTokens, + parserFn: _parserFn$Query$GetApiTokens); } -class WatchOptions$Query$GetApiTokensQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiTokensQuery( +class WatchOptions$Query$GetApiTokens + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiTokens( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -196,64 +2358,60 @@ class WatchOptions$Query$GetApiTokensQuery cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeQueryGetApiTokensQuery, + document: documentNodeQueryGetApiTokens, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiTokensQuery); + parserFn: _parserFn$Query$GetApiTokens); } -class FetchMoreOptions$Query$GetApiTokensQuery - extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetApiTokensQuery( +class FetchMoreOptions$Query$GetApiTokens extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiTokens( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQueryGetApiTokensQuery); + updateQuery: updateQuery, document: documentNodeQueryGetApiTokens); } -extension ClientExtension$Query$GetApiTokensQuery on graphql.GraphQLClient { - Future> query$GetApiTokensQuery( - [Options$Query$GetApiTokensQuery? options]) async => - await this.query(options ?? Options$Query$GetApiTokensQuery()); - graphql.ObservableQuery watchQuery$GetApiTokensQuery( - [WatchOptions$Query$GetApiTokensQuery? options]) => - this.watchQuery(options ?? WatchOptions$Query$GetApiTokensQuery()); - void writeQuery$GetApiTokensQuery( - {required Query$GetApiTokensQuery data, bool broadcast = true}) => +extension ClientExtension$Query$GetApiTokens on graphql.GraphQLClient { + Future> query$GetApiTokens( + [Options$Query$GetApiTokens? options]) async => + await this.query(options ?? Options$Query$GetApiTokens()); + graphql.ObservableQuery watchQuery$GetApiTokens( + [WatchOptions$Query$GetApiTokens? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiTokens()); + void writeQuery$GetApiTokens( + {required Query$GetApiTokens data, bool broadcast = true}) => this.writeQuery( graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiTokensQuery)), + operation: + graphql.Operation(document: documentNodeQueryGetApiTokens)), data: data.toJson(), broadcast: broadcast); - Query$GetApiTokensQuery? readQuery$GetApiTokensQuery( - {bool optimistic = true}) { + Query$GetApiTokens? readQuery$GetApiTokens({bool optimistic = true}) { final result = this.readQuery( graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiTokensQuery)), + operation: + graphql.Operation(document: documentNodeQueryGetApiTokens)), optimistic: optimistic); - return result == null ? null : Query$GetApiTokensQuery.fromJson(result); + return result == null ? null : Query$GetApiTokens.fromJson(result); } } @JsonSerializable(explicitToJson: true) -class Query$GetApiTokensQuery$api { - Query$GetApiTokensQuery$api( - {required this.devices, required this.$__typename}); +class Query$GetApiTokens$api { + Query$GetApiTokens$api({required this.devices, required this.$__typename}); @override - factory Query$GetApiTokensQuery$api.fromJson(Map json) => - _$Query$GetApiTokensQuery$apiFromJson(json); + factory Query$GetApiTokens$api.fromJson(Map json) => + _$Query$GetApiTokens$apiFromJson(json); - final List devices; + final List devices; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokensQuery$apiToJson(this); + Map toJson() => _$Query$GetApiTokens$apiToJson(this); int get hashCode { final l$devices = devices; final l$$__typename = $__typename; @@ -264,8 +2422,8 @@ class Query$GetApiTokensQuery$api { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiTokensQuery$api) || - runtimeType != other.runtimeType) return false; + if (!(other is Query$GetApiTokens$api) || runtimeType != other.runtimeType) + return false; final l$devices = devices; final lOther$devices = other.devices; if (l$devices.length != lOther$devices.length) return false; @@ -282,87 +2440,26 @@ class Query$GetApiTokensQuery$api { } } -extension UtilityExtension$Query$GetApiTokensQuery$api - on Query$GetApiTokensQuery$api { - CopyWith$Query$GetApiTokensQuery$api - get copyWith => CopyWith$Query$GetApiTokensQuery$api(this, (i) => i); -} - -abstract class CopyWith$Query$GetApiTokensQuery$api { - factory CopyWith$Query$GetApiTokensQuery$api( - Query$GetApiTokensQuery$api instance, - TRes Function(Query$GetApiTokensQuery$api) then) = - _CopyWithImpl$Query$GetApiTokensQuery$api; - - factory CopyWith$Query$GetApiTokensQuery$api.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiTokensQuery$api; - - TRes call( - {List? devices, - String? $__typename}); - TRes devices( - Iterable Function( - Iterable< - CopyWith$Query$GetApiTokensQuery$api$devices< - Query$GetApiTokensQuery$api$devices>>) - _fn); -} - -class _CopyWithImpl$Query$GetApiTokensQuery$api - implements CopyWith$Query$GetApiTokensQuery$api { - _CopyWithImpl$Query$GetApiTokensQuery$api(this._instance, this._then); - - final Query$GetApiTokensQuery$api _instance; - - final TRes Function(Query$GetApiTokensQuery$api) _then; - - static const _undefined = {}; - - TRes call({Object? devices = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiTokensQuery$api( - devices: devices == _undefined || devices == null - ? _instance.devices - : (devices as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - TRes devices( - Iterable Function( - Iterable< - CopyWith$Query$GetApiTokensQuery$api$devices< - Query$GetApiTokensQuery$api$devices>>) - _fn) => - call( - devices: _fn(_instance.devices.map((e) => - CopyWith$Query$GetApiTokensQuery$api$devices(e, (i) => i))) - .toList()); -} - -class _CopyWithStubImpl$Query$GetApiTokensQuery$api - implements CopyWith$Query$GetApiTokensQuery$api { - _CopyWithStubImpl$Query$GetApiTokensQuery$api(this._res); - - TRes _res; - - call( - {List? devices, +extension UtilityExtension$Query$GetApiTokens$api on Query$GetApiTokens$api { + Query$GetApiTokens$api copyWith( + {List? devices, String? $__typename}) => - _res; - devices(_fn) => _res; + Query$GetApiTokens$api( + devices: devices == null ? this.devices : devices, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Query$GetApiTokensQuery$api$devices { - Query$GetApiTokensQuery$api$devices( +class Query$GetApiTokens$api$devices { + Query$GetApiTokens$api$devices( {required this.creationDate, required this.isCaller, required this.name, required this.$__typename}); @override - factory Query$GetApiTokensQuery$api$devices.fromJson( - Map json) => - _$Query$GetApiTokensQuery$api$devicesFromJson(json); + factory Query$GetApiTokens$api$devices.fromJson(Map json) => + _$Query$GetApiTokens$api$devicesFromJson(json); @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime creationDate; @@ -374,8 +2471,7 @@ class Query$GetApiTokensQuery$api$devices { @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetApiTokensQuery$api$devicesToJson(this); + Map toJson() => _$Query$GetApiTokens$api$devicesToJson(this); int get hashCode { final l$creationDate = creationDate; final l$isCaller = isCaller; @@ -387,7 +2483,7 @@ class Query$GetApiTokensQuery$api$devices { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiTokensQuery$api$devices) || + if (!(other is Query$GetApiTokens$api$devices) || runtimeType != other.runtimeType) return false; final l$creationDate = creationDate; final lOther$creationDate = other.creationDate; @@ -405,88 +2501,34 @@ class Query$GetApiTokensQuery$api$devices { } } -extension UtilityExtension$Query$GetApiTokensQuery$api$devices - on Query$GetApiTokensQuery$api$devices { - CopyWith$Query$GetApiTokensQuery$api$devices< - Query$GetApiTokensQuery$api$devices> - get copyWith => - CopyWith$Query$GetApiTokensQuery$api$devices(this, (i) => i); -} - -abstract class CopyWith$Query$GetApiTokensQuery$api$devices { - factory CopyWith$Query$GetApiTokensQuery$api$devices( - Query$GetApiTokensQuery$api$devices instance, - TRes Function(Query$GetApiTokensQuery$api$devices) then) = - _CopyWithImpl$Query$GetApiTokensQuery$api$devices; - - factory CopyWith$Query$GetApiTokensQuery$api$devices.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices; - - TRes call( - {DateTime? creationDate, - bool? isCaller, - String? name, - String? $__typename}); -} - -class _CopyWithImpl$Query$GetApiTokensQuery$api$devices - implements CopyWith$Query$GetApiTokensQuery$api$devices { - _CopyWithImpl$Query$GetApiTokensQuery$api$devices(this._instance, this._then); - - final Query$GetApiTokensQuery$api$devices _instance; - - final TRes Function(Query$GetApiTokensQuery$api$devices) _then; - - static const _undefined = {}; - - TRes call( - {Object? creationDate = _undefined, - Object? isCaller = _undefined, - Object? name = _undefined, - Object? $__typename = _undefined}) => - _then(Query$GetApiTokensQuery$api$devices( - creationDate: creationDate == _undefined || creationDate == null - ? _instance.creationDate - : (creationDate as DateTime), - isCaller: isCaller == _undefined || isCaller == null - ? _instance.isCaller - : (isCaller as bool), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices - implements CopyWith$Query$GetApiTokensQuery$api$devices { - _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices(this._res); - - TRes _res; - - call( +extension UtilityExtension$Query$GetApiTokens$api$devices + on Query$GetApiTokens$api$devices { + Query$GetApiTokens$api$devices copyWith( {DateTime? creationDate, bool? isCaller, String? name, String? $__typename}) => - _res; + Query$GetApiTokens$api$devices( + creationDate: creationDate == null ? this.creationDate : creationDate, + isCaller: isCaller == null ? this.isCaller : isCaller, + name: name == null ? this.name : name, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Query$GetApiVersionQuery { - Query$GetApiVersionQuery({required this.api, required this.$__typename}); +class Query$RecoveryKey { + Query$RecoveryKey({required this.api, required this.$__typename}); @override - factory Query$GetApiVersionQuery.fromJson(Map json) => - _$Query$GetApiVersionQueryFromJson(json); + factory Query$RecoveryKey.fromJson(Map json) => + _$Query$RecoveryKeyFromJson(json); - final Query$GetApiVersionQuery$api api; + final Query$RecoveryKey$api api; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersionQueryToJson(this); + Map toJson() => _$Query$RecoveryKeyToJson(this); int get hashCode { final l$api = api; final l$$__typename = $__typename; @@ -496,8 +2538,8 @@ class Query$GetApiVersionQuery { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiVersionQuery) || - runtimeType != other.runtimeType) return false; + if (!(other is Query$RecoveryKey) || runtimeType != other.runtimeType) + return false; final l$api = api; final lOther$api = other.api; if (l$api != lOther$api) return false; @@ -508,64 +2550,18 @@ class Query$GetApiVersionQuery { } } -extension UtilityExtension$Query$GetApiVersionQuery - on Query$GetApiVersionQuery { - CopyWith$Query$GetApiVersionQuery get copyWith => - CopyWith$Query$GetApiVersionQuery(this, (i) => i); +extension UtilityExtension$Query$RecoveryKey on Query$RecoveryKey { + Query$RecoveryKey copyWith( + {Query$RecoveryKey$api? api, String? $__typename}) => + Query$RecoveryKey( + api: api == null ? this.api : api, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetApiVersionQuery { - factory CopyWith$Query$GetApiVersionQuery(Query$GetApiVersionQuery instance, - TRes Function(Query$GetApiVersionQuery) then) = - _CopyWithImpl$Query$GetApiVersionQuery; - - factory CopyWith$Query$GetApiVersionQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiVersionQuery; - - TRes call({Query$GetApiVersionQuery$api? api, String? $__typename}); - CopyWith$Query$GetApiVersionQuery$api get api; -} - -class _CopyWithImpl$Query$GetApiVersionQuery - implements CopyWith$Query$GetApiVersionQuery { - _CopyWithImpl$Query$GetApiVersionQuery(this._instance, this._then); - - final Query$GetApiVersionQuery _instance; - - final TRes Function(Query$GetApiVersionQuery) _then; - - static const _undefined = {}; - - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiVersionQuery( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiVersionQuery$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetApiVersionQuery$api get api { - final local$api = _instance.api; - return CopyWith$Query$GetApiVersionQuery$api( - local$api, (e) => call(api: e)); - } -} - -class _CopyWithStubImpl$Query$GetApiVersionQuery - implements CopyWith$Query$GetApiVersionQuery { - _CopyWithStubImpl$Query$GetApiVersionQuery(this._res); - - TRes _res; - - call({Query$GetApiVersionQuery$api? api, String? $__typename}) => _res; - CopyWith$Query$GetApiVersionQuery$api get api => - CopyWith$Query$GetApiVersionQuery$api.stub(_res); -} - -const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ +const documentNodeQueryRecoveryKey = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, - name: NameNode(value: 'GetApiVersionQuery'), + name: NameNode(value: 'RecoveryKey'), variableDefinitions: [], directives: [], selectionSet: SelectionSetNode(selections: [ @@ -576,7 +2572,402 @@ const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'version'), + name: NameNode(value: 'recoveryKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'creationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'exists'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'expirationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usesLeft'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'valid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$RecoveryKey _parserFn$Query$RecoveryKey(Map data) => + Query$RecoveryKey.fromJson(data); + +class Options$Query$RecoveryKey + extends graphql.QueryOptions { + Options$Query$RecoveryKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryRecoveryKey, + parserFn: _parserFn$Query$RecoveryKey); +} + +class WatchOptions$Query$RecoveryKey + extends graphql.WatchQueryOptions { + WatchOptions$Query$RecoveryKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryRecoveryKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$RecoveryKey); +} + +class FetchMoreOptions$Query$RecoveryKey extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$RecoveryKey({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryRecoveryKey); +} + +extension ClientExtension$Query$RecoveryKey on graphql.GraphQLClient { + Future> query$RecoveryKey( + [Options$Query$RecoveryKey? options]) async => + await this.query(options ?? Options$Query$RecoveryKey()); + graphql.ObservableQuery watchQuery$RecoveryKey( + [WatchOptions$Query$RecoveryKey? options]) => + this.watchQuery(options ?? WatchOptions$Query$RecoveryKey()); + void writeQuery$RecoveryKey( + {required Query$RecoveryKey data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryRecoveryKey)), + data: data.toJson(), + broadcast: broadcast); + Query$RecoveryKey? readQuery$RecoveryKey({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryRecoveryKey)), + optimistic: optimistic); + return result == null ? null : Query$RecoveryKey.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$RecoveryKey$api { + Query$RecoveryKey$api({required this.recoveryKey, required this.$__typename}); + + @override + factory Query$RecoveryKey$api.fromJson(Map json) => + _$Query$RecoveryKey$apiFromJson(json); + + final Query$RecoveryKey$api$recoveryKey recoveryKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$RecoveryKey$apiToJson(this); + int get hashCode { + final l$recoveryKey = recoveryKey; + final l$$__typename = $__typename; + return Object.hashAll([l$recoveryKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$RecoveryKey$api) || runtimeType != other.runtimeType) + return false; + final l$recoveryKey = recoveryKey; + final lOther$recoveryKey = other.recoveryKey; + if (l$recoveryKey != lOther$recoveryKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$RecoveryKey$api on Query$RecoveryKey$api { + Query$RecoveryKey$api copyWith( + {Query$RecoveryKey$api$recoveryKey? recoveryKey, + String? $__typename}) => + Query$RecoveryKey$api( + recoveryKey: recoveryKey == null ? this.recoveryKey : recoveryKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$RecoveryKey$api$recoveryKey { + Query$RecoveryKey$api$recoveryKey( + {this.creationDate, + required this.exists, + this.expirationDate, + this.usesLeft, + required this.valid, + required this.$__typename}); + + @override + factory Query$RecoveryKey$api$recoveryKey.fromJson( + Map json) => + _$Query$RecoveryKey$api$recoveryKeyFromJson(json); + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? creationDate; + + final bool exists; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? expirationDate; + + final int? usesLeft; + + final bool valid; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$RecoveryKey$api$recoveryKeyToJson(this); + int get hashCode { + final l$creationDate = creationDate; + final l$exists = exists; + final l$expirationDate = expirationDate; + final l$usesLeft = usesLeft; + final l$valid = valid; + final l$$__typename = $__typename; + return Object.hashAll([ + l$creationDate, + l$exists, + l$expirationDate, + l$usesLeft, + l$valid, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$RecoveryKey$api$recoveryKey) || + runtimeType != other.runtimeType) return false; + final l$creationDate = creationDate; + final lOther$creationDate = other.creationDate; + if (l$creationDate != lOther$creationDate) return false; + final l$exists = exists; + final lOther$exists = other.exists; + if (l$exists != lOther$exists) return false; + final l$expirationDate = expirationDate; + final lOther$expirationDate = other.expirationDate; + if (l$expirationDate != lOther$expirationDate) return false; + final l$usesLeft = usesLeft; + final lOther$usesLeft = other.usesLeft; + if (l$usesLeft != lOther$usesLeft) return false; + final l$valid = valid; + final lOther$valid = other.valid; + if (l$valid != lOther$valid) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$RecoveryKey$api$recoveryKey + on Query$RecoveryKey$api$recoveryKey { + Query$RecoveryKey$api$recoveryKey copyWith( + {DateTime? Function()? creationDate, + bool? exists, + DateTime? Function()? expirationDate, + int? Function()? usesLeft, + bool? valid, + String? $__typename}) => + Query$RecoveryKey$api$recoveryKey( + creationDate: + creationDate == null ? this.creationDate : creationDate(), + exists: exists == null ? this.exists : exists, + expirationDate: + expirationDate == null ? this.expirationDate : expirationDate(), + usesLeft: usesLeft == null ? this.usesLeft : usesLeft(), + valid: valid == null ? this.valid : valid, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$GetNewRecoveryApiKey { + Variables$Mutation$GetNewRecoveryApiKey({this.limits}); + + @override + factory Variables$Mutation$GetNewRecoveryApiKey.fromJson( + Map json) => + _$Variables$Mutation$GetNewRecoveryApiKeyFromJson(json); + + final Input$RecoveryKeyLimitsInput? limits; + + Map toJson() => + _$Variables$Mutation$GetNewRecoveryApiKeyToJson(this); + int get hashCode { + final l$limits = limits; + return Object.hashAll([l$limits]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$GetNewRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$limits = limits; + final lOther$limits = other.limits; + if (l$limits != lOther$limits) return false; + return true; + } + + Variables$Mutation$GetNewRecoveryApiKey copyWith( + {Input$RecoveryKeyLimitsInput? Function()? limits}) => + Variables$Mutation$GetNewRecoveryApiKey( + limits: limits == null ? this.limits : limits()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewRecoveryApiKey { + Mutation$GetNewRecoveryApiKey( + {required this.getNewRecoveryApiKey, required this.$__typename}); + + @override + factory Mutation$GetNewRecoveryApiKey.fromJson(Map json) => + _$Mutation$GetNewRecoveryApiKeyFromJson(json); + + final Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey getNewRecoveryApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$GetNewRecoveryApiKeyToJson(this); + int get hashCode { + final l$getNewRecoveryApiKey = getNewRecoveryApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$getNewRecoveryApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$getNewRecoveryApiKey = getNewRecoveryApiKey; + final lOther$getNewRecoveryApiKey = other.getNewRecoveryApiKey; + if (l$getNewRecoveryApiKey != lOther$getNewRecoveryApiKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewRecoveryApiKey + on Mutation$GetNewRecoveryApiKey { + Mutation$GetNewRecoveryApiKey copyWith( + {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? + getNewRecoveryApiKey, + String? $__typename}) => + Mutation$GetNewRecoveryApiKey( + getNewRecoveryApiKey: getNewRecoveryApiKey == null + ? this.getNewRecoveryApiKey + : getNewRecoveryApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationGetNewRecoveryApiKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'GetNewRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'limits')), + type: NamedTypeNode( + name: NameNode(value: 'RecoveryKeyLimitsInput'), + isNonNull: false), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'limits'), + value: VariableNode(name: NameNode(value: 'limits'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'key'), alias: null, arguments: [], directives: [], @@ -595,36 +2986,623 @@ const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Query$GetApiVersionQuery _parserFn$Query$GetApiVersionQuery( +Mutation$GetNewRecoveryApiKey _parserFn$Mutation$GetNewRecoveryApiKey( Map data) => - Query$GetApiVersionQuery.fromJson(data); + Mutation$GetNewRecoveryApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$GetNewRecoveryApiKey = FutureOr + Function(dynamic, Mutation$GetNewRecoveryApiKey?); -class Options$Query$GetApiVersionQuery - extends graphql.QueryOptions { - Options$Query$GetApiVersionQuery( +class Options$Mutation$GetNewRecoveryApiKey + extends graphql.MutationOptions { + Options$Mutation$GetNewRecoveryApiKey( {String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables?.toJson() ?? {}, operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, - pollInterval: pollInterval, context: context, - document: documentNodeQueryGetApiVersionQuery, - parserFn: _parserFn$Query$GetApiVersionQuery); + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$GetNewRecoveryApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationGetNewRecoveryApiKey, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); + + final OnMutationCompleted$Mutation$GetNewRecoveryApiKey? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Query$GetApiVersionQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiVersionQuery( +class WatchOptions$Mutation$GetNewRecoveryApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$GetNewRecoveryApiKey( + {String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); +} + +extension ClientExtension$Mutation$GetNewRecoveryApiKey + on graphql.GraphQLClient { + Future> + mutate$GetNewRecoveryApiKey( + [Options$Mutation$GetNewRecoveryApiKey? options]) async => + await this.mutate(options ?? Options$Mutation$GetNewRecoveryApiKey()); + graphql.ObservableQuery + watchMutation$GetNewRecoveryApiKey( + [WatchOptions$Mutation$GetNewRecoveryApiKey? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$GetNewRecoveryApiKey()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + implements Fragment$basicMutationReturnFields { + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key}); + + @override + factory Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( + Map json) => + _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? key; + + Map toJson() => + _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$key = key; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + on Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey { + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? key}) => + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + key: key == null ? this.key : key()); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$UseRecoveryApiKey { + Variables$Mutation$UseRecoveryApiKey({required this.input}); + + @override + factory Variables$Mutation$UseRecoveryApiKey.fromJson( + Map json) => + _$Variables$Mutation$UseRecoveryApiKeyFromJson(json); + + final Input$UseRecoveryKeyInput input; + + Map toJson() => + _$Variables$Mutation$UseRecoveryApiKeyToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$UseRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$UseRecoveryApiKey copyWith( + {Input$UseRecoveryKeyInput? input}) => + Variables$Mutation$UseRecoveryApiKey( + input: input == null ? this.input : input); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UseRecoveryApiKey { + Mutation$UseRecoveryApiKey( + {required this.useRecoveryApiKey, required this.$__typename}); + + @override + factory Mutation$UseRecoveryApiKey.fromJson(Map json) => + _$Mutation$UseRecoveryApiKeyFromJson(json); + + final Mutation$UseRecoveryApiKey$useRecoveryApiKey useRecoveryApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$UseRecoveryApiKeyToJson(this); + int get hashCode { + final l$useRecoveryApiKey = useRecoveryApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$useRecoveryApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UseRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$useRecoveryApiKey = useRecoveryApiKey; + final lOther$useRecoveryApiKey = other.useRecoveryApiKey; + if (l$useRecoveryApiKey != lOther$useRecoveryApiKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UseRecoveryApiKey + on Mutation$UseRecoveryApiKey { + Mutation$UseRecoveryApiKey copyWith( + {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, + String? $__typename}) => + Mutation$UseRecoveryApiKey( + useRecoveryApiKey: useRecoveryApiKey == null + ? this.useRecoveryApiKey + : useRecoveryApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationUseRecoveryApiKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'UseRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseRecoveryKeyInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'useRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'token'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$UseRecoveryApiKey _parserFn$Mutation$UseRecoveryApiKey( + Map data) => + Mutation$UseRecoveryApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$UseRecoveryApiKey = FutureOr + Function(dynamic, Mutation$UseRecoveryApiKey?); + +class Options$Mutation$UseRecoveryApiKey + extends graphql.MutationOptions { + Options$Mutation$UseRecoveryApiKey( + {String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$UseRecoveryApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationUseRecoveryApiKey, + parserFn: _parserFn$Mutation$UseRecoveryApiKey); + + final OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$UseRecoveryApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$UseRecoveryApiKey( + {String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUseRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UseRecoveryApiKey); +} + +extension ClientExtension$Mutation$UseRecoveryApiKey on graphql.GraphQLClient { + Future> + mutate$UseRecoveryApiKey( + Options$Mutation$UseRecoveryApiKey options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$UseRecoveryApiKey( + WatchOptions$Mutation$UseRecoveryApiKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UseRecoveryApiKey$useRecoveryApiKey + implements Fragment$basicMutationReturnFields { + Mutation$UseRecoveryApiKey$useRecoveryApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token}); + + @override + factory Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( + Map json) => + _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? token; + + Map toJson() => + _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$token = token; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$token]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UseRecoveryApiKey$useRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$token = token; + final lOther$token = other.token; + if (l$token != lOther$token) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UseRecoveryApiKey$useRecoveryApiKey + on Mutation$UseRecoveryApiKey$useRecoveryApiKey { + Mutation$UseRecoveryApiKey$useRecoveryApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? token}) => + Mutation$UseRecoveryApiKey$useRecoveryApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + token: token == null ? this.token : token()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RefreshDeviceApiToken { + Mutation$RefreshDeviceApiToken( + {required this.refreshDeviceApiToken, required this.$__typename}); + + @override + factory Mutation$RefreshDeviceApiToken.fromJson(Map json) => + _$Mutation$RefreshDeviceApiTokenFromJson(json); + + final Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + refreshDeviceApiToken; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RefreshDeviceApiTokenToJson(this); + int get hashCode { + final l$refreshDeviceApiToken = refreshDeviceApiToken; + final l$$__typename = $__typename; + return Object.hashAll([l$refreshDeviceApiToken, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RefreshDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$refreshDeviceApiToken = refreshDeviceApiToken; + final lOther$refreshDeviceApiToken = other.refreshDeviceApiToken; + if (l$refreshDeviceApiToken != lOther$refreshDeviceApiToken) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RefreshDeviceApiToken + on Mutation$RefreshDeviceApiToken { + Mutation$RefreshDeviceApiToken copyWith( + {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? + refreshDeviceApiToken, + String? $__typename}) => + Mutation$RefreshDeviceApiToken( + refreshDeviceApiToken: refreshDeviceApiToken == null + ? this.refreshDeviceApiToken + : refreshDeviceApiToken, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRefreshDeviceApiToken = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RefreshDeviceApiToken'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'refreshDeviceApiToken'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'token'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RefreshDeviceApiToken _parserFn$Mutation$RefreshDeviceApiToken( + Map data) => + Mutation$RefreshDeviceApiToken.fromJson(data); +typedef OnMutationCompleted$Mutation$RefreshDeviceApiToken = FutureOr + Function(dynamic, Mutation$RefreshDeviceApiToken?); + +class Options$Mutation$RefreshDeviceApiToken + extends graphql.MutationOptions { + Options$Mutation$RefreshDeviceApiToken( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RefreshDeviceApiToken(data)), + update: update, + onError: onError, + document: documentNodeMutationRefreshDeviceApiToken, + parserFn: _parserFn$Mutation$RefreshDeviceApiToken); + + final OnMutationCompleted$Mutation$RefreshDeviceApiToken? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RefreshDeviceApiToken + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RefreshDeviceApiToken( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -642,80 +3620,169 @@ class WatchOptions$Query$GetApiVersionQuery cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeQueryGetApiVersionQuery, + document: documentNodeMutationRefreshDeviceApiToken, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiVersionQuery); + parserFn: _parserFn$Mutation$RefreshDeviceApiToken); } -class FetchMoreOptions$Query$GetApiVersionQuery - extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetApiVersionQuery( - {required graphql.UpdateQuery updateQuery}) - : super( - updateQuery: updateQuery, - document: documentNodeQueryGetApiVersionQuery); -} - -extension ClientExtension$Query$GetApiVersionQuery on graphql.GraphQLClient { - Future> - query$GetApiVersionQuery( - [Options$Query$GetApiVersionQuery? options]) async => - await this.query(options ?? Options$Query$GetApiVersionQuery()); - graphql.ObservableQuery - watchQuery$GetApiVersionQuery( - [WatchOptions$Query$GetApiVersionQuery? options]) => - this.watchQuery(options ?? WatchOptions$Query$GetApiVersionQuery()); - void writeQuery$GetApiVersionQuery( - {required Query$GetApiVersionQuery data, bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiVersionQuery)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiVersionQuery? readQuery$GetApiVersionQuery( - {bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiVersionQuery)), - optimistic: optimistic); - return result == null ? null : Query$GetApiVersionQuery.fromJson(result); - } +extension ClientExtension$Mutation$RefreshDeviceApiToken + on graphql.GraphQLClient { + Future> + mutate$RefreshDeviceApiToken( + [Options$Mutation$RefreshDeviceApiToken? options]) async => + await this + .mutate(options ?? Options$Mutation$RefreshDeviceApiToken()); + graphql.ObservableQuery + watchMutation$RefreshDeviceApiToken( + [WatchOptions$Mutation$RefreshDeviceApiToken? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$RefreshDeviceApiToken()); } @JsonSerializable(explicitToJson: true) -class Query$GetApiVersionQuery$api { - Query$GetApiVersionQuery$api( - {required this.version, required this.$__typename}); +class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + implements Fragment$basicMutationReturnFields { + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token}); @override - factory Query$GetApiVersionQuery$api.fromJson(Map json) => - _$Query$GetApiVersionQuery$apiFromJson(json); + factory Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( + Map json) => + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson(json); - final String version; + final int code; + + final String message; + + final bool success; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersionQuery$apiToJson(this); + final String? token; + + Map toJson() => + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson(this); int get hashCode { - final l$version = version; + final l$code = code; + final l$message = message; + final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$version, l$$__typename]); + final l$token = token; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$token]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiVersionQuery$api) || + if (!(other is Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) || runtimeType != other.runtimeType) return false; - final l$version = version; - final lOther$version = other.version; - if (l$version != lOther$version) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$token = token; + final lOther$token = other.token; + if (l$token != lOther$token) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + on Mutation$RefreshDeviceApiToken$refreshDeviceApiToken { + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? token}) => + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + token: token == null ? this.token : token()); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$DeleteDeviceApiToken { + Variables$Mutation$DeleteDeviceApiToken({required this.device}); + + @override + factory Variables$Mutation$DeleteDeviceApiToken.fromJson( + Map json) => + _$Variables$Mutation$DeleteDeviceApiTokenFromJson(json); + + final String device; + + Map toJson() => + _$Variables$Mutation$DeleteDeviceApiTokenToJson(this); + int get hashCode { + final l$device = device; + return Object.hashAll([l$device]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$DeleteDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$device = device; + final lOther$device = other.device; + if (l$device != lOther$device) return false; + return true; + } + + Variables$Mutation$DeleteDeviceApiToken copyWith({String? device}) => + Variables$Mutation$DeleteDeviceApiToken( + device: device == null ? this.device : device); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DeleteDeviceApiToken { + Mutation$DeleteDeviceApiToken( + {required this.deleteDeviceApiToken, required this.$__typename}); + + @override + factory Mutation$DeleteDeviceApiToken.fromJson(Map json) => + _$Mutation$DeleteDeviceApiTokenFromJson(json); + + final Mutation$DeleteDeviceApiToken$deleteDeviceApiToken deleteDeviceApiToken; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DeleteDeviceApiTokenToJson(this); + int get hashCode { + final l$deleteDeviceApiToken = deleteDeviceApiToken; + final l$$__typename = $__typename; + return Object.hashAll([l$deleteDeviceApiToken, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DeleteDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$deleteDeviceApiToken = deleteDeviceApiToken; + final lOther$deleteDeviceApiToken = other.deleteDeviceApiToken; + if (l$deleteDeviceApiToken != lOther$deleteDeviceApiToken) return false; final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) return false; @@ -723,49 +3790,1035 @@ class Query$GetApiVersionQuery$api { } } -extension UtilityExtension$Query$GetApiVersionQuery$api - on Query$GetApiVersionQuery$api { - CopyWith$Query$GetApiVersionQuery$api - get copyWith => CopyWith$Query$GetApiVersionQuery$api(this, (i) => i); +extension UtilityExtension$Mutation$DeleteDeviceApiToken + on Mutation$DeleteDeviceApiToken { + Mutation$DeleteDeviceApiToken copyWith( + {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? + deleteDeviceApiToken, + String? $__typename}) => + Mutation$DeleteDeviceApiToken( + deleteDeviceApiToken: deleteDeviceApiToken == null + ? this.deleteDeviceApiToken + : deleteDeviceApiToken, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetApiVersionQuery$api { - factory CopyWith$Query$GetApiVersionQuery$api( - Query$GetApiVersionQuery$api instance, - TRes Function(Query$GetApiVersionQuery$api) then) = - _CopyWithImpl$Query$GetApiVersionQuery$api; +const documentNodeMutationDeleteDeviceApiToken = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'DeleteDeviceApiToken'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'device')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteDeviceApiToken'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'device'), + value: VariableNode(name: NameNode(value: 'device'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$DeleteDeviceApiToken _parserFn$Mutation$DeleteDeviceApiToken( + Map data) => + Mutation$DeleteDeviceApiToken.fromJson(data); +typedef OnMutationCompleted$Mutation$DeleteDeviceApiToken = FutureOr + Function(dynamic, Mutation$DeleteDeviceApiToken?); - factory CopyWith$Query$GetApiVersionQuery$api.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiVersionQuery$api; +class Options$Mutation$DeleteDeviceApiToken + extends graphql.MutationOptions { + Options$Mutation$DeleteDeviceApiToken( + {String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$DeleteDeviceApiToken(data)), + update: update, + onError: onError, + document: documentNodeMutationDeleteDeviceApiToken, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken); - TRes call({String? version, String? $__typename}); + final OnMutationCompleted$Mutation$DeleteDeviceApiToken? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class _CopyWithImpl$Query$GetApiVersionQuery$api - implements CopyWith$Query$GetApiVersionQuery$api { - _CopyWithImpl$Query$GetApiVersionQuery$api(this._instance, this._then); - - final Query$GetApiVersionQuery$api _instance; - - final TRes Function(Query$GetApiVersionQuery$api) _then; - - static const _undefined = {}; - - TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiVersionQuery$api( - version: version == _undefined || version == null - ? _instance.version - : (version as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); +class WatchOptions$Mutation$DeleteDeviceApiToken + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$DeleteDeviceApiToken( + {String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteDeviceApiToken, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken); } -class _CopyWithStubImpl$Query$GetApiVersionQuery$api - implements CopyWith$Query$GetApiVersionQuery$api { - _CopyWithStubImpl$Query$GetApiVersionQuery$api(this._res); - - TRes _res; - - call({String? version, String? $__typename}) => _res; +extension ClientExtension$Mutation$DeleteDeviceApiToken + on graphql.GraphQLClient { + Future> + mutate$DeleteDeviceApiToken( + Options$Mutation$DeleteDeviceApiToken options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$DeleteDeviceApiToken( + WatchOptions$Mutation$DeleteDeviceApiToken options) => + this.watchMutation(options); } + +@JsonSerializable(explicitToJson: true) +class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + implements Fragment$basicMutationReturnFields { + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( + Map json) => + _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + on Mutation$DeleteDeviceApiToken$deleteDeviceApiToken { + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewDeviceApiKey { + Mutation$GetNewDeviceApiKey( + {required this.getNewDeviceApiKey, required this.$__typename}); + + @override + factory Mutation$GetNewDeviceApiKey.fromJson(Map json) => + _$Mutation$GetNewDeviceApiKeyFromJson(json); + + final Mutation$GetNewDeviceApiKey$getNewDeviceApiKey getNewDeviceApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$GetNewDeviceApiKeyToJson(this); + int get hashCode { + final l$getNewDeviceApiKey = getNewDeviceApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$getNewDeviceApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$getNewDeviceApiKey = getNewDeviceApiKey; + final lOther$getNewDeviceApiKey = other.getNewDeviceApiKey; + if (l$getNewDeviceApiKey != lOther$getNewDeviceApiKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewDeviceApiKey + on Mutation$GetNewDeviceApiKey { + Mutation$GetNewDeviceApiKey copyWith( + {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, + String? $__typename}) => + Mutation$GetNewDeviceApiKey( + getNewDeviceApiKey: getNewDeviceApiKey == null + ? this.getNewDeviceApiKey + : getNewDeviceApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationGetNewDeviceApiKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'GetNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'key'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$GetNewDeviceApiKey _parserFn$Mutation$GetNewDeviceApiKey( + Map data) => + Mutation$GetNewDeviceApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$GetNewDeviceApiKey = FutureOr + Function(dynamic, Mutation$GetNewDeviceApiKey?); + +class Options$Mutation$GetNewDeviceApiKey + extends graphql.MutationOptions { + Options$Mutation$GetNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$GetNewDeviceApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationGetNewDeviceApiKey, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey); + + final OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$GetNewDeviceApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$GetNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey); +} + +extension ClientExtension$Mutation$GetNewDeviceApiKey on graphql.GraphQLClient { + Future> + mutate$GetNewDeviceApiKey( + [Options$Mutation$GetNewDeviceApiKey? options]) async => + await this.mutate(options ?? Options$Mutation$GetNewDeviceApiKey()); + graphql.ObservableQuery< + Mutation$GetNewDeviceApiKey> watchMutation$GetNewDeviceApiKey( + [WatchOptions$Mutation$GetNewDeviceApiKey? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$GetNewDeviceApiKey()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + implements Fragment$basicMutationReturnFields { + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key}); + + @override + factory Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? key; + + Map toJson() => + _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$key = key; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + on Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? key}) => + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + key: key == null ? this.key : key()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$InvalidateNewDeviceApiKey { + Mutation$InvalidateNewDeviceApiKey( + {required this.invalidateNewDeviceApiKey, required this.$__typename}); + + @override + factory Mutation$InvalidateNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$InvalidateNewDeviceApiKeyFromJson(json); + + final Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + invalidateNewDeviceApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$InvalidateNewDeviceApiKeyToJson(this); + int get hashCode { + final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$invalidateNewDeviceApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$InvalidateNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; + final lOther$invalidateNewDeviceApiKey = other.invalidateNewDeviceApiKey; + if (l$invalidateNewDeviceApiKey != lOther$invalidateNewDeviceApiKey) + return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey + on Mutation$InvalidateNewDeviceApiKey { + Mutation$InvalidateNewDeviceApiKey copyWith( + {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? + invalidateNewDeviceApiKey, + String? $__typename}) => + Mutation$InvalidateNewDeviceApiKey( + invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == null + ? this.invalidateNewDeviceApiKey + : invalidateNewDeviceApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationInvalidateNewDeviceApiKey = + DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'InvalidateNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'invalidateNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$InvalidateNewDeviceApiKey _parserFn$Mutation$InvalidateNewDeviceApiKey( + Map data) => + Mutation$InvalidateNewDeviceApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey = FutureOr + Function(dynamic, Mutation$InvalidateNewDeviceApiKey?); + +class Options$Mutation$InvalidateNewDeviceApiKey + extends graphql.MutationOptions { + Options$Mutation$InvalidateNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$InvalidateNewDeviceApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationInvalidateNewDeviceApiKey, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); + + final OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$InvalidateNewDeviceApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$InvalidateNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationInvalidateNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); +} + +extension ClientExtension$Mutation$InvalidateNewDeviceApiKey + on graphql.GraphQLClient { + Future> + mutate$InvalidateNewDeviceApiKey( + [Options$Mutation$InvalidateNewDeviceApiKey? options]) async => + await this + .mutate(options ?? Options$Mutation$InvalidateNewDeviceApiKey()); + graphql.ObservableQuery + watchMutation$InvalidateNewDeviceApiKey( + [WatchOptions$Mutation$InvalidateNewDeviceApiKey? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$InvalidateNewDeviceApiKey()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + implements Fragment$basicMutationReturnFields { + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( + json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( + this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + on Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey { + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$AuthorizeWithNewDeviceApiKey { + Variables$Mutation$AuthorizeWithNewDeviceApiKey({required this.input}); + + @override + factory Variables$Mutation$AuthorizeWithNewDeviceApiKey.fromJson( + Map json) => + _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); + + final Input$UseNewDeviceKeyInput input; + + Map toJson() => + _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$AuthorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$AuthorizeWithNewDeviceApiKey copyWith( + {Input$UseNewDeviceKeyInput? input}) => + Variables$Mutation$AuthorizeWithNewDeviceApiKey( + input: input == null ? this.input : input); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AuthorizeWithNewDeviceApiKey { + Mutation$AuthorizeWithNewDeviceApiKey( + {required this.authorizeWithNewDeviceApiKey, required this.$__typename}); + + @override + factory Mutation$AuthorizeWithNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); + + final Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + authorizeWithNewDeviceApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); + int get hashCode { + final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$authorizeWithNewDeviceApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AuthorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; + final lOther$authorizeWithNewDeviceApiKey = + other.authorizeWithNewDeviceApiKey; + if (l$authorizeWithNewDeviceApiKey != lOther$authorizeWithNewDeviceApiKey) + return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey + on Mutation$AuthorizeWithNewDeviceApiKey { + Mutation$AuthorizeWithNewDeviceApiKey copyWith( + {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? + authorizeWithNewDeviceApiKey, + String? $__typename}) => + Mutation$AuthorizeWithNewDeviceApiKey( + authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == null + ? this.authorizeWithNewDeviceApiKey + : authorizeWithNewDeviceApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationAuthorizeWithNewDeviceApiKey = + DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'AuthorizeWithNewDeviceApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseNewDeviceKeyInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'authorizeWithNewDeviceApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'token'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$AuthorizeWithNewDeviceApiKey + _parserFn$Mutation$AuthorizeWithNewDeviceApiKey( + Map data) => + Mutation$AuthorizeWithNewDeviceApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey + = FutureOr Function(dynamic, Mutation$AuthorizeWithNewDeviceApiKey?); + +class Options$Mutation$AuthorizeWithNewDeviceApiKey + extends graphql.MutationOptions { + Options$Mutation$AuthorizeWithNewDeviceApiKey( + {String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$AuthorizeWithNewDeviceApiKey( + data)), + update: update, + onError: onError, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); + + final OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey( + {String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); +} + +extension ClientExtension$Mutation$AuthorizeWithNewDeviceApiKey + on graphql.GraphQLClient { + Future> + mutate$AuthorizeWithNewDeviceApiKey( + Options$Mutation$AuthorizeWithNewDeviceApiKey options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$AuthorizeWithNewDeviceApiKey( + WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + implements Fragment$basicMutationReturnFields { + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token}); + + @override + factory Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( + json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? token; + + Map toJson() => + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( + this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$token = token; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$token]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$token = token; + final lOther$token = other.token; + if (l$token != lOther$token) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + on Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey { + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? token}) => + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + token: token == null ? this.token : token()); +} + +DateTime? _nullable$dateTimeFromJson(dynamic data) => + data == null ? null : dateTimeFromJson(data); +dynamic _nullable$dateTimeToJson(DateTime? data) => + data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart index dcb8ba01..525f8d64 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart @@ -6,49 +6,370 @@ part of 'server_api.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** -Query$GetApiTokensQuery _$Query$GetApiTokensQueryFromJson( +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( Map json) => - Query$GetApiTokensQuery( - api: Query$GetApiTokensQuery$api.fromJson( - json['api'] as Map), + Fragment$basicMutationReturnFields( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Query$GetApiTokensQueryToJson( - Query$GetApiTokensQuery instance) => +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$GetApiVersion _$Query$GetApiVersionFromJson(Map json) => + Query$GetApiVersion( + api: + Query$GetApiVersion$api.fromJson(json['api'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiVersionToJson( + Query$GetApiVersion instance) => { 'api': instance.api.toJson(), '__typename': instance.$__typename, }; -Query$GetApiTokensQuery$api _$Query$GetApiTokensQuery$apiFromJson( +Query$GetApiVersion$api _$Query$GetApiVersion$apiFromJson( Map json) => - Query$GetApiTokensQuery$api( + Query$GetApiVersion$api( + version: json['version'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiVersion$apiToJson( + Query$GetApiVersion$api instance) => + { + 'version': instance.version, + '__typename': instance.$__typename, + }; + +Query$GetApiJobs _$Query$GetApiJobsFromJson(Map json) => + Query$GetApiJobs( + jobs: + Query$GetApiJobs$jobs.fromJson(json['jobs'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiJobsToJson(Query$GetApiJobs instance) => + { + 'jobs': instance.jobs.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetApiJobs$jobs _$Query$GetApiJobs$jobsFromJson( + Map json) => + Query$GetApiJobs$jobs( + getJobs: (json['getJobs'] as List) + .map((e) => + Query$GetApiJobs$jobs$getJobs.fromJson(e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiJobs$jobsToJson( + Query$GetApiJobs$jobs instance) => + { + 'getJobs': instance.getJobs.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$GetApiJobs$jobs$getJobs _$Query$GetApiJobs$jobs$getJobsFromJson( + Map json) => + Query$GetApiJobs$jobs$getJobs( + createdAt: dateTimeFromJson(json['createdAt']), + description: json['description'] as String, + error: json['error'] as String?, + finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), + name: json['name'] as String, + progress: json['progress'] as int?, + result: json['result'] as String?, + status: json['status'] as String, + statusText: json['statusText'] as String?, + uid: json['uid'] as String, + updatedAt: dateTimeFromJson(json['updatedAt']), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiJobs$jobs$getJobsToJson( + Query$GetApiJobs$jobs$getJobs instance) => + { + 'createdAt': dateTimeToJson(instance.createdAt), + 'description': instance.description, + 'error': instance.error, + 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), + 'name': instance.name, + 'progress': instance.progress, + 'result': instance.result, + 'status': instance.status, + 'statusText': instance.statusText, + 'uid': instance.uid, + 'updatedAt': dateTimeToJson(instance.updatedAt), + '__typename': instance.$__typename, + }; + +Variables$Mutation$RemoveJob _$Variables$Mutation$RemoveJobFromJson( + Map json) => + Variables$Mutation$RemoveJob( + jobId: json['jobId'] as String, + ); + +Map _$Variables$Mutation$RemoveJobToJson( + Variables$Mutation$RemoveJob instance) => + { + 'jobId': instance.jobId, + }; + +Mutation$RemoveJob _$Mutation$RemoveJobFromJson(Map json) => + Mutation$RemoveJob( + removeJob: Mutation$RemoveJob$removeJob.fromJson( + json['removeJob'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveJobToJson(Mutation$RemoveJob instance) => + { + 'removeJob': instance.removeJob.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RemoveJob$removeJob _$Mutation$RemoveJob$removeJobFromJson( + Map json) => + Mutation$RemoveJob$removeJob( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveJob$removeJobToJson( + Mutation$RemoveJob$removeJob instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRebuild _$Mutation$RunSystemRebuildFromJson( + Map json) => + Mutation$RunSystemRebuild( + runSystemRebuild: Mutation$RunSystemRebuild$runSystemRebuild.fromJson( + json['runSystemRebuild'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRebuildToJson( + Mutation$RunSystemRebuild instance) => + { + 'runSystemRebuild': instance.runSystemRebuild.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRebuild$runSystemRebuild + _$Mutation$RunSystemRebuild$runSystemRebuildFromJson( + Map json) => + Mutation$RunSystemRebuild$runSystemRebuild( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRebuild$runSystemRebuildToJson( + Mutation$RunSystemRebuild$runSystemRebuild instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRollback _$Mutation$RunSystemRollbackFromJson( + Map json) => + Mutation$RunSystemRollback( + runSystemRollback: Mutation$RunSystemRollback$runSystemRollback.fromJson( + json['runSystemRollback'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRollbackToJson( + Mutation$RunSystemRollback instance) => + { + 'runSystemRollback': instance.runSystemRollback.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRollback$runSystemRollback + _$Mutation$RunSystemRollback$runSystemRollbackFromJson( + Map json) => + Mutation$RunSystemRollback$runSystemRollback( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRollback$runSystemRollbackToJson( + Mutation$RunSystemRollback$runSystemRollback instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RunSystemUpgrade _$Mutation$RunSystemUpgradeFromJson( + Map json) => + Mutation$RunSystemUpgrade( + runSystemUpgrade: Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( + json['runSystemUpgrade'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemUpgradeToJson( + Mutation$RunSystemUpgrade instance) => + { + 'runSystemUpgrade': instance.runSystemUpgrade.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RunSystemUpgrade$runSystemUpgrade + _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson( + Map json) => + Mutation$RunSystemUpgrade$runSystemUpgrade( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson( + Mutation$RunSystemUpgrade$runSystemUpgrade instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$PullRepositoryChanges _$Mutation$PullRepositoryChangesFromJson( + Map json) => + Mutation$PullRepositoryChanges( + pullRepositoryChanges: + Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( + json['pullRepositoryChanges'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$PullRepositoryChangesToJson( + Mutation$PullRepositoryChanges instance) => + { + 'pullRepositoryChanges': instance.pullRepositoryChanges.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$PullRepositoryChanges$pullRepositoryChanges + _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson( + Map json) => + Mutation$PullRepositoryChanges$pullRepositoryChanges( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map + _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson( + Mutation$PullRepositoryChanges$pullRepositoryChanges instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RebootSystem _$Mutation$RebootSystemFromJson( + Map json) => + Mutation$RebootSystem( + rebootSystem: Mutation$RebootSystem$rebootSystem.fromJson( + json['rebootSystem'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RebootSystemToJson( + Mutation$RebootSystem instance) => + { + 'rebootSystem': instance.rebootSystem.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RebootSystem$rebootSystem _$Mutation$RebootSystem$rebootSystemFromJson( + Map json) => + Mutation$RebootSystem$rebootSystem( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RebootSystem$rebootSystemToJson( + Mutation$RebootSystem$rebootSystem instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$GetApiTokens _$Query$GetApiTokensFromJson(Map json) => + Query$GetApiTokens( + api: Query$GetApiTokens$api.fromJson(json['api'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiTokensToJson(Query$GetApiTokens instance) => + { + 'api': instance.api.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetApiTokens$api _$Query$GetApiTokens$apiFromJson( + Map json) => + Query$GetApiTokens$api( devices: (json['devices'] as List) - .map((e) => Query$GetApiTokensQuery$api$devices.fromJson( + .map((e) => Query$GetApiTokens$api$devices.fromJson( e as Map)) .toList(), $__typename: json['__typename'] as String, ); -Map _$Query$GetApiTokensQuery$apiToJson( - Query$GetApiTokensQuery$api instance) => +Map _$Query$GetApiTokens$apiToJson( + Query$GetApiTokens$api instance) => { 'devices': instance.devices.map((e) => e.toJson()).toList(), '__typename': instance.$__typename, }; -Query$GetApiTokensQuery$api$devices - _$Query$GetApiTokensQuery$api$devicesFromJson(Map json) => - Query$GetApiTokensQuery$api$devices( - creationDate: dateTimeFromJson(json['creationDate']), - isCaller: json['isCaller'] as bool, - name: json['name'] as String, - $__typename: json['__typename'] as String, - ); +Query$GetApiTokens$api$devices _$Query$GetApiTokens$api$devicesFromJson( + Map json) => + Query$GetApiTokens$api$devices( + creationDate: dateTimeFromJson(json['creationDate']), + isCaller: json['isCaller'] as bool, + name: json['name'] as String, + $__typename: json['__typename'] as String, + ); -Map _$Query$GetApiTokensQuery$api$devicesToJson( - Query$GetApiTokensQuery$api$devices instance) => +Map _$Query$GetApiTokens$api$devicesToJson( + Query$GetApiTokens$api$devices instance) => { 'creationDate': dateTimeToJson(instance.creationDate), 'isCaller': instance.isCaller, @@ -56,31 +377,369 @@ Map _$Query$GetApiTokensQuery$api$devicesToJson( '__typename': instance.$__typename, }; -Query$GetApiVersionQuery _$Query$GetApiVersionQueryFromJson( - Map json) => - Query$GetApiVersionQuery( - api: Query$GetApiVersionQuery$api.fromJson( - json['api'] as Map), +Query$RecoveryKey _$Query$RecoveryKeyFromJson(Map json) => + Query$RecoveryKey( + api: Query$RecoveryKey$api.fromJson(json['api'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetApiVersionQueryToJson( - Query$GetApiVersionQuery instance) => +Map _$Query$RecoveryKeyToJson(Query$RecoveryKey instance) => { 'api': instance.api.toJson(), '__typename': instance.$__typename, }; -Query$GetApiVersionQuery$api _$Query$GetApiVersionQuery$apiFromJson( +Query$RecoveryKey$api _$Query$RecoveryKey$apiFromJson( Map json) => - Query$GetApiVersionQuery$api( - version: json['version'] as String, + Query$RecoveryKey$api( + recoveryKey: Query$RecoveryKey$api$recoveryKey.fromJson( + json['recoveryKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetApiVersionQuery$apiToJson( - Query$GetApiVersionQuery$api instance) => +Map _$Query$RecoveryKey$apiToJson( + Query$RecoveryKey$api instance) => { - 'version': instance.version, + 'recoveryKey': instance.recoveryKey.toJson(), '__typename': instance.$__typename, }; + +Query$RecoveryKey$api$recoveryKey _$Query$RecoveryKey$api$recoveryKeyFromJson( + Map json) => + Query$RecoveryKey$api$recoveryKey( + creationDate: _nullable$dateTimeFromJson(json['creationDate']), + exists: json['exists'] as bool, + expirationDate: _nullable$dateTimeFromJson(json['expirationDate']), + usesLeft: json['usesLeft'] as int?, + valid: json['valid'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Query$RecoveryKey$api$recoveryKeyToJson( + Query$RecoveryKey$api$recoveryKey instance) => + { + 'creationDate': _nullable$dateTimeToJson(instance.creationDate), + 'exists': instance.exists, + 'expirationDate': _nullable$dateTimeToJson(instance.expirationDate), + 'usesLeft': instance.usesLeft, + 'valid': instance.valid, + '__typename': instance.$__typename, + }; + +Variables$Mutation$GetNewRecoveryApiKey + _$Variables$Mutation$GetNewRecoveryApiKeyFromJson( + Map json) => + Variables$Mutation$GetNewRecoveryApiKey( + limits: json['limits'] == null + ? null + : Input$RecoveryKeyLimitsInput.fromJson( + json['limits'] as Map), + ); + +Map _$Variables$Mutation$GetNewRecoveryApiKeyToJson( + Variables$Mutation$GetNewRecoveryApiKey instance) => + { + 'limits': instance.limits?.toJson(), + }; + +Mutation$GetNewRecoveryApiKey _$Mutation$GetNewRecoveryApiKeyFromJson( + Map json) => + Mutation$GetNewRecoveryApiKey( + getNewRecoveryApiKey: + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( + json['getNewRecoveryApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$GetNewRecoveryApiKeyToJson( + Mutation$GetNewRecoveryApiKey instance) => + { + 'getNewRecoveryApiKey': instance.getNewRecoveryApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson( + Map json) => + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + key: json['key'] as String?, + ); + +Map _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson( + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'key': instance.key, + }; + +Variables$Mutation$UseRecoveryApiKey + _$Variables$Mutation$UseRecoveryApiKeyFromJson(Map json) => + Variables$Mutation$UseRecoveryApiKey( + input: Input$UseRecoveryKeyInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$UseRecoveryApiKeyToJson( + Variables$Mutation$UseRecoveryApiKey instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$UseRecoveryApiKey _$Mutation$UseRecoveryApiKeyFromJson( + Map json) => + Mutation$UseRecoveryApiKey( + useRecoveryApiKey: Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( + json['useRecoveryApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UseRecoveryApiKeyToJson( + Mutation$UseRecoveryApiKey instance) => + { + 'useRecoveryApiKey': instance.useRecoveryApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$UseRecoveryApiKey$useRecoveryApiKey + _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson( + Map json) => + Mutation$UseRecoveryApiKey$useRecoveryApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + token: json['token'] as String?, + ); + +Map _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson( + Mutation$UseRecoveryApiKey$useRecoveryApiKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'token': instance.token, + }; + +Mutation$RefreshDeviceApiToken _$Mutation$RefreshDeviceApiTokenFromJson( + Map json) => + Mutation$RefreshDeviceApiToken( + refreshDeviceApiToken: + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( + json['refreshDeviceApiToken'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RefreshDeviceApiTokenToJson( + Mutation$RefreshDeviceApiToken instance) => + { + 'refreshDeviceApiToken': instance.refreshDeviceApiToken.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson( + Map json) => + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + token: json['token'] as String?, + ); + +Map + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson( + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'token': instance.token, + }; + +Variables$Mutation$DeleteDeviceApiToken + _$Variables$Mutation$DeleteDeviceApiTokenFromJson( + Map json) => + Variables$Mutation$DeleteDeviceApiToken( + device: json['device'] as String, + ); + +Map _$Variables$Mutation$DeleteDeviceApiTokenToJson( + Variables$Mutation$DeleteDeviceApiToken instance) => + { + 'device': instance.device, + }; + +Mutation$DeleteDeviceApiToken _$Mutation$DeleteDeviceApiTokenFromJson( + Map json) => + Mutation$DeleteDeviceApiToken( + deleteDeviceApiToken: + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( + json['deleteDeviceApiToken'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DeleteDeviceApiTokenToJson( + Mutation$DeleteDeviceApiToken instance) => + { + 'deleteDeviceApiToken': instance.deleteDeviceApiToken.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson( + Map json) => + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson( + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$GetNewDeviceApiKey _$Mutation$GetNewDeviceApiKeyFromJson( + Map json) => + Mutation$GetNewDeviceApiKey( + getNewDeviceApiKey: + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( + json['getNewDeviceApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$GetNewDeviceApiKeyToJson( + Mutation$GetNewDeviceApiKey instance) => + { + 'getNewDeviceApiKey': instance.getNewDeviceApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson( + Map json) => + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + key: json['key'] as String?, + ); + +Map _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson( + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'key': instance.key, + }; + +Mutation$InvalidateNewDeviceApiKey _$Mutation$InvalidateNewDeviceApiKeyFromJson( + Map json) => + Mutation$InvalidateNewDeviceApiKey( + invalidateNewDeviceApiKey: + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( + json['invalidateNewDeviceApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$InvalidateNewDeviceApiKeyToJson( + Mutation$InvalidateNewDeviceApiKey instance) => + { + 'invalidateNewDeviceApiKey': instance.invalidateNewDeviceApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( + Map json) => + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$AuthorizeWithNewDeviceApiKey + _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( + Map json) => + Variables$Mutation$AuthorizeWithNewDeviceApiKey( + input: Input$UseNewDeviceKeyInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson( + Variables$Mutation$AuthorizeWithNewDeviceApiKey instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$AuthorizeWithNewDeviceApiKey + _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( + Map json) => + Mutation$AuthorizeWithNewDeviceApiKey( + authorizeWithNewDeviceApiKey: + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + .fromJson(json['authorizeWithNewDeviceApiKey'] + as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$AuthorizeWithNewDeviceApiKeyToJson( + Mutation$AuthorizeWithNewDeviceApiKey instance) => + { + 'authorizeWithNewDeviceApiKey': + instance.authorizeWithNewDeviceApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( + Map json) => + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + token: json['token'] as String?, + ); + +Map + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'token': instance.token, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql new file mode 100644 index 00000000..75d36d0a --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql @@ -0,0 +1,54 @@ +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query SystemSettings { + system { + settings { + autoUpgrade { + allowReboot + enable + } + ssh { + enable + passwordAuthentication + rootSshKeys + } + timezone + } + } +} + +query DomainInfo { + system { + domainInfo { + domain + hostname + provider + requiredDnsRecords { + content + name + priority + recordType + ttl + } + } + } +} + +mutation ChangeTimezone($timezone: String!) { + changeTimezone(timezone: $timezone) { + ...basicMutationReturnFields + timezone + } +} + +mutation ChangeAutoUpgradeSettings($settings: AutoUpgradeSettingsInput!) { + changeAutoUpgradeSettings(settings: $settings) { + ...basicMutationReturnFields + allowReboot + enableAutoUpgrade + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart new file mode 100644 index 00000000..c37a1a9c --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -0,0 +1,1707 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +import 'schema.graphql.dart'; +part 'server_settings.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Fragment$basicMutationReturnFields) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( + {required Map idFields, bool optimistic = true}) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings { + Query$SystemSettings({required this.system, required this.$__typename}); + + @override + factory Query$SystemSettings.fromJson(Map json) => + _$Query$SystemSettingsFromJson(json); + + final Query$SystemSettings$system system; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemSettingsToJson(this); + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([l$system, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings) || runtimeType != other.runtimeType) + return false; + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings on Query$SystemSettings { + Query$SystemSettings copyWith( + {Query$SystemSettings$system? system, String? $__typename}) => + Query$SystemSettings( + system: system == null ? this.system : system, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQuerySystemSettings = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'SystemSettings'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'settings'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'autoUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: 'ssh'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'passwordAuthentication'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'rootSshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: 'timezone'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$SystemSettings _parserFn$Query$SystemSettings( + Map data) => + Query$SystemSettings.fromJson(data); + +class Options$Query$SystemSettings + extends graphql.QueryOptions { + Options$Query$SystemSettings( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemSettings, + parserFn: _parserFn$Query$SystemSettings); +} + +class WatchOptions$Query$SystemSettings + extends graphql.WatchQueryOptions { + WatchOptions$Query$SystemSettings( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemSettings); +} + +class FetchMoreOptions$Query$SystemSettings extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$SystemSettings( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQuerySystemSettings); +} + +extension ClientExtension$Query$SystemSettings on graphql.GraphQLClient { + Future> query$SystemSettings( + [Options$Query$SystemSettings? options]) async => + await this.query(options ?? Options$Query$SystemSettings()); + graphql.ObservableQuery watchQuery$SystemSettings( + [WatchOptions$Query$SystemSettings? options]) => + this.watchQuery(options ?? WatchOptions$Query$SystemSettings()); + void writeQuery$SystemSettings( + {required Query$SystemSettings data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemSettings)), + data: data.toJson(), + broadcast: broadcast); + Query$SystemSettings? readQuery$SystemSettings({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemSettings)), + optimistic: optimistic); + return result == null ? null : Query$SystemSettings.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system { + Query$SystemSettings$system( + {required this.settings, required this.$__typename}); + + @override + factory Query$SystemSettings$system.fromJson(Map json) => + _$Query$SystemSettings$systemFromJson(json); + + final Query$SystemSettings$system$settings settings; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemSettings$systemToJson(this); + int get hashCode { + final l$settings = settings; + final l$$__typename = $__typename; + return Object.hashAll([l$settings, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system) || + runtimeType != other.runtimeType) return false; + final l$settings = settings; + final lOther$settings = other.settings; + if (l$settings != lOther$settings) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system + on Query$SystemSettings$system { + Query$SystemSettings$system copyWith( + {Query$SystemSettings$system$settings? settings, + String? $__typename}) => + Query$SystemSettings$system( + settings: settings == null ? this.settings : settings, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system$settings { + Query$SystemSettings$system$settings( + {required this.autoUpgrade, + required this.ssh, + required this.timezone, + required this.$__typename}); + + @override + factory Query$SystemSettings$system$settings.fromJson( + Map json) => + _$Query$SystemSettings$system$settingsFromJson(json); + + final Query$SystemSettings$system$settings$autoUpgrade autoUpgrade; + + final Query$SystemSettings$system$settings$ssh ssh; + + final String timezone; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemSettings$system$settingsToJson(this); + int get hashCode { + final l$autoUpgrade = autoUpgrade; + final l$ssh = ssh; + final l$timezone = timezone; + final l$$__typename = $__typename; + return Object.hashAll([l$autoUpgrade, l$ssh, l$timezone, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system$settings) || + runtimeType != other.runtimeType) return false; + final l$autoUpgrade = autoUpgrade; + final lOther$autoUpgrade = other.autoUpgrade; + if (l$autoUpgrade != lOther$autoUpgrade) return false; + final l$ssh = ssh; + final lOther$ssh = other.ssh; + if (l$ssh != lOther$ssh) return false; + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system$settings + on Query$SystemSettings$system$settings { + Query$SystemSettings$system$settings copyWith( + {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, + Query$SystemSettings$system$settings$ssh? ssh, + String? timezone, + String? $__typename}) => + Query$SystemSettings$system$settings( + autoUpgrade: autoUpgrade == null ? this.autoUpgrade : autoUpgrade, + ssh: ssh == null ? this.ssh : ssh, + timezone: timezone == null ? this.timezone : timezone, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system$settings$autoUpgrade { + Query$SystemSettings$system$settings$autoUpgrade( + {required this.allowReboot, + required this.enable, + required this.$__typename}); + + @override + factory Query$SystemSettings$system$settings$autoUpgrade.fromJson( + Map json) => + _$Query$SystemSettings$system$settings$autoUpgradeFromJson(json); + + final bool allowReboot; + + final bool enable; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemSettings$system$settings$autoUpgradeToJson(this); + int get hashCode { + final l$allowReboot = allowReboot; + final l$enable = enable; + final l$$__typename = $__typename; + return Object.hashAll([l$allowReboot, l$enable, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system$settings$autoUpgrade) || + runtimeType != other.runtimeType) return false; + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (l$allowReboot != lOther$allowReboot) return false; + final l$enable = enable; + final lOther$enable = other.enable; + if (l$enable != lOther$enable) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system$settings$autoUpgrade + on Query$SystemSettings$system$settings$autoUpgrade { + Query$SystemSettings$system$settings$autoUpgrade copyWith( + {bool? allowReboot, bool? enable, String? $__typename}) => + Query$SystemSettings$system$settings$autoUpgrade( + allowReboot: allowReboot == null ? this.allowReboot : allowReboot, + enable: enable == null ? this.enable : enable, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system$settings$ssh { + Query$SystemSettings$system$settings$ssh( + {required this.enable, + required this.passwordAuthentication, + required this.rootSshKeys, + required this.$__typename}); + + @override + factory Query$SystemSettings$system$settings$ssh.fromJson( + Map json) => + _$Query$SystemSettings$system$settings$sshFromJson(json); + + final bool enable; + + final bool passwordAuthentication; + + final List rootSshKeys; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemSettings$system$settings$sshToJson(this); + int get hashCode { + final l$enable = enable; + final l$passwordAuthentication = passwordAuthentication; + final l$rootSshKeys = rootSshKeys; + final l$$__typename = $__typename; + return Object.hashAll([ + l$enable, + l$passwordAuthentication, + Object.hashAll(l$rootSshKeys.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system$settings$ssh) || + runtimeType != other.runtimeType) return false; + final l$enable = enable; + final lOther$enable = other.enable; + if (l$enable != lOther$enable) return false; + final l$passwordAuthentication = passwordAuthentication; + final lOther$passwordAuthentication = other.passwordAuthentication; + if (l$passwordAuthentication != lOther$passwordAuthentication) return false; + final l$rootSshKeys = rootSshKeys; + final lOther$rootSshKeys = other.rootSshKeys; + if (l$rootSshKeys.length != lOther$rootSshKeys.length) return false; + for (int i = 0; i < l$rootSshKeys.length; i++) { + final l$rootSshKeys$entry = l$rootSshKeys[i]; + final lOther$rootSshKeys$entry = lOther$rootSshKeys[i]; + if (l$rootSshKeys$entry != lOther$rootSshKeys$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system$settings$ssh + on Query$SystemSettings$system$settings$ssh { + Query$SystemSettings$system$settings$ssh copyWith( + {bool? enable, + bool? passwordAuthentication, + List? rootSshKeys, + String? $__typename}) => + Query$SystemSettings$system$settings$ssh( + enable: enable == null ? this.enable : enable, + passwordAuthentication: passwordAuthentication == null + ? this.passwordAuthentication + : passwordAuthentication, + rootSshKeys: rootSshKeys == null ? this.rootSshKeys : rootSshKeys, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo { + Query$DomainInfo({required this.system, required this.$__typename}); + + @override + factory Query$DomainInfo.fromJson(Map json) => + _$Query$DomainInfoFromJson(json); + + final Query$DomainInfo$system system; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$DomainInfoToJson(this); + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([l$system, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo) || runtimeType != other.runtimeType) + return false; + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo on Query$DomainInfo { + Query$DomainInfo copyWith( + {Query$DomainInfo$system? system, String? $__typename}) => + Query$DomainInfo( + system: system == null ? this.system : system, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryDomainInfo = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'DomainInfo'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domain'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'hostname'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'requiredDnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'ttl'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$DomainInfo _parserFn$Query$DomainInfo(Map data) => + Query$DomainInfo.fromJson(data); + +class Options$Query$DomainInfo extends graphql.QueryOptions { + Options$Query$DomainInfo( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryDomainInfo, + parserFn: _parserFn$Query$DomainInfo); +} + +class WatchOptions$Query$DomainInfo + extends graphql.WatchQueryOptions { + WatchOptions$Query$DomainInfo( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryDomainInfo, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$DomainInfo); +} + +class FetchMoreOptions$Query$DomainInfo extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$DomainInfo({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryDomainInfo); +} + +extension ClientExtension$Query$DomainInfo on graphql.GraphQLClient { + Future> query$DomainInfo( + [Options$Query$DomainInfo? options]) async => + await this.query(options ?? Options$Query$DomainInfo()); + graphql.ObservableQuery watchQuery$DomainInfo( + [WatchOptions$Query$DomainInfo? options]) => + this.watchQuery(options ?? WatchOptions$Query$DomainInfo()); + void writeQuery$DomainInfo( + {required Query$DomainInfo data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryDomainInfo)), + data: data.toJson(), + broadcast: broadcast); + Query$DomainInfo? readQuery$DomainInfo({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryDomainInfo)), + optimistic: optimistic); + return result == null ? null : Query$DomainInfo.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo$system { + Query$DomainInfo$system( + {required this.domainInfo, required this.$__typename}); + + @override + factory Query$DomainInfo$system.fromJson(Map json) => + _$Query$DomainInfo$systemFromJson(json); + + final Query$DomainInfo$system$domainInfo domainInfo; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$DomainInfo$systemToJson(this); + int get hashCode { + final l$domainInfo = domainInfo; + final l$$__typename = $__typename; + return Object.hashAll([l$domainInfo, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo$system) || runtimeType != other.runtimeType) + return false; + final l$domainInfo = domainInfo; + final lOther$domainInfo = other.domainInfo; + if (l$domainInfo != lOther$domainInfo) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo$system on Query$DomainInfo$system { + Query$DomainInfo$system copyWith( + {Query$DomainInfo$system$domainInfo? domainInfo, + String? $__typename}) => + Query$DomainInfo$system( + domainInfo: domainInfo == null ? this.domainInfo : domainInfo, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo$system$domainInfo { + Query$DomainInfo$system$domainInfo( + {required this.domain, + required this.hostname, + required this.provider, + required this.requiredDnsRecords, + required this.$__typename}); + + @override + factory Query$DomainInfo$system$domainInfo.fromJson( + Map json) => + _$Query$DomainInfo$system$domainInfoFromJson(json); + + final String domain; + + final String hostname; + + @JsonKey(unknownEnumValue: Enum$DnsProvider.$unknown) + final Enum$DnsProvider provider; + + final List + requiredDnsRecords; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$DomainInfo$system$domainInfoToJson(this); + int get hashCode { + final l$domain = domain; + final l$hostname = hostname; + final l$provider = provider; + final l$requiredDnsRecords = requiredDnsRecords; + final l$$__typename = $__typename; + return Object.hashAll([ + l$domain, + l$hostname, + l$provider, + Object.hashAll(l$requiredDnsRecords.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo$system$domainInfo) || + runtimeType != other.runtimeType) return false; + final l$domain = domain; + final lOther$domain = other.domain; + if (l$domain != lOther$domain) return false; + final l$hostname = hostname; + final lOther$hostname = other.hostname; + if (l$hostname != lOther$hostname) return false; + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) return false; + final l$requiredDnsRecords = requiredDnsRecords; + final lOther$requiredDnsRecords = other.requiredDnsRecords; + if (l$requiredDnsRecords.length != lOther$requiredDnsRecords.length) + return false; + for (int i = 0; i < l$requiredDnsRecords.length; i++) { + final l$requiredDnsRecords$entry = l$requiredDnsRecords[i]; + final lOther$requiredDnsRecords$entry = lOther$requiredDnsRecords[i]; + if (l$requiredDnsRecords$entry != lOther$requiredDnsRecords$entry) + return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo$system$domainInfo + on Query$DomainInfo$system$domainInfo { + Query$DomainInfo$system$domainInfo copyWith( + {String? domain, + String? hostname, + Enum$DnsProvider? provider, + List? + requiredDnsRecords, + String? $__typename}) => + Query$DomainInfo$system$domainInfo( + domain: domain == null ? this.domain : domain, + hostname: hostname == null ? this.hostname : hostname, + provider: provider == null ? this.provider : provider, + requiredDnsRecords: requiredDnsRecords == null + ? this.requiredDnsRecords + : requiredDnsRecords, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo$system$domainInfo$requiredDnsRecords { + Query$DomainInfo$system$domainInfo$requiredDnsRecords( + {required this.content, + required this.name, + this.priority, + required this.recordType, + required this.ttl, + required this.$__typename}); + + @override + factory Query$DomainInfo$system$domainInfo$requiredDnsRecords.fromJson( + Map json) => + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsFromJson(json); + + final String content; + + final String name; + + final int? priority; + + final String recordType; + + final int ttl; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsToJson(this); + int get hashCode { + final l$content = content; + final l$name = name; + final l$priority = priority; + final l$recordType = recordType; + final l$ttl = ttl; + final l$$__typename = $__typename; + return Object.hashAll( + [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo$system$domainInfo$requiredDnsRecords) || + runtimeType != other.runtimeType) return false; + final l$content = content; + final lOther$content = other.content; + if (l$content != lOther$content) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$priority = priority; + final lOther$priority = other.priority; + if (l$priority != lOther$priority) return false; + final l$recordType = recordType; + final lOther$recordType = other.recordType; + if (l$recordType != lOther$recordType) return false; + final l$ttl = ttl; + final lOther$ttl = other.ttl; + if (l$ttl != lOther$ttl) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo$system$domainInfo$requiredDnsRecords + on Query$DomainInfo$system$domainInfo$requiredDnsRecords { + Query$DomainInfo$system$domainInfo$requiredDnsRecords copyWith( + {String? content, + String? name, + int? Function()? priority, + String? recordType, + int? ttl, + String? $__typename}) => + Query$DomainInfo$system$domainInfo$requiredDnsRecords( + content: content == null ? this.content : content, + name: name == null ? this.name : name, + priority: priority == null ? this.priority : priority(), + recordType: recordType == null ? this.recordType : recordType, + ttl: ttl == null ? this.ttl : ttl, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$ChangeTimezone { + Variables$Mutation$ChangeTimezone({required this.timezone}); + + @override + factory Variables$Mutation$ChangeTimezone.fromJson( + Map json) => + _$Variables$Mutation$ChangeTimezoneFromJson(json); + + final String timezone; + + Map toJson() => + _$Variables$Mutation$ChangeTimezoneToJson(this); + int get hashCode { + final l$timezone = timezone; + return Object.hashAll([l$timezone]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$ChangeTimezone) || + runtimeType != other.runtimeType) return false; + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) return false; + return true; + } + + Variables$Mutation$ChangeTimezone copyWith({String? timezone}) => + Variables$Mutation$ChangeTimezone( + timezone: timezone == null ? this.timezone : timezone); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeTimezone { + Mutation$ChangeTimezone( + {required this.changeTimezone, required this.$__typename}); + + @override + factory Mutation$ChangeTimezone.fromJson(Map json) => + _$Mutation$ChangeTimezoneFromJson(json); + + final Mutation$ChangeTimezone$changeTimezone changeTimezone; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$ChangeTimezoneToJson(this); + int get hashCode { + final l$changeTimezone = changeTimezone; + final l$$__typename = $__typename; + return Object.hashAll([l$changeTimezone, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ChangeTimezone) || runtimeType != other.runtimeType) + return false; + final l$changeTimezone = changeTimezone; + final lOther$changeTimezone = other.changeTimezone; + if (l$changeTimezone != lOther$changeTimezone) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeTimezone on Mutation$ChangeTimezone { + Mutation$ChangeTimezone copyWith( + {Mutation$ChangeTimezone$changeTimezone? changeTimezone, + String? $__typename}) => + Mutation$ChangeTimezone( + changeTimezone: + changeTimezone == null ? this.changeTimezone : changeTimezone, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationChangeTimezone = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'ChangeTimezone'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'timezone')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeTimezone'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'timezone'), + value: VariableNode(name: NameNode(value: 'timezone'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'timezone'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$ChangeTimezone _parserFn$Mutation$ChangeTimezone( + Map data) => + Mutation$ChangeTimezone.fromJson(data); +typedef OnMutationCompleted$Mutation$ChangeTimezone = FutureOr Function( + dynamic, Mutation$ChangeTimezone?); + +class Options$Mutation$ChangeTimezone + extends graphql.MutationOptions { + Options$Mutation$ChangeTimezone( + {String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeTimezone? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$ChangeTimezone(data)), + update: update, + onError: onError, + document: documentNodeMutationChangeTimezone, + parserFn: _parserFn$Mutation$ChangeTimezone); + + final OnMutationCompleted$Mutation$ChangeTimezone? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$ChangeTimezone + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ChangeTimezone( + {String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeTimezone, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeTimezone); +} + +extension ClientExtension$Mutation$ChangeTimezone on graphql.GraphQLClient { + Future> mutate$ChangeTimezone( + Options$Mutation$ChangeTimezone options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$ChangeTimezone( + WatchOptions$Mutation$ChangeTimezone options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeTimezone$changeTimezone + implements Fragment$basicMutationReturnFields { + Mutation$ChangeTimezone$changeTimezone( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.timezone}); + + @override + factory Mutation$ChangeTimezone$changeTimezone.fromJson( + Map json) => + _$Mutation$ChangeTimezone$changeTimezoneFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? timezone; + + Map toJson() => + _$Mutation$ChangeTimezone$changeTimezoneToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$timezone = timezone; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$timezone]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ChangeTimezone$changeTimezone) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeTimezone$changeTimezone + on Mutation$ChangeTimezone$changeTimezone { + Mutation$ChangeTimezone$changeTimezone copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? timezone}) => + Mutation$ChangeTimezone$changeTimezone( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + timezone: timezone == null ? this.timezone : timezone()); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$ChangeAutoUpgradeSettings { + Variables$Mutation$ChangeAutoUpgradeSettings({required this.settings}); + + @override + factory Variables$Mutation$ChangeAutoUpgradeSettings.fromJson( + Map json) => + _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson(json); + + final Input$AutoUpgradeSettingsInput settings; + + Map toJson() => + _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson(this); + int get hashCode { + final l$settings = settings; + return Object.hashAll([l$settings]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$ChangeAutoUpgradeSettings) || + runtimeType != other.runtimeType) return false; + final l$settings = settings; + final lOther$settings = other.settings; + if (l$settings != lOther$settings) return false; + return true; + } + + Variables$Mutation$ChangeAutoUpgradeSettings copyWith( + {Input$AutoUpgradeSettingsInput? settings}) => + Variables$Mutation$ChangeAutoUpgradeSettings( + settings: settings == null ? this.settings : settings); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeAutoUpgradeSettings { + Mutation$ChangeAutoUpgradeSettings( + {required this.changeAutoUpgradeSettings, required this.$__typename}); + + @override + factory Mutation$ChangeAutoUpgradeSettings.fromJson( + Map json) => + _$Mutation$ChangeAutoUpgradeSettingsFromJson(json); + + final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + changeAutoUpgradeSettings; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$ChangeAutoUpgradeSettingsToJson(this); + int get hashCode { + final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; + final l$$__typename = $__typename; + return Object.hashAll([l$changeAutoUpgradeSettings, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ChangeAutoUpgradeSettings) || + runtimeType != other.runtimeType) return false; + final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; + final lOther$changeAutoUpgradeSettings = other.changeAutoUpgradeSettings; + if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) + return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings + on Mutation$ChangeAutoUpgradeSettings { + Mutation$ChangeAutoUpgradeSettings copyWith( + {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? + changeAutoUpgradeSettings, + String? $__typename}) => + Mutation$ChangeAutoUpgradeSettings( + changeAutoUpgradeSettings: changeAutoUpgradeSettings == null + ? this.changeAutoUpgradeSettings + : changeAutoUpgradeSettings, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationChangeAutoUpgradeSettings = + DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'ChangeAutoUpgradeSettings'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'settings')), + type: NamedTypeNode( + name: NameNode(value: 'AutoUpgradeSettingsInput'), + isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeAutoUpgradeSettings'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'settings'), + value: VariableNode(name: NameNode(value: 'settings'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'enableAutoUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$ChangeAutoUpgradeSettings _parserFn$Mutation$ChangeAutoUpgradeSettings( + Map data) => + Mutation$ChangeAutoUpgradeSettings.fromJson(data); +typedef OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings = FutureOr + Function(dynamic, Mutation$ChangeAutoUpgradeSettings?); + +class Options$Mutation$ChangeAutoUpgradeSettings + extends graphql.MutationOptions { + Options$Mutation$ChangeAutoUpgradeSettings( + {String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$ChangeAutoUpgradeSettings(data)), + update: update, + onError: onError, + document: documentNodeMutationChangeAutoUpgradeSettings, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); + + final OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$ChangeAutoUpgradeSettings + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ChangeAutoUpgradeSettings( + {String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeAutoUpgradeSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); +} + +extension ClientExtension$Mutation$ChangeAutoUpgradeSettings + on graphql.GraphQLClient { + Future> + mutate$ChangeAutoUpgradeSettings( + Options$Mutation$ChangeAutoUpgradeSettings options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$ChangeAutoUpgradeSettings( + WatchOptions$Mutation$ChangeAutoUpgradeSettings options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + implements Fragment$basicMutationReturnFields { + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + required this.allowReboot, + required this.enableAutoUpgrade}); + + @override + factory Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( + Map json) => + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( + json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final bool allowReboot; + + final bool enableAutoUpgrade; + + Map toJson() => + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( + this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$allowReboot = allowReboot; + final l$enableAutoUpgrade = enableAutoUpgrade; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$allowReboot, + l$enableAutoUpgrade + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (l$allowReboot != lOther$allowReboot) return false; + final l$enableAutoUpgrade = enableAutoUpgrade; + final lOther$enableAutoUpgrade = other.enableAutoUpgrade; + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + on Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings { + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + bool? allowReboot, + bool? enableAutoUpgrade}) => + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + allowReboot: allowReboot == null ? this.allowReboot : allowReboot, + enableAutoUpgrade: enableAutoUpgrade == null + ? this.enableAutoUpgrade + : enableAutoUpgrade); +} diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart new file mode 100644 index 00000000..bbca8052 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart @@ -0,0 +1,300 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'server_settings.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( + Map json) => + Fragment$basicMutationReturnFields( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$SystemSettings _$Query$SystemSettingsFromJson( + Map json) => + Query$SystemSettings( + system: Query$SystemSettings$system.fromJson( + json['system'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettingsToJson( + Query$SystemSettings instance) => + { + 'system': instance.system.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system _$Query$SystemSettings$systemFromJson( + Map json) => + Query$SystemSettings$system( + settings: Query$SystemSettings$system$settings.fromJson( + json['settings'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$systemToJson( + Query$SystemSettings$system instance) => + { + 'settings': instance.settings.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system$settings + _$Query$SystemSettings$system$settingsFromJson(Map json) => + Query$SystemSettings$system$settings( + autoUpgrade: + Query$SystemSettings$system$settings$autoUpgrade.fromJson( + json['autoUpgrade'] as Map), + ssh: Query$SystemSettings$system$settings$ssh.fromJson( + json['ssh'] as Map), + timezone: json['timezone'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$system$settingsToJson( + Query$SystemSettings$system$settings instance) => + { + 'autoUpgrade': instance.autoUpgrade.toJson(), + 'ssh': instance.ssh.toJson(), + 'timezone': instance.timezone, + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system$settings$autoUpgrade + _$Query$SystemSettings$system$settings$autoUpgradeFromJson( + Map json) => + Query$SystemSettings$system$settings$autoUpgrade( + allowReboot: json['allowReboot'] as bool, + enable: json['enable'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$system$settings$autoUpgradeToJson( + Query$SystemSettings$system$settings$autoUpgrade instance) => + { + 'allowReboot': instance.allowReboot, + 'enable': instance.enable, + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system$settings$ssh + _$Query$SystemSettings$system$settings$sshFromJson( + Map json) => + Query$SystemSettings$system$settings$ssh( + enable: json['enable'] as bool, + passwordAuthentication: json['passwordAuthentication'] as bool, + rootSshKeys: (json['rootSshKeys'] as List) + .map((e) => e as String) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$system$settings$sshToJson( + Query$SystemSettings$system$settings$ssh instance) => + { + 'enable': instance.enable, + 'passwordAuthentication': instance.passwordAuthentication, + 'rootSshKeys': instance.rootSshKeys, + '__typename': instance.$__typename, + }; + +Query$DomainInfo _$Query$DomainInfoFromJson(Map json) => + Query$DomainInfo( + system: Query$DomainInfo$system.fromJson( + json['system'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$DomainInfoToJson(Query$DomainInfo instance) => + { + 'system': instance.system.toJson(), + '__typename': instance.$__typename, + }; + +Query$DomainInfo$system _$Query$DomainInfo$systemFromJson( + Map json) => + Query$DomainInfo$system( + domainInfo: Query$DomainInfo$system$domainInfo.fromJson( + json['domainInfo'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$DomainInfo$systemToJson( + Query$DomainInfo$system instance) => + { + 'domainInfo': instance.domainInfo.toJson(), + '__typename': instance.$__typename, + }; + +Query$DomainInfo$system$domainInfo _$Query$DomainInfo$system$domainInfoFromJson( + Map json) => + Query$DomainInfo$system$domainInfo( + domain: json['domain'] as String, + hostname: json['hostname'] as String, + provider: $enumDecode(_$Enum$DnsProviderEnumMap, json['provider'], + unknownValue: Enum$DnsProvider.$unknown), + requiredDnsRecords: (json['requiredDnsRecords'] as List) + .map((e) => + Query$DomainInfo$system$domainInfo$requiredDnsRecords.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$DomainInfo$system$domainInfoToJson( + Query$DomainInfo$system$domainInfo instance) => + { + 'domain': instance.domain, + 'hostname': instance.hostname, + 'provider': _$Enum$DnsProviderEnumMap[instance.provider], + 'requiredDnsRecords': + instance.requiredDnsRecords.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +const _$Enum$DnsProviderEnumMap = { + Enum$DnsProvider.CLOUDFLARE: 'CLOUDFLARE', + Enum$DnsProvider.$unknown: r'$unknown', +}; + +Query$DomainInfo$system$domainInfo$requiredDnsRecords + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsFromJson( + Map json) => + Query$DomainInfo$system$domainInfo$requiredDnsRecords( + content: json['content'] as String, + name: json['name'] as String, + priority: json['priority'] as int?, + recordType: json['recordType'] as String, + ttl: json['ttl'] as int, + $__typename: json['__typename'] as String, + ); + +Map + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsToJson( + Query$DomainInfo$system$domainInfo$requiredDnsRecords instance) => + { + 'content': instance.content, + 'name': instance.name, + 'priority': instance.priority, + 'recordType': instance.recordType, + 'ttl': instance.ttl, + '__typename': instance.$__typename, + }; + +Variables$Mutation$ChangeTimezone _$Variables$Mutation$ChangeTimezoneFromJson( + Map json) => + Variables$Mutation$ChangeTimezone( + timezone: json['timezone'] as String, + ); + +Map _$Variables$Mutation$ChangeTimezoneToJson( + Variables$Mutation$ChangeTimezone instance) => + { + 'timezone': instance.timezone, + }; + +Mutation$ChangeTimezone _$Mutation$ChangeTimezoneFromJson( + Map json) => + Mutation$ChangeTimezone( + changeTimezone: Mutation$ChangeTimezone$changeTimezone.fromJson( + json['changeTimezone'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$ChangeTimezoneToJson( + Mutation$ChangeTimezone instance) => + { + 'changeTimezone': instance.changeTimezone.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$ChangeTimezone$changeTimezone + _$Mutation$ChangeTimezone$changeTimezoneFromJson( + Map json) => + Mutation$ChangeTimezone$changeTimezone( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + timezone: json['timezone'] as String?, + ); + +Map _$Mutation$ChangeTimezone$changeTimezoneToJson( + Mutation$ChangeTimezone$changeTimezone instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'timezone': instance.timezone, + }; + +Variables$Mutation$ChangeAutoUpgradeSettings + _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson( + Map json) => + Variables$Mutation$ChangeAutoUpgradeSettings( + settings: Input$AutoUpgradeSettingsInput.fromJson( + json['settings'] as Map), + ); + +Map _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson( + Variables$Mutation$ChangeAutoUpgradeSettings instance) => + { + 'settings': instance.settings.toJson(), + }; + +Mutation$ChangeAutoUpgradeSettings _$Mutation$ChangeAutoUpgradeSettingsFromJson( + Map json) => + Mutation$ChangeAutoUpgradeSettings( + changeAutoUpgradeSettings: + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( + json['changeAutoUpgradeSettings'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$ChangeAutoUpgradeSettingsToJson( + Mutation$ChangeAutoUpgradeSettings instance) => + { + 'changeAutoUpgradeSettings': instance.changeAutoUpgradeSettings.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( + Map json) => + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + allowReboot: json['allowReboot'] as bool, + enableAutoUpgrade: json['enableAutoUpgrade'] as bool, + ); + +Map + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'allowReboot': instance.allowReboot, + 'enableAutoUpgrade': instance.enableAutoUpgrade, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql new file mode 100644 index 00000000..ce464426 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -0,0 +1,84 @@ +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query AllServices { + services { + allServices { + description + displayName + dnsRecords { + content + name + priority + recordType + ttl + } + id + isEnabled + isMovable + isRequired + status + storageUsage { + title + usedSpace + volume { + name + } + } + svgIcon + url + } + } +} + +mutation EnableService($serviceId: String!) { + enableService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation DisableService($serviceId: String!) { + disableService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation StopService($serviceId: String!) { + stopService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation StartService($serviceId: String!) { + startService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation RestartService($serviceId: String!) { + restartService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation MoveService($input: MoveServiceInput!) { + moveService(input: $input) { + ...basicMutationReturnFields + job { + createdAt + description + error + finishedAt + name + progress + result + status + statusText + uid + updatedAt + } + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart new file mode 100644 index 00000000..2a415115 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -0,0 +1,2771 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; +part 'services.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Fragment$basicMutationReturnFields) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( + {required Map idFields, bool optimistic = true}) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices { + Query$AllServices({required this.services, required this.$__typename}); + + @override + factory Query$AllServices.fromJson(Map json) => + _$Query$AllServicesFromJson(json); + + final Query$AllServices$services services; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllServicesToJson(this); + int get hashCode { + final l$services = services; + final l$$__typename = $__typename; + return Object.hashAll([l$services, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices) || runtimeType != other.runtimeType) + return false; + final l$services = services; + final lOther$services = other.services; + if (l$services != lOther$services) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices on Query$AllServices { + Query$AllServices copyWith( + {Query$AllServices$services? services, String? $__typename}) => + Query$AllServices( + services: services == null ? this.services : services, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryAllServices = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'AllServices'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'services'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allServices'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'dnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'ttl'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isEnabled'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isRequired'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'storageUsage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'volume'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: 'svgIcon'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'url'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$AllServices _parserFn$Query$AllServices(Map data) => + Query$AllServices.fromJson(data); + +class Options$Query$AllServices + extends graphql.QueryOptions { + Options$Query$AllServices( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllServices, + parserFn: _parserFn$Query$AllServices); +} + +class WatchOptions$Query$AllServices + extends graphql.WatchQueryOptions { + WatchOptions$Query$AllServices( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllServices, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllServices); +} + +class FetchMoreOptions$Query$AllServices extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$AllServices({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryAllServices); +} + +extension ClientExtension$Query$AllServices on graphql.GraphQLClient { + Future> query$AllServices( + [Options$Query$AllServices? options]) async => + await this.query(options ?? Options$Query$AllServices()); + graphql.ObservableQuery watchQuery$AllServices( + [WatchOptions$Query$AllServices? options]) => + this.watchQuery(options ?? WatchOptions$Query$AllServices()); + void writeQuery$AllServices( + {required Query$AllServices data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllServices)), + data: data.toJson(), + broadcast: broadcast); + Query$AllServices? readQuery$AllServices({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllServices)), + optimistic: optimistic); + return result == null ? null : Query$AllServices.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services { + Query$AllServices$services( + {required this.allServices, required this.$__typename}); + + @override + factory Query$AllServices$services.fromJson(Map json) => + _$Query$AllServices$servicesFromJson(json); + + final List allServices; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllServices$servicesToJson(this); + int get hashCode { + final l$allServices = allServices; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$allServices.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services) || + runtimeType != other.runtimeType) return false; + final l$allServices = allServices; + final lOther$allServices = other.allServices; + if (l$allServices.length != lOther$allServices.length) return false; + for (int i = 0; i < l$allServices.length; i++) { + final l$allServices$entry = l$allServices[i]; + final lOther$allServices$entry = lOther$allServices[i]; + if (l$allServices$entry != lOther$allServices$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services + on Query$AllServices$services { + Query$AllServices$services copyWith( + {List? allServices, + String? $__typename}) => + Query$AllServices$services( + allServices: allServices == null ? this.allServices : allServices, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices { + Query$AllServices$services$allServices( + {required this.description, + required this.displayName, + this.dnsRecords, + required this.id, + required this.isEnabled, + required this.isMovable, + required this.isRequired, + required this.status, + required this.storageUsage, + required this.svgIcon, + this.url, + required this.$__typename}); + + @override + factory Query$AllServices$services$allServices.fromJson( + Map json) => + _$Query$AllServices$services$allServicesFromJson(json); + + final String description; + + final String displayName; + + final List? dnsRecords; + + final String id; + + final bool isEnabled; + + final bool isMovable; + + final bool isRequired; + + @JsonKey(unknownEnumValue: Enum$ServiceStatusEnum.$unknown) + final Enum$ServiceStatusEnum status; + + final Query$AllServices$services$allServices$storageUsage storageUsage; + + final String svgIcon; + + final String? url; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServicesToJson(this); + int get hashCode { + final l$description = description; + final l$displayName = displayName; + final l$dnsRecords = dnsRecords; + final l$id = id; + final l$isEnabled = isEnabled; + final l$isMovable = isMovable; + final l$isRequired = isRequired; + final l$status = status; + final l$storageUsage = storageUsage; + final l$svgIcon = svgIcon; + final l$url = url; + final l$$__typename = $__typename; + return Object.hashAll([ + l$description, + l$displayName, + l$dnsRecords == null ? null : Object.hashAll(l$dnsRecords.map((v) => v)), + l$id, + l$isEnabled, + l$isMovable, + l$isRequired, + l$status, + l$storageUsage, + l$svgIcon, + l$url, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services$allServices) || + runtimeType != other.runtimeType) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$displayName = displayName; + final lOther$displayName = other.displayName; + if (l$displayName != lOther$displayName) return false; + final l$dnsRecords = dnsRecords; + final lOther$dnsRecords = other.dnsRecords; + if (l$dnsRecords != null && lOther$dnsRecords != null) { + if (l$dnsRecords.length != lOther$dnsRecords.length) return false; + for (int i = 0; i < l$dnsRecords.length; i++) { + final l$dnsRecords$entry = l$dnsRecords[i]; + final lOther$dnsRecords$entry = lOther$dnsRecords[i]; + if (l$dnsRecords$entry != lOther$dnsRecords$entry) return false; + } + } else if (l$dnsRecords != lOther$dnsRecords) { + return false; + } + + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) return false; + final l$isEnabled = isEnabled; + final lOther$isEnabled = other.isEnabled; + if (l$isEnabled != lOther$isEnabled) return false; + final l$isMovable = isMovable; + final lOther$isMovable = other.isMovable; + if (l$isMovable != lOther$isMovable) return false; + final l$isRequired = isRequired; + final lOther$isRequired = other.isRequired; + if (l$isRequired != lOther$isRequired) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$storageUsage = storageUsage; + final lOther$storageUsage = other.storageUsage; + if (l$storageUsage != lOther$storageUsage) return false; + final l$svgIcon = svgIcon; + final lOther$svgIcon = other.svgIcon; + if (l$svgIcon != lOther$svgIcon) return false; + final l$url = url; + final lOther$url = other.url; + if (l$url != lOther$url) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices + on Query$AllServices$services$allServices { + Query$AllServices$services$allServices copyWith( + {String? description, + String? displayName, + List? Function()? + dnsRecords, + String? id, + bool? isEnabled, + bool? isMovable, + bool? isRequired, + Enum$ServiceStatusEnum? status, + Query$AllServices$services$allServices$storageUsage? storageUsage, + String? svgIcon, + String? Function()? url, + String? $__typename}) => + Query$AllServices$services$allServices( + description: description == null ? this.description : description, + displayName: displayName == null ? this.displayName : displayName, + dnsRecords: dnsRecords == null ? this.dnsRecords : dnsRecords(), + id: id == null ? this.id : id, + isEnabled: isEnabled == null ? this.isEnabled : isEnabled, + isMovable: isMovable == null ? this.isMovable : isMovable, + isRequired: isRequired == null ? this.isRequired : isRequired, + status: status == null ? this.status : status, + storageUsage: storageUsage == null ? this.storageUsage : storageUsage, + svgIcon: svgIcon == null ? this.svgIcon : svgIcon, + url: url == null ? this.url : url(), + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices$dnsRecords { + Query$AllServices$services$allServices$dnsRecords( + {required this.content, + required this.name, + this.priority, + required this.recordType, + required this.ttl, + required this.$__typename}); + + @override + factory Query$AllServices$services$allServices$dnsRecords.fromJson( + Map json) => + _$Query$AllServices$services$allServices$dnsRecordsFromJson(json); + + final String content; + + final String name; + + final int? priority; + + final String recordType; + + final int ttl; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServices$dnsRecordsToJson(this); + int get hashCode { + final l$content = content; + final l$name = name; + final l$priority = priority; + final l$recordType = recordType; + final l$ttl = ttl; + final l$$__typename = $__typename; + return Object.hashAll( + [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services$allServices$dnsRecords) || + runtimeType != other.runtimeType) return false; + final l$content = content; + final lOther$content = other.content; + if (l$content != lOther$content) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$priority = priority; + final lOther$priority = other.priority; + if (l$priority != lOther$priority) return false; + final l$recordType = recordType; + final lOther$recordType = other.recordType; + if (l$recordType != lOther$recordType) return false; + final l$ttl = ttl; + final lOther$ttl = other.ttl; + if (l$ttl != lOther$ttl) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices$dnsRecords + on Query$AllServices$services$allServices$dnsRecords { + Query$AllServices$services$allServices$dnsRecords copyWith( + {String? content, + String? name, + int? Function()? priority, + String? recordType, + int? ttl, + String? $__typename}) => + Query$AllServices$services$allServices$dnsRecords( + content: content == null ? this.content : content, + name: name == null ? this.name : name, + priority: priority == null ? this.priority : priority(), + recordType: recordType == null ? this.recordType : recordType, + ttl: ttl == null ? this.ttl : ttl, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices$storageUsage { + Query$AllServices$services$allServices$storageUsage( + {required this.title, + required this.usedSpace, + this.volume, + required this.$__typename}); + + @override + factory Query$AllServices$services$allServices$storageUsage.fromJson( + Map json) => + _$Query$AllServices$services$allServices$storageUsageFromJson(json); + + final String title; + + final String usedSpace; + + final Query$AllServices$services$allServices$storageUsage$volume? volume; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServices$storageUsageToJson(this); + int get hashCode { + final l$title = title; + final l$usedSpace = usedSpace; + final l$volume = volume; + final l$$__typename = $__typename; + return Object.hashAll([l$title, l$usedSpace, l$volume, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services$allServices$storageUsage) || + runtimeType != other.runtimeType) return false; + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$volume = volume; + final lOther$volume = other.volume; + if (l$volume != lOther$volume) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices$storageUsage + on Query$AllServices$services$allServices$storageUsage { + Query$AllServices$services$allServices$storageUsage copyWith( + {String? title, + String? usedSpace, + Query$AllServices$services$allServices$storageUsage$volume? + Function()? + volume, + String? $__typename}) => + Query$AllServices$services$allServices$storageUsage( + title: title == null ? this.title : title, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + volume: volume == null ? this.volume : volume(), + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices$storageUsage$volume { + Query$AllServices$services$allServices$storageUsage$volume( + {required this.name, required this.$__typename}); + + @override + factory Query$AllServices$services$allServices$storageUsage$volume.fromJson( + Map json) => + _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( + json); + + final String name; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServices$storageUsage$volumeToJson(this); + int get hashCode { + final l$name = name; + final l$$__typename = $__typename; + return Object.hashAll([l$name, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Query$AllServices$services$allServices$storageUsage$volume) || + runtimeType != other.runtimeType) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices$storageUsage$volume + on Query$AllServices$services$allServices$storageUsage$volume { + Query$AllServices$services$allServices$storageUsage$volume copyWith( + {String? name, String? $__typename}) => + Query$AllServices$services$allServices$storageUsage$volume( + name: name == null ? this.name : name, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$EnableService { + Variables$Mutation$EnableService({required this.serviceId}); + + @override + factory Variables$Mutation$EnableService.fromJson( + Map json) => + _$Variables$Mutation$EnableServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$EnableServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$EnableService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$EnableService copyWith({String? serviceId}) => + Variables$Mutation$EnableService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$EnableService { + Mutation$EnableService( + {required this.enableService, required this.$__typename}); + + @override + factory Mutation$EnableService.fromJson(Map json) => + _$Mutation$EnableServiceFromJson(json); + + final Mutation$EnableService$enableService enableService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$EnableServiceToJson(this); + int get hashCode { + final l$enableService = enableService; + final l$$__typename = $__typename; + return Object.hashAll([l$enableService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$EnableService) || runtimeType != other.runtimeType) + return false; + final l$enableService = enableService; + final lOther$enableService = other.enableService; + if (l$enableService != lOther$enableService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$EnableService on Mutation$EnableService { + Mutation$EnableService copyWith( + {Mutation$EnableService$enableService? enableService, + String? $__typename}) => + Mutation$EnableService( + enableService: + enableService == null ? this.enableService : enableService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationEnableService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'EnableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$EnableService _parserFn$Mutation$EnableService( + Map data) => + Mutation$EnableService.fromJson(data); +typedef OnMutationCompleted$Mutation$EnableService = FutureOr Function( + dynamic, Mutation$EnableService?); + +class Options$Mutation$EnableService + extends graphql.MutationOptions { + Options$Mutation$EnableService( + {String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$EnableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$EnableService(data)), + update: update, + onError: onError, + document: documentNodeMutationEnableService, + parserFn: _parserFn$Mutation$EnableService); + + final OnMutationCompleted$Mutation$EnableService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$EnableService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$EnableService( + {String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationEnableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$EnableService); +} + +extension ClientExtension$Mutation$EnableService on graphql.GraphQLClient { + Future> mutate$EnableService( + Options$Mutation$EnableService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$EnableService( + WatchOptions$Mutation$EnableService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$EnableService$enableService + implements Fragment$basicMutationReturnFields { + Mutation$EnableService$enableService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$EnableService$enableService.fromJson( + Map json) => + _$Mutation$EnableService$enableServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$EnableService$enableServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$EnableService$enableService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$EnableService$enableService + on Mutation$EnableService$enableService { + Mutation$EnableService$enableService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$EnableService$enableService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$DisableService { + Variables$Mutation$DisableService({required this.serviceId}); + + @override + factory Variables$Mutation$DisableService.fromJson( + Map json) => + _$Variables$Mutation$DisableServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$DisableServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$DisableService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$DisableService copyWith({String? serviceId}) => + Variables$Mutation$DisableService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DisableService { + Mutation$DisableService( + {required this.disableService, required this.$__typename}); + + @override + factory Mutation$DisableService.fromJson(Map json) => + _$Mutation$DisableServiceFromJson(json); + + final Mutation$DisableService$disableService disableService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DisableServiceToJson(this); + int get hashCode { + final l$disableService = disableService; + final l$$__typename = $__typename; + return Object.hashAll([l$disableService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DisableService) || runtimeType != other.runtimeType) + return false; + final l$disableService = disableService; + final lOther$disableService = other.disableService; + if (l$disableService != lOther$disableService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DisableService on Mutation$DisableService { + Mutation$DisableService copyWith( + {Mutation$DisableService$disableService? disableService, + String? $__typename}) => + Mutation$DisableService( + disableService: + disableService == null ? this.disableService : disableService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationDisableService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'DisableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'disableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$DisableService _parserFn$Mutation$DisableService( + Map data) => + Mutation$DisableService.fromJson(data); +typedef OnMutationCompleted$Mutation$DisableService = FutureOr Function( + dynamic, Mutation$DisableService?); + +class Options$Mutation$DisableService + extends graphql.MutationOptions { + Options$Mutation$DisableService( + {String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DisableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$DisableService(data)), + update: update, + onError: onError, + document: documentNodeMutationDisableService, + parserFn: _parserFn$Mutation$DisableService); + + final OnMutationCompleted$Mutation$DisableService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$DisableService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$DisableService( + {String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDisableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DisableService); +} + +extension ClientExtension$Mutation$DisableService on graphql.GraphQLClient { + Future> mutate$DisableService( + Options$Mutation$DisableService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$DisableService( + WatchOptions$Mutation$DisableService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DisableService$disableService + implements Fragment$basicMutationReturnFields { + Mutation$DisableService$disableService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$DisableService$disableService.fromJson( + Map json) => + _$Mutation$DisableService$disableServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$DisableService$disableServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DisableService$disableService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DisableService$disableService + on Mutation$DisableService$disableService { + Mutation$DisableService$disableService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$DisableService$disableService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$StopService { + Variables$Mutation$StopService({required this.serviceId}); + + @override + factory Variables$Mutation$StopService.fromJson(Map json) => + _$Variables$Mutation$StopServiceFromJson(json); + + final String serviceId; + + Map toJson() => _$Variables$Mutation$StopServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$StopService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$StopService copyWith({String? serviceId}) => + Variables$Mutation$StopService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StopService { + Mutation$StopService({required this.stopService, required this.$__typename}); + + @override + factory Mutation$StopService.fromJson(Map json) => + _$Mutation$StopServiceFromJson(json); + + final Mutation$StopService$stopService stopService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$StopServiceToJson(this); + int get hashCode { + final l$stopService = stopService; + final l$$__typename = $__typename; + return Object.hashAll([l$stopService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StopService) || runtimeType != other.runtimeType) + return false; + final l$stopService = stopService; + final lOther$stopService = other.stopService; + if (l$stopService != lOther$stopService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StopService on Mutation$StopService { + Mutation$StopService copyWith( + {Mutation$StopService$stopService? stopService, + String? $__typename}) => + Mutation$StopService( + stopService: stopService == null ? this.stopService : stopService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationStopService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'StopService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'stopService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$StopService _parserFn$Mutation$StopService( + Map data) => + Mutation$StopService.fromJson(data); +typedef OnMutationCompleted$Mutation$StopService = FutureOr Function( + dynamic, Mutation$StopService?); + +class Options$Mutation$StopService + extends graphql.MutationOptions { + Options$Mutation$StopService( + {String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StopService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$StopService(data)), + update: update, + onError: onError, + document: documentNodeMutationStopService, + parserFn: _parserFn$Mutation$StopService); + + final OnMutationCompleted$Mutation$StopService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$StopService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$StopService( + {String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStopService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StopService); +} + +extension ClientExtension$Mutation$StopService on graphql.GraphQLClient { + Future> mutate$StopService( + Options$Mutation$StopService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$StopService( + WatchOptions$Mutation$StopService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StopService$stopService + implements Fragment$basicMutationReturnFields { + Mutation$StopService$stopService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$StopService$stopService.fromJson( + Map json) => + _$Mutation$StopService$stopServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$StopService$stopServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StopService$stopService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StopService$stopService + on Mutation$StopService$stopService { + Mutation$StopService$stopService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$StopService$stopService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$StartService { + Variables$Mutation$StartService({required this.serviceId}); + + @override + factory Variables$Mutation$StartService.fromJson(Map json) => + _$Variables$Mutation$StartServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$StartServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$StartService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$StartService copyWith({String? serviceId}) => + Variables$Mutation$StartService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StartService { + Mutation$StartService( + {required this.startService, required this.$__typename}); + + @override + factory Mutation$StartService.fromJson(Map json) => + _$Mutation$StartServiceFromJson(json); + + final Mutation$StartService$startService startService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$StartServiceToJson(this); + int get hashCode { + final l$startService = startService; + final l$$__typename = $__typename; + return Object.hashAll([l$startService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StartService) || runtimeType != other.runtimeType) + return false; + final l$startService = startService; + final lOther$startService = other.startService; + if (l$startService != lOther$startService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StartService on Mutation$StartService { + Mutation$StartService copyWith( + {Mutation$StartService$startService? startService, + String? $__typename}) => + Mutation$StartService( + startService: startService == null ? this.startService : startService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationStartService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'StartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'startService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$StartService _parserFn$Mutation$StartService( + Map data) => + Mutation$StartService.fromJson(data); +typedef OnMutationCompleted$Mutation$StartService = FutureOr Function( + dynamic, Mutation$StartService?); + +class Options$Mutation$StartService + extends graphql.MutationOptions { + Options$Mutation$StartService( + {String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$StartService(data)), + update: update, + onError: onError, + document: documentNodeMutationStartService, + parserFn: _parserFn$Mutation$StartService); + + final OnMutationCompleted$Mutation$StartService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$StartService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$StartService( + {String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StartService); +} + +extension ClientExtension$Mutation$StartService on graphql.GraphQLClient { + Future> mutate$StartService( + Options$Mutation$StartService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$StartService( + WatchOptions$Mutation$StartService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StartService$startService + implements Fragment$basicMutationReturnFields { + Mutation$StartService$startService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$StartService$startService.fromJson( + Map json) => + _$Mutation$StartService$startServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$StartService$startServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StartService$startService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StartService$startService + on Mutation$StartService$startService { + Mutation$StartService$startService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$StartService$startService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$RestartService { + Variables$Mutation$RestartService({required this.serviceId}); + + @override + factory Variables$Mutation$RestartService.fromJson( + Map json) => + _$Variables$Mutation$RestartServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$RestartServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$RestartService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$RestartService copyWith({String? serviceId}) => + Variables$Mutation$RestartService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RestartService { + Mutation$RestartService( + {required this.restartService, required this.$__typename}); + + @override + factory Mutation$RestartService.fromJson(Map json) => + _$Mutation$RestartServiceFromJson(json); + + final Mutation$RestartService$restartService restartService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RestartServiceToJson(this); + int get hashCode { + final l$restartService = restartService; + final l$$__typename = $__typename; + return Object.hashAll([l$restartService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RestartService) || runtimeType != other.runtimeType) + return false; + final l$restartService = restartService; + final lOther$restartService = other.restartService; + if (l$restartService != lOther$restartService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RestartService on Mutation$RestartService { + Mutation$RestartService copyWith( + {Mutation$RestartService$restartService? restartService, + String? $__typename}) => + Mutation$RestartService( + restartService: + restartService == null ? this.restartService : restartService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRestartService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RestartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'restartService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RestartService _parserFn$Mutation$RestartService( + Map data) => + Mutation$RestartService.fromJson(data); +typedef OnMutationCompleted$Mutation$RestartService = FutureOr Function( + dynamic, Mutation$RestartService?); + +class Options$Mutation$RestartService + extends graphql.MutationOptions { + Options$Mutation$RestartService( + {String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RestartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RestartService(data)), + update: update, + onError: onError, + document: documentNodeMutationRestartService, + parserFn: _parserFn$Mutation$RestartService); + + final OnMutationCompleted$Mutation$RestartService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RestartService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RestartService( + {String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRestartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RestartService); +} + +extension ClientExtension$Mutation$RestartService on graphql.GraphQLClient { + Future> mutate$RestartService( + Options$Mutation$RestartService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$RestartService( + WatchOptions$Mutation$RestartService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RestartService$restartService + implements Fragment$basicMutationReturnFields { + Mutation$RestartService$restartService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RestartService$restartService.fromJson( + Map json) => + _$Mutation$RestartService$restartServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RestartService$restartServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RestartService$restartService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RestartService$restartService + on Mutation$RestartService$restartService { + Mutation$RestartService$restartService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RestartService$restartService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$MoveService { + Variables$Mutation$MoveService({required this.input}); + + @override + factory Variables$Mutation$MoveService.fromJson(Map json) => + _$Variables$Mutation$MoveServiceFromJson(json); + + final Input$MoveServiceInput input; + + Map toJson() => _$Variables$Mutation$MoveServiceToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$MoveService) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$MoveService copyWith({Input$MoveServiceInput? input}) => + Variables$Mutation$MoveService(input: input == null ? this.input : input); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MoveService { + Mutation$MoveService({required this.moveService, required this.$__typename}); + + @override + factory Mutation$MoveService.fromJson(Map json) => + _$Mutation$MoveServiceFromJson(json); + + final Mutation$MoveService$moveService moveService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$MoveServiceToJson(this); + int get hashCode { + final l$moveService = moveService; + final l$$__typename = $__typename; + return Object.hashAll([l$moveService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MoveService) || runtimeType != other.runtimeType) + return false; + final l$moveService = moveService; + final lOther$moveService = other.moveService; + if (l$moveService != lOther$moveService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MoveService on Mutation$MoveService { + Mutation$MoveService copyWith( + {Mutation$MoveService$moveService? moveService, + String? $__typename}) => + Mutation$MoveService( + moveService: moveService == null ? this.moveService : moveService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationMoveService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'MoveService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MoveServiceInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'moveService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'job'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$MoveService _parserFn$Mutation$MoveService( + Map data) => + Mutation$MoveService.fromJson(data); +typedef OnMutationCompleted$Mutation$MoveService = FutureOr Function( + dynamic, Mutation$MoveService?); + +class Options$Mutation$MoveService + extends graphql.MutationOptions { + Options$Mutation$MoveService( + {String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MoveService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$MoveService(data)), + update: update, + onError: onError, + document: documentNodeMutationMoveService, + parserFn: _parserFn$Mutation$MoveService); + + final OnMutationCompleted$Mutation$MoveService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$MoveService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$MoveService( + {String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMoveService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MoveService); +} + +extension ClientExtension$Mutation$MoveService on graphql.GraphQLClient { + Future> mutate$MoveService( + Options$Mutation$MoveService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$MoveService( + WatchOptions$Mutation$MoveService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MoveService$moveService + implements Fragment$basicMutationReturnFields { + Mutation$MoveService$moveService( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job}); + + @override + factory Mutation$MoveService$moveService.fromJson( + Map json) => + _$Mutation$MoveService$moveServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$MoveService$moveService$job? job; + + Map toJson() => + _$Mutation$MoveService$moveServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$job = job; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MoveService$moveService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$job = job; + final lOther$job = other.job; + if (l$job != lOther$job) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MoveService$moveService + on Mutation$MoveService$moveService { + Mutation$MoveService$moveService copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MoveService$moveService$job? Function()? job}) => + Mutation$MoveService$moveService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + job: job == null ? this.job : job()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MoveService$moveService$job { + Mutation$MoveService$moveService$job( + {required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename}); + + @override + factory Mutation$MoveService$moveService$job.fromJson( + Map json) => + _$Mutation$MoveService$moveService$jobFromJson(json); + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime createdAt; + + final String description; + + final String? error; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? finishedAt; + + final String name; + + final int? progress; + + final String? result; + + final String status; + + final String? statusText; + + final String uid; + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime updatedAt; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$MoveService$moveService$jobToJson(this); + int get hashCode { + final l$createdAt = createdAt; + final l$description = description; + final l$error = error; + final l$finishedAt = finishedAt; + final l$name = name; + final l$progress = progress; + final l$result = result; + final l$status = status; + final l$statusText = statusText; + final l$uid = uid; + final l$updatedAt = updatedAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$createdAt, + l$description, + l$error, + l$finishedAt, + l$name, + l$progress, + l$result, + l$status, + l$statusText, + l$uid, + l$updatedAt, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MoveService$moveService$job) || + runtimeType != other.runtimeType) return false; + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$error = error; + final lOther$error = other.error; + if (l$error != lOther$error) return false; + final l$finishedAt = finishedAt; + final lOther$finishedAt = other.finishedAt; + if (l$finishedAt != lOther$finishedAt) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$progress = progress; + final lOther$progress = other.progress; + if (l$progress != lOther$progress) return false; + final l$result = result; + final lOther$result = other.result; + if (l$result != lOther$result) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$statusText = statusText; + final lOther$statusText = other.statusText; + if (l$statusText != lOther$statusText) return false; + final l$uid = uid; + final lOther$uid = other.uid; + if (l$uid != lOther$uid) return false; + final l$updatedAt = updatedAt; + final lOther$updatedAt = other.updatedAt; + if (l$updatedAt != lOther$updatedAt) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MoveService$moveService$job + on Mutation$MoveService$moveService$job { + Mutation$MoveService$moveService$job copyWith( + {DateTime? createdAt, + String? description, + String? Function()? error, + DateTime? Function()? finishedAt, + String? name, + int? Function()? progress, + String? Function()? result, + String? status, + String? Function()? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}) => + Mutation$MoveService$moveService$job( + createdAt: createdAt == null ? this.createdAt : createdAt, + description: description == null ? this.description : description, + error: error == null ? this.error : error(), + finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), + name: name == null ? this.name : name, + progress: progress == null ? this.progress : progress(), + result: result == null ? this.result : result(), + status: status == null ? this.status : status, + statusText: statusText == null ? this.statusText : statusText(), + uid: uid == null ? this.uid : uid, + updatedAt: updatedAt == null ? this.updatedAt : updatedAt, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +DateTime? _nullable$dateTimeFromJson(dynamic data) => + data == null ? null : dateTimeFromJson(data); +dynamic _nullable$dateTimeToJson(DateTime? data) => + data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart new file mode 100644 index 00000000..c88900b1 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart @@ -0,0 +1,482 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'services.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( + Map json) => + Fragment$basicMutationReturnFields( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$AllServices _$Query$AllServicesFromJson(Map json) => + Query$AllServices( + services: Query$AllServices$services.fromJson( + json['services'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServicesToJson(Query$AllServices instance) => + { + 'services': instance.services.toJson(), + '__typename': instance.$__typename, + }; + +Query$AllServices$services _$Query$AllServices$servicesFromJson( + Map json) => + Query$AllServices$services( + allServices: (json['allServices'] as List) + .map((e) => Query$AllServices$services$allServices.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$servicesToJson( + Query$AllServices$services instance) => + { + 'allServices': instance.allServices.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$AllServices$services$allServices + _$Query$AllServices$services$allServicesFromJson( + Map json) => + Query$AllServices$services$allServices( + description: json['description'] as String, + displayName: json['displayName'] as String, + dnsRecords: (json['dnsRecords'] as List?) + ?.map((e) => + Query$AllServices$services$allServices$dnsRecords.fromJson( + e as Map)) + .toList(), + id: json['id'] as String, + isEnabled: json['isEnabled'] as bool, + isMovable: json['isMovable'] as bool, + isRequired: json['isRequired'] as bool, + status: $enumDecode(_$Enum$ServiceStatusEnumEnumMap, json['status'], + unknownValue: Enum$ServiceStatusEnum.$unknown), + storageUsage: + Query$AllServices$services$allServices$storageUsage.fromJson( + json['storageUsage'] as Map), + svgIcon: json['svgIcon'] as String, + url: json['url'] as String?, + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$services$allServicesToJson( + Query$AllServices$services$allServices instance) => + { + 'description': instance.description, + 'displayName': instance.displayName, + 'dnsRecords': instance.dnsRecords?.map((e) => e.toJson()).toList(), + 'id': instance.id, + 'isEnabled': instance.isEnabled, + 'isMovable': instance.isMovable, + 'isRequired': instance.isRequired, + 'status': _$Enum$ServiceStatusEnumEnumMap[instance.status], + 'storageUsage': instance.storageUsage.toJson(), + 'svgIcon': instance.svgIcon, + 'url': instance.url, + '__typename': instance.$__typename, + }; + +const _$Enum$ServiceStatusEnumEnumMap = { + Enum$ServiceStatusEnum.ACTIVATING: 'ACTIVATING', + Enum$ServiceStatusEnum.ACTIVE: 'ACTIVE', + Enum$ServiceStatusEnum.DEACTIVATING: 'DEACTIVATING', + Enum$ServiceStatusEnum.FAILED: 'FAILED', + Enum$ServiceStatusEnum.INACTIVE: 'INACTIVE', + Enum$ServiceStatusEnum.OFF: 'OFF', + Enum$ServiceStatusEnum.RELOADING: 'RELOADING', + Enum$ServiceStatusEnum.$unknown: r'$unknown', +}; + +Query$AllServices$services$allServices$dnsRecords + _$Query$AllServices$services$allServices$dnsRecordsFromJson( + Map json) => + Query$AllServices$services$allServices$dnsRecords( + content: json['content'] as String, + name: json['name'] as String, + priority: json['priority'] as int?, + recordType: json['recordType'] as String, + ttl: json['ttl'] as int, + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$services$allServices$dnsRecordsToJson( + Query$AllServices$services$allServices$dnsRecords instance) => + { + 'content': instance.content, + 'name': instance.name, + 'priority': instance.priority, + 'recordType': instance.recordType, + 'ttl': instance.ttl, + '__typename': instance.$__typename, + }; + +Query$AllServices$services$allServices$storageUsage + _$Query$AllServices$services$allServices$storageUsageFromJson( + Map json) => + Query$AllServices$services$allServices$storageUsage( + title: json['title'] as String, + usedSpace: json['usedSpace'] as String, + volume: json['volume'] == null + ? null + : Query$AllServices$services$allServices$storageUsage$volume + .fromJson(json['volume'] as Map), + $__typename: json['__typename'] as String, + ); + +Map + _$Query$AllServices$services$allServices$storageUsageToJson( + Query$AllServices$services$allServices$storageUsage instance) => + { + 'title': instance.title, + 'usedSpace': instance.usedSpace, + 'volume': instance.volume?.toJson(), + '__typename': instance.$__typename, + }; + +Query$AllServices$services$allServices$storageUsage$volume + _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( + Map json) => + Query$AllServices$services$allServices$storageUsage$volume( + name: json['name'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$services$allServices$storageUsage$volumeToJson( + Query$AllServices$services$allServices$storageUsage$volume instance) => + { + 'name': instance.name, + '__typename': instance.$__typename, + }; + +Variables$Mutation$EnableService _$Variables$Mutation$EnableServiceFromJson( + Map json) => + Variables$Mutation$EnableService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$EnableServiceToJson( + Variables$Mutation$EnableService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$EnableService _$Mutation$EnableServiceFromJson( + Map json) => + Mutation$EnableService( + enableService: Mutation$EnableService$enableService.fromJson( + json['enableService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$EnableServiceToJson( + Mutation$EnableService instance) => + { + 'enableService': instance.enableService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$EnableService$enableService + _$Mutation$EnableService$enableServiceFromJson(Map json) => + Mutation$EnableService$enableService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$EnableService$enableServiceToJson( + Mutation$EnableService$enableService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$DisableService _$Variables$Mutation$DisableServiceFromJson( + Map json) => + Variables$Mutation$DisableService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$DisableServiceToJson( + Variables$Mutation$DisableService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$DisableService _$Mutation$DisableServiceFromJson( + Map json) => + Mutation$DisableService( + disableService: Mutation$DisableService$disableService.fromJson( + json['disableService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DisableServiceToJson( + Mutation$DisableService instance) => + { + 'disableService': instance.disableService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$DisableService$disableService + _$Mutation$DisableService$disableServiceFromJson( + Map json) => + Mutation$DisableService$disableService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DisableService$disableServiceToJson( + Mutation$DisableService$disableService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$StopService _$Variables$Mutation$StopServiceFromJson( + Map json) => + Variables$Mutation$StopService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$StopServiceToJson( + Variables$Mutation$StopService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$StopService _$Mutation$StopServiceFromJson( + Map json) => + Mutation$StopService( + stopService: Mutation$StopService$stopService.fromJson( + json['stopService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StopServiceToJson( + Mutation$StopService instance) => + { + 'stopService': instance.stopService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$StopService$stopService _$Mutation$StopService$stopServiceFromJson( + Map json) => + Mutation$StopService$stopService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StopService$stopServiceToJson( + Mutation$StopService$stopService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$StartService _$Variables$Mutation$StartServiceFromJson( + Map json) => + Variables$Mutation$StartService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$StartServiceToJson( + Variables$Mutation$StartService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$StartService _$Mutation$StartServiceFromJson( + Map json) => + Mutation$StartService( + startService: Mutation$StartService$startService.fromJson( + json['startService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StartServiceToJson( + Mutation$StartService instance) => + { + 'startService': instance.startService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$StartService$startService _$Mutation$StartService$startServiceFromJson( + Map json) => + Mutation$StartService$startService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StartService$startServiceToJson( + Mutation$StartService$startService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$RestartService _$Variables$Mutation$RestartServiceFromJson( + Map json) => + Variables$Mutation$RestartService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$RestartServiceToJson( + Variables$Mutation$RestartService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$RestartService _$Mutation$RestartServiceFromJson( + Map json) => + Mutation$RestartService( + restartService: Mutation$RestartService$restartService.fromJson( + json['restartService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RestartServiceToJson( + Mutation$RestartService instance) => + { + 'restartService': instance.restartService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RestartService$restartService + _$Mutation$RestartService$restartServiceFromJson( + Map json) => + Mutation$RestartService$restartService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RestartService$restartServiceToJson( + Mutation$RestartService$restartService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$MoveService _$Variables$Mutation$MoveServiceFromJson( + Map json) => + Variables$Mutation$MoveService( + input: Input$MoveServiceInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$MoveServiceToJson( + Variables$Mutation$MoveService instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$MoveService _$Mutation$MoveServiceFromJson( + Map json) => + Mutation$MoveService( + moveService: Mutation$MoveService$moveService.fromJson( + json['moveService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MoveServiceToJson( + Mutation$MoveService instance) => + { + 'moveService': instance.moveService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$MoveService$moveService _$Mutation$MoveService$moveServiceFromJson( + Map json) => + Mutation$MoveService$moveService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + job: json['job'] == null + ? null + : Mutation$MoveService$moveService$job.fromJson( + json['job'] as Map), + ); + +Map _$Mutation$MoveService$moveServiceToJson( + Mutation$MoveService$moveService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'job': instance.job?.toJson(), + }; + +Mutation$MoveService$moveService$job + _$Mutation$MoveService$moveService$jobFromJson(Map json) => + Mutation$MoveService$moveService$job( + createdAt: dateTimeFromJson(json['createdAt']), + description: json['description'] as String, + error: json['error'] as String?, + finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), + name: json['name'] as String, + progress: json['progress'] as int?, + result: json['result'] as String?, + status: json['status'] as String, + statusText: json['statusText'] as String?, + uid: json['uid'] as String, + updatedAt: dateTimeFromJson(json['updatedAt']), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MoveService$moveService$jobToJson( + Mutation$MoveService$moveService$job instance) => + { + 'createdAt': dateTimeToJson(instance.createdAt), + 'description': instance.description, + 'error': instance.error, + 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), + 'name': instance.name, + 'progress': instance.progress, + 'result': instance.result, + 'status': instance.status, + 'statusText': instance.statusText, + 'uid': instance.uid, + 'updatedAt': dateTimeToJson(instance.updatedAt), + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql b/lib/logic/api_maps/graphql_maps/schema/users.graphql new file mode 100644 index 00000000..cfe01820 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql @@ -0,0 +1,76 @@ +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + + +mutation CreateUser($user: UserMutationInput!) { + createUser(user: $user) { + ...basicMutationReturnFields + user { + username + userType + sshKeys + } + } +} + +query AllUsers { + users { + allUsers { + userType + username + sshKeys + } + } +} + +mutation AddSshKey($sshInput: SshMutationInput!) { + addSshKey(sshInput: $sshInput) { + ...basicMutationReturnFields + user { + sshKeys + userType + username + } + } +} + +query GetUser($username: String!) { + users { + getUser(username: $username) { + sshKeys + userType + username + } + } +} + +mutation RemoveSshKey($sshInput: SshMutationInput!) { + removeSshKey(sshInput: $sshInput) { + ...basicMutationReturnFields + user { + sshKeys + userType + username + } + } +} + +mutation DeleteUser($username: String!) { + deleteUser(username: $username) { + ...basicMutationReturnFields + } +} + +mutation UpdateUser($user: UserMutationInput!) { + updateUser(user: $user) { + ...basicMutationReturnFields + user { + sshKeys + userType + username + } + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart new file mode 100644 index 00000000..81f3fd8c --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -0,0 +1,2642 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +import 'schema.graphql.dart'; +part 'users.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Fragment$basicMutationReturnFields) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( + {required Map idFields, bool optimistic = true}) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$CreateUser { + Variables$Mutation$CreateUser({required this.user}); + + @override + factory Variables$Mutation$CreateUser.fromJson(Map json) => + _$Variables$Mutation$CreateUserFromJson(json); + + final Input$UserMutationInput user; + + Map toJson() => _$Variables$Mutation$CreateUserToJson(this); + int get hashCode { + final l$user = user; + return Object.hashAll([l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$CreateUser) || + runtimeType != other.runtimeType) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } + + Variables$Mutation$CreateUser copyWith({Input$UserMutationInput? user}) => + Variables$Mutation$CreateUser(user: user == null ? this.user : user); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$CreateUser { + Mutation$CreateUser({required this.createUser, required this.$__typename}); + + @override + factory Mutation$CreateUser.fromJson(Map json) => + _$Mutation$CreateUserFromJson(json); + + final Mutation$CreateUser$createUser createUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$CreateUserToJson(this); + int get hashCode { + final l$createUser = createUser; + final l$$__typename = $__typename; + return Object.hashAll([l$createUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) + return false; + final l$createUser = createUser; + final lOther$createUser = other.createUser; + if (l$createUser != lOther$createUser) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { + Mutation$CreateUser copyWith( + {Mutation$CreateUser$createUser? createUser, String? $__typename}) => + Mutation$CreateUser( + createUser: createUser == null ? this.createUser : createUser, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationCreateUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'CreateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => + Mutation$CreateUser.fromJson(data); +typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( + dynamic, Mutation$CreateUser?); + +class Options$Mutation$CreateUser + extends graphql.MutationOptions { + Options$Mutation$CreateUser( + {String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$CreateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$CreateUser(data)), + update: update, + onError: onError, + document: documentNodeMutationCreateUser, + parserFn: _parserFn$Mutation$CreateUser); + + final OnMutationCompleted$Mutation$CreateUser? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$CreateUser + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$CreateUser( + {String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationCreateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$CreateUser); +} + +extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { + Future> mutate$CreateUser( + Options$Mutation$CreateUser options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$CreateUser( + WatchOptions$Mutation$CreateUser options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$CreateUser$createUser + implements Fragment$basicMutationReturnFields { + Mutation$CreateUser$createUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); + + @override + factory Mutation$CreateUser$createUser.fromJson(Map json) => + _$Mutation$CreateUser$createUserFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$CreateUser$createUser$user? user; + + Map toJson() => _$Mutation$CreateUser$createUserToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$user = user; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$CreateUser$createUser) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$CreateUser$createUser + on Mutation$CreateUser$createUser { + Mutation$CreateUser$createUser copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$CreateUser$createUser$user? Function()? user}) => + Mutation$CreateUser$createUser( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$CreateUser$createUser$user { + Mutation$CreateUser$createUser$user( + {required this.username, + required this.userType, + required this.sshKeys, + required this.$__typename}); + + @override + factory Mutation$CreateUser$createUser$user.fromJson( + Map json) => + _$Mutation$CreateUser$createUser$userFromJson(json); + + final String username; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final List sshKeys; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$CreateUser$createUser$userToJson(this); + int get hashCode { + final l$username = username; + final l$userType = userType; + final l$sshKeys = sshKeys; + final l$$__typename = $__typename; + return Object.hashAll([ + l$username, + l$userType, + Object.hashAll(l$sshKeys.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$CreateUser$createUser$user) || + runtimeType != other.runtimeType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$CreateUser$createUser$user + on Mutation$CreateUser$createUser$user { + Mutation$CreateUser$createUser$user copyWith( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}) => + Mutation$CreateUser$createUser$user( + username: username == null ? this.username : username, + userType: userType == null ? this.userType : userType, + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllUsers { + Query$AllUsers({required this.users, required this.$__typename}); + + @override + factory Query$AllUsers.fromJson(Map json) => + _$Query$AllUsersFromJson(json); + + final Query$AllUsers$users users; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsersToJson(this); + int get hashCode { + final l$users = users; + final l$$__typename = $__typename; + return Object.hashAll([l$users, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) + return false; + final l$users = users; + final lOther$users = other.users; + if (l$users != lOther$users) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers on Query$AllUsers { + Query$AllUsers copyWith({Query$AllUsers$users? users, String? $__typename}) => + Query$AllUsers( + users: users == null ? this.users : users, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryAllUsers = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'AllUsers'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allUsers'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$AllUsers _parserFn$Query$AllUsers(Map data) => + Query$AllUsers.fromJson(data); + +class Options$Query$AllUsers extends graphql.QueryOptions { + Options$Query$AllUsers( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllUsers, + parserFn: _parserFn$Query$AllUsers); +} + +class WatchOptions$Query$AllUsers + extends graphql.WatchQueryOptions { + WatchOptions$Query$AllUsers( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllUsers, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllUsers); +} + +class FetchMoreOptions$Query$AllUsers extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); +} + +extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { + Future> query$AllUsers( + [Options$Query$AllUsers? options]) async => + await this.query(options ?? Options$Query$AllUsers()); + graphql.ObservableQuery watchQuery$AllUsers( + [WatchOptions$Query$AllUsers? options]) => + this.watchQuery(options ?? WatchOptions$Query$AllUsers()); + void writeQuery$AllUsers( + {required Query$AllUsers data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllUsers)), + data: data.toJson(), + broadcast: broadcast); + Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllUsers)), + optimistic: optimistic); + return result == null ? null : Query$AllUsers.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$AllUsers$users { + Query$AllUsers$users({required this.allUsers, required this.$__typename}); + + @override + factory Query$AllUsers$users.fromJson(Map json) => + _$Query$AllUsers$usersFromJson(json); + + final List allUsers; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsers$usersToJson(this); + int get hashCode { + final l$allUsers = allUsers; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$allUsers.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) + return false; + final l$allUsers = allUsers; + final lOther$allUsers = other.allUsers; + if (l$allUsers.length != lOther$allUsers.length) return false; + for (int i = 0; i < l$allUsers.length; i++) { + final l$allUsers$entry = l$allUsers[i]; + final lOther$allUsers$entry = lOther$allUsers[i]; + if (l$allUsers$entry != lOther$allUsers$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { + Query$AllUsers$users copyWith( + {List? allUsers, + String? $__typename}) => + Query$AllUsers$users( + allUsers: allUsers == null ? this.allUsers : allUsers, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllUsers$users$allUsers { + Query$AllUsers$users$allUsers( + {required this.userType, + required this.username, + required this.sshKeys, + required this.$__typename}); + + @override + factory Query$AllUsers$users$allUsers.fromJson(Map json) => + _$Query$AllUsers$users$allUsersFromJson(json); + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + final List sshKeys; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsers$users$allUsersToJson(this); + int get hashCode { + final l$userType = userType; + final l$username = username; + final l$sshKeys = sshKeys; + final l$$__typename = $__typename; + return Object.hashAll([ + l$userType, + l$username, + Object.hashAll(l$sshKeys.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllUsers$users$allUsers) || + runtimeType != other.runtimeType) return false; + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers$users$allUsers + on Query$AllUsers$users$allUsers { + Query$AllUsers$users$allUsers copyWith( + {Enum$UserType? userType, + String? username, + List? sshKeys, + String? $__typename}) => + Query$AllUsers$users$allUsers( + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$AddSshKey { + Variables$Mutation$AddSshKey({required this.sshInput}); + + @override + factory Variables$Mutation$AddSshKey.fromJson(Map json) => + _$Variables$Mutation$AddSshKeyFromJson(json); + + final Input$SshMutationInput sshInput; + + Map toJson() => _$Variables$Mutation$AddSshKeyToJson(this); + int get hashCode { + final l$sshInput = sshInput; + return Object.hashAll([l$sshInput]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$AddSshKey) || + runtimeType != other.runtimeType) return false; + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) return false; + return true; + } + + Variables$Mutation$AddSshKey copyWith({Input$SshMutationInput? sshInput}) => + Variables$Mutation$AddSshKey( + sshInput: sshInput == null ? this.sshInput : sshInput); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AddSshKey { + Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); + + @override + factory Mutation$AddSshKey.fromJson(Map json) => + _$Mutation$AddSshKeyFromJson(json); + + final Mutation$AddSshKey$addSshKey addSshKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$AddSshKeyToJson(this); + int get hashCode { + final l$addSshKey = addSshKey; + final l$$__typename = $__typename; + return Object.hashAll([l$addSshKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) + return false; + final l$addSshKey = addSshKey; + final lOther$addSshKey = other.addSshKey; + if (l$addSshKey != lOther$addSshKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { + Mutation$AddSshKey copyWith( + {Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => + Mutation$AddSshKey( + addSshKey: addSshKey == null ? this.addSshKey : addSshKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationAddSshKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'AddSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'addSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => + Mutation$AddSshKey.fromJson(data); +typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( + dynamic, Mutation$AddSshKey?); + +class Options$Mutation$AddSshKey + extends graphql.MutationOptions { + Options$Mutation$AddSshKey( + {String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AddSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$AddSshKey(data)), + update: update, + onError: onError, + document: documentNodeMutationAddSshKey, + parserFn: _parserFn$Mutation$AddSshKey); + + final OnMutationCompleted$Mutation$AddSshKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$AddSshKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$AddSshKey( + {String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAddSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AddSshKey); +} + +extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { + Future> mutate$AddSshKey( + Options$Mutation$AddSshKey options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$AddSshKey( + WatchOptions$Mutation$AddSshKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AddSshKey$addSshKey + implements Fragment$basicMutationReturnFields { + Mutation$AddSshKey$addSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); + + @override + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => + _$Mutation$AddSshKey$addSshKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$AddSshKey$addSshKey$user? user; + + Map toJson() => _$Mutation$AddSshKey$addSshKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$user = user; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AddSshKey$addSshKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AddSshKey$addSshKey + on Mutation$AddSshKey$addSshKey { + Mutation$AddSshKey$addSshKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$AddSshKey$addSshKey$user? Function()? user}) => + Mutation$AddSshKey$addSshKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AddSshKey$addSshKey$user { + Mutation$AddSshKey$addSshKey$user( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Mutation$AddSshKey$addSshKey$user.fromJson( + Map json) => + _$Mutation$AddSshKey$addSshKey$userFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$AddSshKey$addSshKey$userToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AddSshKey$addSshKey$user) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AddSshKey$addSshKey$user + on Mutation$AddSshKey$addSshKey$user { + Mutation$AddSshKey$addSshKey$user copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Mutation$AddSshKey$addSshKey$user( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Query$GetUser { + Variables$Query$GetUser({required this.username}); + + @override + factory Variables$Query$GetUser.fromJson(Map json) => + _$Variables$Query$GetUserFromJson(json); + + final String username; + + Map toJson() => _$Variables$Query$GetUserToJson(this); + int get hashCode { + final l$username = username; + return Object.hashAll([l$username]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) + return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + return true; + } + + Variables$Query$GetUser copyWith({String? username}) => + Variables$Query$GetUser( + username: username == null ? this.username : username); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser { + Query$GetUser({required this.users, required this.$__typename}); + + @override + factory Query$GetUser.fromJson(Map json) => + _$Query$GetUserFromJson(json); + + final Query$GetUser$users users; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUserToJson(this); + int get hashCode { + final l$users = users; + final l$$__typename = $__typename; + return Object.hashAll([l$users, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetUser) || runtimeType != other.runtimeType) + return false; + final l$users = users; + final lOther$users = other.users; + if (l$users != lOther$users) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser on Query$GetUser { + Query$GetUser copyWith({Query$GetUser$users? users, String? $__typename}) => + Query$GetUser( + users: users == null ? this.users : users, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryGetUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetUser _parserFn$Query$GetUser(Map data) => + Query$GetUser.fromJson(data); + +class Options$Query$GetUser extends graphql.QueryOptions { + Options$Query$GetUser( + {String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetUser, + parserFn: _parserFn$Query$GetUser); +} + +class WatchOptions$Query$GetUser + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetUser( + {String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetUser); +} + +class FetchMoreOptions$Query$GetUser extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetUser( + {required graphql.UpdateQuery updateQuery, + required Variables$Query$GetUser variables}) + : super( + updateQuery: updateQuery, + variables: variables.toJson(), + document: documentNodeQueryGetUser); +} + +extension ClientExtension$Query$GetUser on graphql.GraphQLClient { + Future> query$GetUser( + Options$Query$GetUser options) async => + await this.query(options); + graphql.ObservableQuery watchQuery$GetUser( + WatchOptions$Query$GetUser options) => + this.watchQuery(options); + void writeQuery$GetUser( + {required Query$GetUser data, + required Variables$Query$GetUser variables, + bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), + data: data.toJson(), + broadcast: broadcast); + Query$GetUser? readQuery$GetUser( + {required Variables$Query$GetUser variables, bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), + optimistic: optimistic); + return result == null ? null : Query$GetUser.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser$users { + Query$GetUser$users({this.getUser, required this.$__typename}); + + @override + factory Query$GetUser$users.fromJson(Map json) => + _$Query$GetUser$usersFromJson(json); + + final Query$GetUser$users$getUser? getUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUser$usersToJson(this); + int get hashCode { + final l$getUser = getUser; + final l$$__typename = $__typename; + return Object.hashAll([l$getUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) + return false; + final l$getUser = getUser; + final lOther$getUser = other.getUser; + if (l$getUser != lOther$getUser) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { + Query$GetUser$users copyWith( + {Query$GetUser$users$getUser? Function()? getUser, + String? $__typename}) => + Query$GetUser$users( + getUser: getUser == null ? this.getUser : getUser(), + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser$users$getUser { + Query$GetUser$users$getUser( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Query$GetUser$users$getUser.fromJson(Map json) => + _$Query$GetUser$users$getUserFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUser$users$getUserToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetUser$users$getUser) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser$users$getUser + on Query$GetUser$users$getUser { + Query$GetUser$users$getUser copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Query$GetUser$users$getUser( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$RemoveSshKey { + Variables$Mutation$RemoveSshKey({required this.sshInput}); + + @override + factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => + _$Variables$Mutation$RemoveSshKeyFromJson(json); + + final Input$SshMutationInput sshInput; + + Map toJson() => + _$Variables$Mutation$RemoveSshKeyToJson(this); + int get hashCode { + final l$sshInput = sshInput; + return Object.hashAll([l$sshInput]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$RemoveSshKey) || + runtimeType != other.runtimeType) return false; + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) return false; + return true; + } + + Variables$Mutation$RemoveSshKey copyWith( + {Input$SshMutationInput? sshInput}) => + Variables$Mutation$RemoveSshKey( + sshInput: sshInput == null ? this.sshInput : sshInput); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveSshKey { + Mutation$RemoveSshKey( + {required this.removeSshKey, required this.$__typename}); + + @override + factory Mutation$RemoveSshKey.fromJson(Map json) => + _$Mutation$RemoveSshKeyFromJson(json); + + final Mutation$RemoveSshKey$removeSshKey removeSshKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RemoveSshKeyToJson(this); + int get hashCode { + final l$removeSshKey = removeSshKey; + final l$$__typename = $__typename; + return Object.hashAll([l$removeSshKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) + return false; + final l$removeSshKey = removeSshKey; + final lOther$removeSshKey = other.removeSshKey; + if (l$removeSshKey != lOther$removeSshKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { + Mutation$RemoveSshKey copyWith( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename}) => + Mutation$RemoveSshKey( + removeSshKey: removeSshKey == null ? this.removeSshKey : removeSshKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RemoveSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( + Map data) => + Mutation$RemoveSshKey.fromJson(data); +typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( + dynamic, Mutation$RemoveSshKey?); + +class Options$Mutation$RemoveSshKey + extends graphql.MutationOptions { + Options$Mutation$RemoveSshKey( + {String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RemoveSshKey(data)), + update: update, + onError: onError, + document: documentNodeMutationRemoveSshKey, + parserFn: _parserFn$Mutation$RemoveSshKey); + + final OnMutationCompleted$Mutation$RemoveSshKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RemoveSshKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RemoveSshKey( + {String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveSshKey); +} + +extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { + Future> mutate$RemoveSshKey( + Options$Mutation$RemoveSshKey options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$RemoveSshKey( + WatchOptions$Mutation$RemoveSshKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveSshKey$removeSshKey + implements Fragment$basicMutationReturnFields { + Mutation$RemoveSshKey$removeSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); + + @override + factory Mutation$RemoveSshKey$removeSshKey.fromJson( + Map json) => + _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$RemoveSshKey$removeSshKey$user? user; + + Map toJson() => + _$Mutation$RemoveSshKey$removeSshKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$user = user; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveSshKey$removeSshKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey + on Mutation$RemoveSshKey$removeSshKey { + Mutation$RemoveSshKey$removeSshKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$RemoveSshKey$removeSshKey$user? Function()? user}) => + Mutation$RemoveSshKey$removeSshKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveSshKey$removeSshKey$user { + Mutation$RemoveSshKey$removeSshKey$user( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Mutation$RemoveSshKey$removeSshKey$user.fromJson( + Map json) => + _$Mutation$RemoveSshKey$removeSshKey$userFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RemoveSshKey$removeSshKey$userToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveSshKey$removeSshKey$user) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey$user + on Mutation$RemoveSshKey$removeSshKey$user { + Mutation$RemoveSshKey$removeSshKey$user copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Mutation$RemoveSshKey$removeSshKey$user( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$DeleteUser { + Variables$Mutation$DeleteUser({required this.username}); + + @override + factory Variables$Mutation$DeleteUser.fromJson(Map json) => + _$Variables$Mutation$DeleteUserFromJson(json); + + final String username; + + Map toJson() => _$Variables$Mutation$DeleteUserToJson(this); + int get hashCode { + final l$username = username; + return Object.hashAll([l$username]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$DeleteUser) || + runtimeType != other.runtimeType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + return true; + } + + Variables$Mutation$DeleteUser copyWith({String? username}) => + Variables$Mutation$DeleteUser( + username: username == null ? this.username : username); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DeleteUser { + Mutation$DeleteUser({required this.deleteUser, required this.$__typename}); + + @override + factory Mutation$DeleteUser.fromJson(Map json) => + _$Mutation$DeleteUserFromJson(json); + + final Mutation$DeleteUser$deleteUser deleteUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DeleteUserToJson(this); + int get hashCode { + final l$deleteUser = deleteUser; + final l$$__typename = $__typename; + return Object.hashAll([l$deleteUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) + return false; + final l$deleteUser = deleteUser; + final lOther$deleteUser = other.deleteUser; + if (l$deleteUser != lOther$deleteUser) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { + Mutation$DeleteUser copyWith( + {Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => + Mutation$DeleteUser( + deleteUser: deleteUser == null ? this.deleteUser : deleteUser, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationDeleteUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'DeleteUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => + Mutation$DeleteUser.fromJson(data); +typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( + dynamic, Mutation$DeleteUser?); + +class Options$Mutation$DeleteUser + extends graphql.MutationOptions { + Options$Mutation$DeleteUser( + {String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$DeleteUser(data)), + update: update, + onError: onError, + document: documentNodeMutationDeleteUser, + parserFn: _parserFn$Mutation$DeleteUser); + + final OnMutationCompleted$Mutation$DeleteUser? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$DeleteUser + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$DeleteUser( + {String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteUser); +} + +extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { + Future> mutate$DeleteUser( + Options$Mutation$DeleteUser options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$DeleteUser( + WatchOptions$Mutation$DeleteUser options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DeleteUser$deleteUser + implements Fragment$basicMutationReturnFields { + Mutation$DeleteUser$deleteUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => + _$Mutation$DeleteUser$deleteUserFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DeleteUser$deleteUserToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DeleteUser$deleteUser) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DeleteUser$deleteUser + on Mutation$DeleteUser$deleteUser { + Mutation$DeleteUser$deleteUser copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$DeleteUser$deleteUser( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$UpdateUser { + Variables$Mutation$UpdateUser({required this.user}); + + @override + factory Variables$Mutation$UpdateUser.fromJson(Map json) => + _$Variables$Mutation$UpdateUserFromJson(json); + + final Input$UserMutationInput user; + + Map toJson() => _$Variables$Mutation$UpdateUserToJson(this); + int get hashCode { + final l$user = user; + return Object.hashAll([l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$UpdateUser) || + runtimeType != other.runtimeType) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } + + Variables$Mutation$UpdateUser copyWith({Input$UserMutationInput? user}) => + Variables$Mutation$UpdateUser(user: user == null ? this.user : user); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UpdateUser { + Mutation$UpdateUser({required this.updateUser, required this.$__typename}); + + @override + factory Mutation$UpdateUser.fromJson(Map json) => + _$Mutation$UpdateUserFromJson(json); + + final Mutation$UpdateUser$updateUser updateUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$UpdateUserToJson(this); + int get hashCode { + final l$updateUser = updateUser; + final l$$__typename = $__typename; + return Object.hashAll([l$updateUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) + return false; + final l$updateUser = updateUser; + final lOther$updateUser = other.updateUser; + if (l$updateUser != lOther$updateUser) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { + Mutation$UpdateUser copyWith( + {Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => + Mutation$UpdateUser( + updateUser: updateUser == null ? this.updateUser : updateUser, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationUpdateUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'UpdateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'updateUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => + Mutation$UpdateUser.fromJson(data); +typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( + dynamic, Mutation$UpdateUser?); + +class Options$Mutation$UpdateUser + extends graphql.MutationOptions { + Options$Mutation$UpdateUser( + {String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UpdateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$UpdateUser(data)), + update: update, + onError: onError, + document: documentNodeMutationUpdateUser, + parserFn: _parserFn$Mutation$UpdateUser); + + final OnMutationCompleted$Mutation$UpdateUser? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$UpdateUser + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$UpdateUser( + {String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUpdateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UpdateUser); +} + +extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { + Future> mutate$UpdateUser( + Options$Mutation$UpdateUser options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$UpdateUser( + WatchOptions$Mutation$UpdateUser options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UpdateUser$updateUser + implements Fragment$basicMutationReturnFields { + Mutation$UpdateUser$updateUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); + + @override + factory Mutation$UpdateUser$updateUser.fromJson(Map json) => + _$Mutation$UpdateUser$updateUserFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$UpdateUser$updateUser$user? user; + + Map toJson() => _$Mutation$UpdateUser$updateUserToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$user = user; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UpdateUser$updateUser) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UpdateUser$updateUser + on Mutation$UpdateUser$updateUser { + Mutation$UpdateUser$updateUser copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$UpdateUser$updateUser$user? Function()? user}) => + Mutation$UpdateUser$updateUser( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UpdateUser$updateUser$user { + Mutation$UpdateUser$updateUser$user( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Mutation$UpdateUser$updateUser$user.fromJson( + Map json) => + _$Mutation$UpdateUser$updateUser$userFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$UpdateUser$updateUser$userToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UpdateUser$updateUser$user) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UpdateUser$updateUser$user + on Mutation$UpdateUser$updateUser$user { + Mutation$UpdateUser$updateUser$user copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Mutation$UpdateUser$updateUser$user( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart new file mode 100644 index 00000000..411cbfad --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart @@ -0,0 +1,471 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'users.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( + Map json) => + Fragment$basicMutationReturnFields( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson( + Map json) => + Variables$Mutation$CreateUser( + user: Input$UserMutationInput.fromJson( + json['user'] as Map), + ); + +Map _$Variables$Mutation$CreateUserToJson( + Variables$Mutation$CreateUser instance) => + { + 'user': instance.user.toJson(), + }; + +Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => + Mutation$CreateUser( + createUser: Mutation$CreateUser$createUser.fromJson( + json['createUser'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$CreateUserToJson( + Mutation$CreateUser instance) => + { + 'createUser': instance.createUser.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson( + Map json) => + Mutation$CreateUser$createUser( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + user: json['user'] == null + ? null + : Mutation$CreateUser$createUser$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$CreateUser$createUserToJson( + Mutation$CreateUser$createUser instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$CreateUser$createUser$user + _$Mutation$CreateUser$createUser$userFromJson(Map json) => + Mutation$CreateUser$createUser$user( + username: json['username'] as String, + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + sshKeys: (json['sshKeys'] as List) + .map((e) => e as String) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$CreateUser$createUser$userToJson( + Mutation$CreateUser$createUser$user instance) => + { + 'username': instance.username, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'sshKeys': instance.sshKeys, + '__typename': instance.$__typename, + }; + +const _$Enum$UserTypeEnumMap = { + Enum$UserType.NORMAL: 'NORMAL', + Enum$UserType.PRIMARY: 'PRIMARY', + Enum$UserType.ROOT: 'ROOT', + Enum$UserType.$unknown: r'$unknown', +}; + +Query$AllUsers _$Query$AllUsersFromJson(Map json) => + Query$AllUsers( + users: + Query$AllUsers$users.fromJson(json['users'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllUsersToJson(Query$AllUsers instance) => + { + 'users': instance.users.toJson(), + '__typename': instance.$__typename, + }; + +Query$AllUsers$users _$Query$AllUsers$usersFromJson( + Map json) => + Query$AllUsers$users( + allUsers: (json['allUsers'] as List) + .map((e) => + Query$AllUsers$users$allUsers.fromJson(e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllUsers$usersToJson( + Query$AllUsers$users instance) => + { + 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$AllUsers$users$allUsers _$Query$AllUsers$users$allUsersFromJson( + Map json) => + Query$AllUsers$users$allUsers( + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllUsers$users$allUsersToJson( + Query$AllUsers$users$allUsers instance) => + { + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + 'sshKeys': instance.sshKeys, + '__typename': instance.$__typename, + }; + +Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( + Map json) => + Variables$Mutation$AddSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), + ); + +Map _$Variables$Mutation$AddSshKeyToJson( + Variables$Mutation$AddSshKey instance) => + { + 'sshInput': instance.sshInput.toJson(), + }; + +Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => + Mutation$AddSshKey( + addSshKey: Mutation$AddSshKey$addSshKey.fromJson( + json['addSshKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => + { + 'addSshKey': instance.addSshKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( + Map json) => + Mutation$AddSshKey$addSshKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + user: json['user'] == null + ? null + : Mutation$AddSshKey$addSshKey$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$AddSshKey$addSshKeyToJson( + Mutation$AddSshKey$addSshKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$AddSshKey$addSshKey$user _$Mutation$AddSshKey$addSshKey$userFromJson( + Map json) => + Mutation$AddSshKey$addSshKey$user( + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$AddSshKey$addSshKey$userToJson( + Mutation$AddSshKey$addSshKey$user instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; + +Variables$Query$GetUser _$Variables$Query$GetUserFromJson( + Map json) => + Variables$Query$GetUser( + username: json['username'] as String, + ); + +Map _$Variables$Query$GetUserToJson( + Variables$Query$GetUser instance) => + { + 'username': instance.username, + }; + +Query$GetUser _$Query$GetUserFromJson(Map json) => + Query$GetUser( + users: + Query$GetUser$users.fromJson(json['users'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetUserToJson(Query$GetUser instance) => + { + 'users': instance.users.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => + Query$GetUser$users( + getUser: json['getUser'] == null + ? null + : Query$GetUser$users$getUser.fromJson( + json['getUser'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetUser$usersToJson( + Query$GetUser$users instance) => + { + 'getUser': instance.getUser?.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetUser$users$getUser _$Query$GetUser$users$getUserFromJson( + Map json) => + Query$GetUser$users$getUser( + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetUser$users$getUserToJson( + Query$GetUser$users$getUser instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; + +Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( + Map json) => + Variables$Mutation$RemoveSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), + ); + +Map _$Variables$Mutation$RemoveSshKeyToJson( + Variables$Mutation$RemoveSshKey instance) => + { + 'sshInput': instance.sshInput.toJson(), + }; + +Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey( + removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( + json['removeSshKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveSshKeyToJson( + Mutation$RemoveSshKey instance) => + { + 'removeSshKey': instance.removeSshKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey$removeSshKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + user: json['user'] == null + ? null + : Mutation$RemoveSshKey$removeSshKey$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$RemoveSshKey$removeSshKeyToJson( + Mutation$RemoveSshKey$removeSshKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$RemoveSshKey$removeSshKey$user + _$Mutation$RemoveSshKey$removeSshKey$userFromJson( + Map json) => + Mutation$RemoveSshKey$removeSshKey$user( + sshKeys: (json['sshKeys'] as List) + .map((e) => e as String) + .toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveSshKey$removeSshKey$userToJson( + Mutation$RemoveSshKey$removeSshKey$user instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; + +Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( + Map json) => + Variables$Mutation$DeleteUser( + username: json['username'] as String, + ); + +Map _$Variables$Mutation$DeleteUserToJson( + Variables$Mutation$DeleteUser instance) => + { + 'username': instance.username, + }; + +Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => + Mutation$DeleteUser( + deleteUser: Mutation$DeleteUser$deleteUser.fromJson( + json['deleteUser'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DeleteUserToJson( + Mutation$DeleteUser instance) => + { + 'deleteUser': instance.deleteUser.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson( + Map json) => + Mutation$DeleteUser$deleteUser( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DeleteUser$deleteUserToJson( + Mutation$DeleteUser$deleteUser instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson( + Map json) => + Variables$Mutation$UpdateUser( + user: Input$UserMutationInput.fromJson( + json['user'] as Map), + ); + +Map _$Variables$Mutation$UpdateUserToJson( + Variables$Mutation$UpdateUser instance) => + { + 'user': instance.user.toJson(), + }; + +Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => + Mutation$UpdateUser( + updateUser: Mutation$UpdateUser$updateUser.fromJson( + json['updateUser'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UpdateUserToJson( + Mutation$UpdateUser instance) => + { + 'updateUser': instance.updateUser.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson( + Map json) => + Mutation$UpdateUser$updateUser( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + user: json['user'] == null + ? null + : Mutation$UpdateUser$updateUser$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$UpdateUser$updateUserToJson( + Mutation$UpdateUser$updateUser instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$UpdateUser$updateUser$user + _$Mutation$UpdateUser$updateUser$userFromJson(Map json) => + Mutation$UpdateUser$updateUser$user( + sshKeys: (json['sshKeys'] as List) + .map((e) => e as String) + .toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UpdateUser$updateUser$userToJson( + Mutation$UpdateUser$updateUser$user instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index b16d46d3..17c1cbb2 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -105,8 +105,8 @@ class ServerApi extends ApiMap { try { response = await client.get('/services/status'); res = response.statusCode == HttpStatus.ok; - } on DioError catch (e) { - print(e.message); + } catch (e) { + print(e); } finally { close(client); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index c28bfa5f..088f82d5 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -81,11 +81,11 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final Response dbGetResponse; final Dio client = await getClient(); try { - dbGetResponse = await client.post('/pricing'); + dbGetResponse = await client.get('/pricing'); final volume = dbGetResponse.data['pricing']['volume']; final volumePrice = volume['price_per_gb_month']['gross']; - price = volumePrice as double; + price = double.parse(volumePrice); } catch (e) { print(e); } finally { diff --git a/lib/logic/cubit/jobs/jobs_cubit.dart b/lib/logic/cubit/jobs/jobs_cubit.dart index 8485621f..486770c0 100644 --- a/lib/logic/cubit/jobs/jobs_cubit.dart +++ b/lib/logic/cubit/jobs/jobs_cubit.dart @@ -1,11 +1,14 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; export 'package:provider/provider.dart'; @@ -15,20 +18,21 @@ class JobsCubit extends Cubit { JobsCubit({ required this.usersCubit, required this.servicesCubit, - }) : super(JobsStateEmpty()); + }) : super(const JobsStateEmpty([])); final ServerApi api = ServerApi(); final UsersCubit usersCubit; final ServicesCubit servicesCubit; - void addJob(final Job job) { - final List newJobsList = []; + void addJob(final ClientJob job) { + final List newJobsList = []; if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).jobList); + final JobsStateWithJobs jobsState = state as JobsStateWithJobs; + newJobsList.addAll(jobsState.clientJobList); } newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList)); + emit(JobsStateWithJobs(newJobsList, state.serverJobList)); } void removeJob(final String id) { @@ -37,51 +41,51 @@ class JobsCubit extends Cubit { } void createOrRemoveServiceToggleJob(final ToggleJob job) { - final List newJobsList = []; + final List newJobsList = []; if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).jobList); + newJobsList.addAll((state as JobsStateWithJobs).clientJobList); } final bool needToRemoveJob = newJobsList .any((final el) => el is ServiceToggleJob && el.type == job.type); if (needToRemoveJob) { - final Job removingJob = newJobsList.firstWhere( + final ClientJob removingJob = newJobsList.firstWhere( (final el) => el is ServiceToggleJob && el.type == job.type, ); removeJob(removingJob.id); } else { newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList)); + emit(JobsStateWithJobs(newJobsList, state.serverJobList)); } } void createShhJobIfNotExist(final CreateSSHKeyJob job) { - final List newJobsList = []; + final List newJobsList = []; if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).jobList); + newJobsList.addAll((state as JobsStateWithJobs).clientJobList); } final bool isExistInJobList = newJobsList.any((final el) => el is CreateSSHKeyJob); if (!isExistInJobList) { newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList)); + emit(JobsStateWithJobs(newJobsList, state.serverJobList)); } } Future rebootServer() async { - emit(JobsStateLoading()); + emit(JobsStateLoading(state.serverJobList)); final bool isSuccessful = await api.reboot(); if (isSuccessful) { getIt().showSnackBar('jobs.rebootSuccess'.tr()); } else { getIt().showSnackBar('jobs.rebootFailed'.tr()); } - emit(JobsStateEmpty()); + emit(JobsStateEmpty(state.serverJobList)); } Future upgradeServer() async { - emit(JobsStateLoading()); + emit(JobsStateLoading(state.serverJobList)); final bool isPullSuccessful = await api.pullConfigurationUpdate(); final bool isSuccessful = await api.upgrade(); if (isSuccessful) { @@ -93,15 +97,15 @@ class JobsCubit extends Cubit { } else { getIt().showSnackBar('jobs.upgradeFailed'.tr()); } - emit(JobsStateEmpty()); + emit(JobsStateEmpty(state.serverJobList)); } Future applyAll() async { if (state is JobsStateWithJobs) { - final List jobs = (state as JobsStateWithJobs).jobList; - emit(JobsStateLoading()); + final List jobs = (state as JobsStateWithJobs).clientJobList; + emit(JobsStateLoading(state.serverJobList)); bool hasServiceJobs = false; - for (final Job job in jobs) { + for (final ClientJob job in jobs) { if (job is CreateUserJob) { await usersCubit.createUser(job.user); } @@ -122,11 +126,45 @@ class JobsCubit extends Cubit { await api.pullConfigurationUpdate(); await api.apply(); + if (hasServiceJobs) { await servicesCubit.load(); } - emit(JobsStateEmpty()); + emit(JobsStateEmpty(state.serverJobList)); } } + + Future resetRequestsTimer() async { + const duration = Duration(seconds: 1); + Timer.periodic( + duration, + (final timer) async { + if (timer.tick >= 10) { + final List serverJobs = await api.getServerJobs(); + final List newServerJobs = []; + for (final ServerJob job in serverJobs) { + if (job.status == 'FINISHED') { + await api.removeApiJob(job.uid); + } else { + newServerJobs.add(job); + } + } + + if (state is JobsStateWithJobs) { + emit( + JobsStateWithJobs( + (state as JobsStateWithJobs).clientJobList, + newServerJobs, + ), + ); + } else { + emit( + JobsStateEmpty(newServerJobs), + ); + } + } + }, + ); + } } diff --git a/lib/logic/cubit/jobs/jobs_state.dart b/lib/logic/cubit/jobs/jobs_state.dart index dbcf968e..3737cb5d 100644 --- a/lib/logic/cubit/jobs/jobs_state.dart +++ b/lib/logic/cubit/jobs/jobs_state.dart @@ -1,28 +1,34 @@ part of 'jobs_cubit.dart'; abstract class JobsState extends Equatable { + const JobsState(this.serverJobList); + final List serverJobList; @override - List get props => []; + List get props => [serverJobList]; } -class JobsStateLoading extends JobsState {} +class JobsStateLoading extends JobsState { + const JobsStateLoading(super.serverJobList); +} -class JobsStateEmpty extends JobsState {} +class JobsStateEmpty extends JobsState { + const JobsStateEmpty(super.serverJobList); +} class JobsStateWithJobs extends JobsState { - JobsStateWithJobs(this.jobList); - final List jobList; + const JobsStateWithJobs(this.clientJobList, super.serverJobList); + final List clientJobList; JobsState removeById(final String id) { - final List newJobsList = - jobList.where((final element) => element.id != id).toList(); + final List newJobsList = + clientJobList.where((final element) => element.id != id).toList(); if (newJobsList.isEmpty) { - return JobsStateEmpty(); + return JobsStateEmpty(serverJobList); } - return JobsStateWithJobs(newJobsList); + return JobsStateWithJobs(newJobsList, serverJobList); } @override - List get props => jobList; + List get props => [...super.props, clientJobList]; } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index e19b61ff..cbf9ec61 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -292,6 +292,43 @@ class ServerInstallationRepository { ], ), ); + } else if (e.response!.data['error']['code'] == 'resource_unavailable') { + final NavigationService nav = getIt.get(); + nav.showPopUpDialog( + BrandAlert( + title: 'modals.1_1'.tr(), + contentText: 'modals.2_2'.tr(), + actions: [ + ActionButton( + text: 'modals.7'.tr(), + isRed: true, + onPressed: () async { + ServerHostingDetails? serverDetails; + try { + serverDetails = await api.createServer( + dnsApiToken: cloudFlareKey, + rootUser: rootUser, + domainName: domainName, + ); + } catch (e) { + print(e); + } + + if (serverDetails == null) { + print('Server is not initialized!'); + return; + } + await saveServerDetails(serverDetails); + onSuccess(serverDetails); + }, + ), + ActionButton( + text: 'basis.cancel'.tr(), + onPressed: onCancel, + ), + ], + ), + ); } } } diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart index c4f74df5..c6c522a9 100644 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -12,12 +12,16 @@ part 'volumes_state.dart'; class ApiVolumesCubit extends ServerInstallationDependendCubit { ApiVolumesCubit(final ServerInstallationCubit serverInstallationCubit) - : super(serverInstallationCubit, const ApiVolumesState.initial()); + : super(serverInstallationCubit, const ApiVolumesState.initial()) { + final serverDetails = getIt().serverDetails; + providerApi = serverDetails == null + ? null + : VolumeApiFactoryCreator.createVolumeProviderApiFactory( + getIt().serverDetails!.provider, + ); + } - final VolumeProviderApiFactory providerApi = - VolumeApiFactoryCreator.createVolumeProviderApiFactory( - getIt().serverDetails!.provider, - ); + VolumeProviderApiFactory? providerApi; @override Future load() async { @@ -26,8 +30,16 @@ class ApiVolumesCubit } } + Future> getVolumes() async { + if (providerApi == null) { + return []; + } + + return providerApi!.getVolumeProvider().getVolumes(); + } + Future getPricePerGb() async => - providerApi.getVolumeProvider().getPricePerGb(); + providerApi!.getVolumeProvider().getPricePerGb(); Future refresh() async { emit(const ApiVolumesState([], LoadingStatus.refreshing)); @@ -35,8 +47,7 @@ class ApiVolumesCubit } Future _refetch() async { - final List volumes = - await providerApi.getVolumeProvider().getVolumes(); + final List volumes = await getVolumes(); if (volumes.isNotEmpty) { emit(ApiVolumesState(volumes, LoadingStatus.success)); } else { @@ -46,12 +57,12 @@ class ApiVolumesCubit Future attachVolume(final ServerVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; - await providerApi.getVolumeProvider().attachVolume(volume.id, server.id); + await providerApi!.getVolumeProvider().attachVolume(volume.id, server.id); refresh(); } Future detachVolume(final ServerVolume volume) async { - await providerApi.getVolumeProvider().detachVolume(volume.id); + await providerApi!.getVolumeProvider().detachVolume(volume.id); refresh(); } @@ -60,7 +71,7 @@ class ApiVolumesCubit final int newSizeGb, ) async { final ServerVolume? providerVolume = await fetchProdiverVolume(volume); - final bool resized = await providerApi.getVolumeProvider().resizeVolume( + final bool resized = await providerApi!.getVolumeProvider().resizeVolume( providerVolume!.id, newSizeGb, ); @@ -76,7 +87,7 @@ class ApiVolumesCubit Future createVolume() async { final ServerVolume? volume = - await providerApi.getVolumeProvider().createVolume(); + await providerApi!.getVolumeProvider().createVolume(); await attachVolume(volume!); await Future.delayed(const Duration(seconds: 10)); @@ -88,7 +99,7 @@ class ApiVolumesCubit Future deleteVolume(final ServerDiskVolume volume) async { final ServerVolume? providerVolume = await fetchProdiverVolume(volume); - await providerApi.getVolumeProvider().deleteVolume(providerVolume!.id); + await providerApi!.getVolumeProvider().deleteVolume(providerVolume!.id); refresh(); } @@ -102,7 +113,7 @@ class ApiVolumesCubit ) async { ServerVolume? fetchedVolume; final List volumes = - await providerApi.getVolumeProvider().getVolumes(); + await providerApi!.getVolumeProvider().getVolumes(); for (final ServerVolume providerVolume in volumes) { if (providerVolume.linuxDevice == null) { diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart new file mode 100644 index 00000000..a8d7a28d --- /dev/null +++ b/lib/logic/models/disk_size.dart @@ -0,0 +1,9 @@ +class DiskSize { + DiskSize({final this.byte = 0}); + + double asKb() => byte / 1000.0; + double asMb() => byte / 1000000.0; + double asGb() => byte / 1000000000.0; + + int byte; +} diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index b04d7d05..9e694597 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -7,8 +7,8 @@ import 'package:selfprivacy/utils/password_generator.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @immutable -class Job extends Equatable { - Job({ +class ClientJob extends Equatable { + ClientJob({ required this.title, final String? id, }) : id = id ?? StringGenerators.simpleId(); @@ -20,7 +20,7 @@ class Job extends Equatable { List get props => [id, title]; } -class CreateUserJob extends Job { +class CreateUserJob extends ClientJob { CreateUserJob({ required this.user, }) : super(title: '${"jobs.createUser".tr()} ${user.login}'); @@ -31,7 +31,7 @@ class CreateUserJob extends Job { List get props => [id, title, user]; } -class DeleteUserJob extends Job { +class DeleteUserJob extends ClientJob { DeleteUserJob({ required this.user, }) : super(title: '${"jobs.deleteUser".tr()} ${user.login}'); @@ -42,7 +42,7 @@ class DeleteUserJob extends Job { List get props => [id, title, user]; } -class ToggleJob extends Job { +class ToggleJob extends ClientJob { ToggleJob({ required this.type, required final super.title, @@ -66,7 +66,7 @@ class ServiceToggleJob extends ToggleJob { final bool needToTurnOn; } -class CreateSSHKeyJob extends Job { +class CreateSSHKeyJob extends ClientJob { CreateSSHKeyJob({ required this.user, required this.publicKey, @@ -79,7 +79,7 @@ class CreateSSHKeyJob extends Job { List get props => [id, title, user, publicKey]; } -class DeleteSSHKeyJob extends Job { +class DeleteSSHKeyJob extends ClientJob { DeleteSSHKeyJob({ required this.user, required this.publicKey, diff --git a/lib/logic/models/json/backup.g.dart b/lib/logic/models/json/backup.g.dart index dea4847d..eff513f0 100644 --- a/lib/logic/models/json/backup.g.dart +++ b/lib/logic/models/json/backup.g.dart @@ -24,7 +24,7 @@ BackupStatus _$BackupStatusFromJson(Map json) => BackupStatus( Map _$BackupStatusToJson(BackupStatus instance) => { - 'status': _$BackupStatusEnumEnumMap[instance.status]!, + 'status': _$BackupStatusEnumEnumMap[instance.status], 'progress': instance.progress, 'error_message': instance.errorMessage, }; diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart index 6c178ea4..7d6ecd29 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -23,7 +23,7 @@ Map _$HetznerServerInfoToJson(HetznerServerInfo instance) => { 'id': instance.id, 'name': instance.name, - 'status': _$ServerStatusEnumMap[instance.status]!, + 'status': _$ServerStatusEnumMap[instance.status], 'created': instance.created.toIso8601String(), 'volumes': instance.volumes, 'server_type': instance.serverType, diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart new file mode 100644 index 00000000..0a6454c1 --- /dev/null +++ b/lib/logic/models/json/server_job.dart @@ -0,0 +1,39 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'server_job.g.dart'; + +@JsonSerializable() +class ServerJob { + factory ServerJob.fromJson(final Map json) => + _$ServerJobFromJson(json); + ServerJob({ + required this.name, + required this.description, + required this.status, + required this.uid, + required this.updatedAt, + required this.createdAt, + final this.error, + final this.progress, + final this.result, + final this.statusText, + final this.finishedAt, + }); + + final String name; + final String description; + final String status; + final String uid; + @JsonKey(name: 'updated_at') + final String updatedAt; + @JsonKey(name: 'created_at') + final DateTime createdAt; + + final String? error; + final int? progress; + final String? result; + @JsonKey(name: 'status_text') + final String? statusText; + @JsonKey(name: 'finished_at') + final String? finishedAt; +} diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart new file mode 100644 index 00000000..2af5358a --- /dev/null +++ b/lib/logic/models/json/server_job.g.dart @@ -0,0 +1,35 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'server_job.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ServerJob _$ServerJobFromJson(Map json) => ServerJob( + name: json['name'] as String, + description: json['description'] as String, + status: json['status'] as String, + uid: json['uid'] as String, + updatedAt: json['updated_at'] as String, + createdAt: DateTime.parse(json['created_at'] as String), + error: json['error'] as String?, + progress: json['progress'] as int?, + result: json['result'] as String?, + statusText: json['status_text'] as String?, + finishedAt: json['finished_at'] as String?, + ); + +Map _$ServerJobToJson(ServerJob instance) => { + 'name': instance.name, + 'description': instance.description, + 'status': instance.status, + 'uid': instance.uid, + 'updated_at': instance.updatedAt, + 'created_at': instance.createdAt.toIso8601String(), + 'error': instance.error, + 'progress': instance.progress, + 'result': instance.result, + 'status_text': instance.statusText, + 'finished_at': instance.finishedAt, + }; diff --git a/lib/ui/components/brand_button/outlined_button.dart b/lib/ui/components/brand_button/outlined_button.dart new file mode 100644 index 00000000..6284943a --- /dev/null +++ b/lib/ui/components/brand_button/outlined_button.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +class BrandOutlinedButton extends StatelessWidget { + const BrandOutlinedButton({ + final super.key, + this.onPressed, + this.title, + this.child, + this.disabled = false, + }); + + final VoidCallback? onPressed; + final String? title; + final Widget? child; + final bool disabled; + + @override + Widget build(final BuildContext context) => ConstrainedBox( + constraints: const BoxConstraints( + minHeight: 40, + minWidth: double.infinity, + ), + child: OutlinedButton( + onPressed: onPressed, + child: child ?? + Text( + title ?? '', + style: Theme.of(context).textTheme.button?.copyWith( + color: Theme.of(context).colorScheme.primary, + ), + ), + ), + ); +} diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index bd8166de..b4cf3a89 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -67,7 +67,7 @@ class JobsContent extends StatelessWidget { ]; } else if (state is JobsStateWithJobs) { widgets = [ - ...state.jobList + ...state.clientJobList .map( (final j) => Row( children: [ diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index 4de729f7..36c6d029 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -83,10 +83,14 @@ class _ProgressBarState extends State { height: 5, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), - gradient: const LinearGradient( + color: Theme.of(context).colorScheme.surfaceVariant, + gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - colors: BrandColors.stableGradientColors, + colors: [ + Theme.of(context).colorScheme.primary, + Theme.of(context).colorScheme.secondary + ], ), ), duration: const Duration( @@ -122,15 +126,7 @@ class _ProgressBarState extends State { text: TextSpan( style: progressTextStyleLight, children: [ - if (checked) - const WidgetSpan( - child: Padding( - padding: EdgeInsets.only(bottom: 2, right: 2), - child: Icon(BrandIcons.check, size: 11), - ), - ) - else - TextSpan(text: '${index + 1}.', style: style), + TextSpan(text: '${index + 1}.', style: style), TextSpan(text: step, style: style) ], ), diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index fa231c45..4e99fab5 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -5,6 +5,9 @@ import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/provider.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; @@ -18,6 +21,7 @@ import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; import 'package:selfprivacy/ui/pages/providers/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -73,15 +77,21 @@ class _ProvidersPageState extends State { Padding( padding: const EdgeInsets.only(bottom: 30), child: FutureBuilder( - future: - context.read().getServerDiskVolumes(), + future: Future.wait([ + context.read().getServerDiskVolumes(), + context.read().getVolumes(), + ]), builder: ( final BuildContext context, - final AsyncSnapshot snapshot, + final AsyncSnapshot> snapshot, ) => StorageCard( - volumes: - snapshot.hasData ? snapshot.data as List : [], + diskStatus: snapshot.hasData + ? toDiskStatus( + snapshot.data![0] as List, + snapshot.data![1] as List, + ) + : DiskStatus(), ), ), ), @@ -105,6 +115,60 @@ class _ProvidersPageState extends State { ), ); } + + DiskStatus toDiskStatus( + final List serverVolumes, + final List providerVolumes, + ) { + final DiskStatus diskStatus = DiskStatus(); + diskStatus.isDiskOkay = true; + + if (providerVolumes.isEmpty || serverVolumes.isEmpty) { + diskStatus.isDiskOkay = false; + } + + diskStatus.diskVolumes = serverVolumes.map(( + final ServerDiskVolume volume, + ) { + final DiskVolume diskVolume = DiskVolume(); + diskVolume.sizeUsed = DiskSize( + byte: volume.usedSpace == 'None' ? 0 : int.parse(volume.usedSpace), + ); + diskVolume.sizeTotal = DiskSize( + byte: volume.totalSpace == 'None' ? 0 : int.parse(volume.totalSpace), + ); + diskVolume.serverDiskVolume = volume; + + for (final ServerVolume providerVolume in providerVolumes) { + if (providerVolume.linuxDevice == null || + volume.model == null || + volume.serial == null) { + continue; + } + + final String deviceId = providerVolume.linuxDevice!.split('/').last; + if (deviceId.contains(volume.model!) && + deviceId.contains(volume.serial!)) { + diskVolume.providerVolume = providerVolume; + break; + } + } + + diskVolume.name = volume.name; + diskVolume.root = volume.root; + diskVolume.percentage = + volume.usedSpace != 'None' && volume.totalSpace != 'None' + ? 1.0 / diskVolume.sizeTotal.byte * diskVolume.sizeUsed.byte + : 0.0; + if (diskVolume.percentage >= 0.8 || + diskVolume.sizeTotal.asGb() - diskVolume.sizeUsed.asGb() <= 2.0) { + diskStatus.isDiskOkay = false; + } + return diskVolume; + }).toList(); + + return diskStatus; + } } class _Card extends StatelessWidget { @@ -137,8 +201,9 @@ class _Card extends StatelessWidget { break; case ProviderType.domain: title = 'providers.domain.screen_title'.tr(); - message = - appConfig.isDomainFilled ? appConfig.serverDomain!.domainName : ''; + message = appConfig.isDomainSelected + ? appConfig.serverDomain!.domainName + : ''; stableText = 'providers.domain.status'.tr(); onTap = () => Navigator.of(context).push( @@ -168,12 +233,17 @@ class _Card extends StatelessWidget { status: provider.state, child: Icon(provider.icon, size: 30, color: Colors.white), ), - const SizedBox(height: 10), - BrandText.h2(title), - const SizedBox(height: 10), + const SizedBox(height: 16), + Text( + title, + style: Theme.of(context).textTheme.titleLarge, + ), if (message != null) ...[ - BrandText.body2(message), - const SizedBox(height: 10), + Text( + message, + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), ], if (provider.state == StateType.stable) BrandText.body2(stableText), ], diff --git a/lib/ui/pages/providers/storage_card.dart b/lib/ui/pages/providers/storage_card.dart index 74e0770f..f2facd21 100644 --- a/lib/ui/pages/providers/storage_card.dart +++ b/lib/ui/pages/providers/storage_card.dart @@ -1,67 +1,47 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class StorageCard extends StatelessWidget { - const StorageCard({required this.volumes, final super.key}); + const StorageCard({ + required final this.diskStatus, + final super.key, + }); - final List volumes; + final DiskStatus diskStatus; @override Widget build(final BuildContext context) { - final DiskStatus diskStatus = toDiskStatus(volumes); - final List sections = []; for (final DiskVolume volume in diskStatus.diskVolumes) { sections.add( const SizedBox(height: 16), ); sections.add( - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.gbUsed.toString(), - ], - ), - style: Theme.of(context).textTheme.titleMedium, - ), - ); - sections.add( - const SizedBox(height: 4), - ); - sections.add( - BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, - ), - ); - sections.add( - const SizedBox(height: 4), - ); - sections.add( - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.gbTotal.toString(), - volume.name, - ], - ), - style: Theme.of(context).textTheme.bodySmall, + ServerStorageListItem( + volume: volume, + dense: true, + showIcon: false, ), ); } + StateType state = context.watch().state + is ServerInstallationFinished + ? StateType.stable + : StateType.uninitialized; + + if (state == StateType.stable && !diskStatus.isDiskOkay) { + state = StateType.error; + } + return GestureDetector( onTap: () => Navigator.of(context).push( materialRoute( @@ -77,24 +57,25 @@ class StorageCard extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - const IconStatusMask( - status: StateType.stable, - child: Icon( + IconStatusMask( + status: state, + child: const Icon( Icons.storage_outlined, size: 30, color: Colors.white, ), ), - IconStatusMask( - status: StateType.stable, - child: Icon( - diskStatus.isDiskOkay - ? Icons.check_circle_outline - : Icons.error_outline, - size: 24, - color: Colors.white, + if (state != StateType.uninitialized) + IconStatusMask( + status: state, + child: Icon( + diskStatus.isDiskOkay + ? Icons.check_circle_outline + : Icons.error_outline, + size: 24, + color: Colors.white, + ), ), - ), ], ), const SizedBox(height: 16), @@ -102,12 +83,13 @@ class StorageCard extends StatelessWidget { 'providers.storage.card_title'.tr(), style: Theme.of(context).textTheme.titleLarge, ), - Text( - diskStatus.isDiskOkay - ? 'providers.storage.status_ok'.tr() - : 'providers.storage.status_error'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), + if (state != StateType.uninitialized) + Text( + diskStatus.isDiskOkay + ? 'providers.storage.status_ok'.tr() + : 'providers.storage.status_error'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), ...sections, const SizedBox(height: 8), ], @@ -115,34 +97,4 @@ class StorageCard extends StatelessWidget { ), ); } - - DiskStatus toDiskStatus(final List status) { - final DiskStatus diskStatus = DiskStatus(); - diskStatus.isDiskOkay = true; - - diskStatus.diskVolumes = status.map(( - final ServerDiskVolume volume, - ) { - final DiskVolume diskVolume = DiskVolume(); - diskVolume.gbUsed = volume.usedSpace == 'None' - ? 0 - : int.parse(volume.usedSpace) ~/ 1000000000; - diskVolume.gbTotal = volume.totalSpace == 'None' - ? 0 - : int.parse(volume.totalSpace) ~/ 1000000000; - diskVolume.name = volume.name; - diskVolume.root = volume.root; - diskVolume.percentage = - volume.usedSpace != 'None' && volume.totalSpace != 'None' - ? 1.0 / int.parse(volume.totalSpace) * int.parse(volume.usedSpace) - : 0.0; - if (diskVolume.percentage >= 0.8 || - diskVolume.gbTotal - diskVolume.gbUsed <= 2) { - diskStatus.isDiskOkay = false; - } - return diskVolume; - }).toList(); - - return diskStatus; - } } diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index 8523ce1d..b8fc158f 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -1,134 +1,46 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; -import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; -class ServerStoragePage extends StatefulWidget { - const ServerStoragePage({required this.diskStatus, final super.key}); +class DataMigrationPage extends StatefulWidget { + const DataMigrationPage({ + required this.diskVolumeToResize, + required this.diskStatus, + required this.resizeTarget, + final super.key, + }); + final DiskVolume diskVolumeToResize; final DiskStatus diskStatus; + final DiskSize resizeTarget; @override - State createState() => _ServerStoragePageState(); + State createState() => _DataMigrationPageState(); } -class _ServerStoragePageState extends State { - List _expandedSections = []; - +class _DataMigrationPageState extends State { @override Widget build(final BuildContext context) { - final bool isReady = context.watch().state - is ServerInstallationFinished; - - if (!isReady) { - return BrandHeroScreen( - hasBackButton: true, - heroTitle: 'providers.storage.card_title'.tr(), - children: const [], - ); - } - - /// The first section is expanded, the rest are hidden by default. - /// ( true, false, false, etc... ) - _expandedSections = [ - true, - ...List.filled( - widget.diskStatus.diskVolumes.length - 1, - false, - ), - ]; - - int sectionId = 0; - final List sections = []; - for (final DiskVolume volume in widget.diskStatus.diskVolumes) { - sections.add( - const SizedBox(height: 16), - ); - sections.add( - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Icon( - Icons.storage_outlined, - size: 24, - color: Colors.white, - ), - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.gbUsed.toString(), - ], - ), - style: Theme.of(context).textTheme.titleMedium, - ), - Expanded( - child: BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: - Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, - ), - ), - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.gbTotal.toString(), - volume.name, - ], - ), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - ), - ], - ), - ), - ); - sections.add( - AnimatedCrossFade( - duration: const Duration(milliseconds: 200), - crossFadeState: _expandedSections[sectionId] - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - firstChild: FilledButton( - title: 'providers.extend_volume_button.title'.tr(), - onPressed: () => Navigator.of(context).push( - materialRoute( - ExtendingVolumePage( - diskVolume: volume, - ), - ), - ), - ), - secondChild: Container(), - ), - ); - - ++sectionId; - } - + int a = 0; return BrandHeroScreen( hasBackButton: true, - heroTitle: 'providers.storage.card_title'.tr(), + heroTitle: 'providers.storage.data_migration_title'.tr(), children: [ - ...sections, - const SizedBox(height: 8), + ...widget.diskStatus.diskVolumes + .map( + (final volume) => Column( + children: [ + ServerStorageListItem( + volume: volume, + ), + const SizedBox(height: 16), + ], + ), + ) + .toList(), ], ); } diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index ec2d2872..2c00097b 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -1,8 +1,15 @@ +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; + class DiskVolume { - int gbUsed = 0; - int gbTotal = 0; + DiskSize sizeUsed = DiskSize(); + DiskSize sizeTotal = DiskSize(); String name = ''; bool root = false; + bool isResizable = true; + ServerDiskVolume? serverDiskVolume; + ServerVolume? providerVolume; /// from 0.0 to 1.0 double percentage = 0.0; diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 43ad38c2..e232bac4 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -1,55 +1,40 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; class ExtendingVolumePage extends StatefulWidget { - const ExtendingVolumePage({required this.diskVolume, final super.key}); + const ExtendingVolumePage({ + required this.diskVolumeToResize, + required this.diskStatus, + final super.key, + }); - final DiskVolume diskVolume; + final DiskVolume diskVolumeToResize; + final DiskStatus diskStatus; @override State createState() => _ExtendingVolumePageState(); } class _ExtendingVolumePageState extends State { - bool _isSizeError = false; - bool _isPriceError = false; + bool _isError = false; - double _currentSliderGbValue = 20.0; + double _currentSliderGbValue = -1; double _euroPerGb = 1.0; - final double maxGb = 500.0; - double minGb = 0.0; + final DiskSize maxSize = DiskSize(byte: 500000000000); + DiskSize minSize = DiskSize(); final TextEditingController _sizeController = TextEditingController(); - late final TextEditingController _priceController; - - void _updateByPrice() { - final double price = double.parse(_priceController.text); - _currentSliderGbValue = price / _euroPerGb; - _sizeController.text = _currentSliderGbValue.round.toString(); - - /// Now we need to convert size back to price to round - /// it properly and display it in text field as well, - /// because size in GB can ONLY(!) be discrete. - _updateBySize(); - } - - void _updateBySize() { - final double size = double.parse(_sizeController.text); - _priceController.text = (size * _euroPerGb).toString(); - _updateErrorStatuses(); - } + final TextEditingController _priceController = TextEditingController(); void _updateErrorStatuses() { - final bool error = minGb > _currentSliderGbValue; - _isSizeError = error; - _isPriceError = error; + _isError = minSize.asGb() > _currentSliderGbValue; } @override @@ -59,15 +44,26 @@ class _ExtendingVolumePageState extends State { final BuildContext context, final AsyncSnapshot snapshot, ) { + if (!snapshot.hasData) { + return BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.extending_volume_title'.tr(), + heroSubtitle: + 'providers.storage.extending_volume_description'.tr(), + children: const [ + SizedBox(height: 16), + ], + ); + } _euroPerGb = snapshot.data as double; - _sizeController.text = _currentSliderGbValue.toString(); + _sizeController.text = _currentSliderGbValue.truncate().toString(); _priceController.text = - (_euroPerGb * double.parse(_sizeController.text)).toString(); - _sizeController.addListener(_updateBySize); - _priceController.addListener(_updateByPrice); - minGb = widget.diskVolume.gbTotal + 1 < maxGb - ? widget.diskVolume.gbTotal + 1 - : maxGb; + (_euroPerGb * double.parse(_sizeController.text)) + .toStringAsPrecision(2); + minSize = widget.diskVolumeToResize.sizeTotal; + if (_currentSliderGbValue < 0) { + _currentSliderGbValue = minSize.asGb(); + } return BrandHeroScreen( hasBackButton: true, @@ -76,47 +72,48 @@ class _ExtendingVolumePageState extends State { children: [ const SizedBox(height: 16), Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - TextField( - textInputAction: TextInputAction.next, - enabled: true, - controller: _sizeController, - decoration: InputDecoration( - border: const OutlineInputBorder(), - errorText: _isSizeError ? ' ' : null, - labelText: 'providers.storage.size'.tr(), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: TextField( + readOnly: true, + textAlign: TextAlign.start, + textInputAction: TextInputAction.next, + enabled: true, + controller: _sizeController, + decoration: InputDecoration( + border: const OutlineInputBorder(), + errorText: _isError ? ' ' : null, + labelText: 'providers.storage.size'.tr(), + ), ), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], // Only numbers can be entered ), - const SizedBox(height: 16), - TextField( - textInputAction: TextInputAction.next, - enabled: true, - controller: _priceController, - decoration: InputDecoration( - border: const OutlineInputBorder(), - errorText: _isPriceError ? ' ' : null, - labelText: 'providers.storage.euro'.tr(), + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: TextField( + readOnly: true, + textAlign: TextAlign.start, + textInputAction: TextInputAction.next, + enabled: true, + controller: _priceController, + decoration: InputDecoration( + border: const OutlineInputBorder(), + errorText: _isError ? ' ' : null, + labelText: 'providers.storage.euro'.tr(), + ), ), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], // Only numbers can be entered ), ], ), const SizedBox(height: 16), Slider( - min: minGb, - value: widget.diskVolume.gbTotal + 5 < maxGb - ? widget.diskVolume.gbTotal + 5 - : maxGb, - max: maxGb, - divisions: 1, - label: _currentSliderGbValue.round().toString(), + min: minSize.asGb(), + value: _currentSliderGbValue, + max: maxSize.asGb(), onChanged: (final double value) { setState(() { _currentSliderGbValue = value; @@ -126,15 +123,22 @@ class _ExtendingVolumePageState extends State { ), const SizedBox(height: 16), FilledButton( - title: 'providers.extend_volume_button.title'.tr(), + title: 'providers.storage.extend_volume_button.title'.tr(), onPressed: null, + disabled: _isError, ), const SizedBox(height: 16), const Divider( height: 1.0, ), const SizedBox(height: 16), - const Icon(Icons.info_outlined, size: 24), + const Align( + alignment: Alignment.centerLeft, + child: Icon( + Icons.info_outlined, + size: 24, + ), + ), const SizedBox(height: 16), Text('providers.storage.extending_volume_price_info'.tr()), const SizedBox(height: 16), diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 8523ce1d..766440be 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -1,11 +1,11 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ServerStoragePage extends StatefulWidget { @@ -18,8 +18,6 @@ class ServerStoragePage extends StatefulWidget { } class _ServerStoragePageState extends State { - List _expandedSections = []; - @override Widget build(final BuildContext context) { final bool isReady = context.watch().state @@ -33,103 +31,62 @@ class _ServerStoragePageState extends State { ); } - /// The first section is expanded, the rest are hidden by default. - /// ( true, false, false, etc... ) - _expandedSections = [ - true, - ...List.filled( - widget.diskStatus.diskVolumes.length - 1, - false, - ), - ]; - - int sectionId = 0; - final List sections = []; - for (final DiskVolume volume in widget.diskStatus.diskVolumes) { - sections.add( - const SizedBox(height: 16), - ); - sections.add( - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Icon( - Icons.storage_outlined, - size: 24, - color: Colors.white, - ), - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.gbUsed.toString(), - ], - ), - style: Theme.of(context).textTheme.titleMedium, - ), - Expanded( - child: BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: - Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, - ), - ), - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.gbTotal.toString(), - volume.name, - ], - ), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - ), - ], - ), - ), - ); - sections.add( - AnimatedCrossFade( - duration: const Duration(milliseconds: 200), - crossFadeState: _expandedSections[sectionId] - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - firstChild: FilledButton( - title: 'providers.extend_volume_button.title'.tr(), - onPressed: () => Navigator.of(context).push( - materialRoute( - ExtendingVolumePage( - diskVolume: volume, - ), - ), - ), - ), - secondChild: Container(), - ), - ); - - ++sectionId; - } - return BrandHeroScreen( hasBackButton: true, heroTitle: 'providers.storage.card_title'.tr(), children: [ - ...sections, + // ...sections, + ...widget.diskStatus.diskVolumes + .map( + (final volume) => Column( + children: [ + ServerStorageSection( + volume: volume, + diskStatus: widget.diskStatus, + ), + const SizedBox(height: 16), + const Divider(), + const SizedBox(height: 16), + ], + ), + ) + .toList(), const SizedBox(height: 8), ], ); } } + +class ServerStorageSection extends StatelessWidget { + const ServerStorageSection({ + required this.volume, + required this.diskStatus, + final super.key, + }); + + final DiskVolume volume; + final DiskStatus diskStatus; + + @override + Widget build(final BuildContext context) => Column( + children: [ + ServerStorageListItem( + volume: volume, + ), + if (volume.isResizable) ...[ + const SizedBox(height: 16), + BrandOutlinedButton( + title: 'providers.storage.extend_volume_button.title'.tr(), + onPressed: () => Navigator.of(context).push( + materialRoute( + ExtendingVolumePage( + diskVolumeToResize: volume, + diskStatus: diskStatus, + ), + ), + ), + ), + ], + ], + ); +} diff --git a/lib/ui/pages/server_storage/server_storage_list_item.dart b/lib/ui/pages/server_storage/server_storage_list_item.dart new file mode 100644 index 00000000..b6db282d --- /dev/null +++ b/lib/ui/pages/server_storage/server_storage_list_item.dart @@ -0,0 +1,74 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; + +class ServerStorageListItem extends StatelessWidget { + const ServerStorageListItem({ + required this.volume, + final this.showIcon = true, + final this.dense = false, + final super.key, + }); + + final DiskVolume volume; + final bool showIcon; + final bool dense; + + @override + Widget build(final BuildContext context) { + final TextStyle? titleStyle = dense + ? Theme.of(context).textTheme.titleMedium + : Theme.of(context).textTheme.titleLarge; + + final TextStyle? subtitleStyle = dense + ? Theme.of(context).textTheme.bodySmall + : Theme.of(context).textTheme.bodyMedium; + + return Row( + children: [ + if (showIcon) + const Icon( + Icons.storage_outlined, + size: 24, + color: Colors.white, + ), + if (showIcon) const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'providers.storage.disk_usage'.tr( + args: [ + volume.sizeUsed.asGb().toStringAsPrecision(3), + ], + ), + style: titleStyle, + ), + const SizedBox(height: 4), + BrandLinearIndicator( + value: volume.percentage, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 14.0, + ), + const SizedBox(height: 4), + Text( + 'providers.storage.disk_total'.tr( + args: [ + volume.sizeTotal.asGb().toStringAsPrecision(3), + volume.name, + ], + ), + style: subtitleStyle, + ), + ], + ), + ), + ], + ); + } +} diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart new file mode 100644 index 00000000..19a22c2c --- /dev/null +++ b/lib/ui/pages/services/service_page.dart @@ -0,0 +1,87 @@ +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; + +class ServicePage extends StatefulWidget { + const ServicePage({final super.key}); + + @override + State createState() => _ServicePageState(); +} + +class _ServicePageState extends State { + @override + Widget build(final BuildContext context) { + int a; + return BrandHeroScreen( + hasBackButton: true, + children: [ + const SizedBox(height: 16), + Container( + alignment: Alignment.center, + child: const Icon( + Icons.question_mark_outlined, + size: 48, + ), + ), + const SizedBox(height: 16), + Text( + 'My Incredible Service', + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + const SizedBox(height: 16), + BrandCards.outlined( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 24), + child: const Icon( + Icons.check_box_outlined, + size: 24, + ), + ), + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: const Text(''), + ), + ], + ), + ), + const SizedBox(height: 16), + const Divider(), + const SizedBox(height: 16), + ElevatedButton( + onPressed: null, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 24), + child: const Icon( + Icons.language_outlined, + size: 24, + ), + ), + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: const Text('Your Cool Domain'), + ), + ], + ), + ), + const SizedBox(height: 16), + ], + ); + } +} diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 0b8ea12d..0a2b7db4 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -106,7 +106,7 @@ class _Card extends StatelessWidget { final switchableService = switchableServices.contains(serviceType); final hasSwitchJob = switchableService && jobState is JobsStateWithJobs && - jobState.jobList.any( + jobState.clientJobList.any( (final el) => el is ServiceToggleJob && el.type == serviceType, ); @@ -150,7 +150,7 @@ class _Card extends StatelessWidget { builder: (final context) { late bool isActive; if (hasSwitchJob) { - isActive = (jobState.jobList.firstWhere( + isActive = (jobState.clientJobList.firstWhere( (final el) => el is ServiceToggleJob && el.type == serviceType, ) as ServiceToggleJob) diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 2cde89ce..ab6e456e 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -72,7 +72,7 @@ class InitializingPage extends StatelessWidget { 'Domain', 'User', 'Server', - '✅ Check', + 'Check', ], activeIndex: cubit.state.porgressBar, ), diff --git a/lib/ui/pages/ssh_keys/new_ssh_key.dart b/lib/ui/pages/ssh_keys/new_ssh_key.dart index 247590b7..fc558be2 100644 --- a/lib/ui/pages/ssh_keys/new_ssh_key.dart +++ b/lib/ui/pages/ssh_keys/new_ssh_key.dart @@ -11,7 +11,7 @@ class _NewSshKey extends StatelessWidget { final jobCubit = context.read(); final jobState = jobCubit.state; if (jobState is JobsStateWithJobs) { - final jobs = jobState.jobList; + final jobs = jobState.clientJobList; for (final job in jobs) { if (job is CreateSSHKeyJob && job.user.login == user.login) { user.sshKeys.add(job.publicKey); diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 72cb6387..38ec74b7 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -18,7 +18,7 @@ class NewUser extends StatelessWidget { final users = []; users.addAll(context.read().state.users); if (jobState is JobsStateWithJobs) { - final jobs = jobState.jobList; + final jobs = jobState.clientJobList; for (final job in jobs) { if (job is CreateUserJob) { users.add(job.user); From 37d5ee991304c3aa52e554a59c9eebab249da89a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 25 Aug 2022 02:45:02 +0300 Subject: [PATCH 021/732] Implement ServerJob cubit --- lib/config/bloc_config.dart | 4 +- .../provider_volume_cubit.dart | 108 ++++++++++++ .../provider_volume_state.dart | 24 +++ .../server_installation_cubit.dart | 3 - .../server_volumes/server_volume_cubit.dart | 36 ++++ .../server_volumes/server_volume_state.dart | 24 +++ lib/logic/cubit/volumes/volumes_cubit.dart | 160 ------------------ lib/logic/cubit/volumes/volumes_state.dart | 23 --- lib/ui/pages/providers/providers.dart | 23 +-- .../server_storage/extending_volume.dart | 4 +- ...service_storage_consumption_list_item.dart | 56 ++++++ 11 files changed, 258 insertions(+), 207 deletions(-) create mode 100644 lib/logic/cubit/provider_volumes/provider_volume_cubit.dart create mode 100644 lib/logic/cubit/provider_volumes/provider_volume_state.dart create mode 100644 lib/logic/cubit/server_volumes/server_volume_cubit.dart create mode 100644 lib/logic/cubit/server_volumes/server_volume_state.dart delete mode 100644 lib/logic/cubit/volumes/volumes_cubit.dart delete mode 100644 lib/logic/cubit/volumes/volumes_state.dart create mode 100644 lib/ui/pages/server_storage/service_storage_consumption_list_item.dart diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index 94508aa4..29b65450 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; -import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; class BlocAndProviderConfig extends StatelessWidget { const BlocAndProviderConfig({final super.key, this.child}); @@ -27,7 +27,7 @@ class BlocAndProviderConfig extends StatelessWidget { final dnsRecordsCubit = DnsRecordsCubit(serverInstallationCubit); final recoveryKeyCubit = RecoveryKeyCubit(serverInstallationCubit); final apiDevicesCubit = ApiDevicesCubit(serverInstallationCubit); - final apiVolumesCubit = ApiVolumesCubit(serverInstallationCubit); + final apiVolumesCubit = ApiProviderVolumeCubit(serverInstallationCubit); return MultiProvider( providers: [ BlocProvider( diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart new file mode 100644 index 00000000..12e1a034 --- /dev/null +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -0,0 +1,108 @@ +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; +import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; + +part 'provider_volume_state.dart'; + +class ApiProviderVolumeCubit + extends ServerInstallationDependendCubit { + ApiProviderVolumeCubit(final ServerInstallationCubit serverInstallationCubit) + : super(serverInstallationCubit, const ApiProviderVolumeState.initial()) { + final serverDetails = getIt().serverDetails; + providerApi = serverDetails == null + ? null + : VolumeApiFactoryCreator.createVolumeProviderApiFactory( + getIt().serverDetails!.provider, + ); + } + + VolumeProviderApiFactory? providerApi; + + @override + Future load() async { + if (serverInstallationCubit.state is ServerInstallationFinished) { + _refetch(); + } + } + + Future getPricePerGb() async => + providerApi!.getVolumeProvider().getPricePerGb(); + + Future refresh() async { + emit(const ApiProviderVolumeState([], LoadingStatus.refreshing)); + _refetch(); + } + + Future _refetch() async { + if (providerApi == null) { + return emit(const ApiProviderVolumeState([], LoadingStatus.error)); + } + + final List volumes = + await providerApi!.getVolumeProvider().getVolumes(); + + if (volumes.isEmpty) { + return emit(const ApiProviderVolumeState([], LoadingStatus.error)); + } + + emit(ApiProviderVolumeState(volumes, LoadingStatus.success)); + } + + Future attachVolume(final ServerVolume volume) async { + final ServerHostingDetails server = getIt().serverDetails!; + await providerApi!.getVolumeProvider().attachVolume(volume.id, server.id); + refresh(); + } + + Future detachVolume(final ServerVolume volume) async { + await providerApi!.getVolumeProvider().detachVolume(volume.id); + refresh(); + } + + Future resizeVolume( + final DiskVolume volume, + final int newSizeGb, + ) async { + final bool resized = await providerApi!.getVolumeProvider().resizeVolume( + volume.providerVolume!.id, + newSizeGb, + ); + + if (!resized) { + return false; + } + + await ServerApi().resizeVolume(volume.name); + refresh(); + return true; + } + + Future createVolume() async { + final ServerVolume? volume = + await providerApi!.getVolumeProvider().createVolume(); + await attachVolume(volume!); + + await Future.delayed(const Duration(seconds: 10)); + + await ServerApi().mountVolume(volume.name); + refresh(); + } + + Future deleteVolume(final DiskVolume volume) async { + await providerApi! + .getVolumeProvider() + .deleteVolume(volume.providerVolume!.id); + refresh(); + } + + @override + void clear() { + emit(const ApiProviderVolumeState.initial()); + } +} diff --git a/lib/logic/cubit/provider_volumes/provider_volume_state.dart b/lib/logic/cubit/provider_volumes/provider_volume_state.dart new file mode 100644 index 00000000..16a3f177 --- /dev/null +++ b/lib/logic/cubit/provider_volumes/provider_volume_state.dart @@ -0,0 +1,24 @@ +part of 'provider_volume_cubit.dart'; + +class ApiProviderVolumeState extends ServerInstallationDependendState { + const ApiProviderVolumeState(this._volumes, this.status); + + const ApiProviderVolumeState.initial() + : this(const [], LoadingStatus.uninitialized); + final List _volumes; + final LoadingStatus status; + + List get volumes => _volumes; + + ApiProviderVolumeState copyWith({ + final List? volumes, + final LoadingStatus? status, + }) => + ApiProviderVolumeState( + volumes ?? _volumes, + status ?? this.status, + ); + + @override + List get props => [_volumes]; +} diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index a1b15e32..571eb8ac 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -554,9 +554,6 @@ class ServerInstallationCubit extends Cubit { ); } - Future> getServerDiskVolumes() async => - ServerApi().getServerDiskVolumes(); - Future setAndValidateCloudflareToken(final String token) async { final ServerInstallationRecovery dataState = state as ServerInstallationRecovery; diff --git a/lib/logic/cubit/server_volumes/server_volume_cubit.dart b/lib/logic/cubit/server_volumes/server_volume_cubit.dart new file mode 100644 index 00000000..fbd49a99 --- /dev/null +++ b/lib/logic/cubit/server_volumes/server_volume_cubit.dart @@ -0,0 +1,36 @@ +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; +import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; + +part 'server_volume_state.dart'; + +class ApiServerVolumeCubit + extends ServerInstallationDependendCubit { + ApiServerVolumeCubit(final ServerInstallationCubit serverInstallationCubit) + : super(serverInstallationCubit, const ApiServerVolumeState.initial()); + + final ServerApi serverApi = ServerApi(); + + @override + Future load() async { + if (serverInstallationCubit.state is ServerInstallationFinished) { + _refetch(); + } + } + + Future _refetch() async { + final List volumes = + await serverApi.getServerDiskVolumes(); + if (volumes.isNotEmpty) { + emit(ApiServerVolumeState(volumes, LoadingStatus.success)); + } else { + emit(const ApiServerVolumeState([], LoadingStatus.error)); + } + } + + @override + void clear() { + emit(const ApiServerVolumeState.initial()); + } +} diff --git a/lib/logic/cubit/server_volumes/server_volume_state.dart b/lib/logic/cubit/server_volumes/server_volume_state.dart new file mode 100644 index 00000000..3c267710 --- /dev/null +++ b/lib/logic/cubit/server_volumes/server_volume_state.dart @@ -0,0 +1,24 @@ +part of 'server_volume_cubit.dart'; + +class ApiServerVolumeState extends ServerInstallationDependendState { + const ApiServerVolumeState(this._volumes, this.status); + + const ApiServerVolumeState.initial() + : this(const [], LoadingStatus.uninitialized); + final List _volumes; + final LoadingStatus status; + + List get volumes => _volumes; + + ApiServerVolumeState copyWith({ + final List? volumes, + final LoadingStatus? status, + }) => + ApiServerVolumeState( + volumes ?? _volumes, + status ?? this.status, + ); + + @override + List get props => [_volumes]; +} diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart deleted file mode 100644 index c6c522a9..00000000 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ /dev/null @@ -1,160 +0,0 @@ -import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; - -part 'volumes_state.dart'; - -class ApiVolumesCubit - extends ServerInstallationDependendCubit { - ApiVolumesCubit(final ServerInstallationCubit serverInstallationCubit) - : super(serverInstallationCubit, const ApiVolumesState.initial()) { - final serverDetails = getIt().serverDetails; - providerApi = serverDetails == null - ? null - : VolumeApiFactoryCreator.createVolumeProviderApiFactory( - getIt().serverDetails!.provider, - ); - } - - VolumeProviderApiFactory? providerApi; - - @override - Future load() async { - if (serverInstallationCubit.state is ServerInstallationFinished) { - _refetch(); - } - } - - Future> getVolumes() async { - if (providerApi == null) { - return []; - } - - return providerApi!.getVolumeProvider().getVolumes(); - } - - Future getPricePerGb() async => - providerApi!.getVolumeProvider().getPricePerGb(); - - Future refresh() async { - emit(const ApiVolumesState([], LoadingStatus.refreshing)); - _refetch(); - } - - Future _refetch() async { - final List volumes = await getVolumes(); - if (volumes.isNotEmpty) { - emit(ApiVolumesState(volumes, LoadingStatus.success)); - } else { - emit(const ApiVolumesState([], LoadingStatus.error)); - } - } - - Future attachVolume(final ServerVolume volume) async { - final ServerHostingDetails server = getIt().serverDetails!; - await providerApi!.getVolumeProvider().attachVolume(volume.id, server.id); - refresh(); - } - - Future detachVolume(final ServerVolume volume) async { - await providerApi!.getVolumeProvider().detachVolume(volume.id); - refresh(); - } - - Future resizeVolume( - final ServerDiskVolume volume, - final int newSizeGb, - ) async { - final ServerVolume? providerVolume = await fetchProdiverVolume(volume); - final bool resized = await providerApi!.getVolumeProvider().resizeVolume( - providerVolume!.id, - newSizeGb, - ); - - if (!resized) { - return false; - } - - await ServerApi().resizeVolume(volume.name); - refresh(); - return true; - } - - Future createVolume() async { - final ServerVolume? volume = - await providerApi!.getVolumeProvider().createVolume(); - await attachVolume(volume!); - - await Future.delayed(const Duration(seconds: 10)); - - final ServerDiskVolume? diskVolume = await fetchServerDiskVolume(volume); - await ServerApi().mountVolume(diskVolume!.name); - refresh(); - } - - Future deleteVolume(final ServerDiskVolume volume) async { - final ServerVolume? providerVolume = await fetchProdiverVolume(volume); - await providerApi!.getVolumeProvider().deleteVolume(providerVolume!.id); - refresh(); - } - - @override - void clear() { - emit(const ApiVolumesState.initial()); - } - - Future fetchProdiverVolume( - final ServerDiskVolume volume, - ) async { - ServerVolume? fetchedVolume; - final List volumes = - await providerApi!.getVolumeProvider().getVolumes(); - - for (final ServerVolume providerVolume in volumes) { - if (providerVolume.linuxDevice == null) { - continue; - } - - final String deviceId = providerVolume.linuxDevice!.split('/').last; - if (deviceId.contains(volume.model!) && - deviceId.contains(volume.serial!)) { - fetchedVolume = providerVolume; - break; - } - } - - return fetchedVolume; - } - - Future fetchServerDiskVolume( - final ServerVolume volume, - ) async { - ServerDiskVolume? fetchedVolume; - if (volume.linuxDevice == null) { - return fetchedVolume; - } - - final List volumes = - await ServerApi().getServerDiskVolumes(); - - for (final ServerDiskVolume serverDiskVolumes in volumes) { - if (serverDiskVolumes.model == null || serverDiskVolumes.serial == null) { - continue; - } - - final String deviceId = volume.linuxDevice!.split('/').last; - if (deviceId.contains(serverDiskVolumes.model!) && - deviceId.contains(serverDiskVolumes.serial!)) { - fetchedVolume = serverDiskVolumes; - break; - } - } - - return fetchedVolume; - } -} diff --git a/lib/logic/cubit/volumes/volumes_state.dart b/lib/logic/cubit/volumes/volumes_state.dart deleted file mode 100644 index cdc14272..00000000 --- a/lib/logic/cubit/volumes/volumes_state.dart +++ /dev/null @@ -1,23 +0,0 @@ -part of 'volumes_cubit.dart'; - -class ApiVolumesState extends ServerInstallationDependendState { - const ApiVolumesState(this._volumes, this.status); - - const ApiVolumesState.initial() : this(const [], LoadingStatus.uninitialized); - final List _volumes; - final LoadingStatus status; - - List get volumes => _volumes; - - ApiVolumesState copyWith({ - final List? volumes, - final LoadingStatus? status, - }) => - ApiVolumesState( - volumes ?? _volumes, - status ?? this.status, - ); - - @override - List get props => [_volumes]; -} diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 4e99fab5..2696bf85 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -5,7 +5,8 @@ import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; @@ -76,22 +77,10 @@ class _ProvidersPageState extends State { cards.add( Padding( padding: const EdgeInsets.only(bottom: 30), - child: FutureBuilder( - future: Future.wait([ - context.read().getServerDiskVolumes(), - context.read().getVolumes(), - ]), - builder: ( - final BuildContext context, - final AsyncSnapshot> snapshot, - ) => - StorageCard( - diskStatus: snapshot.hasData - ? toDiskStatus( - snapshot.data![0] as List, - snapshot.data![1] as List, - ) - : DiskStatus(), + child: StorageCard( + diskStatus: toDiskStatus( + context.read().state.volumes, + context.read().state.volumes, ), ), ), diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index e232bac4..651de4d0 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; -import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; @@ -39,7 +39,7 @@ class _ExtendingVolumePageState extends State { @override Widget build(final BuildContext context) => FutureBuilder( - future: context.read().getPricePerGb(), + future: context.read().getPricePerGb(), builder: ( final BuildContext context, final AsyncSnapshot snapshot, diff --git a/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart b/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart new file mode 100644 index 00000000..9396c1fc --- /dev/null +++ b/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart @@ -0,0 +1,56 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; + +class ServiceStorageConsumptionListItem extends StatelessWidget { + const ServiceStorageConsumptionListItem({ + required this.title, + required this.percentage, + required this.storageConsumptionText, + required this.color, + required this.icon, + final super.key, + }); + + final String title; + final double percentage; + final String storageConsumptionText; + final Color color; + final IconData icon; + @override + Widget build(final BuildContext context) => Row( + children: [ + Icon( + icon, + ), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + style: Theme.of(context).textTheme.titleMedium, + ), + Text( + storageConsumptionText, + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 4), + BrandLinearIndicator( + value: percentage, + color: color, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 7.0, + ), + ], + ), + ), + ], + ); +} From 6014e385bc8c0f56018a768312afb069bfba6ca6 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 26 Aug 2022 05:34:25 +0300 Subject: [PATCH 022/732] Implement ServerJobCard --- .../provider_volume_cubit.dart | 20 +++++---- .../components/jobs_content/jobs_content.dart | 11 ++++- .../jobs_content/server_job_card.dart | 42 +++++++++++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 lib/ui/components/jobs_content/server_job_card.dart diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 12e1a034..be0a0d82 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -5,7 +5,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_pro import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; part 'provider_volume_state.dart'; @@ -54,14 +53,18 @@ class ApiProviderVolumeCubit emit(ApiProviderVolumeState(volumes, LoadingStatus.success)); } - Future attachVolume(final ServerVolume volume) async { + Future attachVolume(final DiskVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; - await providerApi!.getVolumeProvider().attachVolume(volume.id, server.id); + await providerApi! + .getVolumeProvider() + .attachVolume(volume.providerVolume!.id, server.id); refresh(); } - Future detachVolume(final ServerVolume volume) async { - await providerApi!.getVolumeProvider().detachVolume(volume.id); + Future detachVolume(final DiskVolume volume) async { + await providerApi! + .getVolumeProvider() + .detachVolume(volume.providerVolume!.id); refresh(); } @@ -86,11 +89,14 @@ class ApiProviderVolumeCubit Future createVolume() async { final ServerVolume? volume = await providerApi!.getVolumeProvider().createVolume(); - await attachVolume(volume!); + + final diskVolume = DiskVolume(); + diskVolume.providerVolume = volume; + await attachVolume(diskVolume); await Future.delayed(const Duration(seconds: 10)); - await ServerApi().mountVolume(volume.name); + await ServerApi().mountVolume(volume!.name); refresh(); } diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index b4cf3a89..3948f7c4 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; +import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; class JobsContent extends StatelessWidget { const JobsContent({final super.key}); @@ -117,7 +118,15 @@ class JobsContent extends StatelessWidget { ), ), const SizedBox(height: 20), - ...widgets + ...widgets, + const SizedBox(height: 8), + const Divider(), + const SizedBox(height: 8), + ...state.serverJobList.map( + (final job) => ServerJobCard( + serverJob: job, + ), + ), ], ); }, diff --git a/lib/ui/components/jobs_content/server_job_card.dart b/lib/ui/components/jobs_content/server_job_card.dart new file mode 100644 index 00000000..6f8c50fa --- /dev/null +++ b/lib/ui/components/jobs_content/server_job_card.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; +import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; + +class ServerJobCard extends StatelessWidget { + const ServerJobCard({ + required final this.serverJob, + final super.key, + }); + + final ServerJob serverJob; + + @override + Widget build(final BuildContext context) => GestureDetector( + child: BrandCards.big( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + serverJob.name, + style: Theme.of(context).textTheme.bodyMedium, + ), + Text( + serverJob.description, + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 8), + BrandLinearIndicator( + value: serverJob.progress == null + ? 0.0 + : serverJob.progress! / 100.0, + color: Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 7.0, + ), + const SizedBox(height: 8), + ], + ), + ), + ); +} From a698d3e7b2c6d77407d7feaf0af9bbfc216d657e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 26 Aug 2022 06:41:16 +0300 Subject: [PATCH 023/732] Add padding to About page --- lib/ui/pages/more/about/about.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ui/pages/more/about/about.dart b/lib/ui/pages/more/about/about.dart index 3d642adc..15a7db13 100644 --- a/lib/ui/pages/more/about/about.dart +++ b/lib/ui/pages/more/about/about.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; @@ -16,8 +17,13 @@ class AboutPage extends StatelessWidget { hasBackButton: true, ), ), - body: const BrandMarkdown( - fileName: 'about', + body: ListView( + padding: paddingH15V0, + children: const [ + BrandMarkdown( + fileName: 'about', + ), + ], ), ), ); From 952603517658ef275498f00da737f7bd5e181880 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 26 Aug 2022 19:46:30 +0300 Subject: [PATCH 024/732] Fix volume size calculation --- lib/config/bloc_config.dart | 16 +++++++++++++--- lib/logic/models/disk_size.dart | 6 +++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index 29b65450..0b4fe048 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -8,6 +8,7 @@ import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; @@ -28,6 +29,8 @@ class BlocAndProviderConfig extends StatelessWidget { final recoveryKeyCubit = RecoveryKeyCubit(serverInstallationCubit); final apiDevicesCubit = ApiDevicesCubit(serverInstallationCubit); final apiVolumesCubit = ApiProviderVolumeCubit(serverInstallationCubit); + final apiServerVolumesCubit = ApiServerVolumeCubit(serverInstallationCubit); + return MultiProvider( providers: [ BlocProvider( @@ -40,7 +43,9 @@ class BlocAndProviderConfig extends StatelessWidget { create: (final _) => serverInstallationCubit, lazy: false, ), - BlocProvider(create: (final _) => ProvidersCubit()), + BlocProvider( + create: (final _) => ProvidersCubit(), + ), BlocProvider( create: (final _) => usersCubit..load(), lazy: false, @@ -66,8 +71,13 @@ class BlocAndProviderConfig extends StatelessWidget { create: (final _) => apiVolumesCubit..load(), ), BlocProvider( - create: (final _) => - JobsCubit(usersCubit: usersCubit, servicesCubit: servicesCubit), + create: (final _) => apiServerVolumesCubit..load(), + ), + BlocProvider( + create: (final _) => JobsCubit( + usersCubit: usersCubit, + servicesCubit: servicesCubit, + ), ), ], child: child, diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index a8d7a28d..d71b7479 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -1,9 +1,9 @@ class DiskSize { DiskSize({final this.byte = 0}); - double asKb() => byte / 1000.0; - double asMb() => byte / 1000000.0; - double asGb() => byte / 1000000000.0; + double asKb() => byte / 1024.0; + double asMb() => byte / 1024.0 / 1024.0; + double asGb() => byte / 1024.0 / 1024.0 / 1024.0; int byte; } From d934a6a9cbcc94492f113965b056a37ffb480332 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 26 Aug 2022 22:28:01 +0300 Subject: [PATCH 025/732] Refactor graphql api, separate by logic --- assets/translations/en.json | 1 + .../api_maps/graphql_maps/schema/server.dart | 235 ------------------ .../graphql_maps/server_api/jobs_api.dart | 34 +++ .../graphql_maps/server_api/server.dart | 88 +++++++ .../server_api/server_actions_api.dart | 70 ++++++ .../graphql_maps/server_api/services_api.dart | 3 + .../graphql_maps/server_api/volume_api.dart | 59 +++++ lib/logic/cubit/jobs/jobs_cubit.dart | 2 +- .../provider_volume_cubit.dart | 2 +- .../server_installation_cubit.dart | 2 +- .../server_volumes/server_volume_cubit.dart | 2 +- lib/logic/models/disk_size.dart | 17 +- lib/logic/models/json/server_job.dart | 4 - lib/ui/pages/more/info/info.dart | 2 +- 14 files changed, 276 insertions(+), 245 deletions(-) delete mode 100644 lib/logic/api_maps/graphql_maps/schema/server.dart create mode 100644 lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart create mode 100644 lib/logic/api_maps/graphql_maps/server_api/server.dart create mode 100644 lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart create mode 100644 lib/logic/api_maps/graphql_maps/server_api/services_api.dart create mode 100644 lib/logic/api_maps/graphql_maps/server_api/volume_api.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 52409913..840ffed0 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -172,6 +172,7 @@ "disk_total": "{} GB total · {}", "gb": "{} GB", "mb": "{} MB", + "kb": "{} KB", "extend_volume_button": "Extend volume", "extending_volume_title": "Extending volume", "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", diff --git a/lib/logic/api_maps/graphql_maps/schema/server.dart b/lib/logic/api_maps/graphql_maps/schema/server.dart deleted file mode 100644 index 794cff51..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/server.dart +++ /dev/null @@ -1,235 +0,0 @@ -import 'package:graphql/client.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/json/api_token.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; -import 'package:selfprivacy/logic/models/json/server_job.dart'; - -class ServerApi extends ApiMap { - ServerApi({ - this.hasLogger = false, - this.isWithToken = true, - this.customToken = '', - }) { - final ServerDomain? serverDomain = getIt().serverDomain; - rootAddress = serverDomain?.domainName ?? ''; - } - @override - bool hasLogger; - @override - bool isWithToken; - @override - String customToken; - @override - String? rootAddress; - - Future _commonBoolRequest(final Function graphQLMethod) async { - QueryResult response; - bool result = false; - - try { - response = await graphQLMethod(); - if (response.hasException) { - print(response.exception.toString()); - result = false; - } else { - result = true; - } - } catch (e) { - print(e); - } - - return result; - } - - Future getApiVersion() async { - QueryResult response; - String? apiVersion; - - try { - final GraphQLClient client = await getClient(); - response = await client.query$GetApiVersion(); - if (response.hasException) { - print(response.exception.toString()); - } - apiVersion = response.data!['api']['version']; - } catch (e) { - print(e); - } - return apiVersion; - } - - Future> getApiTokens() async { - QueryResult response; - List tokens = []; - - try { - final GraphQLClient client = await getClient(); - response = await client.query$GetApiTokens(); - if (response.hasException) { - print(response.exception.toString()); - } - tokens = response.data!['api']['devices'] - .map((final e) => ApiToken.fromJson(e)) - .toList(); - } catch (e) { - print(e); - } - - return tokens; - } - - Future> getServerDiskVolumes() async { - QueryResult response; - List volumes = []; - - try { - final GraphQLClient client = await getClient(); - response = await client.query$GetServerDiskVolumes(); - if (response.hasException) { - print(response.exception.toString()); - } - volumes = response.data!['storage']['volumes'] - .map((final e) => ServerDiskVolume.fromJson(e)) - .toList(); - } catch (e) { - print(e); - } - - return volumes; - } - - Future mountVolume(final String volumeName) async { - try { - final GraphQLClient client = await getClient(); - final variables = Variables$Mutation$MountVolume(name: volumeName); - final mountVolumeMutation = - Options$Mutation$MountVolume(variables: variables); - await client.mutate$MountVolume(mountVolumeMutation); - } catch (e) { - print(e); - } - } - - Future unmountVolume(final String volumeName) async { - try { - final GraphQLClient client = await getClient(); - final variables = Variables$Mutation$UnmountVolume(name: volumeName); - final unmountVolumeMutation = - Options$Mutation$UnmountVolume(variables: variables); - await client.mutate$UnmountVolume(unmountVolumeMutation); - } catch (e) { - print(e); - } - } - - Future resizeVolume(final String volumeName) async { - try { - final GraphQLClient client = await getClient(); - final variables = Variables$Mutation$ResizeVolume(name: volumeName); - final resizeVolumeMutation = - Options$Mutation$ResizeVolume(variables: variables); - await client.mutate$ResizeVolume(resizeVolumeMutation); - } catch (e) { - print(e); - } - } - - Future> getServerJobs() async { - QueryResult response; - List jobs = []; - - try { - final GraphQLClient client = await getClient(); - response = await client.query$GetApiJobs(); - if (response.hasException) { - print(response.exception.toString()); - } - jobs = response.data!['jobs'] - .map((final e) => ServerJob.fromJson(e)) - .toList(); - } catch (e) { - print(e); - } - - return jobs; - } - - Future removeApiJob(final String uid) async { - try { - final GraphQLClient client = await getClient(); - //await client.query$GetApiJobsQuery(); - } catch (e) { - print(e); - } - } - - Future reboot() async { - try { - final GraphQLClient client = await getClient(); - return await _commonBoolRequest( - () async { - await client.mutate$RebootSystem(); - }, - ); - } catch (e) { - return false; - } - } - - Future pullConfigurationUpdate() async { - try { - final GraphQLClient client = await getClient(); - return await _commonBoolRequest( - () async { - await client.mutate$PullRepositoryChanges(); - }, - ); - } catch (e) { - return false; - } - } - - Future upgrade() async { - try { - final GraphQLClient client = await getClient(); - return await _commonBoolRequest( - () async { - await client.mutate$RunSystemUpgrade(); - }, - ); - } catch (e) { - return false; - } - } - - Future switchService(final String uid, final bool needTurnOn) async { - try { - final GraphQLClient client = await getClient(); - if (needTurnOn) { - final variables = Variables$Mutation$EnableService(serviceId: uid); - final mutation = Options$Mutation$EnableService(variables: variables); - await client.mutate$EnableService(mutation); - } else { - final variables = Variables$Mutation$DisableService(serviceId: uid); - final mutation = Options$Mutation$DisableService(variables: variables); - await client.mutate$DisableService(mutation); - } - } catch (e) { - print(e); - } - } - - Future apply() async { - try { - final GraphQLClient client = await getClient(); - await client.mutate$RunSystemRebuild(); - } catch (e) { - print(e); - } - } -} diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart new file mode 100644 index 00000000..f6bf36f8 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -0,0 +1,34 @@ +part of 'server.dart'; + +mixin JobsApi on ApiMap { + Future> getServerJobs() async { + QueryResult response; + List jobs = []; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetApiJobs(); + if (response.hasException) { + print(response.exception.toString()); + } + jobs = response.data!['jobs'] + .map((final e) => ServerJob.fromJson(e)) + .toList(); + } catch (e) { + print(e); + } + + return jobs; + } + + Future removeApiJob(final String uid) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$RemoveJob(jobId: uid); + final mutation = Options$Mutation$RemoveJob(variables: variables); + await client.mutate$RemoveJob(mutation); + } catch (e) { + print(e); + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart new file mode 100644 index 00000000..c7ee23e9 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -0,0 +1,88 @@ +import 'package:graphql/client.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/api_token.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; + +part 'volume_api.dart'; +part 'jobs_api.dart'; +part 'server_actions_api.dart'; +part 'services_api.dart'; + +class ServerApi extends ApiMap with VolumeApi, JobsApi, ServerActionsApi { + ServerApi({ + this.hasLogger = false, + this.isWithToken = true, + this.customToken = '', + }) { + final ServerDomain? serverDomain = getIt().serverDomain; + rootAddress = serverDomain?.domainName ?? ''; + } + @override + bool hasLogger; + @override + bool isWithToken; + @override + String customToken; + @override + String? rootAddress; + + Future getApiVersion() async { + QueryResult response; + String? apiVersion; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetApiVersion(); + if (response.hasException) { + print(response.exception.toString()); + } + apiVersion = response.data!['api']['version']; + } catch (e) { + print(e); + } + return apiVersion; + } + + Future> getApiTokens() async { + QueryResult response; + List tokens = []; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetApiTokens(); + if (response.hasException) { + print(response.exception.toString()); + } + tokens = response.data!['api']['devices'] + .map((final e) => ApiToken.fromJson(e)) + .toList(); + } catch (e) { + print(e); + } + + return tokens; + } + + Future switchService(final String uid, final bool needTurnOn) async { + try { + final GraphQLClient client = await getClient(); + if (needTurnOn) { + final variables = Variables$Mutation$EnableService(serviceId: uid); + final mutation = Options$Mutation$EnableService(variables: variables); + await client.mutate$EnableService(mutation); + } else { + final variables = Variables$Mutation$DisableService(serviceId: uid); + final mutation = Options$Mutation$DisableService(variables: variables); + await client.mutate$DisableService(mutation); + } + } catch (e) { + print(e); + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart new file mode 100644 index 00000000..07ca101d --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart @@ -0,0 +1,70 @@ +part of 'server.dart'; + +mixin ServerActionsApi on ApiMap { + Future _commonBoolRequest(final Function graphQLMethod) async { + QueryResult response; + bool result = false; + + try { + response = await graphQLMethod(); + if (response.hasException) { + print(response.exception.toString()); + result = false; + } else { + result = true; + } + } catch (e) { + print(e); + } + + return result; + } + + Future reboot() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$RebootSystem(); + }, + ); + } catch (e) { + return false; + } + } + + Future pullConfigurationUpdate() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$PullRepositoryChanges(); + }, + ); + } catch (e) { + return false; + } + } + + Future upgrade() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$RunSystemUpgrade(); + }, + ); + } catch (e) { + return false; + } + } + + Future apply() async { + try { + final GraphQLClient client = await getClient(); + await client.mutate$RunSystemRebuild(); + } catch (e) { + print(e); + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart new file mode 100644 index 00000000..acbb8348 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart @@ -0,0 +1,3 @@ +part of 'server.dart'; + +mixin ServicesApi on ApiMap {} diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart new file mode 100644 index 00000000..ada66d58 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -0,0 +1,59 @@ +part of 'server.dart'; + +mixin VolumeApi on ApiMap { + Future> getServerDiskVolumes() async { + QueryResult response; + List volumes = []; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetServerDiskVolumes(); + if (response.hasException) { + print(response.exception.toString()); + } + volumes = response.data!['storage']['volumes'] + .map((final e) => ServerDiskVolume.fromJson(e)) + .toList(); + } catch (e) { + print(e); + } + + return volumes; + } + + Future mountVolume(final String volumeName) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$MountVolume(name: volumeName); + final mountVolumeMutation = + Options$Mutation$MountVolume(variables: variables); + await client.mutate$MountVolume(mountVolumeMutation); + } catch (e) { + print(e); + } + } + + Future unmountVolume(final String volumeName) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$UnmountVolume(name: volumeName); + final unmountVolumeMutation = + Options$Mutation$UnmountVolume(variables: variables); + await client.mutate$UnmountVolume(unmountVolumeMutation); + } catch (e) { + print(e); + } + } + + Future resizeVolume(final String volumeName) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$ResizeVolume(name: volumeName); + final resizeVolumeMutation = + Options$Mutation$ResizeVolume(variables: variables); + await client.mutate$ResizeVolume(resizeVolumeMutation); + } catch (e) { + print(e); + } + } +} diff --git a/lib/logic/cubit/jobs/jobs_cubit.dart b/lib/logic/cubit/jobs/jobs_cubit.dart index 486770c0..baac08dd 100644 --- a/lib/logic/cubit/jobs/jobs_cubit.dart +++ b/lib/logic/cubit/jobs/jobs_cubit.dart @@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index be0a0d82..c1cb391a 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 571eb8ac..aee5207f 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -4,7 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; diff --git a/lib/logic/cubit/server_volumes/server_volume_cubit.dart b/lib/logic/cubit/server_volumes/server_volume_cubit.dart index fbd49a99..13015d0b 100644 --- a/lib/logic/cubit/server_volumes/server_volume_cubit.dart +++ b/lib/logic/cubit/server_volumes/server_volume_cubit.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index d71b7479..ecccb2b8 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -1,9 +1,24 @@ +import 'package:easy_localization/easy_localization.dart'; + class DiskSize { DiskSize({final this.byte = 0}); + int byte; + double asKb() => byte / 1024.0; double asMb() => byte / 1024.0 / 1024.0; double asGb() => byte / 1024.0 / 1024.0 / 1024.0; - int byte; + @override + String toString() { + if (byte < 1024) { + return '${byte.toStringAsFixed(0)} ${tr('bytes')}'; + } else if (byte < 1024 * 1024) { + return 'providers.storage.kb'.tr(args: [asKb().toStringAsFixed(1)]); + } else if (byte < 1024 * 1024 * 1024) { + return 'providers.storage.mb'.tr(args: [asMb().toStringAsFixed(1)]); + } else { + return 'providers.storage.gb'.tr(args: [asGb().toStringAsFixed(1)]); + } + } } diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 0a6454c1..a54b7651 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -24,16 +24,12 @@ class ServerJob { final String description; final String status; final String uid; - @JsonKey(name: 'updated_at') final String updatedAt; - @JsonKey(name: 'created_at') final DateTime createdAt; final String? error; final int? progress; final String? result; - @JsonKey(name: 'status_text') final String? statusText; - @JsonKey(name: 'finished_at') final String? finishedAt; } diff --git a/lib/ui/pages/more/info/info.dart b/lib/ui/pages/more/info/info.dart index 0860ca80..ac0419fc 100644 --- a/lib/ui/pages/more/info/info.dart +++ b/lib/ui/pages/more/info/info.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; From c0ce0193608282ff801fdbffcee831d8e0e55e86 Mon Sep 17 00:00:00 2001 From: inexcode Date: Mon, 29 Aug 2022 04:40:35 +0400 Subject: [PATCH 026/732] Add Services type and GraphQL endpoints with parsers. --- .../graphql_maps/server_api/server.dart | 23 +++ .../graphql_maps/server_api/services_api.dart | 158 +++++++++++++++++- lib/logic/models/json/dns_records.dart | 11 ++ lib/logic/models/service.dart | 94 +++++++++++ 4 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 lib/logic/models/service.dart diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index c7ee23e9..04f1d855 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -1,6 +1,7 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; @@ -8,12 +9,34 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; +import 'package:selfprivacy/logic/models/service.dart'; part 'volume_api.dart'; part 'jobs_api.dart'; part 'server_actions_api.dart'; part 'services_api.dart'; +class GenericMutationResult { + GenericMutationResult({ + required this.success, + required this.code, + this.message, + }); + final bool success; + final int code; + final String? message; +} + +class GenericJobMutationReturn extends GenericMutationResult { + GenericJobMutationReturn({ + required final super.success, + required final super.code, + final super.message, + this.job, + }); + final ServerJob? job; +} + class ServerApi extends ApiMap with VolumeApi, JobsApi, ServerActionsApi { ServerApi({ this.hasLogger = false, diff --git a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart index acbb8348..62a55e15 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart @@ -1,3 +1,159 @@ part of 'server.dart'; -mixin ServicesApi on ApiMap {} +mixin ServicesApi on ApiMap { + Future> getAllServices() async { + QueryResult response; + List services = []; + try { + final GraphQLClient client = await getClient(); + response = await client.query$AllServices(); + if (response.hasException) { + print(response.exception.toString()); + } + services = response.parsedData?.services.allServices + .map((final service) => Service.fromGraphQL(service)) + .toList() ?? + []; + } catch (e) { + print(e); + } + return services; + } + + Future enableService(final String serviceId) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$EnableService(serviceId: serviceId); + final mutation = Options$Mutation$EnableService(variables: variables); + final response = await client.mutate$EnableService(mutation); + return GenericMutationResult( + success: response.parsedData?.enableService.success ?? false, + code: response.parsedData?.enableService.code ?? 0, + message: response.parsedData?.enableService.message, + ); + } catch (e) { + print(e); + return GenericMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future disableService(final String serviceId) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$DisableService(serviceId: serviceId); + final mutation = Options$Mutation$DisableService(variables: variables); + final response = await client.mutate$DisableService(mutation); + return GenericMutationResult( + success: response.parsedData?.disableService.success ?? false, + code: response.parsedData?.disableService.code ?? 0, + message: response.parsedData?.disableService.message, + ); + } catch (e) { + print(e); + return GenericMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future stopService(final String serviceId) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$StopService(serviceId: serviceId); + final mutation = Options$Mutation$StopService(variables: variables); + final response = await client.mutate$StopService(mutation); + return GenericMutationResult( + success: response.parsedData?.stopService.success ?? false, + code: response.parsedData?.stopService.code ?? 0, + message: response.parsedData?.stopService.message, + ); + } catch (e) { + print(e); + return GenericMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future startService(final String serviceId) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$StartService(serviceId: serviceId); + final mutation = Options$Mutation$StartService(variables: variables); + final response = await client.mutate$StartService(mutation); + return GenericMutationResult( + success: response.parsedData?.startService.success ?? false, + code: response.parsedData?.startService.code ?? 0, + message: response.parsedData?.startService.message, + ); + } catch (e) { + print(e); + return GenericMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future restartService(final String serviceId) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$RestartService(serviceId: serviceId); + final mutation = Options$Mutation$RestartService(variables: variables); + final response = await client.mutate$RestartService(mutation); + return GenericMutationResult( + success: response.parsedData?.restartService.success ?? false, + code: response.parsedData?.restartService.code ?? 0, + message: response.parsedData?.restartService.message, + ); + } catch (e) { + print(e); + return GenericMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future moveService( + final String serviceId, + final String destination, + ) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$MoveService( + input: Input$MoveServiceInput( + serviceId: serviceId, + location: destination, + ), + ); + final mutation = Options$Mutation$MoveService(variables: variables); + final response = await client.mutate$MoveService(mutation); + final jobJson = response.parsedData?.moveService.job?.toJson(); + return GenericJobMutationReturn( + success: response.parsedData?.moveService.success ?? false, + code: response.parsedData?.moveService.code ?? 0, + message: response.parsedData?.moveService.message, + job: jobJson != null ? ServerJob.fromJson(jobJson) : null, + ); + } catch (e) { + print(e); + return GenericJobMutationReturn( + success: false, + code: 0, + message: e.toString(), + job: null, + ); + } + } +} diff --git a/lib/logic/models/json/dns_records.dart b/lib/logic/models/json/dns_records.dart index cd4867c3..1bb385b5 100644 --- a/lib/logic/models/json/dns_records.dart +++ b/lib/logic/models/json/dns_records.dart @@ -1,4 +1,5 @@ import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; part 'dns_records.g.dart'; @@ -13,6 +14,16 @@ class DnsRecord { this.proxied = false, }); + DnsRecord.fromGraphQL( + final Query$AllServices$services$allServices$dnsRecords record, + ) : this( + type: record.recordType, + name: record.name, + content: record.content, + ttl: record.ttl, + priority: record.priority ?? 10, + ); + final String type; final String? name; final String? content; diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart new file mode 100644 index 00000000..c0f54224 --- /dev/null +++ b/lib/logic/models/service.dart @@ -0,0 +1,94 @@ +import 'dart:convert'; + +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; + +class Service { + Service({ + required this.id, + required this.displayName, + required this.description, + required this.isEnabled, + required this.isRequired, + required this.status, + required this.storageUsage, + required this.svgIcon, + required this.dnsRecords, + this.url, + }); + + Service.fromGraphQL(final Query$AllServices$services$allServices service) + : this( + id: service.id, + displayName: service.displayName, + description: service.description, + isEnabled: service.isEnabled, + isRequired: service.isRequired, + status: ServiceStatus.fromGraphQL(service.status), + storageUsage: ServiceStorageUsage( + used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), + volume: service.storageUsage.volume?.name, + ), + // Decode the base64 encoded svg icon to text. + svgIcon: utf8.decode(base64.decode(service.svgIcon)), + dnsRecords: service.dnsRecords + ?.map((final record) => DnsRecord.fromGraphQL(record)) + .toList() ?? + [], + url: service.url, + ); + + final String id; + final String displayName; + final String description; + final bool isEnabled; + final bool isRequired; + final ServiceStatus status; + final ServiceStorageUsage storageUsage; + final String svgIcon; + final String? url; + final List dnsRecords; +} + +class ServiceStorageUsage { + ServiceStorageUsage({ + required this.used, + required this.volume, + }); + + final DiskSize used; + final String? volume; +} + +enum ServiceStatus { + activating, + active, + deactivating, + failed, + inactive, + off, + reloading; + + factory ServiceStatus.fromGraphQL(final Enum$ServiceStatusEnum graphQL) { + switch (graphQL) { + case Enum$ServiceStatusEnum.ACTIVATING: + return activating; + case Enum$ServiceStatusEnum.ACTIVE: + return active; + case Enum$ServiceStatusEnum.DEACTIVATING: + return deactivating; + case Enum$ServiceStatusEnum.FAILED: + return failed; + case Enum$ServiceStatusEnum.INACTIVE: + return inactive; + case Enum$ServiceStatusEnum.OFF: + return off; + case Enum$ServiceStatusEnum.RELOADING: + return reloading; + case Enum$ServiceStatusEnum.$unknown: + return inactive; + } + } +} From 440151d0f53ec837cac82547071c4d45a89a365b Mon Sep 17 00:00:00 2001 From: inexcode Date: Mon, 29 Aug 2022 04:40:55 +0400 Subject: [PATCH 027/732] Add SVG library. --- pubspec.lock | 100 ++++++++---------- pubspec.yaml | 1 + .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 4 files changed, 48 insertions(+), 57 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index cb308ae6..8eae4c89 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -29,13 +29,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.3.1" - asn1lib: - dependency: transitive - description: - name: asn1lib - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" async: dependency: transitive description: @@ -84,7 +77,7 @@ packages: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_daemon: dependency: transitive description: @@ -105,7 +98,7 @@ packages: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.1.11" + version: "2.2.0" build_runner_core: dependency: transitive description: @@ -175,7 +168,7 @@ packages: name: connectivity_plus url: "https://pub.dartlang.org" source: hosted - version: "2.3.5" + version: "2.1.0" connectivity_plus_linux: dependency: transitive description: @@ -246,13 +239,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" dart_style: dependency: transitive description: @@ -266,49 +252,49 @@ packages: name: dbus url: "https://pub.dartlang.org" source: hosted - version: "0.7.3" + version: "0.7.8" device_info_plus: dependency: "direct main" description: name: device_info_plus url: "https://pub.dartlang.org" source: hosted - version: "3.2.3" + version: "4.1.2" device_info_plus_linux: dependency: transitive description: name: device_info_plus_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "3.0.0" device_info_plus_macos: dependency: transitive description: name: device_info_plus_macos url: "https://pub.dartlang.org" source: hosted - version: "2.2.3" + version: "3.0.0" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.3.0+1" + version: "3.0.0" device_info_plus_web: dependency: transitive description: name: device_info_plus_web url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "3.0.0" device_info_plus_windows: dependency: transitive description: name: device_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "4.0.0" dio: dependency: "direct main" description: @@ -322,7 +308,7 @@ packages: name: dynamic_color url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.4.0" easy_localization: dependency: "direct main" description: @@ -371,7 +357,7 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "2.0.1" file: dependency: transitive description: @@ -487,6 +473,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.2" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" flutter_test: dependency: "direct dev" description: flutter @@ -587,7 +580,7 @@ packages: name: graphql_codegen url: "https://pub.dartlang.org" source: hosted - version: "0.9.0" + version: "0.10.3" graphql_codegen_config: dependency: transitive description: @@ -622,7 +615,7 @@ packages: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.3" hive_flutter: dependency: "direct main" description: @@ -636,7 +629,7 @@ packages: name: hive_generator url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" http: dependency: transitive description: @@ -664,7 +657,7 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.1.3" + version: "3.2.0" intl: dependency: "direct main" description: @@ -699,14 +692,14 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.5.0" + version: "4.6.0" json_serializable: dependency: "direct dev" description: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "6.2.0" + version: "6.3.1" lints: dependency: transitive description: @@ -854,6 +847,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.1" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" path_provider: dependency: transitive description: @@ -881,7 +888,7 @@ packages: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.6" + version: "2.1.7" path_provider_macos: dependency: transitive description: @@ -902,7 +909,7 @@ packages: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.1.2" petitparser: dependency: transitive description: @@ -973,13 +980,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" recase: dependency: transitive description: @@ -1160,13 +1160,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" - ssh_key: - dependency: "direct main" - description: - name: ssh_key - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" stack_trace: dependency: transitive description: @@ -1251,13 +1244,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.0" - tuple: - dependency: transitive - description: - name: tuple - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" typed_data: dependency: transitive description: @@ -1404,7 +1390,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.7.0" xdg_directories: dependency: transitive description: @@ -1418,7 +1404,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.4.1" + version: "6.1.0" yaml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 114723f1..7ea16fb3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,6 +24,7 @@ dependencies: flutter_bloc: ^8.0.1 flutter_markdown: ^0.6.9 flutter_secure_storage: ^5.0.2 + flutter_svg: ^1.1.4 get_it: ^7.2.0 gql: ^0.13.1 graphql: ^5.1.1 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 070eb3b5..1feb1b08 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,6 +7,7 @@ #include "generated_plugin_registrant.h" #include +#include #include #include #include @@ -14,6 +15,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { ConnectivityPlusWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); + DynamicColorPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); FlutterSecureStorageWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); SystemThemePluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index a26e37b0..fa5d72de 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST connectivity_plus_windows + dynamic_color flutter_secure_storage_windows system_theme url_launcher_windows From b48017508abe4be04967c7cc724ded9e499f9e48 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 29 Aug 2022 19:37:31 +0300 Subject: [PATCH 028/732] Fix ProviderVolume cubit exception --- .../provider_volumes/provider_volume_cubit.dart | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index c1cb391a..84d8aee1 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -12,20 +12,19 @@ part 'provider_volume_state.dart'; class ApiProviderVolumeCubit extends ServerInstallationDependendCubit { ApiProviderVolumeCubit(final ServerInstallationCubit serverInstallationCubit) - : super(serverInstallationCubit, const ApiProviderVolumeState.initial()) { - final serverDetails = getIt().serverDetails; - providerApi = serverDetails == null - ? null - : VolumeApiFactoryCreator.createVolumeProviderApiFactory( - getIt().serverDetails!.provider, - ); - } + : super(serverInstallationCubit, const ApiProviderVolumeState.initial()); VolumeProviderApiFactory? providerApi; @override Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { + final serverDetails = getIt().serverDetails; + providerApi = serverDetails == null + ? null + : VolumeApiFactoryCreator.createVolumeProviderApiFactory( + getIt().serverDetails!.provider, + ); _refetch(); } } From 62db476575b68cea4f7506a535a109c8fac998db Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 29 Aug 2022 21:18:07 +0300 Subject: [PATCH 029/732] Fix ipv4 bug --- .../schema/disk_volumes.graphql.dart | 1369 +++++++- .../graphql_maps/schema/schema.graphql.dart | 415 ++- .../schema/server_api.graphql.dart | 2816 +++++++++++++++-- .../schema/server_settings.graphql.dart | 1085 ++++++- .../schema/server_settings.graphql.g.dart | 2 +- .../graphql_maps/schema/services.graphql.dart | 1715 +++++++++- .../schema/services.graphql.g.dart | 2 +- .../graphql_maps/schema/users.graphql.dart | 1618 +++++++++- .../graphql_maps/schema/users.graphql.g.dart | 12 +- .../server_providers/hetzner/hetzner.dart | 12 +- .../server_installation_cubit.dart | 2 - lib/logic/models/json/backup.g.dart | 2 +- .../models/json/hetzner_server_info.dart | 2 +- .../models/json/hetzner_server_info.g.dart | 6 +- lib/logic/models/json/server_job.g.dart | 16 +- .../components/progress_bar/progress_bar.dart | 2 - .../pages/server_storage/data_migration.dart | 39 +- ...service_storage_consumption_list_item.dart | 1 - lib/ui/pages/services/service_page.dart | 132 +- 19 files changed, 8261 insertions(+), 987 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index c435da09..b7d6acac 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -61,13 +61,62 @@ class Fragment$basicMutationReturnFields { extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Fragment$basicMutationReturnFields( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Fragment$basicMutationReturnFields< + Fragment$basicMutationReturnFields> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields { + factory CopyWith$Fragment$basicMutationReturnFields( + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then) = + _CopyWithImpl$Fragment$basicMutationReturnFields; + + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + + final Fragment$basicMutationReturnFields _instance; + + final TRes Function(Fragment$basicMutationReturnFields) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Fragment$basicMutationReturnFields( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( @@ -175,11 +224,58 @@ class Query$GetServerDiskVolumes { extension UtilityExtension$Query$GetServerDiskVolumes on Query$GetServerDiskVolumes { - Query$GetServerDiskVolumes copyWith( - {Query$GetServerDiskVolumes$storage? storage, String? $__typename}) => - Query$GetServerDiskVolumes( - storage: storage == null ? this.storage : storage, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetServerDiskVolumes + get copyWith => CopyWith$Query$GetServerDiskVolumes(this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumes { + factory CopyWith$Query$GetServerDiskVolumes( + Query$GetServerDiskVolumes instance, + TRes Function(Query$GetServerDiskVolumes) then) = + _CopyWithImpl$Query$GetServerDiskVolumes; + + factory CopyWith$Query$GetServerDiskVolumes.stub(TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumes; + + TRes call({Query$GetServerDiskVolumes$storage? storage, String? $__typename}); + CopyWith$Query$GetServerDiskVolumes$storage get storage; +} + +class _CopyWithImpl$Query$GetServerDiskVolumes + implements CopyWith$Query$GetServerDiskVolumes { + _CopyWithImpl$Query$GetServerDiskVolumes(this._instance, this._then); + + final Query$GetServerDiskVolumes _instance; + + final TRes Function(Query$GetServerDiskVolumes) _then; + + static const _undefined = {}; + + TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumes( + storage: storage == _undefined || storage == null + ? _instance.storage + : (storage as Query$GetServerDiskVolumes$storage), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetServerDiskVolumes$storage get storage { + final local$storage = _instance.storage; + return CopyWith$Query$GetServerDiskVolumes$storage( + local$storage, (e) => call(storage: e)); + } +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumes + implements CopyWith$Query$GetServerDiskVolumes { + _CopyWithStubImpl$Query$GetServerDiskVolumes(this._res); + + TRes _res; + + call({Query$GetServerDiskVolumes$storage? storage, String? $__typename}) => + _res; + CopyWith$Query$GetServerDiskVolumes$storage get storage => + CopyWith$Query$GetServerDiskVolumes$storage.stub(_res); } const documentNodeQueryGetServerDiskVolumes = DocumentNode(definitions: [ @@ -480,12 +576,73 @@ class Query$GetServerDiskVolumes$storage { extension UtilityExtension$Query$GetServerDiskVolumes$storage on Query$GetServerDiskVolumes$storage { - Query$GetServerDiskVolumes$storage copyWith( + CopyWith$Query$GetServerDiskVolumes$storage< + Query$GetServerDiskVolumes$storage> + get copyWith => + CopyWith$Query$GetServerDiskVolumes$storage(this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumes$storage { + factory CopyWith$Query$GetServerDiskVolumes$storage( + Query$GetServerDiskVolumes$storage instance, + TRes Function(Query$GetServerDiskVolumes$storage) then) = + _CopyWithImpl$Query$GetServerDiskVolumes$storage; + + factory CopyWith$Query$GetServerDiskVolumes$storage.stub(TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage; + + TRes call( + {List? volumes, + String? $__typename}); + TRes volumes( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumes$storage$volumes< + Query$GetServerDiskVolumes$storage$volumes>>) + _fn); +} + +class _CopyWithImpl$Query$GetServerDiskVolumes$storage + implements CopyWith$Query$GetServerDiskVolumes$storage { + _CopyWithImpl$Query$GetServerDiskVolumes$storage(this._instance, this._then); + + final Query$GetServerDiskVolumes$storage _instance; + + final TRes Function(Query$GetServerDiskVolumes$storage) _then; + + static const _undefined = {}; + + TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumes$storage( + volumes: volumes == _undefined || volumes == null + ? _instance.volumes + : (volumes as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes volumes( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumes$storage$volumes< + Query$GetServerDiskVolumes$storage$volumes>>) + _fn) => + call( + volumes: _fn(_instance.volumes.map((e) => + CopyWith$Query$GetServerDiskVolumes$storage$volumes( + e, (i) => i))).toList()); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage + implements CopyWith$Query$GetServerDiskVolumes$storage { + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage(this._res); + + TRes _res; + + call( {List? volumes, String? $__typename}) => - Query$GetServerDiskVolumes$storage( - volumes: volumes == null ? this.volumes : volumes, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + volumes(_fn) => _res; } @JsonSerializable(explicitToJson: true) @@ -602,28 +759,121 @@ class Query$GetServerDiskVolumes$storage$volumes { extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes on Query$GetServerDiskVolumes$storage$volumes { - Query$GetServerDiskVolumes$storage$volumes copyWith( + CopyWith$Query$GetServerDiskVolumes$storage$volumes< + Query$GetServerDiskVolumes$storage$volumes> + get copyWith => + CopyWith$Query$GetServerDiskVolumes$storage$volumes(this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes { + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes( + Query$GetServerDiskVolumes$storage$volumes instance, + TRes Function(Query$GetServerDiskVolumes$storage$volumes) then) = + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes; + + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes.stub(TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes; + + TRes call( + {String? freeSpace, + String? model, + String? name, + bool? root, + String? serial, + String? totalSpace, + String? type, + List? usages, + String? usedSpace, + String? $__typename}); + TRes usages( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages< + Query$GetServerDiskVolumes$storage$volumes$usages>>) + _fn); +} + +class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes + implements CopyWith$Query$GetServerDiskVolumes$storage$volumes { + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes( + this._instance, this._then); + + final Query$GetServerDiskVolumes$storage$volumes _instance; + + final TRes Function(Query$GetServerDiskVolumes$storage$volumes) _then; + + static const _undefined = {}; + + TRes call( + {Object? freeSpace = _undefined, + Object? model = _undefined, + Object? name = _undefined, + Object? root = _undefined, + Object? serial = _undefined, + Object? totalSpace = _undefined, + Object? type = _undefined, + Object? usages = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumes$storage$volumes( + freeSpace: freeSpace == _undefined || freeSpace == null + ? _instance.freeSpace + : (freeSpace as String), + model: model == _undefined ? _instance.model : (model as String?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + root: root == _undefined || root == null + ? _instance.root + : (root as bool), + serial: serial == _undefined ? _instance.serial : (serial as String?), + totalSpace: totalSpace == _undefined || totalSpace == null + ? _instance.totalSpace + : (totalSpace as String), + type: type == _undefined || type == null + ? _instance.type + : (type as String), + usages: usages == _undefined || usages == null + ? _instance.usages + : (usages + as List), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes usages( + Iterable Function( + Iterable< + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages< + Query$GetServerDiskVolumes$storage$volumes$usages>>) + _fn) => + call( + usages: _fn(_instance.usages.map((e) => + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( + e, (i) => i))).toList()); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes + implements CopyWith$Query$GetServerDiskVolumes$storage$volumes { + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes(this._res); + + TRes _res; + + call( {String? freeSpace, - String? Function()? model, + String? model, String? name, bool? root, - String? Function()? serial, + String? serial, String? totalSpace, String? type, List? usages, String? usedSpace, String? $__typename}) => - Query$GetServerDiskVolumes$storage$volumes( - freeSpace: freeSpace == null ? this.freeSpace : freeSpace, - model: model == null ? this.model : model(), - name: name == null ? this.name : name, - root: root == null ? this.root : root, - serial: serial == null ? this.serial : serial(), - totalSpace: totalSpace == null ? this.totalSpace : totalSpace, - type: type == null ? this.type : type, - usages: usages == null ? this.usages : usages, - usedSpace: usedSpace == null ? this.usedSpace : usedSpace, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + usages(_fn) => _res; } @JsonSerializable(explicitToJson: true) @@ -682,12 +932,65 @@ class Query$GetServerDiskVolumes$storage$volumes$usages { extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages on Query$GetServerDiskVolumes$storage$volumes$usages { - Query$GetServerDiskVolumes$storage$volumes$usages copyWith( - {String? title, String? usedSpace, String? $__typename}) => - Query$GetServerDiskVolumes$storage$volumes$usages( - title: title == null ? this.title : title, - usedSpace: usedSpace == null ? this.usedSpace : usedSpace, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages< + Query$GetServerDiskVolumes$storage$volumes$usages> + get copyWith => + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( + this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages< + TRes> { + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( + Query$GetServerDiskVolumes$storage$volumes$usages instance, + TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) + then) = + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages; + + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages.stub( + TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages; + + TRes call({String? title, String? usedSpace, String? $__typename}); +} + +class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages + implements + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages { + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages( + this._instance, this._then); + + final Query$GetServerDiskVolumes$storage$volumes$usages _instance; + + final TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) _then; + + static const _undefined = {}; + + TRes call( + {Object? title = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetServerDiskVolumes$storage$volumes$usages( + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages + implements + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages { + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages( + this._res); + + TRes _res; + + call({String? title, String? usedSpace, String? $__typename}) => _res; } @JsonSerializable(explicitToJson: true) @@ -750,18 +1053,106 @@ class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage on Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage { - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage copyWith( + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage> + get copyWith => + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< + TRes> { + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + instance, + TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) + then) = + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; + + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage.stub( + TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; + + TRes call( + {String? title, + String? usedSpace, + String? $__typename, + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service}); + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> get service; +} + +class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< + TRes> + implements + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< + TRes> { + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + this._instance, this._then); + + final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + _instance; + + final TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) + _then; + + static const _undefined = {}; + + TRes call( + {Object? title = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined, + Object? service = _undefined}) => + _then(Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + service: service == _undefined + ? _instance.service + : (service + as Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service?))); + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> get service { + final local$service = _instance.service; + return local$service == null + ? CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + .stub(_then(_instance)) + : CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + local$service, (e) => call(service: e)); + } +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< + TRes> + implements + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< + TRes> { + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + this._res); + + TRes _res; + + call( {String? title, String? usedSpace, String? $__typename, Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? - Function()? service}) => - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - title: title == null ? this.title : title, - usedSpace: usedSpace == null ? this.usedSpace : usedSpace, - $__typename: $__typename == null ? this.$__typename : $__typename, - service: service == null ? this.service : service()); + _res; + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> + get service => + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + .stub(_res); } @JsonSerializable(explicitToJson: true) @@ -822,18 +1213,85 @@ class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$ser extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service on Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service { - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - copyWith( - {String? id, - bool? isMovable, - String? displayName, - String? $__typename}) => + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service> + get copyWith => + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + this, (i) => i); +} + +abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> { + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + instance, + TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) + then) = + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; + + factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.stub( + TRes res) = + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; + + TRes call( + {String? id, bool? isMovable, String? displayName, String? $__typename}); +} + +class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> + implements + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> { + _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + this._instance, this._then); + + final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + _instance; + + final TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) + _then; + + static const _undefined = {}; + + TRes call( + {Object? id = _undefined, + Object? isMovable = _undefined, + Object? displayName = _undefined, + Object? $__typename = _undefined}) => + _then( Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - id: id == null ? this.id : id, - isMovable: isMovable == null ? this.isMovable : isMovable, - displayName: displayName == null ? this.displayName : displayName, - $__typename: - $__typename == null ? this.$__typename : $__typename); + id: id == _undefined || id == null + ? _instance.id + : (id as String), + isMovable: isMovable == _undefined || isMovable == null + ? _instance.isMovable + : (isMovable as bool), + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> + implements + CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< + TRes> { + _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + this._res); + + TRes _res; + + call( + {String? id, + bool? isMovable, + String? displayName, + String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -863,8 +1321,46 @@ class Variables$Mutation$MountVolume { return true; } - Variables$Mutation$MountVolume copyWith({String? name}) => - Variables$Mutation$MountVolume(name: name == null ? this.name : name); + CopyWith$Variables$Mutation$MountVolume + get copyWith => CopyWith$Variables$Mutation$MountVolume(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$MountVolume { + factory CopyWith$Variables$Mutation$MountVolume( + Variables$Mutation$MountVolume instance, + TRes Function(Variables$Mutation$MountVolume) then) = + _CopyWithImpl$Variables$Mutation$MountVolume; + + factory CopyWith$Variables$Mutation$MountVolume.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$MountVolume; + + TRes call({String? name}); +} + +class _CopyWithImpl$Variables$Mutation$MountVolume + implements CopyWith$Variables$Mutation$MountVolume { + _CopyWithImpl$Variables$Mutation$MountVolume(this._instance, this._then); + + final Variables$Mutation$MountVolume _instance; + + final TRes Function(Variables$Mutation$MountVolume) _then; + + static const _undefined = {}; + + TRes call({Object? name = _undefined}) => + _then(Variables$Mutation$MountVolume( + name: name == _undefined || name == null + ? _instance.name + : (name as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$MountVolume + implements CopyWith$Variables$Mutation$MountVolume { + _CopyWithStubImpl$Variables$Mutation$MountVolume(this._res); + + TRes _res; + + call({String? name}) => _res; } @JsonSerializable(explicitToJson: true) @@ -903,12 +1399,60 @@ class Mutation$MountVolume { } extension UtilityExtension$Mutation$MountVolume on Mutation$MountVolume { - Mutation$MountVolume copyWith( - {Mutation$MountVolume$mountVolume? mountVolume, - String? $__typename}) => - Mutation$MountVolume( - mountVolume: mountVolume == null ? this.mountVolume : mountVolume, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$MountVolume get copyWith => + CopyWith$Mutation$MountVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$MountVolume { + factory CopyWith$Mutation$MountVolume(Mutation$MountVolume instance, + TRes Function(Mutation$MountVolume) then) = + _CopyWithImpl$Mutation$MountVolume; + + factory CopyWith$Mutation$MountVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$MountVolume; + + TRes call( + {Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}); + CopyWith$Mutation$MountVolume$mountVolume get mountVolume; +} + +class _CopyWithImpl$Mutation$MountVolume + implements CopyWith$Mutation$MountVolume { + _CopyWithImpl$Mutation$MountVolume(this._instance, this._then); + + final Mutation$MountVolume _instance; + + final TRes Function(Mutation$MountVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? mountVolume = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MountVolume( + mountVolume: mountVolume == _undefined || mountVolume == null + ? _instance.mountVolume + : (mountVolume as Mutation$MountVolume$mountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$MountVolume$mountVolume get mountVolume { + final local$mountVolume = _instance.mountVolume; + return CopyWith$Mutation$MountVolume$mountVolume( + local$mountVolume, (e) => call(mountVolume: e)); + } +} + +class _CopyWithStubImpl$Mutation$MountVolume + implements CopyWith$Mutation$MountVolume { + _CopyWithStubImpl$Mutation$MountVolume(this._res); + + TRes _res; + + call({Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}) => + _res; + CopyWith$Mutation$MountVolume$mountVolume get mountVolume => + CopyWith$Mutation$MountVolume$mountVolume.stub(_res); } const documentNodeMutationMountVolume = DocumentNode(definitions: [ @@ -1097,13 +1641,60 @@ class Mutation$MountVolume$mountVolume extension UtilityExtension$Mutation$MountVolume$mountVolume on Mutation$MountVolume$mountVolume { - Mutation$MountVolume$mountVolume copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$MountVolume$mountVolume( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$MountVolume$mountVolume + get copyWith => CopyWith$Mutation$MountVolume$mountVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$MountVolume$mountVolume { + factory CopyWith$Mutation$MountVolume$mountVolume( + Mutation$MountVolume$mountVolume instance, + TRes Function(Mutation$MountVolume$mountVolume) then) = + _CopyWithImpl$Mutation$MountVolume$mountVolume; + + factory CopyWith$Mutation$MountVolume$mountVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$MountVolume$mountVolume; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$MountVolume$mountVolume + implements CopyWith$Mutation$MountVolume$mountVolume { + _CopyWithImpl$Mutation$MountVolume$mountVolume(this._instance, this._then); + + final Mutation$MountVolume$mountVolume _instance; + + final TRes Function(Mutation$MountVolume$mountVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MountVolume$mountVolume( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$MountVolume$mountVolume + implements CopyWith$Mutation$MountVolume$mountVolume { + _CopyWithStubImpl$Mutation$MountVolume$mountVolume(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1134,8 +1725,46 @@ class Variables$Mutation$ResizeVolume { return true; } - Variables$Mutation$ResizeVolume copyWith({String? name}) => - Variables$Mutation$ResizeVolume(name: name == null ? this.name : name); + CopyWith$Variables$Mutation$ResizeVolume + get copyWith => CopyWith$Variables$Mutation$ResizeVolume(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$ResizeVolume { + factory CopyWith$Variables$Mutation$ResizeVolume( + Variables$Mutation$ResizeVolume instance, + TRes Function(Variables$Mutation$ResizeVolume) then) = + _CopyWithImpl$Variables$Mutation$ResizeVolume; + + factory CopyWith$Variables$Mutation$ResizeVolume.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$ResizeVolume; + + TRes call({String? name}); +} + +class _CopyWithImpl$Variables$Mutation$ResizeVolume + implements CopyWith$Variables$Mutation$ResizeVolume { + _CopyWithImpl$Variables$Mutation$ResizeVolume(this._instance, this._then); + + final Variables$Mutation$ResizeVolume _instance; + + final TRes Function(Variables$Mutation$ResizeVolume) _then; + + static const _undefined = {}; + + TRes call({Object? name = _undefined}) => + _then(Variables$Mutation$ResizeVolume( + name: name == _undefined || name == null + ? _instance.name + : (name as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$ResizeVolume + implements CopyWith$Variables$Mutation$ResizeVolume { + _CopyWithStubImpl$Variables$Mutation$ResizeVolume(this._res); + + TRes _res; + + call({String? name}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1175,12 +1804,62 @@ class Mutation$ResizeVolume { } extension UtilityExtension$Mutation$ResizeVolume on Mutation$ResizeVolume { - Mutation$ResizeVolume copyWith( + CopyWith$Mutation$ResizeVolume get copyWith => + CopyWith$Mutation$ResizeVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$ResizeVolume { + factory CopyWith$Mutation$ResizeVolume(Mutation$ResizeVolume instance, + TRes Function(Mutation$ResizeVolume) then) = + _CopyWithImpl$Mutation$ResizeVolume; + + factory CopyWith$Mutation$ResizeVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$ResizeVolume; + + TRes call( + {Mutation$ResizeVolume$resizeVolume? resizeVolume, String? $__typename}); + CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume; +} + +class _CopyWithImpl$Mutation$ResizeVolume + implements CopyWith$Mutation$ResizeVolume { + _CopyWithImpl$Mutation$ResizeVolume(this._instance, this._then); + + final Mutation$ResizeVolume _instance; + + final TRes Function(Mutation$ResizeVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? resizeVolume = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$ResizeVolume( + resizeVolume: resizeVolume == _undefined || resizeVolume == null + ? _instance.resizeVolume + : (resizeVolume as Mutation$ResizeVolume$resizeVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume { + final local$resizeVolume = _instance.resizeVolume; + return CopyWith$Mutation$ResizeVolume$resizeVolume( + local$resizeVolume, (e) => call(resizeVolume: e)); + } +} + +class _CopyWithStubImpl$Mutation$ResizeVolume + implements CopyWith$Mutation$ResizeVolume { + _CopyWithStubImpl$Mutation$ResizeVolume(this._res); + + TRes _res; + + call( {Mutation$ResizeVolume$resizeVolume? resizeVolume, String? $__typename}) => - Mutation$ResizeVolume( - resizeVolume: resizeVolume == null ? this.resizeVolume : resizeVolume, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume => + CopyWith$Mutation$ResizeVolume$resizeVolume.stub(_res); } const documentNodeMutationResizeVolume = DocumentNode(definitions: [ @@ -1372,13 +2051,62 @@ class Mutation$ResizeVolume$resizeVolume extension UtilityExtension$Mutation$ResizeVolume$resizeVolume on Mutation$ResizeVolume$resizeVolume { - Mutation$ResizeVolume$resizeVolume copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$ResizeVolume$resizeVolume( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$ResizeVolume$resizeVolume< + Mutation$ResizeVolume$resizeVolume> + get copyWith => + CopyWith$Mutation$ResizeVolume$resizeVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$ResizeVolume$resizeVolume { + factory CopyWith$Mutation$ResizeVolume$resizeVolume( + Mutation$ResizeVolume$resizeVolume instance, + TRes Function(Mutation$ResizeVolume$resizeVolume) then) = + _CopyWithImpl$Mutation$ResizeVolume$resizeVolume; + + factory CopyWith$Mutation$ResizeVolume$resizeVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$ResizeVolume$resizeVolume + implements CopyWith$Mutation$ResizeVolume$resizeVolume { + _CopyWithImpl$Mutation$ResizeVolume$resizeVolume(this._instance, this._then); + + final Mutation$ResizeVolume$resizeVolume _instance; + + final TRes Function(Mutation$ResizeVolume$resizeVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$ResizeVolume$resizeVolume( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume + implements CopyWith$Mutation$ResizeVolume$resizeVolume { + _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1410,8 +2138,46 @@ class Variables$Mutation$UnmountVolume { return true; } - Variables$Mutation$UnmountVolume copyWith({String? name}) => - Variables$Mutation$UnmountVolume(name: name == null ? this.name : name); + CopyWith$Variables$Mutation$UnmountVolume + get copyWith => CopyWith$Variables$Mutation$UnmountVolume(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$UnmountVolume { + factory CopyWith$Variables$Mutation$UnmountVolume( + Variables$Mutation$UnmountVolume instance, + TRes Function(Variables$Mutation$UnmountVolume) then) = + _CopyWithImpl$Variables$Mutation$UnmountVolume; + + factory CopyWith$Variables$Mutation$UnmountVolume.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$UnmountVolume; + + TRes call({String? name}); +} + +class _CopyWithImpl$Variables$Mutation$UnmountVolume + implements CopyWith$Variables$Mutation$UnmountVolume { + _CopyWithImpl$Variables$Mutation$UnmountVolume(this._instance, this._then); + + final Variables$Mutation$UnmountVolume _instance; + + final TRes Function(Variables$Mutation$UnmountVolume) _then; + + static const _undefined = {}; + + TRes call({Object? name = _undefined}) => + _then(Variables$Mutation$UnmountVolume( + name: name == _undefined || name == null + ? _instance.name + : (name as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$UnmountVolume + implements CopyWith$Variables$Mutation$UnmountVolume { + _CopyWithStubImpl$Variables$Mutation$UnmountVolume(this._res); + + TRes _res; + + call({String? name}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1451,13 +2217,63 @@ class Mutation$UnmountVolume { } extension UtilityExtension$Mutation$UnmountVolume on Mutation$UnmountVolume { - Mutation$UnmountVolume copyWith( + CopyWith$Mutation$UnmountVolume get copyWith => + CopyWith$Mutation$UnmountVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$UnmountVolume { + factory CopyWith$Mutation$UnmountVolume(Mutation$UnmountVolume instance, + TRes Function(Mutation$UnmountVolume) then) = + _CopyWithImpl$Mutation$UnmountVolume; + + factory CopyWith$Mutation$UnmountVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$UnmountVolume; + + TRes call( + {Mutation$UnmountVolume$unmountVolume? unmountVolume, + String? $__typename}); + CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume; +} + +class _CopyWithImpl$Mutation$UnmountVolume + implements CopyWith$Mutation$UnmountVolume { + _CopyWithImpl$Mutation$UnmountVolume(this._instance, this._then); + + final Mutation$UnmountVolume _instance; + + final TRes Function(Mutation$UnmountVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? unmountVolume = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UnmountVolume( + unmountVolume: unmountVolume == _undefined || unmountVolume == null + ? _instance.unmountVolume + : (unmountVolume as Mutation$UnmountVolume$unmountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume { + final local$unmountVolume = _instance.unmountVolume; + return CopyWith$Mutation$UnmountVolume$unmountVolume( + local$unmountVolume, (e) => call(unmountVolume: e)); + } +} + +class _CopyWithStubImpl$Mutation$UnmountVolume + implements CopyWith$Mutation$UnmountVolume { + _CopyWithStubImpl$Mutation$UnmountVolume(this._res); + + TRes _res; + + call( {Mutation$UnmountVolume$unmountVolume? unmountVolume, String? $__typename}) => - Mutation$UnmountVolume( - unmountVolume: - unmountVolume == null ? this.unmountVolume : unmountVolume, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume => + CopyWith$Mutation$UnmountVolume$unmountVolume.stub(_res); } const documentNodeMutationUnmountVolume = DocumentNode(definitions: [ @@ -1649,13 +2465,63 @@ class Mutation$UnmountVolume$unmountVolume extension UtilityExtension$Mutation$UnmountVolume$unmountVolume on Mutation$UnmountVolume$unmountVolume { - Mutation$UnmountVolume$unmountVolume copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$UnmountVolume$unmountVolume( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$UnmountVolume$unmountVolume< + Mutation$UnmountVolume$unmountVolume> + get copyWith => + CopyWith$Mutation$UnmountVolume$unmountVolume(this, (i) => i); +} + +abstract class CopyWith$Mutation$UnmountVolume$unmountVolume { + factory CopyWith$Mutation$UnmountVolume$unmountVolume( + Mutation$UnmountVolume$unmountVolume instance, + TRes Function(Mutation$UnmountVolume$unmountVolume) then) = + _CopyWithImpl$Mutation$UnmountVolume$unmountVolume; + + factory CopyWith$Mutation$UnmountVolume$unmountVolume.stub(TRes res) = + _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$UnmountVolume$unmountVolume + implements CopyWith$Mutation$UnmountVolume$unmountVolume { + _CopyWithImpl$Mutation$UnmountVolume$unmountVolume( + this._instance, this._then); + + final Mutation$UnmountVolume$unmountVolume _instance; + + final TRes Function(Mutation$UnmountVolume$unmountVolume) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UnmountVolume$unmountVolume( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume + implements CopyWith$Mutation$UnmountVolume$unmountVolume { + _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1687,10 +2553,47 @@ class Variables$Mutation$MigrateToBinds { return true; } - Variables$Mutation$MigrateToBinds copyWith( - {Input$MigrateToBindsInput? input}) => - Variables$Mutation$MigrateToBinds( - input: input == null ? this.input : input); + CopyWith$Variables$Mutation$MigrateToBinds + get copyWith => + CopyWith$Variables$Mutation$MigrateToBinds(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$MigrateToBinds { + factory CopyWith$Variables$Mutation$MigrateToBinds( + Variables$Mutation$MigrateToBinds instance, + TRes Function(Variables$Mutation$MigrateToBinds) then) = + _CopyWithImpl$Variables$Mutation$MigrateToBinds; + + factory CopyWith$Variables$Mutation$MigrateToBinds.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$MigrateToBinds; + + TRes call({Input$MigrateToBindsInput? input}); +} + +class _CopyWithImpl$Variables$Mutation$MigrateToBinds + implements CopyWith$Variables$Mutation$MigrateToBinds { + _CopyWithImpl$Variables$Mutation$MigrateToBinds(this._instance, this._then); + + final Variables$Mutation$MigrateToBinds _instance; + + final TRes Function(Variables$Mutation$MigrateToBinds) _then; + + static const _undefined = {}; + + TRes call({Object? input = _undefined}) => + _then(Variables$Mutation$MigrateToBinds( + input: input == _undefined || input == null + ? _instance.input + : (input as Input$MigrateToBindsInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$MigrateToBinds + implements CopyWith$Variables$Mutation$MigrateToBinds { + _CopyWithStubImpl$Variables$Mutation$MigrateToBinds(this._res); + + TRes _res; + + call({Input$MigrateToBindsInput? input}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1730,13 +2633,63 @@ class Mutation$MigrateToBinds { } extension UtilityExtension$Mutation$MigrateToBinds on Mutation$MigrateToBinds { - Mutation$MigrateToBinds copyWith( + CopyWith$Mutation$MigrateToBinds get copyWith => + CopyWith$Mutation$MigrateToBinds(this, (i) => i); +} + +abstract class CopyWith$Mutation$MigrateToBinds { + factory CopyWith$Mutation$MigrateToBinds(Mutation$MigrateToBinds instance, + TRes Function(Mutation$MigrateToBinds) then) = + _CopyWithImpl$Mutation$MigrateToBinds; + + factory CopyWith$Mutation$MigrateToBinds.stub(TRes res) = + _CopyWithStubImpl$Mutation$MigrateToBinds; + + TRes call( + {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, + String? $__typename}); + CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds; +} + +class _CopyWithImpl$Mutation$MigrateToBinds + implements CopyWith$Mutation$MigrateToBinds { + _CopyWithImpl$Mutation$MigrateToBinds(this._instance, this._then); + + final Mutation$MigrateToBinds _instance; + + final TRes Function(Mutation$MigrateToBinds) _then; + + static const _undefined = {}; + + TRes call( + {Object? migrateToBinds = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MigrateToBinds( + migrateToBinds: migrateToBinds == _undefined || migrateToBinds == null + ? _instance.migrateToBinds + : (migrateToBinds as Mutation$MigrateToBinds$migrateToBinds), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds { + final local$migrateToBinds = _instance.migrateToBinds; + return CopyWith$Mutation$MigrateToBinds$migrateToBinds( + local$migrateToBinds, (e) => call(migrateToBinds: e)); + } +} + +class _CopyWithStubImpl$Mutation$MigrateToBinds + implements CopyWith$Mutation$MigrateToBinds { + _CopyWithStubImpl$Mutation$MigrateToBinds(this._res); + + TRes _res; + + call( {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, String? $__typename}) => - Mutation$MigrateToBinds( - migrateToBinds: - migrateToBinds == null ? this.migrateToBinds : migrateToBinds, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds => + CopyWith$Mutation$MigrateToBinds$migrateToBinds.stub(_res); } const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [ @@ -2014,18 +2967,88 @@ class Mutation$MigrateToBinds$migrateToBinds extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds on Mutation$MigrateToBinds$migrateToBinds { - Mutation$MigrateToBinds$migrateToBinds copyWith( + CopyWith$Mutation$MigrateToBinds$migrateToBinds< + Mutation$MigrateToBinds$migrateToBinds> + get copyWith => + CopyWith$Mutation$MigrateToBinds$migrateToBinds(this, (i) => i); +} + +abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds { + factory CopyWith$Mutation$MigrateToBinds$migrateToBinds( + Mutation$MigrateToBinds$migrateToBinds instance, + TRes Function(Mutation$MigrateToBinds$migrateToBinds) then) = + _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds; + + factory CopyWith$Mutation$MigrateToBinds$migrateToBinds.stub(TRes res) = + _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MigrateToBinds$migrateToBinds$job? job}); + CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job; +} + +class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds + implements CopyWith$Mutation$MigrateToBinds$migrateToBinds { + _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds( + this._instance, this._then); + + final Mutation$MigrateToBinds$migrateToBinds _instance; + + final TRes Function(Mutation$MigrateToBinds$migrateToBinds) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? job = _undefined}) => + _then(Mutation$MigrateToBinds$migrateToBinds( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Mutation$MigrateToBinds$migrateToBinds$job?))); + CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job { + final local$job = _instance.job; + return local$job == null + ? CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub( + _then(_instance)) + : CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( + local$job, (e) => call(job: e)); + } +} + +class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds + implements CopyWith$Mutation$MigrateToBinds$migrateToBinds { + _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - Mutation$MigrateToBinds$migrateToBinds$job? Function()? job}) => - Mutation$MigrateToBinds$migrateToBinds( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - job: job == null ? this.job : job()); + Mutation$MigrateToBinds$migrateToBinds$job? job}) => + _res; + CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job => + CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2156,32 +3179,114 @@ class Mutation$MigrateToBinds$migrateToBinds$job { extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds$job on Mutation$MigrateToBinds$migrateToBinds$job { - Mutation$MigrateToBinds$migrateToBinds$job copyWith( + CopyWith$Mutation$MigrateToBinds$migrateToBinds$job< + Mutation$MigrateToBinds$migrateToBinds$job> + get copyWith => + CopyWith$Mutation$MigrateToBinds$migrateToBinds$job(this, (i) => i); +} + +abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { + factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( + Mutation$MigrateToBinds$migrateToBinds$job instance, + TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) then) = + _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job; + + factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(TRes res) = + _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job; + + TRes call( + {DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}); +} + +class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job + implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { + _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job( + this._instance, this._then); + + final Mutation$MigrateToBinds$migrateToBinds$job _instance; + + final TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) _then; + + static const _undefined = {}; + + TRes call( + {Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MigrateToBinds$migrateToBinds$job( + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null + ? _instance.uid + : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job + implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { + _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job(this._res); + + TRes _res; + + call( {DateTime? createdAt, String? description, - String? Function()? error, - DateTime? Function()? finishedAt, + String? error, + DateTime? finishedAt, String? name, - int? Function()? progress, - String? Function()? result, + int? progress, + String? result, String? status, - String? Function()? statusText, + String? statusText, String? uid, DateTime? updatedAt, String? $__typename}) => - Mutation$MigrateToBinds$migrateToBinds$job( - createdAt: createdAt == null ? this.createdAt : createdAt, - description: description == null ? this.description : description, - error: error == null ? this.error : error(), - finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), - name: name == null ? this.name : name, - progress: progress == null ? this.progress : progress(), - result: result == null ? this.result : result(), - status: status == null ? this.status : status, - statusText: statusText == null ? this.statusText : statusText(), - uid: uid == null ? this.uid : uid, - updatedAt: updatedAt == null ? this.updatedAt : updatedAt, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } DateTime? _nullable$dateTimeFromJson(dynamic data) => diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index cd86d73a..aa2d2c1e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -35,14 +35,51 @@ class Input$AutoUpgradeSettingsInput { return true; } - Input$AutoUpgradeSettingsInput copyWith( - {bool? Function()? enableAutoUpgrade, - bool? Function()? allowReboot}) => - Input$AutoUpgradeSettingsInput( - enableAutoUpgrade: enableAutoUpgrade == null - ? this.enableAutoUpgrade - : enableAutoUpgrade(), - allowReboot: allowReboot == null ? this.allowReboot : allowReboot()); + CopyWith$Input$AutoUpgradeSettingsInput + get copyWith => CopyWith$Input$AutoUpgradeSettingsInput(this, (i) => i); +} + +abstract class CopyWith$Input$AutoUpgradeSettingsInput { + factory CopyWith$Input$AutoUpgradeSettingsInput( + Input$AutoUpgradeSettingsInput instance, + TRes Function(Input$AutoUpgradeSettingsInput) then) = + _CopyWithImpl$Input$AutoUpgradeSettingsInput; + + factory CopyWith$Input$AutoUpgradeSettingsInput.stub(TRes res) = + _CopyWithStubImpl$Input$AutoUpgradeSettingsInput; + + TRes call({bool? enableAutoUpgrade, bool? allowReboot}); +} + +class _CopyWithImpl$Input$AutoUpgradeSettingsInput + implements CopyWith$Input$AutoUpgradeSettingsInput { + _CopyWithImpl$Input$AutoUpgradeSettingsInput(this._instance, this._then); + + final Input$AutoUpgradeSettingsInput _instance; + + final TRes Function(Input$AutoUpgradeSettingsInput) _then; + + static const _undefined = {}; + + TRes call( + {Object? enableAutoUpgrade = _undefined, + Object? allowReboot = _undefined}) => + _then(Input$AutoUpgradeSettingsInput( + enableAutoUpgrade: enableAutoUpgrade == _undefined + ? _instance.enableAutoUpgrade + : (enableAutoUpgrade as bool?), + allowReboot: allowReboot == _undefined + ? _instance.allowReboot + : (allowReboot as bool?))); +} + +class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput + implements CopyWith$Input$AutoUpgradeSettingsInput { + _CopyWithStubImpl$Input$AutoUpgradeSettingsInput(this._res); + + TRes _res; + + call({bool? enableAutoUpgrade, bool? allowReboot}) => _res; } @JsonSerializable(explicitToJson: true) @@ -107,28 +144,78 @@ class Input$MigrateToBindsInput { return true; } - Input$MigrateToBindsInput copyWith( + CopyWith$Input$MigrateToBindsInput get copyWith => + CopyWith$Input$MigrateToBindsInput(this, (i) => i); +} + +abstract class CopyWith$Input$MigrateToBindsInput { + factory CopyWith$Input$MigrateToBindsInput(Input$MigrateToBindsInput instance, + TRes Function(Input$MigrateToBindsInput) then) = + _CopyWithImpl$Input$MigrateToBindsInput; + + factory CopyWith$Input$MigrateToBindsInput.stub(TRes res) = + _CopyWithStubImpl$Input$MigrateToBindsInput; + + TRes call( + {String? emailBlockDevice, + String? bitwardenBlockDevice, + String? giteaBlockDevice, + String? nextcloudBlockDevice, + String? pleromaBlockDevice}); +} + +class _CopyWithImpl$Input$MigrateToBindsInput + implements CopyWith$Input$MigrateToBindsInput { + _CopyWithImpl$Input$MigrateToBindsInput(this._instance, this._then); + + final Input$MigrateToBindsInput _instance; + + final TRes Function(Input$MigrateToBindsInput) _then; + + static const _undefined = {}; + + TRes call( + {Object? emailBlockDevice = _undefined, + Object? bitwardenBlockDevice = _undefined, + Object? giteaBlockDevice = _undefined, + Object? nextcloudBlockDevice = _undefined, + Object? pleromaBlockDevice = _undefined}) => + _then(Input$MigrateToBindsInput( + emailBlockDevice: + emailBlockDevice == _undefined || emailBlockDevice == null + ? _instance.emailBlockDevice + : (emailBlockDevice as String), + bitwardenBlockDevice: + bitwardenBlockDevice == _undefined || bitwardenBlockDevice == null + ? _instance.bitwardenBlockDevice + : (bitwardenBlockDevice as String), + giteaBlockDevice: + giteaBlockDevice == _undefined || giteaBlockDevice == null + ? _instance.giteaBlockDevice + : (giteaBlockDevice as String), + nextcloudBlockDevice: + nextcloudBlockDevice == _undefined || nextcloudBlockDevice == null + ? _instance.nextcloudBlockDevice + : (nextcloudBlockDevice as String), + pleromaBlockDevice: + pleromaBlockDevice == _undefined || pleromaBlockDevice == null + ? _instance.pleromaBlockDevice + : (pleromaBlockDevice as String))); +} + +class _CopyWithStubImpl$Input$MigrateToBindsInput + implements CopyWith$Input$MigrateToBindsInput { + _CopyWithStubImpl$Input$MigrateToBindsInput(this._res); + + TRes _res; + + call( {String? emailBlockDevice, String? bitwardenBlockDevice, String? giteaBlockDevice, String? nextcloudBlockDevice, String? pleromaBlockDevice}) => - Input$MigrateToBindsInput( - emailBlockDevice: emailBlockDevice == null - ? this.emailBlockDevice - : emailBlockDevice, - bitwardenBlockDevice: bitwardenBlockDevice == null - ? this.bitwardenBlockDevice - : bitwardenBlockDevice, - giteaBlockDevice: giteaBlockDevice == null - ? this.giteaBlockDevice - : giteaBlockDevice, - nextcloudBlockDevice: nextcloudBlockDevice == null - ? this.nextcloudBlockDevice - : nextcloudBlockDevice, - pleromaBlockDevice: pleromaBlockDevice == null - ? this.pleromaBlockDevice - : pleromaBlockDevice); + _res; } @JsonSerializable(explicitToJson: true) @@ -164,10 +251,48 @@ class Input$MoveServiceInput { return true; } - Input$MoveServiceInput copyWith({String? serviceId, String? location}) => - Input$MoveServiceInput( - serviceId: serviceId == null ? this.serviceId : serviceId, - location: location == null ? this.location : location); + CopyWith$Input$MoveServiceInput get copyWith => + CopyWith$Input$MoveServiceInput(this, (i) => i); +} + +abstract class CopyWith$Input$MoveServiceInput { + factory CopyWith$Input$MoveServiceInput(Input$MoveServiceInput instance, + TRes Function(Input$MoveServiceInput) then) = + _CopyWithImpl$Input$MoveServiceInput; + + factory CopyWith$Input$MoveServiceInput.stub(TRes res) = + _CopyWithStubImpl$Input$MoveServiceInput; + + TRes call({String? serviceId, String? location}); +} + +class _CopyWithImpl$Input$MoveServiceInput + implements CopyWith$Input$MoveServiceInput { + _CopyWithImpl$Input$MoveServiceInput(this._instance, this._then); + + final Input$MoveServiceInput _instance; + + final TRes Function(Input$MoveServiceInput) _then; + + static const _undefined = {}; + + TRes call({Object? serviceId = _undefined, Object? location = _undefined}) => + _then(Input$MoveServiceInput( + serviceId: serviceId == _undefined || serviceId == null + ? _instance.serviceId + : (serviceId as String), + location: location == _undefined || location == null + ? _instance.location + : (location as String))); +} + +class _CopyWithStubImpl$Input$MoveServiceInput + implements CopyWith$Input$MoveServiceInput { + _CopyWithStubImpl$Input$MoveServiceInput(this._res); + + TRes _res; + + call({String? serviceId, String? location}) => _res; } @JsonSerializable(explicitToJson: true) @@ -205,12 +330,47 @@ class Input$RecoveryKeyLimitsInput { return true; } - Input$RecoveryKeyLimitsInput copyWith( - {DateTime? Function()? expirationDate, int? Function()? uses}) => - Input$RecoveryKeyLimitsInput( - expirationDate: - expirationDate == null ? this.expirationDate : expirationDate(), - uses: uses == null ? this.uses : uses()); + CopyWith$Input$RecoveryKeyLimitsInput + get copyWith => CopyWith$Input$RecoveryKeyLimitsInput(this, (i) => i); +} + +abstract class CopyWith$Input$RecoveryKeyLimitsInput { + factory CopyWith$Input$RecoveryKeyLimitsInput( + Input$RecoveryKeyLimitsInput instance, + TRes Function(Input$RecoveryKeyLimitsInput) then) = + _CopyWithImpl$Input$RecoveryKeyLimitsInput; + + factory CopyWith$Input$RecoveryKeyLimitsInput.stub(TRes res) = + _CopyWithStubImpl$Input$RecoveryKeyLimitsInput; + + TRes call({DateTime? expirationDate, int? uses}); +} + +class _CopyWithImpl$Input$RecoveryKeyLimitsInput + implements CopyWith$Input$RecoveryKeyLimitsInput { + _CopyWithImpl$Input$RecoveryKeyLimitsInput(this._instance, this._then); + + final Input$RecoveryKeyLimitsInput _instance; + + final TRes Function(Input$RecoveryKeyLimitsInput) _then; + + static const _undefined = {}; + + TRes call({Object? expirationDate = _undefined, Object? uses = _undefined}) => + _then(Input$RecoveryKeyLimitsInput( + expirationDate: expirationDate == _undefined + ? _instance.expirationDate + : (expirationDate as DateTime?), + uses: uses == _undefined ? _instance.uses : (uses as int?))); +} + +class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput + implements CopyWith$Input$RecoveryKeyLimitsInput { + _CopyWithStubImpl$Input$RecoveryKeyLimitsInput(this._res); + + TRes _res; + + call({DateTime? expirationDate, int? uses}) => _res; } @JsonSerializable(explicitToJson: true) @@ -246,10 +406,48 @@ class Input$SshMutationInput { return true; } - Input$SshMutationInput copyWith({String? username, String? sshKey}) => - Input$SshMutationInput( - username: username == null ? this.username : username, - sshKey: sshKey == null ? this.sshKey : sshKey); + CopyWith$Input$SshMutationInput get copyWith => + CopyWith$Input$SshMutationInput(this, (i) => i); +} + +abstract class CopyWith$Input$SshMutationInput { + factory CopyWith$Input$SshMutationInput(Input$SshMutationInput instance, + TRes Function(Input$SshMutationInput) then) = + _CopyWithImpl$Input$SshMutationInput; + + factory CopyWith$Input$SshMutationInput.stub(TRes res) = + _CopyWithStubImpl$Input$SshMutationInput; + + TRes call({String? username, String? sshKey}); +} + +class _CopyWithImpl$Input$SshMutationInput + implements CopyWith$Input$SshMutationInput { + _CopyWithImpl$Input$SshMutationInput(this._instance, this._then); + + final Input$SshMutationInput _instance; + + final TRes Function(Input$SshMutationInput) _then; + + static const _undefined = {}; + + TRes call({Object? username = _undefined, Object? sshKey = _undefined}) => + _then(Input$SshMutationInput( + username: username == _undefined || username == null + ? _instance.username + : (username as String), + sshKey: sshKey == _undefined || sshKey == null + ? _instance.sshKey + : (sshKey as String))); +} + +class _CopyWithStubImpl$Input$SshMutationInput + implements CopyWith$Input$SshMutationInput { + _CopyWithStubImpl$Input$SshMutationInput(this._res); + + TRes _res; + + call({String? username, String? sshKey}) => _res; } @JsonSerializable(explicitToJson: true) @@ -285,10 +483,49 @@ class Input$UseNewDeviceKeyInput { return true; } - Input$UseNewDeviceKeyInput copyWith({String? key, String? deviceName}) => - Input$UseNewDeviceKeyInput( - key: key == null ? this.key : key, - deviceName: deviceName == null ? this.deviceName : deviceName); + CopyWith$Input$UseNewDeviceKeyInput + get copyWith => CopyWith$Input$UseNewDeviceKeyInput(this, (i) => i); +} + +abstract class CopyWith$Input$UseNewDeviceKeyInput { + factory CopyWith$Input$UseNewDeviceKeyInput( + Input$UseNewDeviceKeyInput instance, + TRes Function(Input$UseNewDeviceKeyInput) then) = + _CopyWithImpl$Input$UseNewDeviceKeyInput; + + factory CopyWith$Input$UseNewDeviceKeyInput.stub(TRes res) = + _CopyWithStubImpl$Input$UseNewDeviceKeyInput; + + TRes call({String? key, String? deviceName}); +} + +class _CopyWithImpl$Input$UseNewDeviceKeyInput + implements CopyWith$Input$UseNewDeviceKeyInput { + _CopyWithImpl$Input$UseNewDeviceKeyInput(this._instance, this._then); + + final Input$UseNewDeviceKeyInput _instance; + + final TRes Function(Input$UseNewDeviceKeyInput) _then; + + static const _undefined = {}; + + TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => + _then(Input$UseNewDeviceKeyInput( + key: key == _undefined || key == null + ? _instance.key + : (key as String), + deviceName: deviceName == _undefined || deviceName == null + ? _instance.deviceName + : (deviceName as String))); +} + +class _CopyWithStubImpl$Input$UseNewDeviceKeyInput + implements CopyWith$Input$UseNewDeviceKeyInput { + _CopyWithStubImpl$Input$UseNewDeviceKeyInput(this._res); + + TRes _res; + + call({String? key, String? deviceName}) => _res; } @JsonSerializable(explicitToJson: true) @@ -324,10 +561,48 @@ class Input$UseRecoveryKeyInput { return true; } - Input$UseRecoveryKeyInput copyWith({String? key, String? deviceName}) => - Input$UseRecoveryKeyInput( - key: key == null ? this.key : key, - deviceName: deviceName == null ? this.deviceName : deviceName); + CopyWith$Input$UseRecoveryKeyInput get copyWith => + CopyWith$Input$UseRecoveryKeyInput(this, (i) => i); +} + +abstract class CopyWith$Input$UseRecoveryKeyInput { + factory CopyWith$Input$UseRecoveryKeyInput(Input$UseRecoveryKeyInput instance, + TRes Function(Input$UseRecoveryKeyInput) then) = + _CopyWithImpl$Input$UseRecoveryKeyInput; + + factory CopyWith$Input$UseRecoveryKeyInput.stub(TRes res) = + _CopyWithStubImpl$Input$UseRecoveryKeyInput; + + TRes call({String? key, String? deviceName}); +} + +class _CopyWithImpl$Input$UseRecoveryKeyInput + implements CopyWith$Input$UseRecoveryKeyInput { + _CopyWithImpl$Input$UseRecoveryKeyInput(this._instance, this._then); + + final Input$UseRecoveryKeyInput _instance; + + final TRes Function(Input$UseRecoveryKeyInput) _then; + + static const _undefined = {}; + + TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => + _then(Input$UseRecoveryKeyInput( + key: key == _undefined || key == null + ? _instance.key + : (key as String), + deviceName: deviceName == _undefined || deviceName == null + ? _instance.deviceName + : (deviceName as String))); +} + +class _CopyWithStubImpl$Input$UseRecoveryKeyInput + implements CopyWith$Input$UseRecoveryKeyInput { + _CopyWithStubImpl$Input$UseRecoveryKeyInput(this._res); + + TRes _res; + + call({String? key, String? deviceName}) => _res; } @JsonSerializable(explicitToJson: true) @@ -363,10 +638,48 @@ class Input$UserMutationInput { return true; } - Input$UserMutationInput copyWith({String? username, String? password}) => - Input$UserMutationInput( - username: username == null ? this.username : username, - password: password == null ? this.password : password); + CopyWith$Input$UserMutationInput get copyWith => + CopyWith$Input$UserMutationInput(this, (i) => i); +} + +abstract class CopyWith$Input$UserMutationInput { + factory CopyWith$Input$UserMutationInput(Input$UserMutationInput instance, + TRes Function(Input$UserMutationInput) then) = + _CopyWithImpl$Input$UserMutationInput; + + factory CopyWith$Input$UserMutationInput.stub(TRes res) = + _CopyWithStubImpl$Input$UserMutationInput; + + TRes call({String? username, String? password}); +} + +class _CopyWithImpl$Input$UserMutationInput + implements CopyWith$Input$UserMutationInput { + _CopyWithImpl$Input$UserMutationInput(this._instance, this._then); + + final Input$UserMutationInput _instance; + + final TRes Function(Input$UserMutationInput) _then; + + static const _undefined = {}; + + TRes call({Object? username = _undefined, Object? password = _undefined}) => + _then(Input$UserMutationInput( + username: username == _undefined || username == null + ? _instance.username + : (username as String), + password: password == _undefined || password == null + ? _instance.password + : (password as String))); +} + +class _CopyWithStubImpl$Input$UserMutationInput + implements CopyWith$Input$UserMutationInput { + _CopyWithStubImpl$Input$UserMutationInput(this._res); + + TRes _res; + + call({String? username, String? password}) => _res; } enum Enum$DnsProvider { diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index c9d6fe1a..7e99910c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -62,13 +62,62 @@ class Fragment$basicMutationReturnFields { extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Fragment$basicMutationReturnFields( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Fragment$basicMutationReturnFields< + Fragment$basicMutationReturnFields> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields { + factory CopyWith$Fragment$basicMutationReturnFields( + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then) = + _CopyWithImpl$Fragment$basicMutationReturnFields; + + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + + final Fragment$basicMutationReturnFields _instance; + + final TRes Function(Fragment$basicMutationReturnFields) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Fragment$basicMutationReturnFields( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( @@ -174,11 +223,55 @@ class Query$GetApiVersion { } extension UtilityExtension$Query$GetApiVersion on Query$GetApiVersion { - Query$GetApiVersion copyWith( - {Query$GetApiVersion$api? api, String? $__typename}) => - Query$GetApiVersion( - api: api == null ? this.api : api, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetApiVersion get copyWith => + CopyWith$Query$GetApiVersion(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiVersion { + factory CopyWith$Query$GetApiVersion(Query$GetApiVersion instance, + TRes Function(Query$GetApiVersion) then) = + _CopyWithImpl$Query$GetApiVersion; + + factory CopyWith$Query$GetApiVersion.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiVersion; + + TRes call({Query$GetApiVersion$api? api, String? $__typename}); + CopyWith$Query$GetApiVersion$api get api; +} + +class _CopyWithImpl$Query$GetApiVersion + implements CopyWith$Query$GetApiVersion { + _CopyWithImpl$Query$GetApiVersion(this._instance, this._then); + + final Query$GetApiVersion _instance; + + final TRes Function(Query$GetApiVersion) _then; + + static const _undefined = {}; + + TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiVersion( + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiVersion$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetApiVersion$api get api { + final local$api = _instance.api; + return CopyWith$Query$GetApiVersion$api(local$api, (e) => call(api: e)); + } +} + +class _CopyWithStubImpl$Query$GetApiVersion + implements CopyWith$Query$GetApiVersion { + _CopyWithStubImpl$Query$GetApiVersion(this._res); + + TRes _res; + + call({Query$GetApiVersion$api? api, String? $__typename}) => _res; + CopyWith$Query$GetApiVersion$api get api => + CopyWith$Query$GetApiVersion$api.stub(_res); } const documentNodeQueryGetApiVersion = DocumentNode(definitions: [ @@ -336,10 +429,48 @@ class Query$GetApiVersion$api { } extension UtilityExtension$Query$GetApiVersion$api on Query$GetApiVersion$api { - Query$GetApiVersion$api copyWith({String? version, String? $__typename}) => - Query$GetApiVersion$api( - version: version == null ? this.version : version, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetApiVersion$api get copyWith => + CopyWith$Query$GetApiVersion$api(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiVersion$api { + factory CopyWith$Query$GetApiVersion$api(Query$GetApiVersion$api instance, + TRes Function(Query$GetApiVersion$api) then) = + _CopyWithImpl$Query$GetApiVersion$api; + + factory CopyWith$Query$GetApiVersion$api.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiVersion$api; + + TRes call({String? version, String? $__typename}); +} + +class _CopyWithImpl$Query$GetApiVersion$api + implements CopyWith$Query$GetApiVersion$api { + _CopyWithImpl$Query$GetApiVersion$api(this._instance, this._then); + + final Query$GetApiVersion$api _instance; + + final TRes Function(Query$GetApiVersion$api) _then; + + static const _undefined = {}; + + TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiVersion$api( + version: version == _undefined || version == null + ? _instance.version + : (version as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetApiVersion$api + implements CopyWith$Query$GetApiVersion$api { + _CopyWithStubImpl$Query$GetApiVersion$api(this._res); + + TRes _res; + + call({String? version, String? $__typename}) => _res; } @JsonSerializable(explicitToJson: true) @@ -378,11 +509,55 @@ class Query$GetApiJobs { } extension UtilityExtension$Query$GetApiJobs on Query$GetApiJobs { - Query$GetApiJobs copyWith( - {Query$GetApiJobs$jobs? jobs, String? $__typename}) => - Query$GetApiJobs( - jobs: jobs == null ? this.jobs : jobs, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetApiJobs get copyWith => + CopyWith$Query$GetApiJobs(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiJobs { + factory CopyWith$Query$GetApiJobs( + Query$GetApiJobs instance, TRes Function(Query$GetApiJobs) then) = + _CopyWithImpl$Query$GetApiJobs; + + factory CopyWith$Query$GetApiJobs.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiJobs; + + TRes call({Query$GetApiJobs$jobs? jobs, String? $__typename}); + CopyWith$Query$GetApiJobs$jobs get jobs; +} + +class _CopyWithImpl$Query$GetApiJobs + implements CopyWith$Query$GetApiJobs { + _CopyWithImpl$Query$GetApiJobs(this._instance, this._then); + + final Query$GetApiJobs _instance; + + final TRes Function(Query$GetApiJobs) _then; + + static const _undefined = {}; + + TRes call({Object? jobs = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiJobs( + jobs: jobs == _undefined || jobs == null + ? _instance.jobs + : (jobs as Query$GetApiJobs$jobs), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetApiJobs$jobs get jobs { + final local$jobs = _instance.jobs; + return CopyWith$Query$GetApiJobs$jobs(local$jobs, (e) => call(jobs: e)); + } +} + +class _CopyWithStubImpl$Query$GetApiJobs + implements CopyWith$Query$GetApiJobs { + _CopyWithStubImpl$Query$GetApiJobs(this._res); + + TRes _res; + + call({Query$GetApiJobs$jobs? jobs, String? $__typename}) => _res; + CopyWith$Query$GetApiJobs$jobs get jobs => + CopyWith$Query$GetApiJobs$jobs.stub(_res); } const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ @@ -617,12 +792,67 @@ class Query$GetApiJobs$jobs { } extension UtilityExtension$Query$GetApiJobs$jobs on Query$GetApiJobs$jobs { - Query$GetApiJobs$jobs copyWith( - {List? getJobs, - String? $__typename}) => - Query$GetApiJobs$jobs( - getJobs: getJobs == null ? this.getJobs : getJobs, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetApiJobs$jobs get copyWith => + CopyWith$Query$GetApiJobs$jobs(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiJobs$jobs { + factory CopyWith$Query$GetApiJobs$jobs(Query$GetApiJobs$jobs instance, + TRes Function(Query$GetApiJobs$jobs) then) = + _CopyWithImpl$Query$GetApiJobs$jobs; + + factory CopyWith$Query$GetApiJobs$jobs.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiJobs$jobs; + + TRes call( + {List? getJobs, String? $__typename}); + TRes getJobs( + Iterable Function( + Iterable< + CopyWith$Query$GetApiJobs$jobs$getJobs< + Query$GetApiJobs$jobs$getJobs>>) + _fn); +} + +class _CopyWithImpl$Query$GetApiJobs$jobs + implements CopyWith$Query$GetApiJobs$jobs { + _CopyWithImpl$Query$GetApiJobs$jobs(this._instance, this._then); + + final Query$GetApiJobs$jobs _instance; + + final TRes Function(Query$GetApiJobs$jobs) _then; + + static const _undefined = {}; + + TRes call({Object? getJobs = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiJobs$jobs( + getJobs: getJobs == _undefined || getJobs == null + ? _instance.getJobs + : (getJobs as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes getJobs( + Iterable Function( + Iterable< + CopyWith$Query$GetApiJobs$jobs$getJobs< + Query$GetApiJobs$jobs$getJobs>>) + _fn) => + call( + getJobs: _fn(_instance.getJobs.map( + (e) => CopyWith$Query$GetApiJobs$jobs$getJobs(e, (i) => i))) + .toList()); +} + +class _CopyWithStubImpl$Query$GetApiJobs$jobs + implements CopyWith$Query$GetApiJobs$jobs { + _CopyWithStubImpl$Query$GetApiJobs$jobs(this._res); + + TRes _res; + + call({List? getJobs, String? $__typename}) => + _res; + getJobs(_fn) => _res; } @JsonSerializable(explicitToJson: true) @@ -751,32 +981,111 @@ class Query$GetApiJobs$jobs$getJobs { extension UtilityExtension$Query$GetApiJobs$jobs$getJobs on Query$GetApiJobs$jobs$getJobs { - Query$GetApiJobs$jobs$getJobs copyWith( + CopyWith$Query$GetApiJobs$jobs$getJobs + get copyWith => CopyWith$Query$GetApiJobs$jobs$getJobs(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiJobs$jobs$getJobs { + factory CopyWith$Query$GetApiJobs$jobs$getJobs( + Query$GetApiJobs$jobs$getJobs instance, + TRes Function(Query$GetApiJobs$jobs$getJobs) then) = + _CopyWithImpl$Query$GetApiJobs$jobs$getJobs; + + factory CopyWith$Query$GetApiJobs$jobs$getJobs.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs; + + TRes call( + {DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}); +} + +class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs + implements CopyWith$Query$GetApiJobs$jobs$getJobs { + _CopyWithImpl$Query$GetApiJobs$jobs$getJobs(this._instance, this._then); + + final Query$GetApiJobs$jobs$getJobs _instance; + + final TRes Function(Query$GetApiJobs$jobs$getJobs) _then; + + static const _undefined = {}; + + TRes call( + {Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetApiJobs$jobs$getJobs( + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null + ? _instance.uid + : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs + implements CopyWith$Query$GetApiJobs$jobs$getJobs { + _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs(this._res); + + TRes _res; + + call( {DateTime? createdAt, String? description, - String? Function()? error, - DateTime? Function()? finishedAt, + String? error, + DateTime? finishedAt, String? name, - int? Function()? progress, - String? Function()? result, + int? progress, + String? result, String? status, - String? Function()? statusText, + String? statusText, String? uid, DateTime? updatedAt, String? $__typename}) => - Query$GetApiJobs$jobs$getJobs( - createdAt: createdAt == null ? this.createdAt : createdAt, - description: description == null ? this.description : description, - error: error == null ? this.error : error(), - finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), - name: name == null ? this.name : name, - progress: progress == null ? this.progress : progress(), - result: result == null ? this.result : result(), - status: status == null ? this.status : status, - statusText: statusText == null ? this.statusText : statusText(), - uid: uid == null ? this.uid : uid, - updatedAt: updatedAt == null ? this.updatedAt : updatedAt, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -806,8 +1115,45 @@ class Variables$Mutation$RemoveJob { return true; } - Variables$Mutation$RemoveJob copyWith({String? jobId}) => - Variables$Mutation$RemoveJob(jobId: jobId == null ? this.jobId : jobId); + CopyWith$Variables$Mutation$RemoveJob + get copyWith => CopyWith$Variables$Mutation$RemoveJob(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$RemoveJob { + factory CopyWith$Variables$Mutation$RemoveJob( + Variables$Mutation$RemoveJob instance, + TRes Function(Variables$Mutation$RemoveJob) then) = + _CopyWithImpl$Variables$Mutation$RemoveJob; + + factory CopyWith$Variables$Mutation$RemoveJob.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$RemoveJob; + + TRes call({String? jobId}); +} + +class _CopyWithImpl$Variables$Mutation$RemoveJob + implements CopyWith$Variables$Mutation$RemoveJob { + _CopyWithImpl$Variables$Mutation$RemoveJob(this._instance, this._then); + + final Variables$Mutation$RemoveJob _instance; + + final TRes Function(Variables$Mutation$RemoveJob) _then; + + static const _undefined = {}; + + TRes call({Object? jobId = _undefined}) => _then(Variables$Mutation$RemoveJob( + jobId: jobId == _undefined || jobId == null + ? _instance.jobId + : (jobId as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$RemoveJob + implements CopyWith$Variables$Mutation$RemoveJob { + _CopyWithStubImpl$Variables$Mutation$RemoveJob(this._res); + + TRes _res; + + call({String? jobId}) => _res; } @JsonSerializable(explicitToJson: true) @@ -846,11 +1192,57 @@ class Mutation$RemoveJob { } extension UtilityExtension$Mutation$RemoveJob on Mutation$RemoveJob { - Mutation$RemoveJob copyWith( - {Mutation$RemoveJob$removeJob? removeJob, String? $__typename}) => - Mutation$RemoveJob( - removeJob: removeJob == null ? this.removeJob : removeJob, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$RemoveJob get copyWith => + CopyWith$Mutation$RemoveJob(this, (i) => i); +} + +abstract class CopyWith$Mutation$RemoveJob { + factory CopyWith$Mutation$RemoveJob( + Mutation$RemoveJob instance, TRes Function(Mutation$RemoveJob) then) = + _CopyWithImpl$Mutation$RemoveJob; + + factory CopyWith$Mutation$RemoveJob.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveJob; + + TRes call({Mutation$RemoveJob$removeJob? removeJob, String? $__typename}); + CopyWith$Mutation$RemoveJob$removeJob get removeJob; +} + +class _CopyWithImpl$Mutation$RemoveJob + implements CopyWith$Mutation$RemoveJob { + _CopyWithImpl$Mutation$RemoveJob(this._instance, this._then); + + final Mutation$RemoveJob _instance; + + final TRes Function(Mutation$RemoveJob) _then; + + static const _undefined = {}; + + TRes call( + {Object? removeJob = _undefined, Object? $__typename = _undefined}) => + _then(Mutation$RemoveJob( + removeJob: removeJob == _undefined || removeJob == null + ? _instance.removeJob + : (removeJob as Mutation$RemoveJob$removeJob), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RemoveJob$removeJob get removeJob { + final local$removeJob = _instance.removeJob; + return CopyWith$Mutation$RemoveJob$removeJob( + local$removeJob, (e) => call(removeJob: e)); + } +} + +class _CopyWithStubImpl$Mutation$RemoveJob + implements CopyWith$Mutation$RemoveJob { + _CopyWithStubImpl$Mutation$RemoveJob(this._res); + + TRes _res; + + call({Mutation$RemoveJob$removeJob? removeJob, String? $__typename}) => _res; + CopyWith$Mutation$RemoveJob$removeJob get removeJob => + CopyWith$Mutation$RemoveJob$removeJob.stub(_res); } const documentNodeMutationRemoveJob = DocumentNode(definitions: [ @@ -1036,13 +1428,60 @@ class Mutation$RemoveJob$removeJob extension UtilityExtension$Mutation$RemoveJob$removeJob on Mutation$RemoveJob$removeJob { - Mutation$RemoveJob$removeJob copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$RemoveJob$removeJob( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$RemoveJob$removeJob + get copyWith => CopyWith$Mutation$RemoveJob$removeJob(this, (i) => i); +} + +abstract class CopyWith$Mutation$RemoveJob$removeJob { + factory CopyWith$Mutation$RemoveJob$removeJob( + Mutation$RemoveJob$removeJob instance, + TRes Function(Mutation$RemoveJob$removeJob) then) = + _CopyWithImpl$Mutation$RemoveJob$removeJob; + + factory CopyWith$Mutation$RemoveJob$removeJob.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveJob$removeJob; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$RemoveJob$removeJob + implements CopyWith$Mutation$RemoveJob$removeJob { + _CopyWithImpl$Mutation$RemoveJob$removeJob(this._instance, this._then); + + final Mutation$RemoveJob$removeJob _instance; + + final TRes Function(Mutation$RemoveJob$removeJob) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RemoveJob$removeJob( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$RemoveJob$removeJob + implements CopyWith$Mutation$RemoveJob$removeJob { + _CopyWithStubImpl$Mutation$RemoveJob$removeJob(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1083,14 +1522,68 @@ class Mutation$RunSystemRebuild { extension UtilityExtension$Mutation$RunSystemRebuild on Mutation$RunSystemRebuild { - Mutation$RunSystemRebuild copyWith( + CopyWith$Mutation$RunSystemRebuild get copyWith => + CopyWith$Mutation$RunSystemRebuild(this, (i) => i); +} + +abstract class CopyWith$Mutation$RunSystemRebuild { + factory CopyWith$Mutation$RunSystemRebuild(Mutation$RunSystemRebuild instance, + TRes Function(Mutation$RunSystemRebuild) then) = + _CopyWithImpl$Mutation$RunSystemRebuild; + + factory CopyWith$Mutation$RunSystemRebuild.stub(TRes res) = + _CopyWithStubImpl$Mutation$RunSystemRebuild; + + TRes call( + {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, + String? $__typename}); + CopyWith$Mutation$RunSystemRebuild$runSystemRebuild + get runSystemRebuild; +} + +class _CopyWithImpl$Mutation$RunSystemRebuild + implements CopyWith$Mutation$RunSystemRebuild { + _CopyWithImpl$Mutation$RunSystemRebuild(this._instance, this._then); + + final Mutation$RunSystemRebuild _instance; + + final TRes Function(Mutation$RunSystemRebuild) _then; + + static const _undefined = {}; + + TRes call( + {Object? runSystemRebuild = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RunSystemRebuild( + runSystemRebuild: + runSystemRebuild == _undefined || runSystemRebuild == null + ? _instance.runSystemRebuild + : (runSystemRebuild + as Mutation$RunSystemRebuild$runSystemRebuild), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RunSystemRebuild$runSystemRebuild + get runSystemRebuild { + final local$runSystemRebuild = _instance.runSystemRebuild; + return CopyWith$Mutation$RunSystemRebuild$runSystemRebuild( + local$runSystemRebuild, (e) => call(runSystemRebuild: e)); + } +} + +class _CopyWithStubImpl$Mutation$RunSystemRebuild + implements CopyWith$Mutation$RunSystemRebuild { + _CopyWithStubImpl$Mutation$RunSystemRebuild(this._res); + + TRes _res; + + call( {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, String? $__typename}) => - Mutation$RunSystemRebuild( - runSystemRebuild: runSystemRebuild == null - ? this.runSystemRebuild - : runSystemRebuild, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$RunSystemRebuild$runSystemRebuild + get runSystemRebuild => + CopyWith$Mutation$RunSystemRebuild$runSystemRebuild.stub(_res); } const documentNodeMutationRunSystemRebuild = DocumentNode(definitions: [ @@ -1269,13 +1762,63 @@ class Mutation$RunSystemRebuild$runSystemRebuild extension UtilityExtension$Mutation$RunSystemRebuild$runSystemRebuild on Mutation$RunSystemRebuild$runSystemRebuild { - Mutation$RunSystemRebuild$runSystemRebuild copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$RunSystemRebuild$runSystemRebuild( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$RunSystemRebuild$runSystemRebuild< + Mutation$RunSystemRebuild$runSystemRebuild> + get copyWith => + CopyWith$Mutation$RunSystemRebuild$runSystemRebuild(this, (i) => i); +} + +abstract class CopyWith$Mutation$RunSystemRebuild$runSystemRebuild { + factory CopyWith$Mutation$RunSystemRebuild$runSystemRebuild( + Mutation$RunSystemRebuild$runSystemRebuild instance, + TRes Function(Mutation$RunSystemRebuild$runSystemRebuild) then) = + _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild; + + factory CopyWith$Mutation$RunSystemRebuild$runSystemRebuild.stub(TRes res) = + _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild + implements CopyWith$Mutation$RunSystemRebuild$runSystemRebuild { + _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild( + this._instance, this._then); + + final Mutation$RunSystemRebuild$runSystemRebuild _instance; + + final TRes Function(Mutation$RunSystemRebuild$runSystemRebuild) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RunSystemRebuild$runSystemRebuild( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild + implements CopyWith$Mutation$RunSystemRebuild$runSystemRebuild { + _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1316,14 +1859,69 @@ class Mutation$RunSystemRollback { extension UtilityExtension$Mutation$RunSystemRollback on Mutation$RunSystemRollback { - Mutation$RunSystemRollback copyWith( + CopyWith$Mutation$RunSystemRollback + get copyWith => CopyWith$Mutation$RunSystemRollback(this, (i) => i); +} + +abstract class CopyWith$Mutation$RunSystemRollback { + factory CopyWith$Mutation$RunSystemRollback( + Mutation$RunSystemRollback instance, + TRes Function(Mutation$RunSystemRollback) then) = + _CopyWithImpl$Mutation$RunSystemRollback; + + factory CopyWith$Mutation$RunSystemRollback.stub(TRes res) = + _CopyWithStubImpl$Mutation$RunSystemRollback; + + TRes call( + {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, + String? $__typename}); + CopyWith$Mutation$RunSystemRollback$runSystemRollback + get runSystemRollback; +} + +class _CopyWithImpl$Mutation$RunSystemRollback + implements CopyWith$Mutation$RunSystemRollback { + _CopyWithImpl$Mutation$RunSystemRollback(this._instance, this._then); + + final Mutation$RunSystemRollback _instance; + + final TRes Function(Mutation$RunSystemRollback) _then; + + static const _undefined = {}; + + TRes call( + {Object? runSystemRollback = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RunSystemRollback( + runSystemRollback: + runSystemRollback == _undefined || runSystemRollback == null + ? _instance.runSystemRollback + : (runSystemRollback + as Mutation$RunSystemRollback$runSystemRollback), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RunSystemRollback$runSystemRollback + get runSystemRollback { + final local$runSystemRollback = _instance.runSystemRollback; + return CopyWith$Mutation$RunSystemRollback$runSystemRollback( + local$runSystemRollback, (e) => call(runSystemRollback: e)); + } +} + +class _CopyWithStubImpl$Mutation$RunSystemRollback + implements CopyWith$Mutation$RunSystemRollback { + _CopyWithStubImpl$Mutation$RunSystemRollback(this._res); + + TRes _res; + + call( {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, String? $__typename}) => - Mutation$RunSystemRollback( - runSystemRollback: runSystemRollback == null - ? this.runSystemRollback - : runSystemRollback, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$RunSystemRollback$runSystemRollback + get runSystemRollback => + CopyWith$Mutation$RunSystemRollback$runSystemRollback.stub(_res); } const documentNodeMutationRunSystemRollback = DocumentNode(definitions: [ @@ -1502,13 +2100,63 @@ class Mutation$RunSystemRollback$runSystemRollback extension UtilityExtension$Mutation$RunSystemRollback$runSystemRollback on Mutation$RunSystemRollback$runSystemRollback { - Mutation$RunSystemRollback$runSystemRollback copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$RunSystemRollback$runSystemRollback( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$RunSystemRollback$runSystemRollback< + Mutation$RunSystemRollback$runSystemRollback> + get copyWith => + CopyWith$Mutation$RunSystemRollback$runSystemRollback(this, (i) => i); +} + +abstract class CopyWith$Mutation$RunSystemRollback$runSystemRollback { + factory CopyWith$Mutation$RunSystemRollback$runSystemRollback( + Mutation$RunSystemRollback$runSystemRollback instance, + TRes Function(Mutation$RunSystemRollback$runSystemRollback) then) = + _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback; + + factory CopyWith$Mutation$RunSystemRollback$runSystemRollback.stub(TRes res) = + _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback + implements CopyWith$Mutation$RunSystemRollback$runSystemRollback { + _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback( + this._instance, this._then); + + final Mutation$RunSystemRollback$runSystemRollback _instance; + + final TRes Function(Mutation$RunSystemRollback$runSystemRollback) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RunSystemRollback$runSystemRollback( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback + implements CopyWith$Mutation$RunSystemRollback$runSystemRollback { + _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1549,14 +2197,68 @@ class Mutation$RunSystemUpgrade { extension UtilityExtension$Mutation$RunSystemUpgrade on Mutation$RunSystemUpgrade { - Mutation$RunSystemUpgrade copyWith( + CopyWith$Mutation$RunSystemUpgrade get copyWith => + CopyWith$Mutation$RunSystemUpgrade(this, (i) => i); +} + +abstract class CopyWith$Mutation$RunSystemUpgrade { + factory CopyWith$Mutation$RunSystemUpgrade(Mutation$RunSystemUpgrade instance, + TRes Function(Mutation$RunSystemUpgrade) then) = + _CopyWithImpl$Mutation$RunSystemUpgrade; + + factory CopyWith$Mutation$RunSystemUpgrade.stub(TRes res) = + _CopyWithStubImpl$Mutation$RunSystemUpgrade; + + TRes call( + {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, + String? $__typename}); + CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade + get runSystemUpgrade; +} + +class _CopyWithImpl$Mutation$RunSystemUpgrade + implements CopyWith$Mutation$RunSystemUpgrade { + _CopyWithImpl$Mutation$RunSystemUpgrade(this._instance, this._then); + + final Mutation$RunSystemUpgrade _instance; + + final TRes Function(Mutation$RunSystemUpgrade) _then; + + static const _undefined = {}; + + TRes call( + {Object? runSystemUpgrade = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RunSystemUpgrade( + runSystemUpgrade: + runSystemUpgrade == _undefined || runSystemUpgrade == null + ? _instance.runSystemUpgrade + : (runSystemUpgrade + as Mutation$RunSystemUpgrade$runSystemUpgrade), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade + get runSystemUpgrade { + final local$runSystemUpgrade = _instance.runSystemUpgrade; + return CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade( + local$runSystemUpgrade, (e) => call(runSystemUpgrade: e)); + } +} + +class _CopyWithStubImpl$Mutation$RunSystemUpgrade + implements CopyWith$Mutation$RunSystemUpgrade { + _CopyWithStubImpl$Mutation$RunSystemUpgrade(this._res); + + TRes _res; + + call( {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, String? $__typename}) => - Mutation$RunSystemUpgrade( - runSystemUpgrade: runSystemUpgrade == null - ? this.runSystemUpgrade - : runSystemUpgrade, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade + get runSystemUpgrade => + CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade.stub(_res); } const documentNodeMutationRunSystemUpgrade = DocumentNode(definitions: [ @@ -1735,13 +2437,63 @@ class Mutation$RunSystemUpgrade$runSystemUpgrade extension UtilityExtension$Mutation$RunSystemUpgrade$runSystemUpgrade on Mutation$RunSystemUpgrade$runSystemUpgrade { - Mutation$RunSystemUpgrade$runSystemUpgrade copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$RunSystemUpgrade$runSystemUpgrade( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade< + Mutation$RunSystemUpgrade$runSystemUpgrade> + get copyWith => + CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade(this, (i) => i); +} + +abstract class CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade { + factory CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade( + Mutation$RunSystemUpgrade$runSystemUpgrade instance, + TRes Function(Mutation$RunSystemUpgrade$runSystemUpgrade) then) = + _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; + + factory CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade.stub(TRes res) = + _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade + implements CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade { + _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade( + this._instance, this._then); + + final Mutation$RunSystemUpgrade$runSystemUpgrade _instance; + + final TRes Function(Mutation$RunSystemUpgrade$runSystemUpgrade) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RunSystemUpgrade$runSystemUpgrade( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade + implements CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade { + _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1783,15 +2535,72 @@ class Mutation$PullRepositoryChanges { extension UtilityExtension$Mutation$PullRepositoryChanges on Mutation$PullRepositoryChanges { - Mutation$PullRepositoryChanges copyWith( + CopyWith$Mutation$PullRepositoryChanges + get copyWith => CopyWith$Mutation$PullRepositoryChanges(this, (i) => i); +} + +abstract class CopyWith$Mutation$PullRepositoryChanges { + factory CopyWith$Mutation$PullRepositoryChanges( + Mutation$PullRepositoryChanges instance, + TRes Function(Mutation$PullRepositoryChanges) then) = + _CopyWithImpl$Mutation$PullRepositoryChanges; + + factory CopyWith$Mutation$PullRepositoryChanges.stub(TRes res) = + _CopyWithStubImpl$Mutation$PullRepositoryChanges; + + TRes call( + {Mutation$PullRepositoryChanges$pullRepositoryChanges? + pullRepositoryChanges, + String? $__typename}); + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges + get pullRepositoryChanges; +} + +class _CopyWithImpl$Mutation$PullRepositoryChanges + implements CopyWith$Mutation$PullRepositoryChanges { + _CopyWithImpl$Mutation$PullRepositoryChanges(this._instance, this._then); + + final Mutation$PullRepositoryChanges _instance; + + final TRes Function(Mutation$PullRepositoryChanges) _then; + + static const _undefined = {}; + + TRes call( + {Object? pullRepositoryChanges = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$PullRepositoryChanges( + pullRepositoryChanges: pullRepositoryChanges == _undefined || + pullRepositoryChanges == null + ? _instance.pullRepositoryChanges + : (pullRepositoryChanges + as Mutation$PullRepositoryChanges$pullRepositoryChanges), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges + get pullRepositoryChanges { + final local$pullRepositoryChanges = _instance.pullRepositoryChanges; + return CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges( + local$pullRepositoryChanges, (e) => call(pullRepositoryChanges: e)); + } +} + +class _CopyWithStubImpl$Mutation$PullRepositoryChanges + implements CopyWith$Mutation$PullRepositoryChanges { + _CopyWithStubImpl$Mutation$PullRepositoryChanges(this._res); + + TRes _res; + + call( {Mutation$PullRepositoryChanges$pullRepositoryChanges? pullRepositoryChanges, String? $__typename}) => - Mutation$PullRepositoryChanges( - pullRepositoryChanges: pullRepositoryChanges == null - ? this.pullRepositoryChanges - : pullRepositoryChanges, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges + get pullRepositoryChanges => + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges.stub( + _res); } const documentNodeMutationPullRepositoryChanges = DocumentNode(definitions: [ @@ -1974,13 +2783,72 @@ class Mutation$PullRepositoryChanges$pullRepositoryChanges extension UtilityExtension$Mutation$PullRepositoryChanges$pullRepositoryChanges on Mutation$PullRepositoryChanges$pullRepositoryChanges { - Mutation$PullRepositoryChanges$pullRepositoryChanges copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$PullRepositoryChanges$pullRepositoryChanges( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges< + Mutation$PullRepositoryChanges$pullRepositoryChanges> + get copyWith => + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges( + this, (i) => i); +} + +abstract class CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges< + TRes> { + factory CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges( + Mutation$PullRepositoryChanges$pullRepositoryChanges instance, + TRes Function(Mutation$PullRepositoryChanges$pullRepositoryChanges) + then) = + _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; + + factory CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges.stub( + TRes res) = + _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges + implements + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges { + _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges( + this._instance, this._then); + + final Mutation$PullRepositoryChanges$pullRepositoryChanges _instance; + + final TRes Function(Mutation$PullRepositoryChanges$pullRepositoryChanges) + _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$PullRepositoryChanges$pullRepositoryChanges( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges< + TRes> + implements + CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges { + _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges( + this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -2020,12 +2888,62 @@ class Mutation$RebootSystem { } extension UtilityExtension$Mutation$RebootSystem on Mutation$RebootSystem { - Mutation$RebootSystem copyWith( + CopyWith$Mutation$RebootSystem get copyWith => + CopyWith$Mutation$RebootSystem(this, (i) => i); +} + +abstract class CopyWith$Mutation$RebootSystem { + factory CopyWith$Mutation$RebootSystem(Mutation$RebootSystem instance, + TRes Function(Mutation$RebootSystem) then) = + _CopyWithImpl$Mutation$RebootSystem; + + factory CopyWith$Mutation$RebootSystem.stub(TRes res) = + _CopyWithStubImpl$Mutation$RebootSystem; + + TRes call( + {Mutation$RebootSystem$rebootSystem? rebootSystem, String? $__typename}); + CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem; +} + +class _CopyWithImpl$Mutation$RebootSystem + implements CopyWith$Mutation$RebootSystem { + _CopyWithImpl$Mutation$RebootSystem(this._instance, this._then); + + final Mutation$RebootSystem _instance; + + final TRes Function(Mutation$RebootSystem) _then; + + static const _undefined = {}; + + TRes call( + {Object? rebootSystem = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RebootSystem( + rebootSystem: rebootSystem == _undefined || rebootSystem == null + ? _instance.rebootSystem + : (rebootSystem as Mutation$RebootSystem$rebootSystem), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem { + final local$rebootSystem = _instance.rebootSystem; + return CopyWith$Mutation$RebootSystem$rebootSystem( + local$rebootSystem, (e) => call(rebootSystem: e)); + } +} + +class _CopyWithStubImpl$Mutation$RebootSystem + implements CopyWith$Mutation$RebootSystem { + _CopyWithStubImpl$Mutation$RebootSystem(this._res); + + TRes _res; + + call( {Mutation$RebootSystem$rebootSystem? rebootSystem, String? $__typename}) => - Mutation$RebootSystem( - rebootSystem: rebootSystem == null ? this.rebootSystem : rebootSystem, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem => + CopyWith$Mutation$RebootSystem$rebootSystem.stub(_res); } const documentNodeMutationRebootSystem = DocumentNode(definitions: [ @@ -2202,13 +3120,62 @@ class Mutation$RebootSystem$rebootSystem extension UtilityExtension$Mutation$RebootSystem$rebootSystem on Mutation$RebootSystem$rebootSystem { - Mutation$RebootSystem$rebootSystem copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$RebootSystem$rebootSystem( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$RebootSystem$rebootSystem< + Mutation$RebootSystem$rebootSystem> + get copyWith => + CopyWith$Mutation$RebootSystem$rebootSystem(this, (i) => i); +} + +abstract class CopyWith$Mutation$RebootSystem$rebootSystem { + factory CopyWith$Mutation$RebootSystem$rebootSystem( + Mutation$RebootSystem$rebootSystem instance, + TRes Function(Mutation$RebootSystem$rebootSystem) then) = + _CopyWithImpl$Mutation$RebootSystem$rebootSystem; + + factory CopyWith$Mutation$RebootSystem$rebootSystem.stub(TRes res) = + _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$RebootSystem$rebootSystem + implements CopyWith$Mutation$RebootSystem$rebootSystem { + _CopyWithImpl$Mutation$RebootSystem$rebootSystem(this._instance, this._then); + + final Mutation$RebootSystem$rebootSystem _instance; + + final TRes Function(Mutation$RebootSystem$rebootSystem) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RebootSystem$rebootSystem( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem + implements CopyWith$Mutation$RebootSystem$rebootSystem { + _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -2247,11 +3214,55 @@ class Query$GetApiTokens { } extension UtilityExtension$Query$GetApiTokens on Query$GetApiTokens { - Query$GetApiTokens copyWith( - {Query$GetApiTokens$api? api, String? $__typename}) => - Query$GetApiTokens( - api: api == null ? this.api : api, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetApiTokens get copyWith => + CopyWith$Query$GetApiTokens(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiTokens { + factory CopyWith$Query$GetApiTokens( + Query$GetApiTokens instance, TRes Function(Query$GetApiTokens) then) = + _CopyWithImpl$Query$GetApiTokens; + + factory CopyWith$Query$GetApiTokens.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiTokens; + + TRes call({Query$GetApiTokens$api? api, String? $__typename}); + CopyWith$Query$GetApiTokens$api get api; +} + +class _CopyWithImpl$Query$GetApiTokens + implements CopyWith$Query$GetApiTokens { + _CopyWithImpl$Query$GetApiTokens(this._instance, this._then); + + final Query$GetApiTokens _instance; + + final TRes Function(Query$GetApiTokens) _then; + + static const _undefined = {}; + + TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiTokens( + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiTokens$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetApiTokens$api get api { + final local$api = _instance.api; + return CopyWith$Query$GetApiTokens$api(local$api, (e) => call(api: e)); + } +} + +class _CopyWithStubImpl$Query$GetApiTokens + implements CopyWith$Query$GetApiTokens { + _CopyWithStubImpl$Query$GetApiTokens(this._res); + + TRes _res; + + call({Query$GetApiTokens$api? api, String? $__typename}) => _res; + CopyWith$Query$GetApiTokens$api get api => + CopyWith$Query$GetApiTokens$api.stub(_res); } const documentNodeQueryGetApiTokens = DocumentNode(definitions: [ @@ -2441,12 +3452,67 @@ class Query$GetApiTokens$api { } extension UtilityExtension$Query$GetApiTokens$api on Query$GetApiTokens$api { - Query$GetApiTokens$api copyWith( - {List? devices, - String? $__typename}) => - Query$GetApiTokens$api( - devices: devices == null ? this.devices : devices, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetApiTokens$api get copyWith => + CopyWith$Query$GetApiTokens$api(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiTokens$api { + factory CopyWith$Query$GetApiTokens$api(Query$GetApiTokens$api instance, + TRes Function(Query$GetApiTokens$api) then) = + _CopyWithImpl$Query$GetApiTokens$api; + + factory CopyWith$Query$GetApiTokens$api.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiTokens$api; + + TRes call( + {List? devices, String? $__typename}); + TRes devices( + Iterable Function( + Iterable< + CopyWith$Query$GetApiTokens$api$devices< + Query$GetApiTokens$api$devices>>) + _fn); +} + +class _CopyWithImpl$Query$GetApiTokens$api + implements CopyWith$Query$GetApiTokens$api { + _CopyWithImpl$Query$GetApiTokens$api(this._instance, this._then); + + final Query$GetApiTokens$api _instance; + + final TRes Function(Query$GetApiTokens$api) _then; + + static const _undefined = {}; + + TRes call({Object? devices = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetApiTokens$api( + devices: devices == _undefined || devices == null + ? _instance.devices + : (devices as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes devices( + Iterable Function( + Iterable< + CopyWith$Query$GetApiTokens$api$devices< + Query$GetApiTokens$api$devices>>) + _fn) => + call( + devices: _fn(_instance.devices.map( + (e) => CopyWith$Query$GetApiTokens$api$devices(e, (i) => i))) + .toList()); +} + +class _CopyWithStubImpl$Query$GetApiTokens$api + implements CopyWith$Query$GetApiTokens$api { + _CopyWithStubImpl$Query$GetApiTokens$api(this._res); + + TRes _res; + + call({List? devices, String? $__typename}) => + _res; + devices(_fn) => _res; } @JsonSerializable(explicitToJson: true) @@ -2503,16 +3569,68 @@ class Query$GetApiTokens$api$devices { extension UtilityExtension$Query$GetApiTokens$api$devices on Query$GetApiTokens$api$devices { - Query$GetApiTokens$api$devices copyWith( + CopyWith$Query$GetApiTokens$api$devices + get copyWith => CopyWith$Query$GetApiTokens$api$devices(this, (i) => i); +} + +abstract class CopyWith$Query$GetApiTokens$api$devices { + factory CopyWith$Query$GetApiTokens$api$devices( + Query$GetApiTokens$api$devices instance, + TRes Function(Query$GetApiTokens$api$devices) then) = + _CopyWithImpl$Query$GetApiTokens$api$devices; + + factory CopyWith$Query$GetApiTokens$api$devices.stub(TRes res) = + _CopyWithStubImpl$Query$GetApiTokens$api$devices; + + TRes call( + {DateTime? creationDate, + bool? isCaller, + String? name, + String? $__typename}); +} + +class _CopyWithImpl$Query$GetApiTokens$api$devices + implements CopyWith$Query$GetApiTokens$api$devices { + _CopyWithImpl$Query$GetApiTokens$api$devices(this._instance, this._then); + + final Query$GetApiTokens$api$devices _instance; + + final TRes Function(Query$GetApiTokens$api$devices) _then; + + static const _undefined = {}; + + TRes call( + {Object? creationDate = _undefined, + Object? isCaller = _undefined, + Object? name = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetApiTokens$api$devices( + creationDate: creationDate == _undefined || creationDate == null + ? _instance.creationDate + : (creationDate as DateTime), + isCaller: isCaller == _undefined || isCaller == null + ? _instance.isCaller + : (isCaller as bool), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetApiTokens$api$devices + implements CopyWith$Query$GetApiTokens$api$devices { + _CopyWithStubImpl$Query$GetApiTokens$api$devices(this._res); + + TRes _res; + + call( {DateTime? creationDate, bool? isCaller, String? name, String? $__typename}) => - Query$GetApiTokens$api$devices( - creationDate: creationDate == null ? this.creationDate : creationDate, - isCaller: isCaller == null ? this.isCaller : isCaller, - name: name == null ? this.name : name, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -2551,11 +3669,55 @@ class Query$RecoveryKey { } extension UtilityExtension$Query$RecoveryKey on Query$RecoveryKey { - Query$RecoveryKey copyWith( - {Query$RecoveryKey$api? api, String? $__typename}) => - Query$RecoveryKey( - api: api == null ? this.api : api, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$RecoveryKey get copyWith => + CopyWith$Query$RecoveryKey(this, (i) => i); +} + +abstract class CopyWith$Query$RecoveryKey { + factory CopyWith$Query$RecoveryKey( + Query$RecoveryKey instance, TRes Function(Query$RecoveryKey) then) = + _CopyWithImpl$Query$RecoveryKey; + + factory CopyWith$Query$RecoveryKey.stub(TRes res) = + _CopyWithStubImpl$Query$RecoveryKey; + + TRes call({Query$RecoveryKey$api? api, String? $__typename}); + CopyWith$Query$RecoveryKey$api get api; +} + +class _CopyWithImpl$Query$RecoveryKey + implements CopyWith$Query$RecoveryKey { + _CopyWithImpl$Query$RecoveryKey(this._instance, this._then); + + final Query$RecoveryKey _instance; + + final TRes Function(Query$RecoveryKey) _then; + + static const _undefined = {}; + + TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + _then(Query$RecoveryKey( + api: api == _undefined || api == null + ? _instance.api + : (api as Query$RecoveryKey$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$RecoveryKey$api get api { + final local$api = _instance.api; + return CopyWith$Query$RecoveryKey$api(local$api, (e) => call(api: e)); + } +} + +class _CopyWithStubImpl$Query$RecoveryKey + implements CopyWith$Query$RecoveryKey { + _CopyWithStubImpl$Query$RecoveryKey(this._res); + + TRes _res; + + call({Query$RecoveryKey$api? api, String? $__typename}) => _res; + CopyWith$Query$RecoveryKey$api get api => + CopyWith$Query$RecoveryKey$api.stub(_res); } const documentNodeQueryRecoveryKey = DocumentNode(definitions: [ @@ -2748,12 +3910,60 @@ class Query$RecoveryKey$api { } extension UtilityExtension$Query$RecoveryKey$api on Query$RecoveryKey$api { - Query$RecoveryKey$api copyWith( - {Query$RecoveryKey$api$recoveryKey? recoveryKey, - String? $__typename}) => - Query$RecoveryKey$api( - recoveryKey: recoveryKey == null ? this.recoveryKey : recoveryKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$RecoveryKey$api get copyWith => + CopyWith$Query$RecoveryKey$api(this, (i) => i); +} + +abstract class CopyWith$Query$RecoveryKey$api { + factory CopyWith$Query$RecoveryKey$api(Query$RecoveryKey$api instance, + TRes Function(Query$RecoveryKey$api) then) = + _CopyWithImpl$Query$RecoveryKey$api; + + factory CopyWith$Query$RecoveryKey$api.stub(TRes res) = + _CopyWithStubImpl$Query$RecoveryKey$api; + + TRes call( + {Query$RecoveryKey$api$recoveryKey? recoveryKey, String? $__typename}); + CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey; +} + +class _CopyWithImpl$Query$RecoveryKey$api + implements CopyWith$Query$RecoveryKey$api { + _CopyWithImpl$Query$RecoveryKey$api(this._instance, this._then); + + final Query$RecoveryKey$api _instance; + + final TRes Function(Query$RecoveryKey$api) _then; + + static const _undefined = {}; + + TRes call( + {Object? recoveryKey = _undefined, + Object? $__typename = _undefined}) => + _then(Query$RecoveryKey$api( + recoveryKey: recoveryKey == _undefined || recoveryKey == null + ? _instance.recoveryKey + : (recoveryKey as Query$RecoveryKey$api$recoveryKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey { + final local$recoveryKey = _instance.recoveryKey; + return CopyWith$Query$RecoveryKey$api$recoveryKey( + local$recoveryKey, (e) => call(recoveryKey: e)); + } +} + +class _CopyWithStubImpl$Query$RecoveryKey$api + implements CopyWith$Query$RecoveryKey$api { + _CopyWithStubImpl$Query$RecoveryKey$api(this._res); + + TRes _res; + + call({Query$RecoveryKey$api$recoveryKey? recoveryKey, String? $__typename}) => + _res; + CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey => + CopyWith$Query$RecoveryKey$api$recoveryKey.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2836,22 +4046,80 @@ class Query$RecoveryKey$api$recoveryKey { extension UtilityExtension$Query$RecoveryKey$api$recoveryKey on Query$RecoveryKey$api$recoveryKey { - Query$RecoveryKey$api$recoveryKey copyWith( - {DateTime? Function()? creationDate, + CopyWith$Query$RecoveryKey$api$recoveryKey + get copyWith => + CopyWith$Query$RecoveryKey$api$recoveryKey(this, (i) => i); +} + +abstract class CopyWith$Query$RecoveryKey$api$recoveryKey { + factory CopyWith$Query$RecoveryKey$api$recoveryKey( + Query$RecoveryKey$api$recoveryKey instance, + TRes Function(Query$RecoveryKey$api$recoveryKey) then) = + _CopyWithImpl$Query$RecoveryKey$api$recoveryKey; + + factory CopyWith$Query$RecoveryKey$api$recoveryKey.stub(TRes res) = + _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey; + + TRes call( + {DateTime? creationDate, + bool? exists, + DateTime? expirationDate, + int? usesLeft, + bool? valid, + String? $__typename}); +} + +class _CopyWithImpl$Query$RecoveryKey$api$recoveryKey + implements CopyWith$Query$RecoveryKey$api$recoveryKey { + _CopyWithImpl$Query$RecoveryKey$api$recoveryKey(this._instance, this._then); + + final Query$RecoveryKey$api$recoveryKey _instance; + + final TRes Function(Query$RecoveryKey$api$recoveryKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? creationDate = _undefined, + Object? exists = _undefined, + Object? expirationDate = _undefined, + Object? usesLeft = _undefined, + Object? valid = _undefined, + Object? $__typename = _undefined}) => + _then(Query$RecoveryKey$api$recoveryKey( + creationDate: creationDate == _undefined + ? _instance.creationDate + : (creationDate as DateTime?), + exists: exists == _undefined || exists == null + ? _instance.exists + : (exists as bool), + expirationDate: expirationDate == _undefined + ? _instance.expirationDate + : (expirationDate as DateTime?), + usesLeft: + usesLeft == _undefined ? _instance.usesLeft : (usesLeft as int?), + valid: valid == _undefined || valid == null + ? _instance.valid + : (valid as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey + implements CopyWith$Query$RecoveryKey$api$recoveryKey { + _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey(this._res); + + TRes _res; + + call( + {DateTime? creationDate, bool? exists, - DateTime? Function()? expirationDate, - int? Function()? usesLeft, + DateTime? expirationDate, + int? usesLeft, bool? valid, String? $__typename}) => - Query$RecoveryKey$api$recoveryKey( - creationDate: - creationDate == null ? this.creationDate : creationDate(), - exists: exists == null ? this.exists : exists, - expirationDate: - expirationDate == null ? this.expirationDate : expirationDate(), - usesLeft: usesLeft == null ? this.usesLeft : usesLeft(), - valid: valid == null ? this.valid : valid, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -2883,10 +4151,49 @@ class Variables$Mutation$GetNewRecoveryApiKey { return true; } - Variables$Mutation$GetNewRecoveryApiKey copyWith( - {Input$RecoveryKeyLimitsInput? Function()? limits}) => - Variables$Mutation$GetNewRecoveryApiKey( - limits: limits == null ? this.limits : limits()); + CopyWith$Variables$Mutation$GetNewRecoveryApiKey< + Variables$Mutation$GetNewRecoveryApiKey> + get copyWith => + CopyWith$Variables$Mutation$GetNewRecoveryApiKey(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$GetNewRecoveryApiKey { + factory CopyWith$Variables$Mutation$GetNewRecoveryApiKey( + Variables$Mutation$GetNewRecoveryApiKey instance, + TRes Function(Variables$Mutation$GetNewRecoveryApiKey) then) = + _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey; + + factory CopyWith$Variables$Mutation$GetNewRecoveryApiKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey; + + TRes call({Input$RecoveryKeyLimitsInput? limits}); +} + +class _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey + implements CopyWith$Variables$Mutation$GetNewRecoveryApiKey { + _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey( + this._instance, this._then); + + final Variables$Mutation$GetNewRecoveryApiKey _instance; + + final TRes Function(Variables$Mutation$GetNewRecoveryApiKey) _then; + + static const _undefined = {}; + + TRes call({Object? limits = _undefined}) => + _then(Variables$Mutation$GetNewRecoveryApiKey( + limits: limits == _undefined + ? _instance.limits + : (limits as Input$RecoveryKeyLimitsInput?))); +} + +class _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey + implements CopyWith$Variables$Mutation$GetNewRecoveryApiKey { + _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey(this._res); + + TRes _res; + + call({Input$RecoveryKeyLimitsInput? limits}) => _res; } @JsonSerializable(explicitToJson: true) @@ -2927,15 +4234,71 @@ class Mutation$GetNewRecoveryApiKey { extension UtilityExtension$Mutation$GetNewRecoveryApiKey on Mutation$GetNewRecoveryApiKey { - Mutation$GetNewRecoveryApiKey copyWith( + CopyWith$Mutation$GetNewRecoveryApiKey + get copyWith => CopyWith$Mutation$GetNewRecoveryApiKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$GetNewRecoveryApiKey { + factory CopyWith$Mutation$GetNewRecoveryApiKey( + Mutation$GetNewRecoveryApiKey instance, + TRes Function(Mutation$GetNewRecoveryApiKey) then) = + _CopyWithImpl$Mutation$GetNewRecoveryApiKey; + + factory CopyWith$Mutation$GetNewRecoveryApiKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey; + + TRes call( + {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, + String? $__typename}); + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + get getNewRecoveryApiKey; +} + +class _CopyWithImpl$Mutation$GetNewRecoveryApiKey + implements CopyWith$Mutation$GetNewRecoveryApiKey { + _CopyWithImpl$Mutation$GetNewRecoveryApiKey(this._instance, this._then); + + final Mutation$GetNewRecoveryApiKey _instance; + + final TRes Function(Mutation$GetNewRecoveryApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? getNewRecoveryApiKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$GetNewRecoveryApiKey( + getNewRecoveryApiKey: + getNewRecoveryApiKey == _undefined || getNewRecoveryApiKey == null + ? _instance.getNewRecoveryApiKey + : (getNewRecoveryApiKey + as Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + get getNewRecoveryApiKey { + final local$getNewRecoveryApiKey = _instance.getNewRecoveryApiKey; + return CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + local$getNewRecoveryApiKey, (e) => call(getNewRecoveryApiKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey + implements CopyWith$Mutation$GetNewRecoveryApiKey { + _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey(this._res); + + TRes _res; + + call( {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, String? $__typename}) => - Mutation$GetNewRecoveryApiKey( - getNewRecoveryApiKey: getNewRecoveryApiKey == null - ? this.getNewRecoveryApiKey - : getNewRecoveryApiKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + get getNewRecoveryApiKey => + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.stub( + _res); } const documentNodeMutationGetNewRecoveryApiKey = DocumentNode(definitions: [ @@ -3146,18 +4509,82 @@ class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey extension UtilityExtension$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey on Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey { - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey copyWith( + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey< + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey> + get copyWith => + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + this, (i) => i); +} + +abstract class CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey< + TRes> { + factory CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance, + TRes Function(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) + then) = + _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; + + factory CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.stub( + TRes res) = + _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + String? key}); +} + +class _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + implements + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey { + _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + this._instance, this._then); + + final Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey _instance; + + final TRes Function(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? key = _undefined}) => + _then(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + key: key == _undefined ? _instance.key : (key as String?))); +} + +class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + implements + CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey { + _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - String? Function()? key}) => - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - key: key == null ? this.key : key()); + String? key}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -3189,10 +4616,49 @@ class Variables$Mutation$UseRecoveryApiKey { return true; } - Variables$Mutation$UseRecoveryApiKey copyWith( - {Input$UseRecoveryKeyInput? input}) => - Variables$Mutation$UseRecoveryApiKey( - input: input == null ? this.input : input); + CopyWith$Variables$Mutation$UseRecoveryApiKey< + Variables$Mutation$UseRecoveryApiKey> + get copyWith => + CopyWith$Variables$Mutation$UseRecoveryApiKey(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$UseRecoveryApiKey { + factory CopyWith$Variables$Mutation$UseRecoveryApiKey( + Variables$Mutation$UseRecoveryApiKey instance, + TRes Function(Variables$Mutation$UseRecoveryApiKey) then) = + _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey; + + factory CopyWith$Variables$Mutation$UseRecoveryApiKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey; + + TRes call({Input$UseRecoveryKeyInput? input}); +} + +class _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey + implements CopyWith$Variables$Mutation$UseRecoveryApiKey { + _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey( + this._instance, this._then); + + final Variables$Mutation$UseRecoveryApiKey _instance; + + final TRes Function(Variables$Mutation$UseRecoveryApiKey) _then; + + static const _undefined = {}; + + TRes call({Object? input = _undefined}) => + _then(Variables$Mutation$UseRecoveryApiKey( + input: input == _undefined || input == null + ? _instance.input + : (input as Input$UseRecoveryKeyInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey + implements CopyWith$Variables$Mutation$UseRecoveryApiKey { + _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey(this._res); + + TRes _res; + + call({Input$UseRecoveryKeyInput? input}) => _res; } @JsonSerializable(explicitToJson: true) @@ -3233,14 +4699,69 @@ class Mutation$UseRecoveryApiKey { extension UtilityExtension$Mutation$UseRecoveryApiKey on Mutation$UseRecoveryApiKey { - Mutation$UseRecoveryApiKey copyWith( + CopyWith$Mutation$UseRecoveryApiKey + get copyWith => CopyWith$Mutation$UseRecoveryApiKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$UseRecoveryApiKey { + factory CopyWith$Mutation$UseRecoveryApiKey( + Mutation$UseRecoveryApiKey instance, + TRes Function(Mutation$UseRecoveryApiKey) then) = + _CopyWithImpl$Mutation$UseRecoveryApiKey; + + factory CopyWith$Mutation$UseRecoveryApiKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$UseRecoveryApiKey; + + TRes call( + {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, + String? $__typename}); + CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey + get useRecoveryApiKey; +} + +class _CopyWithImpl$Mutation$UseRecoveryApiKey + implements CopyWith$Mutation$UseRecoveryApiKey { + _CopyWithImpl$Mutation$UseRecoveryApiKey(this._instance, this._then); + + final Mutation$UseRecoveryApiKey _instance; + + final TRes Function(Mutation$UseRecoveryApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? useRecoveryApiKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UseRecoveryApiKey( + useRecoveryApiKey: + useRecoveryApiKey == _undefined || useRecoveryApiKey == null + ? _instance.useRecoveryApiKey + : (useRecoveryApiKey + as Mutation$UseRecoveryApiKey$useRecoveryApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey + get useRecoveryApiKey { + final local$useRecoveryApiKey = _instance.useRecoveryApiKey; + return CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey( + local$useRecoveryApiKey, (e) => call(useRecoveryApiKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$UseRecoveryApiKey + implements CopyWith$Mutation$UseRecoveryApiKey { + _CopyWithStubImpl$Mutation$UseRecoveryApiKey(this._res); + + TRes _res; + + call( {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, String? $__typename}) => - Mutation$UseRecoveryApiKey( - useRecoveryApiKey: useRecoveryApiKey == null - ? this.useRecoveryApiKey - : useRecoveryApiKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey + get useRecoveryApiKey => + CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey.stub(_res); } const documentNodeMutationUseRecoveryApiKey = DocumentNode(definitions: [ @@ -3448,18 +4969,75 @@ class Mutation$UseRecoveryApiKey$useRecoveryApiKey extension UtilityExtension$Mutation$UseRecoveryApiKey$useRecoveryApiKey on Mutation$UseRecoveryApiKey$useRecoveryApiKey { - Mutation$UseRecoveryApiKey$useRecoveryApiKey copyWith( + CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey< + Mutation$UseRecoveryApiKey$useRecoveryApiKey> + get copyWith => + CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey { + factory CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey( + Mutation$UseRecoveryApiKey$useRecoveryApiKey instance, + TRes Function(Mutation$UseRecoveryApiKey$useRecoveryApiKey) then) = + _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; + + factory CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + String? token}); +} + +class _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey + implements CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey { + _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey( + this._instance, this._then); + + final Mutation$UseRecoveryApiKey$useRecoveryApiKey _instance; + + final TRes Function(Mutation$UseRecoveryApiKey$useRecoveryApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined}) => + _then(Mutation$UseRecoveryApiKey$useRecoveryApiKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?))); +} + +class _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey + implements CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey { + _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - String? Function()? token}) => - Mutation$UseRecoveryApiKey$useRecoveryApiKey( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - token: token == null ? this.token : token()); + String? token}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -3501,15 +5079,72 @@ class Mutation$RefreshDeviceApiToken { extension UtilityExtension$Mutation$RefreshDeviceApiToken on Mutation$RefreshDeviceApiToken { - Mutation$RefreshDeviceApiToken copyWith( + CopyWith$Mutation$RefreshDeviceApiToken + get copyWith => CopyWith$Mutation$RefreshDeviceApiToken(this, (i) => i); +} + +abstract class CopyWith$Mutation$RefreshDeviceApiToken { + factory CopyWith$Mutation$RefreshDeviceApiToken( + Mutation$RefreshDeviceApiToken instance, + TRes Function(Mutation$RefreshDeviceApiToken) then) = + _CopyWithImpl$Mutation$RefreshDeviceApiToken; + + factory CopyWith$Mutation$RefreshDeviceApiToken.stub(TRes res) = + _CopyWithStubImpl$Mutation$RefreshDeviceApiToken; + + TRes call( + {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? + refreshDeviceApiToken, + String? $__typename}); + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + get refreshDeviceApiToken; +} + +class _CopyWithImpl$Mutation$RefreshDeviceApiToken + implements CopyWith$Mutation$RefreshDeviceApiToken { + _CopyWithImpl$Mutation$RefreshDeviceApiToken(this._instance, this._then); + + final Mutation$RefreshDeviceApiToken _instance; + + final TRes Function(Mutation$RefreshDeviceApiToken) _then; + + static const _undefined = {}; + + TRes call( + {Object? refreshDeviceApiToken = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RefreshDeviceApiToken( + refreshDeviceApiToken: refreshDeviceApiToken == _undefined || + refreshDeviceApiToken == null + ? _instance.refreshDeviceApiToken + : (refreshDeviceApiToken + as Mutation$RefreshDeviceApiToken$refreshDeviceApiToken), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + get refreshDeviceApiToken { + final local$refreshDeviceApiToken = _instance.refreshDeviceApiToken; + return CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + local$refreshDeviceApiToken, (e) => call(refreshDeviceApiToken: e)); + } +} + +class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken + implements CopyWith$Mutation$RefreshDeviceApiToken { + _CopyWithStubImpl$Mutation$RefreshDeviceApiToken(this._res); + + TRes _res; + + call( {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? refreshDeviceApiToken, String? $__typename}) => - Mutation$RefreshDeviceApiToken( - refreshDeviceApiToken: refreshDeviceApiToken == null - ? this.refreshDeviceApiToken - : refreshDeviceApiToken, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + get refreshDeviceApiToken => + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.stub( + _res); } const documentNodeMutationRefreshDeviceApiToken = DocumentNode(definitions: [ @@ -3706,18 +5341,84 @@ class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken extension UtilityExtension$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken on Mutation$RefreshDeviceApiToken$refreshDeviceApiToken { - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken copyWith( + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken> + get copyWith => + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + this, (i) => i); +} + +abstract class CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< + TRes> { + factory CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance, + TRes Function(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) + then) = + _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; + + factory CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.stub( + TRes res) = + _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + String? token}); +} + +class _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + implements + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken { + _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + this._instance, this._then); + + final Mutation$RefreshDeviceApiToken$refreshDeviceApiToken _instance; + + final TRes Function(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) + _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined}) => + _then(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?))); +} + +class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< + TRes> + implements + CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken { + _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - String? Function()? token}) => - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - token: token == null ? this.token : token()); + String? token}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -3749,9 +5450,49 @@ class Variables$Mutation$DeleteDeviceApiToken { return true; } - Variables$Mutation$DeleteDeviceApiToken copyWith({String? device}) => - Variables$Mutation$DeleteDeviceApiToken( - device: device == null ? this.device : device); + CopyWith$Variables$Mutation$DeleteDeviceApiToken< + Variables$Mutation$DeleteDeviceApiToken> + get copyWith => + CopyWith$Variables$Mutation$DeleteDeviceApiToken(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$DeleteDeviceApiToken { + factory CopyWith$Variables$Mutation$DeleteDeviceApiToken( + Variables$Mutation$DeleteDeviceApiToken instance, + TRes Function(Variables$Mutation$DeleteDeviceApiToken) then) = + _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken; + + factory CopyWith$Variables$Mutation$DeleteDeviceApiToken.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken; + + TRes call({String? device}); +} + +class _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken + implements CopyWith$Variables$Mutation$DeleteDeviceApiToken { + _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken( + this._instance, this._then); + + final Variables$Mutation$DeleteDeviceApiToken _instance; + + final TRes Function(Variables$Mutation$DeleteDeviceApiToken) _then; + + static const _undefined = {}; + + TRes call({Object? device = _undefined}) => + _then(Variables$Mutation$DeleteDeviceApiToken( + device: device == _undefined || device == null + ? _instance.device + : (device as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken + implements CopyWith$Variables$Mutation$DeleteDeviceApiToken { + _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken(this._res); + + TRes _res; + + call({String? device}) => _res; } @JsonSerializable(explicitToJson: true) @@ -3792,15 +5533,71 @@ class Mutation$DeleteDeviceApiToken { extension UtilityExtension$Mutation$DeleteDeviceApiToken on Mutation$DeleteDeviceApiToken { - Mutation$DeleteDeviceApiToken copyWith( + CopyWith$Mutation$DeleteDeviceApiToken + get copyWith => CopyWith$Mutation$DeleteDeviceApiToken(this, (i) => i); +} + +abstract class CopyWith$Mutation$DeleteDeviceApiToken { + factory CopyWith$Mutation$DeleteDeviceApiToken( + Mutation$DeleteDeviceApiToken instance, + TRes Function(Mutation$DeleteDeviceApiToken) then) = + _CopyWithImpl$Mutation$DeleteDeviceApiToken; + + factory CopyWith$Mutation$DeleteDeviceApiToken.stub(TRes res) = + _CopyWithStubImpl$Mutation$DeleteDeviceApiToken; + + TRes call( + {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, + String? $__typename}); + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + get deleteDeviceApiToken; +} + +class _CopyWithImpl$Mutation$DeleteDeviceApiToken + implements CopyWith$Mutation$DeleteDeviceApiToken { + _CopyWithImpl$Mutation$DeleteDeviceApiToken(this._instance, this._then); + + final Mutation$DeleteDeviceApiToken _instance; + + final TRes Function(Mutation$DeleteDeviceApiToken) _then; + + static const _undefined = {}; + + TRes call( + {Object? deleteDeviceApiToken = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DeleteDeviceApiToken( + deleteDeviceApiToken: + deleteDeviceApiToken == _undefined || deleteDeviceApiToken == null + ? _instance.deleteDeviceApiToken + : (deleteDeviceApiToken + as Mutation$DeleteDeviceApiToken$deleteDeviceApiToken), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + get deleteDeviceApiToken { + final local$deleteDeviceApiToken = _instance.deleteDeviceApiToken; + return CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + local$deleteDeviceApiToken, (e) => call(deleteDeviceApiToken: e)); + } +} + +class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken + implements CopyWith$Mutation$DeleteDeviceApiToken { + _CopyWithStubImpl$Mutation$DeleteDeviceApiToken(this._res); + + TRes _res; + + call( {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, String? $__typename}) => - Mutation$DeleteDeviceApiToken( - deleteDeviceApiToken: deleteDeviceApiToken == null - ? this.deleteDeviceApiToken - : deleteDeviceApiToken, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + get deleteDeviceApiToken => + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.stub( + _res); } const documentNodeMutationDeleteDeviceApiToken = DocumentNode(definitions: [ @@ -3996,13 +5793,70 @@ class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken extension UtilityExtension$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken on Mutation$DeleteDeviceApiToken$deleteDeviceApiToken { - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken< + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken> + get copyWith => + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + this, (i) => i); +} + +abstract class CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken< + TRes> { + factory CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance, + TRes Function(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) + then) = + _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; + + factory CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.stub( + TRes res) = + _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + implements + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken { + _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + this._instance, this._then); + + final Mutation$DeleteDeviceApiToken$deleteDeviceApiToken _instance; + + final TRes Function(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + implements + CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken { + _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -4043,14 +5897,69 @@ class Mutation$GetNewDeviceApiKey { extension UtilityExtension$Mutation$GetNewDeviceApiKey on Mutation$GetNewDeviceApiKey { - Mutation$GetNewDeviceApiKey copyWith( + CopyWith$Mutation$GetNewDeviceApiKey + get copyWith => CopyWith$Mutation$GetNewDeviceApiKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$GetNewDeviceApiKey { + factory CopyWith$Mutation$GetNewDeviceApiKey( + Mutation$GetNewDeviceApiKey instance, + TRes Function(Mutation$GetNewDeviceApiKey) then) = + _CopyWithImpl$Mutation$GetNewDeviceApiKey; + + factory CopyWith$Mutation$GetNewDeviceApiKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$GetNewDeviceApiKey; + + TRes call( + {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, + String? $__typename}); + CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + get getNewDeviceApiKey; +} + +class _CopyWithImpl$Mutation$GetNewDeviceApiKey + implements CopyWith$Mutation$GetNewDeviceApiKey { + _CopyWithImpl$Mutation$GetNewDeviceApiKey(this._instance, this._then); + + final Mutation$GetNewDeviceApiKey _instance; + + final TRes Function(Mutation$GetNewDeviceApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? getNewDeviceApiKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$GetNewDeviceApiKey( + getNewDeviceApiKey: + getNewDeviceApiKey == _undefined || getNewDeviceApiKey == null + ? _instance.getNewDeviceApiKey + : (getNewDeviceApiKey + as Mutation$GetNewDeviceApiKey$getNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + get getNewDeviceApiKey { + final local$getNewDeviceApiKey = _instance.getNewDeviceApiKey; + return CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + local$getNewDeviceApiKey, (e) => call(getNewDeviceApiKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey + implements CopyWith$Mutation$GetNewDeviceApiKey { + _CopyWithStubImpl$Mutation$GetNewDeviceApiKey(this._res); + + TRes _res; + + call( {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, String? $__typename}) => - Mutation$GetNewDeviceApiKey( - getNewDeviceApiKey: getNewDeviceApiKey == null - ? this.getNewDeviceApiKey - : getNewDeviceApiKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + get getNewDeviceApiKey => + CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.stub(_res); } const documentNodeMutationGetNewDeviceApiKey = DocumentNode(definitions: [ @@ -4242,18 +6151,76 @@ class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey extension UtilityExtension$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey on Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey copyWith( + CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey< + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey> + get copyWith => CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + this, (i) => i); +} + +abstract class CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { + factory CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance, + TRes Function(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) then) = + _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; + + factory CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.stub( + TRes res) = + _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + String? key}); +} + +class _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + implements CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { + _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + this._instance, this._then); + + final Mutation$GetNewDeviceApiKey$getNewDeviceApiKey _instance; + + final TRes Function(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? key = _undefined}) => + _then(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + key: key == _undefined ? _instance.key : (key as String?))); +} + +class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + implements CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { + _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - String? Function()? key}) => - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - key: key == null ? this.key : key()); + String? key}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -4298,15 +6265,75 @@ class Mutation$InvalidateNewDeviceApiKey { extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey on Mutation$InvalidateNewDeviceApiKey { - Mutation$InvalidateNewDeviceApiKey copyWith( + CopyWith$Mutation$InvalidateNewDeviceApiKey< + Mutation$InvalidateNewDeviceApiKey> + get copyWith => + CopyWith$Mutation$InvalidateNewDeviceApiKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$InvalidateNewDeviceApiKey { + factory CopyWith$Mutation$InvalidateNewDeviceApiKey( + Mutation$InvalidateNewDeviceApiKey instance, + TRes Function(Mutation$InvalidateNewDeviceApiKey) then) = + _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey; + + factory CopyWith$Mutation$InvalidateNewDeviceApiKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey; + + TRes call( + {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? + invalidateNewDeviceApiKey, + String? $__typename}); + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + get invalidateNewDeviceApiKey; +} + +class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey + implements CopyWith$Mutation$InvalidateNewDeviceApiKey { + _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey(this._instance, this._then); + + final Mutation$InvalidateNewDeviceApiKey _instance; + + final TRes Function(Mutation$InvalidateNewDeviceApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? invalidateNewDeviceApiKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$InvalidateNewDeviceApiKey( + invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == _undefined || + invalidateNewDeviceApiKey == null + ? _instance.invalidateNewDeviceApiKey + : (invalidateNewDeviceApiKey + as Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + get invalidateNewDeviceApiKey { + final local$invalidateNewDeviceApiKey = _instance.invalidateNewDeviceApiKey; + return CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + local$invalidateNewDeviceApiKey, + (e) => call(invalidateNewDeviceApiKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey + implements CopyWith$Mutation$InvalidateNewDeviceApiKey { + _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey(this._res); + + TRes _res; + + call( {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? invalidateNewDeviceApiKey, String? $__typename}) => - Mutation$InvalidateNewDeviceApiKey( - invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == null - ? this.invalidateNewDeviceApiKey - : invalidateNewDeviceApiKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + get invalidateNewDeviceApiKey => + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + .stub(_res); } const documentNodeMutationInvalidateNewDeviceApiKey = @@ -4493,13 +6520,76 @@ class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey on Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey { - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey> + get copyWith => + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + this, (i) => i); +} + +abstract class CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< + TRes> { + factory CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey instance, + TRes Function( + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) + then) = + _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; + + factory CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.stub( + TRes res) = + _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< + TRes> + implements + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< + TRes> { + _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + this._instance, this._then); + + final Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey _instance; + + final TRes Function( + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< + TRes> + implements + CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< + TRes> { + _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -4531,10 +6621,50 @@ class Variables$Mutation$AuthorizeWithNewDeviceApiKey { return true; } - Variables$Mutation$AuthorizeWithNewDeviceApiKey copyWith( - {Input$UseNewDeviceKeyInput? input}) => - Variables$Mutation$AuthorizeWithNewDeviceApiKey( - input: input == null ? this.input : input); + CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey< + Variables$Mutation$AuthorizeWithNewDeviceApiKey> + get copyWith => CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey( + this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { + factory CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey( + Variables$Mutation$AuthorizeWithNewDeviceApiKey instance, + TRes Function(Variables$Mutation$AuthorizeWithNewDeviceApiKey) then) = + _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey; + + factory CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey.stub( + TRes res) = + _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey; + + TRes call({Input$UseNewDeviceKeyInput? input}); +} + +class _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey + implements CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { + _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey( + this._instance, this._then); + + final Variables$Mutation$AuthorizeWithNewDeviceApiKey _instance; + + final TRes Function(Variables$Mutation$AuthorizeWithNewDeviceApiKey) _then; + + static const _undefined = {}; + + TRes call({Object? input = _undefined}) => + _then(Variables$Mutation$AuthorizeWithNewDeviceApiKey( + input: input == _undefined || input == null + ? _instance.input + : (input as Input$UseNewDeviceKeyInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey + implements CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { + _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey(this._res); + + TRes _res; + + call({Input$UseNewDeviceKeyInput? input}) => _res; } @JsonSerializable(explicitToJson: true) @@ -4580,15 +6710,79 @@ class Mutation$AuthorizeWithNewDeviceApiKey { extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey on Mutation$AuthorizeWithNewDeviceApiKey { - Mutation$AuthorizeWithNewDeviceApiKey copyWith( + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey< + Mutation$AuthorizeWithNewDeviceApiKey> + get copyWith => + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { + factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey( + Mutation$AuthorizeWithNewDeviceApiKey instance, + TRes Function(Mutation$AuthorizeWithNewDeviceApiKey) then) = + _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey; + + factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey; + + TRes call( + {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? + authorizeWithNewDeviceApiKey, + String? $__typename}); + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> get authorizeWithNewDeviceApiKey; +} + +class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey + implements CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { + _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey( + this._instance, this._then); + + final Mutation$AuthorizeWithNewDeviceApiKey _instance; + + final TRes Function(Mutation$AuthorizeWithNewDeviceApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? authorizeWithNewDeviceApiKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$AuthorizeWithNewDeviceApiKey( + authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == + _undefined || + authorizeWithNewDeviceApiKey == null + ? _instance.authorizeWithNewDeviceApiKey + : (authorizeWithNewDeviceApiKey + as Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> get authorizeWithNewDeviceApiKey { + final local$authorizeWithNewDeviceApiKey = + _instance.authorizeWithNewDeviceApiKey; + return CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + local$authorizeWithNewDeviceApiKey, + (e) => call(authorizeWithNewDeviceApiKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey + implements CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { + _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey(this._res); + + TRes _res; + + call( {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? authorizeWithNewDeviceApiKey, String? $__typename}) => - Mutation$AuthorizeWithNewDeviceApiKey( - authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == null - ? this.authorizeWithNewDeviceApiKey - : authorizeWithNewDeviceApiKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> + get authorizeWithNewDeviceApiKey => + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + .stub(_res); } const documentNodeMutationAuthorizeWithNewDeviceApiKey = @@ -4804,18 +6998,90 @@ class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey on Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey { - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey copyWith( + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey> + get copyWith => + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + this, (i) => i); +} + +abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> { + factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + instance, + TRes Function( + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) + then) = + _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; + + factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey.stub( + TRes res) = + _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + String? token}); +} + +class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> + implements + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> { + _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + this._instance, this._then); + + final Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + _instance; + + final TRes Function( + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined}) => + _then(Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?))); +} + +class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> + implements + CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< + TRes> { + _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - String? Function()? token}) => - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - token: token == null ? this.token : token()); + String? token}) => + _res; } DateTime? _nullable$dateTimeFromJson(dynamic data) => diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index c37a1a9c..4a920a4d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -61,13 +61,62 @@ class Fragment$basicMutationReturnFields { extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Fragment$basicMutationReturnFields( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Fragment$basicMutationReturnFields< + Fragment$basicMutationReturnFields> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields { + factory CopyWith$Fragment$basicMutationReturnFields( + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then) = + _CopyWithImpl$Fragment$basicMutationReturnFields; + + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + + final Fragment$basicMutationReturnFields _instance; + + final TRes Function(Fragment$basicMutationReturnFields) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Fragment$basicMutationReturnFields( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( @@ -173,11 +222,56 @@ class Query$SystemSettings { } extension UtilityExtension$Query$SystemSettings on Query$SystemSettings { - Query$SystemSettings copyWith( - {Query$SystemSettings$system? system, String? $__typename}) => - Query$SystemSettings( - system: system == null ? this.system : system, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$SystemSettings get copyWith => + CopyWith$Query$SystemSettings(this, (i) => i); +} + +abstract class CopyWith$Query$SystemSettings { + factory CopyWith$Query$SystemSettings(Query$SystemSettings instance, + TRes Function(Query$SystemSettings) then) = + _CopyWithImpl$Query$SystemSettings; + + factory CopyWith$Query$SystemSettings.stub(TRes res) = + _CopyWithStubImpl$Query$SystemSettings; + + TRes call({Query$SystemSettings$system? system, String? $__typename}); + CopyWith$Query$SystemSettings$system get system; +} + +class _CopyWithImpl$Query$SystemSettings + implements CopyWith$Query$SystemSettings { + _CopyWithImpl$Query$SystemSettings(this._instance, this._then); + + final Query$SystemSettings _instance; + + final TRes Function(Query$SystemSettings) _then; + + static const _undefined = {}; + + TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemSettings( + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemSettings$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemSettings$system get system { + final local$system = _instance.system; + return CopyWith$Query$SystemSettings$system( + local$system, (e) => call(system: e)); + } +} + +class _CopyWithStubImpl$Query$SystemSettings + implements CopyWith$Query$SystemSettings { + _CopyWithStubImpl$Query$SystemSettings(this._res); + + TRes _res; + + call({Query$SystemSettings$system? system, String? $__typename}) => _res; + CopyWith$Query$SystemSettings$system get system => + CopyWith$Query$SystemSettings$system.stub(_res); } const documentNodeQuerySystemSettings = DocumentNode(definitions: [ @@ -408,12 +502,60 @@ class Query$SystemSettings$system { extension UtilityExtension$Query$SystemSettings$system on Query$SystemSettings$system { - Query$SystemSettings$system copyWith( - {Query$SystemSettings$system$settings? settings, - String? $__typename}) => - Query$SystemSettings$system( - settings: settings == null ? this.settings : settings, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$SystemSettings$system + get copyWith => CopyWith$Query$SystemSettings$system(this, (i) => i); +} + +abstract class CopyWith$Query$SystemSettings$system { + factory CopyWith$Query$SystemSettings$system( + Query$SystemSettings$system instance, + TRes Function(Query$SystemSettings$system) then) = + _CopyWithImpl$Query$SystemSettings$system; + + factory CopyWith$Query$SystemSettings$system.stub(TRes res) = + _CopyWithStubImpl$Query$SystemSettings$system; + + TRes call( + {Query$SystemSettings$system$settings? settings, String? $__typename}); + CopyWith$Query$SystemSettings$system$settings get settings; +} + +class _CopyWithImpl$Query$SystemSettings$system + implements CopyWith$Query$SystemSettings$system { + _CopyWithImpl$Query$SystemSettings$system(this._instance, this._then); + + final Query$SystemSettings$system _instance; + + final TRes Function(Query$SystemSettings$system) _then; + + static const _undefined = {}; + + TRes call( + {Object? settings = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemSettings$system( + settings: settings == _undefined || settings == null + ? _instance.settings + : (settings as Query$SystemSettings$system$settings), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemSettings$system$settings get settings { + final local$settings = _instance.settings; + return CopyWith$Query$SystemSettings$system$settings( + local$settings, (e) => call(settings: e)); + } +} + +class _CopyWithStubImpl$Query$SystemSettings$system + implements CopyWith$Query$SystemSettings$system { + _CopyWithStubImpl$Query$SystemSettings$system(this._res); + + TRes _res; + + call({Query$SystemSettings$system$settings? settings, String? $__typename}) => + _res; + CopyWith$Query$SystemSettings$system$settings get settings => + CopyWith$Query$SystemSettings$system$settings.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -471,16 +613,92 @@ class Query$SystemSettings$system$settings { extension UtilityExtension$Query$SystemSettings$system$settings on Query$SystemSettings$system$settings { - Query$SystemSettings$system$settings copyWith( + CopyWith$Query$SystemSettings$system$settings< + Query$SystemSettings$system$settings> + get copyWith => + CopyWith$Query$SystemSettings$system$settings(this, (i) => i); +} + +abstract class CopyWith$Query$SystemSettings$system$settings { + factory CopyWith$Query$SystemSettings$system$settings( + Query$SystemSettings$system$settings instance, + TRes Function(Query$SystemSettings$system$settings) then) = + _CopyWithImpl$Query$SystemSettings$system$settings; + + factory CopyWith$Query$SystemSettings$system$settings.stub(TRes res) = + _CopyWithStubImpl$Query$SystemSettings$system$settings; + + TRes call( + {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, + Query$SystemSettings$system$settings$ssh? ssh, + String? timezone, + String? $__typename}); + CopyWith$Query$SystemSettings$system$settings$autoUpgrade + get autoUpgrade; + CopyWith$Query$SystemSettings$system$settings$ssh get ssh; +} + +class _CopyWithImpl$Query$SystemSettings$system$settings + implements CopyWith$Query$SystemSettings$system$settings { + _CopyWithImpl$Query$SystemSettings$system$settings( + this._instance, this._then); + + final Query$SystemSettings$system$settings _instance; + + final TRes Function(Query$SystemSettings$system$settings) _then; + + static const _undefined = {}; + + TRes call( + {Object? autoUpgrade = _undefined, + Object? ssh = _undefined, + Object? timezone = _undefined, + Object? $__typename = _undefined}) => + _then(Query$SystemSettings$system$settings( + autoUpgrade: autoUpgrade == _undefined || autoUpgrade == null + ? _instance.autoUpgrade + : (autoUpgrade + as Query$SystemSettings$system$settings$autoUpgrade), + ssh: ssh == _undefined || ssh == null + ? _instance.ssh + : (ssh as Query$SystemSettings$system$settings$ssh), + timezone: timezone == _undefined || timezone == null + ? _instance.timezone + : (timezone as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemSettings$system$settings$autoUpgrade + get autoUpgrade { + final local$autoUpgrade = _instance.autoUpgrade; + return CopyWith$Query$SystemSettings$system$settings$autoUpgrade( + local$autoUpgrade, (e) => call(autoUpgrade: e)); + } + + CopyWith$Query$SystemSettings$system$settings$ssh get ssh { + final local$ssh = _instance.ssh; + return CopyWith$Query$SystemSettings$system$settings$ssh( + local$ssh, (e) => call(ssh: e)); + } +} + +class _CopyWithStubImpl$Query$SystemSettings$system$settings + implements CopyWith$Query$SystemSettings$system$settings { + _CopyWithStubImpl$Query$SystemSettings$system$settings(this._res); + + TRes _res; + + call( {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, Query$SystemSettings$system$settings$ssh? ssh, String? timezone, String? $__typename}) => - Query$SystemSettings$system$settings( - autoUpgrade: autoUpgrade == null ? this.autoUpgrade : autoUpgrade, - ssh: ssh == null ? this.ssh : ssh, - timezone: timezone == null ? this.timezone : timezone, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Query$SystemSettings$system$settings$autoUpgrade + get autoUpgrade => + CopyWith$Query$SystemSettings$system$settings$autoUpgrade.stub(_res); + CopyWith$Query$SystemSettings$system$settings$ssh get ssh => + CopyWith$Query$SystemSettings$system$settings$ssh.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -531,12 +749,60 @@ class Query$SystemSettings$system$settings$autoUpgrade { extension UtilityExtension$Query$SystemSettings$system$settings$autoUpgrade on Query$SystemSettings$system$settings$autoUpgrade { - Query$SystemSettings$system$settings$autoUpgrade copyWith( - {bool? allowReboot, bool? enable, String? $__typename}) => - Query$SystemSettings$system$settings$autoUpgrade( - allowReboot: allowReboot == null ? this.allowReboot : allowReboot, - enable: enable == null ? this.enable : enable, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$SystemSettings$system$settings$autoUpgrade< + Query$SystemSettings$system$settings$autoUpgrade> + get copyWith => CopyWith$Query$SystemSettings$system$settings$autoUpgrade( + this, (i) => i); +} + +abstract class CopyWith$Query$SystemSettings$system$settings$autoUpgrade { + factory CopyWith$Query$SystemSettings$system$settings$autoUpgrade( + Query$SystemSettings$system$settings$autoUpgrade instance, + TRes Function(Query$SystemSettings$system$settings$autoUpgrade) + then) = + _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade; + + factory CopyWith$Query$SystemSettings$system$settings$autoUpgrade.stub( + TRes res) = + _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade; + + TRes call({bool? allowReboot, bool? enable, String? $__typename}); +} + +class _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade + implements CopyWith$Query$SystemSettings$system$settings$autoUpgrade { + _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade( + this._instance, this._then); + + final Query$SystemSettings$system$settings$autoUpgrade _instance; + + final TRes Function(Query$SystemSettings$system$settings$autoUpgrade) _then; + + static const _undefined = {}; + + TRes call( + {Object? allowReboot = _undefined, + Object? enable = _undefined, + Object? $__typename = _undefined}) => + _then(Query$SystemSettings$system$settings$autoUpgrade( + allowReboot: allowReboot == _undefined || allowReboot == null + ? _instance.allowReboot + : (allowReboot as bool), + enable: enable == _undefined || enable == null + ? _instance.enable + : (enable as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade + implements CopyWith$Query$SystemSettings$system$settings$autoUpgrade { + _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade(this._res); + + TRes _res; + + call({bool? allowReboot, bool? enable, String? $__typename}) => _res; } @JsonSerializable(explicitToJson: true) @@ -605,18 +871,72 @@ class Query$SystemSettings$system$settings$ssh { extension UtilityExtension$Query$SystemSettings$system$settings$ssh on Query$SystemSettings$system$settings$ssh { - Query$SystemSettings$system$settings$ssh copyWith( + CopyWith$Query$SystemSettings$system$settings$ssh< + Query$SystemSettings$system$settings$ssh> + get copyWith => + CopyWith$Query$SystemSettings$system$settings$ssh(this, (i) => i); +} + +abstract class CopyWith$Query$SystemSettings$system$settings$ssh { + factory CopyWith$Query$SystemSettings$system$settings$ssh( + Query$SystemSettings$system$settings$ssh instance, + TRes Function(Query$SystemSettings$system$settings$ssh) then) = + _CopyWithImpl$Query$SystemSettings$system$settings$ssh; + + factory CopyWith$Query$SystemSettings$system$settings$ssh.stub(TRes res) = + _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh; + + TRes call( + {bool? enable, + bool? passwordAuthentication, + List? rootSshKeys, + String? $__typename}); +} + +class _CopyWithImpl$Query$SystemSettings$system$settings$ssh + implements CopyWith$Query$SystemSettings$system$settings$ssh { + _CopyWithImpl$Query$SystemSettings$system$settings$ssh( + this._instance, this._then); + + final Query$SystemSettings$system$settings$ssh _instance; + + final TRes Function(Query$SystemSettings$system$settings$ssh) _then; + + static const _undefined = {}; + + TRes call( + {Object? enable = _undefined, + Object? passwordAuthentication = _undefined, + Object? rootSshKeys = _undefined, + Object? $__typename = _undefined}) => + _then(Query$SystemSettings$system$settings$ssh( + enable: enable == _undefined || enable == null + ? _instance.enable + : (enable as bool), + passwordAuthentication: passwordAuthentication == _undefined || + passwordAuthentication == null + ? _instance.passwordAuthentication + : (passwordAuthentication as bool), + rootSshKeys: rootSshKeys == _undefined || rootSshKeys == null + ? _instance.rootSshKeys + : (rootSshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh + implements CopyWith$Query$SystemSettings$system$settings$ssh { + _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh(this._res); + + TRes _res; + + call( {bool? enable, bool? passwordAuthentication, List? rootSshKeys, String? $__typename}) => - Query$SystemSettings$system$settings$ssh( - enable: enable == null ? this.enable : enable, - passwordAuthentication: passwordAuthentication == null - ? this.passwordAuthentication - : passwordAuthentication, - rootSshKeys: rootSshKeys == null ? this.rootSshKeys : rootSshKeys, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -655,11 +975,56 @@ class Query$DomainInfo { } extension UtilityExtension$Query$DomainInfo on Query$DomainInfo { - Query$DomainInfo copyWith( - {Query$DomainInfo$system? system, String? $__typename}) => - Query$DomainInfo( - system: system == null ? this.system : system, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$DomainInfo get copyWith => + CopyWith$Query$DomainInfo(this, (i) => i); +} + +abstract class CopyWith$Query$DomainInfo { + factory CopyWith$Query$DomainInfo( + Query$DomainInfo instance, TRes Function(Query$DomainInfo) then) = + _CopyWithImpl$Query$DomainInfo; + + factory CopyWith$Query$DomainInfo.stub(TRes res) = + _CopyWithStubImpl$Query$DomainInfo; + + TRes call({Query$DomainInfo$system? system, String? $__typename}); + CopyWith$Query$DomainInfo$system get system; +} + +class _CopyWithImpl$Query$DomainInfo + implements CopyWith$Query$DomainInfo { + _CopyWithImpl$Query$DomainInfo(this._instance, this._then); + + final Query$DomainInfo _instance; + + final TRes Function(Query$DomainInfo) _then; + + static const _undefined = {}; + + TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + _then(Query$DomainInfo( + system: system == _undefined || system == null + ? _instance.system + : (system as Query$DomainInfo$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$DomainInfo$system get system { + final local$system = _instance.system; + return CopyWith$Query$DomainInfo$system( + local$system, (e) => call(system: e)); + } +} + +class _CopyWithStubImpl$Query$DomainInfo + implements CopyWith$Query$DomainInfo { + _CopyWithStubImpl$Query$DomainInfo(this._res); + + TRes _res; + + call({Query$DomainInfo$system? system, String? $__typename}) => _res; + CopyWith$Query$DomainInfo$system get system => + CopyWith$Query$DomainInfo$system.stub(_res); } const documentNodeQueryDomainInfo = DocumentNode(definitions: [ @@ -883,12 +1248,60 @@ class Query$DomainInfo$system { } extension UtilityExtension$Query$DomainInfo$system on Query$DomainInfo$system { - Query$DomainInfo$system copyWith( - {Query$DomainInfo$system$domainInfo? domainInfo, - String? $__typename}) => - Query$DomainInfo$system( - domainInfo: domainInfo == null ? this.domainInfo : domainInfo, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$DomainInfo$system get copyWith => + CopyWith$Query$DomainInfo$system(this, (i) => i); +} + +abstract class CopyWith$Query$DomainInfo$system { + factory CopyWith$Query$DomainInfo$system(Query$DomainInfo$system instance, + TRes Function(Query$DomainInfo$system) then) = + _CopyWithImpl$Query$DomainInfo$system; + + factory CopyWith$Query$DomainInfo$system.stub(TRes res) = + _CopyWithStubImpl$Query$DomainInfo$system; + + TRes call( + {Query$DomainInfo$system$domainInfo? domainInfo, String? $__typename}); + CopyWith$Query$DomainInfo$system$domainInfo get domainInfo; +} + +class _CopyWithImpl$Query$DomainInfo$system + implements CopyWith$Query$DomainInfo$system { + _CopyWithImpl$Query$DomainInfo$system(this._instance, this._then); + + final Query$DomainInfo$system _instance; + + final TRes Function(Query$DomainInfo$system) _then; + + static const _undefined = {}; + + TRes call( + {Object? domainInfo = _undefined, + Object? $__typename = _undefined}) => + _then(Query$DomainInfo$system( + domainInfo: domainInfo == _undefined || domainInfo == null + ? _instance.domainInfo + : (domainInfo as Query$DomainInfo$system$domainInfo), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$DomainInfo$system$domainInfo get domainInfo { + final local$domainInfo = _instance.domainInfo; + return CopyWith$Query$DomainInfo$system$domainInfo( + local$domainInfo, (e) => call(domainInfo: e)); + } +} + +class _CopyWithStubImpl$Query$DomainInfo$system + implements CopyWith$Query$DomainInfo$system { + _CopyWithStubImpl$Query$DomainInfo$system(this._res); + + TRes _res; + + call({Query$DomainInfo$system$domainInfo? domainInfo, String? $__typename}) => + _res; + CopyWith$Query$DomainInfo$system$domainInfo get domainInfo => + CopyWith$Query$DomainInfo$system$domainInfo.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -969,21 +1382,97 @@ class Query$DomainInfo$system$domainInfo { extension UtilityExtension$Query$DomainInfo$system$domainInfo on Query$DomainInfo$system$domainInfo { - Query$DomainInfo$system$domainInfo copyWith( + CopyWith$Query$DomainInfo$system$domainInfo< + Query$DomainInfo$system$domainInfo> + get copyWith => + CopyWith$Query$DomainInfo$system$domainInfo(this, (i) => i); +} + +abstract class CopyWith$Query$DomainInfo$system$domainInfo { + factory CopyWith$Query$DomainInfo$system$domainInfo( + Query$DomainInfo$system$domainInfo instance, + TRes Function(Query$DomainInfo$system$domainInfo) then) = + _CopyWithImpl$Query$DomainInfo$system$domainInfo; + + factory CopyWith$Query$DomainInfo$system$domainInfo.stub(TRes res) = + _CopyWithStubImpl$Query$DomainInfo$system$domainInfo; + + TRes call( + {String? domain, + String? hostname, + Enum$DnsProvider? provider, + List? + requiredDnsRecords, + String? $__typename}); + TRes requiredDnsRecords( + Iterable Function( + Iterable< + CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< + Query$DomainInfo$system$domainInfo$requiredDnsRecords>>) + _fn); +} + +class _CopyWithImpl$Query$DomainInfo$system$domainInfo + implements CopyWith$Query$DomainInfo$system$domainInfo { + _CopyWithImpl$Query$DomainInfo$system$domainInfo(this._instance, this._then); + + final Query$DomainInfo$system$domainInfo _instance; + + final TRes Function(Query$DomainInfo$system$domainInfo) _then; + + static const _undefined = {}; + + TRes call( + {Object? domain = _undefined, + Object? hostname = _undefined, + Object? provider = _undefined, + Object? requiredDnsRecords = _undefined, + Object? $__typename = _undefined}) => + _then(Query$DomainInfo$system$domainInfo( + domain: domain == _undefined || domain == null + ? _instance.domain + : (domain as String), + hostname: hostname == _undefined || hostname == null + ? _instance.hostname + : (hostname as String), + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$DnsProvider), + requiredDnsRecords: + requiredDnsRecords == _undefined || requiredDnsRecords == null + ? _instance.requiredDnsRecords + : (requiredDnsRecords as List< + Query$DomainInfo$system$domainInfo$requiredDnsRecords>), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes requiredDnsRecords( + Iterable Function( + Iterable< + CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< + Query$DomainInfo$system$domainInfo$requiredDnsRecords>>) + _fn) => + call( + requiredDnsRecords: _fn(_instance.requiredDnsRecords.map((e) => + CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords( + e, (i) => i))).toList()); +} + +class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo + implements CopyWith$Query$DomainInfo$system$domainInfo { + _CopyWithStubImpl$Query$DomainInfo$system$domainInfo(this._res); + + TRes _res; + + call( {String? domain, String? hostname, Enum$DnsProvider? provider, List? requiredDnsRecords, String? $__typename}) => - Query$DomainInfo$system$domainInfo( - domain: domain == null ? this.domain : domain, - hostname: hostname == null ? this.hostname : hostname, - provider: provider == null ? this.provider : provider, - requiredDnsRecords: requiredDnsRecords == null - ? this.requiredDnsRecords - : requiredDnsRecords, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + requiredDnsRecords(_fn) => _res; } @JsonSerializable(explicitToJson: true) @@ -1056,20 +1545,89 @@ class Query$DomainInfo$system$domainInfo$requiredDnsRecords { extension UtilityExtension$Query$DomainInfo$system$domainInfo$requiredDnsRecords on Query$DomainInfo$system$domainInfo$requiredDnsRecords { - Query$DomainInfo$system$domainInfo$requiredDnsRecords copyWith( + CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< + Query$DomainInfo$system$domainInfo$requiredDnsRecords> + get copyWith => + CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords( + this, (i) => i); +} + +abstract class CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< + TRes> { + factory CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords( + Query$DomainInfo$system$domainInfo$requiredDnsRecords instance, + TRes Function(Query$DomainInfo$system$domainInfo$requiredDnsRecords) + then) = + _CopyWithImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords; + + factory CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords.stub( + TRes res) = + _CopyWithStubImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords; + + TRes call( + {String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename}); +} + +class _CopyWithImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords + implements + CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords { + _CopyWithImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords( + this._instance, this._then); + + final Query$DomainInfo$system$domainInfo$requiredDnsRecords _instance; + + final TRes Function(Query$DomainInfo$system$domainInfo$requiredDnsRecords) + _then; + + static const _undefined = {}; + + TRes call( + {Object? content = _undefined, + Object? name = _undefined, + Object? priority = _undefined, + Object? recordType = _undefined, + Object? ttl = _undefined, + Object? $__typename = _undefined}) => + _then(Query$DomainInfo$system$domainInfo$requiredDnsRecords( + content: content == _undefined || content == null + ? _instance.content + : (content as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + priority: + priority == _undefined ? _instance.priority : (priority as int?), + recordType: recordType == _undefined || recordType == null + ? _instance.recordType + : (recordType as String), + ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords< + TRes> + implements + CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords { + _CopyWithStubImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords( + this._res); + + TRes _res; + + call( {String? content, String? name, - int? Function()? priority, + int? priority, String? recordType, int? ttl, String? $__typename}) => - Query$DomainInfo$system$domainInfo$requiredDnsRecords( - content: content == null ? this.content : content, - name: name == null ? this.name : name, - priority: priority == null ? this.priority : priority(), - recordType: recordType == null ? this.recordType : recordType, - ttl: ttl == null ? this.ttl : ttl, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -1101,9 +1659,47 @@ class Variables$Mutation$ChangeTimezone { return true; } - Variables$Mutation$ChangeTimezone copyWith({String? timezone}) => - Variables$Mutation$ChangeTimezone( - timezone: timezone == null ? this.timezone : timezone); + CopyWith$Variables$Mutation$ChangeTimezone + get copyWith => + CopyWith$Variables$Mutation$ChangeTimezone(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$ChangeTimezone { + factory CopyWith$Variables$Mutation$ChangeTimezone( + Variables$Mutation$ChangeTimezone instance, + TRes Function(Variables$Mutation$ChangeTimezone) then) = + _CopyWithImpl$Variables$Mutation$ChangeTimezone; + + factory CopyWith$Variables$Mutation$ChangeTimezone.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$ChangeTimezone; + + TRes call({String? timezone}); +} + +class _CopyWithImpl$Variables$Mutation$ChangeTimezone + implements CopyWith$Variables$Mutation$ChangeTimezone { + _CopyWithImpl$Variables$Mutation$ChangeTimezone(this._instance, this._then); + + final Variables$Mutation$ChangeTimezone _instance; + + final TRes Function(Variables$Mutation$ChangeTimezone) _then; + + static const _undefined = {}; + + TRes call({Object? timezone = _undefined}) => + _then(Variables$Mutation$ChangeTimezone( + timezone: timezone == _undefined || timezone == null + ? _instance.timezone + : (timezone as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone + implements CopyWith$Variables$Mutation$ChangeTimezone { + _CopyWithStubImpl$Variables$Mutation$ChangeTimezone(this._res); + + TRes _res; + + call({String? timezone}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1143,13 +1739,63 @@ class Mutation$ChangeTimezone { } extension UtilityExtension$Mutation$ChangeTimezone on Mutation$ChangeTimezone { - Mutation$ChangeTimezone copyWith( + CopyWith$Mutation$ChangeTimezone get copyWith => + CopyWith$Mutation$ChangeTimezone(this, (i) => i); +} + +abstract class CopyWith$Mutation$ChangeTimezone { + factory CopyWith$Mutation$ChangeTimezone(Mutation$ChangeTimezone instance, + TRes Function(Mutation$ChangeTimezone) then) = + _CopyWithImpl$Mutation$ChangeTimezone; + + factory CopyWith$Mutation$ChangeTimezone.stub(TRes res) = + _CopyWithStubImpl$Mutation$ChangeTimezone; + + TRes call( + {Mutation$ChangeTimezone$changeTimezone? changeTimezone, + String? $__typename}); + CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone; +} + +class _CopyWithImpl$Mutation$ChangeTimezone + implements CopyWith$Mutation$ChangeTimezone { + _CopyWithImpl$Mutation$ChangeTimezone(this._instance, this._then); + + final Mutation$ChangeTimezone _instance; + + final TRes Function(Mutation$ChangeTimezone) _then; + + static const _undefined = {}; + + TRes call( + {Object? changeTimezone = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$ChangeTimezone( + changeTimezone: changeTimezone == _undefined || changeTimezone == null + ? _instance.changeTimezone + : (changeTimezone as Mutation$ChangeTimezone$changeTimezone), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone { + final local$changeTimezone = _instance.changeTimezone; + return CopyWith$Mutation$ChangeTimezone$changeTimezone( + local$changeTimezone, (e) => call(changeTimezone: e)); + } +} + +class _CopyWithStubImpl$Mutation$ChangeTimezone + implements CopyWith$Mutation$ChangeTimezone { + _CopyWithStubImpl$Mutation$ChangeTimezone(this._res); + + TRes _res; + + call( {Mutation$ChangeTimezone$changeTimezone? changeTimezone, String? $__typename}) => - Mutation$ChangeTimezone( - changeTimezone: - changeTimezone == null ? this.changeTimezone : changeTimezone, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone => + CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(_res); } const documentNodeMutationChangeTimezone = DocumentNode(definitions: [ @@ -1355,18 +2001,77 @@ class Mutation$ChangeTimezone$changeTimezone extension UtilityExtension$Mutation$ChangeTimezone$changeTimezone on Mutation$ChangeTimezone$changeTimezone { - Mutation$ChangeTimezone$changeTimezone copyWith( + CopyWith$Mutation$ChangeTimezone$changeTimezone< + Mutation$ChangeTimezone$changeTimezone> + get copyWith => + CopyWith$Mutation$ChangeTimezone$changeTimezone(this, (i) => i); +} + +abstract class CopyWith$Mutation$ChangeTimezone$changeTimezone { + factory CopyWith$Mutation$ChangeTimezone$changeTimezone( + Mutation$ChangeTimezone$changeTimezone instance, + TRes Function(Mutation$ChangeTimezone$changeTimezone) then) = + _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone; + + factory CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(TRes res) = + _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + String? timezone}); +} + +class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone + implements CopyWith$Mutation$ChangeTimezone$changeTimezone { + _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone( + this._instance, this._then); + + final Mutation$ChangeTimezone$changeTimezone _instance; + + final TRes Function(Mutation$ChangeTimezone$changeTimezone) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? timezone = _undefined}) => + _then(Mutation$ChangeTimezone$changeTimezone( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + timezone: timezone == _undefined + ? _instance.timezone + : (timezone as String?))); +} + +class _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone + implements CopyWith$Mutation$ChangeTimezone$changeTimezone { + _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - String? Function()? timezone}) => - Mutation$ChangeTimezone$changeTimezone( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - timezone: timezone == null ? this.timezone : timezone()); + String? timezone}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1398,10 +2103,49 @@ class Variables$Mutation$ChangeAutoUpgradeSettings { return true; } - Variables$Mutation$ChangeAutoUpgradeSettings copyWith( - {Input$AutoUpgradeSettingsInput? settings}) => - Variables$Mutation$ChangeAutoUpgradeSettings( - settings: settings == null ? this.settings : settings); + CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings< + Variables$Mutation$ChangeAutoUpgradeSettings> + get copyWith => + CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { + factory CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings( + Variables$Mutation$ChangeAutoUpgradeSettings instance, + TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) then) = + _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings; + + factory CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings; + + TRes call({Input$AutoUpgradeSettingsInput? settings}); +} + +class _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings + implements CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { + _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings( + this._instance, this._then); + + final Variables$Mutation$ChangeAutoUpgradeSettings _instance; + + final TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) _then; + + static const _undefined = {}; + + TRes call({Object? settings = _undefined}) => + _then(Variables$Mutation$ChangeAutoUpgradeSettings( + settings: settings == _undefined || settings == null + ? _instance.settings + : (settings as Input$AutoUpgradeSettingsInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings + implements CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { + _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings(this._res); + + TRes _res; + + call({Input$AutoUpgradeSettingsInput? settings}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1446,15 +2190,75 @@ class Mutation$ChangeAutoUpgradeSettings { extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings on Mutation$ChangeAutoUpgradeSettings { - Mutation$ChangeAutoUpgradeSettings copyWith( + CopyWith$Mutation$ChangeAutoUpgradeSettings< + Mutation$ChangeAutoUpgradeSettings> + get copyWith => + CopyWith$Mutation$ChangeAutoUpgradeSettings(this, (i) => i); +} + +abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings { + factory CopyWith$Mutation$ChangeAutoUpgradeSettings( + Mutation$ChangeAutoUpgradeSettings instance, + TRes Function(Mutation$ChangeAutoUpgradeSettings) then) = + _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings; + + factory CopyWith$Mutation$ChangeAutoUpgradeSettings.stub(TRes res) = + _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings; + + TRes call( + {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? + changeAutoUpgradeSettings, + String? $__typename}); + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + get changeAutoUpgradeSettings; +} + +class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings + implements CopyWith$Mutation$ChangeAutoUpgradeSettings { + _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings(this._instance, this._then); + + final Mutation$ChangeAutoUpgradeSettings _instance; + + final TRes Function(Mutation$ChangeAutoUpgradeSettings) _then; + + static const _undefined = {}; + + TRes call( + {Object? changeAutoUpgradeSettings = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$ChangeAutoUpgradeSettings( + changeAutoUpgradeSettings: changeAutoUpgradeSettings == _undefined || + changeAutoUpgradeSettings == null + ? _instance.changeAutoUpgradeSettings + : (changeAutoUpgradeSettings + as Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + get changeAutoUpgradeSettings { + final local$changeAutoUpgradeSettings = _instance.changeAutoUpgradeSettings; + return CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + local$changeAutoUpgradeSettings, + (e) => call(changeAutoUpgradeSettings: e)); + } +} + +class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings + implements CopyWith$Mutation$ChangeAutoUpgradeSettings { + _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings(this._res); + + TRes _res; + + call( {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? changeAutoUpgradeSettings, String? $__typename}) => - Mutation$ChangeAutoUpgradeSettings( - changeAutoUpgradeSettings: changeAutoUpgradeSettings == null - ? this.changeAutoUpgradeSettings - : changeAutoUpgradeSettings, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + get changeAutoUpgradeSettings => + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + .stub(_res); } const documentNodeMutationChangeAutoUpgradeSettings = @@ -1688,20 +2492,95 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings on Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings { - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings copyWith( + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings> + get copyWith => + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + this, (i) => i); +} + +abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< + TRes> { + factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings instance, + TRes Function( + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) + then) = + _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; + + factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.stub( + TRes res) = + _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + bool? allowReboot, + bool? enableAutoUpgrade}); +} + +class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< + TRes> + implements + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< + TRes> { + _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + this._instance, this._then); + + final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings _instance; + + final TRes Function( + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? allowReboot = _undefined, + Object? enableAutoUpgrade = _undefined}) => + _then(Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + allowReboot: allowReboot == _undefined || allowReboot == null + ? _instance.allowReboot + : (allowReboot as bool), + enableAutoUpgrade: + enableAutoUpgrade == _undefined || enableAutoUpgrade == null + ? _instance.enableAutoUpgrade + : (enableAutoUpgrade as bool))); +} + +class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< + TRes> + implements + CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< + TRes> { + _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, bool? allowReboot, bool? enableAutoUpgrade}) => - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - allowReboot: allowReboot == null ? this.allowReboot : allowReboot, - enableAutoUpgrade: enableAutoUpgrade == null - ? this.enableAutoUpgrade - : enableAutoUpgrade); + _res; } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart index bbca8052..d3e51515 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart @@ -161,7 +161,7 @@ Map _$Query$DomainInfo$system$domainInfoToJson( { 'domain': instance.domain, 'hostname': instance.hostname, - 'provider': _$Enum$DnsProviderEnumMap[instance.provider], + 'provider': _$Enum$DnsProviderEnumMap[instance.provider]!, 'requiredDnsRecords': instance.requiredDnsRecords.map((e) => e.toJson()).toList(), '__typename': instance.$__typename, diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 2a415115..49dbc91f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -62,13 +62,62 @@ class Fragment$basicMutationReturnFields { extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Fragment$basicMutationReturnFields( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Fragment$basicMutationReturnFields< + Fragment$basicMutationReturnFields> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields { + factory CopyWith$Fragment$basicMutationReturnFields( + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then) = + _CopyWithImpl$Fragment$basicMutationReturnFields; + + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + + final Fragment$basicMutationReturnFields _instance; + + final TRes Function(Fragment$basicMutationReturnFields) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Fragment$basicMutationReturnFields( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( @@ -174,11 +223,57 @@ class Query$AllServices { } extension UtilityExtension$Query$AllServices on Query$AllServices { - Query$AllServices copyWith( - {Query$AllServices$services? services, String? $__typename}) => - Query$AllServices( - services: services == null ? this.services : services, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$AllServices get copyWith => + CopyWith$Query$AllServices(this, (i) => i); +} + +abstract class CopyWith$Query$AllServices { + factory CopyWith$Query$AllServices( + Query$AllServices instance, TRes Function(Query$AllServices) then) = + _CopyWithImpl$Query$AllServices; + + factory CopyWith$Query$AllServices.stub(TRes res) = + _CopyWithStubImpl$Query$AllServices; + + TRes call({Query$AllServices$services? services, String? $__typename}); + CopyWith$Query$AllServices$services get services; +} + +class _CopyWithImpl$Query$AllServices + implements CopyWith$Query$AllServices { + _CopyWithImpl$Query$AllServices(this._instance, this._then); + + final Query$AllServices _instance; + + final TRes Function(Query$AllServices) _then; + + static const _undefined = {}; + + TRes call( + {Object? services = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllServices( + services: services == _undefined || services == null + ? _instance.services + : (services as Query$AllServices$services), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$AllServices$services get services { + final local$services = _instance.services; + return CopyWith$Query$AllServices$services( + local$services, (e) => call(services: e)); + } +} + +class _CopyWithStubImpl$Query$AllServices + implements CopyWith$Query$AllServices { + _CopyWithStubImpl$Query$AllServices(this._res); + + TRes _res; + + call({Query$AllServices$services? services, String? $__typename}) => _res; + CopyWith$Query$AllServices$services get services => + CopyWith$Query$AllServices$services.stub(_res); } const documentNodeQueryAllServices = DocumentNode(definitions: [ @@ -491,12 +586,73 @@ class Query$AllServices$services { extension UtilityExtension$Query$AllServices$services on Query$AllServices$services { - Query$AllServices$services copyWith( + CopyWith$Query$AllServices$services + get copyWith => CopyWith$Query$AllServices$services(this, (i) => i); +} + +abstract class CopyWith$Query$AllServices$services { + factory CopyWith$Query$AllServices$services( + Query$AllServices$services instance, + TRes Function(Query$AllServices$services) then) = + _CopyWithImpl$Query$AllServices$services; + + factory CopyWith$Query$AllServices$services.stub(TRes res) = + _CopyWithStubImpl$Query$AllServices$services; + + TRes call( + {List? allServices, + String? $__typename}); + TRes allServices( + Iterable Function( + Iterable< + CopyWith$Query$AllServices$services$allServices< + Query$AllServices$services$allServices>>) + _fn); +} + +class _CopyWithImpl$Query$AllServices$services + implements CopyWith$Query$AllServices$services { + _CopyWithImpl$Query$AllServices$services(this._instance, this._then); + + final Query$AllServices$services _instance; + + final TRes Function(Query$AllServices$services) _then; + + static const _undefined = {}; + + TRes call( + {Object? allServices = _undefined, + Object? $__typename = _undefined}) => + _then(Query$AllServices$services( + allServices: allServices == _undefined || allServices == null + ? _instance.allServices + : (allServices as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes allServices( + Iterable Function( + Iterable< + CopyWith$Query$AllServices$services$allServices< + Query$AllServices$services$allServices>>) + _fn) => + call( + allServices: _fn(_instance.allServices.map((e) => + CopyWith$Query$AllServices$services$allServices(e, (i) => i))) + .toList()); +} + +class _CopyWithStubImpl$Query$AllServices$services + implements CopyWith$Query$AllServices$services { + _CopyWithStubImpl$Query$AllServices$services(this._res); + + TRes _res; + + call( {List? allServices, String? $__typename}) => - Query$AllServices$services( - allServices: allServices == null ? this.allServices : allServices, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + allServices(_fn) => _res; } @JsonSerializable(explicitToJson: true) @@ -634,11 +790,131 @@ class Query$AllServices$services$allServices { extension UtilityExtension$Query$AllServices$services$allServices on Query$AllServices$services$allServices { - Query$AllServices$services$allServices copyWith( + CopyWith$Query$AllServices$services$allServices< + Query$AllServices$services$allServices> + get copyWith => + CopyWith$Query$AllServices$services$allServices(this, (i) => i); +} + +abstract class CopyWith$Query$AllServices$services$allServices { + factory CopyWith$Query$AllServices$services$allServices( + Query$AllServices$services$allServices instance, + TRes Function(Query$AllServices$services$allServices) then) = + _CopyWithImpl$Query$AllServices$services$allServices; + + factory CopyWith$Query$AllServices$services$allServices.stub(TRes res) = + _CopyWithStubImpl$Query$AllServices$services$allServices; + + TRes call( + {String? description, + String? displayName, + List? dnsRecords, + String? id, + bool? isEnabled, + bool? isMovable, + bool? isRequired, + Enum$ServiceStatusEnum? status, + Query$AllServices$services$allServices$storageUsage? storageUsage, + String? svgIcon, + String? url, + String? $__typename}); + TRes dnsRecords( + Iterable? Function( + Iterable< + CopyWith$Query$AllServices$services$allServices$dnsRecords< + Query$AllServices$services$allServices$dnsRecords>>?) + _fn); + CopyWith$Query$AllServices$services$allServices$storageUsage + get storageUsage; +} + +class _CopyWithImpl$Query$AllServices$services$allServices + implements CopyWith$Query$AllServices$services$allServices { + _CopyWithImpl$Query$AllServices$services$allServices( + this._instance, this._then); + + final Query$AllServices$services$allServices _instance; + + final TRes Function(Query$AllServices$services$allServices) _then; + + static const _undefined = {}; + + TRes call( + {Object? description = _undefined, + Object? displayName = _undefined, + Object? dnsRecords = _undefined, + Object? id = _undefined, + Object? isEnabled = _undefined, + Object? isMovable = _undefined, + Object? isRequired = _undefined, + Object? status = _undefined, + Object? storageUsage = _undefined, + Object? svgIcon = _undefined, + Object? url = _undefined, + Object? $__typename = _undefined}) => + _then(Query$AllServices$services$allServices( + description: description == _undefined || description == null + ? _instance.description + : (description as String), + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + dnsRecords: dnsRecords == _undefined + ? _instance.dnsRecords + : (dnsRecords + as List?), + id: id == _undefined || id == null ? _instance.id : (id as String), + isEnabled: isEnabled == _undefined || isEnabled == null + ? _instance.isEnabled + : (isEnabled as bool), + isMovable: isMovable == _undefined || isMovable == null + ? _instance.isMovable + : (isMovable as bool), + isRequired: isRequired == _undefined || isRequired == null + ? _instance.isRequired + : (isRequired as bool), + status: status == _undefined || status == null + ? _instance.status + : (status as Enum$ServiceStatusEnum), + storageUsage: storageUsage == _undefined || storageUsage == null + ? _instance.storageUsage + : (storageUsage + as Query$AllServices$services$allServices$storageUsage), + svgIcon: svgIcon == _undefined || svgIcon == null + ? _instance.svgIcon + : (svgIcon as String), + url: url == _undefined ? _instance.url : (url as String?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes dnsRecords( + Iterable? Function( + Iterable< + CopyWith$Query$AllServices$services$allServices$dnsRecords< + Query$AllServices$services$allServices$dnsRecords>>?) + _fn) => + call( + dnsRecords: _fn(_instance.dnsRecords?.map((e) => + CopyWith$Query$AllServices$services$allServices$dnsRecords( + e, (i) => i)))?.toList()); + CopyWith$Query$AllServices$services$allServices$storageUsage + get storageUsage { + final local$storageUsage = _instance.storageUsage; + return CopyWith$Query$AllServices$services$allServices$storageUsage( + local$storageUsage, (e) => call(storageUsage: e)); + } +} + +class _CopyWithStubImpl$Query$AllServices$services$allServices + implements CopyWith$Query$AllServices$services$allServices { + _CopyWithStubImpl$Query$AllServices$services$allServices(this._res); + + TRes _res; + + call( {String? description, String? displayName, - List? Function()? - dnsRecords, + List? dnsRecords, String? id, bool? isEnabled, bool? isMovable, @@ -646,21 +922,14 @@ extension UtilityExtension$Query$AllServices$services$allServices Enum$ServiceStatusEnum? status, Query$AllServices$services$allServices$storageUsage? storageUsage, String? svgIcon, - String? Function()? url, + String? url, String? $__typename}) => - Query$AllServices$services$allServices( - description: description == null ? this.description : description, - displayName: displayName == null ? this.displayName : displayName, - dnsRecords: dnsRecords == null ? this.dnsRecords : dnsRecords(), - id: id == null ? this.id : id, - isEnabled: isEnabled == null ? this.isEnabled : isEnabled, - isMovable: isMovable == null ? this.isMovable : isMovable, - isRequired: isRequired == null ? this.isRequired : isRequired, - status: status == null ? this.status : status, - storageUsage: storageUsage == null ? this.storageUsage : storageUsage, - svgIcon: svgIcon == null ? this.svgIcon : svgIcon, - url: url == null ? this.url : url(), - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + dnsRecords(_fn) => _res; + CopyWith$Query$AllServices$services$allServices$storageUsage + get storageUsage => + CopyWith$Query$AllServices$services$allServices$storageUsage.stub( + _res); } @JsonSerializable(explicitToJson: true) @@ -733,20 +1002,87 @@ class Query$AllServices$services$allServices$dnsRecords { extension UtilityExtension$Query$AllServices$services$allServices$dnsRecords on Query$AllServices$services$allServices$dnsRecords { - Query$AllServices$services$allServices$dnsRecords copyWith( + CopyWith$Query$AllServices$services$allServices$dnsRecords< + Query$AllServices$services$allServices$dnsRecords> + get copyWith => + CopyWith$Query$AllServices$services$allServices$dnsRecords( + this, (i) => i); +} + +abstract class CopyWith$Query$AllServices$services$allServices$dnsRecords< + TRes> { + factory CopyWith$Query$AllServices$services$allServices$dnsRecords( + Query$AllServices$services$allServices$dnsRecords instance, + TRes Function(Query$AllServices$services$allServices$dnsRecords) + then) = + _CopyWithImpl$Query$AllServices$services$allServices$dnsRecords; + + factory CopyWith$Query$AllServices$services$allServices$dnsRecords.stub( + TRes res) = + _CopyWithStubImpl$Query$AllServices$services$allServices$dnsRecords; + + TRes call( + {String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename}); +} + +class _CopyWithImpl$Query$AllServices$services$allServices$dnsRecords + implements + CopyWith$Query$AllServices$services$allServices$dnsRecords { + _CopyWithImpl$Query$AllServices$services$allServices$dnsRecords( + this._instance, this._then); + + final Query$AllServices$services$allServices$dnsRecords _instance; + + final TRes Function(Query$AllServices$services$allServices$dnsRecords) _then; + + static const _undefined = {}; + + TRes call( + {Object? content = _undefined, + Object? name = _undefined, + Object? priority = _undefined, + Object? recordType = _undefined, + Object? ttl = _undefined, + Object? $__typename = _undefined}) => + _then(Query$AllServices$services$allServices$dnsRecords( + content: content == _undefined || content == null + ? _instance.content + : (content as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + priority: + priority == _undefined ? _instance.priority : (priority as int?), + recordType: recordType == _undefined || recordType == null + ? _instance.recordType + : (recordType as String), + ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$AllServices$services$allServices$dnsRecords + implements + CopyWith$Query$AllServices$services$allServices$dnsRecords { + _CopyWithStubImpl$Query$AllServices$services$allServices$dnsRecords( + this._res); + + TRes _res; + + call( {String? content, String? name, - int? Function()? priority, + int? priority, String? recordType, int? ttl, String? $__typename}) => - Query$AllServices$services$allServices$dnsRecords( - content: content == null ? this.content : content, - name: name == null ? this.name : name, - priority: priority == null ? this.priority : priority(), - recordType: recordType == null ? this.recordType : recordType, - ttl: ttl == null ? this.ttl : ttl, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -804,18 +1140,96 @@ class Query$AllServices$services$allServices$storageUsage { extension UtilityExtension$Query$AllServices$services$allServices$storageUsage on Query$AllServices$services$allServices$storageUsage { - Query$AllServices$services$allServices$storageUsage copyWith( + CopyWith$Query$AllServices$services$allServices$storageUsage< + Query$AllServices$services$allServices$storageUsage> + get copyWith => + CopyWith$Query$AllServices$services$allServices$storageUsage( + this, (i) => i); +} + +abstract class CopyWith$Query$AllServices$services$allServices$storageUsage< + TRes> { + factory CopyWith$Query$AllServices$services$allServices$storageUsage( + Query$AllServices$services$allServices$storageUsage instance, + TRes Function(Query$AllServices$services$allServices$storageUsage) + then) = + _CopyWithImpl$Query$AllServices$services$allServices$storageUsage; + + factory CopyWith$Query$AllServices$services$allServices$storageUsage.stub( + TRes res) = + _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage; + + TRes call( + {String? title, + String? usedSpace, + Query$AllServices$services$allServices$storageUsage$volume? volume, + String? $__typename}); + CopyWith$Query$AllServices$services$allServices$storageUsage$volume + get volume; +} + +class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage + implements + CopyWith$Query$AllServices$services$allServices$storageUsage { + _CopyWithImpl$Query$AllServices$services$allServices$storageUsage( + this._instance, this._then); + + final Query$AllServices$services$allServices$storageUsage _instance; + + final TRes Function(Query$AllServices$services$allServices$storageUsage) + _then; + + static const _undefined = {}; + + TRes call( + {Object? title = _undefined, + Object? usedSpace = _undefined, + Object? volume = _undefined, + Object? $__typename = _undefined}) => + _then(Query$AllServices$services$allServices$storageUsage( + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + volume: volume == _undefined + ? _instance.volume + : (volume + as Query$AllServices$services$allServices$storageUsage$volume?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$AllServices$services$allServices$storageUsage$volume + get volume { + final local$volume = _instance.volume; + return local$volume == null + ? CopyWith$Query$AllServices$services$allServices$storageUsage$volume + .stub(_then(_instance)) + : CopyWith$Query$AllServices$services$allServices$storageUsage$volume( + local$volume, (e) => call(volume: e)); + } +} + +class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage< + TRes> + implements + CopyWith$Query$AllServices$services$allServices$storageUsage { + _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage( + this._res); + + TRes _res; + + call( {String? title, String? usedSpace, - Query$AllServices$services$allServices$storageUsage$volume? - Function()? - volume, + Query$AllServices$services$allServices$storageUsage$volume? volume, String? $__typename}) => - Query$AllServices$services$allServices$storageUsage( - title: title == null ? this.title : title, - usedSpace: usedSpace == null ? this.usedSpace : usedSpace, - volume: volume == null ? this.volume : volume(), - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Query$AllServices$services$allServices$storageUsage$volume + get volume => + CopyWith$Query$AllServices$services$allServices$storageUsage$volume + .stub(_res); } @JsonSerializable(explicitToJson: true) @@ -860,11 +1274,65 @@ class Query$AllServices$services$allServices$storageUsage$volume { extension UtilityExtension$Query$AllServices$services$allServices$storageUsage$volume on Query$AllServices$services$allServices$storageUsage$volume { - Query$AllServices$services$allServices$storageUsage$volume copyWith( - {String? name, String? $__typename}) => - Query$AllServices$services$allServices$storageUsage$volume( - name: name == null ? this.name : name, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$AllServices$services$allServices$storageUsage$volume< + Query$AllServices$services$allServices$storageUsage$volume> + get copyWith => + CopyWith$Query$AllServices$services$allServices$storageUsage$volume( + this, (i) => i); +} + +abstract class CopyWith$Query$AllServices$services$allServices$storageUsage$volume< + TRes> { + factory CopyWith$Query$AllServices$services$allServices$storageUsage$volume( + Query$AllServices$services$allServices$storageUsage$volume instance, + TRes Function( + Query$AllServices$services$allServices$storageUsage$volume) + then) = + _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume; + + factory CopyWith$Query$AllServices$services$allServices$storageUsage$volume.stub( + TRes res) = + _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volume; + + TRes call({String? name, String? $__typename}); +} + +class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< + TRes> + implements + CopyWith$Query$AllServices$services$allServices$storageUsage$volume< + TRes> { + _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume( + this._instance, this._then); + + final Query$AllServices$services$allServices$storageUsage$volume _instance; + + final TRes Function( + Query$AllServices$services$allServices$storageUsage$volume) _then; + + static const _undefined = {}; + + TRes call({Object? name = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllServices$services$allServices$storageUsage$volume( + name: name == _undefined || name == null + ? _instance.name + : (name as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volume< + TRes> + implements + CopyWith$Query$AllServices$services$allServices$storageUsage$volume< + TRes> { + _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volume( + this._res); + + TRes _res; + + call({String? name, String? $__typename}) => _res; } @JsonSerializable(explicitToJson: true) @@ -896,9 +1364,46 @@ class Variables$Mutation$EnableService { return true; } - Variables$Mutation$EnableService copyWith({String? serviceId}) => - Variables$Mutation$EnableService( - serviceId: serviceId == null ? this.serviceId : serviceId); + CopyWith$Variables$Mutation$EnableService + get copyWith => CopyWith$Variables$Mutation$EnableService(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$EnableService { + factory CopyWith$Variables$Mutation$EnableService( + Variables$Mutation$EnableService instance, + TRes Function(Variables$Mutation$EnableService) then) = + _CopyWithImpl$Variables$Mutation$EnableService; + + factory CopyWith$Variables$Mutation$EnableService.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$EnableService; + + TRes call({String? serviceId}); +} + +class _CopyWithImpl$Variables$Mutation$EnableService + implements CopyWith$Variables$Mutation$EnableService { + _CopyWithImpl$Variables$Mutation$EnableService(this._instance, this._then); + + final Variables$Mutation$EnableService _instance; + + final TRes Function(Variables$Mutation$EnableService) _then; + + static const _undefined = {}; + + TRes call({Object? serviceId = _undefined}) => + _then(Variables$Mutation$EnableService( + serviceId: serviceId == _undefined || serviceId == null + ? _instance.serviceId + : (serviceId as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$EnableService + implements CopyWith$Variables$Mutation$EnableService { + _CopyWithStubImpl$Variables$Mutation$EnableService(this._res); + + TRes _res; + + call({String? serviceId}) => _res; } @JsonSerializable(explicitToJson: true) @@ -938,13 +1443,63 @@ class Mutation$EnableService { } extension UtilityExtension$Mutation$EnableService on Mutation$EnableService { - Mutation$EnableService copyWith( + CopyWith$Mutation$EnableService get copyWith => + CopyWith$Mutation$EnableService(this, (i) => i); +} + +abstract class CopyWith$Mutation$EnableService { + factory CopyWith$Mutation$EnableService(Mutation$EnableService instance, + TRes Function(Mutation$EnableService) then) = + _CopyWithImpl$Mutation$EnableService; + + factory CopyWith$Mutation$EnableService.stub(TRes res) = + _CopyWithStubImpl$Mutation$EnableService; + + TRes call( + {Mutation$EnableService$enableService? enableService, + String? $__typename}); + CopyWith$Mutation$EnableService$enableService get enableService; +} + +class _CopyWithImpl$Mutation$EnableService + implements CopyWith$Mutation$EnableService { + _CopyWithImpl$Mutation$EnableService(this._instance, this._then); + + final Mutation$EnableService _instance; + + final TRes Function(Mutation$EnableService) _then; + + static const _undefined = {}; + + TRes call( + {Object? enableService = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$EnableService( + enableService: enableService == _undefined || enableService == null + ? _instance.enableService + : (enableService as Mutation$EnableService$enableService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$EnableService$enableService get enableService { + final local$enableService = _instance.enableService; + return CopyWith$Mutation$EnableService$enableService( + local$enableService, (e) => call(enableService: e)); + } +} + +class _CopyWithStubImpl$Mutation$EnableService + implements CopyWith$Mutation$EnableService { + _CopyWithStubImpl$Mutation$EnableService(this._res); + + TRes _res; + + call( {Mutation$EnableService$enableService? enableService, String? $__typename}) => - Mutation$EnableService( - enableService: - enableService == null ? this.enableService : enableService, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$EnableService$enableService get enableService => + CopyWith$Mutation$EnableService$enableService.stub(_res); } const documentNodeMutationEnableService = DocumentNode(definitions: [ @@ -1136,13 +1691,63 @@ class Mutation$EnableService$enableService extension UtilityExtension$Mutation$EnableService$enableService on Mutation$EnableService$enableService { - Mutation$EnableService$enableService copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$EnableService$enableService( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$EnableService$enableService< + Mutation$EnableService$enableService> + get copyWith => + CopyWith$Mutation$EnableService$enableService(this, (i) => i); +} + +abstract class CopyWith$Mutation$EnableService$enableService { + factory CopyWith$Mutation$EnableService$enableService( + Mutation$EnableService$enableService instance, + TRes Function(Mutation$EnableService$enableService) then) = + _CopyWithImpl$Mutation$EnableService$enableService; + + factory CopyWith$Mutation$EnableService$enableService.stub(TRes res) = + _CopyWithStubImpl$Mutation$EnableService$enableService; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$EnableService$enableService + implements CopyWith$Mutation$EnableService$enableService { + _CopyWithImpl$Mutation$EnableService$enableService( + this._instance, this._then); + + final Mutation$EnableService$enableService _instance; + + final TRes Function(Mutation$EnableService$enableService) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$EnableService$enableService( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$EnableService$enableService + implements CopyWith$Mutation$EnableService$enableService { + _CopyWithStubImpl$Mutation$EnableService$enableService(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1174,9 +1779,47 @@ class Variables$Mutation$DisableService { return true; } - Variables$Mutation$DisableService copyWith({String? serviceId}) => - Variables$Mutation$DisableService( - serviceId: serviceId == null ? this.serviceId : serviceId); + CopyWith$Variables$Mutation$DisableService + get copyWith => + CopyWith$Variables$Mutation$DisableService(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$DisableService { + factory CopyWith$Variables$Mutation$DisableService( + Variables$Mutation$DisableService instance, + TRes Function(Variables$Mutation$DisableService) then) = + _CopyWithImpl$Variables$Mutation$DisableService; + + factory CopyWith$Variables$Mutation$DisableService.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$DisableService; + + TRes call({String? serviceId}); +} + +class _CopyWithImpl$Variables$Mutation$DisableService + implements CopyWith$Variables$Mutation$DisableService { + _CopyWithImpl$Variables$Mutation$DisableService(this._instance, this._then); + + final Variables$Mutation$DisableService _instance; + + final TRes Function(Variables$Mutation$DisableService) _then; + + static const _undefined = {}; + + TRes call({Object? serviceId = _undefined}) => + _then(Variables$Mutation$DisableService( + serviceId: serviceId == _undefined || serviceId == null + ? _instance.serviceId + : (serviceId as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$DisableService + implements CopyWith$Variables$Mutation$DisableService { + _CopyWithStubImpl$Variables$Mutation$DisableService(this._res); + + TRes _res; + + call({String? serviceId}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1216,13 +1859,63 @@ class Mutation$DisableService { } extension UtilityExtension$Mutation$DisableService on Mutation$DisableService { - Mutation$DisableService copyWith( + CopyWith$Mutation$DisableService get copyWith => + CopyWith$Mutation$DisableService(this, (i) => i); +} + +abstract class CopyWith$Mutation$DisableService { + factory CopyWith$Mutation$DisableService(Mutation$DisableService instance, + TRes Function(Mutation$DisableService) then) = + _CopyWithImpl$Mutation$DisableService; + + factory CopyWith$Mutation$DisableService.stub(TRes res) = + _CopyWithStubImpl$Mutation$DisableService; + + TRes call( + {Mutation$DisableService$disableService? disableService, + String? $__typename}); + CopyWith$Mutation$DisableService$disableService get disableService; +} + +class _CopyWithImpl$Mutation$DisableService + implements CopyWith$Mutation$DisableService { + _CopyWithImpl$Mutation$DisableService(this._instance, this._then); + + final Mutation$DisableService _instance; + + final TRes Function(Mutation$DisableService) _then; + + static const _undefined = {}; + + TRes call( + {Object? disableService = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DisableService( + disableService: disableService == _undefined || disableService == null + ? _instance.disableService + : (disableService as Mutation$DisableService$disableService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$DisableService$disableService get disableService { + final local$disableService = _instance.disableService; + return CopyWith$Mutation$DisableService$disableService( + local$disableService, (e) => call(disableService: e)); + } +} + +class _CopyWithStubImpl$Mutation$DisableService + implements CopyWith$Mutation$DisableService { + _CopyWithStubImpl$Mutation$DisableService(this._res); + + TRes _res; + + call( {Mutation$DisableService$disableService? disableService, String? $__typename}) => - Mutation$DisableService( - disableService: - disableService == null ? this.disableService : disableService, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$DisableService$disableService get disableService => + CopyWith$Mutation$DisableService$disableService.stub(_res); } const documentNodeMutationDisableService = DocumentNode(definitions: [ @@ -1414,13 +2107,63 @@ class Mutation$DisableService$disableService extension UtilityExtension$Mutation$DisableService$disableService on Mutation$DisableService$disableService { - Mutation$DisableService$disableService copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$DisableService$disableService( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$DisableService$disableService< + Mutation$DisableService$disableService> + get copyWith => + CopyWith$Mutation$DisableService$disableService(this, (i) => i); +} + +abstract class CopyWith$Mutation$DisableService$disableService { + factory CopyWith$Mutation$DisableService$disableService( + Mutation$DisableService$disableService instance, + TRes Function(Mutation$DisableService$disableService) then) = + _CopyWithImpl$Mutation$DisableService$disableService; + + factory CopyWith$Mutation$DisableService$disableService.stub(TRes res) = + _CopyWithStubImpl$Mutation$DisableService$disableService; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$DisableService$disableService + implements CopyWith$Mutation$DisableService$disableService { + _CopyWithImpl$Mutation$DisableService$disableService( + this._instance, this._then); + + final Mutation$DisableService$disableService _instance; + + final TRes Function(Mutation$DisableService$disableService) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DisableService$disableService( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$DisableService$disableService + implements CopyWith$Mutation$DisableService$disableService { + _CopyWithStubImpl$Mutation$DisableService$disableService(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1450,9 +2193,46 @@ class Variables$Mutation$StopService { return true; } - Variables$Mutation$StopService copyWith({String? serviceId}) => - Variables$Mutation$StopService( - serviceId: serviceId == null ? this.serviceId : serviceId); + CopyWith$Variables$Mutation$StopService + get copyWith => CopyWith$Variables$Mutation$StopService(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$StopService { + factory CopyWith$Variables$Mutation$StopService( + Variables$Mutation$StopService instance, + TRes Function(Variables$Mutation$StopService) then) = + _CopyWithImpl$Variables$Mutation$StopService; + + factory CopyWith$Variables$Mutation$StopService.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$StopService; + + TRes call({String? serviceId}); +} + +class _CopyWithImpl$Variables$Mutation$StopService + implements CopyWith$Variables$Mutation$StopService { + _CopyWithImpl$Variables$Mutation$StopService(this._instance, this._then); + + final Variables$Mutation$StopService _instance; + + final TRes Function(Variables$Mutation$StopService) _then; + + static const _undefined = {}; + + TRes call({Object? serviceId = _undefined}) => + _then(Variables$Mutation$StopService( + serviceId: serviceId == _undefined || serviceId == null + ? _instance.serviceId + : (serviceId as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$StopService + implements CopyWith$Variables$Mutation$StopService { + _CopyWithStubImpl$Variables$Mutation$StopService(this._res); + + TRes _res; + + call({String? serviceId}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1491,12 +2271,60 @@ class Mutation$StopService { } extension UtilityExtension$Mutation$StopService on Mutation$StopService { - Mutation$StopService copyWith( - {Mutation$StopService$stopService? stopService, - String? $__typename}) => - Mutation$StopService( - stopService: stopService == null ? this.stopService : stopService, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$StopService get copyWith => + CopyWith$Mutation$StopService(this, (i) => i); +} + +abstract class CopyWith$Mutation$StopService { + factory CopyWith$Mutation$StopService(Mutation$StopService instance, + TRes Function(Mutation$StopService) then) = + _CopyWithImpl$Mutation$StopService; + + factory CopyWith$Mutation$StopService.stub(TRes res) = + _CopyWithStubImpl$Mutation$StopService; + + TRes call( + {Mutation$StopService$stopService? stopService, String? $__typename}); + CopyWith$Mutation$StopService$stopService get stopService; +} + +class _CopyWithImpl$Mutation$StopService + implements CopyWith$Mutation$StopService { + _CopyWithImpl$Mutation$StopService(this._instance, this._then); + + final Mutation$StopService _instance; + + final TRes Function(Mutation$StopService) _then; + + static const _undefined = {}; + + TRes call( + {Object? stopService = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$StopService( + stopService: stopService == _undefined || stopService == null + ? _instance.stopService + : (stopService as Mutation$StopService$stopService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$StopService$stopService get stopService { + final local$stopService = _instance.stopService; + return CopyWith$Mutation$StopService$stopService( + local$stopService, (e) => call(stopService: e)); + } +} + +class _CopyWithStubImpl$Mutation$StopService + implements CopyWith$Mutation$StopService { + _CopyWithStubImpl$Mutation$StopService(this._res); + + TRes _res; + + call({Mutation$StopService$stopService? stopService, String? $__typename}) => + _res; + CopyWith$Mutation$StopService$stopService get stopService => + CopyWith$Mutation$StopService$stopService.stub(_res); } const documentNodeMutationStopService = DocumentNode(definitions: [ @@ -1685,13 +2513,60 @@ class Mutation$StopService$stopService extension UtilityExtension$Mutation$StopService$stopService on Mutation$StopService$stopService { - Mutation$StopService$stopService copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$StopService$stopService( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$StopService$stopService + get copyWith => CopyWith$Mutation$StopService$stopService(this, (i) => i); +} + +abstract class CopyWith$Mutation$StopService$stopService { + factory CopyWith$Mutation$StopService$stopService( + Mutation$StopService$stopService instance, + TRes Function(Mutation$StopService$stopService) then) = + _CopyWithImpl$Mutation$StopService$stopService; + + factory CopyWith$Mutation$StopService$stopService.stub(TRes res) = + _CopyWithStubImpl$Mutation$StopService$stopService; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$StopService$stopService + implements CopyWith$Mutation$StopService$stopService { + _CopyWithImpl$Mutation$StopService$stopService(this._instance, this._then); + + final Mutation$StopService$stopService _instance; + + final TRes Function(Mutation$StopService$stopService) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$StopService$stopService( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$StopService$stopService + implements CopyWith$Mutation$StopService$stopService { + _CopyWithStubImpl$Mutation$StopService$stopService(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1722,9 +2597,46 @@ class Variables$Mutation$StartService { return true; } - Variables$Mutation$StartService copyWith({String? serviceId}) => - Variables$Mutation$StartService( - serviceId: serviceId == null ? this.serviceId : serviceId); + CopyWith$Variables$Mutation$StartService + get copyWith => CopyWith$Variables$Mutation$StartService(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$StartService { + factory CopyWith$Variables$Mutation$StartService( + Variables$Mutation$StartService instance, + TRes Function(Variables$Mutation$StartService) then) = + _CopyWithImpl$Variables$Mutation$StartService; + + factory CopyWith$Variables$Mutation$StartService.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$StartService; + + TRes call({String? serviceId}); +} + +class _CopyWithImpl$Variables$Mutation$StartService + implements CopyWith$Variables$Mutation$StartService { + _CopyWithImpl$Variables$Mutation$StartService(this._instance, this._then); + + final Variables$Mutation$StartService _instance; + + final TRes Function(Variables$Mutation$StartService) _then; + + static const _undefined = {}; + + TRes call({Object? serviceId = _undefined}) => + _then(Variables$Mutation$StartService( + serviceId: serviceId == _undefined || serviceId == null + ? _instance.serviceId + : (serviceId as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$StartService + implements CopyWith$Variables$Mutation$StartService { + _CopyWithStubImpl$Variables$Mutation$StartService(this._res); + + TRes _res; + + call({String? serviceId}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1764,12 +2676,62 @@ class Mutation$StartService { } extension UtilityExtension$Mutation$StartService on Mutation$StartService { - Mutation$StartService copyWith( + CopyWith$Mutation$StartService get copyWith => + CopyWith$Mutation$StartService(this, (i) => i); +} + +abstract class CopyWith$Mutation$StartService { + factory CopyWith$Mutation$StartService(Mutation$StartService instance, + TRes Function(Mutation$StartService) then) = + _CopyWithImpl$Mutation$StartService; + + factory CopyWith$Mutation$StartService.stub(TRes res) = + _CopyWithStubImpl$Mutation$StartService; + + TRes call( + {Mutation$StartService$startService? startService, String? $__typename}); + CopyWith$Mutation$StartService$startService get startService; +} + +class _CopyWithImpl$Mutation$StartService + implements CopyWith$Mutation$StartService { + _CopyWithImpl$Mutation$StartService(this._instance, this._then); + + final Mutation$StartService _instance; + + final TRes Function(Mutation$StartService) _then; + + static const _undefined = {}; + + TRes call( + {Object? startService = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$StartService( + startService: startService == _undefined || startService == null + ? _instance.startService + : (startService as Mutation$StartService$startService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$StartService$startService get startService { + final local$startService = _instance.startService; + return CopyWith$Mutation$StartService$startService( + local$startService, (e) => call(startService: e)); + } +} + +class _CopyWithStubImpl$Mutation$StartService + implements CopyWith$Mutation$StartService { + _CopyWithStubImpl$Mutation$StartService(this._res); + + TRes _res; + + call( {Mutation$StartService$startService? startService, String? $__typename}) => - Mutation$StartService( - startService: startService == null ? this.startService : startService, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$StartService$startService get startService => + CopyWith$Mutation$StartService$startService.stub(_res); } const documentNodeMutationStartService = DocumentNode(definitions: [ @@ -1961,13 +2923,62 @@ class Mutation$StartService$startService extension UtilityExtension$Mutation$StartService$startService on Mutation$StartService$startService { - Mutation$StartService$startService copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$StartService$startService( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$StartService$startService< + Mutation$StartService$startService> + get copyWith => + CopyWith$Mutation$StartService$startService(this, (i) => i); +} + +abstract class CopyWith$Mutation$StartService$startService { + factory CopyWith$Mutation$StartService$startService( + Mutation$StartService$startService instance, + TRes Function(Mutation$StartService$startService) then) = + _CopyWithImpl$Mutation$StartService$startService; + + factory CopyWith$Mutation$StartService$startService.stub(TRes res) = + _CopyWithStubImpl$Mutation$StartService$startService; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$StartService$startService + implements CopyWith$Mutation$StartService$startService { + _CopyWithImpl$Mutation$StartService$startService(this._instance, this._then); + + final Mutation$StartService$startService _instance; + + final TRes Function(Mutation$StartService$startService) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$StartService$startService( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$StartService$startService + implements CopyWith$Mutation$StartService$startService { + _CopyWithStubImpl$Mutation$StartService$startService(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1999,9 +3010,47 @@ class Variables$Mutation$RestartService { return true; } - Variables$Mutation$RestartService copyWith({String? serviceId}) => - Variables$Mutation$RestartService( - serviceId: serviceId == null ? this.serviceId : serviceId); + CopyWith$Variables$Mutation$RestartService + get copyWith => + CopyWith$Variables$Mutation$RestartService(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$RestartService { + factory CopyWith$Variables$Mutation$RestartService( + Variables$Mutation$RestartService instance, + TRes Function(Variables$Mutation$RestartService) then) = + _CopyWithImpl$Variables$Mutation$RestartService; + + factory CopyWith$Variables$Mutation$RestartService.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$RestartService; + + TRes call({String? serviceId}); +} + +class _CopyWithImpl$Variables$Mutation$RestartService + implements CopyWith$Variables$Mutation$RestartService { + _CopyWithImpl$Variables$Mutation$RestartService(this._instance, this._then); + + final Variables$Mutation$RestartService _instance; + + final TRes Function(Variables$Mutation$RestartService) _then; + + static const _undefined = {}; + + TRes call({Object? serviceId = _undefined}) => + _then(Variables$Mutation$RestartService( + serviceId: serviceId == _undefined || serviceId == null + ? _instance.serviceId + : (serviceId as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$RestartService + implements CopyWith$Variables$Mutation$RestartService { + _CopyWithStubImpl$Variables$Mutation$RestartService(this._res); + + TRes _res; + + call({String? serviceId}) => _res; } @JsonSerializable(explicitToJson: true) @@ -2041,13 +3090,63 @@ class Mutation$RestartService { } extension UtilityExtension$Mutation$RestartService on Mutation$RestartService { - Mutation$RestartService copyWith( + CopyWith$Mutation$RestartService get copyWith => + CopyWith$Mutation$RestartService(this, (i) => i); +} + +abstract class CopyWith$Mutation$RestartService { + factory CopyWith$Mutation$RestartService(Mutation$RestartService instance, + TRes Function(Mutation$RestartService) then) = + _CopyWithImpl$Mutation$RestartService; + + factory CopyWith$Mutation$RestartService.stub(TRes res) = + _CopyWithStubImpl$Mutation$RestartService; + + TRes call( + {Mutation$RestartService$restartService? restartService, + String? $__typename}); + CopyWith$Mutation$RestartService$restartService get restartService; +} + +class _CopyWithImpl$Mutation$RestartService + implements CopyWith$Mutation$RestartService { + _CopyWithImpl$Mutation$RestartService(this._instance, this._then); + + final Mutation$RestartService _instance; + + final TRes Function(Mutation$RestartService) _then; + + static const _undefined = {}; + + TRes call( + {Object? restartService = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RestartService( + restartService: restartService == _undefined || restartService == null + ? _instance.restartService + : (restartService as Mutation$RestartService$restartService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RestartService$restartService get restartService { + final local$restartService = _instance.restartService; + return CopyWith$Mutation$RestartService$restartService( + local$restartService, (e) => call(restartService: e)); + } +} + +class _CopyWithStubImpl$Mutation$RestartService + implements CopyWith$Mutation$RestartService { + _CopyWithStubImpl$Mutation$RestartService(this._res); + + TRes _res; + + call( {Mutation$RestartService$restartService? restartService, String? $__typename}) => - Mutation$RestartService( - restartService: - restartService == null ? this.restartService : restartService, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$RestartService$restartService get restartService => + CopyWith$Mutation$RestartService$restartService.stub(_res); } const documentNodeMutationRestartService = DocumentNode(definitions: [ @@ -2239,13 +3338,63 @@ class Mutation$RestartService$restartService extension UtilityExtension$Mutation$RestartService$restartService on Mutation$RestartService$restartService { - Mutation$RestartService$restartService copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$RestartService$restartService( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$RestartService$restartService< + Mutation$RestartService$restartService> + get copyWith => + CopyWith$Mutation$RestartService$restartService(this, (i) => i); +} + +abstract class CopyWith$Mutation$RestartService$restartService { + factory CopyWith$Mutation$RestartService$restartService( + Mutation$RestartService$restartService instance, + TRes Function(Mutation$RestartService$restartService) then) = + _CopyWithImpl$Mutation$RestartService$restartService; + + factory CopyWith$Mutation$RestartService$restartService.stub(TRes res) = + _CopyWithStubImpl$Mutation$RestartService$restartService; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$RestartService$restartService + implements CopyWith$Mutation$RestartService$restartService { + _CopyWithImpl$Mutation$RestartService$restartService( + this._instance, this._then); + + final Mutation$RestartService$restartService _instance; + + final TRes Function(Mutation$RestartService$restartService) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RestartService$restartService( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$RestartService$restartService + implements CopyWith$Mutation$RestartService$restartService { + _CopyWithStubImpl$Mutation$RestartService$restartService(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -2275,8 +3424,46 @@ class Variables$Mutation$MoveService { return true; } - Variables$Mutation$MoveService copyWith({Input$MoveServiceInput? input}) => - Variables$Mutation$MoveService(input: input == null ? this.input : input); + CopyWith$Variables$Mutation$MoveService + get copyWith => CopyWith$Variables$Mutation$MoveService(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$MoveService { + factory CopyWith$Variables$Mutation$MoveService( + Variables$Mutation$MoveService instance, + TRes Function(Variables$Mutation$MoveService) then) = + _CopyWithImpl$Variables$Mutation$MoveService; + + factory CopyWith$Variables$Mutation$MoveService.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$MoveService; + + TRes call({Input$MoveServiceInput? input}); +} + +class _CopyWithImpl$Variables$Mutation$MoveService + implements CopyWith$Variables$Mutation$MoveService { + _CopyWithImpl$Variables$Mutation$MoveService(this._instance, this._then); + + final Variables$Mutation$MoveService _instance; + + final TRes Function(Variables$Mutation$MoveService) _then; + + static const _undefined = {}; + + TRes call({Object? input = _undefined}) => + _then(Variables$Mutation$MoveService( + input: input == _undefined || input == null + ? _instance.input + : (input as Input$MoveServiceInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$MoveService + implements CopyWith$Variables$Mutation$MoveService { + _CopyWithStubImpl$Variables$Mutation$MoveService(this._res); + + TRes _res; + + call({Input$MoveServiceInput? input}) => _res; } @JsonSerializable(explicitToJson: true) @@ -2315,12 +3502,60 @@ class Mutation$MoveService { } extension UtilityExtension$Mutation$MoveService on Mutation$MoveService { - Mutation$MoveService copyWith( - {Mutation$MoveService$moveService? moveService, - String? $__typename}) => - Mutation$MoveService( - moveService: moveService == null ? this.moveService : moveService, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$MoveService get copyWith => + CopyWith$Mutation$MoveService(this, (i) => i); +} + +abstract class CopyWith$Mutation$MoveService { + factory CopyWith$Mutation$MoveService(Mutation$MoveService instance, + TRes Function(Mutation$MoveService) then) = + _CopyWithImpl$Mutation$MoveService; + + factory CopyWith$Mutation$MoveService.stub(TRes res) = + _CopyWithStubImpl$Mutation$MoveService; + + TRes call( + {Mutation$MoveService$moveService? moveService, String? $__typename}); + CopyWith$Mutation$MoveService$moveService get moveService; +} + +class _CopyWithImpl$Mutation$MoveService + implements CopyWith$Mutation$MoveService { + _CopyWithImpl$Mutation$MoveService(this._instance, this._then); + + final Mutation$MoveService _instance; + + final TRes Function(Mutation$MoveService) _then; + + static const _undefined = {}; + + TRes call( + {Object? moveService = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MoveService( + moveService: moveService == _undefined || moveService == null + ? _instance.moveService + : (moveService as Mutation$MoveService$moveService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$MoveService$moveService get moveService { + final local$moveService = _instance.moveService; + return CopyWith$Mutation$MoveService$moveService( + local$moveService, (e) => call(moveService: e)); + } +} + +class _CopyWithStubImpl$Mutation$MoveService + implements CopyWith$Mutation$MoveService { + _CopyWithStubImpl$Mutation$MoveService(this._res); + + TRes _res; + + call({Mutation$MoveService$moveService? moveService, String? $__typename}) => + _res; + CopyWith$Mutation$MoveService$moveService get moveService => + CopyWith$Mutation$MoveService$moveService.stub(_res); } const documentNodeMutationMoveService = DocumentNode(definitions: [ @@ -2595,18 +3830,84 @@ class Mutation$MoveService$moveService extension UtilityExtension$Mutation$MoveService$moveService on Mutation$MoveService$moveService { - Mutation$MoveService$moveService copyWith( + CopyWith$Mutation$MoveService$moveService + get copyWith => CopyWith$Mutation$MoveService$moveService(this, (i) => i); +} + +abstract class CopyWith$Mutation$MoveService$moveService { + factory CopyWith$Mutation$MoveService$moveService( + Mutation$MoveService$moveService instance, + TRes Function(Mutation$MoveService$moveService) then) = + _CopyWithImpl$Mutation$MoveService$moveService; + + factory CopyWith$Mutation$MoveService$moveService.stub(TRes res) = + _CopyWithStubImpl$Mutation$MoveService$moveService; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MoveService$moveService$job? job}); + CopyWith$Mutation$MoveService$moveService$job get job; +} + +class _CopyWithImpl$Mutation$MoveService$moveService + implements CopyWith$Mutation$MoveService$moveService { + _CopyWithImpl$Mutation$MoveService$moveService(this._instance, this._then); + + final Mutation$MoveService$moveService _instance; + + final TRes Function(Mutation$MoveService$moveService) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? job = _undefined}) => + _then(Mutation$MoveService$moveService( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Mutation$MoveService$moveService$job?))); + CopyWith$Mutation$MoveService$moveService$job get job { + final local$job = _instance.job; + return local$job == null + ? CopyWith$Mutation$MoveService$moveService$job.stub(_then(_instance)) + : CopyWith$Mutation$MoveService$moveService$job( + local$job, (e) => call(job: e)); + } +} + +class _CopyWithStubImpl$Mutation$MoveService$moveService + implements CopyWith$Mutation$MoveService$moveService { + _CopyWithStubImpl$Mutation$MoveService$moveService(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - Mutation$MoveService$moveService$job? Function()? job}) => - Mutation$MoveService$moveService( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - job: job == null ? this.job : job()); + Mutation$MoveService$moveService$job? job}) => + _res; + CopyWith$Mutation$MoveService$moveService$job get job => + CopyWith$Mutation$MoveService$moveService$job.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2737,32 +4038,114 @@ class Mutation$MoveService$moveService$job { extension UtilityExtension$Mutation$MoveService$moveService$job on Mutation$MoveService$moveService$job { - Mutation$MoveService$moveService$job copyWith( + CopyWith$Mutation$MoveService$moveService$job< + Mutation$MoveService$moveService$job> + get copyWith => + CopyWith$Mutation$MoveService$moveService$job(this, (i) => i); +} + +abstract class CopyWith$Mutation$MoveService$moveService$job { + factory CopyWith$Mutation$MoveService$moveService$job( + Mutation$MoveService$moveService$job instance, + TRes Function(Mutation$MoveService$moveService$job) then) = + _CopyWithImpl$Mutation$MoveService$moveService$job; + + factory CopyWith$Mutation$MoveService$moveService$job.stub(TRes res) = + _CopyWithStubImpl$Mutation$MoveService$moveService$job; + + TRes call( + {DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}); +} + +class _CopyWithImpl$Mutation$MoveService$moveService$job + implements CopyWith$Mutation$MoveService$moveService$job { + _CopyWithImpl$Mutation$MoveService$moveService$job( + this._instance, this._then); + + final Mutation$MoveService$moveService$job _instance; + + final TRes Function(Mutation$MoveService$moveService$job) _then; + + static const _undefined = {}; + + TRes call( + {Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$MoveService$moveService$job( + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null + ? _instance.uid + : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$MoveService$moveService$job + implements CopyWith$Mutation$MoveService$moveService$job { + _CopyWithStubImpl$Mutation$MoveService$moveService$job(this._res); + + TRes _res; + + call( {DateTime? createdAt, String? description, - String? Function()? error, - DateTime? Function()? finishedAt, + String? error, + DateTime? finishedAt, String? name, - int? Function()? progress, - String? Function()? result, + int? progress, + String? result, String? status, - String? Function()? statusText, + String? statusText, String? uid, DateTime? updatedAt, String? $__typename}) => - Mutation$MoveService$moveService$job( - createdAt: createdAt == null ? this.createdAt : createdAt, - description: description == null ? this.description : description, - error: error == null ? this.error : error(), - finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), - name: name == null ? this.name : name, - progress: progress == null ? this.progress : progress(), - result: result == null ? this.result : result(), - status: status == null ? this.status : status, - statusText: statusText == null ? this.statusText : statusText(), - uid: uid == null ? this.uid : uid, - updatedAt: updatedAt == null ? this.updatedAt : updatedAt, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } DateTime? _nullable$dateTimeFromJson(dynamic data) => diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart index c88900b1..405ab468 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart @@ -89,7 +89,7 @@ Map _$Query$AllServices$services$allServicesToJson( 'isEnabled': instance.isEnabled, 'isMovable': instance.isMovable, 'isRequired': instance.isRequired, - 'status': _$Enum$ServiceStatusEnumEnumMap[instance.status], + 'status': _$Enum$ServiceStatusEnumEnumMap[instance.status]!, 'storageUsage': instance.storageUsage.toJson(), 'svgIcon': instance.svgIcon, 'url': instance.url, diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 81f3fd8c..4fa5cac1 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -61,13 +61,62 @@ class Fragment$basicMutationReturnFields { extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Fragment$basicMutationReturnFields( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Fragment$basicMutationReturnFields< + Fragment$basicMutationReturnFields> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields { + factory CopyWith$Fragment$basicMutationReturnFields( + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then) = + _CopyWithImpl$Fragment$basicMutationReturnFields; + + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + + final Fragment$basicMutationReturnFields _instance; + + final TRes Function(Fragment$basicMutationReturnFields) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Fragment$basicMutationReturnFields( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { + _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( @@ -164,8 +213,45 @@ class Variables$Mutation$CreateUser { return true; } - Variables$Mutation$CreateUser copyWith({Input$UserMutationInput? user}) => - Variables$Mutation$CreateUser(user: user == null ? this.user : user); + CopyWith$Variables$Mutation$CreateUser + get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$CreateUser { + factory CopyWith$Variables$Mutation$CreateUser( + Variables$Mutation$CreateUser instance, + TRes Function(Variables$Mutation$CreateUser) then) = + _CopyWithImpl$Variables$Mutation$CreateUser; + + factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$CreateUser; + + TRes call({Input$UserMutationInput? user}); +} + +class _CopyWithImpl$Variables$Mutation$CreateUser + implements CopyWith$Variables$Mutation$CreateUser { + _CopyWithImpl$Variables$Mutation$CreateUser(this._instance, this._then); + + final Variables$Mutation$CreateUser _instance; + + final TRes Function(Variables$Mutation$CreateUser) _then; + + static const _undefined = {}; + + TRes call({Object? user = _undefined}) => _then(Variables$Mutation$CreateUser( + user: user == _undefined || user == null + ? _instance.user + : (user as Input$UserMutationInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$CreateUser + implements CopyWith$Variables$Mutation$CreateUser { + _CopyWithStubImpl$Variables$Mutation$CreateUser(this._res); + + TRes _res; + + call({Input$UserMutationInput? user}) => _res; } @JsonSerializable(explicitToJson: true) @@ -204,11 +290,59 @@ class Mutation$CreateUser { } extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { - Mutation$CreateUser copyWith( - {Mutation$CreateUser$createUser? createUser, String? $__typename}) => - Mutation$CreateUser( - createUser: createUser == null ? this.createUser : createUser, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$CreateUser get copyWith => + CopyWith$Mutation$CreateUser(this, (i) => i); +} + +abstract class CopyWith$Mutation$CreateUser { + factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, + TRes Function(Mutation$CreateUser) then) = + _CopyWithImpl$Mutation$CreateUser; + + factory CopyWith$Mutation$CreateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$CreateUser; + + TRes call({Mutation$CreateUser$createUser? createUser, String? $__typename}); + CopyWith$Mutation$CreateUser$createUser get createUser; +} + +class _CopyWithImpl$Mutation$CreateUser + implements CopyWith$Mutation$CreateUser { + _CopyWithImpl$Mutation$CreateUser(this._instance, this._then); + + final Mutation$CreateUser _instance; + + final TRes Function(Mutation$CreateUser) _then; + + static const _undefined = {}; + + TRes call( + {Object? createUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$CreateUser( + createUser: createUser == _undefined || createUser == null + ? _instance.createUser + : (createUser as Mutation$CreateUser$createUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$CreateUser$createUser get createUser { + final local$createUser = _instance.createUser; + return CopyWith$Mutation$CreateUser$createUser( + local$createUser, (e) => call(createUser: e)); + } +} + +class _CopyWithStubImpl$Mutation$CreateUser + implements CopyWith$Mutation$CreateUser { + _CopyWithStubImpl$Mutation$CreateUser(this._res); + + TRes _res; + + call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => + _res; + CopyWith$Mutation$CreateUser$createUser get createUser => + CopyWith$Mutation$CreateUser$createUser.stub(_res); } const documentNodeMutationCreateUser = DocumentNode(definitions: [ @@ -433,18 +567,84 @@ class Mutation$CreateUser$createUser extension UtilityExtension$Mutation$CreateUser$createUser on Mutation$CreateUser$createUser { - Mutation$CreateUser$createUser copyWith( + CopyWith$Mutation$CreateUser$createUser + get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); +} + +abstract class CopyWith$Mutation$CreateUser$createUser { + factory CopyWith$Mutation$CreateUser$createUser( + Mutation$CreateUser$createUser instance, + TRes Function(Mutation$CreateUser$createUser) then) = + _CopyWithImpl$Mutation$CreateUser$createUser; + + factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$CreateUser$createUser; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$CreateUser$createUser$user? user}); + CopyWith$Mutation$CreateUser$createUser$user get user; +} + +class _CopyWithImpl$Mutation$CreateUser$createUser + implements CopyWith$Mutation$CreateUser$createUser { + _CopyWithImpl$Mutation$CreateUser$createUser(this._instance, this._then); + + final Mutation$CreateUser$createUser _instance; + + final TRes Function(Mutation$CreateUser$createUser) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined}) => + _then(Mutation$CreateUser$createUser( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Mutation$CreateUser$createUser$user?))); + CopyWith$Mutation$CreateUser$createUser$user get user { + final local$user = _instance.user; + return local$user == null + ? CopyWith$Mutation$CreateUser$createUser$user.stub(_then(_instance)) + : CopyWith$Mutation$CreateUser$createUser$user( + local$user, (e) => call(user: e)); + } +} + +class _CopyWithStubImpl$Mutation$CreateUser$createUser + implements CopyWith$Mutation$CreateUser$createUser { + _CopyWithStubImpl$Mutation$CreateUser$createUser(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - Mutation$CreateUser$createUser$user? Function()? user}) => - Mutation$CreateUser$createUser( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - user: user == null ? this.user : user()); + Mutation$CreateUser$createUser$user? user}) => + _res; + CopyWith$Mutation$CreateUser$createUser$user get user => + CopyWith$Mutation$CreateUser$createUser$user.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -514,16 +714,70 @@ class Mutation$CreateUser$createUser$user { extension UtilityExtension$Mutation$CreateUser$createUser$user on Mutation$CreateUser$createUser$user { - Mutation$CreateUser$createUser$user copyWith( + CopyWith$Mutation$CreateUser$createUser$user< + Mutation$CreateUser$createUser$user> + get copyWith => + CopyWith$Mutation$CreateUser$createUser$user(this, (i) => i); +} + +abstract class CopyWith$Mutation$CreateUser$createUser$user { + factory CopyWith$Mutation$CreateUser$createUser$user( + Mutation$CreateUser$createUser$user instance, + TRes Function(Mutation$CreateUser$createUser$user) then) = + _CopyWithImpl$Mutation$CreateUser$createUser$user; + + factory CopyWith$Mutation$CreateUser$createUser$user.stub(TRes res) = + _CopyWithStubImpl$Mutation$CreateUser$createUser$user; + + TRes call( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}); +} + +class _CopyWithImpl$Mutation$CreateUser$createUser$user + implements CopyWith$Mutation$CreateUser$createUser$user { + _CopyWithImpl$Mutation$CreateUser$createUser$user(this._instance, this._then); + + final Mutation$CreateUser$createUser$user _instance; + + final TRes Function(Mutation$CreateUser$createUser$user) _then; + + static const _undefined = {}; + + TRes call( + {Object? username = _undefined, + Object? userType = _undefined, + Object? sshKeys = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$CreateUser$createUser$user( + username: username == _undefined || username == null + ? _instance.username + : (username as String), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$CreateUser$createUser$user + implements CopyWith$Mutation$CreateUser$createUser$user { + _CopyWithStubImpl$Mutation$CreateUser$createUser$user(this._res); + + TRes _res; + + call( {String? username, Enum$UserType? userType, List? sshKeys, String? $__typename}) => - Mutation$CreateUser$createUser$user( - username: username == null ? this.username : username, - userType: userType == null ? this.userType : userType, - sshKeys: sshKeys == null ? this.sshKeys : sshKeys, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -562,10 +816,55 @@ class Query$AllUsers { } extension UtilityExtension$Query$AllUsers on Query$AllUsers { - Query$AllUsers copyWith({Query$AllUsers$users? users, String? $__typename}) => - Query$AllUsers( - users: users == null ? this.users : users, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$AllUsers get copyWith => + CopyWith$Query$AllUsers(this, (i) => i); +} + +abstract class CopyWith$Query$AllUsers { + factory CopyWith$Query$AllUsers( + Query$AllUsers instance, TRes Function(Query$AllUsers) then) = + _CopyWithImpl$Query$AllUsers; + + factory CopyWith$Query$AllUsers.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers; + + TRes call({Query$AllUsers$users? users, String? $__typename}); + CopyWith$Query$AllUsers$users get users; +} + +class _CopyWithImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { + _CopyWithImpl$Query$AllUsers(this._instance, this._then); + + final Query$AllUsers _instance; + + final TRes Function(Query$AllUsers) _then; + + static const _undefined = {}; + + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllUsers( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$AllUsers$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$AllUsers$users get users { + final local$users = _instance.users; + return CopyWith$Query$AllUsers$users(local$users, (e) => call(users: e)); + } +} + +class _CopyWithStubImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { + _CopyWithStubImpl$Query$AllUsers(this._res); + + TRes _res; + + call({Query$AllUsers$users? users, String? $__typename}) => _res; + CopyWith$Query$AllUsers$users get users => + CopyWith$Query$AllUsers$users.stub(_res); } const documentNodeQueryAllUsers = DocumentNode(definitions: [ @@ -751,12 +1050,68 @@ class Query$AllUsers$users { } extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { - Query$AllUsers$users copyWith( - {List? allUsers, - String? $__typename}) => - Query$AllUsers$users( - allUsers: allUsers == null ? this.allUsers : allUsers, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$AllUsers$users get copyWith => + CopyWith$Query$AllUsers$users(this, (i) => i); +} + +abstract class CopyWith$Query$AllUsers$users { + factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, + TRes Function(Query$AllUsers$users) then) = + _CopyWithImpl$Query$AllUsers$users; + + factory CopyWith$Query$AllUsers$users.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers$users; + + TRes call( + {List? allUsers, String? $__typename}); + TRes allUsers( + Iterable Function( + Iterable< + CopyWith$Query$AllUsers$users$allUsers< + Query$AllUsers$users$allUsers>>) + _fn); +} + +class _CopyWithImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { + _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); + + final Query$AllUsers$users _instance; + + final TRes Function(Query$AllUsers$users) _then; + + static const _undefined = {}; + + TRes call( + {Object? allUsers = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllUsers$users( + allUsers: allUsers == _undefined || allUsers == null + ? _instance.allUsers + : (allUsers as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes allUsers( + Iterable Function( + Iterable< + CopyWith$Query$AllUsers$users$allUsers< + Query$AllUsers$users$allUsers>>) + _fn) => + call( + allUsers: _fn(_instance.allUsers.map( + (e) => CopyWith$Query$AllUsers$users$allUsers(e, (i) => i))) + .toList()); +} + +class _CopyWithStubImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { + _CopyWithStubImpl$Query$AllUsers$users(this._res); + + TRes _res; + + call({List? allUsers, String? $__typename}) => + _res; + allUsers(_fn) => _res; } @JsonSerializable(explicitToJson: true) @@ -824,16 +1179,68 @@ class Query$AllUsers$users$allUsers { extension UtilityExtension$Query$AllUsers$users$allUsers on Query$AllUsers$users$allUsers { - Query$AllUsers$users$allUsers copyWith( + CopyWith$Query$AllUsers$users$allUsers + get copyWith => CopyWith$Query$AllUsers$users$allUsers(this, (i) => i); +} + +abstract class CopyWith$Query$AllUsers$users$allUsers { + factory CopyWith$Query$AllUsers$users$allUsers( + Query$AllUsers$users$allUsers instance, + TRes Function(Query$AllUsers$users$allUsers) then) = + _CopyWithImpl$Query$AllUsers$users$allUsers; + + factory CopyWith$Query$AllUsers$users$allUsers.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers$users$allUsers; + + TRes call( + {Enum$UserType? userType, + String? username, + List? sshKeys, + String? $__typename}); +} + +class _CopyWithImpl$Query$AllUsers$users$allUsers + implements CopyWith$Query$AllUsers$users$allUsers { + _CopyWithImpl$Query$AllUsers$users$allUsers(this._instance, this._then); + + final Query$AllUsers$users$allUsers _instance; + + final TRes Function(Query$AllUsers$users$allUsers) _then; + + static const _undefined = {}; + + TRes call( + {Object? userType = _undefined, + Object? username = _undefined, + Object? sshKeys = _undefined, + Object? $__typename = _undefined}) => + _then(Query$AllUsers$users$allUsers( + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + username: username == _undefined || username == null + ? _instance.username + : (username as String), + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$AllUsers$users$allUsers + implements CopyWith$Query$AllUsers$users$allUsers { + _CopyWithStubImpl$Query$AllUsers$users$allUsers(this._res); + + TRes _res; + + call( {Enum$UserType? userType, String? username, List? sshKeys, String? $__typename}) => - Query$AllUsers$users$allUsers( - userType: userType == null ? this.userType : userType, - username: username == null ? this.username : username, - sshKeys: sshKeys == null ? this.sshKeys : sshKeys, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -863,9 +1270,46 @@ class Variables$Mutation$AddSshKey { return true; } - Variables$Mutation$AddSshKey copyWith({Input$SshMutationInput? sshInput}) => - Variables$Mutation$AddSshKey( - sshInput: sshInput == null ? this.sshInput : sshInput); + CopyWith$Variables$Mutation$AddSshKey + get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$AddSshKey { + factory CopyWith$Variables$Mutation$AddSshKey( + Variables$Mutation$AddSshKey instance, + TRes Function(Variables$Mutation$AddSshKey) then) = + _CopyWithImpl$Variables$Mutation$AddSshKey; + + factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$AddSshKey; + + TRes call({Input$SshMutationInput? sshInput}); +} + +class _CopyWithImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { + _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); + + final Variables$Mutation$AddSshKey _instance; + + final TRes Function(Variables$Mutation$AddSshKey) _then; + + static const _undefined = {}; + + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$AddSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { + _CopyWithStubImpl$Variables$Mutation$AddSshKey(this._res); + + TRes _res; + + call({Input$SshMutationInput? sshInput}) => _res; } @JsonSerializable(explicitToJson: true) @@ -904,11 +1348,57 @@ class Mutation$AddSshKey { } extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { - Mutation$AddSshKey copyWith( - {Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => - Mutation$AddSshKey( - addSshKey: addSshKey == null ? this.addSshKey : addSshKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$AddSshKey get copyWith => + CopyWith$Mutation$AddSshKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$AddSshKey { + factory CopyWith$Mutation$AddSshKey( + Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = + _CopyWithImpl$Mutation$AddSshKey; + + factory CopyWith$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey; + + TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; +} + +class _CopyWithImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { + _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); + + final Mutation$AddSshKey _instance; + + final TRes Function(Mutation$AddSshKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => + _then(Mutation$AddSshKey( + addSshKey: addSshKey == _undefined || addSshKey == null + ? _instance.addSshKey + : (addSshKey as Mutation$AddSshKey$addSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { + final local$addSshKey = _instance.addSshKey; + return CopyWith$Mutation$AddSshKey$addSshKey( + local$addSshKey, (e) => call(addSshKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { + _CopyWithStubImpl$Mutation$AddSshKey(this._res); + + TRes _res; + + call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => + CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); } const documentNodeMutationAddSshKey = DocumentNode(definitions: [ @@ -1133,18 +1623,84 @@ class Mutation$AddSshKey$addSshKey extension UtilityExtension$Mutation$AddSshKey$addSshKey on Mutation$AddSshKey$addSshKey { - Mutation$AddSshKey$addSshKey copyWith( + CopyWith$Mutation$AddSshKey$addSshKey + get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$AddSshKey$addSshKey { + factory CopyWith$Mutation$AddSshKey$addSshKey( + Mutation$AddSshKey$addSshKey instance, + TRes Function(Mutation$AddSshKey$addSshKey) then) = + _CopyWithImpl$Mutation$AddSshKey$addSshKey; + + factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$AddSshKey$addSshKey$user? user}); + CopyWith$Mutation$AddSshKey$addSshKey$user get user; +} + +class _CopyWithImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { + _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); + + final Mutation$AddSshKey$addSshKey _instance; + + final TRes Function(Mutation$AddSshKey$addSshKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined}) => + _then(Mutation$AddSshKey$addSshKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Mutation$AddSshKey$addSshKey$user?))); + CopyWith$Mutation$AddSshKey$addSshKey$user get user { + final local$user = _instance.user; + return local$user == null + ? CopyWith$Mutation$AddSshKey$addSshKey$user.stub(_then(_instance)) + : CopyWith$Mutation$AddSshKey$addSshKey$user( + local$user, (e) => call(user: e)); + } +} + +class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - Mutation$AddSshKey$addSshKey$user? Function()? user}) => - Mutation$AddSshKey$addSshKey( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - user: user == null ? this.user : user()); + Mutation$AddSshKey$addSshKey$user? user}) => + _res; + CopyWith$Mutation$AddSshKey$addSshKey$user get user => + CopyWith$Mutation$AddSshKey$addSshKey$user.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1214,16 +1770,69 @@ class Mutation$AddSshKey$addSshKey$user { extension UtilityExtension$Mutation$AddSshKey$addSshKey$user on Mutation$AddSshKey$addSshKey$user { - Mutation$AddSshKey$addSshKey$user copyWith( + CopyWith$Mutation$AddSshKey$addSshKey$user + get copyWith => + CopyWith$Mutation$AddSshKey$addSshKey$user(this, (i) => i); +} + +abstract class CopyWith$Mutation$AddSshKey$addSshKey$user { + factory CopyWith$Mutation$AddSshKey$addSshKey$user( + Mutation$AddSshKey$addSshKey$user instance, + TRes Function(Mutation$AddSshKey$addSshKey$user) then) = + _CopyWithImpl$Mutation$AddSshKey$addSshKey$user; + + factory CopyWith$Mutation$AddSshKey$addSshKey$user.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey$user; + + TRes call( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}); +} + +class _CopyWithImpl$Mutation$AddSshKey$addSshKey$user + implements CopyWith$Mutation$AddSshKey$addSshKey$user { + _CopyWithImpl$Mutation$AddSshKey$addSshKey$user(this._instance, this._then); + + final Mutation$AddSshKey$addSshKey$user _instance; + + final TRes Function(Mutation$AddSshKey$addSshKey$user) _then; + + static const _undefined = {}; + + TRes call( + {Object? sshKeys = _undefined, + Object? userType = _undefined, + Object? username = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$AddSshKey$addSshKey$user( + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + username: username == _undefined || username == null + ? _instance.username + : (username as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey$user + implements CopyWith$Mutation$AddSshKey$addSshKey$user { + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey$user(this._res); + + TRes _res; + + call( {List? sshKeys, Enum$UserType? userType, String? username, String? $__typename}) => - Mutation$AddSshKey$addSshKey$user( - sshKeys: sshKeys == null ? this.sshKeys : sshKeys, - userType: userType == null ? this.userType : userType, - username: username == null ? this.username : username, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -1253,9 +1862,44 @@ class Variables$Query$GetUser { return true; } - Variables$Query$GetUser copyWith({String? username}) => - Variables$Query$GetUser( - username: username == null ? this.username : username); + CopyWith$Variables$Query$GetUser get copyWith => + CopyWith$Variables$Query$GetUser(this, (i) => i); +} + +abstract class CopyWith$Variables$Query$GetUser { + factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, + TRes Function(Variables$Query$GetUser) then) = + _CopyWithImpl$Variables$Query$GetUser; + + factory CopyWith$Variables$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Query$GetUser; + + TRes call({String? username}); +} + +class _CopyWithImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { + _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); + + final Variables$Query$GetUser _instance; + + final TRes Function(Variables$Query$GetUser) _then; + + static const _undefined = {}; + + TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( + username: username == _undefined || username == null + ? _instance.username + : (username as String))); +} + +class _CopyWithStubImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { + _CopyWithStubImpl$Variables$Query$GetUser(this._res); + + TRes _res; + + call({String? username}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1294,10 +1938,55 @@ class Query$GetUser { } extension UtilityExtension$Query$GetUser on Query$GetUser { - Query$GetUser copyWith({Query$GetUser$users? users, String? $__typename}) => - Query$GetUser( - users: users == null ? this.users : users, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetUser get copyWith => + CopyWith$Query$GetUser(this, (i) => i); +} + +abstract class CopyWith$Query$GetUser { + factory CopyWith$Query$GetUser( + Query$GetUser instance, TRes Function(Query$GetUser) then) = + _CopyWithImpl$Query$GetUser; + + factory CopyWith$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser; + + TRes call({Query$GetUser$users? users, String? $__typename}); + CopyWith$Query$GetUser$users get users; +} + +class _CopyWithImpl$Query$GetUser + implements CopyWith$Query$GetUser { + _CopyWithImpl$Query$GetUser(this._instance, this._then); + + final Query$GetUser _instance; + + final TRes Function(Query$GetUser) _then; + + static const _undefined = {}; + + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$GetUser$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetUser$users get users { + final local$users = _instance.users; + return CopyWith$Query$GetUser$users(local$users, (e) => call(users: e)); + } +} + +class _CopyWithStubImpl$Query$GetUser + implements CopyWith$Query$GetUser { + _CopyWithStubImpl$Query$GetUser(this._res); + + TRes _res; + + call({Query$GetUser$users? users, String? $__typename}) => _res; + CopyWith$Query$GetUser$users get users => + CopyWith$Query$GetUser$users.stub(_res); } const documentNodeQueryGetUser = DocumentNode(definitions: [ @@ -1500,12 +2189,58 @@ class Query$GetUser$users { } extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { - Query$GetUser$users copyWith( - {Query$GetUser$users$getUser? Function()? getUser, - String? $__typename}) => - Query$GetUser$users( - getUser: getUser == null ? this.getUser : getUser(), - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Query$GetUser$users get copyWith => + CopyWith$Query$GetUser$users(this, (i) => i); +} + +abstract class CopyWith$Query$GetUser$users { + factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, + TRes Function(Query$GetUser$users) then) = + _CopyWithImpl$Query$GetUser$users; + + factory CopyWith$Query$GetUser$users.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser$users; + + TRes call({Query$GetUser$users$getUser? getUser, String? $__typename}); + CopyWith$Query$GetUser$users$getUser get getUser; +} + +class _CopyWithImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { + _CopyWithImpl$Query$GetUser$users(this._instance, this._then); + + final Query$GetUser$users _instance; + + final TRes Function(Query$GetUser$users) _then; + + static const _undefined = {}; + + TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser$users( + getUser: getUser == _undefined + ? _instance.getUser + : (getUser as Query$GetUser$users$getUser?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetUser$users$getUser get getUser { + final local$getUser = _instance.getUser; + return local$getUser == null + ? CopyWith$Query$GetUser$users$getUser.stub(_then(_instance)) + : CopyWith$Query$GetUser$users$getUser( + local$getUser, (e) => call(getUser: e)); + } +} + +class _CopyWithStubImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { + _CopyWithStubImpl$Query$GetUser$users(this._res); + + TRes _res; + + call({Query$GetUser$users$getUser? getUser, String? $__typename}) => _res; + CopyWith$Query$GetUser$users$getUser get getUser => + CopyWith$Query$GetUser$users$getUser.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1573,16 +2308,68 @@ class Query$GetUser$users$getUser { extension UtilityExtension$Query$GetUser$users$getUser on Query$GetUser$users$getUser { - Query$GetUser$users$getUser copyWith( + CopyWith$Query$GetUser$users$getUser + get copyWith => CopyWith$Query$GetUser$users$getUser(this, (i) => i); +} + +abstract class CopyWith$Query$GetUser$users$getUser { + factory CopyWith$Query$GetUser$users$getUser( + Query$GetUser$users$getUser instance, + TRes Function(Query$GetUser$users$getUser) then) = + _CopyWithImpl$Query$GetUser$users$getUser; + + factory CopyWith$Query$GetUser$users$getUser.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser$users$getUser; + + TRes call( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}); +} + +class _CopyWithImpl$Query$GetUser$users$getUser + implements CopyWith$Query$GetUser$users$getUser { + _CopyWithImpl$Query$GetUser$users$getUser(this._instance, this._then); + + final Query$GetUser$users$getUser _instance; + + final TRes Function(Query$GetUser$users$getUser) _then; + + static const _undefined = {}; + + TRes call( + {Object? sshKeys = _undefined, + Object? userType = _undefined, + Object? username = _undefined, + Object? $__typename = _undefined}) => + _then(Query$GetUser$users$getUser( + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + username: username == _undefined || username == null + ? _instance.username + : (username as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$GetUser$users$getUser + implements CopyWith$Query$GetUser$users$getUser { + _CopyWithStubImpl$Query$GetUser$users$getUser(this._res); + + TRes _res; + + call( {List? sshKeys, Enum$UserType? userType, String? username, String? $__typename}) => - Query$GetUser$users$getUser( - sshKeys: sshKeys == null ? this.sshKeys : sshKeys, - userType: userType == null ? this.userType : userType, - username: username == null ? this.username : username, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -1613,10 +2400,46 @@ class Variables$Mutation$RemoveSshKey { return true; } - Variables$Mutation$RemoveSshKey copyWith( - {Input$SshMutationInput? sshInput}) => - Variables$Mutation$RemoveSshKey( - sshInput: sshInput == null ? this.sshInput : sshInput); + CopyWith$Variables$Mutation$RemoveSshKey + get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$RemoveSshKey { + factory CopyWith$Variables$Mutation$RemoveSshKey( + Variables$Mutation$RemoveSshKey instance, + TRes Function(Variables$Mutation$RemoveSshKey) then) = + _CopyWithImpl$Variables$Mutation$RemoveSshKey; + + factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; + + TRes call({Input$SshMutationInput? sshInput}); +} + +class _CopyWithImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { + _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); + + final Variables$Mutation$RemoveSshKey _instance; + + final TRes Function(Variables$Mutation$RemoveSshKey) _then; + + static const _undefined = {}; + + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$RemoveSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { + _CopyWithStubImpl$Variables$Mutation$RemoveSshKey(this._res); + + TRes _res; + + call({Input$SshMutationInput? sshInput}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1656,12 +2479,62 @@ class Mutation$RemoveSshKey { } extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { - Mutation$RemoveSshKey copyWith( + CopyWith$Mutation$RemoveSshKey get copyWith => + CopyWith$Mutation$RemoveSshKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$RemoveSshKey { + factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, + TRes Function(Mutation$RemoveSshKey) then) = + _CopyWithImpl$Mutation$RemoveSshKey; + + factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey; + + TRes call( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; +} + +class _CopyWithImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { + _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); + + final Mutation$RemoveSshKey _instance; + + final TRes Function(Mutation$RemoveSshKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? removeSshKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RemoveSshKey( + removeSshKey: removeSshKey == _undefined || removeSshKey == null + ? _instance.removeSshKey + : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { + final local$removeSshKey = _instance.removeSshKey; + return CopyWith$Mutation$RemoveSshKey$removeSshKey( + local$removeSshKey, (e) => call(removeSshKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { + _CopyWithStubImpl$Mutation$RemoveSshKey(this._res); + + TRes _res; + + call( {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}) => - Mutation$RemoveSshKey( - removeSshKey: removeSshKey == null ? this.removeSshKey : removeSshKey, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => + CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); } const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ @@ -1892,18 +2765,87 @@ class Mutation$RemoveSshKey$removeSshKey extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey on Mutation$RemoveSshKey$removeSshKey { - Mutation$RemoveSshKey$removeSshKey copyWith( + CopyWith$Mutation$RemoveSshKey$removeSshKey< + Mutation$RemoveSshKey$removeSshKey> + get copyWith => + CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { + factory CopyWith$Mutation$RemoveSshKey$removeSshKey( + Mutation$RemoveSshKey$removeSshKey instance, + TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; + + factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$RemoveSshKey$removeSshKey$user? user}); + CopyWith$Mutation$RemoveSshKey$removeSshKey$user get user; +} + +class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); + + final Mutation$RemoveSshKey$removeSshKey _instance; + + final TRes Function(Mutation$RemoveSshKey$removeSshKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined}) => + _then(Mutation$RemoveSshKey$removeSshKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Mutation$RemoveSshKey$removeSshKey$user?))); + CopyWith$Mutation$RemoveSshKey$removeSshKey$user get user { + final local$user = _instance.user; + return local$user == null + ? CopyWith$Mutation$RemoveSshKey$removeSshKey$user.stub( + _then(_instance)) + : CopyWith$Mutation$RemoveSshKey$removeSshKey$user( + local$user, (e) => call(user: e)); + } +} + +class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - Mutation$RemoveSshKey$removeSshKey$user? Function()? user}) => - Mutation$RemoveSshKey$removeSshKey( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - user: user == null ? this.user : user()); + Mutation$RemoveSshKey$removeSshKey$user? user}) => + _res; + CopyWith$Mutation$RemoveSshKey$removeSshKey$user get user => + CopyWith$Mutation$RemoveSshKey$removeSshKey$user.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1973,16 +2915,71 @@ class Mutation$RemoveSshKey$removeSshKey$user { extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey$user on Mutation$RemoveSshKey$removeSshKey$user { - Mutation$RemoveSshKey$removeSshKey$user copyWith( + CopyWith$Mutation$RemoveSshKey$removeSshKey$user< + Mutation$RemoveSshKey$removeSshKey$user> + get copyWith => + CopyWith$Mutation$RemoveSshKey$removeSshKey$user(this, (i) => i); +} + +abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey$user { + factory CopyWith$Mutation$RemoveSshKey$removeSshKey$user( + Mutation$RemoveSshKey$removeSshKey$user instance, + TRes Function(Mutation$RemoveSshKey$removeSshKey$user) then) = + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey$user; + + factory CopyWith$Mutation$RemoveSshKey$removeSshKey$user.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey$user; + + TRes call( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}); +} + +class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey$user + implements CopyWith$Mutation$RemoveSshKey$removeSshKey$user { + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey$user( + this._instance, this._then); + + final Mutation$RemoveSshKey$removeSshKey$user _instance; + + final TRes Function(Mutation$RemoveSshKey$removeSshKey$user) _then; + + static const _undefined = {}; + + TRes call( + {Object? sshKeys = _undefined, + Object? userType = _undefined, + Object? username = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RemoveSshKey$removeSshKey$user( + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + username: username == _undefined || username == null + ? _instance.username + : (username as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey$user + implements CopyWith$Mutation$RemoveSshKey$removeSshKey$user { + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey$user(this._res); + + TRes _res; + + call( {List? sshKeys, Enum$UserType? userType, String? username, String? $__typename}) => - Mutation$RemoveSshKey$removeSshKey$user( - sshKeys: sshKeys == null ? this.sshKeys : sshKeys, - userType: userType == null ? this.userType : userType, - username: username == null ? this.username : username, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } @JsonSerializable(explicitToJson: true) @@ -2012,9 +3009,46 @@ class Variables$Mutation$DeleteUser { return true; } - Variables$Mutation$DeleteUser copyWith({String? username}) => + CopyWith$Variables$Mutation$DeleteUser + get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$DeleteUser { + factory CopyWith$Variables$Mutation$DeleteUser( + Variables$Mutation$DeleteUser instance, + TRes Function(Variables$Mutation$DeleteUser) then) = + _CopyWithImpl$Variables$Mutation$DeleteUser; + + factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$DeleteUser; + + TRes call({String? username}); +} + +class _CopyWithImpl$Variables$Mutation$DeleteUser + implements CopyWith$Variables$Mutation$DeleteUser { + _CopyWithImpl$Variables$Mutation$DeleteUser(this._instance, this._then); + + final Variables$Mutation$DeleteUser _instance; + + final TRes Function(Variables$Mutation$DeleteUser) _then; + + static const _undefined = {}; + + TRes call({Object? username = _undefined}) => _then( Variables$Mutation$DeleteUser( - username: username == null ? this.username : username); + username: username == _undefined || username == null + ? _instance.username + : (username as String))); +} + +class _CopyWithStubImpl$Variables$Mutation$DeleteUser + implements CopyWith$Variables$Mutation$DeleteUser { + _CopyWithStubImpl$Variables$Mutation$DeleteUser(this._res); + + TRes _res; + + call({String? username}) => _res; } @JsonSerializable(explicitToJson: true) @@ -2053,11 +3087,59 @@ class Mutation$DeleteUser { } extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { - Mutation$DeleteUser copyWith( - {Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => - Mutation$DeleteUser( - deleteUser: deleteUser == null ? this.deleteUser : deleteUser, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$DeleteUser get copyWith => + CopyWith$Mutation$DeleteUser(this, (i) => i); +} + +abstract class CopyWith$Mutation$DeleteUser { + factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, + TRes Function(Mutation$DeleteUser) then) = + _CopyWithImpl$Mutation$DeleteUser; + + factory CopyWith$Mutation$DeleteUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$DeleteUser; + + TRes call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}); + CopyWith$Mutation$DeleteUser$deleteUser get deleteUser; +} + +class _CopyWithImpl$Mutation$DeleteUser + implements CopyWith$Mutation$DeleteUser { + _CopyWithImpl$Mutation$DeleteUser(this._instance, this._then); + + final Mutation$DeleteUser _instance; + + final TRes Function(Mutation$DeleteUser) _then; + + static const _undefined = {}; + + TRes call( + {Object? deleteUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DeleteUser( + deleteUser: deleteUser == _undefined || deleteUser == null + ? _instance.deleteUser + : (deleteUser as Mutation$DeleteUser$deleteUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$DeleteUser$deleteUser get deleteUser { + final local$deleteUser = _instance.deleteUser; + return CopyWith$Mutation$DeleteUser$deleteUser( + local$deleteUser, (e) => call(deleteUser: e)); + } +} + +class _CopyWithStubImpl$Mutation$DeleteUser + implements CopyWith$Mutation$DeleteUser { + _CopyWithStubImpl$Mutation$DeleteUser(this._res); + + TRes _res; + + call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => + _res; + CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => + CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); } const documentNodeMutationDeleteUser = DocumentNode(definitions: [ @@ -2243,13 +3325,60 @@ class Mutation$DeleteUser$deleteUser extension UtilityExtension$Mutation$DeleteUser$deleteUser on Mutation$DeleteUser$deleteUser { - Mutation$DeleteUser$deleteUser copyWith( - {int? code, String? message, bool? success, String? $__typename}) => - Mutation$DeleteUser$deleteUser( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$DeleteUser$deleteUser + get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); +} + +abstract class CopyWith$Mutation$DeleteUser$deleteUser { + factory CopyWith$Mutation$DeleteUser$deleteUser( + Mutation$DeleteUser$deleteUser instance, + TRes Function(Mutation$DeleteUser$deleteUser) then) = + _CopyWithImpl$Mutation$DeleteUser$deleteUser; + + factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; + + TRes call({int? code, String? message, bool? success, String? $__typename}); +} + +class _CopyWithImpl$Mutation$DeleteUser$deleteUser + implements CopyWith$Mutation$DeleteUser$deleteUser { + _CopyWithImpl$Mutation$DeleteUser$deleteUser(this._instance, this._then); + + final Mutation$DeleteUser$deleteUser _instance; + + final TRes Function(Mutation$DeleteUser$deleteUser) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DeleteUser$deleteUser( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser + implements CopyWith$Mutation$DeleteUser$deleteUser { + _CopyWithStubImpl$Mutation$DeleteUser$deleteUser(this._res); + + TRes _res; + + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -2279,8 +3408,45 @@ class Variables$Mutation$UpdateUser { return true; } - Variables$Mutation$UpdateUser copyWith({Input$UserMutationInput? user}) => - Variables$Mutation$UpdateUser(user: user == null ? this.user : user); + CopyWith$Variables$Mutation$UpdateUser + get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$UpdateUser { + factory CopyWith$Variables$Mutation$UpdateUser( + Variables$Mutation$UpdateUser instance, + TRes Function(Variables$Mutation$UpdateUser) then) = + _CopyWithImpl$Variables$Mutation$UpdateUser; + + factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$UpdateUser; + + TRes call({Input$UserMutationInput? user}); +} + +class _CopyWithImpl$Variables$Mutation$UpdateUser + implements CopyWith$Variables$Mutation$UpdateUser { + _CopyWithImpl$Variables$Mutation$UpdateUser(this._instance, this._then); + + final Variables$Mutation$UpdateUser _instance; + + final TRes Function(Variables$Mutation$UpdateUser) _then; + + static const _undefined = {}; + + TRes call({Object? user = _undefined}) => _then(Variables$Mutation$UpdateUser( + user: user == _undefined || user == null + ? _instance.user + : (user as Input$UserMutationInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$UpdateUser + implements CopyWith$Variables$Mutation$UpdateUser { + _CopyWithStubImpl$Variables$Mutation$UpdateUser(this._res); + + TRes _res; + + call({Input$UserMutationInput? user}) => _res; } @JsonSerializable(explicitToJson: true) @@ -2319,11 +3485,59 @@ class Mutation$UpdateUser { } extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { - Mutation$UpdateUser copyWith( - {Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => - Mutation$UpdateUser( - updateUser: updateUser == null ? this.updateUser : updateUser, - $__typename: $__typename == null ? this.$__typename : $__typename); + CopyWith$Mutation$UpdateUser get copyWith => + CopyWith$Mutation$UpdateUser(this, (i) => i); +} + +abstract class CopyWith$Mutation$UpdateUser { + factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, + TRes Function(Mutation$UpdateUser) then) = + _CopyWithImpl$Mutation$UpdateUser; + + factory CopyWith$Mutation$UpdateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$UpdateUser; + + TRes call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}); + CopyWith$Mutation$UpdateUser$updateUser get updateUser; +} + +class _CopyWithImpl$Mutation$UpdateUser + implements CopyWith$Mutation$UpdateUser { + _CopyWithImpl$Mutation$UpdateUser(this._instance, this._then); + + final Mutation$UpdateUser _instance; + + final TRes Function(Mutation$UpdateUser) _then; + + static const _undefined = {}; + + TRes call( + {Object? updateUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UpdateUser( + updateUser: updateUser == _undefined || updateUser == null + ? _instance.updateUser + : (updateUser as Mutation$UpdateUser$updateUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$UpdateUser$updateUser get updateUser { + final local$updateUser = _instance.updateUser; + return CopyWith$Mutation$UpdateUser$updateUser( + local$updateUser, (e) => call(updateUser: e)); + } +} + +class _CopyWithStubImpl$Mutation$UpdateUser + implements CopyWith$Mutation$UpdateUser { + _CopyWithStubImpl$Mutation$UpdateUser(this._res); + + TRes _res; + + call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => + _res; + CopyWith$Mutation$UpdateUser$updateUser get updateUser => + CopyWith$Mutation$UpdateUser$updateUser.stub(_res); } const documentNodeMutationUpdateUser = DocumentNode(definitions: [ @@ -2548,18 +3762,84 @@ class Mutation$UpdateUser$updateUser extension UtilityExtension$Mutation$UpdateUser$updateUser on Mutation$UpdateUser$updateUser { - Mutation$UpdateUser$updateUser copyWith( + CopyWith$Mutation$UpdateUser$updateUser + get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); +} + +abstract class CopyWith$Mutation$UpdateUser$updateUser { + factory CopyWith$Mutation$UpdateUser$updateUser( + Mutation$UpdateUser$updateUser instance, + TRes Function(Mutation$UpdateUser$updateUser) then) = + _CopyWithImpl$Mutation$UpdateUser$updateUser; + + factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$UpdateUser$updateUser; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$UpdateUser$updateUser$user? user}); + CopyWith$Mutation$UpdateUser$updateUser$user get user; +} + +class _CopyWithImpl$Mutation$UpdateUser$updateUser + implements CopyWith$Mutation$UpdateUser$updateUser { + _CopyWithImpl$Mutation$UpdateUser$updateUser(this._instance, this._then); + + final Mutation$UpdateUser$updateUser _instance; + + final TRes Function(Mutation$UpdateUser$updateUser) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined}) => + _then(Mutation$UpdateUser$updateUser( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Mutation$UpdateUser$updateUser$user?))); + CopyWith$Mutation$UpdateUser$updateUser$user get user { + final local$user = _instance.user; + return local$user == null + ? CopyWith$Mutation$UpdateUser$updateUser$user.stub(_then(_instance)) + : CopyWith$Mutation$UpdateUser$updateUser$user( + local$user, (e) => call(user: e)); + } +} + +class _CopyWithStubImpl$Mutation$UpdateUser$updateUser + implements CopyWith$Mutation$UpdateUser$updateUser { + _CopyWithStubImpl$Mutation$UpdateUser$updateUser(this._res); + + TRes _res; + + call( {int? code, String? message, bool? success, String? $__typename, - Mutation$UpdateUser$updateUser$user? Function()? user}) => - Mutation$UpdateUser$updateUser( - code: code == null ? this.code : code, - message: message == null ? this.message : message, - success: success == null ? this.success : success, - $__typename: $__typename == null ? this.$__typename : $__typename, - user: user == null ? this.user : user()); + Mutation$UpdateUser$updateUser$user? user}) => + _res; + CopyWith$Mutation$UpdateUser$updateUser$user get user => + CopyWith$Mutation$UpdateUser$updateUser$user.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2629,14 +3909,68 @@ class Mutation$UpdateUser$updateUser$user { extension UtilityExtension$Mutation$UpdateUser$updateUser$user on Mutation$UpdateUser$updateUser$user { - Mutation$UpdateUser$updateUser$user copyWith( + CopyWith$Mutation$UpdateUser$updateUser$user< + Mutation$UpdateUser$updateUser$user> + get copyWith => + CopyWith$Mutation$UpdateUser$updateUser$user(this, (i) => i); +} + +abstract class CopyWith$Mutation$UpdateUser$updateUser$user { + factory CopyWith$Mutation$UpdateUser$updateUser$user( + Mutation$UpdateUser$updateUser$user instance, + TRes Function(Mutation$UpdateUser$updateUser$user) then) = + _CopyWithImpl$Mutation$UpdateUser$updateUser$user; + + factory CopyWith$Mutation$UpdateUser$updateUser$user.stub(TRes res) = + _CopyWithStubImpl$Mutation$UpdateUser$updateUser$user; + + TRes call( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}); +} + +class _CopyWithImpl$Mutation$UpdateUser$updateUser$user + implements CopyWith$Mutation$UpdateUser$updateUser$user { + _CopyWithImpl$Mutation$UpdateUser$updateUser$user(this._instance, this._then); + + final Mutation$UpdateUser$updateUser$user _instance; + + final TRes Function(Mutation$UpdateUser$updateUser$user) _then; + + static const _undefined = {}; + + TRes call( + {Object? sshKeys = _undefined, + Object? userType = _undefined, + Object? username = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UpdateUser$updateUser$user( + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + username: username == _undefined || username == null + ? _instance.username + : (username as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Mutation$UpdateUser$updateUser$user + implements CopyWith$Mutation$UpdateUser$updateUser$user { + _CopyWithStubImpl$Mutation$UpdateUser$updateUser$user(this._res); + + TRes _res; + + call( {List? sshKeys, Enum$UserType? userType, String? username, String? $__typename}) => - Mutation$UpdateUser$updateUser$user( - sshKeys: sshKeys == null ? this.sshKeys : sshKeys, - userType: userType == null ? this.userType : userType, - username: username == null ? this.username : username, - $__typename: $__typename == null ? this.$__typename : $__typename); + _res; } diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart index 411cbfad..a7b81c2d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart @@ -90,7 +90,7 @@ Map _$Mutation$CreateUser$createUser$userToJson( Mutation$CreateUser$createUser$user instance) => { 'username': instance.username, - 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'sshKeys': instance.sshKeys, '__typename': instance.$__typename, }; @@ -146,7 +146,7 @@ Query$AllUsers$users$allUsers _$Query$AllUsers$users$allUsersFromJson( Map _$Query$AllUsers$users$allUsersToJson( Query$AllUsers$users$allUsers instance) => { - 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'username': instance.username, 'sshKeys': instance.sshKeys, '__typename': instance.$__typename, @@ -216,7 +216,7 @@ Map _$Mutation$AddSshKey$addSshKey$userToJson( Mutation$AddSshKey$addSshKey$user instance) => { 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'username': instance.username, '__typename': instance.$__typename, }; @@ -277,7 +277,7 @@ Map _$Query$GetUser$users$getUserToJson( Query$GetUser$users$getUser instance) => { 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'username': instance.username, '__typename': instance.$__typename, }; @@ -350,7 +350,7 @@ Map _$Mutation$RemoveSshKey$removeSshKey$userToJson( Mutation$RemoveSshKey$removeSshKey$user instance) => { 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'username': instance.username, '__typename': instance.$__typename, }; @@ -465,7 +465,7 @@ Map _$Mutation$UpdateUser$updateUser$userToJson( Mutation$UpdateUser$updateUser$user instance) => { 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'username': instance.username, '__typename': instance.$__typename, }; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 088f82d5..6cf5a971 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -498,13 +498,16 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { final Response response = await client.get('/servers'); - servers = (response.data!['servers'] as List) - .map( + servers = response.data!['servers'] + .map( (final e) => HetznerServerInfo.fromJson(e), ) .toList() - .map( - (final HetznerServerInfo server) => ServerBasicInfo( + .where( + (final server) => server.publicNet.ipv4 != null, + ) + .map( + (final server) => ServerBasicInfo( id: server.id, name: server.name, ip: server.publicNet.ipv4.ip, @@ -520,6 +523,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { close(client); } + print(servers); return servers; } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index aee5207f..4575fa4b 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -4,14 +4,12 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_repository.dart'; diff --git a/lib/logic/models/json/backup.g.dart b/lib/logic/models/json/backup.g.dart index eff513f0..dea4847d 100644 --- a/lib/logic/models/json/backup.g.dart +++ b/lib/logic/models/json/backup.g.dart @@ -24,7 +24,7 @@ BackupStatus _$BackupStatusFromJson(Map json) => BackupStatus( Map _$BackupStatusToJson(BackupStatus instance) => { - 'status': _$BackupStatusEnumEnumMap[instance.status], + 'status': _$BackupStatusEnumEnumMap[instance.status]!, 'progress': instance.progress, 'error_message': instance.errorMessage, }; diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index ccf036a1..6e28f1cf 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -39,7 +39,7 @@ class HetznerServerInfo { @JsonSerializable() class HetznerPublicNetInfo { HetznerPublicNetInfo(this.ipv4); - final HetznerIp4 ipv4; + final HetznerIp4? ipv4; static HetznerPublicNetInfo fromJson(final Map json) => _$HetznerPublicNetInfoFromJson(json); diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart index 7d6ecd29..5201a1c5 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -23,7 +23,7 @@ Map _$HetznerServerInfoToJson(HetznerServerInfo instance) => { 'id': instance.id, 'name': instance.name, - 'status': _$ServerStatusEnumMap[instance.status], + 'status': _$ServerStatusEnumMap[instance.status]!, 'created': instance.created.toIso8601String(), 'volumes': instance.volumes, 'server_type': instance.serverType, @@ -46,7 +46,9 @@ const _$ServerStatusEnumMap = { HetznerPublicNetInfo _$HetznerPublicNetInfoFromJson( Map json) => HetznerPublicNetInfo( - HetznerIp4.fromJson(json['ipv4'] as Map), + json['ipv4'] == null + ? null + : HetznerIp4.fromJson(json['ipv4'] as Map), ); Map _$HetznerPublicNetInfoToJson( diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart index 2af5358a..025e1ebc 100644 --- a/lib/logic/models/json/server_job.g.dart +++ b/lib/logic/models/json/server_job.g.dart @@ -11,13 +11,13 @@ ServerJob _$ServerJobFromJson(Map json) => ServerJob( description: json['description'] as String, status: json['status'] as String, uid: json['uid'] as String, - updatedAt: json['updated_at'] as String, - createdAt: DateTime.parse(json['created_at'] as String), + updatedAt: json['updatedAt'] as String, + createdAt: DateTime.parse(json['createdAt'] as String), error: json['error'] as String?, progress: json['progress'] as int?, result: json['result'] as String?, - statusText: json['status_text'] as String?, - finishedAt: json['finished_at'] as String?, + statusText: json['statusText'] as String?, + finishedAt: json['finishedAt'] as String?, ); Map _$ServerJobToJson(ServerJob instance) => { @@ -25,11 +25,11 @@ Map _$ServerJobToJson(ServerJob instance) => { 'description': instance.description, 'status': instance.status, 'uid': instance.uid, - 'updated_at': instance.updatedAt, - 'created_at': instance.createdAt.toIso8601String(), + 'updatedAt': instance.updatedAt, + 'createdAt': instance.createdAt.toIso8601String(), 'error': instance.error, 'progress': instance.progress, 'result': instance.result, - 'status_text': instance.statusText, - 'finished_at': instance.finishedAt, + 'statusText': instance.statusText, + 'finishedAt': instance.finishedAt, }; diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index 36c6d029..9b851ce7 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; class ProgressBar extends StatefulWidget { @@ -114,7 +113,6 @@ class _ProgressBarState extends State { final String? step, }) { final bool isActive = index == widget.activeIndex; - final bool checked = index < widget.activeIndex; style = isActive ? style!.copyWith(fontWeight: FontWeight.w700) : style; return Container( diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index b8fc158f..5085c790 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -23,25 +23,22 @@ class DataMigrationPage extends StatefulWidget { class _DataMigrationPageState extends State { @override - Widget build(final BuildContext context) { - int a = 0; - return BrandHeroScreen( - hasBackButton: true, - heroTitle: 'providers.storage.data_migration_title'.tr(), - children: [ - ...widget.diskStatus.diskVolumes - .map( - (final volume) => Column( - children: [ - ServerStorageListItem( - volume: volume, - ), - const SizedBox(height: 16), - ], - ), - ) - .toList(), - ], - ); - } + Widget build(final BuildContext context) => BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.data_migration_title'.tr(), + children: [ + ...widget.diskStatus.diskVolumes + .map( + (final volume) => Column( + children: [ + ServerStorageListItem( + volume: volume, + ), + const SizedBox(height: 16), + ], + ), + ) + .toList(), + ], + ); } diff --git a/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart b/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart index 9396c1fc..30216709 100644 --- a/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart +++ b/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart @@ -1,4 +1,3 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 19a22c2c..afdd9718 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; @@ -12,76 +11,73 @@ class ServicePage extends StatefulWidget { class _ServicePageState extends State { @override - Widget build(final BuildContext context) { - int a; - return BrandHeroScreen( - hasBackButton: true, - children: [ - const SizedBox(height: 16), - Container( - alignment: Alignment.center, - child: const Icon( - Icons.question_mark_outlined, - size: 48, + Widget build(final BuildContext context) => BrandHeroScreen( + hasBackButton: true, + children: [ + const SizedBox(height: 16), + Container( + alignment: Alignment.center, + child: const Icon( + Icons.question_mark_outlined, + size: 48, + ), ), - ), - const SizedBox(height: 16), - Text( - 'My Incredible Service', - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - const SizedBox(height: 16), - BrandCards.outlined( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 24), - child: const Icon( - Icons.check_box_outlined, - size: 24, + const SizedBox(height: 16), + Text( + 'My Incredible Service', + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, ), - ), - const SizedBox(width: 16), - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 130), - child: const Text(''), - ), - ], ), - ), - const SizedBox(height: 16), - const Divider(), - const SizedBox(height: 16), - ElevatedButton( - onPressed: null, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 24), - child: const Icon( - Icons.language_outlined, - size: 24, + const SizedBox(height: 16), + BrandCards.outlined( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 24), + child: const Icon( + Icons.check_box_outlined, + size: 24, + ), ), - ), - const SizedBox(width: 16), - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 130), - child: const Text('Your Cool Domain'), - ), - ], + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: const Text(''), + ), + ], + ), ), - ), - const SizedBox(height: 16), - ], - ); - } + const SizedBox(height: 16), + const Divider(), + const SizedBox(height: 16), + ElevatedButton( + onPressed: null, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 24), + child: const Icon( + Icons.language_outlined, + size: 24, + ), + ), + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: const Text('Your Cool Domain'), + ), + ], + ), + ), + const SizedBox(height: 16), + ], + ); } From 254604d5849b99ec19b8786cd8710bbcac823b8f Mon Sep 17 00:00:00 2001 From: inexcode Date: Mon, 29 Aug 2022 22:43:42 +0400 Subject: [PATCH 030/732] Fix money display --- lib/ui/pages/server_storage/extending_volume.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 651de4d0..72ef9607 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -59,7 +59,7 @@ class _ExtendingVolumePageState extends State { _sizeController.text = _currentSliderGbValue.truncate().toString(); _priceController.text = (_euroPerGb * double.parse(_sizeController.text)) - .toStringAsPrecision(2); + .toStringAsFixed(2); minSize = widget.diskVolumeToResize.sizeTotal; if (_currentSliderGbValue < 0) { _currentSliderGbValue = minSize.asGb(); From d247f41da4a01c87c519637dc1cced93bb708f20 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 29 Aug 2022 22:54:06 +0300 Subject: [PATCH 031/732] Fix broken installation state check --- lib/ui/pages/setup/initializing.dart | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index ab6e456e..1764b576 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -32,18 +32,21 @@ class InitializingPage extends StatelessWidget { if (cubit.state is ServerInstallationRecovery) { return const RecoveryRouting(); } else { - final actualInitializingPage = [ - () => _stepHetzner(cubit), - () => _stepCloudflare(cubit), - () => _stepBackblaze(cubit), - () => _stepDomain(cubit), - () => _stepUser(cubit), - () => _stepServer(cubit), - () => _stepCheck(cubit), - () => _stepCheck(cubit), - () => _stepCheck(cubit), - () => _stepCheck(cubit) - ][cubit.state.progress.index](); + Widget? actualInitializingPage; + if (cubit.state is! ServerInstallationFinished) { + actualInitializingPage = [ + () => _stepHetzner(cubit), + () => _stepCloudflare(cubit), + () => _stepBackblaze(cubit), + () => _stepDomain(cubit), + () => _stepUser(cubit), + () => _stepServer(cubit), + () => _stepCheck(cubit), + () => _stepCheck(cubit), + () => _stepCheck(cubit), + () => _stepCheck(cubit) + ][cubit.state.progress.index](); + } return BlocListener( listener: (final context, final state) { From d168845b98736ad4ab2714e4678066e4a0a06866 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 29 Aug 2022 23:15:48 +0300 Subject: [PATCH 032/732] Fix storage card size view --- assets/translations/en.json | 4 ++-- lib/ui/pages/server_storage/server_storage_list_item.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 840ffed0..dac1f23c 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -168,8 +168,8 @@ "card_title": "Server Storage", "status_ok": "Disk usage is OK", "status_error": "Low disk space", - "disk_usage": "{} GB used", - "disk_total": "{} GB total · {}", + "disk_usage": "{} used", + "disk_total": "{} total · {}", "gb": "{} GB", "mb": "{} MB", "kb": "{} KB", diff --git a/lib/ui/pages/server_storage/server_storage_list_item.dart b/lib/ui/pages/server_storage/server_storage_list_item.dart index b6db282d..4bb8d323 100644 --- a/lib/ui/pages/server_storage/server_storage_list_item.dart +++ b/lib/ui/pages/server_storage/server_storage_list_item.dart @@ -41,7 +41,7 @@ class ServerStorageListItem extends StatelessWidget { Text( 'providers.storage.disk_usage'.tr( args: [ - volume.sizeUsed.asGb().toStringAsPrecision(3), + volume.sizeUsed.toString(), ], ), style: titleStyle, @@ -59,7 +59,7 @@ class ServerStorageListItem extends StatelessWidget { Text( 'providers.storage.disk_total'.tr( args: [ - volume.sizeTotal.asGb().toStringAsPrecision(3), + volume.sizeTotal.toString(), volume.name, ], ), From 62929a4839d0e8099c5892b6bd985dfb4386070b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 29 Aug 2022 23:21:59 +0300 Subject: [PATCH 033/732] Fix dkim runtime exception --- lib/logic/api_maps/rest_maps/server.dart | 31 ++++++------------- .../cubit/dns_records/dns_records_cubit.dart | 17 +++++----- .../server_installation_repository.dart | 2 +- 3 files changed, 19 insertions(+), 31 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 17c1cbb2..cd8e0a84 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -625,38 +625,25 @@ class ServerApi extends ApiMap { } } - Future getDkim() async { + Future getDkim() async { Response response; - + String? dkim; final Dio client = await getClient(); try { response = await client.get('/services/mailserver/dkim'); + final Codec base64toString = utf8.fuse(base64); + dkim = base64toString + .decode(response.data) + .split('(')[1] + .split(')')[0] + .replaceAll('"', ''); } on DioError catch (e) { print(e.message); - throw Exception('No DKIM key found'); } finally { close(client); } - if (response.statusCode == null) { - throw Exception('No DKIM key found'); - } - - if (response.statusCode == HttpStatus.notFound || response.data == null) { - throw Exception('No DKIM key found'); - } - - if (response.statusCode != HttpStatus.ok) { - throw Exception('No DKIM key found'); - } - - final Codec base64toString = utf8.fuse(base64); - - return base64toString - .decode(response.data) - .split('(')[1] - .split(')')[0] - .replaceAll('"', ''); + return dkim; } Future> getRecoveryTokenStatus() async { diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index e0ab4d42..93ff3db8 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -139,7 +139,7 @@ class DnsRecordsCubit final String? ipAddress, final String? dkimPublicKey, ) { - if (domainName == null || ipAddress == null || dkimPublicKey == null) { + if (domainName == null || ipAddress == null) { return []; } return [ @@ -204,13 +204,14 @@ class DnsRecordsCubit type: 'TXT', category: DnsRecordsCategory.email, ), - DesiredDnsRecord( - name: 'selector._domainkey.$domainName', - content: dkimPublicKey, - description: 'providers.domain.record_description.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'providers.domain.record_description.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), ]; } } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index cbf9ec61..c9ca0e96 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -398,7 +398,7 @@ class ServerInstallationRepository { String dkimRecordString = ''; try { - dkimRecordString = await api.getDkim(); + dkimRecordString = (await api.getDkim())!; } catch (e) { print(e); rethrow; From 7d8f8e1d382902ea9a5053a3fa9f3eb618022a8f Mon Sep 17 00:00:00 2001 From: inexcode Date: Tue, 30 Aug 2022 00:35:06 +0400 Subject: [PATCH 034/732] Rewrite services cubit and add basic service screen. --- .../graphql_maps/server_api/server.dart | 3 +- lib/logic/api_maps/rest_maps/server.dart | 20 +- lib/logic/common_enum/common_enum.dart | 92 ++--- lib/logic/cubit/jobs/jobs_cubit.dart | 2 +- lib/logic/cubit/services/services_cubit.dart | 35 +- lib/logic/cubit/services/services_state.dart | 89 ++--- lib/logic/models/job.dart | 4 +- lib/logic/models/service.dart | 20 + .../components/brand_cards/brand_cards.dart | 7 +- lib/ui/pages/services/service_page.dart | 254 +++++++++---- lib/ui/pages/services/services.dart | 353 +++--------------- 11 files changed, 361 insertions(+), 518 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 04f1d855..13ea67a7 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -37,7 +37,8 @@ class GenericJobMutationReturn extends GenericMutationResult { final ServerJob? job; } -class ServerApi extends ApiMap with VolumeApi, JobsApi, ServerActionsApi { +class ServerApi extends ApiMap + with VolumeApi, JobsApi, ServerActionsApi, ServicesApi { ServerApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index cd8e0a84..2563fa50 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -409,11 +409,11 @@ class ServerApi extends ApiMap { } return { - ServiceTypes.passwordManager: response.data['bitwarden'] == 0, - ServiceTypes.git: response.data['gitea'] == 0, - ServiceTypes.cloud: response.data['nextcloud'] == 0, - ServiceTypes.vpn: response.data['ocserv'] == 0, - ServiceTypes.socialNetwork: response.data['pleroma'] == 0, + ServiceTypes.bitwarden: response.data['bitwarden'] == 0, + ServiceTypes.gitea: response.data['gitea'] == 0, + ServiceTypes.nextcloud: response.data['nextcloud'] == 0, + ServiceTypes.ocserv: response.data['ocserv'] == 0, + ServiceTypes.pleroma: response.data['pleroma'] == 0, }; } @@ -907,15 +907,15 @@ extension UrlServerExt on ServiceTypes { // return ''; // external service // case ServiceTypes.video: // return ''; // jitsi meet not working - case ServiceTypes.passwordManager: + case ServiceTypes.bitwarden: return 'bitwarden'; - case ServiceTypes.cloud: + case ServiceTypes.nextcloud: return 'nextcloud'; - case ServiceTypes.socialNetwork: + case ServiceTypes.pleroma: return 'pleroma'; - case ServiceTypes.git: + case ServiceTypes.gitea: return 'gitea'; - case ServiceTypes.vpn: + case ServiceTypes.ocserv: return 'ocserv'; default: throw Exception('wrong state'); diff --git a/lib/logic/common_enum/common_enum.dart b/lib/logic/common_enum/common_enum.dart index 3a1a4d80..93334069 100644 --- a/lib/logic/common_enum/common_enum.dart +++ b/lib/logic/common_enum/common_enum.dart @@ -23,94 +23,86 @@ enum InitializingSteps { enum Period { hour, day, month } enum ServiceTypes { - mail, - messenger, - passwordManager, - video, - cloud, - socialNetwork, - git, - vpn, + mailserver, + bitwarden, + jitsi, + nextcloud, + pleroma, + gitea, + ocserv, } extension ServiceTypesExt on ServiceTypes { String get title { switch (this) { - case ServiceTypes.mail: + case ServiceTypes.mailserver: return 'services.mail.title'.tr(); - case ServiceTypes.messenger: - return 'services.messenger.title'.tr(); - case ServiceTypes.passwordManager: + case ServiceTypes.bitwarden: return 'services.password_manager.title'.tr(); - case ServiceTypes.video: + case ServiceTypes.jitsi: return 'services.video.title'.tr(); - case ServiceTypes.cloud: + case ServiceTypes.nextcloud: return 'services.cloud.title'.tr(); - case ServiceTypes.socialNetwork: + case ServiceTypes.pleroma: return 'services.social_network.title'.tr(); - case ServiceTypes.git: + case ServiceTypes.gitea: return 'services.git.title'.tr(); - case ServiceTypes.vpn: + case ServiceTypes.ocserv: return 'services.vpn.title'.tr(); } } String get subtitle { switch (this) { - case ServiceTypes.mail: + case ServiceTypes.mailserver: return 'services.mail.subtitle'.tr(); - case ServiceTypes.messenger: - return 'services.messenger.subtitle'.tr(); - case ServiceTypes.passwordManager: + case ServiceTypes.bitwarden: return 'services.password_manager.subtitle'.tr(); - case ServiceTypes.video: + case ServiceTypes.jitsi: return 'services.video.subtitle'.tr(); - case ServiceTypes.cloud: + case ServiceTypes.nextcloud: return 'services.cloud.subtitle'.tr(); - case ServiceTypes.socialNetwork: + case ServiceTypes.pleroma: return 'services.social_network.subtitle'.tr(); - case ServiceTypes.git: + case ServiceTypes.gitea: return 'services.git.subtitle'.tr(); - case ServiceTypes.vpn: + case ServiceTypes.ocserv: return 'services.vpn.subtitle'.tr(); } } String get loginInfo { switch (this) { - case ServiceTypes.mail: + case ServiceTypes.mailserver: return 'services.mail.login_info'.tr(); - case ServiceTypes.messenger: - return 'services.messenger.login_info'.tr(); - case ServiceTypes.passwordManager: + case ServiceTypes.bitwarden: return 'services.password_manager.login_info'.tr(); - case ServiceTypes.video: + case ServiceTypes.jitsi: return 'services.video.login_info'.tr(); - case ServiceTypes.cloud: + case ServiceTypes.nextcloud: return 'services.cloud.login_info'.tr(); - case ServiceTypes.socialNetwork: + case ServiceTypes.pleroma: return 'services.social_network.login_info'.tr(); - case ServiceTypes.git: + case ServiceTypes.gitea: return 'services.git.login_info'.tr(); - case ServiceTypes.vpn: + case ServiceTypes.ocserv: return ''; } } String get subdomain { switch (this) { - case ServiceTypes.passwordManager: + case ServiceTypes.bitwarden: return 'password'; - case ServiceTypes.video: + case ServiceTypes.jitsi: return 'meet'; - case ServiceTypes.cloud: + case ServiceTypes.nextcloud: return 'cloud'; - case ServiceTypes.socialNetwork: + case ServiceTypes.pleroma: return 'social'; - case ServiceTypes.git: + case ServiceTypes.gitea: return 'git'; - case ServiceTypes.vpn: - case ServiceTypes.messenger: + case ServiceTypes.ocserv: default: return ''; } @@ -118,21 +110,19 @@ extension ServiceTypesExt on ServiceTypes { IconData get icon { switch (this) { - case ServiceTypes.mail: + case ServiceTypes.mailserver: return BrandIcons.envelope; - case ServiceTypes.messenger: - return BrandIcons.messanger; - case ServiceTypes.passwordManager: + case ServiceTypes.bitwarden: return BrandIcons.key; - case ServiceTypes.video: + case ServiceTypes.jitsi: return BrandIcons.webcam; - case ServiceTypes.cloud: + case ServiceTypes.nextcloud: return BrandIcons.upload; - case ServiceTypes.socialNetwork: + case ServiceTypes.pleroma: return BrandIcons.social; - case ServiceTypes.git: + case ServiceTypes.gitea: return BrandIcons.git; - case ServiceTypes.vpn: + case ServiceTypes.ocserv: return Icons.vpn_lock_outlined; } } diff --git a/lib/logic/cubit/jobs/jobs_cubit.dart b/lib/logic/cubit/jobs/jobs_cubit.dart index baac08dd..4457fba5 100644 --- a/lib/logic/cubit/jobs/jobs_cubit.dart +++ b/lib/logic/cubit/jobs/jobs_cubit.dart @@ -114,7 +114,7 @@ class JobsCubit extends Cubit { } if (job is ServiceToggleJob) { hasServiceJobs = true; - await api.switchService(job.type, job.needToTurnOn); + await api.switchService(job.type.name, job.needToTurnOn); } if (job is CreateSSHKeyJob) { await usersCubit.addSshKey(job.user, job.publicKey); diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart index 19160af1..089d9638 100644 --- a/lib/logic/cubit/services/services_cubit.dart +++ b/lib/logic/cubit/services/services_cubit.dart @@ -1,31 +1,48 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'dart:async'; + +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/models/service.dart'; part 'services_state.dart'; class ServicesCubit extends ServerInstallationDependendCubit { ServicesCubit(final ServerInstallationCubit serverInstallationCubit) - : super(serverInstallationCubit, ServicesState.allOff()); + : super(serverInstallationCubit, const ServicesState.empty()); final ServerApi api = ServerApi(); + Timer? timer; @override Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { - final Map statuses = await api.servicesPowerCheck(); + final List services = await api.getAllServices(); emit( ServicesState( - isPasswordManagerEnable: statuses[ServiceTypes.passwordManager]!, - isCloudEnable: statuses[ServiceTypes.cloud]!, - isGitEnable: statuses[ServiceTypes.git]!, - isSocialNetworkEnable: statuses[ServiceTypes.socialNetwork]!, - isVpnEnable: statuses[ServiceTypes.vpn]!, + services: services, ), ); + timer = Timer(const Duration(seconds: 10), () => reload(useTimer: true)); + } + } + + Future reload({final bool useTimer = false}) async { + final List services = await api.getAllServices(); + emit( + ServicesState( + services: services, + ), + ); + if (useTimer) { + timer = Timer(const Duration(seconds: 60), () => reload(useTimer: true)); } } @override void clear() async { - emit(ServicesState.allOff()); + emit(const ServicesState.empty()); + if (timer != null && timer!.isActive) { + timer!.cancel(); + timer = null; + } } } diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index ffe90aee..353786c2 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -1,90 +1,43 @@ part of 'services_cubit.dart'; class ServicesState extends ServerInstallationDependendState { - factory ServicesState.allOn() => const ServicesState( - isPasswordManagerEnable: true, - isCloudEnable: true, - isGitEnable: true, - isSocialNetworkEnable: true, - isVpnEnable: true, - ); - - factory ServicesState.allOff() => const ServicesState( - isPasswordManagerEnable: false, - isCloudEnable: false, - isGitEnable: false, - isSocialNetworkEnable: false, - isVpnEnable: false, - ); const ServicesState({ - required this.isPasswordManagerEnable, - required this.isCloudEnable, - required this.isGitEnable, - required this.isSocialNetworkEnable, - required this.isVpnEnable, + required this.services, }); - final bool isPasswordManagerEnable; - final bool isCloudEnable; - final bool isGitEnable; - final bool isSocialNetworkEnable; - final bool isVpnEnable; + const ServicesState.empty() : this(services: const []); - ServicesState enableList( - final List list, - ) => - ServicesState( - isPasswordManagerEnable: list.contains(ServiceTypes.passwordManager) - ? true - : isPasswordManagerEnable, - isCloudEnable: list.contains(ServiceTypes.cloud) ? true : isCloudEnable, - isGitEnable: - list.contains(ServiceTypes.git) ? true : isPasswordManagerEnable, - isSocialNetworkEnable: list.contains(ServiceTypes.socialNetwork) - ? true - : isPasswordManagerEnable, - isVpnEnable: - list.contains(ServiceTypes.vpn) ? true : isPasswordManagerEnable, - ); + final List services; + bool get isPasswordManagerEnable => services.firstWhere((final service) => service.id == 'bitwarden', orElse: () => Service.empty).isEnabled; + bool get isCloudEnable => services.firstWhere((final service) => service.id == 'nextcloud', orElse: () => Service.empty).isEnabled; + bool get isGitEnable => services.firstWhere((final service) => service.id == 'gitea', orElse: () => Service.empty).isEnabled; + bool get isSocialNetworkEnable => services.firstWhere((final service) => service.id == 'pleroma', orElse: () => Service.empty).isEnabled; + bool get isVpnEnable => services.firstWhere((final service) => service.id == 'ocserv', orElse: () => Service.empty).isEnabled; - ServicesState disableList( - final List list, - ) => - ServicesState( - isPasswordManagerEnable: list.contains(ServiceTypes.passwordManager) - ? false - : isPasswordManagerEnable, - isCloudEnable: - list.contains(ServiceTypes.cloud) ? false : isCloudEnable, - isGitEnable: - list.contains(ServiceTypes.git) ? false : isPasswordManagerEnable, - isSocialNetworkEnable: list.contains(ServiceTypes.socialNetwork) - ? false - : isPasswordManagerEnable, - isVpnEnable: - list.contains(ServiceTypes.vpn) ? false : isPasswordManagerEnable, - ); + Service? getServiceById(final String id) { + final service = services.firstWhere((final service) => service.id == id, orElse: () => Service.empty); + if (service.id == 'empty') { + return null; + } + return service; + } @override List get props => [ - isPasswordManagerEnable, - isCloudEnable, - isGitEnable, - isSocialNetworkEnable, - isVpnEnable + services, ]; bool isEnableByType(final ServiceTypes type) { switch (type) { - case ServiceTypes.passwordManager: + case ServiceTypes.bitwarden: return isPasswordManagerEnable; - case ServiceTypes.cloud: + case ServiceTypes.nextcloud: return isCloudEnable; - case ServiceTypes.socialNetwork: + case ServiceTypes.pleroma: return isSocialNetworkEnable; - case ServiceTypes.git: + case ServiceTypes.gitea: return isGitEnable; - case ServiceTypes.vpn: + case ServiceTypes.ocserv: return isVpnEnable; default: throw Exception('wrong state'); diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index 9e694597..6ea31588 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -48,7 +48,7 @@ class ToggleJob extends ClientJob { required final super.title, }); - final dynamic type; + final ServiceTypes type; @override List get props => [...super.props, type]; @@ -56,7 +56,7 @@ class ToggleJob extends ClientJob { class ServiceToggleJob extends ToggleJob { ServiceToggleJob({ - required final ServiceTypes super.type, + required final super.type, required this.needToTurnOn, }) : super( title: diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index c0f54224..1085622a 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -12,6 +12,7 @@ class Service { required this.description, required this.isEnabled, required this.isRequired, + required this.isMovable, required this.status, required this.storageUsage, required this.svgIcon, @@ -26,6 +27,7 @@ class Service { description: service.description, isEnabled: service.isEnabled, isRequired: service.isRequired, + isMovable: service.isMovable, status: ServiceStatus.fromGraphQL(service.status), storageUsage: ServiceStorageUsage( used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), @@ -40,11 +42,29 @@ class Service { url: service.url, ); + static Service empty = Service( + id: 'empty', + displayName: '', + description: '', + isEnabled: false, + isRequired: false, + isMovable: false, + status: ServiceStatus.off, + storageUsage: ServiceStorageUsage( + used: DiskSize(byte: 0), + volume: '', + ), + svgIcon: '', + dnsRecords: [], + url: '', + ); + final String id; final String displayName; final String description; final bool isEnabled; final bool isRequired; + final bool isMovable; final ServiceStatus status; final ServiceStorageUsage storageUsage; final String svgIcon; diff --git a/lib/ui/components/brand_cards/brand_cards.dart b/lib/ui/components/brand_cards/brand_cards.dart index d8f48088..f3273e7a 100644 --- a/lib/ui/components/brand_cards/brand_cards.dart +++ b/lib/ui/components/brand_cards/brand_cards.dart @@ -25,9 +25,11 @@ class BrandCards { static Widget filled({ required final Widget child, final bool tertiary = false, + final bool error = false, }) => _FilledCard( tertiary: tertiary, + error: error, child: child, ); } @@ -81,10 +83,12 @@ class _FilledCard extends StatelessWidget { const _FilledCard({ required this.child, required this.tertiary, + required this.error, }); final Widget child; final bool tertiary; + final bool error; @override Widget build(final BuildContext context) => Card( elevation: 0.0, @@ -92,7 +96,8 @@ class _FilledCard extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(12)), ), clipBehavior: Clip.antiAlias, - color: tertiary + color: error ? Theme.of(context).colorScheme.errorContainer + : tertiary ? Theme.of(context).colorScheme.tertiaryContainer : Theme.of(context).colorScheme.surfaceVariant, child: child, diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index afdd9718..75e7c7cf 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -1,9 +1,16 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; +import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:url_launcher/url_launcher.dart'; class ServicePage extends StatefulWidget { - const ServicePage({final super.key}); + const ServicePage({required this.serviceId, final super.key}); + + final String serviceId; @override State createState() => _ServicePageState(); @@ -11,73 +18,190 @@ class ServicePage extends StatefulWidget { class _ServicePageState extends State { @override - Widget build(final BuildContext context) => BrandHeroScreen( + Widget build(final BuildContext context) { + final Service? service = + context.watch().state.getServiceById(widget.serviceId); + + if (service == null) { + return const BrandHeroScreen( hasBackButton: true, children: [ - const SizedBox(height: 16), - Container( - alignment: Alignment.center, - child: const Icon( - Icons.question_mark_outlined, - size: 48, - ), + Center( + child: CircularProgressIndicator(), ), - const SizedBox(height: 16), - Text( - 'My Incredible Service', - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - const SizedBox(height: 16), - BrandCards.outlined( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 24), - child: const Icon( - Icons.check_box_outlined, - size: 24, - ), - ), - const SizedBox(width: 16), - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 130), - child: const Text(''), - ), - ], - ), - ), - const SizedBox(height: 16), - const Divider(), - const SizedBox(height: 16), - ElevatedButton( - onPressed: null, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 24), - child: const Icon( - Icons.language_outlined, - size: 24, - ), - ), - const SizedBox(width: 16), - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 130), - child: const Text('Your Cool Domain'), - ), - ], - ), - ), - const SizedBox(height: 16), ], ); + } + return BrandHeroScreen( + hasBackButton: true, + children: [ + Container( + alignment: Alignment.center, + child: SvgPicture.string( + service.svgIcon, + width: 48.0, + height: 48.0, + ), + ), + const SizedBox(height: 16), + Text( + service.displayName, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + const SizedBox(height: 16), + ServiceStatusCard(status: service.status), + const SizedBox(height: 16), + if (service.url != null) + ListTile( + iconColor: Theme.of(context).colorScheme.onBackground, + onTap: () => _launchURL(service.url), + leading: const Icon(Icons.open_in_browser), + title: Text( + 'Open in browser', + style: Theme.of(context).textTheme.titleMedium, + ), + subtitle: Text( + service.url!.replaceAll('https://', ''), + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + const SizedBox(height: 8), + const Divider(), + const SizedBox(height: 8), + ListTile( + iconColor: Theme.of(context).colorScheme.onBackground, + onTap: () => {}, + leading: const Icon(Icons.restart_alt_outlined), + title: Text( + 'Restart service', + style: Theme.of(context).textTheme.titleMedium, + ), + ), + ListTile( + iconColor: Theme.of(context).colorScheme.onBackground, + onTap: () => {}, + leading: const Icon(Icons.power_settings_new), + title: Text( + 'Disable service', + style: Theme.of(context).textTheme.titleMedium, + ), + ), + if (service.isMovable) + ListTile( + iconColor: Theme.of(context).colorScheme.onBackground, + onTap: () => {}, + leading: const Icon(Icons.drive_file_move_outlined), + title: Text( + 'Move to another volume', + style: Theme.of(context).textTheme.titleMedium, + ), + ), + ], + ); + } +} + +class ServiceStatusCard extends StatelessWidget { + const ServiceStatusCard({ + required this.status, + final super.key, + }); + final ServiceStatus status; + + @override + Widget build(final BuildContext context) { + switch (status) { + case ServiceStatus.active: + return BrandCards.filled( + child: const ListTile( + leading: Icon( + Icons.check_circle_outline, + size: 24, + ), + title: Text('Up and running'), + ), + ); + case ServiceStatus.inactive: + return BrandCards.filled( + child: const ListTile( + leading: Icon( + Icons.stop_circle_outlined, + size: 24, + ), + title: Text('Stopped'), + ), + tertiary: true, + ); + case ServiceStatus.failed: + return BrandCards.filled( + child: const ListTile( + leading: Icon( + Icons.error_outline, + size: 24, + ), + title: Text('Failed to start'), + ), + error: true, + ); + case ServiceStatus.off: + return BrandCards.filled( + child: const ListTile( + leading: Icon( + Icons.power_settings_new, + size: 24, + ), + title: Text('Disabled'), + ), + tertiary: true, + ); + case ServiceStatus.activating: + return BrandCards.filled( + child: const ListTile( + leading: Icon( + Icons.restart_alt_outlined, + size: 24, + ), + title: Text('Activating'), + ), + tertiary: true, + ); + case ServiceStatus.deactivating: + return BrandCards.filled( + child: const ListTile( + leading: Icon( + Icons.restart_alt_outlined, + size: 24, + ), + title: Text('Deactivating'), + ), + tertiary: true, + ); + case ServiceStatus.reloading: + return BrandCards.filled( + child: const ListTile( + leading: Icon( + Icons.restart_alt_outlined, + size: 24, + ), + title: Text('Restarting'), + ), + tertiary: true, + ); + } + } +} + +void _launchURL(final url) async { + try { + final Uri uri = Uri.parse(url); + await launchUrl( + uri, + mode: LaunchMode.externalApplication, + ); + } catch (e) { + print(e); + } } diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 0a2b7db4..ba8465d2 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -1,16 +1,13 @@ import 'dart:ui'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_switch/brand_switch.dart'; @@ -18,17 +15,17 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:selfprivacy/ui/pages/services/service_page.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:url_launcher/url_launcher.dart'; const switchableServices = [ - ServiceTypes.passwordManager, - ServiceTypes.cloud, - ServiceTypes.socialNetwork, - ServiceTypes.git, - ServiceTypes.vpn, + ServiceTypes.bitwarden, + ServiceTypes.nextcloud, + ServiceTypes.pleroma, + ServiceTypes.gitea, + ServiceTypes.ocserv, ]; class ServicesPage extends StatefulWidget { @@ -39,18 +36,14 @@ class ServicesPage extends StatefulWidget { } void _launchURL(final url) async { - final canLaunch = await canLaunchUrlString(url); - - if (canLaunch) { - try { - await launchUrlString( - url, - ); - } catch (e) { - print(e); - } - } else { - throw 'Could not launch $url'; + try { + final Uri uri = Uri.parse(url); + await launchUrl( + uri, + mode: LaunchMode.externalApplication, + ); + } catch (e) { + print(e); } } @@ -67,23 +60,28 @@ class _ServicesPageState extends State { title: 'basis.services'.tr(), ), ), - body: ListView( - padding: paddingH15V0, - children: [ - BrandText.body1('services.title'.tr()), - const SizedBox(height: 24), - if (!isReady) ...[const NotReadyCard(), const SizedBox(height: 24)], - ...ServiceTypes.values - .map( - (final t) => Padding( - padding: const EdgeInsets.only( - bottom: 30, + body: RefreshIndicator( + onRefresh: () async { + context.read().reload(); + }, + child: ListView( + padding: paddingH15V0, + children: [ + BrandText.body1('services.title'.tr()), + const SizedBox(height: 24), + if (!isReady) ...[const NotReadyCard(), const SizedBox(height: 24)], + ...ServiceTypes.values + .map( + (final t) => Padding( + padding: const EdgeInsets.only( + bottom: 30, + ), + child: _Card(serviceType: t), ), - child: _Card(serviceType: t), - ), - ) - .toList() - ], + ) + .toList() + ], + ), ), ); } @@ -97,7 +95,6 @@ class _Card extends StatelessWidget { Widget build(final BuildContext context) { final isReady = context.watch().state is ServerInstallationFinished; - final changeTab = context.read().onPress; final serviceState = context.watch().state; final jobsCubit = context.watch(); @@ -118,21 +115,11 @@ class _Card extends StatelessWidget { final domainName = UiHelpers.getDomainName(config); return GestureDetector( - onTap: isSwitchOn - ? () => showDialog( - context: context, - // isScrollControlled: true, - // backgroundColor: Colors.transparent, - builder: (final BuildContext context) => _ServiceDetails( - serviceType: serviceType, - status: - isSwitchOn ? StateType.stable : StateType.uninitialized, - title: serviceType.title, - icon: serviceType.icon, - changeTab: changeTab, - ), - ) - : null, + onTap: () => Navigator.of(context).push( + materialRoute( + ServicePage(serviceId: serviceType.name) + ) + ), child: BrandCards.big( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -202,7 +189,7 @@ class _Card extends StatelessWidget { const SizedBox(height: 10), ], ), - if (serviceType == ServiceTypes.mail) + if (serviceType == ServiceTypes.mailserver) Column( children: [ Text( @@ -246,257 +233,3 @@ class _Card extends StatelessWidget { ); } } - -class _ServiceDetails extends StatelessWidget { - const _ServiceDetails({ - required this.serviceType, - required this.icon, - required this.status, - required this.title, - required this.changeTab, - }); - - final ServiceTypes serviceType; - final IconData icon; - final StateType status; - final String title; - final ValueChanged changeTab; - - @override - Widget build(final BuildContext context) { - late Widget child; - - final config = context.watch().state; - final domainName = UiHelpers.getDomainName(config); - - final linksStyle = body1Style.copyWith( - fontSize: 15, - color: Theme.of(context).brightness == Brightness.dark - ? Colors.white - : BrandColors.black, - fontWeight: FontWeight.bold, - decoration: TextDecoration.underline, - ); - - final textStyle = body1Style.copyWith( - color: Theme.of(context).brightness == Brightness.dark - ? Colors.white - : BrandColors.black, - ); - switch (serviceType) { - case ServiceTypes.mail: - child = RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'services.mail.bottom_sheet.1'.tr(args: [domainName]), - style: textStyle, - ), - const WidgetSpan(child: SizedBox(width: 5)), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.8), - child: GestureDetector( - child: Text( - 'services.mail.bottom_sheet.2'.tr(), - style: linksStyle, - ), - onTap: () { - Navigator.of(context).pop(); - changeTab(2); - }, - ), - ), - ), - ], - ), - ); - break; - case ServiceTypes.messenger: - child = RichText( - text: TextSpan( - children: [ - TextSpan( - text: - 'services.messenger.bottom_sheet.1'.tr(args: [domainName]), - style: textStyle, - ) - ], - ), - ); - break; - case ServiceTypes.passwordManager: - child = RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'services.password_manager.bottom_sheet.1' - .tr(args: [domainName]), - style: textStyle, - ), - const WidgetSpan(child: SizedBox(width: 5)), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.8), - child: GestureDetector( - onTap: () => _launchURL('https://password.$domainName'), - child: Text( - 'password.$domainName', - style: linksStyle, - ), - ), - ), - ), - ], - ), - ); - break; - case ServiceTypes.video: - child = RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'services.video.bottom_sheet.1'.tr(args: [domainName]), - style: textStyle, - ), - const WidgetSpan(child: SizedBox(width: 5)), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.8), - child: GestureDetector( - onTap: () => _launchURL('https://meet.$domainName'), - child: Text( - 'meet.$domainName', - style: linksStyle, - ), - ), - ), - ), - ], - ), - ); - break; - case ServiceTypes.cloud: - child = RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'services.cloud.bottom_sheet.1'.tr(args: [domainName]), - style: textStyle, - ), - const WidgetSpan(child: SizedBox(width: 5)), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.8), - child: GestureDetector( - onTap: () => _launchURL('https://cloud.$domainName'), - child: Text( - 'cloud.$domainName', - style: linksStyle, - ), - ), - ), - ), - ], - ), - ); - break; - case ServiceTypes.socialNetwork: - child = RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'services.social_network.bottom_sheet.1' - .tr(args: [domainName]), - style: textStyle, - ), - const WidgetSpan(child: SizedBox(width: 5)), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.8), - child: GestureDetector( - onTap: () => _launchURL('https://social.$domainName'), - child: Text( - 'social.$domainName', - style: linksStyle, - ), - ), - ), - ), - ], - ), - ); - break; - case ServiceTypes.git: - child = RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'services.git.bottom_sheet.1'.tr(args: [domainName]), - style: textStyle, - ), - const WidgetSpan(child: SizedBox(width: 5)), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.8), - child: GestureDetector( - onTap: () => _launchURL('https://git.$domainName'), - child: Text( - 'git.$domainName', - style: linksStyle, - ), - ), - ), - ), - ], - ), - ); - break; - case ServiceTypes.vpn: - child = Text( - 'services.vpn.bottom_sheet.1'.tr(), - ); - } - - return Dialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20), - ), - child: SingleChildScrollView( - child: SizedBox( - width: 350, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: paddingH15V30, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - IconStatusMask( - status: status, - child: Icon(icon, size: 40, color: Colors.white), - ), - const SizedBox(height: 10), - BrandText.h2(title), - const SizedBox(height: 10), - child, - const SizedBox(height: 40), - Center( - child: Container( - child: BrandButton.rised( - onPressed: () => Navigator.of(context).pop(), - text: 'basis.close'.tr(), - ), - ), - ), - ], - ), - ) - ], - ), - ), - ), - ); - } -} From 503c8d37eafaef74b53a52f1f291124921a7212e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 30 Aug 2022 06:09:09 +0300 Subject: [PATCH 035/732] Implement server jobs cubit --- lib/config/bloc_config.dart | 7 ++- .../client_jobs_cubit.dart} | 56 ++++------------- .../cubit/client_jobs/client_jobs_state.dart | 26 ++++++++ .../cubit/forms/user/ssh_form_cubit.dart | 2 +- .../cubit/forms/user/user_form_cubit.dart | 2 +- lib/logic/cubit/jobs/jobs_state.dart | 34 ----------- .../cubit/server_jobs/server_jobs_cubit.dart | 61 +++++++++++++++++++ .../cubit/server_jobs/server_jobs_state.dart | 16 +++++ .../components/jobs_content/jobs_content.dart | 13 ++-- .../pre_styled_buttons/flash_fab.dart | 2 +- .../pre_styled_buttons.dart | 2 +- lib/ui/pages/services/services.dart | 9 +-- lib/ui/pages/ssh_keys/ssh_keys.dart | 2 +- lib/ui/pages/users/users.dart | 2 +- 14 files changed, 136 insertions(+), 98 deletions(-) rename lib/logic/cubit/{jobs/jobs_cubit.dart => client_jobs/client_jobs_cubit.dart} (73%) create mode 100644 lib/logic/cubit/client_jobs/client_jobs_state.dart delete mode 100644 lib/logic/cubit/jobs/jobs_state.dart create mode 100644 lib/logic/cubit/server_jobs/server_jobs_cubit.dart create mode 100644 lib/logic/cubit/server_jobs/server_jobs_state.dart diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index 0b4fe048..fd00db2b 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -6,8 +6,9 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; @@ -30,6 +31,7 @@ class BlocAndProviderConfig extends StatelessWidget { final apiDevicesCubit = ApiDevicesCubit(serverInstallationCubit); final apiVolumesCubit = ApiProviderVolumeCubit(serverInstallationCubit); final apiServerVolumesCubit = ApiServerVolumeCubit(serverInstallationCubit); + final serverJobsCubit = ServerJobsCubit(serverInstallationCubit); return MultiProvider( providers: [ @@ -73,6 +75,9 @@ class BlocAndProviderConfig extends StatelessWidget { BlocProvider( create: (final _) => apiServerVolumesCubit..load(), ), + BlocProvider( + create: (final _) => serverJobsCubit..load(), + ), BlocProvider( create: (final _) => JobsCubit( usersCubit: usersCubit, diff --git a/lib/logic/cubit/jobs/jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart similarity index 73% rename from lib/logic/cubit/jobs/jobs_cubit.dart rename to lib/logic/cubit/client_jobs/client_jobs_cubit.dart index 4457fba5..7461a6df 100644 --- a/lib/logic/cubit/jobs/jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -8,17 +8,16 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; -import 'package:selfprivacy/logic/models/json/server_job.dart'; export 'package:provider/provider.dart'; -part 'jobs_state.dart'; +part 'client_jobs_state.dart'; class JobsCubit extends Cubit { JobsCubit({ required this.usersCubit, required this.servicesCubit, - }) : super(const JobsStateEmpty([])); + }) : super(JobsStateEmpty()); final ServerApi api = ServerApi(); final UsersCubit usersCubit; @@ -32,7 +31,7 @@ class JobsCubit extends Cubit { } newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList, state.serverJobList)); + emit(JobsStateWithJobs(newJobsList)); } void removeJob(final String id) { @@ -55,7 +54,7 @@ class JobsCubit extends Cubit { } else { newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList, state.serverJobList)); + emit(JobsStateWithJobs(newJobsList)); } } @@ -69,23 +68,23 @@ class JobsCubit extends Cubit { if (!isExistInJobList) { newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList, state.serverJobList)); + emit(JobsStateWithJobs(newJobsList)); } } Future rebootServer() async { - emit(JobsStateLoading(state.serverJobList)); + emit(JobsStateLoading()); final bool isSuccessful = await api.reboot(); if (isSuccessful) { getIt().showSnackBar('jobs.rebootSuccess'.tr()); } else { getIt().showSnackBar('jobs.rebootFailed'.tr()); } - emit(JobsStateEmpty(state.serverJobList)); + emit(JobsStateEmpty()); } Future upgradeServer() async { - emit(JobsStateLoading(state.serverJobList)); + emit(JobsStateLoading()); final bool isPullSuccessful = await api.pullConfigurationUpdate(); final bool isSuccessful = await api.upgrade(); if (isSuccessful) { @@ -97,13 +96,13 @@ class JobsCubit extends Cubit { } else { getIt().showSnackBar('jobs.upgradeFailed'.tr()); } - emit(JobsStateEmpty(state.serverJobList)); + emit(JobsStateEmpty()); } Future applyAll() async { if (state is JobsStateWithJobs) { final List jobs = (state as JobsStateWithJobs).clientJobList; - emit(JobsStateLoading(state.serverJobList)); + emit(JobsStateLoading()); bool hasServiceJobs = false; for (final ClientJob job in jobs) { if (job is CreateUserJob) { @@ -131,40 +130,7 @@ class JobsCubit extends Cubit { await servicesCubit.load(); } - emit(JobsStateEmpty(state.serverJobList)); + emit(JobsStateEmpty()); } } - - Future resetRequestsTimer() async { - const duration = Duration(seconds: 1); - Timer.periodic( - duration, - (final timer) async { - if (timer.tick >= 10) { - final List serverJobs = await api.getServerJobs(); - final List newServerJobs = []; - for (final ServerJob job in serverJobs) { - if (job.status == 'FINISHED') { - await api.removeApiJob(job.uid); - } else { - newServerJobs.add(job); - } - } - - if (state is JobsStateWithJobs) { - emit( - JobsStateWithJobs( - (state as JobsStateWithJobs).clientJobList, - newServerJobs, - ), - ); - } else { - emit( - JobsStateEmpty(newServerJobs), - ); - } - } - }, - ); - } } diff --git a/lib/logic/cubit/client_jobs/client_jobs_state.dart b/lib/logic/cubit/client_jobs/client_jobs_state.dart new file mode 100644 index 00000000..2bb31856 --- /dev/null +++ b/lib/logic/cubit/client_jobs/client_jobs_state.dart @@ -0,0 +1,26 @@ +part of 'client_jobs_cubit.dart'; + +abstract class JobsState extends Equatable { + @override + List get props => []; +} + +class JobsStateLoading extends JobsState {} + +class JobsStateEmpty extends JobsState {} + +class JobsStateWithJobs extends JobsState { + JobsStateWithJobs(this.clientJobList); + final List clientJobList; + JobsState removeById(final String id) { + final List newJobsList = + clientJobList.where((final element) => element.id != id).toList(); + if (newJobsList.isEmpty) { + return JobsStateEmpty(); + } + return JobsStateWithJobs(newJobsList); + } + + @override + List get props => clientJobList; +} diff --git a/lib/logic/cubit/forms/user/ssh_form_cubit.dart b/lib/logic/cubit/forms/user/ssh_form_cubit.dart index b6493ee7..ba992af0 100644 --- a/lib/logic/cubit/forms/user/ssh_form_cubit.dart +++ b/lib/logic/cubit/forms/user/ssh_form_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; diff --git a/lib/logic/cubit/forms/user/user_form_cubit.dart b/lib/logic/cubit/forms/user/user_form_cubit.dart index a385befb..92f66f15 100644 --- a/lib/logic/cubit/forms/user/user_form_cubit.dart +++ b/lib/logic/cubit/forms/user/user_form_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/utils/password_generator.dart'; diff --git a/lib/logic/cubit/jobs/jobs_state.dart b/lib/logic/cubit/jobs/jobs_state.dart deleted file mode 100644 index 3737cb5d..00000000 --- a/lib/logic/cubit/jobs/jobs_state.dart +++ /dev/null @@ -1,34 +0,0 @@ -part of 'jobs_cubit.dart'; - -abstract class JobsState extends Equatable { - const JobsState(this.serverJobList); - final List serverJobList; - @override - List get props => [serverJobList]; -} - -class JobsStateLoading extends JobsState { - const JobsStateLoading(super.serverJobList); -} - -class JobsStateEmpty extends JobsState { - const JobsStateEmpty(super.serverJobList); -} - -class JobsStateWithJobs extends JobsState { - const JobsStateWithJobs(this.clientJobList, super.serverJobList); - final List clientJobList; - - JobsState removeById(final String id) { - final List newJobsList = - clientJobList.where((final element) => element.id != id).toList(); - - if (newJobsList.isEmpty) { - return JobsStateEmpty(serverJobList); - } - return JobsStateWithJobs(newJobsList, serverJobList); - } - - @override - List get props => [...super.props, clientJobList]; -} diff --git a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart new file mode 100644 index 00000000..254e6380 --- /dev/null +++ b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart @@ -0,0 +1,61 @@ +import 'dart:async'; + +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; + +export 'package:provider/provider.dart'; + +part 'server_jobs_state.dart'; + +class ServerJobsCubit + extends ServerInstallationDependendCubit { + ServerJobsCubit(final ServerInstallationCubit serverInstallationCubit) + : super( + serverInstallationCubit, + const ServerJobsState( + serverJobList: [], + ), + ); + + Timer? timer; + final ServerApi api = ServerApi(); + + @override + void clear() async { + emit( + const ServerJobsState( + serverJobList: [], + ), + ); + if (timer != null && timer!.isActive) { + timer!.cancel(); + timer = null; + } + } + + @override + void load() async { + if (serverInstallationCubit.state is ServerInstallationFinished) { + final List jobs = await api.getServerJobs(); + emit( + ServerJobsState( + serverJobList: jobs, + ), + ); + timer = Timer(const Duration(seconds: 10), () => reload(useTimer: true)); + } + } + + Future reload({final bool useTimer = false}) async { + final List jobs = await api.getServerJobs(); + emit( + ServerJobsState( + serverJobList: jobs, + ), + ); + if (useTimer) { + timer = Timer(const Duration(seconds: 10), () => reload(useTimer: true)); + } + } +} diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart new file mode 100644 index 00000000..82ac4377 --- /dev/null +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -0,0 +1,16 @@ +part of 'server_jobs_cubit.dart'; + +class ServerJobsState extends ServerInstallationDependendState { + const ServerJobsState({this.serverJobList = const []}); + final List serverJobList; + + @override + List get props => serverJobList; + + ServerJobsState copyWith({ + final List? serverJobList, + }) => + ServerJobsState( + serverJobList: serverJobList ?? this.serverJobList, + ); +} diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index 3948f7c4..f7063230 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -3,8 +3,9 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; @@ -122,11 +123,11 @@ class JobsContent extends StatelessWidget { const SizedBox(height: 8), const Divider(), const SizedBox(height: 8), - ...state.serverJobList.map( - (final job) => ServerJobCard( - serverJob: job, - ), - ), + ...context.read().state.serverJobList.map( + (final job) => ServerJobCard( + serverJob: job, + ), + ), ], ); }, diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/components/pre_styled_buttons/flash_fab.dart index 4ae29087..c9fb754f 100644 --- a/lib/ui/components/pre_styled_buttons/flash_fab.dart +++ b/lib/ui/components/pre_styled_buttons/flash_fab.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:ionicons/ionicons.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; diff --git a/lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart b/lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart index ad9105fb..5649236c 100644 --- a/lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart +++ b/lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:ionicons/ionicons.dart'; import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:easy_localization/easy_localization.dart'; diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index ba8465d2..a469d06b 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; @@ -115,11 +115,8 @@ class _Card extends StatelessWidget { final domainName = UiHelpers.getDomainName(config); return GestureDetector( - onTap: () => Navigator.of(context).push( - materialRoute( - ServicePage(serviceId: serviceType.name) - ) - ), + onTap: () => Navigator.of(context) + .push(materialRoute(ServicePage(serviceId: serviceType.name))), child: BrandCards.big( child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/pages/ssh_keys/ssh_keys.dart b/lib/ui/pages/ssh_keys/ssh_keys.dart index 4059ba63..64c1af9c 100644 --- a/lib/ui/pages/ssh_keys/ssh_keys.dart +++ b/lib/ui/pages/ssh_keys/ssh_keys.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 659453d1..3ccb696a 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/user/user_form_cubit.dart'; -import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; From 0602ab7de2ba312c5700c5abe88d44727557f2c2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 30 Aug 2022 22:17:22 +0300 Subject: [PATCH 036/732] Fetch russian text assets --- assets/translations/en.json | 1 + assets/translations/ru.json | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index dac1f23c..ce1bfb5f 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -307,6 +307,7 @@ "15": "Server created. DNS checks and server boot in progress...", "16": "Until the next check: ", "17": "Check", + "18": "How to obtain Hetzner API Token:'", "19": "1 Go via this link ", "20": "\n", "21": "One more restart to apply your security certificates.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 40bb2a9a..1ac780a9 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -163,7 +163,25 @@ "refresh": "Обновить статус", "refetchBackups": "Обновить список копий", "refetchingList": "Через несколько минут список будет обновлён" - + }, + "storage": { + "card_title": "Хранилище", + "status_ok": "Проблем на диске не обнаружено", + "status_error": "Заканчивается место на диске", + "disk_usage": "{} использовано", + "disk_total": "{} всего · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "extend_volume_button": "Расширить хранилище", + "extending_volume_title": "Расширение хранилища", + "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", + "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner.", + "size": "Размер", + "euro": "Евро", + "data_migration_title": "Миграция данных", + "data_migration_notice": "На время миграции данных все сервисы будут выключены.", + "start_migration_button": "Начать миграцию" } }, "not_ready_card": { @@ -239,6 +257,15 @@ "bottom_sheet": { "1": "Создать подключиться к VPN-серверу. Движок для безопасной и масштабируемой инфраструктуры VPN" } + }, + "page": { + "up_and_running": "Запущен и работает", + "resource_usage": "Потребление ресурсов", + "disk_used": "{} использовано места на диске", + "users": "Пользователи", + "controlled_by": "Контролируется {}", + "apps": "Приложения", + "settings": "Настройки" } }, "users": { @@ -322,6 +349,10 @@ "domain_not_available_on_token": "Введённый токен не имеет доступа к нужному домену.", "modal_confirmation_title": "Это действительно ваш сервер?", "modal_confirmation_description": "Подключение к неправильному серверу может привести к деструктивным последствиям.", + "modal_confirmation_dns_valid": "Обратный DNS корректен", + "modal_confirmation_dns_invalid": "Обратный DNS указывает на другой домен", + "modal_confirmation_ip_valid": "IP совпадает с указанным в DNS записи", + "modal_confirmation_ip_invalid": "IP не совпадает с указанным в DNS записи", "confirm_cloudflare": "Подключение к Cloudflare", "confirm_cloudflare_description": "Введите токен Cloudflare, который имеет права на {}:", "confirm_backblze": "Подключение к Backblaze", From a693f694ac667c9c0f6f7ebad45c0657c735cad7 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Sep 2022 08:59:46 +0300 Subject: [PATCH 037/732] Add endpoints for migration checking --- .../schema/server_settings.graphql | 8 + .../schema/server_settings.graphql.dart | 410 ++++++++++++++++++ .../schema/server_settings.graphql.g.dart | 44 ++ .../graphql_maps/server_api/server.dart | 19 +- .../server_volumes/server_volume_cubit.dart | 12 +- .../server_volumes/server_volume_state.dart | 18 +- 6 files changed, 502 insertions(+), 9 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql index 75d36d0a..5f175e8a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql @@ -21,6 +21,14 @@ query SystemSettings { } } +query SystemIsUsingBinds { + system { + info { + usingBinds + } + } +} + query DomainInfo { system { domainInfo { diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 4a920a4d..924f5d00 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -939,6 +939,416 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh _res; } +@JsonSerializable(explicitToJson: true) +class Query$SystemIsUsingBinds { + Query$SystemIsUsingBinds({required this.system, required this.$__typename}); + + @override + factory Query$SystemIsUsingBinds.fromJson(Map json) => + _$Query$SystemIsUsingBindsFromJson(json); + + final Query$SystemIsUsingBinds$system system; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemIsUsingBindsToJson(this); + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([l$system, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemIsUsingBinds) || + runtimeType != other.runtimeType) return false; + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemIsUsingBinds + on Query$SystemIsUsingBinds { + CopyWith$Query$SystemIsUsingBinds get copyWith => + CopyWith$Query$SystemIsUsingBinds(this, (i) => i); +} + +abstract class CopyWith$Query$SystemIsUsingBinds { + factory CopyWith$Query$SystemIsUsingBinds(Query$SystemIsUsingBinds instance, + TRes Function(Query$SystemIsUsingBinds) then) = + _CopyWithImpl$Query$SystemIsUsingBinds; + + factory CopyWith$Query$SystemIsUsingBinds.stub(TRes res) = + _CopyWithStubImpl$Query$SystemIsUsingBinds; + + TRes call({Query$SystemIsUsingBinds$system? system, String? $__typename}); + CopyWith$Query$SystemIsUsingBinds$system get system; +} + +class _CopyWithImpl$Query$SystemIsUsingBinds + implements CopyWith$Query$SystemIsUsingBinds { + _CopyWithImpl$Query$SystemIsUsingBinds(this._instance, this._then); + + final Query$SystemIsUsingBinds _instance; + + final TRes Function(Query$SystemIsUsingBinds) _then; + + static const _undefined = {}; + + TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemIsUsingBinds( + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemIsUsingBinds$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemIsUsingBinds$system get system { + final local$system = _instance.system; + return CopyWith$Query$SystemIsUsingBinds$system( + local$system, (e) => call(system: e)); + } +} + +class _CopyWithStubImpl$Query$SystemIsUsingBinds + implements CopyWith$Query$SystemIsUsingBinds { + _CopyWithStubImpl$Query$SystemIsUsingBinds(this._res); + + TRes _res; + + call({Query$SystemIsUsingBinds$system? system, String? $__typename}) => _res; + CopyWith$Query$SystemIsUsingBinds$system get system => + CopyWith$Query$SystemIsUsingBinds$system.stub(_res); +} + +const documentNodeQuerySystemIsUsingBinds = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'SystemIsUsingBinds'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'info'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'usingBinds'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$SystemIsUsingBinds _parserFn$Query$SystemIsUsingBinds( + Map data) => + Query$SystemIsUsingBinds.fromJson(data); + +class Options$Query$SystemIsUsingBinds + extends graphql.QueryOptions { + Options$Query$SystemIsUsingBinds( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemIsUsingBinds, + parserFn: _parserFn$Query$SystemIsUsingBinds); +} + +class WatchOptions$Query$SystemIsUsingBinds + extends graphql.WatchQueryOptions { + WatchOptions$Query$SystemIsUsingBinds( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemIsUsingBinds, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemIsUsingBinds); +} + +class FetchMoreOptions$Query$SystemIsUsingBinds + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$SystemIsUsingBinds( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQuerySystemIsUsingBinds); +} + +extension ClientExtension$Query$SystemIsUsingBinds on graphql.GraphQLClient { + Future> + query$SystemIsUsingBinds( + [Options$Query$SystemIsUsingBinds? options]) async => + await this.query(options ?? Options$Query$SystemIsUsingBinds()); + graphql.ObservableQuery + watchQuery$SystemIsUsingBinds( + [WatchOptions$Query$SystemIsUsingBinds? options]) => + this.watchQuery(options ?? WatchOptions$Query$SystemIsUsingBinds()); + void writeQuery$SystemIsUsingBinds( + {required Query$SystemIsUsingBinds data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemIsUsingBinds)), + data: data.toJson(), + broadcast: broadcast); + Query$SystemIsUsingBinds? readQuery$SystemIsUsingBinds( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemIsUsingBinds)), + optimistic: optimistic); + return result == null ? null : Query$SystemIsUsingBinds.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemIsUsingBinds$system { + Query$SystemIsUsingBinds$system( + {required this.info, required this.$__typename}); + + @override + factory Query$SystemIsUsingBinds$system.fromJson(Map json) => + _$Query$SystemIsUsingBinds$systemFromJson(json); + + final Query$SystemIsUsingBinds$system$info info; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemIsUsingBinds$systemToJson(this); + int get hashCode { + final l$info = info; + final l$$__typename = $__typename; + return Object.hashAll([l$info, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemIsUsingBinds$system) || + runtimeType != other.runtimeType) return false; + final l$info = info; + final lOther$info = other.info; + if (l$info != lOther$info) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemIsUsingBinds$system + on Query$SystemIsUsingBinds$system { + CopyWith$Query$SystemIsUsingBinds$system + get copyWith => CopyWith$Query$SystemIsUsingBinds$system(this, (i) => i); +} + +abstract class CopyWith$Query$SystemIsUsingBinds$system { + factory CopyWith$Query$SystemIsUsingBinds$system( + Query$SystemIsUsingBinds$system instance, + TRes Function(Query$SystemIsUsingBinds$system) then) = + _CopyWithImpl$Query$SystemIsUsingBinds$system; + + factory CopyWith$Query$SystemIsUsingBinds$system.stub(TRes res) = + _CopyWithStubImpl$Query$SystemIsUsingBinds$system; + + TRes call({Query$SystemIsUsingBinds$system$info? info, String? $__typename}); + CopyWith$Query$SystemIsUsingBinds$system$info get info; +} + +class _CopyWithImpl$Query$SystemIsUsingBinds$system + implements CopyWith$Query$SystemIsUsingBinds$system { + _CopyWithImpl$Query$SystemIsUsingBinds$system(this._instance, this._then); + + final Query$SystemIsUsingBinds$system _instance; + + final TRes Function(Query$SystemIsUsingBinds$system) _then; + + static const _undefined = {}; + + TRes call({Object? info = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemIsUsingBinds$system( + info: info == _undefined || info == null + ? _instance.info + : (info as Query$SystemIsUsingBinds$system$info), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemIsUsingBinds$system$info get info { + final local$info = _instance.info; + return CopyWith$Query$SystemIsUsingBinds$system$info( + local$info, (e) => call(info: e)); + } +} + +class _CopyWithStubImpl$Query$SystemIsUsingBinds$system + implements CopyWith$Query$SystemIsUsingBinds$system { + _CopyWithStubImpl$Query$SystemIsUsingBinds$system(this._res); + + TRes _res; + + call({Query$SystemIsUsingBinds$system$info? info, String? $__typename}) => + _res; + CopyWith$Query$SystemIsUsingBinds$system$info get info => + CopyWith$Query$SystemIsUsingBinds$system$info.stub(_res); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemIsUsingBinds$system$info { + Query$SystemIsUsingBinds$system$info( + {required this.usingBinds, required this.$__typename}); + + @override + factory Query$SystemIsUsingBinds$system$info.fromJson( + Map json) => + _$Query$SystemIsUsingBinds$system$infoFromJson(json); + + final bool usingBinds; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemIsUsingBinds$system$infoToJson(this); + int get hashCode { + final l$usingBinds = usingBinds; + final l$$__typename = $__typename; + return Object.hashAll([l$usingBinds, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemIsUsingBinds$system$info) || + runtimeType != other.runtimeType) return false; + final l$usingBinds = usingBinds; + final lOther$usingBinds = other.usingBinds; + if (l$usingBinds != lOther$usingBinds) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemIsUsingBinds$system$info + on Query$SystemIsUsingBinds$system$info { + CopyWith$Query$SystemIsUsingBinds$system$info< + Query$SystemIsUsingBinds$system$info> + get copyWith => + CopyWith$Query$SystemIsUsingBinds$system$info(this, (i) => i); +} + +abstract class CopyWith$Query$SystemIsUsingBinds$system$info { + factory CopyWith$Query$SystemIsUsingBinds$system$info( + Query$SystemIsUsingBinds$system$info instance, + TRes Function(Query$SystemIsUsingBinds$system$info) then) = + _CopyWithImpl$Query$SystemIsUsingBinds$system$info; + + factory CopyWith$Query$SystemIsUsingBinds$system$info.stub(TRes res) = + _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info; + + TRes call({bool? usingBinds, String? $__typename}); +} + +class _CopyWithImpl$Query$SystemIsUsingBinds$system$info + implements CopyWith$Query$SystemIsUsingBinds$system$info { + _CopyWithImpl$Query$SystemIsUsingBinds$system$info( + this._instance, this._then); + + final Query$SystemIsUsingBinds$system$info _instance; + + final TRes Function(Query$SystemIsUsingBinds$system$info) _then; + + static const _undefined = {}; + + TRes call( + {Object? usingBinds = _undefined, + Object? $__typename = _undefined}) => + _then(Query$SystemIsUsingBinds$system$info( + usingBinds: usingBinds == _undefined || usingBinds == null + ? _instance.usingBinds + : (usingBinds as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info + implements CopyWith$Query$SystemIsUsingBinds$system$info { + _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info(this._res); + + TRes _res; + + call({bool? usingBinds, String? $__typename}) => _res; +} + @JsonSerializable(explicitToJson: true) class Query$DomainInfo { Query$DomainInfo({required this.system, required this.$__typename}); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart index d3e51515..d60ae006 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart @@ -113,6 +113,50 @@ Map _$Query$SystemSettings$system$settings$sshToJson( '__typename': instance.$__typename, }; +Query$SystemIsUsingBinds _$Query$SystemIsUsingBindsFromJson( + Map json) => + Query$SystemIsUsingBinds( + system: Query$SystemIsUsingBinds$system.fromJson( + json['system'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemIsUsingBindsToJson( + Query$SystemIsUsingBinds instance) => + { + 'system': instance.system.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemIsUsingBinds$system _$Query$SystemIsUsingBinds$systemFromJson( + Map json) => + Query$SystemIsUsingBinds$system( + info: Query$SystemIsUsingBinds$system$info.fromJson( + json['info'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemIsUsingBinds$systemToJson( + Query$SystemIsUsingBinds$system instance) => + { + 'info': instance.info.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemIsUsingBinds$system$info + _$Query$SystemIsUsingBinds$system$infoFromJson(Map json) => + Query$SystemIsUsingBinds$system$info( + usingBinds: json['usingBinds'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemIsUsingBinds$system$infoToJson( + Query$SystemIsUsingBinds$system$info instance) => + { + 'usingBinds': instance.usingBinds, + '__typename': instance.$__typename, + }; + Query$DomainInfo _$Query$DomainInfoFromJson(Map json) => Query$DomainInfo( system: Query$DomainInfo$system.fromJson( diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 13ea67a7..4fb757e2 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -2,6 +2,7 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; @@ -73,6 +74,23 @@ class ServerApi extends ApiMap return apiVersion; } + Future isUsingBinds() async { + QueryResult response; + bool usesBinds = false; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$SystemIsUsingBinds(); + if (response.hasException) { + print(response.exception.toString()); + } + usesBinds = response.data!['system']['info']['usingBinds']; + } catch (e) { + print(e); + } + return usesBinds; + } + Future> getApiTokens() async { QueryResult response; List tokens = []; @@ -89,7 +107,6 @@ class ServerApi extends ApiMap } catch (e) { print(e); } - return tokens; } diff --git a/lib/logic/cubit/server_volumes/server_volume_cubit.dart b/lib/logic/cubit/server_volumes/server_volume_cubit.dart index 13015d0b..53b185c7 100644 --- a/lib/logic/cubit/server_volumes/server_volume_cubit.dart +++ b/lib/logic/cubit/server_volumes/server_volume_cubit.dart @@ -20,13 +20,15 @@ class ApiServerVolumeCubit } Future _refetch() async { - final List volumes = - await serverApi.getServerDiskVolumes(); + final volumes = await serverApi.getServerDiskVolumes(); + final usesBinds = await serverApi.isUsingBinds(); + var status = LoadingStatus.error; + if (volumes.isNotEmpty) { - emit(ApiServerVolumeState(volumes, LoadingStatus.success)); - } else { - emit(const ApiServerVolumeState([], LoadingStatus.error)); + status = LoadingStatus.success; } + + emit(ApiServerVolumeState(volumes, status, usesBinds)); } @override diff --git a/lib/logic/cubit/server_volumes/server_volume_state.dart b/lib/logic/cubit/server_volumes/server_volume_state.dart index 3c267710..12b0b9be 100644 --- a/lib/logic/cubit/server_volumes/server_volume_state.dart +++ b/lib/logic/cubit/server_volumes/server_volume_state.dart @@ -1,11 +1,21 @@ part of 'server_volume_cubit.dart'; class ApiServerVolumeState extends ServerInstallationDependendState { - const ApiServerVolumeState(this._volumes, this.status); + const ApiServerVolumeState( + this._volumes, + this.status, + this.usesBinds, + ); const ApiServerVolumeState.initial() - : this(const [], LoadingStatus.uninitialized); + : this( + const [], + LoadingStatus.uninitialized, + null, + ); + final List _volumes; + final bool? usesBinds; final LoadingStatus status; List get volumes => _volumes; @@ -13,12 +23,14 @@ class ApiServerVolumeState extends ServerInstallationDependendState { ApiServerVolumeState copyWith({ final List? volumes, final LoadingStatus? status, + final bool? usesBinds, }) => ApiServerVolumeState( volumes ?? _volumes, status ?? this.status, + usesBinds ?? this.usesBinds, ); @override - List get props => [_volumes]; + List get props => [_volumes, status, usesBinds]; } From 88a1393a1dc85840c1e97f5803ec5f18f4d71506 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Sep 2022 09:05:35 +0300 Subject: [PATCH 038/732] Move disk status converting to disk status constructor --- .../server_volumes/server_volume_state.dart | 6 +- lib/ui/pages/providers/providers.dart | 59 +------------------ lib/ui/pages/server_storage/disk_status.dart | 56 ++++++++++++++++++ 3 files changed, 58 insertions(+), 63 deletions(-) diff --git a/lib/logic/cubit/server_volumes/server_volume_state.dart b/lib/logic/cubit/server_volumes/server_volume_state.dart index 12b0b9be..3df43855 100644 --- a/lib/logic/cubit/server_volumes/server_volume_state.dart +++ b/lib/logic/cubit/server_volumes/server_volume_state.dart @@ -8,11 +8,7 @@ class ApiServerVolumeState extends ServerInstallationDependendState { ); const ApiServerVolumeState.initial() - : this( - const [], - LoadingStatus.uninitialized, - null, - ); + : this(const [], LoadingStatus.uninitialized, null); final List _volumes; final bool? usesBinds; diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 2696bf85..a1e03a19 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -7,9 +7,6 @@ import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; -import 'package:selfprivacy/logic/models/disk_size.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/provider.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; @@ -78,7 +75,7 @@ class _ProvidersPageState extends State { Padding( padding: const EdgeInsets.only(bottom: 30), child: StorageCard( - diskStatus: toDiskStatus( + diskStatus: DiskStatus.fromVolumes( context.read().state.volumes, context.read().state.volumes, ), @@ -104,60 +101,6 @@ class _ProvidersPageState extends State { ), ); } - - DiskStatus toDiskStatus( - final List serverVolumes, - final List providerVolumes, - ) { - final DiskStatus diskStatus = DiskStatus(); - diskStatus.isDiskOkay = true; - - if (providerVolumes.isEmpty || serverVolumes.isEmpty) { - diskStatus.isDiskOkay = false; - } - - diskStatus.diskVolumes = serverVolumes.map(( - final ServerDiskVolume volume, - ) { - final DiskVolume diskVolume = DiskVolume(); - diskVolume.sizeUsed = DiskSize( - byte: volume.usedSpace == 'None' ? 0 : int.parse(volume.usedSpace), - ); - diskVolume.sizeTotal = DiskSize( - byte: volume.totalSpace == 'None' ? 0 : int.parse(volume.totalSpace), - ); - diskVolume.serverDiskVolume = volume; - - for (final ServerVolume providerVolume in providerVolumes) { - if (providerVolume.linuxDevice == null || - volume.model == null || - volume.serial == null) { - continue; - } - - final String deviceId = providerVolume.linuxDevice!.split('/').last; - if (deviceId.contains(volume.model!) && - deviceId.contains(volume.serial!)) { - diskVolume.providerVolume = providerVolume; - break; - } - } - - diskVolume.name = volume.name; - diskVolume.root = volume.root; - diskVolume.percentage = - volume.usedSpace != 'None' && volume.totalSpace != 'None' - ? 1.0 / diskVolume.sizeTotal.byte * diskVolume.sizeUsed.byte - : 0.0; - if (diskVolume.percentage >= 0.8 || - diskVolume.sizeTotal.asGb() - diskVolume.sizeUsed.asGb() <= 2.0) { - diskStatus.isDiskOkay = false; - } - return diskVolume; - }).toList(); - - return diskStatus; - } } class _Card extends StatelessWidget { diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index 2c00097b..4c9949e0 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -16,6 +16,62 @@ class DiskVolume { } class DiskStatus { + DiskStatus() { + isDiskOkay = false; + diskVolumes = []; + } + + DiskStatus.fromVolumes( + final List serverVolumes, + final List providerVolumes, + ) { + isDiskOkay = true; + + if (providerVolumes.isEmpty || serverVolumes.isEmpty) { + isDiskOkay = false; + } + + diskVolumes = serverVolumes.map(( + final ServerDiskVolume volume, + ) { + final DiskVolume diskVolume = DiskVolume(); + diskVolume.sizeUsed = DiskSize( + byte: volume.usedSpace == 'None' ? 0 : int.parse(volume.usedSpace), + ); + diskVolume.sizeTotal = DiskSize( + byte: volume.totalSpace == 'None' ? 0 : int.parse(volume.totalSpace), + ); + diskVolume.serverDiskVolume = volume; + + for (final ServerVolume providerVolume in providerVolumes) { + if (providerVolume.linuxDevice == null || + volume.model == null || + volume.serial == null) { + continue; + } + + final String deviceId = providerVolume.linuxDevice!.split('/').last; + if (deviceId.contains(volume.model!) && + deviceId.contains(volume.serial!)) { + diskVolume.providerVolume = providerVolume; + break; + } + } + + diskVolume.name = volume.name; + diskVolume.root = volume.root; + diskVolume.percentage = + volume.usedSpace != 'None' && volume.totalSpace != 'None' + ? 1.0 / diskVolume.sizeTotal.byte * diskVolume.sizeUsed.byte + : 0.0; + if (diskVolume.percentage >= 0.8 || + diskVolume.sizeTotal.asGb() - diskVolume.sizeUsed.asGb() <= 2.0) { + isDiskOkay = false; + } + return diskVolume; + }).toList(); + } + bool isDiskOkay = false; List diskVolumes = []; } From 634946285bd3f1c2997e14467ee7756b2141e0c8 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sun, 4 Sep 2022 09:30:24 +0300 Subject: [PATCH 039/732] Ops: add Drone CI pipelines (debug and release) and Flakes-powered Nix shell environment (#110) Co-authored-by: Alya Sirko Reviewed-on: https://git.selfprivacy.org/kherel/selfprivacy.org.app/pulls/110 Co-authored-by: Alya Sirko Co-committed-by: Alya Sirko --- .drone.yml | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.lock | 26 ++++++++++++ flake.nix | 22 ++++++++++ 3 files changed, 163 insertions(+) create mode 100644 .drone.yml create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..eedcec9b --- /dev/null +++ b/.drone.yml @@ -0,0 +1,115 @@ +kind: pipeline +type: exec +name: Continuous Integration + +steps: + - name: Build Debug Artifacts + commands: + - flutter build apk --debug --split-per-abi + - mv build/app/outputs/flutter-apk/*-debug.apk . + - rename app pro.kherel.selfprivacy *.apk && rename debug "$DRONE_COMMIT" *.apk + - ls *.apk + +trigger: + event: + - push + - pull_request + +node: + server: builder + +--- + +kind: pipeline +type: exec +name: Release + +steps: + - name: Prepare for Build + commands: + # Reset building environment + - nixos-container stop isolated + - nixos-container start isolated + # Prepare SSH keys + - eval `ssh-agent -s` + - echo "$SSH_PRIVATE_KEY" | ssh-add - + # Copy sources to the building environment + - scp -r `pwd` builder@isolated:~ + environment: + SSH_PRIVATE_KEY: + from_secret: SSH_PRIVATE_KEY + + - name: Build Intermediate Release Artifact + commands: + # Prepare SSH keys + - eval `ssh-agent -s` + - echo "$SSH_PRIVATE_KEY" | ssh-add - + # Build intermediate release artifact + - ssh builder@isolated "cd src && flutter build apk --release" + # Fetch the release artifact + - scp builder@isolated:src/build/app/outputs/flutter-apk/app-release.apk . + environment: + SSH_PRIVATE_KEY: + from_secret: SSH_PRIVATE_KEY + + - name: Sign Release Artifact for Standalone Use + commands: + # Get app build ID + - export APP_BUILD_ID=`yq '.version' pubspec.yaml | cut -d "+" -f2` + # Prepare SSH keys + - eval `ssh-agent -s` + - echo "$SSH_PRIVATE_KEY" | ssh-add - + # Upload and sign the artifact + - scp app-release.apk builder@isolated:~ + - ssh builder@isolated "zipalign -f -v 4 app-release.apk standalone_app-release.apk && apksigner sign --ks /run/secrets/standalone-keystore --ks-key-alias standalone --ks-pass file:/run/secrets/standalone-keystore-pass standalone_app-release.apk" + # Fetch the signed artifact + - scp builder@isolated:standalone_app-release.apk standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk + - scp builder@isolated:standalone_app-release.apk.idsig standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk.idsig + environment: + SSH_PRIVATE_KEY: + from_secret: SSH_PRIVATE_KEY + + - name: Sign Release Artifact for F-Droid Repository + commands: + # Get app build ID + - export APP_BUILD_ID=`yq '.version' pubspec.yaml | cut -d "+" -f2` + # Prepare SSH keys + - eval `ssh-agent -s` + - echo "$SSH_PRIVATE_KEY" | ssh-add - + # Upload and sign the artifact + - scp app-release.apk fdroid@isolated:unsigned/pro.kherel.selfprivacy_"$APP_BUILD_ID".apk + - ssh fdroid@isolated 'export FDROID_KEY_STORE_PASS=`cat /run/secrets/fdroid-keystore-pass` && fdroid publish && fdroid update' + - scp -r fdroid@isolated:repo . + environment: + SSH_PRIVATE_KEY: + from_secret: SSH_PRIVATE_KEY + + - name: Create Release on Gitea Repository + commands: + # Get app build ID + - export APP_BUILD_ID=`yq '.version' pubspec.yaml | cut -d "+" -f2` + # Prepare tea CLI + - tea login add --token "$GITEA_RELEASE_TOKEN" --url https://git.selfprivacy.org + # Create release and push artifacts + - tea releases create --repo "$DRONE_REPO" --tag "$DRONE_SEMVER" --title "$DRONE_SEMVER" --asset standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk --asset standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk.idsig + environment: + GITEA_RELEASE_TOKEN: + from_secret: GITEA_RELEASE_TOKEN + + - name: Deploy F-Droid Repository + commands: + # Prepare SSH keys + - eval `ssh-agent -s` + - echo "$SSH_PRIVATE_KEY" | ssh-add - + # Copy the repository to the production server + - scp -r repo/* deployer@production:/var/www/fdroid.selfprivacy.org + environment: + SSH_PRIVATE_KEY: + from_secret: SSH_PRIVATE_KEY + +trigger: + event: + - tag + +node: + server: builder diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..ca75926d --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs-unstable": { + "locked": { + "lastModified": 1662019588, + "narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2da64a81275b68fdad38af669afeda43d401e94b", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..ed8dad75 --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + inputs.nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; + + outputs = { self, nixpkgs-unstable }: + let + pkgs = import nixpkgs-unstable { config.allowUnfree = true; config.android_sdk.accept_license = true; }; + androidComposition = pkgs.androidenv.composeAndroidPackages { + toolsVersion = "26.1.1"; + platformToolsVersion = "33.0.2"; + buildToolsVersions = [ "30.0.3" ]; + platformVersions = [ "31" "30" "29" ]; + }; + in { + devShell.x86_64-linux = pkgs.mkShell { + JAVA_HOME = "${pkgs.openjdk11_headless.home}"; + ANDROID_HOME = "${androidComposition.androidsdk}/libexec/android-sdk"; + ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk"; + + buildInputs = with pkgs; [ bash git androidComposition.androidsdk flutter openjdk11_headless ]; + }; + }; +} From 33b8003f07f904687cb095659d85c320353522dd Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 4 Sep 2022 13:45:03 +0300 Subject: [PATCH 040/732] Add user-related GraphQL handlers --- .../graphql_maps/schema/users.graphql | 65 +- .../graphql_maps/schema/users.graphql.dart | 4257 +++++++---------- .../graphql_maps/schema/users.graphql.g.dart | 492 +- .../graphql_maps/server_api/server.dart | 3 + .../graphql_maps/server_api/users_api.dart | 189 + lib/logic/models/hive/user.dart | 11 +- 6 files changed, 2197 insertions(+), 2820 deletions(-) create mode 100644 lib/logic/api_maps/graphql_maps/server_api/users_api.dart diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql b/lib/logic/api_maps/graphql_maps/schema/users.graphql index cfe01820..4f16ffc5 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql @@ -4,35 +4,16 @@ fragment basicMutationReturnFields on MutationReturnInterface{ success } - -mutation CreateUser($user: UserMutationInput!) { - createUser(user: $user) { - ...basicMutationReturnFields - user { - username - userType - sshKeys - } - } +fragment userFields on User{ + username + userType + sshKeys } query AllUsers { users { allUsers { - userType - username - sshKeys - } - } -} - -mutation AddSshKey($sshInput: SshMutationInput!) { - addSshKey(sshInput: $sshInput) { - ...basicMutationReturnFields - user { - sshKeys - userType - username + ...userFields } } } @@ -40,20 +21,16 @@ mutation AddSshKey($sshInput: SshMutationInput!) { query GetUser($username: String!) { users { getUser(username: $username) { - sshKeys - userType - username + ...userFields } } } -mutation RemoveSshKey($sshInput: SshMutationInput!) { - removeSshKey(sshInput: $sshInput) { +mutation CreateUser($user: UserMutationInput!) { + createUser(user: $user) { ...basicMutationReturnFields user { - sshKeys - userType - username + ...userFields } } } @@ -68,9 +45,25 @@ mutation UpdateUser($user: UserMutationInput!) { updateUser(user: $user) { ...basicMutationReturnFields user { - sshKeys - userType - username + ...userFields } } -} \ No newline at end of file +} + +mutation AddSshKey($sshInput: SshMutationInput!) { + addSshKey(sshInput: $sshInput) { + ...basicMutationReturnFields + user { + ...userFields + } + } +} + +mutation RemoveSshKey($sshInput: SshMutationInput!) { + removeSshKey(sshInput: $sshInput) { + ...basicMutationReturnFields + user { + ...userFields + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 4fa5cac1..328b4a3b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -186,6 +186,898 @@ extension ClientExtension$Fragment$basicMutationReturnFields } } +@JsonSerializable(explicitToJson: true) +class Fragment$userFields { + Fragment$userFields( + {required this.username, + required this.userType, + required this.sshKeys, + required this.$__typename}); + + @override + factory Fragment$userFields.fromJson(Map json) => + _$Fragment$userFieldsFromJson(json); + + final String username; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final List sshKeys; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Fragment$userFieldsToJson(this); + int get hashCode { + final l$username = username; + final l$userType = userType; + final l$sshKeys = sshKeys; + final l$$__typename = $__typename; + return Object.hashAll([ + l$username, + l$userType, + Object.hashAll(l$sshKeys.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) + return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$userFields on Fragment$userFields { + CopyWith$Fragment$userFields get copyWith => + CopyWith$Fragment$userFields(this, (i) => i); +} + +abstract class CopyWith$Fragment$userFields { + factory CopyWith$Fragment$userFields(Fragment$userFields instance, + TRes Function(Fragment$userFields) then) = + _CopyWithImpl$Fragment$userFields; + + factory CopyWith$Fragment$userFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$userFields; + + TRes call( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}); +} + +class _CopyWithImpl$Fragment$userFields + implements CopyWith$Fragment$userFields { + _CopyWithImpl$Fragment$userFields(this._instance, this._then); + + final Fragment$userFields _instance; + + final TRes Function(Fragment$userFields) _then; + + static const _undefined = {}; + + TRes call( + {Object? username = _undefined, + Object? userType = _undefined, + Object? sshKeys = _undefined, + Object? $__typename = _undefined}) => + _then(Fragment$userFields( + username: username == _undefined || username == null + ? _instance.username + : (username as String), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Fragment$userFields + implements CopyWith$Fragment$userFields { + _CopyWithStubImpl$Fragment$userFields(this._res); + + TRes _res; + + call( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}) => + _res; +} + +const fragmentDefinitionuserFields = FragmentDefinitionNode( + name: NameNode(value: 'userFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])); +const documentNodeFragmentuserFields = DocumentNode(definitions: [ + fragmentDefinitionuserFields, +]); + +extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { + void writeFragment$userFields( + {required Fragment$userFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields)), + data: data.toJson(), + broadcast: broadcast); + Fragment$userFields? readFragment$userFields( + {required Map idFields, bool optimistic = true}) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields)), + optimistic: optimistic); + return result == null ? null : Fragment$userFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$AllUsers { + Query$AllUsers({required this.users, required this.$__typename}); + + @override + factory Query$AllUsers.fromJson(Map json) => + _$Query$AllUsersFromJson(json); + + final Query$AllUsers$users users; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsersToJson(this); + int get hashCode { + final l$users = users; + final l$$__typename = $__typename; + return Object.hashAll([l$users, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) + return false; + final l$users = users; + final lOther$users = other.users; + if (l$users != lOther$users) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers on Query$AllUsers { + CopyWith$Query$AllUsers get copyWith => + CopyWith$Query$AllUsers(this, (i) => i); +} + +abstract class CopyWith$Query$AllUsers { + factory CopyWith$Query$AllUsers( + Query$AllUsers instance, TRes Function(Query$AllUsers) then) = + _CopyWithImpl$Query$AllUsers; + + factory CopyWith$Query$AllUsers.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers; + + TRes call({Query$AllUsers$users? users, String? $__typename}); + CopyWith$Query$AllUsers$users get users; +} + +class _CopyWithImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { + _CopyWithImpl$Query$AllUsers(this._instance, this._then); + + final Query$AllUsers _instance; + + final TRes Function(Query$AllUsers) _then; + + static const _undefined = {}; + + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllUsers( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$AllUsers$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$AllUsers$users get users { + final local$users = _instance.users; + return CopyWith$Query$AllUsers$users(local$users, (e) => call(users: e)); + } +} + +class _CopyWithStubImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { + _CopyWithStubImpl$Query$AllUsers(this._res); + + TRes _res; + + call({Query$AllUsers$users? users, String? $__typename}) => _res; + CopyWith$Query$AllUsers$users get users => + CopyWith$Query$AllUsers$users.stub(_res); +} + +const documentNodeQueryAllUsers = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'AllUsers'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allUsers'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionuserFields, +]); +Query$AllUsers _parserFn$Query$AllUsers(Map data) => + Query$AllUsers.fromJson(data); + +class Options$Query$AllUsers extends graphql.QueryOptions { + Options$Query$AllUsers( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllUsers, + parserFn: _parserFn$Query$AllUsers); +} + +class WatchOptions$Query$AllUsers + extends graphql.WatchQueryOptions { + WatchOptions$Query$AllUsers( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllUsers, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllUsers); +} + +class FetchMoreOptions$Query$AllUsers extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); +} + +extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { + Future> query$AllUsers( + [Options$Query$AllUsers? options]) async => + await this.query(options ?? Options$Query$AllUsers()); + graphql.ObservableQuery watchQuery$AllUsers( + [WatchOptions$Query$AllUsers? options]) => + this.watchQuery(options ?? WatchOptions$Query$AllUsers()); + void writeQuery$AllUsers( + {required Query$AllUsers data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllUsers)), + data: data.toJson(), + broadcast: broadcast); + Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllUsers)), + optimistic: optimistic); + return result == null ? null : Query$AllUsers.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$AllUsers$users { + Query$AllUsers$users({required this.allUsers, required this.$__typename}); + + @override + factory Query$AllUsers$users.fromJson(Map json) => + _$Query$AllUsers$usersFromJson(json); + + final List allUsers; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsers$usersToJson(this); + int get hashCode { + final l$allUsers = allUsers; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$allUsers.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) + return false; + final l$allUsers = allUsers; + final lOther$allUsers = other.allUsers; + if (l$allUsers.length != lOther$allUsers.length) return false; + for (int i = 0; i < l$allUsers.length; i++) { + final l$allUsers$entry = l$allUsers[i]; + final lOther$allUsers$entry = lOther$allUsers[i]; + if (l$allUsers$entry != lOther$allUsers$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { + CopyWith$Query$AllUsers$users get copyWith => + CopyWith$Query$AllUsers$users(this, (i) => i); +} + +abstract class CopyWith$Query$AllUsers$users { + factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, + TRes Function(Query$AllUsers$users) then) = + _CopyWithImpl$Query$AllUsers$users; + + factory CopyWith$Query$AllUsers$users.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers$users; + + TRes call({List? allUsers, String? $__typename}); + TRes allUsers( + Iterable Function( + Iterable>) + _fn); +} + +class _CopyWithImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { + _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); + + final Query$AllUsers$users _instance; + + final TRes Function(Query$AllUsers$users) _then; + + static const _undefined = {}; + + TRes call( + {Object? allUsers = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllUsers$users( + allUsers: allUsers == _undefined || allUsers == null + ? _instance.allUsers + : (allUsers as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + TRes allUsers( + Iterable Function( + Iterable>) + _fn) => + call( + allUsers: _fn(_instance.allUsers + .map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); +} + +class _CopyWithStubImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { + _CopyWithStubImpl$Query$AllUsers$users(this._res); + + TRes _res; + + call({List? allUsers, String? $__typename}) => _res; + allUsers(_fn) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Variables$Query$GetUser { + Variables$Query$GetUser({required this.username}); + + @override + factory Variables$Query$GetUser.fromJson(Map json) => + _$Variables$Query$GetUserFromJson(json); + + final String username; + + Map toJson() => _$Variables$Query$GetUserToJson(this); + int get hashCode { + final l$username = username; + return Object.hashAll([l$username]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) + return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + return true; + } + + CopyWith$Variables$Query$GetUser get copyWith => + CopyWith$Variables$Query$GetUser(this, (i) => i); +} + +abstract class CopyWith$Variables$Query$GetUser { + factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, + TRes Function(Variables$Query$GetUser) then) = + _CopyWithImpl$Variables$Query$GetUser; + + factory CopyWith$Variables$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Query$GetUser; + + TRes call({String? username}); +} + +class _CopyWithImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { + _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); + + final Variables$Query$GetUser _instance; + + final TRes Function(Variables$Query$GetUser) _then; + + static const _undefined = {}; + + TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( + username: username == _undefined || username == null + ? _instance.username + : (username as String))); +} + +class _CopyWithStubImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { + _CopyWithStubImpl$Variables$Query$GetUser(this._res); + + TRes _res; + + call({String? username}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser { + Query$GetUser({required this.users, required this.$__typename}); + + @override + factory Query$GetUser.fromJson(Map json) => + _$Query$GetUserFromJson(json); + + final Query$GetUser$users users; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUserToJson(this); + int get hashCode { + final l$users = users; + final l$$__typename = $__typename; + return Object.hashAll([l$users, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetUser) || runtimeType != other.runtimeType) + return false; + final l$users = users; + final lOther$users = other.users; + if (l$users != lOther$users) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser on Query$GetUser { + CopyWith$Query$GetUser get copyWith => + CopyWith$Query$GetUser(this, (i) => i); +} + +abstract class CopyWith$Query$GetUser { + factory CopyWith$Query$GetUser( + Query$GetUser instance, TRes Function(Query$GetUser) then) = + _CopyWithImpl$Query$GetUser; + + factory CopyWith$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser; + + TRes call({Query$GetUser$users? users, String? $__typename}); + CopyWith$Query$GetUser$users get users; +} + +class _CopyWithImpl$Query$GetUser + implements CopyWith$Query$GetUser { + _CopyWithImpl$Query$GetUser(this._instance, this._then); + + final Query$GetUser _instance; + + final TRes Function(Query$GetUser) _then; + + static const _undefined = {}; + + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$GetUser$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$GetUser$users get users { + final local$users = _instance.users; + return CopyWith$Query$GetUser$users(local$users, (e) => call(users: e)); + } +} + +class _CopyWithStubImpl$Query$GetUser + implements CopyWith$Query$GetUser { + _CopyWithStubImpl$Query$GetUser(this._res); + + TRes _res; + + call({Query$GetUser$users? users, String? $__typename}) => _res; + CopyWith$Query$GetUser$users get users => + CopyWith$Query$GetUser$users.stub(_res); +} + +const documentNodeQueryGetUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionuserFields, +]); +Query$GetUser _parserFn$Query$GetUser(Map data) => + Query$GetUser.fromJson(data); + +class Options$Query$GetUser extends graphql.QueryOptions { + Options$Query$GetUser( + {String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetUser, + parserFn: _parserFn$Query$GetUser); +} + +class WatchOptions$Query$GetUser + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetUser( + {String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetUser); +} + +class FetchMoreOptions$Query$GetUser extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetUser( + {required graphql.UpdateQuery updateQuery, + required Variables$Query$GetUser variables}) + : super( + updateQuery: updateQuery, + variables: variables.toJson(), + document: documentNodeQueryGetUser); +} + +extension ClientExtension$Query$GetUser on graphql.GraphQLClient { + Future> query$GetUser( + Options$Query$GetUser options) async => + await this.query(options); + graphql.ObservableQuery watchQuery$GetUser( + WatchOptions$Query$GetUser options) => + this.watchQuery(options); + void writeQuery$GetUser( + {required Query$GetUser data, + required Variables$Query$GetUser variables, + bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), + data: data.toJson(), + broadcast: broadcast); + Query$GetUser? readQuery$GetUser( + {required Variables$Query$GetUser variables, bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), + optimistic: optimistic); + return result == null ? null : Query$GetUser.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser$users { + Query$GetUser$users({this.getUser, required this.$__typename}); + + @override + factory Query$GetUser$users.fromJson(Map json) => + _$Query$GetUser$usersFromJson(json); + + final Fragment$userFields? getUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUser$usersToJson(this); + int get hashCode { + final l$getUser = getUser; + final l$$__typename = $__typename; + return Object.hashAll([l$getUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) + return false; + final l$getUser = getUser; + final lOther$getUser = other.getUser; + if (l$getUser != lOther$getUser) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { + CopyWith$Query$GetUser$users get copyWith => + CopyWith$Query$GetUser$users(this, (i) => i); +} + +abstract class CopyWith$Query$GetUser$users { + factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, + TRes Function(Query$GetUser$users) then) = + _CopyWithImpl$Query$GetUser$users; + + factory CopyWith$Query$GetUser$users.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser$users; + + TRes call({Fragment$userFields? getUser, String? $__typename}); + CopyWith$Fragment$userFields get getUser; +} + +class _CopyWithImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { + _CopyWithImpl$Query$GetUser$users(this._instance, this._then); + + final Query$GetUser$users _instance; + + final TRes Function(Query$GetUser$users) _then; + + static const _undefined = {}; + + TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser$users( + getUser: getUser == _undefined + ? _instance.getUser + : (getUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Fragment$userFields get getUser { + final local$getUser = _instance.getUser; + return local$getUser == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$getUser, (e) => call(getUser: e)); + } +} + +class _CopyWithStubImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { + _CopyWithStubImpl$Query$GetUser$users(this._res); + + TRes _res; + + call({Fragment$userFields? getUser, String? $__typename}) => _res; + CopyWith$Fragment$userFields get getUser => + CopyWith$Fragment$userFields.stub(_res); +} + @JsonSerializable(explicitToJson: true) class Variables$Mutation$CreateUser { Variables$Mutation$CreateUser({required this.user}); @@ -378,24 +1270,8 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -418,6 +1294,7 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionuserFields, ]); Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); @@ -528,7 +1405,7 @@ class Mutation$CreateUser$createUser @JsonKey(name: '__typename') final String $__typename; - final Mutation$CreateUser$createUser$user? user; + final Fragment$userFields? user; Map toJson() => _$Mutation$CreateUser$createUserToJson(this); int get hashCode { @@ -585,8 +1462,8 @@ abstract class CopyWith$Mutation$CreateUser$createUser { String? message, bool? success, String? $__typename, - Mutation$CreateUser$createUser$user? user}); - CopyWith$Mutation$CreateUser$createUser$user get user; + Fragment$userFields? user}); + CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$CreateUser$createUser @@ -620,13 +1497,12 @@ class _CopyWithImpl$Mutation$CreateUser$createUser : ($__typename as String), user: user == _undefined ? _instance.user - : (user as Mutation$CreateUser$createUser$user?))); - CopyWith$Mutation$CreateUser$createUser$user get user { + : (user as Fragment$userFields?))); + CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null - ? CopyWith$Mutation$CreateUser$createUser$user.stub(_then(_instance)) - : CopyWith$Mutation$CreateUser$createUser$user( - local$user, (e) => call(user: e)); + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } @@ -641,2345 +1517,10 @@ class _CopyWithStubImpl$Mutation$CreateUser$createUser String? message, bool? success, String? $__typename, - Mutation$CreateUser$createUser$user? user}) => - _res; - CopyWith$Mutation$CreateUser$createUser$user get user => - CopyWith$Mutation$CreateUser$createUser$user.stub(_res); -} - -@JsonSerializable(explicitToJson: true) -class Mutation$CreateUser$createUser$user { - Mutation$CreateUser$createUser$user( - {required this.username, - required this.userType, - required this.sshKeys, - required this.$__typename}); - - @override - factory Mutation$CreateUser$createUser$user.fromJson( - Map json) => - _$Mutation$CreateUser$createUser$userFromJson(json); - - final String username; - - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) - final Enum$UserType userType; - - final List sshKeys; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Mutation$CreateUser$createUser$userToJson(this); - int get hashCode { - final l$username = username; - final l$userType = userType; - final l$sshKeys = sshKeys; - final l$$__typename = $__typename; - return Object.hashAll([ - l$username, - l$userType, - Object.hashAll(l$sshKeys.map((v) => v)), - l$$__typename - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser$createUser$user) || - runtimeType != other.runtimeType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - final l$userType = userType; - final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; - final l$sshKeys = sshKeys; - final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; - for (int i = 0; i < l$sshKeys.length; i++) { - final l$sshKeys$entry = l$sshKeys[i]; - final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; - } - - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Mutation$CreateUser$createUser$user - on Mutation$CreateUser$createUser$user { - CopyWith$Mutation$CreateUser$createUser$user< - Mutation$CreateUser$createUser$user> - get copyWith => - CopyWith$Mutation$CreateUser$createUser$user(this, (i) => i); -} - -abstract class CopyWith$Mutation$CreateUser$createUser$user { - factory CopyWith$Mutation$CreateUser$createUser$user( - Mutation$CreateUser$createUser$user instance, - TRes Function(Mutation$CreateUser$createUser$user) then) = - _CopyWithImpl$Mutation$CreateUser$createUser$user; - - factory CopyWith$Mutation$CreateUser$createUser$user.stub(TRes res) = - _CopyWithStubImpl$Mutation$CreateUser$createUser$user; - - TRes call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}); -} - -class _CopyWithImpl$Mutation$CreateUser$createUser$user - implements CopyWith$Mutation$CreateUser$createUser$user { - _CopyWithImpl$Mutation$CreateUser$createUser$user(this._instance, this._then); - - final Mutation$CreateUser$createUser$user _instance; - - final TRes Function(Mutation$CreateUser$createUser$user) _then; - - static const _undefined = {}; - - TRes call( - {Object? username = _undefined, - Object? userType = _undefined, - Object? sshKeys = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$CreateUser$createUser$user( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Mutation$CreateUser$createUser$user - implements CopyWith$Mutation$CreateUser$createUser$user { - _CopyWithStubImpl$Mutation$CreateUser$createUser$user(this._res); - - TRes _res; - - call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}) => - _res; -} - -@JsonSerializable(explicitToJson: true) -class Query$AllUsers { - Query$AllUsers({required this.users, required this.$__typename}); - - @override - factory Query$AllUsers.fromJson(Map json) => - _$Query$AllUsersFromJson(json); - - final Query$AllUsers$users users; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$AllUsersToJson(this); - int get hashCode { - final l$users = users; - final l$$__typename = $__typename; - return Object.hashAll([l$users, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) - return false; - final l$users = users; - final lOther$users = other.users; - if (l$users != lOther$users) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$AllUsers on Query$AllUsers { - CopyWith$Query$AllUsers get copyWith => - CopyWith$Query$AllUsers(this, (i) => i); -} - -abstract class CopyWith$Query$AllUsers { - factory CopyWith$Query$AllUsers( - Query$AllUsers instance, TRes Function(Query$AllUsers) then) = - _CopyWithImpl$Query$AllUsers; - - factory CopyWith$Query$AllUsers.stub(TRes res) = - _CopyWithStubImpl$Query$AllUsers; - - TRes call({Query$AllUsers$users? users, String? $__typename}); - CopyWith$Query$AllUsers$users get users; -} - -class _CopyWithImpl$Query$AllUsers - implements CopyWith$Query$AllUsers { - _CopyWithImpl$Query$AllUsers(this._instance, this._then); - - final Query$AllUsers _instance; - - final TRes Function(Query$AllUsers) _then; - - static const _undefined = {}; - - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => - _then(Query$AllUsers( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$AllUsers$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$AllUsers$users get users { - final local$users = _instance.users; - return CopyWith$Query$AllUsers$users(local$users, (e) => call(users: e)); - } -} - -class _CopyWithStubImpl$Query$AllUsers - implements CopyWith$Query$AllUsers { - _CopyWithStubImpl$Query$AllUsers(this._res); - - TRes _res; - - call({Query$AllUsers$users? users, String? $__typename}) => _res; - CopyWith$Query$AllUsers$users get users => - CopyWith$Query$AllUsers$users.stub(_res); -} - -const documentNodeQueryAllUsers = DocumentNode(definitions: [ - OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'AllUsers'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'users'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'allUsers'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), -]); -Query$AllUsers _parserFn$Query$AllUsers(Map data) => - Query$AllUsers.fromJson(data); - -class Options$Query$AllUsers extends graphql.QueryOptions { - Options$Query$AllUsers( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryAllUsers, - parserFn: _parserFn$Query$AllUsers); -} - -class WatchOptions$Query$AllUsers - extends graphql.WatchQueryOptions { - WatchOptions$Query$AllUsers( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryAllUsers, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$AllUsers); -} - -class FetchMoreOptions$Query$AllUsers extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); -} - -extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { - Future> query$AllUsers( - [Options$Query$AllUsers? options]) async => - await this.query(options ?? Options$Query$AllUsers()); - graphql.ObservableQuery watchQuery$AllUsers( - [WatchOptions$Query$AllUsers? options]) => - this.watchQuery(options ?? WatchOptions$Query$AllUsers()); - void writeQuery$AllUsers( - {required Query$AllUsers data, bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryAllUsers)), - data: data.toJson(), - broadcast: broadcast); - Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryAllUsers)), - optimistic: optimistic); - return result == null ? null : Query$AllUsers.fromJson(result); - } -} - -@JsonSerializable(explicitToJson: true) -class Query$AllUsers$users { - Query$AllUsers$users({required this.allUsers, required this.$__typename}); - - @override - factory Query$AllUsers$users.fromJson(Map json) => - _$Query$AllUsers$usersFromJson(json); - - final List allUsers; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$AllUsers$usersToJson(this); - int get hashCode { - final l$allUsers = allUsers; - final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$allUsers.map((v) => v)), l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) - return false; - final l$allUsers = allUsers; - final lOther$allUsers = other.allUsers; - if (l$allUsers.length != lOther$allUsers.length) return false; - for (int i = 0; i < l$allUsers.length; i++) { - final l$allUsers$entry = l$allUsers[i]; - final lOther$allUsers$entry = lOther$allUsers[i]; - if (l$allUsers$entry != lOther$allUsers$entry) return false; - } - - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { - CopyWith$Query$AllUsers$users get copyWith => - CopyWith$Query$AllUsers$users(this, (i) => i); -} - -abstract class CopyWith$Query$AllUsers$users { - factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, - TRes Function(Query$AllUsers$users) then) = - _CopyWithImpl$Query$AllUsers$users; - - factory CopyWith$Query$AllUsers$users.stub(TRes res) = - _CopyWithStubImpl$Query$AllUsers$users; - - TRes call( - {List? allUsers, String? $__typename}); - TRes allUsers( - Iterable Function( - Iterable< - CopyWith$Query$AllUsers$users$allUsers< - Query$AllUsers$users$allUsers>>) - _fn); -} - -class _CopyWithImpl$Query$AllUsers$users - implements CopyWith$Query$AllUsers$users { - _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); - - final Query$AllUsers$users _instance; - - final TRes Function(Query$AllUsers$users) _then; - - static const _undefined = {}; - - TRes call( - {Object? allUsers = _undefined, Object? $__typename = _undefined}) => - _then(Query$AllUsers$users( - allUsers: allUsers == _undefined || allUsers == null - ? _instance.allUsers - : (allUsers as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - TRes allUsers( - Iterable Function( - Iterable< - CopyWith$Query$AllUsers$users$allUsers< - Query$AllUsers$users$allUsers>>) - _fn) => - call( - allUsers: _fn(_instance.allUsers.map( - (e) => CopyWith$Query$AllUsers$users$allUsers(e, (i) => i))) - .toList()); -} - -class _CopyWithStubImpl$Query$AllUsers$users - implements CopyWith$Query$AllUsers$users { - _CopyWithStubImpl$Query$AllUsers$users(this._res); - - TRes _res; - - call({List? allUsers, String? $__typename}) => - _res; - allUsers(_fn) => _res; -} - -@JsonSerializable(explicitToJson: true) -class Query$AllUsers$users$allUsers { - Query$AllUsers$users$allUsers( - {required this.userType, - required this.username, - required this.sshKeys, - required this.$__typename}); - - @override - factory Query$AllUsers$users$allUsers.fromJson(Map json) => - _$Query$AllUsers$users$allUsersFromJson(json); - - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) - final Enum$UserType userType; - - final String username; - - final List sshKeys; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$AllUsers$users$allUsersToJson(this); - int get hashCode { - final l$userType = userType; - final l$username = username; - final l$sshKeys = sshKeys; - final l$$__typename = $__typename; - return Object.hashAll([ - l$userType, - l$username, - Object.hashAll(l$sshKeys.map((v) => v)), - l$$__typename - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllUsers$users$allUsers) || - runtimeType != other.runtimeType) return false; - final l$userType = userType; - final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - final l$sshKeys = sshKeys; - final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; - for (int i = 0; i < l$sshKeys.length; i++) { - final l$sshKeys$entry = l$sshKeys[i]; - final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; - } - - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$AllUsers$users$allUsers - on Query$AllUsers$users$allUsers { - CopyWith$Query$AllUsers$users$allUsers - get copyWith => CopyWith$Query$AllUsers$users$allUsers(this, (i) => i); -} - -abstract class CopyWith$Query$AllUsers$users$allUsers { - factory CopyWith$Query$AllUsers$users$allUsers( - Query$AllUsers$users$allUsers instance, - TRes Function(Query$AllUsers$users$allUsers) then) = - _CopyWithImpl$Query$AllUsers$users$allUsers; - - factory CopyWith$Query$AllUsers$users$allUsers.stub(TRes res) = - _CopyWithStubImpl$Query$AllUsers$users$allUsers; - - TRes call( - {Enum$UserType? userType, - String? username, - List? sshKeys, - String? $__typename}); -} - -class _CopyWithImpl$Query$AllUsers$users$allUsers - implements CopyWith$Query$AllUsers$users$allUsers { - _CopyWithImpl$Query$AllUsers$users$allUsers(this._instance, this._then); - - final Query$AllUsers$users$allUsers _instance; - - final TRes Function(Query$AllUsers$users$allUsers) _then; - - static const _undefined = {}; - - TRes call( - {Object? userType = _undefined, - Object? username = _undefined, - Object? sshKeys = _undefined, - Object? $__typename = _undefined}) => - _then(Query$AllUsers$users$allUsers( - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - username: username == _undefined || username == null - ? _instance.username - : (username as String), - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$AllUsers$users$allUsers - implements CopyWith$Query$AllUsers$users$allUsers { - _CopyWithStubImpl$Query$AllUsers$users$allUsers(this._res); - - TRes _res; - - call( - {Enum$UserType? userType, - String? username, - List? sshKeys, - String? $__typename}) => - _res; -} - -@JsonSerializable(explicitToJson: true) -class Variables$Mutation$AddSshKey { - Variables$Mutation$AddSshKey({required this.sshInput}); - - @override - factory Variables$Mutation$AddSshKey.fromJson(Map json) => - _$Variables$Mutation$AddSshKeyFromJson(json); - - final Input$SshMutationInput sshInput; - - Map toJson() => _$Variables$Mutation$AddSshKeyToJson(this); - int get hashCode { - final l$sshInput = sshInput; - return Object.hashAll([l$sshInput]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AddSshKey) || - runtimeType != other.runtimeType) return false; - final l$sshInput = sshInput; - final lOther$sshInput = other.sshInput; - if (l$sshInput != lOther$sshInput) return false; - return true; - } - - CopyWith$Variables$Mutation$AddSshKey - get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$AddSshKey { - factory CopyWith$Variables$Mutation$AddSshKey( - Variables$Mutation$AddSshKey instance, - TRes Function(Variables$Mutation$AddSshKey) then) = - _CopyWithImpl$Variables$Mutation$AddSshKey; - - factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$AddSshKey; - - TRes call({Input$SshMutationInput? sshInput}); -} - -class _CopyWithImpl$Variables$Mutation$AddSshKey - implements CopyWith$Variables$Mutation$AddSshKey { - _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); - - final Variables$Mutation$AddSshKey _instance; - - final TRes Function(Variables$Mutation$AddSshKey) _then; - - static const _undefined = {}; - - TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$AddSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); -} - -class _CopyWithStubImpl$Variables$Mutation$AddSshKey - implements CopyWith$Variables$Mutation$AddSshKey { - _CopyWithStubImpl$Variables$Mutation$AddSshKey(this._res); - - TRes _res; - - call({Input$SshMutationInput? sshInput}) => _res; -} - -@JsonSerializable(explicitToJson: true) -class Mutation$AddSshKey { - Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); - - @override - factory Mutation$AddSshKey.fromJson(Map json) => - _$Mutation$AddSshKeyFromJson(json); - - final Mutation$AddSshKey$addSshKey addSshKey; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Mutation$AddSshKeyToJson(this); - int get hashCode { - final l$addSshKey = addSshKey; - final l$$__typename = $__typename; - return Object.hashAll([l$addSshKey, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) - return false; - final l$addSshKey = addSshKey; - final lOther$addSshKey = other.addSshKey; - if (l$addSshKey != lOther$addSshKey) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { - CopyWith$Mutation$AddSshKey get copyWith => - CopyWith$Mutation$AddSshKey(this, (i) => i); -} - -abstract class CopyWith$Mutation$AddSshKey { - factory CopyWith$Mutation$AddSshKey( - Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = - _CopyWithImpl$Mutation$AddSshKey; - - factory CopyWith$Mutation$AddSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$AddSshKey; - - TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; -} - -class _CopyWithImpl$Mutation$AddSshKey - implements CopyWith$Mutation$AddSshKey { - _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); - - final Mutation$AddSshKey _instance; - - final TRes Function(Mutation$AddSshKey) _then; - - static const _undefined = {}; - - TRes call( - {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => - _then(Mutation$AddSshKey( - addSshKey: addSshKey == _undefined || addSshKey == null - ? _instance.addSshKey - : (addSshKey as Mutation$AddSshKey$addSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { - final local$addSshKey = _instance.addSshKey; - return CopyWith$Mutation$AddSshKey$addSshKey( - local$addSshKey, (e) => call(addSshKey: e)); - } -} - -class _CopyWithStubImpl$Mutation$AddSshKey - implements CopyWith$Mutation$AddSshKey { - _CopyWithStubImpl$Mutation$AddSshKey(this._res); - - TRes _res; - - call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => - CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); -} - -const documentNodeMutationAddSshKey = DocumentNode(definitions: [ - OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'AddSshKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'addSshKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - fragmentDefinitionbasicMutationReturnFields, -]); -Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => - Mutation$AddSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( - dynamic, Mutation$AddSshKey?); - -class Options$Mutation$AddSshKey - extends graphql.MutationOptions { - Options$Mutation$AddSshKey( - {String? operationName, - required Variables$Mutation$AddSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$AddSshKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, - super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$AddSshKey(data)), - update: update, - onError: onError, - document: documentNodeMutationAddSshKey, - parserFn: _parserFn$Mutation$AddSshKey); - - final OnMutationCompleted$Mutation$AddSshKey? onCompletedWithParsed; - - @override - List get properties => [ - ...super.onCompleted == null - ? super.properties - : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed - ]; -} - -class WatchOptions$Mutation$AddSshKey - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$AddSshKey( - {String? operationName, - required Variables$Mutation$AddSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationAddSshKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$AddSshKey); -} - -extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { - Future> mutate$AddSshKey( - Options$Mutation$AddSshKey options) async => - await this.mutate(options); - graphql.ObservableQuery watchMutation$AddSshKey( - WatchOptions$Mutation$AddSshKey options) => - this.watchMutation(options); -} - -@JsonSerializable(explicitToJson: true) -class Mutation$AddSshKey$addSshKey - implements Fragment$basicMutationReturnFields { - Mutation$AddSshKey$addSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); - - @override - factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => - _$Mutation$AddSshKey$addSshKeyFromJson(json); - - final int code; - - final String message; - - final bool success; - - @JsonKey(name: '__typename') - final String $__typename; - - final Mutation$AddSshKey$addSshKey$user? user; - - Map toJson() => _$Mutation$AddSshKey$addSshKeyToJson(this); - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey$addSshKey) || - runtimeType != other.runtimeType) return false; - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) return false; - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) return false; - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - final l$user = user; - final lOther$user = other.user; - if (l$user != lOther$user) return false; - return true; - } -} - -extension UtilityExtension$Mutation$AddSshKey$addSshKey - on Mutation$AddSshKey$addSshKey { - CopyWith$Mutation$AddSshKey$addSshKey - get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); -} - -abstract class CopyWith$Mutation$AddSshKey$addSshKey { - factory CopyWith$Mutation$AddSshKey$addSshKey( - Mutation$AddSshKey$addSshKey instance, - TRes Function(Mutation$AddSshKey$addSshKey) then) = - _CopyWithImpl$Mutation$AddSshKey$addSshKey; - - factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; - - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$AddSshKey$addSshKey$user? user}); - CopyWith$Mutation$AddSshKey$addSshKey$user get user; -} - -class _CopyWithImpl$Mutation$AddSshKey$addSshKey - implements CopyWith$Mutation$AddSshKey$addSshKey { - _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); - - final Mutation$AddSshKey$addSshKey _instance; - - final TRes Function(Mutation$AddSshKey$addSshKey) _then; - - static const _undefined = {}; - - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => - _then(Mutation$AddSshKey$addSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Mutation$AddSshKey$addSshKey$user?))); - CopyWith$Mutation$AddSshKey$addSshKey$user get user { - final local$user = _instance.user; - return local$user == null - ? CopyWith$Mutation$AddSshKey$addSshKey$user.stub(_then(_instance)) - : CopyWith$Mutation$AddSshKey$addSshKey$user( - local$user, (e) => call(user: e)); - } -} - -class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey - implements CopyWith$Mutation$AddSshKey$addSshKey { - _CopyWithStubImpl$Mutation$AddSshKey$addSshKey(this._res); - - TRes _res; - - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$AddSshKey$addSshKey$user? user}) => - _res; - CopyWith$Mutation$AddSshKey$addSshKey$user get user => - CopyWith$Mutation$AddSshKey$addSshKey$user.stub(_res); -} - -@JsonSerializable(explicitToJson: true) -class Mutation$AddSshKey$addSshKey$user { - Mutation$AddSshKey$addSshKey$user( - {required this.sshKeys, - required this.userType, - required this.username, - required this.$__typename}); - - @override - factory Mutation$AddSshKey$addSshKey$user.fromJson( - Map json) => - _$Mutation$AddSshKey$addSshKey$userFromJson(json); - - final List sshKeys; - - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) - final Enum$UserType userType; - - final String username; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Mutation$AddSshKey$addSshKey$userToJson(this); - int get hashCode { - final l$sshKeys = sshKeys; - final l$userType = userType; - final l$username = username; - final l$$__typename = $__typename; - return Object.hashAll([ - Object.hashAll(l$sshKeys.map((v) => v)), - l$userType, - l$username, - l$$__typename - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey$addSshKey$user) || - runtimeType != other.runtimeType) return false; - final l$sshKeys = sshKeys; - final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; - for (int i = 0; i < l$sshKeys.length; i++) { - final l$sshKeys$entry = l$sshKeys[i]; - final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; - } - - final l$userType = userType; - final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Mutation$AddSshKey$addSshKey$user - on Mutation$AddSshKey$addSshKey$user { - CopyWith$Mutation$AddSshKey$addSshKey$user - get copyWith => - CopyWith$Mutation$AddSshKey$addSshKey$user(this, (i) => i); -} - -abstract class CopyWith$Mutation$AddSshKey$addSshKey$user { - factory CopyWith$Mutation$AddSshKey$addSshKey$user( - Mutation$AddSshKey$addSshKey$user instance, - TRes Function(Mutation$AddSshKey$addSshKey$user) then) = - _CopyWithImpl$Mutation$AddSshKey$addSshKey$user; - - factory CopyWith$Mutation$AddSshKey$addSshKey$user.stub(TRes res) = - _CopyWithStubImpl$Mutation$AddSshKey$addSshKey$user; - - TRes call( - {List? sshKeys, - Enum$UserType? userType, - String? username, - String? $__typename}); -} - -class _CopyWithImpl$Mutation$AddSshKey$addSshKey$user - implements CopyWith$Mutation$AddSshKey$addSshKey$user { - _CopyWithImpl$Mutation$AddSshKey$addSshKey$user(this._instance, this._then); - - final Mutation$AddSshKey$addSshKey$user _instance; - - final TRes Function(Mutation$AddSshKey$addSshKey$user) _then; - - static const _undefined = {}; - - TRes call( - {Object? sshKeys = _undefined, - Object? userType = _undefined, - Object? username = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$AddSshKey$addSshKey$user( - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - username: username == _undefined || username == null - ? _instance.username - : (username as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey$user - implements CopyWith$Mutation$AddSshKey$addSshKey$user { - _CopyWithStubImpl$Mutation$AddSshKey$addSshKey$user(this._res); - - TRes _res; - - call( - {List? sshKeys, - Enum$UserType? userType, - String? username, - String? $__typename}) => - _res; -} - -@JsonSerializable(explicitToJson: true) -class Variables$Query$GetUser { - Variables$Query$GetUser({required this.username}); - - @override - factory Variables$Query$GetUser.fromJson(Map json) => - _$Variables$Query$GetUserFromJson(json); - - final String username; - - Map toJson() => _$Variables$Query$GetUserToJson(this); - int get hashCode { - final l$username = username; - return Object.hashAll([l$username]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) - return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - return true; - } - - CopyWith$Variables$Query$GetUser get copyWith => - CopyWith$Variables$Query$GetUser(this, (i) => i); -} - -abstract class CopyWith$Variables$Query$GetUser { - factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, - TRes Function(Variables$Query$GetUser) then) = - _CopyWithImpl$Variables$Query$GetUser; - - factory CopyWith$Variables$Query$GetUser.stub(TRes res) = - _CopyWithStubImpl$Variables$Query$GetUser; - - TRes call({String? username}); -} - -class _CopyWithImpl$Variables$Query$GetUser - implements CopyWith$Variables$Query$GetUser { - _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); - - final Variables$Query$GetUser _instance; - - final TRes Function(Variables$Query$GetUser) _then; - - static const _undefined = {}; - - TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( - username: username == _undefined || username == null - ? _instance.username - : (username as String))); -} - -class _CopyWithStubImpl$Variables$Query$GetUser - implements CopyWith$Variables$Query$GetUser { - _CopyWithStubImpl$Variables$Query$GetUser(this._res); - - TRes _res; - - call({String? username}) => _res; -} - -@JsonSerializable(explicitToJson: true) -class Query$GetUser { - Query$GetUser({required this.users, required this.$__typename}); - - @override - factory Query$GetUser.fromJson(Map json) => - _$Query$GetUserFromJson(json); - - final Query$GetUser$users users; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$GetUserToJson(this); - int get hashCode { - final l$users = users; - final l$$__typename = $__typename; - return Object.hashAll([l$users, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetUser) || runtimeType != other.runtimeType) - return false; - final l$users = users; - final lOther$users = other.users; - if (l$users != lOther$users) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetUser on Query$GetUser { - CopyWith$Query$GetUser get copyWith => - CopyWith$Query$GetUser(this, (i) => i); -} - -abstract class CopyWith$Query$GetUser { - factory CopyWith$Query$GetUser( - Query$GetUser instance, TRes Function(Query$GetUser) then) = - _CopyWithImpl$Query$GetUser; - - factory CopyWith$Query$GetUser.stub(TRes res) = - _CopyWithStubImpl$Query$GetUser; - - TRes call({Query$GetUser$users? users, String? $__typename}); - CopyWith$Query$GetUser$users get users; -} - -class _CopyWithImpl$Query$GetUser - implements CopyWith$Query$GetUser { - _CopyWithImpl$Query$GetUser(this._instance, this._then); - - final Query$GetUser _instance; - - final TRes Function(Query$GetUser) _then; - - static const _undefined = {}; - - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetUser( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$GetUser$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetUser$users get users { - final local$users = _instance.users; - return CopyWith$Query$GetUser$users(local$users, (e) => call(users: e)); - } -} - -class _CopyWithStubImpl$Query$GetUser - implements CopyWith$Query$GetUser { - _CopyWithStubImpl$Query$GetUser(this._res); - - TRes _res; - - call({Query$GetUser$users? users, String? $__typename}) => _res; - CopyWith$Query$GetUser$users get users => - CopyWith$Query$GetUser$users.stub(_res); -} - -const documentNodeQueryGetUser = DocumentNode(definitions: [ - OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'username')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'users'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'getUser'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: VariableNode(name: NameNode(value: 'username'))) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), -]); -Query$GetUser _parserFn$Query$GetUser(Map data) => - Query$GetUser.fromJson(data); - -class Options$Query$GetUser extends graphql.QueryOptions { - Options$Query$GetUser( - {String? operationName, - required Variables$Query$GetUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetUser, - parserFn: _parserFn$Query$GetUser); -} - -class WatchOptions$Query$GetUser - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetUser( - {String? operationName, - required Variables$Query$GetUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetUser); -} - -class FetchMoreOptions$Query$GetUser extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetUser( - {required graphql.UpdateQuery updateQuery, - required Variables$Query$GetUser variables}) - : super( - updateQuery: updateQuery, - variables: variables.toJson(), - document: documentNodeQueryGetUser); -} - -extension ClientExtension$Query$GetUser on graphql.GraphQLClient { - Future> query$GetUser( - Options$Query$GetUser options) async => - await this.query(options); - graphql.ObservableQuery watchQuery$GetUser( - WatchOptions$Query$GetUser options) => - this.watchQuery(options); - void writeQuery$GetUser( - {required Query$GetUser data, - required Variables$Query$GetUser variables, - bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), - data: data.toJson(), - broadcast: broadcast); - Query$GetUser? readQuery$GetUser( - {required Variables$Query$GetUser variables, bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), - optimistic: optimistic); - return result == null ? null : Query$GetUser.fromJson(result); - } -} - -@JsonSerializable(explicitToJson: true) -class Query$GetUser$users { - Query$GetUser$users({this.getUser, required this.$__typename}); - - @override - factory Query$GetUser$users.fromJson(Map json) => - _$Query$GetUser$usersFromJson(json); - - final Query$GetUser$users$getUser? getUser; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$GetUser$usersToJson(this); - int get hashCode { - final l$getUser = getUser; - final l$$__typename = $__typename; - return Object.hashAll([l$getUser, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) - return false; - final l$getUser = getUser; - final lOther$getUser = other.getUser; - if (l$getUser != lOther$getUser) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { - CopyWith$Query$GetUser$users get copyWith => - CopyWith$Query$GetUser$users(this, (i) => i); -} - -abstract class CopyWith$Query$GetUser$users { - factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, - TRes Function(Query$GetUser$users) then) = - _CopyWithImpl$Query$GetUser$users; - - factory CopyWith$Query$GetUser$users.stub(TRes res) = - _CopyWithStubImpl$Query$GetUser$users; - - TRes call({Query$GetUser$users$getUser? getUser, String? $__typename}); - CopyWith$Query$GetUser$users$getUser get getUser; -} - -class _CopyWithImpl$Query$GetUser$users - implements CopyWith$Query$GetUser$users { - _CopyWithImpl$Query$GetUser$users(this._instance, this._then); - - final Query$GetUser$users _instance; - - final TRes Function(Query$GetUser$users) _then; - - static const _undefined = {}; - - TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetUser$users( - getUser: getUser == _undefined - ? _instance.getUser - : (getUser as Query$GetUser$users$getUser?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetUser$users$getUser get getUser { - final local$getUser = _instance.getUser; - return local$getUser == null - ? CopyWith$Query$GetUser$users$getUser.stub(_then(_instance)) - : CopyWith$Query$GetUser$users$getUser( - local$getUser, (e) => call(getUser: e)); - } -} - -class _CopyWithStubImpl$Query$GetUser$users - implements CopyWith$Query$GetUser$users { - _CopyWithStubImpl$Query$GetUser$users(this._res); - - TRes _res; - - call({Query$GetUser$users$getUser? getUser, String? $__typename}) => _res; - CopyWith$Query$GetUser$users$getUser get getUser => - CopyWith$Query$GetUser$users$getUser.stub(_res); -} - -@JsonSerializable(explicitToJson: true) -class Query$GetUser$users$getUser { - Query$GetUser$users$getUser( - {required this.sshKeys, - required this.userType, - required this.username, - required this.$__typename}); - - @override - factory Query$GetUser$users$getUser.fromJson(Map json) => - _$Query$GetUser$users$getUserFromJson(json); - - final List sshKeys; - - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) - final Enum$UserType userType; - - final String username; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Query$GetUser$users$getUserToJson(this); - int get hashCode { - final l$sshKeys = sshKeys; - final l$userType = userType; - final l$username = username; - final l$$__typename = $__typename; - return Object.hashAll([ - Object.hashAll(l$sshKeys.map((v) => v)), - l$userType, - l$username, - l$$__typename - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetUser$users$getUser) || - runtimeType != other.runtimeType) return false; - final l$sshKeys = sshKeys; - final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; - for (int i = 0; i < l$sshKeys.length; i++) { - final l$sshKeys$entry = l$sshKeys[i]; - final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; - } - - final l$userType = userType; - final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$GetUser$users$getUser - on Query$GetUser$users$getUser { - CopyWith$Query$GetUser$users$getUser - get copyWith => CopyWith$Query$GetUser$users$getUser(this, (i) => i); -} - -abstract class CopyWith$Query$GetUser$users$getUser { - factory CopyWith$Query$GetUser$users$getUser( - Query$GetUser$users$getUser instance, - TRes Function(Query$GetUser$users$getUser) then) = - _CopyWithImpl$Query$GetUser$users$getUser; - - factory CopyWith$Query$GetUser$users$getUser.stub(TRes res) = - _CopyWithStubImpl$Query$GetUser$users$getUser; - - TRes call( - {List? sshKeys, - Enum$UserType? userType, - String? username, - String? $__typename}); -} - -class _CopyWithImpl$Query$GetUser$users$getUser - implements CopyWith$Query$GetUser$users$getUser { - _CopyWithImpl$Query$GetUser$users$getUser(this._instance, this._then); - - final Query$GetUser$users$getUser _instance; - - final TRes Function(Query$GetUser$users$getUser) _then; - - static const _undefined = {}; - - TRes call( - {Object? sshKeys = _undefined, - Object? userType = _undefined, - Object? username = _undefined, - Object? $__typename = _undefined}) => - _then(Query$GetUser$users$getUser( - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - username: username == _undefined || username == null - ? _instance.username - : (username as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$GetUser$users$getUser - implements CopyWith$Query$GetUser$users$getUser { - _CopyWithStubImpl$Query$GetUser$users$getUser(this._res); - - TRes _res; - - call( - {List? sshKeys, - Enum$UserType? userType, - String? username, - String? $__typename}) => - _res; -} - -@JsonSerializable(explicitToJson: true) -class Variables$Mutation$RemoveSshKey { - Variables$Mutation$RemoveSshKey({required this.sshInput}); - - @override - factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => - _$Variables$Mutation$RemoveSshKeyFromJson(json); - - final Input$SshMutationInput sshInput; - - Map toJson() => - _$Variables$Mutation$RemoveSshKeyToJson(this); - int get hashCode { - final l$sshInput = sshInput; - return Object.hashAll([l$sshInput]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveSshKey) || - runtimeType != other.runtimeType) return false; - final l$sshInput = sshInput; - final lOther$sshInput = other.sshInput; - if (l$sshInput != lOther$sshInput) return false; - return true; - } - - CopyWith$Variables$Mutation$RemoveSshKey - get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$RemoveSshKey { - factory CopyWith$Variables$Mutation$RemoveSshKey( - Variables$Mutation$RemoveSshKey instance, - TRes Function(Variables$Mutation$RemoveSshKey) then) = - _CopyWithImpl$Variables$Mutation$RemoveSshKey; - - factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; - - TRes call({Input$SshMutationInput? sshInput}); -} - -class _CopyWithImpl$Variables$Mutation$RemoveSshKey - implements CopyWith$Variables$Mutation$RemoveSshKey { - _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); - - final Variables$Mutation$RemoveSshKey _instance; - - final TRes Function(Variables$Mutation$RemoveSshKey) _then; - - static const _undefined = {}; - - TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$RemoveSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); -} - -class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey - implements CopyWith$Variables$Mutation$RemoveSshKey { - _CopyWithStubImpl$Variables$Mutation$RemoveSshKey(this._res); - - TRes _res; - - call({Input$SshMutationInput? sshInput}) => _res; -} - -@JsonSerializable(explicitToJson: true) -class Mutation$RemoveSshKey { - Mutation$RemoveSshKey( - {required this.removeSshKey, required this.$__typename}); - - @override - factory Mutation$RemoveSshKey.fromJson(Map json) => - _$Mutation$RemoveSshKeyFromJson(json); - - final Mutation$RemoveSshKey$removeSshKey removeSshKey; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => _$Mutation$RemoveSshKeyToJson(this); - int get hashCode { - final l$removeSshKey = removeSshKey; - final l$$__typename = $__typename; - return Object.hashAll([l$removeSshKey, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) - return false; - final l$removeSshKey = removeSshKey; - final lOther$removeSshKey = other.removeSshKey; - if (l$removeSshKey != lOther$removeSshKey) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { - CopyWith$Mutation$RemoveSshKey get copyWith => - CopyWith$Mutation$RemoveSshKey(this, (i) => i); -} - -abstract class CopyWith$Mutation$RemoveSshKey { - factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, - TRes Function(Mutation$RemoveSshKey) then) = - _CopyWithImpl$Mutation$RemoveSshKey; - - factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$RemoveSshKey; - - TRes call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; -} - -class _CopyWithImpl$Mutation$RemoveSshKey - implements CopyWith$Mutation$RemoveSshKey { - _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); - - final Mutation$RemoveSshKey _instance; - - final TRes Function(Mutation$RemoveSshKey) _then; - - static const _undefined = {}; - - TRes call( - {Object? removeSshKey = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$RemoveSshKey( - removeSshKey: removeSshKey == _undefined || removeSshKey == null - ? _instance.removeSshKey - : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { - final local$removeSshKey = _instance.removeSshKey; - return CopyWith$Mutation$RemoveSshKey$removeSshKey( - local$removeSshKey, (e) => call(removeSshKey: e)); - } -} - -class _CopyWithStubImpl$Mutation$RemoveSshKey - implements CopyWith$Mutation$RemoveSshKey { - _CopyWithStubImpl$Mutation$RemoveSshKey(this._res); - - TRes _res; - - call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, - String? $__typename}) => - _res; - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => - CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); -} - -const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ - OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RemoveSshKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'removeSshKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - fragmentDefinitionbasicMutationReturnFields, -]); -Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( - Map data) => - Mutation$RemoveSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( - dynamic, Mutation$RemoveSshKey?); - -class Options$Mutation$RemoveSshKey - extends graphql.MutationOptions { - Options$Mutation$RemoveSshKey( - {String? operationName, - required Variables$Mutation$RemoveSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, - super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( - data, - data == null - ? null - : _parserFn$Mutation$RemoveSshKey(data)), - update: update, - onError: onError, - document: documentNodeMutationRemoveSshKey, - parserFn: _parserFn$Mutation$RemoveSshKey); - - final OnMutationCompleted$Mutation$RemoveSshKey? onCompletedWithParsed; - - @override - List get properties => [ - ...super.onCompleted == null - ? super.properties - : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed - ]; -} - -class WatchOptions$Mutation$RemoveSshKey - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RemoveSshKey( - {String? operationName, - required Variables$Mutation$RemoveSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRemoveSshKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RemoveSshKey); -} - -extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { - Future> mutate$RemoveSshKey( - Options$Mutation$RemoveSshKey options) async => - await this.mutate(options); - graphql.ObservableQuery watchMutation$RemoveSshKey( - WatchOptions$Mutation$RemoveSshKey options) => - this.watchMutation(options); -} - -@JsonSerializable(explicitToJson: true) -class Mutation$RemoveSshKey$removeSshKey - implements Fragment$basicMutationReturnFields { - Mutation$RemoveSshKey$removeSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); - - @override - factory Mutation$RemoveSshKey$removeSshKey.fromJson( - Map json) => - _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); - - final int code; - - final String message; - - final bool success; - - @JsonKey(name: '__typename') - final String $__typename; - - final Mutation$RemoveSshKey$removeSshKey$user? user; - - Map toJson() => - _$Mutation$RemoveSshKey$removeSshKeyToJson(this); - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey$removeSshKey) || - runtimeType != other.runtimeType) return false; - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) return false; - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) return false; - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - final l$user = user; - final lOther$user = other.user; - if (l$user != lOther$user) return false; - return true; - } -} - -extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey - on Mutation$RemoveSshKey$removeSshKey { - CopyWith$Mutation$RemoveSshKey$removeSshKey< - Mutation$RemoveSshKey$removeSshKey> - get copyWith => - CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); -} - -abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { - factory CopyWith$Mutation$RemoveSshKey$removeSshKey( - Mutation$RemoveSshKey$removeSshKey instance, - TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; - - factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; - - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$RemoveSshKey$removeSshKey$user? user}); - CopyWith$Mutation$RemoveSshKey$removeSshKey$user get user; -} - -class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey - implements CopyWith$Mutation$RemoveSshKey$removeSshKey { - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); - - final Mutation$RemoveSshKey$removeSshKey _instance; - - final TRes Function(Mutation$RemoveSshKey$removeSshKey) _then; - - static const _undefined = {}; - - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => - _then(Mutation$RemoveSshKey$removeSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Mutation$RemoveSshKey$removeSshKey$user?))); - CopyWith$Mutation$RemoveSshKey$removeSshKey$user get user { - final local$user = _instance.user; - return local$user == null - ? CopyWith$Mutation$RemoveSshKey$removeSshKey$user.stub( - _then(_instance)) - : CopyWith$Mutation$RemoveSshKey$removeSshKey$user( - local$user, (e) => call(user: e)); - } -} - -class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey - implements CopyWith$Mutation$RemoveSshKey$removeSshKey { - _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey(this._res); - - TRes _res; - - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$RemoveSshKey$removeSshKey$user? user}) => - _res; - CopyWith$Mutation$RemoveSshKey$removeSshKey$user get user => - CopyWith$Mutation$RemoveSshKey$removeSshKey$user.stub(_res); -} - -@JsonSerializable(explicitToJson: true) -class Mutation$RemoveSshKey$removeSshKey$user { - Mutation$RemoveSshKey$removeSshKey$user( - {required this.sshKeys, - required this.userType, - required this.username, - required this.$__typename}); - - @override - factory Mutation$RemoveSshKey$removeSshKey$user.fromJson( - Map json) => - _$Mutation$RemoveSshKey$removeSshKey$userFromJson(json); - - final List sshKeys; - - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) - final Enum$UserType userType; - - final String username; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Mutation$RemoveSshKey$removeSshKey$userToJson(this); - int get hashCode { - final l$sshKeys = sshKeys; - final l$userType = userType; - final l$username = username; - final l$$__typename = $__typename; - return Object.hashAll([ - Object.hashAll(l$sshKeys.map((v) => v)), - l$userType, - l$username, - l$$__typename - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey$removeSshKey$user) || - runtimeType != other.runtimeType) return false; - final l$sshKeys = sshKeys; - final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; - for (int i = 0; i < l$sshKeys.length; i++) { - final l$sshKeys$entry = l$sshKeys[i]; - final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; - } - - final l$userType = userType; - final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey$user - on Mutation$RemoveSshKey$removeSshKey$user { - CopyWith$Mutation$RemoveSshKey$removeSshKey$user< - Mutation$RemoveSshKey$removeSshKey$user> - get copyWith => - CopyWith$Mutation$RemoveSshKey$removeSshKey$user(this, (i) => i); -} - -abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey$user { - factory CopyWith$Mutation$RemoveSshKey$removeSshKey$user( - Mutation$RemoveSshKey$removeSshKey$user instance, - TRes Function(Mutation$RemoveSshKey$removeSshKey$user) then) = - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey$user; - - factory CopyWith$Mutation$RemoveSshKey$removeSshKey$user.stub(TRes res) = - _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey$user; - - TRes call( - {List? sshKeys, - Enum$UserType? userType, - String? username, - String? $__typename}); -} - -class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey$user - implements CopyWith$Mutation$RemoveSshKey$removeSshKey$user { - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey$user( - this._instance, this._then); - - final Mutation$RemoveSshKey$removeSshKey$user _instance; - - final TRes Function(Mutation$RemoveSshKey$removeSshKey$user) _then; - - static const _undefined = {}; - - TRes call( - {Object? sshKeys = _undefined, - Object? userType = _undefined, - Object? username = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$RemoveSshKey$removeSshKey$user( - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - username: username == _undefined || username == null - ? _instance.username - : (username as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey$user - implements CopyWith$Mutation$RemoveSshKey$removeSshKey$user { - _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey$user(this._res); - - TRes _res; - - call( - {List? sshKeys, - Enum$UserType? userType, - String? username, - String? $__typename}) => + Fragment$userFields? user}) => _res; + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -3573,24 +2114,8 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -3613,6 +2138,7 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionuserFields, ]); Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); @@ -3723,7 +2249,7 @@ class Mutation$UpdateUser$updateUser @JsonKey(name: '__typename') final String $__typename; - final Mutation$UpdateUser$updateUser$user? user; + final Fragment$userFields? user; Map toJson() => _$Mutation$UpdateUser$updateUserToJson(this); int get hashCode { @@ -3780,8 +2306,8 @@ abstract class CopyWith$Mutation$UpdateUser$updateUser { String? message, bool? success, String? $__typename, - Mutation$UpdateUser$updateUser$user? user}); - CopyWith$Mutation$UpdateUser$updateUser$user get user; + Fragment$userFields? user}); + CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$UpdateUser$updateUser @@ -3815,13 +2341,12 @@ class _CopyWithImpl$Mutation$UpdateUser$updateUser : ($__typename as String), user: user == _undefined ? _instance.user - : (user as Mutation$UpdateUser$updateUser$user?))); - CopyWith$Mutation$UpdateUser$updateUser$user get user { + : (user as Fragment$userFields?))); + CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null - ? CopyWith$Mutation$UpdateUser$updateUser$user.stub(_then(_instance)) - : CopyWith$Mutation$UpdateUser$updateUser$user( - local$user, (e) => call(user: e)); + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } @@ -3836,70 +2361,109 @@ class _CopyWithStubImpl$Mutation$UpdateUser$updateUser String? message, bool? success, String? $__typename, - Mutation$UpdateUser$updateUser$user? user}) => + Fragment$userFields? user}) => _res; - CopyWith$Mutation$UpdateUser$updateUser$user get user => - CopyWith$Mutation$UpdateUser$updateUser$user.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) -class Mutation$UpdateUser$updateUser$user { - Mutation$UpdateUser$updateUser$user( - {required this.sshKeys, - required this.userType, - required this.username, - required this.$__typename}); +class Variables$Mutation$AddSshKey { + Variables$Mutation$AddSshKey({required this.sshInput}); @override - factory Mutation$UpdateUser$updateUser$user.fromJson( - Map json) => - _$Mutation$UpdateUser$updateUser$userFromJson(json); + factory Variables$Mutation$AddSshKey.fromJson(Map json) => + _$Variables$Mutation$AddSshKeyFromJson(json); - final List sshKeys; + final Input$SshMutationInput sshInput; - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) - final Enum$UserType userType; - - final String username; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Mutation$UpdateUser$updateUser$userToJson(this); + Map toJson() => _$Variables$Mutation$AddSshKeyToJson(this); int get hashCode { - final l$sshKeys = sshKeys; - final l$userType = userType; - final l$username = username; - final l$$__typename = $__typename; - return Object.hashAll([ - Object.hashAll(l$sshKeys.map((v) => v)), - l$userType, - l$username, - l$$__typename - ]); + final l$sshInput = sshInput; + return Object.hashAll([l$sshInput]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser$updateUser$user) || + if (!(other is Variables$Mutation$AddSshKey) || runtimeType != other.runtimeType) return false; - final l$sshKeys = sshKeys; - final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; - for (int i = 0; i < l$sshKeys.length; i++) { - final l$sshKeys$entry = l$sshKeys[i]; - final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; - } + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) return false; + return true; + } - final l$userType = userType; - final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; + CopyWith$Variables$Mutation$AddSshKey + get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$AddSshKey { + factory CopyWith$Variables$Mutation$AddSshKey( + Variables$Mutation$AddSshKey instance, + TRes Function(Variables$Mutation$AddSshKey) then) = + _CopyWithImpl$Variables$Mutation$AddSshKey; + + factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$AddSshKey; + + TRes call({Input$SshMutationInput? sshInput}); +} + +class _CopyWithImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { + _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); + + final Variables$Mutation$AddSshKey _instance; + + final TRes Function(Variables$Mutation$AddSshKey) _then; + + static const _undefined = {}; + + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$AddSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { + _CopyWithStubImpl$Variables$Mutation$AddSshKey(this._res); + + TRes _res; + + call({Input$SshMutationInput? sshInput}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AddSshKey { + Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); + + @override + factory Mutation$AddSshKey.fromJson(Map json) => + _$Mutation$AddSshKeyFromJson(json); + + final Mutation$AddSshKey$addSshKey addSshKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$AddSshKeyToJson(this); + int get hashCode { + final l$addSshKey = addSshKey; + final l$$__typename = $__typename; + return Object.hashAll([l$addSshKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) + return false; + final l$addSshKey = addSshKey; + final lOther$addSshKey = other.addSshKey; + if (l$addSshKey != lOther$addSshKey) return false; final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) return false; @@ -3907,70 +2471,801 @@ class Mutation$UpdateUser$updateUser$user { } } -extension UtilityExtension$Mutation$UpdateUser$updateUser$user - on Mutation$UpdateUser$updateUser$user { - CopyWith$Mutation$UpdateUser$updateUser$user< - Mutation$UpdateUser$updateUser$user> - get copyWith => - CopyWith$Mutation$UpdateUser$updateUser$user(this, (i) => i); +extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { + CopyWith$Mutation$AddSshKey get copyWith => + CopyWith$Mutation$AddSshKey(this, (i) => i); } -abstract class CopyWith$Mutation$UpdateUser$updateUser$user { - factory CopyWith$Mutation$UpdateUser$updateUser$user( - Mutation$UpdateUser$updateUser$user instance, - TRes Function(Mutation$UpdateUser$updateUser$user) then) = - _CopyWithImpl$Mutation$UpdateUser$updateUser$user; +abstract class CopyWith$Mutation$AddSshKey { + factory CopyWith$Mutation$AddSshKey( + Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = + _CopyWithImpl$Mutation$AddSshKey; - factory CopyWith$Mutation$UpdateUser$updateUser$user.stub(TRes res) = - _CopyWithStubImpl$Mutation$UpdateUser$updateUser$user; + factory CopyWith$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey; - TRes call( - {List? sshKeys, - Enum$UserType? userType, - String? username, - String? $__typename}); + TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; } -class _CopyWithImpl$Mutation$UpdateUser$updateUser$user - implements CopyWith$Mutation$UpdateUser$updateUser$user { - _CopyWithImpl$Mutation$UpdateUser$updateUser$user(this._instance, this._then); +class _CopyWithImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { + _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); - final Mutation$UpdateUser$updateUser$user _instance; + final Mutation$AddSshKey _instance; - final TRes Function(Mutation$UpdateUser$updateUser$user) _then; + final TRes Function(Mutation$AddSshKey) _then; static const _undefined = {}; TRes call( - {Object? sshKeys = _undefined, - Object? userType = _undefined, - Object? username = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$UpdateUser$updateUser$user( - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - username: username == _undefined || username == null - ? _instance.username - : (username as String), + {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => + _then(Mutation$AddSshKey( + addSshKey: addSshKey == _undefined || addSshKey == null + ? _instance.addSshKey + : (addSshKey as Mutation$AddSshKey$addSshKey), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { + final local$addSshKey = _instance.addSshKey; + return CopyWith$Mutation$AddSshKey$addSshKey( + local$addSshKey, (e) => call(addSshKey: e)); + } } -class _CopyWithStubImpl$Mutation$UpdateUser$updateUser$user - implements CopyWith$Mutation$UpdateUser$updateUser$user { - _CopyWithStubImpl$Mutation$UpdateUser$updateUser$user(this._res); +class _CopyWithStubImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { + _CopyWithStubImpl$Mutation$AddSshKey(this._res); + + TRes _res; + + call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => + CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); +} + +const documentNodeMutationAddSshKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'AddSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'addSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionuserFields, +]); +Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => + Mutation$AddSshKey.fromJson(data); +typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( + dynamic, Mutation$AddSshKey?); + +class Options$Mutation$AddSshKey + extends graphql.MutationOptions { + Options$Mutation$AddSshKey( + {String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AddSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$AddSshKey(data)), + update: update, + onError: onError, + document: documentNodeMutationAddSshKey, + parserFn: _parserFn$Mutation$AddSshKey); + + final OnMutationCompleted$Mutation$AddSshKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$AddSshKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$AddSshKey( + {String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAddSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AddSshKey); +} + +extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { + Future> mutate$AddSshKey( + Options$Mutation$AddSshKey options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$AddSshKey( + WatchOptions$Mutation$AddSshKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AddSshKey$addSshKey + implements Fragment$basicMutationReturnFields { + Mutation$AddSshKey$addSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); + + @override + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => + _$Mutation$AddSshKey$addSshKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Fragment$userFields? user; + + Map toJson() => _$Mutation$AddSshKey$addSshKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$user = user; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AddSshKey$addSshKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AddSshKey$addSshKey + on Mutation$AddSshKey$addSshKey { + CopyWith$Mutation$AddSshKey$addSshKey + get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$AddSshKey$addSshKey { + factory CopyWith$Mutation$AddSshKey$addSshKey( + Mutation$AddSshKey$addSshKey instance, + TRes Function(Mutation$AddSshKey$addSshKey) then) = + _CopyWithImpl$Mutation$AddSshKey$addSshKey; + + factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); + CopyWith$Fragment$userFields get user; +} + +class _CopyWithImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { + _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); + + final Mutation$AddSshKey$addSshKey _instance; + + final TRes Function(Mutation$AddSshKey$addSshKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined}) => + _then(Mutation$AddSshKey$addSshKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); + CopyWith$Fragment$userFields get user { + final local$user = _instance.user; + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + } +} + +class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey(this._res); TRes _res; call( - {List? sshKeys, - Enum$UserType? userType, - String? username, + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$RemoveSshKey { + Variables$Mutation$RemoveSshKey({required this.sshInput}); + + @override + factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => + _$Variables$Mutation$RemoveSshKeyFromJson(json); + + final Input$SshMutationInput sshInput; + + Map toJson() => + _$Variables$Mutation$RemoveSshKeyToJson(this); + int get hashCode { + final l$sshInput = sshInput; + return Object.hashAll([l$sshInput]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$RemoveSshKey) || + runtimeType != other.runtimeType) return false; + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) return false; + return true; + } + + CopyWith$Variables$Mutation$RemoveSshKey + get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); +} + +abstract class CopyWith$Variables$Mutation$RemoveSshKey { + factory CopyWith$Variables$Mutation$RemoveSshKey( + Variables$Mutation$RemoveSshKey instance, + TRes Function(Variables$Mutation$RemoveSshKey) then) = + _CopyWithImpl$Variables$Mutation$RemoveSshKey; + + factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; + + TRes call({Input$SshMutationInput? sshInput}); +} + +class _CopyWithImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { + _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); + + final Variables$Mutation$RemoveSshKey _instance; + + final TRes Function(Variables$Mutation$RemoveSshKey) _then; + + static const _undefined = {}; + + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$RemoveSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); +} + +class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { + _CopyWithStubImpl$Variables$Mutation$RemoveSshKey(this._res); + + TRes _res; + + call({Input$SshMutationInput? sshInput}) => _res; +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveSshKey { + Mutation$RemoveSshKey( + {required this.removeSshKey, required this.$__typename}); + + @override + factory Mutation$RemoveSshKey.fromJson(Map json) => + _$Mutation$RemoveSshKeyFromJson(json); + + final Mutation$RemoveSshKey$removeSshKey removeSshKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RemoveSshKeyToJson(this); + int get hashCode { + final l$removeSshKey = removeSshKey; + final l$$__typename = $__typename; + return Object.hashAll([l$removeSshKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) + return false; + final l$removeSshKey = removeSshKey; + final lOther$removeSshKey = other.removeSshKey; + if (l$removeSshKey != lOther$removeSshKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { + CopyWith$Mutation$RemoveSshKey get copyWith => + CopyWith$Mutation$RemoveSshKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$RemoveSshKey { + factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, + TRes Function(Mutation$RemoveSshKey) then) = + _CopyWithImpl$Mutation$RemoveSshKey; + + factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey; + + TRes call( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; +} + +class _CopyWithImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { + _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); + + final Mutation$RemoveSshKey _instance; + + final TRes Function(Mutation$RemoveSshKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? removeSshKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RemoveSshKey( + removeSshKey: removeSshKey == _undefined || removeSshKey == null + ? _instance.removeSshKey + : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { + final local$removeSshKey = _instance.removeSshKey; + return CopyWith$Mutation$RemoveSshKey$removeSshKey( + local$removeSshKey, (e) => call(removeSshKey: e)); + } +} + +class _CopyWithStubImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { + _CopyWithStubImpl$Mutation$RemoveSshKey(this._res); + + TRes _res; + + call( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}) => _res; + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => + CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); +} + +const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RemoveSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionuserFields, +]); +Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( + Map data) => + Mutation$RemoveSshKey.fromJson(data); +typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( + dynamic, Mutation$RemoveSshKey?); + +class Options$Mutation$RemoveSshKey + extends graphql.MutationOptions { + Options$Mutation$RemoveSshKey( + {String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RemoveSshKey(data)), + update: update, + onError: onError, + document: documentNodeMutationRemoveSshKey, + parserFn: _parserFn$Mutation$RemoveSshKey); + + final OnMutationCompleted$Mutation$RemoveSshKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RemoveSshKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RemoveSshKey( + {String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveSshKey); +} + +extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { + Future> mutate$RemoveSshKey( + Options$Mutation$RemoveSshKey options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$RemoveSshKey( + WatchOptions$Mutation$RemoveSshKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveSshKey$removeSshKey + implements Fragment$basicMutationReturnFields { + Mutation$RemoveSshKey$removeSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); + + @override + factory Mutation$RemoveSshKey$removeSshKey.fromJson( + Map json) => + _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Fragment$userFields? user; + + Map toJson() => + _$Mutation$RemoveSshKey$removeSshKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$user = user; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveSshKey$removeSshKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey + on Mutation$RemoveSshKey$removeSshKey { + CopyWith$Mutation$RemoveSshKey$removeSshKey< + Mutation$RemoveSshKey$removeSshKey> + get copyWith => + CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); +} + +abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { + factory CopyWith$Mutation$RemoveSshKey$removeSshKey( + Mutation$RemoveSshKey$removeSshKey instance, + TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; + + factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; + + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); + CopyWith$Fragment$userFields get user; +} + +class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); + + final Mutation$RemoveSshKey$removeSshKey _instance; + + final TRes Function(Mutation$RemoveSshKey$removeSshKey) _then; + + static const _undefined = {}; + + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined}) => + _then(Mutation$RemoveSshKey$removeSshKey( + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); + CopyWith$Fragment$userFields get user { + final local$user = _instance.user; + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + } +} + +class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey(this._res); + + TRes _res; + + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart index a7b81c2d..299005f1 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart @@ -24,6 +24,102 @@ Map _$Fragment$basicMutationReturnFieldsToJson( '__typename': instance.$__typename, }; +Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => + Fragment$userFields( + username: json['username'] as String, + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Fragment$userFieldsToJson( + Fragment$userFields instance) => + { + 'username': instance.username, + 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, + 'sshKeys': instance.sshKeys, + '__typename': instance.$__typename, + }; + +const _$Enum$UserTypeEnumMap = { + Enum$UserType.NORMAL: 'NORMAL', + Enum$UserType.PRIMARY: 'PRIMARY', + Enum$UserType.ROOT: 'ROOT', + Enum$UserType.$unknown: r'$unknown', +}; + +Query$AllUsers _$Query$AllUsersFromJson(Map json) => + Query$AllUsers( + users: + Query$AllUsers$users.fromJson(json['users'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllUsersToJson(Query$AllUsers instance) => + { + 'users': instance.users.toJson(), + '__typename': instance.$__typename, + }; + +Query$AllUsers$users _$Query$AllUsers$usersFromJson( + Map json) => + Query$AllUsers$users( + allUsers: (json['allUsers'] as List) + .map((e) => Fragment$userFields.fromJson(e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllUsers$usersToJson( + Query$AllUsers$users instance) => + { + 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Variables$Query$GetUser _$Variables$Query$GetUserFromJson( + Map json) => + Variables$Query$GetUser( + username: json['username'] as String, + ); + +Map _$Variables$Query$GetUserToJson( + Variables$Query$GetUser instance) => + { + 'username': instance.username, + }; + +Query$GetUser _$Query$GetUserFromJson(Map json) => + Query$GetUser( + users: + Query$GetUser$users.fromJson(json['users'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetUserToJson(Query$GetUser instance) => + { + 'users': instance.users.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => + Query$GetUser$users( + getUser: json['getUser'] == null + ? null + : Fragment$userFields.fromJson( + json['getUser'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetUser$usersToJson( + Query$GetUser$users instance) => + { + 'getUser': instance.getUser?.toJson(), + '__typename': instance.$__typename, + }; + Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson( Map json) => Variables$Mutation$CreateUser( @@ -60,8 +156,7 @@ Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson( $__typename: json['__typename'] as String, user: json['user'] == null ? null - : Mutation$CreateUser$createUser$user.fromJson( - json['user'] as Map), + : Fragment$userFields.fromJson(json['user'] as Map), ); Map _$Mutation$CreateUser$createUserToJson( @@ -74,287 +169,6 @@ Map _$Mutation$CreateUser$createUserToJson( 'user': instance.user?.toJson(), }; -Mutation$CreateUser$createUser$user - _$Mutation$CreateUser$createUser$userFromJson(Map json) => - Mutation$CreateUser$createUser$user( - username: json['username'] as String, - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - sshKeys: (json['sshKeys'] as List) - .map((e) => e as String) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$CreateUser$createUser$userToJson( - Mutation$CreateUser$createUser$user instance) => - { - 'username': instance.username, - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'sshKeys': instance.sshKeys, - '__typename': instance.$__typename, - }; - -const _$Enum$UserTypeEnumMap = { - Enum$UserType.NORMAL: 'NORMAL', - Enum$UserType.PRIMARY: 'PRIMARY', - Enum$UserType.ROOT: 'ROOT', - Enum$UserType.$unknown: r'$unknown', -}; - -Query$AllUsers _$Query$AllUsersFromJson(Map json) => - Query$AllUsers( - users: - Query$AllUsers$users.fromJson(json['users'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllUsersToJson(Query$AllUsers instance) => - { - 'users': instance.users.toJson(), - '__typename': instance.$__typename, - }; - -Query$AllUsers$users _$Query$AllUsers$usersFromJson( - Map json) => - Query$AllUsers$users( - allUsers: (json['allUsers'] as List) - .map((e) => - Query$AllUsers$users$allUsers.fromJson(e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllUsers$usersToJson( - Query$AllUsers$users instance) => - { - 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$AllUsers$users$allUsers _$Query$AllUsers$users$allUsersFromJson( - Map json) => - Query$AllUsers$users$allUsers( - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - username: json['username'] as String, - sshKeys: - (json['sshKeys'] as List).map((e) => e as String).toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllUsers$users$allUsersToJson( - Query$AllUsers$users$allUsers instance) => - { - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'username': instance.username, - 'sshKeys': instance.sshKeys, - '__typename': instance.$__typename, - }; - -Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( - Map json) => - Variables$Mutation$AddSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), - ); - -Map _$Variables$Mutation$AddSshKeyToJson( - Variables$Mutation$AddSshKey instance) => - { - 'sshInput': instance.sshInput.toJson(), - }; - -Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => - Mutation$AddSshKey( - addSshKey: Mutation$AddSshKey$addSshKey.fromJson( - json['addSshKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => - { - 'addSshKey': instance.addSshKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( - Map json) => - Mutation$AddSshKey$addSshKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Mutation$AddSshKey$addSshKey$user.fromJson( - json['user'] as Map), - ); - -Map _$Mutation$AddSshKey$addSshKeyToJson( - Mutation$AddSshKey$addSshKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Mutation$AddSshKey$addSshKey$user _$Mutation$AddSshKey$addSshKey$userFromJson( - Map json) => - Mutation$AddSshKey$addSshKey$user( - sshKeys: - (json['sshKeys'] as List).map((e) => e as String).toList(), - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - username: json['username'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$AddSshKey$addSshKey$userToJson( - Mutation$AddSshKey$addSshKey$user instance) => - { - 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'username': instance.username, - '__typename': instance.$__typename, - }; - -Variables$Query$GetUser _$Variables$Query$GetUserFromJson( - Map json) => - Variables$Query$GetUser( - username: json['username'] as String, - ); - -Map _$Variables$Query$GetUserToJson( - Variables$Query$GetUser instance) => - { - 'username': instance.username, - }; - -Query$GetUser _$Query$GetUserFromJson(Map json) => - Query$GetUser( - users: - Query$GetUser$users.fromJson(json['users'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetUserToJson(Query$GetUser instance) => - { - 'users': instance.users.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => - Query$GetUser$users( - getUser: json['getUser'] == null - ? null - : Query$GetUser$users$getUser.fromJson( - json['getUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetUser$usersToJson( - Query$GetUser$users instance) => - { - 'getUser': instance.getUser?.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetUser$users$getUser _$Query$GetUser$users$getUserFromJson( - Map json) => - Query$GetUser$users$getUser( - sshKeys: - (json['sshKeys'] as List).map((e) => e as String).toList(), - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - username: json['username'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetUser$users$getUserToJson( - Query$GetUser$users$getUser instance) => - { - 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'username': instance.username, - '__typename': instance.$__typename, - }; - -Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( - Map json) => - Variables$Mutation$RemoveSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), - ); - -Map _$Variables$Mutation$RemoveSshKeyToJson( - Variables$Mutation$RemoveSshKey instance) => - { - 'sshInput': instance.sshInput.toJson(), - }; - -Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey( - removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( - json['removeSshKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveSshKeyToJson( - Mutation$RemoveSshKey instance) => - { - 'removeSshKey': instance.removeSshKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey$removeSshKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Mutation$RemoveSshKey$removeSshKey$user.fromJson( - json['user'] as Map), - ); - -Map _$Mutation$RemoveSshKey$removeSshKeyToJson( - Mutation$RemoveSshKey$removeSshKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Mutation$RemoveSshKey$removeSshKey$user - _$Mutation$RemoveSshKey$removeSshKey$userFromJson( - Map json) => - Mutation$RemoveSshKey$removeSshKey$user( - sshKeys: (json['sshKeys'] as List) - .map((e) => e as String) - .toList(), - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - username: json['username'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveSshKey$removeSshKey$userToJson( - Mutation$RemoveSshKey$removeSshKey$user instance) => - { - 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'username': instance.username, - '__typename': instance.$__typename, - }; - Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( Map json) => Variables$Mutation$DeleteUser( @@ -435,8 +249,7 @@ Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson( $__typename: json['__typename'] as String, user: json['user'] == null ? null - : Mutation$UpdateUser$updateUser$user.fromJson( - json['user'] as Map), + : Fragment$userFields.fromJson(json['user'] as Map), ); Map _$Mutation$UpdateUser$updateUserToJson( @@ -449,23 +262,100 @@ Map _$Mutation$UpdateUser$updateUserToJson( 'user': instance.user?.toJson(), }; -Mutation$UpdateUser$updateUser$user - _$Mutation$UpdateUser$updateUser$userFromJson(Map json) => - Mutation$UpdateUser$updateUser$user( - sshKeys: (json['sshKeys'] as List) - .map((e) => e as String) - .toList(), - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - username: json['username'] as String, - $__typename: json['__typename'] as String, - ); +Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( + Map json) => + Variables$Mutation$AddSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), + ); -Map _$Mutation$UpdateUser$updateUser$userToJson( - Mutation$UpdateUser$updateUser$user instance) => +Map _$Variables$Mutation$AddSshKeyToJson( + Variables$Mutation$AddSshKey instance) => { - 'sshKeys': instance.sshKeys, - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'username': instance.username, + 'sshInput': instance.sshInput.toJson(), + }; + +Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => + Mutation$AddSshKey( + addSshKey: Mutation$AddSshKey$addSshKey.fromJson( + json['addSshKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => + { + 'addSshKey': instance.addSshKey.toJson(), '__typename': instance.$__typename, }; + +Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( + Map json) => + Mutation$AddSshKey$addSshKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), + ); + +Map _$Mutation$AddSshKey$addSshKeyToJson( + Mutation$AddSshKey$addSshKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( + Map json) => + Variables$Mutation$RemoveSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), + ); + +Map _$Variables$Mutation$RemoveSshKeyToJson( + Variables$Mutation$RemoveSshKey instance) => + { + 'sshInput': instance.sshInput.toJson(), + }; + +Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey( + removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( + json['removeSshKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveSshKeyToJson( + Mutation$RemoveSshKey instance) => + { + 'removeSshKey': instance.removeSshKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey$removeSshKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), + ); + +Map _$Mutation$RemoveSshKey$removeSshKeyToJson( + Mutation$RemoveSshKey$removeSshKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 4fb757e2..77241653 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -6,7 +6,9 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.g import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; @@ -16,6 +18,7 @@ part 'volume_api.dart'; part 'jobs_api.dart'; part 'server_actions_api.dart'; part 'services_api.dart'; +part 'users_api.dart'; class GenericMutationResult { GenericMutationResult({ diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart new file mode 100644 index 00000000..5be86a3d --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -0,0 +1,189 @@ +part of 'server.dart'; + +class UserMutationResult extends GenericMutationResult { + UserMutationResult({ + required final super.success, + required final super.code, + final super.message, + this.user, + }); + final User? user; +} + +mixin UsersApi on ApiMap { + Future> getAllUsers() async { + QueryResult response; + List users = []; + try { + final GraphQLClient client = await getClient(); + response = await client.query$AllUsers(); + if (response.hasException) { + print(response.exception.toString()); + } + users = response.parsedData?.users.allUsers.map((final user) => User.fromGraphQL(user)).toList() ?? []; + } catch (e) { + print(e); + } + return users; + } + + Future getUser(final String login) async { + QueryResult response; + User? user; + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Query$GetUser(username: login); + response = await client.query$GetUser(Options$Query$GetUser(variables: variables)); + if (response.hasException) { + print(response.exception.toString()); + } + if (response.parsedData?.users.getUser != null) { + user = User( + login: response.parsedData!.users.getUser!.username, + sshKeys: response.parsedData!.users.getUser?.sshKeys ?? const [], + isFoundOnServer: true, + ); + } + } catch (e) { + print(e); + } + return user; + } + + Future createUser( + final String username, + final String password, + ) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$CreateUser( + user: Input$UserMutationInput(username: username, password: password), + ); + final mutation = Options$Mutation$CreateUser(variables: variables); + final response = await client.mutate$CreateUser(mutation); + return UserMutationResult( + success: response.parsedData?.createUser.success ?? false, + code: response.parsedData?.createUser.code ?? 500, + message: response.parsedData?.createUser.message, + user: response.parsedData?.createUser.user != null ? User.fromGraphQL(response.parsedData!.createUser.user!) : null, + ); + } catch (e) { + print(e); + return UserMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future deleteUser( + final String username, + ) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$DeleteUser(username: username); + final mutation = Options$Mutation$DeleteUser(variables: variables); + final response = await client.mutate$DeleteUser(mutation); + return GenericMutationResult( + success: response.parsedData?.deleteUser.success ?? false, + code: response.parsedData?.deleteUser.code ?? 500, + message: response.parsedData?.deleteUser.message, + ); + } catch (e) { + print(e); + return GenericMutationResult( + success: false, + code: 500, + message: e.toString(), + ); + } + } + + Future updateUser( + final String username, + final String password, + ) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$UpdateUser( + user: Input$UserMutationInput(username: username, password: password), + ); + final mutation = Options$Mutation$UpdateUser(variables: variables); + final response = await client.mutate$UpdateUser(mutation); + return UserMutationResult( + success: response.parsedData?.updateUser.success ?? false, + code: response.parsedData?.updateUser.code ?? 500, + message: response.parsedData?.updateUser.message, + user: response.parsedData?.updateUser.user != null ? User.fromGraphQL(response.parsedData!.updateUser.user!) : null, + ); + } catch (e) { + print(e); + return UserMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future addSshKey( + final String username, + final String sshKey, + ) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$AddSshKey( + sshInput: Input$SshMutationInput( + username: username, + sshKey: sshKey, + ), + ); + final mutation = Options$Mutation$AddSshKey(variables: variables); + final response = await client.mutate$AddSshKey(mutation); + return UserMutationResult( + success: response.parsedData?.addSshKey.success ?? false, + code: response.parsedData?.addSshKey.code ?? 500, + message: response.parsedData?.addSshKey.message, + user: response.parsedData?.addSshKey.user != null ? User.fromGraphQL(response.parsedData!.addSshKey.user!) : null, + ); + } catch (e) { + print(e); + return UserMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } + + Future removeSshKey( + final String username, + final String sshKey, + ) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$RemoveSshKey( + sshInput: Input$SshMutationInput( + username: username, + sshKey: sshKey, + ), + ); + final mutation = Options$Mutation$RemoveSshKey(variables: variables); + final response = await client.mutate$RemoveSshKey(mutation); + return UserMutationResult( + success: response.parsedData?.removeSshKey.success ?? false, + code: response.parsedData?.removeSshKey.code ?? 500, + message: response.parsedData?.removeSshKey.message, + user: response.parsedData?.removeSshKey.user != null ? User.fromGraphQL(response.parsedData!.removeSshKey.user!) : null, + ); + } catch (e) { + print(e); + return UserMutationResult( + success: false, + code: 0, + message: e.toString(), + ); + } + } +} diff --git a/lib/logic/models/hive/user.dart b/lib/logic/models/hive/user.dart index 942ce9fe..f140953d 100644 --- a/lib/logic/models/hive/user.dart +++ b/lib/logic/models/hive/user.dart @@ -2,6 +2,7 @@ import 'dart:ui'; import 'package:equatable/equatable.dart'; import 'package:hive/hive.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/utils/color_utils.dart'; part 'user.g.dart'; @@ -16,6 +17,13 @@ class User extends Equatable { this.note, }); + User.fromGraphQL(final Fragment$userFields user) + : this( + login: user.username, + sshKeys: user.sshKeys, + isFoundOnServer: true, + ); + @HiveField(0) final String login; @@ -37,6 +45,5 @@ class User extends Equatable { Color get color => stringToColor(login); @override - String toString() => - '$login, ${isFoundOnServer ? 'found' : 'not found'}, ${sshKeys.length} ssh keys, note: $note'; + String toString() => '$login, ${isFoundOnServer ? 'found' : 'not found'}, ${sshKeys.length} ssh keys, note: $note'; } From 894cd9524fa76b816c7df387dc3be60241f3ecc9 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 4 Sep 2022 14:28:45 +0300 Subject: [PATCH 041/732] Remove android.enableR8 from gradle.properties --- android/gradle.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/android/gradle.properties b/android/gradle.properties index a6738207..94adc3a3 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,3 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -android.enableR8=true From c1bb617ca79af7cad38b600260f438d3fabc85cd Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 4 Sep 2022 14:29:05 +0300 Subject: [PATCH 042/732] Add user type to the User model --- .../graphql_maps/server_api/users_api.dart | 9 +- lib/logic/api_maps/rest_maps/server.dart | 60 +++------- .../initializing/root_user_form_cubit.dart | 3 +- .../cubit/forms/user/user_form_cubit.dart | 5 +- .../server_installation_repository.dart | 104 ++++++------------ lib/logic/cubit/users/users_cubit.dart | 79 ++++++------- lib/logic/models/hive/README.md | 5 +- lib/logic/models/hive/user.dart | 29 +++++ 8 files changed, 127 insertions(+), 167 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index 5be86a3d..c1b2b801 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -37,12 +37,9 @@ mixin UsersApi on ApiMap { if (response.hasException) { print(response.exception.toString()); } - if (response.parsedData?.users.getUser != null) { - user = User( - login: response.parsedData!.users.getUser!.username, - sshKeys: response.parsedData!.users.getUser?.sshKeys ?? const [], - isFoundOnServer: true, - ); + final responseUser = response.parsedData?.users.getUser; + if (responseUser != null) { + user = User.fromGraphQL(responseUser); } } catch (e) { print(e); diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 2563fa50..5c94d990 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -15,8 +16,6 @@ import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; - class ApiResponse { ApiResponse({ required this.statusCode, @@ -71,9 +70,7 @@ class ServerApi extends ApiMap { baseUrl: 'https://api.$overrideDomain', connectTimeout: 10000, receiveTimeout: 10000, - headers: customToken != null - ? {'Authorization': 'Bearer $customToken'} - : null, + headers: customToken != null ? {'Authorization': 'Bearer $customToken'} : null, ); } @@ -132,6 +129,7 @@ class ServerApi extends ApiMap { statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, data: User( login: user.login, + type: UserType.normal, password: user.password, isFoundOnServer: false, ), @@ -143,8 +141,7 @@ class ServerApi extends ApiMap { bool isFoundOnServer = false; int code = 0; - final bool isUserCreated = (response.statusCode != null) && - (response.statusCode == HttpStatus.created); + final bool isUserCreated = (response.statusCode != null) && (response.statusCode == HttpStatus.created); if (isUserCreated) { isFoundOnServer = true; @@ -158,6 +155,7 @@ class ServerApi extends ApiMap { statusCode: code, data: User( login: user.login, + type: UserType.normal, password: user.password, isFoundOnServer: isFoundOnServer, ), @@ -273,9 +271,7 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/services/ssh/keys/${user.login}'); - res = (response.data as List) - .map((final e) => e as String) - .toList(); + res = (response.data as List).map((final e) => e as String).toList(); } on DioError catch (e) { print(e.message); return ApiResponse>( @@ -334,9 +330,7 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, data: null, - errorMessage: response.data?.containsKey('error') ?? false - ? response.data['error'] - : null, + errorMessage: response.data?.containsKey('error') ?? false ? response.data['error'] : null, ); } @@ -347,8 +341,7 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.delete('/users/${user.login}'); - res = response.statusCode == HttpStatus.ok || - response.statusCode == HttpStatus.notFound; + res = response.statusCode == HttpStatus.ok || response.statusCode == HttpStatus.notFound; } on DioError catch (e) { print(e.message); res = false; @@ -359,8 +352,7 @@ class ServerApi extends ApiMap { } @override - String get rootAddress => - throw UnimplementedError('not used in with implementation'); + String get rootAddress => throw UnimplementedError('not used in with implementation'); Future apply() async { bool res = false; @@ -453,8 +445,7 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/services/restic/backup/list'); - backups = - response.data.map((final e) => Backup.fromJson(e)).toList(); + backups = response.data.map((final e) => Backup.fromJson(e)).toList(); } on DioError catch (e) { print(e.message); } catch (e) { @@ -517,9 +508,7 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/configuration/pull'); - result = (response.statusCode != null) - ? (response.statusCode == HttpStatus.ok) - : false; + result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; } on DioError catch (e) { print(e.message); } finally { @@ -535,9 +524,7 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/reboot'); - result = (response.statusCode != null) - ? (response.statusCode == HttpStatus.ok) - : false; + result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; } on DioError catch (e) { print(e.message); } finally { @@ -553,9 +540,7 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/configuration/upgrade'); - result = (response.statusCode != null) - ? (response.statusCode == HttpStatus.ok) - : false; + result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; } on DioError catch (e) { print(e.message); } finally { @@ -604,8 +589,7 @@ class ServerApi extends ApiMap { Future getServerTimezone() async { // I am not sure how to initialize TimeZoneSettings with default value... final Dio client = await getClient(); - final Response response = - await client.get('/system/configuration/timezone'); + final Response response = await client.get('/system/configuration/timezone'); close(client); return TimeZoneSettings.fromString(response.data); @@ -632,11 +616,7 @@ class ServerApi extends ApiMap { try { response = await client.get('/services/mailserver/dkim'); final Codec base64toString = utf8.fuse(base64); - dkim = base64toString - .decode(response.data) - .split('(')[1] - .split(')')[0] - .replaceAll('"', ''); + dkim = base64toString.decode(response.data).split('(')[1].split(')')[0].replaceAll('"', ''); } on DioError catch (e) { print(e.message); } finally { @@ -667,9 +647,7 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, - data: response.data != null - ? RecoveryKeyStatus.fromJson(response.data) - : null, + data: response.data != null ? RecoveryKeyStatus.fromJson(response.data) : null, ); } @@ -839,11 +817,7 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, - data: (response.data != null) - ? response.data - .map((final e) => ApiToken.fromJson(e)) - .toList() - : [], + data: (response.data != null) ? response.data.map((final e) => ApiToken.fromJson(e)).toList() : [], ); } diff --git a/lib/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart index b3cf606f..cc4ef6cf 100644 --- a/lib/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; class RootUserFormCubit extends FormCubit { @@ -22,6 +22,7 @@ class RootUserFormCubit extends FormCubit { FutureOr onSubmit() async { final User user = User( login: userName.state.value, + type: UserType.primary, password: password.state.value, ); serverInstallationCubit.setRootUser(user); diff --git a/lib/logic/cubit/forms/user/user_form_cubit.dart b/lib/logic/cubit/forms/user/user_form_cubit.dart index 92f66f15..d745b5f5 100644 --- a/lib/logic/cubit/forms/user/user_form_cubit.dart +++ b/lib/logic/cubit/forms/user/user_form_cubit.dart @@ -1,10 +1,10 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; -import 'package:selfprivacy/logic/models/job.dart'; +import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class UserFormCubit extends FormCubit { @@ -29,6 +29,7 @@ class UserFormCubit extends FormCubit { FutureOr onSubmit() { final User user = User( login: login.state.value, + type: UserType.normal, password: password.state.value, ); jobsCubit.addJob(CreateUserJob(user: user)); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index c9ca0e96..91c09714 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -12,10 +12,11 @@ import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -26,8 +27,6 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; -import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; - class IpNotFoundException implements Exception { IpNotFoundException(this.message); final String message; @@ -41,12 +40,10 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); - ServerProviderApiFactory? serverProviderApiFactory = - ApiFactoryCreator.createServerProviderApiFactory( + ServerProviderApiFactory? serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( ServerProvider.hetzner, // TODO: HARDCODE FOR NOW!!! ); // TODO: Remove when provider selection is implemented. - DnsProviderApiFactory? dnsProviderApiFactory = - ApiFactoryCreator.createDnsProviderApiFactory( + DnsProviderApiFactory? dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! ); @@ -54,15 +51,11 @@ class ServerInstallationRepository { final String? providerApiToken = getIt().hetznerKey; final String? cloudflareToken = getIt().cloudFlareKey; final ServerDomain? serverDomain = getIt().serverDomain; - final BackblazeCredential? backblazeCredential = - getIt().backblazeCredential; - final ServerHostingDetails? serverDetails = - getIt().serverDetails; + final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; + final ServerHostingDetails? serverDetails = getIt().serverDetails; - if (serverDetails != null && - serverDetails.provider != ServerProvider.unknown) { - serverProviderApiFactory = - ApiFactoryCreator.createServerProviderApiFactory( + if (serverDetails != null && serverDetails.provider != ServerProvider.unknown) { + serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( serverDetails.provider, ); } @@ -82,15 +75,12 @@ class ServerInstallationRepository { serverDetails: serverDetails!, rootUser: box.get(BNames.rootUser), isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), - isServerResetedFirstTime: - box.get(BNames.isServerResetedFirstTime, defaultValue: false), - isServerResetedSecondTime: - box.get(BNames.isServerResetedSecondTime, defaultValue: false), + isServerResetedFirstTime: box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: box.get(BNames.isServerResetedSecondTime, defaultValue: false), ); } - if (box.get(BNames.isRecoveringServer, defaultValue: false) && - serverDomain != null) { + if (box.get(BNames.isRecoveringServer, defaultValue: false) && serverDomain != null) { return ServerInstallationRecovery( providerApiToken: providerApiToken, cloudFlareKey: cloudflareToken, @@ -116,10 +106,8 @@ class ServerInstallationRepository { serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), - isServerResetedFirstTime: - box.get(BNames.isServerResetedFirstTime, defaultValue: false), - isServerResetedSecondTime: - box.get(BNames.isServerResetedSecondTime, defaultValue: false), + isServerResetedFirstTime: box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: box.get(BNames.isServerResetedSecondTime, defaultValue: false), isLoading: box.get(BNames.isLoading, defaultValue: false), dnsMatches: null, ); @@ -183,13 +171,7 @@ class ServerInstallationRepository { final String? ip4, final Map skippedMatches, ) async { - final List addresses = [ - '$domainName', - 'api.$domainName', - 'cloud.$domainName', - 'meet.$domainName', - 'password.$domainName' - ]; + final List addresses = ['$domainName', 'api.$domainName', 'cloud.$domainName', 'meet.$domainName', 'password.$domainName']; final Map matches = {}; @@ -205,19 +187,15 @@ class ServerInstallationRepository { ); getIt.get().addMessage( Message( - text: - 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', + text: 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', ), ); getIt.get().addMessage( Message( - text: - 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', + text: 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', ), ); - if (lookupRecordRes == null || - lookupRecordRes.isEmpty || - lookupRecordRes[0].data != ip4) { + if (lookupRecordRes == null || lookupRecordRes.isEmpty || lookupRecordRes[0].data != ip4) { matches[address] = false; } else { matches[address] = true; @@ -233,8 +211,7 @@ class ServerInstallationRepository { final String cloudFlareKey, final BackblazeCredential backblazeCredential, { required final void Function() onCancel, - required final Future Function(ServerHostingDetails serverDetails) - onSuccess, + required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); try { @@ -338,10 +315,8 @@ class ServerInstallationRepository { final ServerDomain domain, { required final void Function() onCancel, }) async { - final DnsProviderApi dnsProviderApi = - dnsProviderApiFactory!.getDnsProvider(); - final ServerProviderApi serverApi = - serverProviderApiFactory!.getServerProvider(); + final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); + final ServerProviderApi serverApi = serverProviderApiFactory!.getServerProvider(); await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, @@ -357,9 +332,7 @@ class ServerInstallationRepository { final NavigationService nav = getIt.get(); nav.showPopUpDialog( BrandAlert( - title: e.response!.data['errors'][0]['code'] == 1038 - ? 'modals.10'.tr() - : 'providers.domain.states.error'.tr(), + title: e.response!.data['errors'][0]['code'] == 1038 ? 'modals.10'.tr() : 'providers.domain.states.error'.tr(), contentText: 'modals.6'.tr(), actions: [ ActionButton( @@ -392,8 +365,7 @@ class ServerInstallationRepository { } Future createDkimRecord(final ServerDomain cloudFlareDomain) async { - final DnsProviderApi dnsProviderApi = - dnsProviderApiFactory!.getDnsProvider(); + final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); String dkimRecordString = ''; @@ -460,31 +432,25 @@ class ServerInstallationRepository { final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); if (kIsWeb) { return deviceInfo.webBrowserInfo.then( - (final WebBrowserInfo value) => - '${value.browserName} ${value.platform}', + (final WebBrowserInfo value) => '${value.browserName} ${value.platform}', ); } else { if (Platform.isAndroid) { return deviceInfo.androidInfo.then( - (final AndroidDeviceInfo value) => - '${value.model} ${value.version.release}', + (final AndroidDeviceInfo value) => '${value.model} ${value.version.release}', ); } else if (Platform.isIOS) { return deviceInfo.iosInfo.then( - (final IosDeviceInfo value) => - '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', + (final IosDeviceInfo value) => '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', ); } else if (Platform.isLinux) { - return deviceInfo.linuxInfo - .then((final LinuxDeviceInfo value) => value.prettyName); + return deviceInfo.linuxInfo.then((final LinuxDeviceInfo value) => value.prettyName); } else if (Platform.isMacOS) { return deviceInfo.macOsInfo.then( - (final MacOsDeviceInfo value) => - '${value.hostName} ${value.computerName}', + (final MacOsDeviceInfo value) => '${value.hostName} ${value.computerName}', ); } else if (Platform.isWindows) { - return deviceInfo.windowsInfo - .then((final WindowsDeviceInfo value) => value.computerName); + return deviceInfo.windowsInfo.then((final WindowsDeviceInfo value) => value.computerName); } } return 'Unidentified'; @@ -576,8 +542,7 @@ class ServerInstallationRepository { ); final String serverIp = await getServerIpFromDomain(serverDomain); if (recoveryCapabilities == ServerRecoveryCapabilities.legacy) { - final Map apiResponse = - await serverApi.servicesPowerCheck(); + final Map apiResponse = await serverApi.servicesPowerCheck(); if (apiResponse.isNotEmpty) { return ServerHostingDetails( apiToken: apiToken, @@ -600,8 +565,7 @@ class ServerInstallationRepository { ); } } - final ApiResponse deviceAuthKey = - await serverApi.createDeviceToken(); + final ApiResponse deviceAuthKey = await serverApi.createDeviceToken(); final ApiResponse apiResponse = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), ); @@ -633,14 +597,14 @@ class ServerInstallationRepository { final ServerApi serverApi = ServerApi(); const User fallbackUser = User( isFoundOnServer: false, + type: UserType.primary, note: "Couldn't find main user on server, API is outdated", login: 'UNKNOWN', sshKeys: [], ); final String? serverApiVersion = await serverApi.getApiVersion(); - final ApiResponse> users = - await serverApi.getUsersList(withMainUser: true); + final ApiResponse> users = await serverApi.getUsersList(withMainUser: true); if (serverApiVersion == null || !users.isSuccess) { return fallbackUser; } @@ -652,6 +616,7 @@ class ServerInstallationRepository { return User( isFoundOnServer: true, login: users.data[0], + type: UserType.primary, ); } on FormatException { return fallbackUser; @@ -739,8 +704,7 @@ class ServerInstallationRepository { Future deleteServer(final ServerDomain serverDomain) async { final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - final DnsProviderApi dnsProviderApi = - dnsProviderApiFactory!.getDnsProvider(); + final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); await api.deleteServer( domainName: serverDomain.domainName, diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 3ce0d18e..46e39568 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -1,10 +1,9 @@ import 'package:hive/hive.dart'; import 'package:selfprivacy/config/hive_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; - export 'package:provider/provider.dart'; part 'users_state.dart'; @@ -15,8 +14,8 @@ class UsersCubit extends ServerInstallationDependendCubit { serverInstallationCubit, const UsersState( [], - User(login: 'root'), - User(login: 'loading...'), + User(login: 'root', type: UserType.root), + User(login: 'loading...', type: UserType.primary), ), ); Box box = Hive.box(BNames.usersBox); @@ -30,30 +29,26 @@ class UsersCubit extends ServerInstallationDependendCubit { final List loadedUsers = box.values.toList(); final primaryUser = serverInstallationBox.get( BNames.rootUser, - defaultValue: const User(login: 'loading...'), + defaultValue: const User(login: 'loading...', type: UserType.primary), ); - final List rootKeys = [ - ...serverInstallationBox.get(BNames.rootKeys, defaultValue: []) - ]; + final List rootKeys = [...serverInstallationBox.get(BNames.rootKeys, defaultValue: [])]; if (loadedUsers.isNotEmpty) { emit( UsersState( loadedUsers, - User(login: 'root', sshKeys: rootKeys), + User(login: 'root', sshKeys: rootKeys, type: UserType.root), primaryUser, ), ); } - final ApiResponse> usersFromServer = - await api.getUsersList(); + final ApiResponse> usersFromServer = await api.getUsersList(); if (usersFromServer.isSuccess) { - final List updatedList = - mergeLocalAndServerUsers(loadedUsers, usersFromServer.data); + final List updatedList = mergeLocalAndServerUsers(loadedUsers, usersFromServer.data); emit( UsersState( updatedList, - User(login: 'root', sshKeys: rootKeys), + User(login: 'root', sshKeys: rootKeys, type: UserType.root), primaryUser, ), ); @@ -64,11 +59,9 @@ class UsersCubit extends ServerInstallationDependendCubit { box.clear(); box.addAll(usersWithSshKeys); - final User rootUserWithSshKeys = - (await loadSshKeys([state.rootUser])).first; + final User rootUserWithSshKeys = (await loadSshKeys([state.rootUser])).first; serverInstallationBox.put(BNames.rootKeys, rootUserWithSshKeys.sshKeys); - final User primaryUserWithSshKeys = - (await loadSshKeys([state.primaryUser])).first; + final User primaryUserWithSshKeys = (await loadSshKeys([state.primaryUser])).first; serverInstallationBox.put(BNames.rootUser, primaryUserWithSshKeys); emit( UsersState( @@ -95,6 +88,7 @@ class UsersCubit extends ServerInstallationDependendCubit { mergedUsers.add( User( login: localUser.login, + type: UserType.normal, isFoundOnServer: true, password: localUser.password, sshKeys: localUser.sshKeys, @@ -105,6 +99,7 @@ class UsersCubit extends ServerInstallationDependendCubit { mergedUsers.add( User( login: localUser.login, + type: UserType.normal, isFoundOnServer: false, password: localUser.password, note: localUser.note, @@ -117,6 +112,7 @@ class UsersCubit extends ServerInstallationDependendCubit { mergedUsers.add( User( login: serverUser, + type: UserType.normal, isFoundOnServer: true, ), ); @@ -129,16 +125,14 @@ class UsersCubit extends ServerInstallationDependendCubit { final List updatedUsers = []; for (final User user in users) { - if (user.isFoundOnServer || - user.login == 'root' || - user.login == state.primaryUser.login) { - final ApiResponse> sshKeys = - await api.getUserSshKeys(user); + if (user.isFoundOnServer || user.login == 'root' || user.login == state.primaryUser.login) { + final ApiResponse> sshKeys = await api.getUserSshKeys(user); print('sshKeys for $user: ${sshKeys.data}'); if (sshKeys.isSuccess) { updatedUsers.add( User( login: user.login, + type: user.type, isFoundOnServer: true, password: user.password, sshKeys: sshKeys.data, @@ -149,6 +143,7 @@ class UsersCubit extends ServerInstallationDependendCubit { updatedUsers.add( User( login: user.login, + type: user.type, isFoundOnServer: true, password: user.password, note: user.note, @@ -159,6 +154,7 @@ class UsersCubit extends ServerInstallationDependendCubit { updatedUsers.add( User( login: user.login, + type: user.type, isFoundOnServer: false, password: user.password, note: user.note, @@ -173,17 +169,14 @@ class UsersCubit extends ServerInstallationDependendCubit { List updatedUsers = List.from(state.users); final ApiResponse> usersFromServer = await api.getUsersList(); if (usersFromServer.isSuccess) { - updatedUsers = - mergeLocalAndServerUsers(updatedUsers, usersFromServer.data); + updatedUsers = mergeLocalAndServerUsers(updatedUsers, usersFromServer.data); } final List usersWithSshKeys = await loadSshKeys(updatedUsers); box.clear(); box.addAll(usersWithSshKeys); - final User rootUserWithSshKeys = - (await loadSshKeys([state.rootUser])).first; + final User rootUserWithSshKeys = (await loadSshKeys([state.rootUser])).first; serverInstallationBox.put(BNames.rootKeys, rootUserWithSshKeys.sshKeys); - final User primaryUserWithSshKeys = - (await loadSshKeys([state.primaryUser])).first; + final User primaryUserWithSshKeys = (await loadSshKeys([state.primaryUser])).first; serverInstallationBox.put(BNames.rootUser, primaryUserWithSshKeys); emit( UsersState( @@ -197,8 +190,7 @@ class UsersCubit extends ServerInstallationDependendCubit { Future createUser(final User user) async { // If user exists on server, do nothing - if (state.users - .any((final User u) => u.login == user.login && u.isFoundOnServer)) { + if (state.users.any((final User u) => u.login == user.login && u.isFoundOnServer)) { return; } // If user is root or primary user, do nothing @@ -240,14 +232,14 @@ class UsersCubit extends ServerInstallationDependendCubit { final ApiResponse result = await api.addRootSshKey(publicKey); if (result.isSuccess) { // Add ssh key to the array of root keys - final List rootKeys = serverInstallationBox - .get(BNames.rootKeys, defaultValue: []) as List; + final List rootKeys = serverInstallationBox.get(BNames.rootKeys, defaultValue: []) as List; rootKeys.add(publicKey); serverInstallationBox.put(BNames.rootKeys, rootKeys); emit( state.copyWith( rootUser: User( login: state.rootUser.login, + type: UserType.root, isFoundOnServer: true, password: state.rootUser.password, sshKeys: rootKeys, @@ -261,11 +253,11 @@ class UsersCubit extends ServerInstallationDependendCubit { if (result.isSuccess) { // If it is primary user, update primary user if (user.login == state.primaryUser.login) { - final List primaryUserKeys = - List.from(state.primaryUser.sshKeys); + final List primaryUserKeys = List.from(state.primaryUser.sshKeys); primaryUserKeys.add(publicKey); final User updatedUser = User( login: state.primaryUser.login, + type: UserType.primary, isFoundOnServer: true, password: state.primaryUser.password, sshKeys: primaryUserKeys, @@ -283,6 +275,7 @@ class UsersCubit extends ServerInstallationDependendCubit { userKeys.add(publicKey); final User updatedUser = User( login: user.login, + type: UserType.normal, isFoundOnServer: true, password: user.password, sshKeys: userKeys, @@ -302,22 +295,21 @@ class UsersCubit extends ServerInstallationDependendCubit { Future deleteSshKey(final User user, final String publicKey) async { // All keys are deleted via api.deleteUserSshKey - final ApiResponse result = - await api.deleteUserSshKey(user, publicKey); + final ApiResponse result = await api.deleteUserSshKey(user, publicKey); if (result.isSuccess) { // If it is root user, delete key from root keys // If it is primary user, update primary user // If it is not primary user, update user if (user.login == 'root') { - final List rootKeys = serverInstallationBox - .get(BNames.rootKeys, defaultValue: []) as List; + final List rootKeys = serverInstallationBox.get(BNames.rootKeys, defaultValue: []) as List; rootKeys.remove(publicKey); serverInstallationBox.put(BNames.rootKeys, rootKeys); emit( state.copyWith( rootUser: User( login: state.rootUser.login, + type: UserType.root, isFoundOnServer: true, password: state.rootUser.password, sshKeys: rootKeys, @@ -328,11 +320,11 @@ class UsersCubit extends ServerInstallationDependendCubit { return; } if (user.login == state.primaryUser.login) { - final List primaryUserKeys = - List.from(state.primaryUser.sshKeys); + final List primaryUserKeys = List.from(state.primaryUser.sshKeys); primaryUserKeys.remove(publicKey); final User updatedUser = User( login: state.primaryUser.login, + type: UserType.primary, isFoundOnServer: true, password: state.primaryUser.password, sshKeys: primaryUserKeys, @@ -350,6 +342,7 @@ class UsersCubit extends ServerInstallationDependendCubit { userKeys.remove(publicKey); final User updatedUser = User( login: user.login, + type: UserType.normal, isFoundOnServer: true, password: user.password, sshKeys: userKeys, @@ -369,8 +362,8 @@ class UsersCubit extends ServerInstallationDependendCubit { emit( const UsersState( [], - User(login: 'root'), - User(login: 'loading...'), + User(login: 'root', type: UserType.root), + User(login: 'loading...', type: UserType.primary), ), ); } diff --git a/lib/logic/models/hive/README.md b/lib/logic/models/hive/README.md index afdd6276..f8f9e14d 100644 --- a/lib/logic/models/hive/README.md +++ b/lib/logic/models/hive/README.md @@ -7,7 +7,8 @@ 5. ServerVolume 6. BackblazeBucket - ## Enums + 100. DnsProvider -101. ServerProvider \ No newline at end of file +101. ServerProvider +102. UserType diff --git a/lib/logic/models/hive/user.dart b/lib/logic/models/hive/user.dart index f140953d..042b2485 100644 --- a/lib/logic/models/hive/user.dart +++ b/lib/logic/models/hive/user.dart @@ -2,6 +2,7 @@ import 'dart:ui'; import 'package:equatable/equatable.dart'; import 'package:hive/hive.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/utils/color_utils.dart'; @@ -11,6 +12,7 @@ part 'user.g.dart'; class User extends Equatable { const User({ required this.login, + required this.type, this.password, this.sshKeys = const [], this.isFoundOnServer = true, @@ -20,6 +22,7 @@ class User extends Equatable { User.fromGraphQL(final Fragment$userFields user) : this( login: user.username, + type: UserType.fromGraphQL(user.userType), sshKeys: user.sshKeys, isFoundOnServer: true, ); @@ -39,6 +42,9 @@ class User extends Equatable { @HiveField(4) final String? note; + @HiveField(5, defaultValue: UserType.normal) + final UserType type; + @override List get props => [login, password, sshKeys, isFoundOnServer, note]; @@ -47,3 +53,26 @@ class User extends Equatable { @override String toString() => '$login, ${isFoundOnServer ? 'found' : 'not found'}, ${sshKeys.length} ssh keys, note: $note'; } + +@HiveType(typeId: 102) +enum UserType { + @HiveField(0) + root, + @HiveField(1) + primary, + @HiveField(2) + normal; + + factory UserType.fromGraphQL(final Enum$UserType type) { + switch (type) { + case Enum$UserType.ROOT: + return root; + case Enum$UserType.PRIMARY: + return primary; + case Enum$UserType.NORMAL: + return normal; + case Enum$UserType.$unknown: + return normal; + } + } +} From 0879ea8e9731689803c5c0c5a7d536f036e4ed36 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 5 Sep 2022 07:01:36 +0300 Subject: [PATCH 043/732] Refactor Users cubit to use GraphQL and unified data model --- assets/translations/en.json | 6 +- .../graphql_maps/schema/users.graphql | 3 + .../graphql_maps/schema/users.graphql.dart | 1738 +++++------------ .../graphql_maps/schema/users.graphql.g.dart | 231 +-- .../graphql_maps/server_api/users_api.dart | 4 + lib/logic/cubit/users/users_cubit.dart | 344 +--- lib/logic/cubit/users/users_state.dart | 21 +- lib/logic/models/hive/user.g.dart | 53 +- 8 files changed, 704 insertions(+), 1696 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index ce1bfb5f..5e813da5 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -281,7 +281,11 @@ "delete_confirm_question": "Are you sure?", "reset_password": "Reset password", "account": "Account", - "send_registration_data": "Share login credentials" + "send_registration_data": "Share login credentials", + "could_not_fetch_users": "Couldn't fetch users list", + "could_not_create_user": "Couldn't create user", + "could_not_delete_user": "Couldn't delete user", + "could_not_add_ssh_key": "Couldn't add SSH key" }, "initializing": { "_comment": "initializing page", diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql b/lib/logic/api_maps/graphql_maps/schema/users.graphql index 4f16ffc5..78de71ff 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql @@ -15,6 +15,9 @@ query AllUsers { allUsers { ...userFields } + rootUser: getUser(username: "root") { + ...userFields + } } } diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 328b4a3b..5d0e5d63 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,23 +1,19 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; + import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; + import 'schema.graphql.dart'; + part 'users.graphql.g.dart'; @JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + factory Fragment$basicMutationReturnFields.fromJson(Map json) => _$Fragment$basicMutationReturnFieldsFromJson(json); final int code; @@ -28,8 +24,7 @@ class Fragment$basicMutationReturnFields { @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() => _$Fragment$basicMutationReturnFieldsToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -41,8 +36,7 @@ class Fragment$basicMutationReturnFields { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + if (!(other is Fragment$basicMutationReturnFields) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -59,28 +53,22 @@ class Fragment$basicMutationReturnFields { } } -extension UtilityExtension$Fragment$basicMutationReturnFields - on Fragment$basicMutationReturnFields { - CopyWith$Fragment$basicMutationReturnFields< - Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { + CopyWith$Fragment$basicMutationReturnFields get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = + Fragment$basicMutationReturnFields instance, TRes Function(Fragment$basicMutationReturnFields) then) = _CopyWithImpl$Fragment$basicMutationReturnFields; - factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields; + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; TRes call({int? code, String? message, bool? success, String? $__typename}); } -class _CopyWithImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { +class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); final Fragment$basicMutationReturnFields _instance; @@ -89,114 +77,62 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({Object? code = _undefined, Object? message = _undefined, Object? success = _undefined, Object? $__typename = _undefined}) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null ? _instance.message : (message as String), + success: success == _undefined || success == null ? _instance.success : (success as bool), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { +class _CopyWithStubImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => - _res; + call({int? code, String? message, bool? success, String? $__typename}) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), + typeCondition: TypeConditionNode(on: NamedTypeNode(name: NameNode(value: 'MutationReturnInterface'), isNonNull: false)), directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: 'code'), alias: null, arguments: [], directives: [], selectionSet: null), + FieldNode(name: NameNode(value: 'message'), alias: null, arguments: [], directives: [], selectionSet: null), + FieldNode(name: NameNode(value: 'success'), alias: null, arguments: [], directives: [], selectionSet: null), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])); -const documentNodeFragmentbasicMutationReturnFields = - DocumentNode(definitions: [ +const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, ]); -extension ClientExtension$Fragment$basicMutationReturnFields - on graphql.GraphQLClient { +extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + {required Fragment$basicMutationReturnFields data, required Map idFields, bool broadcast = true}) => this.writeFragment( graphql.FragmentRequest( idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), + fragment: const graphql.Fragment(fragmentName: 'basicMutationReturnFields', document: documentNodeFragmentbasicMutationReturnFields)), data: data.toJson(), broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { + + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({required Map idFields, bool optimistic = true}) { final result = this.readFragment( graphql.FragmentRequest( idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), + fragment: const graphql.Fragment(fragmentName: 'basicMutationReturnFields', document: documentNodeFragmentbasicMutationReturnFields)), optimistic: optimistic); - return result == null - ? null - : Fragment$basicMutationReturnFields.fromJson(result); + return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } @JsonSerializable(explicitToJson: true) class Fragment$userFields { - Fragment$userFields( - {required this.username, - required this.userType, - required this.sshKeys, - required this.$__typename}); + Fragment$userFields({required this.username, required this.userType, required this.sshKeys, required this.$__typename}); @override - factory Fragment$userFields.fromJson(Map json) => - _$Fragment$userFieldsFromJson(json); + factory Fragment$userFields.fromJson(Map json) => _$Fragment$userFieldsFromJson(json); final String username; @@ -214,19 +150,13 @@ class Fragment$userFields { final l$userType = userType; final l$sshKeys = sshKeys; final l$$__typename = $__typename; - return Object.hashAll([ - l$username, - l$userType, - Object.hashAll(l$sshKeys.map((v) => v)), - l$$__typename - ]); + return Object.hashAll([l$username, l$userType, Object.hashAll(l$sshKeys.map((v) => v)), l$$__typename]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) - return false; + if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; @@ -250,27 +180,18 @@ class Fragment$userFields { } extension UtilityExtension$Fragment$userFields on Fragment$userFields { - CopyWith$Fragment$userFields get copyWith => - CopyWith$Fragment$userFields(this, (i) => i); + CopyWith$Fragment$userFields get copyWith => CopyWith$Fragment$userFields(this, (i) => i); } abstract class CopyWith$Fragment$userFields { - factory CopyWith$Fragment$userFields(Fragment$userFields instance, - TRes Function(Fragment$userFields) then) = - _CopyWithImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields(Fragment$userFields instance, TRes Function(Fragment$userFields) then) = _CopyWithImpl$Fragment$userFields; - factory CopyWith$Fragment$userFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields.stub(TRes res) = _CopyWithStubImpl$Fragment$userFields; - TRes call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}); + TRes call({String? username, Enum$UserType? userType, List? sshKeys, String? $__typename}); } -class _CopyWithImpl$Fragment$userFields - implements CopyWith$Fragment$userFields { +class _CopyWithImpl$Fragment$userFields implements CopyWith$Fragment$userFields { _CopyWithImpl$Fragment$userFields(this._instance, this._then); final Fragment$userFields _instance; @@ -279,96 +200,48 @@ class _CopyWithImpl$Fragment$userFields static const _undefined = {}; - TRes call( - {Object? username = _undefined, - Object? userType = _undefined, - Object? sshKeys = _undefined, - Object? $__typename = _undefined}) => + TRes call({Object? username = _undefined, Object? userType = _undefined, Object? sshKeys = _undefined, Object? $__typename = _undefined}) => _then(Fragment$userFields( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + username: username == _undefined || username == null ? _instance.username : (username as String), + userType: userType == _undefined || userType == null ? _instance.userType : (userType as Enum$UserType), + sshKeys: sshKeys == _undefined || sshKeys == null ? _instance.sshKeys : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); } -class _CopyWithStubImpl$Fragment$userFields - implements CopyWith$Fragment$userFields { +class _CopyWithStubImpl$Fragment$userFields implements CopyWith$Fragment$userFields { _CopyWithStubImpl$Fragment$userFields(this._res); TRes _res; - call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}) => - _res; + call({String? username, Enum$UserType? userType, List? sshKeys, String? $__typename}) => _res; } const fragmentDefinitionuserFields = FragmentDefinitionNode( name: NameNode(value: 'userFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), + typeCondition: TypeConditionNode(on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: 'username'), alias: null, arguments: [], directives: [], selectionSet: null), + FieldNode(name: NameNode(value: 'userType'), alias: null, arguments: [], directives: [], selectionSet: null), + FieldNode(name: NameNode(value: 'sshKeys'), alias: null, arguments: [], directives: [], selectionSet: null), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])); const documentNodeFragmentuserFields = DocumentNode(definitions: [ fragmentDefinitionuserFields, ]); extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { - void writeFragment$userFields( - {required Fragment$userFields data, - required Map idFields, - bool broadcast = true}) => - this.writeFragment( + void writeFragment$userFields({required Fragment$userFields data, required Map idFields, bool broadcast = true}) => this + .writeFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'userFields', - document: documentNodeFragmentuserFields)), + idFields: idFields, fragment: const graphql.Fragment(fragmentName: 'userFields', document: documentNodeFragmentuserFields)), data: data.toJson(), broadcast: broadcast); - Fragment$userFields? readFragment$userFields( - {required Map idFields, bool optimistic = true}) { + + Fragment$userFields? readFragment$userFields({required Map idFields, bool optimistic = true}) { final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'userFields', - document: documentNodeFragmentuserFields)), + idFields: idFields, fragment: const graphql.Fragment(fragmentName: 'userFields', document: documentNodeFragmentuserFields)), optimistic: optimistic); return result == null ? null : Fragment$userFields.fromJson(result); } @@ -379,8 +252,7 @@ class Query$AllUsers { Query$AllUsers({required this.users, required this.$__typename}); @override - factory Query$AllUsers.fromJson(Map json) => - _$Query$AllUsersFromJson(json); + factory Query$AllUsers.fromJson(Map json) => _$Query$AllUsersFromJson(json); final Query$AllUsers$users users; @@ -397,8 +269,7 @@ class Query$AllUsers { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) - return false; + if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) return false; final l$users = users; final lOther$users = other.users; if (l$users != lOther$users) return false; @@ -410,24 +281,19 @@ class Query$AllUsers { } extension UtilityExtension$Query$AllUsers on Query$AllUsers { - CopyWith$Query$AllUsers get copyWith => - CopyWith$Query$AllUsers(this, (i) => i); + CopyWith$Query$AllUsers get copyWith => CopyWith$Query$AllUsers(this, (i) => i); } abstract class CopyWith$Query$AllUsers { - factory CopyWith$Query$AllUsers( - Query$AllUsers instance, TRes Function(Query$AllUsers) then) = - _CopyWithImpl$Query$AllUsers; + factory CopyWith$Query$AllUsers(Query$AllUsers instance, TRes Function(Query$AllUsers) then) = _CopyWithImpl$Query$AllUsers; - factory CopyWith$Query$AllUsers.stub(TRes res) = - _CopyWithStubImpl$Query$AllUsers; + factory CopyWith$Query$AllUsers.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers; TRes call({Query$AllUsers$users? users, String? $__typename}); CopyWith$Query$AllUsers$users get users; } -class _CopyWithImpl$Query$AllUsers - implements CopyWith$Query$AllUsers { +class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers { _CopyWithImpl$Query$AllUsers(this._instance, this._then); final Query$AllUsers _instance; @@ -436,29 +302,24 @@ class _CopyWithImpl$Query$AllUsers static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => - _then(Query$AllUsers( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$AllUsers$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => _then(Query$AllUsers( + users: users == _undefined || users == null ? _instance.users : (users as Query$AllUsers$users), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Query$AllUsers$users get users { final local$users = _instance.users; return CopyWith$Query$AllUsers$users(local$users, (e) => call(users: e)); } } -class _CopyWithStubImpl$Query$AllUsers - implements CopyWith$Query$AllUsers { +class _CopyWithStubImpl$Query$AllUsers implements CopyWith$Query$AllUsers { _CopyWithStubImpl$Query$AllUsers(this._res); TRes _res; call({Query$AllUsers$users? users, String? $__typename}) => _res; - CopyWith$Query$AllUsers$users get users => - CopyWith$Query$AllUsers$users.stub(_res); + + CopyWith$Query$AllUsers$users get users => CopyWith$Query$AllUsers$users.stub(_res); } const documentNodeQueryAllUsers = DocumentNode(definitions: [ @@ -480,33 +341,26 @@ const documentNodeQueryAllUsers = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], + name: NameNode(value: 'getUser'), + alias: NameNode(value: 'rootUser'), + arguments: [ArgumentNode(name: NameNode(value: 'username'), value: StringValueNode(value: 'root', isBlock: false))], directives: [], - selectionSet: null) + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + ])), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), fragmentDefinitionuserFields, ]); -Query$AllUsers _parserFn$Query$AllUsers(Map data) => - Query$AllUsers.fromJson(data); + +Query$AllUsers _parserFn$Query$AllUsers(Map data) => Query$AllUsers.fromJson(data); class Options$Query$AllUsers extends graphql.QueryOptions { Options$Query$AllUsers( @@ -529,8 +383,7 @@ class Options$Query$AllUsers extends graphql.QueryOptions { parserFn: _parserFn$Query$AllUsers); } -class WatchOptions$Query$AllUsers - extends graphql.WatchQueryOptions { +class WatchOptions$Query$AllUsers extends graphql.WatchQueryOptions { WatchOptions$Query$AllUsers( {String? operationName, graphql.FetchPolicy? fetchPolicy, @@ -558,60 +411,52 @@ class WatchOptions$Query$AllUsers } class FetchMoreOptions$Query$AllUsers extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); + FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); } extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { - Future> query$AllUsers( - [Options$Query$AllUsers? options]) async => + Future> query$AllUsers([Options$Query$AllUsers? options]) async => await this.query(options ?? Options$Query$AllUsers()); - graphql.ObservableQuery watchQuery$AllUsers( - [WatchOptions$Query$AllUsers? options]) => + + graphql.ObservableQuery watchQuery$AllUsers([WatchOptions$Query$AllUsers? options]) => this.watchQuery(options ?? WatchOptions$Query$AllUsers()); - void writeQuery$AllUsers( - {required Query$AllUsers data, bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryAllUsers)), - data: data.toJson(), - broadcast: broadcast); + + void writeQuery$AllUsers({required Query$AllUsers data, bool broadcast = true}) => + this.writeQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryAllUsers)), data: data.toJson(), broadcast: broadcast); + Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryAllUsers)), - optimistic: optimistic); + final result = this.readQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryAllUsers)), optimistic: optimistic); return result == null ? null : Query$AllUsers.fromJson(result); } } @JsonSerializable(explicitToJson: true) class Query$AllUsers$users { - Query$AllUsers$users({required this.allUsers, required this.$__typename}); + Query$AllUsers$users({required this.allUsers, this.rootUser, required this.$__typename}); @override - factory Query$AllUsers$users.fromJson(Map json) => - _$Query$AllUsers$usersFromJson(json); + factory Query$AllUsers$users.fromJson(Map json) => _$Query$AllUsers$usersFromJson(json); final List allUsers; + final Fragment$userFields? rootUser; + @JsonKey(name: '__typename') final String $__typename; Map toJson() => _$Query$AllUsers$usersToJson(this); + int get hashCode { final l$allUsers = allUsers; + final l$rootUser = rootUser; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$allUsers.map((v) => v)), l$$__typename]); + return Object.hashAll([Object.hashAll(l$allUsers.map((v) => v)), l$rootUser, l$$__typename]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) - return false; + if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) return false; final l$allUsers = allUsers; final lOther$allUsers = other.allUsers; if (l$allUsers.length != lOther$allUsers.length) return false; @@ -621,6 +466,9 @@ class Query$AllUsers$users { if (l$allUsers$entry != lOther$allUsers$entry) return false; } + final l$rootUser = rootUser; + final lOther$rootUser = other.rootUser; + if (l$rootUser != lOther$rootUser) return false; final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) return false; @@ -629,27 +477,22 @@ class Query$AllUsers$users { } extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { - CopyWith$Query$AllUsers$users get copyWith => - CopyWith$Query$AllUsers$users(this, (i) => i); + CopyWith$Query$AllUsers$users get copyWith => CopyWith$Query$AllUsers$users(this, (i) => i); } abstract class CopyWith$Query$AllUsers$users { - factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, - TRes Function(Query$AllUsers$users) then) = - _CopyWithImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, TRes Function(Query$AllUsers$users) then) = _CopyWithImpl$Query$AllUsers$users; - factory CopyWith$Query$AllUsers$users.stub(TRes res) = - _CopyWithStubImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers$users; - TRes call({List? allUsers, String? $__typename}); - TRes allUsers( - Iterable Function( - Iterable>) - _fn); + TRes call({List? allUsers, Fragment$userFields? rootUser, String? $__typename}); + + TRes allUsers(Iterable Function(Iterable>) _fn); + + CopyWith$Fragment$userFields get rootUser; } -class _CopyWithImpl$Query$AllUsers$users - implements CopyWith$Query$AllUsers$users { +class _CopyWithImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); final Query$AllUsers$users _instance; @@ -658,32 +501,32 @@ class _CopyWithImpl$Query$AllUsers$users static const _undefined = {}; - TRes call( - {Object? allUsers = _undefined, Object? $__typename = _undefined}) => - _then(Query$AllUsers$users( - allUsers: allUsers == _undefined || allUsers == null - ? _instance.allUsers - : (allUsers as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - TRes allUsers( - Iterable Function( - Iterable>) - _fn) => - call( - allUsers: _fn(_instance.allUsers - .map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); + TRes call({Object? allUsers = _undefined, Object? rootUser = _undefined, Object? $__typename = _undefined}) => _then(Query$AllUsers$users( + allUsers: allUsers == _undefined || allUsers == null ? _instance.allUsers : (allUsers as List), + rootUser: rootUser == _undefined ? _instance.rootUser : (rootUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + + TRes allUsers(Iterable Function(Iterable>) _fn) => + call(allUsers: _fn(_instance.allUsers.map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); + + CopyWith$Fragment$userFields get rootUser { + final local$rootUser = _instance.rootUser; + return local$rootUser == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$rootUser, (e) => call(rootUser: e)); + } } -class _CopyWithStubImpl$Query$AllUsers$users - implements CopyWith$Query$AllUsers$users { +class _CopyWithStubImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { _CopyWithStubImpl$Query$AllUsers$users(this._res); TRes _res; - call({List? allUsers, String? $__typename}) => _res; + call({List? allUsers, Fragment$userFields? rootUser, String? $__typename}) => _res; + allUsers(_fn) => _res; + + CopyWith$Fragment$userFields get rootUser => CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -691,8 +534,7 @@ class Variables$Query$GetUser { Variables$Query$GetUser({required this.username}); @override - factory Variables$Query$GetUser.fromJson(Map json) => - _$Variables$Query$GetUserFromJson(json); + factory Variables$Query$GetUser.fromJson(Map json) => _$Variables$Query$GetUserFromJson(json); final String username; @@ -705,31 +547,26 @@ class Variables$Query$GetUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) - return false; + if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; return true; } - CopyWith$Variables$Query$GetUser get copyWith => - CopyWith$Variables$Query$GetUser(this, (i) => i); + CopyWith$Variables$Query$GetUser get copyWith => CopyWith$Variables$Query$GetUser(this, (i) => i); } abstract class CopyWith$Variables$Query$GetUser { - factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, - TRes Function(Variables$Query$GetUser) then) = + factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, TRes Function(Variables$Query$GetUser) then) = _CopyWithImpl$Variables$Query$GetUser; - factory CopyWith$Variables$Query$GetUser.stub(TRes res) = - _CopyWithStubImpl$Variables$Query$GetUser; + factory CopyWith$Variables$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Variables$Query$GetUser; TRes call({String? username}); } -class _CopyWithImpl$Variables$Query$GetUser - implements CopyWith$Variables$Query$GetUser { +class _CopyWithImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); final Variables$Query$GetUser _instance; @@ -738,14 +575,11 @@ class _CopyWithImpl$Variables$Query$GetUser static const _undefined = {}; - TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( - username: username == _undefined || username == null - ? _instance.username - : (username as String))); + TRes call({Object? username = _undefined}) => + _then(Variables$Query$GetUser(username: username == _undefined || username == null ? _instance.username : (username as String))); } -class _CopyWithStubImpl$Variables$Query$GetUser - implements CopyWith$Variables$Query$GetUser { +class _CopyWithStubImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { _CopyWithStubImpl$Variables$Query$GetUser(this._res); TRes _res; @@ -758,8 +592,7 @@ class Query$GetUser { Query$GetUser({required this.users, required this.$__typename}); @override - factory Query$GetUser.fromJson(Map json) => - _$Query$GetUserFromJson(json); + factory Query$GetUser.fromJson(Map json) => _$Query$GetUserFromJson(json); final Query$GetUser$users users; @@ -776,8 +609,7 @@ class Query$GetUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetUser) || runtimeType != other.runtimeType) - return false; + if (!(other is Query$GetUser) || runtimeType != other.runtimeType) return false; final l$users = users; final lOther$users = other.users; if (l$users != lOther$users) return false; @@ -789,24 +621,19 @@ class Query$GetUser { } extension UtilityExtension$Query$GetUser on Query$GetUser { - CopyWith$Query$GetUser get copyWith => - CopyWith$Query$GetUser(this, (i) => i); + CopyWith$Query$GetUser get copyWith => CopyWith$Query$GetUser(this, (i) => i); } abstract class CopyWith$Query$GetUser { - factory CopyWith$Query$GetUser( - Query$GetUser instance, TRes Function(Query$GetUser) then) = - _CopyWithImpl$Query$GetUser; + factory CopyWith$Query$GetUser(Query$GetUser instance, TRes Function(Query$GetUser) then) = _CopyWithImpl$Query$GetUser; - factory CopyWith$Query$GetUser.stub(TRes res) = - _CopyWithStubImpl$Query$GetUser; + factory CopyWith$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Query$GetUser; TRes call({Query$GetUser$users? users, String? $__typename}); CopyWith$Query$GetUser$users get users; } -class _CopyWithImpl$Query$GetUser - implements CopyWith$Query$GetUser { +class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser { _CopyWithImpl$Query$GetUser(this._instance, this._then); final Query$GetUser _instance; @@ -815,29 +642,24 @@ class _CopyWithImpl$Query$GetUser static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetUser( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$GetUser$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => _then(Query$GetUser( + users: users == _undefined || users == null ? _instance.users : (users as Query$GetUser$users), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Query$GetUser$users get users { final local$users = _instance.users; return CopyWith$Query$GetUser$users(local$users, (e) => call(users: e)); } } -class _CopyWithStubImpl$Query$GetUser - implements CopyWith$Query$GetUser { +class _CopyWithStubImpl$Query$GetUser implements CopyWith$Query$GetUser { _CopyWithStubImpl$Query$GetUser(this._res); TRes _res; call({Query$GetUser$users? users, String? $__typename}) => _res; - CopyWith$Query$GetUser$users get users => - CopyWith$Query$GetUser$users.stub(_res); + + CopyWith$Query$GetUser$users get users => CopyWith$Query$GetUser$users.stub(_res); } const documentNodeQueryGetUser = DocumentNode(definitions: [ @@ -847,8 +669,7 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'username')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + type: NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -863,40 +684,20 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'getUser'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: VariableNode(name: NameNode(value: 'username'))) - ], + arguments: [ArgumentNode(name: NameNode(value: 'username'), value: VariableNode(name: NameNode(value: 'username')))], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), fragmentDefinitionuserFields, ]); -Query$GetUser _parserFn$Query$GetUser(Map data) => - Query$GetUser.fromJson(data); + +Query$GetUser _parserFn$Query$GetUser(Map data) => Query$GetUser.fromJson(data); class Options$Query$GetUser extends graphql.QueryOptions { Options$Query$GetUser( @@ -921,8 +722,7 @@ class Options$Query$GetUser extends graphql.QueryOptions { parserFn: _parserFn$Query$GetUser); } -class WatchOptions$Query$GetUser - extends graphql.WatchQueryOptions { +class WatchOptions$Query$GetUser extends graphql.WatchQueryOptions { WatchOptions$Query$GetUser( {String? operationName, required Variables$Query$GetUser variables, @@ -952,38 +752,21 @@ class WatchOptions$Query$GetUser } class FetchMoreOptions$Query$GetUser extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetUser( - {required graphql.UpdateQuery updateQuery, - required Variables$Query$GetUser variables}) - : super( - updateQuery: updateQuery, - variables: variables.toJson(), - document: documentNodeQueryGetUser); + FetchMoreOptions$Query$GetUser({required graphql.UpdateQuery updateQuery, required Variables$Query$GetUser variables}) + : super(updateQuery: updateQuery, variables: variables.toJson(), document: documentNodeQueryGetUser); } extension ClientExtension$Query$GetUser on graphql.GraphQLClient { - Future> query$GetUser( - Options$Query$GetUser options) async => - await this.query(options); - graphql.ObservableQuery watchQuery$GetUser( - WatchOptions$Query$GetUser options) => - this.watchQuery(options); - void writeQuery$GetUser( - {required Query$GetUser data, - required Variables$Query$GetUser variables, - bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), - data: data.toJson(), - broadcast: broadcast); - Query$GetUser? readQuery$GetUser( - {required Variables$Query$GetUser variables, bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), + Future> query$GetUser(Options$Query$GetUser options) async => await this.query(options); + + graphql.ObservableQuery watchQuery$GetUser(WatchOptions$Query$GetUser options) => this.watchQuery(options); + + void writeQuery$GetUser({required Query$GetUser data, required Variables$Query$GetUser variables, bool broadcast = true}) => + this.writeQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryGetUser), variables: variables.toJson()), + data: data.toJson(), broadcast: broadcast); + + Query$GetUser? readQuery$GetUser({required Variables$Query$GetUser variables, bool optimistic = true}) { + final result = this.readQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryGetUser), variables: variables.toJson()), optimistic: optimistic); return result == null ? null : Query$GetUser.fromJson(result); } @@ -994,8 +777,7 @@ class Query$GetUser$users { Query$GetUser$users({this.getUser, required this.$__typename}); @override - factory Query$GetUser$users.fromJson(Map json) => - _$Query$GetUser$usersFromJson(json); + factory Query$GetUser$users.fromJson(Map json) => _$Query$GetUser$usersFromJson(json); final Fragment$userFields? getUser; @@ -1012,8 +794,7 @@ class Query$GetUser$users { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) - return false; + if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) return false; final l$getUser = getUser; final lOther$getUser = other.getUser; if (l$getUser != lOther$getUser) return false; @@ -1025,24 +806,19 @@ class Query$GetUser$users { } extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { - CopyWith$Query$GetUser$users get copyWith => - CopyWith$Query$GetUser$users(this, (i) => i); + CopyWith$Query$GetUser$users get copyWith => CopyWith$Query$GetUser$users(this, (i) => i); } abstract class CopyWith$Query$GetUser$users { - factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, - TRes Function(Query$GetUser$users) then) = - _CopyWithImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, TRes Function(Query$GetUser$users) then) = _CopyWithImpl$Query$GetUser$users; - factory CopyWith$Query$GetUser$users.stub(TRes res) = - _CopyWithStubImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users.stub(TRes res) = _CopyWithStubImpl$Query$GetUser$users; TRes call({Fragment$userFields? getUser, String? $__typename}); CopyWith$Fragment$userFields get getUser; } -class _CopyWithImpl$Query$GetUser$users - implements CopyWith$Query$GetUser$users { +class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { _CopyWithImpl$Query$GetUser$users(this._instance, this._then); final Query$GetUser$users _instance; @@ -1051,14 +827,10 @@ class _CopyWithImpl$Query$GetUser$users static const _undefined = {}; - TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetUser$users( - getUser: getUser == _undefined - ? _instance.getUser - : (getUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => _then(Query$GetUser$users( + getUser: getUser == _undefined ? _instance.getUser : (getUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Fragment$userFields get getUser { final local$getUser = _instance.getUser; return local$getUser == null @@ -1067,15 +839,14 @@ class _CopyWithImpl$Query$GetUser$users } } -class _CopyWithStubImpl$Query$GetUser$users - implements CopyWith$Query$GetUser$users { +class _CopyWithStubImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { _CopyWithStubImpl$Query$GetUser$users(this._res); TRes _res; call({Fragment$userFields? getUser, String? $__typename}) => _res; - CopyWith$Fragment$userFields get getUser => - CopyWith$Fragment$userFields.stub(_res); + + CopyWith$Fragment$userFields get getUser => CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1083,8 +854,7 @@ class Variables$Mutation$CreateUser { Variables$Mutation$CreateUser({required this.user}); @override - factory Variables$Mutation$CreateUser.fromJson(Map json) => - _$Variables$Mutation$CreateUserFromJson(json); + factory Variables$Mutation$CreateUser.fromJson(Map json) => _$Variables$Mutation$CreateUserFromJson(json); final Input$UserMutationInput user; @@ -1097,32 +867,26 @@ class Variables$Mutation$CreateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$CreateUser) || - runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$CreateUser) || runtimeType != other.runtimeType) return false; final l$user = user; final lOther$user = other.user; if (l$user != lOther$user) return false; return true; } - CopyWith$Variables$Mutation$CreateUser - get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); + CopyWith$Variables$Mutation$CreateUser get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$CreateUser { - factory CopyWith$Variables$Mutation$CreateUser( - Variables$Mutation$CreateUser instance, - TRes Function(Variables$Mutation$CreateUser) then) = + factory CopyWith$Variables$Mutation$CreateUser(Variables$Mutation$CreateUser instance, TRes Function(Variables$Mutation$CreateUser) then) = _CopyWithImpl$Variables$Mutation$CreateUser; - factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$CreateUser; + factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$CreateUser; TRes call({Input$UserMutationInput? user}); } -class _CopyWithImpl$Variables$Mutation$CreateUser - implements CopyWith$Variables$Mutation$CreateUser { +class _CopyWithImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { _CopyWithImpl$Variables$Mutation$CreateUser(this._instance, this._then); final Variables$Mutation$CreateUser _instance; @@ -1131,14 +895,11 @@ class _CopyWithImpl$Variables$Mutation$CreateUser static const _undefined = {}; - TRes call({Object? user = _undefined}) => _then(Variables$Mutation$CreateUser( - user: user == _undefined || user == null - ? _instance.user - : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => + _then(Variables$Mutation$CreateUser(user: user == _undefined || user == null ? _instance.user : (user as Input$UserMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$CreateUser - implements CopyWith$Variables$Mutation$CreateUser { +class _CopyWithStubImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { _CopyWithStubImpl$Variables$Mutation$CreateUser(this._res); TRes _res; @@ -1151,8 +912,7 @@ class Mutation$CreateUser { Mutation$CreateUser({required this.createUser, required this.$__typename}); @override - factory Mutation$CreateUser.fromJson(Map json) => - _$Mutation$CreateUserFromJson(json); + factory Mutation$CreateUser.fromJson(Map json) => _$Mutation$CreateUserFromJson(json); final Mutation$CreateUser$createUser createUser; @@ -1169,8 +929,7 @@ class Mutation$CreateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) - return false; + if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) return false; final l$createUser = createUser; final lOther$createUser = other.createUser; if (l$createUser != lOther$createUser) return false; @@ -1182,24 +941,19 @@ class Mutation$CreateUser { } extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { - CopyWith$Mutation$CreateUser get copyWith => - CopyWith$Mutation$CreateUser(this, (i) => i); + CopyWith$Mutation$CreateUser get copyWith => CopyWith$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Mutation$CreateUser { - factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, - TRes Function(Mutation$CreateUser) then) = - _CopyWithImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, TRes Function(Mutation$CreateUser) then) = _CopyWithImpl$Mutation$CreateUser; - factory CopyWith$Mutation$CreateUser.stub(TRes res) = - _CopyWithStubImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser; TRes call({Mutation$CreateUser$createUser? createUser, String? $__typename}); CopyWith$Mutation$CreateUser$createUser get createUser; } -class _CopyWithImpl$Mutation$CreateUser - implements CopyWith$Mutation$CreateUser { +class _CopyWithImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { _CopyWithImpl$Mutation$CreateUser(this._instance, this._then); final Mutation$CreateUser _instance; @@ -1208,33 +962,24 @@ class _CopyWithImpl$Mutation$CreateUser static const _undefined = {}; - TRes call( - {Object? createUser = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$CreateUser( - createUser: createUser == _undefined || createUser == null - ? _instance.createUser - : (createUser as Mutation$CreateUser$createUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? createUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$CreateUser( + createUser: createUser == _undefined || createUser == null ? _instance.createUser : (createUser as Mutation$CreateUser$createUser), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Mutation$CreateUser$createUser get createUser { final local$createUser = _instance.createUser; - return CopyWith$Mutation$CreateUser$createUser( - local$createUser, (e) => call(createUser: e)); + return CopyWith$Mutation$CreateUser$createUser(local$createUser, (e) => call(createUser: e)); } } -class _CopyWithStubImpl$Mutation$CreateUser - implements CopyWith$Mutation$CreateUser { +class _CopyWithStubImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { _CopyWithStubImpl$Mutation$CreateUser(this._res); TRes _res; - call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => - _res; - CopyWith$Mutation$CreateUser$createUser get createUser => - CopyWith$Mutation$CreateUser$createUser.stub(_res); + call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => _res; + + CopyWith$Mutation$CreateUser$createUser get createUser => CopyWith$Mutation$CreateUser$createUser.stub(_res); } const documentNodeMutationCreateUser = DocumentNode(definitions: [ @@ -1244,8 +989,7 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode( - name: NameNode(value: 'UserMutationInput'), isNonNull: true), + type: NamedTypeNode(name: NameNode(value: 'UserMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -1254,55 +998,32 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'createUser'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'user'), - value: VariableNode(name: NameNode(value: 'user'))) - ], + arguments: [ArgumentNode(name: NameNode(value: 'user'), value: VariableNode(name: NameNode(value: 'user')))], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => - Mutation$CreateUser.fromJson(data); -typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( - dynamic, Mutation$CreateUser?); -class Options$Mutation$CreateUser - extends graphql.MutationOptions { +Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); + +typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function(dynamic, Mutation$CreateUser?); + +class Options$Mutation$CreateUser extends graphql.MutationOptions { Options$Mutation$CreateUser( {String? operationName, required Variables$Mutation$CreateUser variables, @@ -1323,10 +1044,7 @@ class Options$Mutation$CreateUser cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$CreateUser(data)), + onCompleted: onCompleted == null ? null : (data) => onCompleted(data, data == null ? null : _parserFn$Mutation$CreateUser(data)), update: update, onError: onError, document: documentNodeMutationCreateUser, @@ -1335,16 +1053,11 @@ class Options$Mutation$CreateUser final OnMutationCompleted$Mutation$CreateUser? onCompletedWithParsed; @override - List get properties => [ - ...super.onCompleted == null - ? super.properties - : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed - ]; + List get properties => + [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; } -class WatchOptions$Mutation$CreateUser - extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$CreateUser extends graphql.WatchQueryOptions { WatchOptions$Mutation$CreateUser( {String? operationName, required Variables$Mutation$CreateUser variables, @@ -1374,27 +1087,17 @@ class WatchOptions$Mutation$CreateUser } extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { - Future> mutate$CreateUser( - Options$Mutation$CreateUser options) async => - await this.mutate(options); - graphql.ObservableQuery watchMutation$CreateUser( - WatchOptions$Mutation$CreateUser options) => - this.watchMutation(options); + Future> mutate$CreateUser(Options$Mutation$CreateUser options) async => await this.mutate(options); + + graphql.ObservableQuery watchMutation$CreateUser(WatchOptions$Mutation$CreateUser options) => this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$CreateUser$createUser - implements Fragment$basicMutationReturnFields { - Mutation$CreateUser$createUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); +class Mutation$CreateUser$createUser implements Fragment$basicMutationReturnFields { + Mutation$CreateUser$createUser({required this.code, required this.message, required this.success, required this.$__typename, this.user}); @override - factory Mutation$CreateUser$createUser.fromJson(Map json) => - _$Mutation$CreateUser$createUserFromJson(json); + factory Mutation$CreateUser$createUser.fromJson(Map json) => _$Mutation$CreateUser$createUserFromJson(json); final int code; @@ -1414,15 +1117,13 @@ class Mutation$CreateUser$createUser final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser$createUser) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$CreateUser$createUser) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1442,32 +1143,21 @@ class Mutation$CreateUser$createUser } } -extension UtilityExtension$Mutation$CreateUser$createUser - on Mutation$CreateUser$createUser { - CopyWith$Mutation$CreateUser$createUser - get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); +extension UtilityExtension$Mutation$CreateUser$createUser on Mutation$CreateUser$createUser { + CopyWith$Mutation$CreateUser$createUser get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); } abstract class CopyWith$Mutation$CreateUser$createUser { - factory CopyWith$Mutation$CreateUser$createUser( - Mutation$CreateUser$createUser instance, - TRes Function(Mutation$CreateUser$createUser) then) = + factory CopyWith$Mutation$CreateUser$createUser(Mutation$CreateUser$createUser instance, TRes Function(Mutation$CreateUser$createUser) then) = _CopyWithImpl$Mutation$CreateUser$createUser; - factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = - _CopyWithStubImpl$Mutation$CreateUser$createUser; + factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser$createUser; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$CreateUser$createUser - implements CopyWith$Mutation$CreateUser$createUser { +class _CopyWithImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { _CopyWithImpl$Mutation$CreateUser$createUser(this._instance, this._then); final Mutation$CreateUser$createUser _instance; @@ -1483,44 +1173,25 @@ class _CopyWithImpl$Mutation$CreateUser$createUser Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$CreateUser$createUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null ? _instance.message : (message as String), + success: success == _undefined || success == null ? _instance.success : (success as bool), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), + user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null - ? CopyWith$Fragment$userFields.stub(_then(_instance)) - : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$CreateUser$createUser - implements CopyWith$Mutation$CreateUser$createUser { +class _CopyWithStubImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { _CopyWithStubImpl$Mutation$CreateUser$createUser(this._res); TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => - _res; - CopyWith$Fragment$userFields get user => - CopyWith$Fragment$userFields.stub(_res); + call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + + CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1528,8 +1199,7 @@ class Variables$Mutation$DeleteUser { Variables$Mutation$DeleteUser({required this.username}); @override - factory Variables$Mutation$DeleteUser.fromJson(Map json) => - _$Variables$Mutation$DeleteUserFromJson(json); + factory Variables$Mutation$DeleteUser.fromJson(Map json) => _$Variables$Mutation$DeleteUserFromJson(json); final String username; @@ -1542,32 +1212,26 @@ class Variables$Mutation$DeleteUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DeleteUser) || - runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$DeleteUser) || runtimeType != other.runtimeType) return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; return true; } - CopyWith$Variables$Mutation$DeleteUser - get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); + CopyWith$Variables$Mutation$DeleteUser get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$DeleteUser { - factory CopyWith$Variables$Mutation$DeleteUser( - Variables$Mutation$DeleteUser instance, - TRes Function(Variables$Mutation$DeleteUser) then) = + factory CopyWith$Variables$Mutation$DeleteUser(Variables$Mutation$DeleteUser instance, TRes Function(Variables$Mutation$DeleteUser) then) = _CopyWithImpl$Variables$Mutation$DeleteUser; - factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$DeleteUser; + factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DeleteUser; TRes call({String? username}); } -class _CopyWithImpl$Variables$Mutation$DeleteUser - implements CopyWith$Variables$Mutation$DeleteUser { +class _CopyWithImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { _CopyWithImpl$Variables$Mutation$DeleteUser(this._instance, this._then); final Variables$Mutation$DeleteUser _instance; @@ -1576,15 +1240,11 @@ class _CopyWithImpl$Variables$Mutation$DeleteUser static const _undefined = {}; - TRes call({Object? username = _undefined}) => _then( - Variables$Mutation$DeleteUser( - username: username == _undefined || username == null - ? _instance.username - : (username as String))); + TRes call({Object? username = _undefined}) => + _then(Variables$Mutation$DeleteUser(username: username == _undefined || username == null ? _instance.username : (username as String))); } -class _CopyWithStubImpl$Variables$Mutation$DeleteUser - implements CopyWith$Variables$Mutation$DeleteUser { +class _CopyWithStubImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { _CopyWithStubImpl$Variables$Mutation$DeleteUser(this._res); TRes _res; @@ -1597,8 +1257,7 @@ class Mutation$DeleteUser { Mutation$DeleteUser({required this.deleteUser, required this.$__typename}); @override - factory Mutation$DeleteUser.fromJson(Map json) => - _$Mutation$DeleteUserFromJson(json); + factory Mutation$DeleteUser.fromJson(Map json) => _$Mutation$DeleteUserFromJson(json); final Mutation$DeleteUser$deleteUser deleteUser; @@ -1615,8 +1274,7 @@ class Mutation$DeleteUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) - return false; + if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) return false; final l$deleteUser = deleteUser; final lOther$deleteUser = other.deleteUser; if (l$deleteUser != lOther$deleteUser) return false; @@ -1628,24 +1286,19 @@ class Mutation$DeleteUser { } extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { - CopyWith$Mutation$DeleteUser get copyWith => - CopyWith$Mutation$DeleteUser(this, (i) => i); + CopyWith$Mutation$DeleteUser get copyWith => CopyWith$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Mutation$DeleteUser { - factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, - TRes Function(Mutation$DeleteUser) then) = - _CopyWithImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, TRes Function(Mutation$DeleteUser) then) = _CopyWithImpl$Mutation$DeleteUser; - factory CopyWith$Mutation$DeleteUser.stub(TRes res) = - _CopyWithStubImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser; TRes call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser; } -class _CopyWithImpl$Mutation$DeleteUser - implements CopyWith$Mutation$DeleteUser { +class _CopyWithImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { _CopyWithImpl$Mutation$DeleteUser(this._instance, this._then); final Mutation$DeleteUser _instance; @@ -1654,33 +1307,24 @@ class _CopyWithImpl$Mutation$DeleteUser static const _undefined = {}; - TRes call( - {Object? deleteUser = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$DeleteUser( - deleteUser: deleteUser == _undefined || deleteUser == null - ? _instance.deleteUser - : (deleteUser as Mutation$DeleteUser$deleteUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? deleteUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$DeleteUser( + deleteUser: deleteUser == _undefined || deleteUser == null ? _instance.deleteUser : (deleteUser as Mutation$DeleteUser$deleteUser), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Mutation$DeleteUser$deleteUser get deleteUser { final local$deleteUser = _instance.deleteUser; - return CopyWith$Mutation$DeleteUser$deleteUser( - local$deleteUser, (e) => call(deleteUser: e)); + return CopyWith$Mutation$DeleteUser$deleteUser(local$deleteUser, (e) => call(deleteUser: e)); } } -class _CopyWithStubImpl$Mutation$DeleteUser - implements CopyWith$Mutation$DeleteUser { +class _CopyWithStubImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { _CopyWithStubImpl$Mutation$DeleteUser(this._res); TRes _res; - call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => - _res; - CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => - CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); + call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => _res; + + CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); } const documentNodeMutationDeleteUser = DocumentNode(definitions: [ @@ -1690,8 +1334,7 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'username')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + type: NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -1700,39 +1343,22 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'deleteUser'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: VariableNode(name: NameNode(value: 'username'))) - ], + arguments: [ArgumentNode(name: NameNode(value: 'username'), value: VariableNode(name: NameNode(value: 'username')))], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => - Mutation$DeleteUser.fromJson(data); -typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( - dynamic, Mutation$DeleteUser?); -class Options$Mutation$DeleteUser - extends graphql.MutationOptions { +Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => Mutation$DeleteUser.fromJson(data); + +typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function(dynamic, Mutation$DeleteUser?); + +class Options$Mutation$DeleteUser extends graphql.MutationOptions { Options$Mutation$DeleteUser( {String? operationName, required Variables$Mutation$DeleteUser variables, @@ -1753,10 +1379,7 @@ class Options$Mutation$DeleteUser cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$DeleteUser(data)), + onCompleted: onCompleted == null ? null : (data) => onCompleted(data, data == null ? null : _parserFn$Mutation$DeleteUser(data)), update: update, onError: onError, document: documentNodeMutationDeleteUser, @@ -1765,16 +1388,11 @@ class Options$Mutation$DeleteUser final OnMutationCompleted$Mutation$DeleteUser? onCompletedWithParsed; @override - List get properties => [ - ...super.onCompleted == null - ? super.properties - : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed - ]; + List get properties => + [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; } -class WatchOptions$Mutation$DeleteUser - extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$DeleteUser extends graphql.WatchQueryOptions { WatchOptions$Mutation$DeleteUser( {String? operationName, required Variables$Mutation$DeleteUser variables, @@ -1804,26 +1422,17 @@ class WatchOptions$Mutation$DeleteUser } extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { - Future> mutate$DeleteUser( - Options$Mutation$DeleteUser options) async => - await this.mutate(options); - graphql.ObservableQuery watchMutation$DeleteUser( - WatchOptions$Mutation$DeleteUser options) => - this.watchMutation(options); + Future> mutate$DeleteUser(Options$Mutation$DeleteUser options) async => await this.mutate(options); + + graphql.ObservableQuery watchMutation$DeleteUser(WatchOptions$Mutation$DeleteUser options) => this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$DeleteUser$deleteUser - implements Fragment$basicMutationReturnFields { - Mutation$DeleteUser$deleteUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); +class Mutation$DeleteUser$deleteUser implements Fragment$basicMutationReturnFields { + Mutation$DeleteUser$deleteUser({required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => - _$Mutation$DeleteUser$deleteUserFromJson(json); + factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => _$Mutation$DeleteUser$deleteUserFromJson(json); final int code; @@ -1846,8 +1455,7 @@ class Mutation$DeleteUser$deleteUser @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser$deleteUser) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$DeleteUser$deleteUser) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1864,26 +1472,20 @@ class Mutation$DeleteUser$deleteUser } } -extension UtilityExtension$Mutation$DeleteUser$deleteUser - on Mutation$DeleteUser$deleteUser { - CopyWith$Mutation$DeleteUser$deleteUser - get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); +extension UtilityExtension$Mutation$DeleteUser$deleteUser on Mutation$DeleteUser$deleteUser { + CopyWith$Mutation$DeleteUser$deleteUser get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); } abstract class CopyWith$Mutation$DeleteUser$deleteUser { - factory CopyWith$Mutation$DeleteUser$deleteUser( - Mutation$DeleteUser$deleteUser instance, - TRes Function(Mutation$DeleteUser$deleteUser) then) = + factory CopyWith$Mutation$DeleteUser$deleteUser(Mutation$DeleteUser$deleteUser instance, TRes Function(Mutation$DeleteUser$deleteUser) then) = _CopyWithImpl$Mutation$DeleteUser$deleteUser; - factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = - _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; + factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; TRes call({int? code, String? message, bool? success, String? $__typename}); } -class _CopyWithImpl$Mutation$DeleteUser$deleteUser - implements CopyWith$Mutation$DeleteUser$deleteUser { +class _CopyWithImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { _CopyWithImpl$Mutation$DeleteUser$deleteUser(this._instance, this._then); final Mutation$DeleteUser$deleteUser _instance; @@ -1892,34 +1494,20 @@ class _CopyWithImpl$Mutation$DeleteUser$deleteUser static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({Object? code = _undefined, Object? message = _undefined, Object? success = _undefined, Object? $__typename = _undefined}) => _then(Mutation$DeleteUser$deleteUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null ? _instance.message : (message as String), + success: success == _undefined || success == null ? _instance.success : (success as bool), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); } -class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser - implements CopyWith$Mutation$DeleteUser$deleteUser { +class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { _CopyWithStubImpl$Mutation$DeleteUser$deleteUser(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => - _res; + call({int? code, String? message, bool? success, String? $__typename}) => _res; } @JsonSerializable(explicitToJson: true) @@ -1927,8 +1515,7 @@ class Variables$Mutation$UpdateUser { Variables$Mutation$UpdateUser({required this.user}); @override - factory Variables$Mutation$UpdateUser.fromJson(Map json) => - _$Variables$Mutation$UpdateUserFromJson(json); + factory Variables$Mutation$UpdateUser.fromJson(Map json) => _$Variables$Mutation$UpdateUserFromJson(json); final Input$UserMutationInput user; @@ -1941,32 +1528,26 @@ class Variables$Mutation$UpdateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UpdateUser) || - runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$UpdateUser) || runtimeType != other.runtimeType) return false; final l$user = user; final lOther$user = other.user; if (l$user != lOther$user) return false; return true; } - CopyWith$Variables$Mutation$UpdateUser - get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); + CopyWith$Variables$Mutation$UpdateUser get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$UpdateUser { - factory CopyWith$Variables$Mutation$UpdateUser( - Variables$Mutation$UpdateUser instance, - TRes Function(Variables$Mutation$UpdateUser) then) = + factory CopyWith$Variables$Mutation$UpdateUser(Variables$Mutation$UpdateUser instance, TRes Function(Variables$Mutation$UpdateUser) then) = _CopyWithImpl$Variables$Mutation$UpdateUser; - factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$UpdateUser; + factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UpdateUser; TRes call({Input$UserMutationInput? user}); } -class _CopyWithImpl$Variables$Mutation$UpdateUser - implements CopyWith$Variables$Mutation$UpdateUser { +class _CopyWithImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { _CopyWithImpl$Variables$Mutation$UpdateUser(this._instance, this._then); final Variables$Mutation$UpdateUser _instance; @@ -1975,14 +1556,11 @@ class _CopyWithImpl$Variables$Mutation$UpdateUser static const _undefined = {}; - TRes call({Object? user = _undefined}) => _then(Variables$Mutation$UpdateUser( - user: user == _undefined || user == null - ? _instance.user - : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => + _then(Variables$Mutation$UpdateUser(user: user == _undefined || user == null ? _instance.user : (user as Input$UserMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$UpdateUser - implements CopyWith$Variables$Mutation$UpdateUser { +class _CopyWithStubImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { _CopyWithStubImpl$Variables$Mutation$UpdateUser(this._res); TRes _res; @@ -1995,8 +1573,7 @@ class Mutation$UpdateUser { Mutation$UpdateUser({required this.updateUser, required this.$__typename}); @override - factory Mutation$UpdateUser.fromJson(Map json) => - _$Mutation$UpdateUserFromJson(json); + factory Mutation$UpdateUser.fromJson(Map json) => _$Mutation$UpdateUserFromJson(json); final Mutation$UpdateUser$updateUser updateUser; @@ -2013,8 +1590,7 @@ class Mutation$UpdateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) - return false; + if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) return false; final l$updateUser = updateUser; final lOther$updateUser = other.updateUser; if (l$updateUser != lOther$updateUser) return false; @@ -2026,24 +1602,19 @@ class Mutation$UpdateUser { } extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { - CopyWith$Mutation$UpdateUser get copyWith => - CopyWith$Mutation$UpdateUser(this, (i) => i); + CopyWith$Mutation$UpdateUser get copyWith => CopyWith$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Mutation$UpdateUser { - factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, - TRes Function(Mutation$UpdateUser) then) = - _CopyWithImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, TRes Function(Mutation$UpdateUser) then) = _CopyWithImpl$Mutation$UpdateUser; - factory CopyWith$Mutation$UpdateUser.stub(TRes res) = - _CopyWithStubImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser; TRes call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}); CopyWith$Mutation$UpdateUser$updateUser get updateUser; } -class _CopyWithImpl$Mutation$UpdateUser - implements CopyWith$Mutation$UpdateUser { +class _CopyWithImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { _CopyWithImpl$Mutation$UpdateUser(this._instance, this._then); final Mutation$UpdateUser _instance; @@ -2052,33 +1623,24 @@ class _CopyWithImpl$Mutation$UpdateUser static const _undefined = {}; - TRes call( - {Object? updateUser = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$UpdateUser( - updateUser: updateUser == _undefined || updateUser == null - ? _instance.updateUser - : (updateUser as Mutation$UpdateUser$updateUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? updateUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$UpdateUser( + updateUser: updateUser == _undefined || updateUser == null ? _instance.updateUser : (updateUser as Mutation$UpdateUser$updateUser), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Mutation$UpdateUser$updateUser get updateUser { final local$updateUser = _instance.updateUser; - return CopyWith$Mutation$UpdateUser$updateUser( - local$updateUser, (e) => call(updateUser: e)); + return CopyWith$Mutation$UpdateUser$updateUser(local$updateUser, (e) => call(updateUser: e)); } } -class _CopyWithStubImpl$Mutation$UpdateUser - implements CopyWith$Mutation$UpdateUser { +class _CopyWithStubImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { _CopyWithStubImpl$Mutation$UpdateUser(this._res); TRes _res; - call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => - _res; - CopyWith$Mutation$UpdateUser$updateUser get updateUser => - CopyWith$Mutation$UpdateUser$updateUser.stub(_res); + call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => _res; + + CopyWith$Mutation$UpdateUser$updateUser get updateUser => CopyWith$Mutation$UpdateUser$updateUser.stub(_res); } const documentNodeMutationUpdateUser = DocumentNode(definitions: [ @@ -2088,8 +1650,7 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode( - name: NameNode(value: 'UserMutationInput'), isNonNull: true), + type: NamedTypeNode(name: NameNode(value: 'UserMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -2098,55 +1659,32 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'updateUser'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'user'), - value: VariableNode(name: NameNode(value: 'user'))) - ], + arguments: [ArgumentNode(name: NameNode(value: 'user'), value: VariableNode(name: NameNode(value: 'user')))], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => - Mutation$UpdateUser.fromJson(data); -typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( - dynamic, Mutation$UpdateUser?); -class Options$Mutation$UpdateUser - extends graphql.MutationOptions { +Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); + +typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function(dynamic, Mutation$UpdateUser?); + +class Options$Mutation$UpdateUser extends graphql.MutationOptions { Options$Mutation$UpdateUser( {String? operationName, required Variables$Mutation$UpdateUser variables, @@ -2167,10 +1705,7 @@ class Options$Mutation$UpdateUser cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$UpdateUser(data)), + onCompleted: onCompleted == null ? null : (data) => onCompleted(data, data == null ? null : _parserFn$Mutation$UpdateUser(data)), update: update, onError: onError, document: documentNodeMutationUpdateUser, @@ -2179,16 +1714,11 @@ class Options$Mutation$UpdateUser final OnMutationCompleted$Mutation$UpdateUser? onCompletedWithParsed; @override - List get properties => [ - ...super.onCompleted == null - ? super.properties - : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed - ]; + List get properties => + [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; } -class WatchOptions$Mutation$UpdateUser - extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$UpdateUser extends graphql.WatchQueryOptions { WatchOptions$Mutation$UpdateUser( {String? operationName, required Variables$Mutation$UpdateUser variables, @@ -2218,27 +1748,17 @@ class WatchOptions$Mutation$UpdateUser } extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { - Future> mutate$UpdateUser( - Options$Mutation$UpdateUser options) async => - await this.mutate(options); - graphql.ObservableQuery watchMutation$UpdateUser( - WatchOptions$Mutation$UpdateUser options) => - this.watchMutation(options); + Future> mutate$UpdateUser(Options$Mutation$UpdateUser options) async => await this.mutate(options); + + graphql.ObservableQuery watchMutation$UpdateUser(WatchOptions$Mutation$UpdateUser options) => this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$UpdateUser$updateUser - implements Fragment$basicMutationReturnFields { - Mutation$UpdateUser$updateUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); +class Mutation$UpdateUser$updateUser implements Fragment$basicMutationReturnFields { + Mutation$UpdateUser$updateUser({required this.code, required this.message, required this.success, required this.$__typename, this.user}); @override - factory Mutation$UpdateUser$updateUser.fromJson(Map json) => - _$Mutation$UpdateUser$updateUserFromJson(json); + factory Mutation$UpdateUser$updateUser.fromJson(Map json) => _$Mutation$UpdateUser$updateUserFromJson(json); final int code; @@ -2258,15 +1778,13 @@ class Mutation$UpdateUser$updateUser final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser$updateUser) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$UpdateUser$updateUser) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -2286,32 +1804,21 @@ class Mutation$UpdateUser$updateUser } } -extension UtilityExtension$Mutation$UpdateUser$updateUser - on Mutation$UpdateUser$updateUser { - CopyWith$Mutation$UpdateUser$updateUser - get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); +extension UtilityExtension$Mutation$UpdateUser$updateUser on Mutation$UpdateUser$updateUser { + CopyWith$Mutation$UpdateUser$updateUser get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); } abstract class CopyWith$Mutation$UpdateUser$updateUser { - factory CopyWith$Mutation$UpdateUser$updateUser( - Mutation$UpdateUser$updateUser instance, - TRes Function(Mutation$UpdateUser$updateUser) then) = + factory CopyWith$Mutation$UpdateUser$updateUser(Mutation$UpdateUser$updateUser instance, TRes Function(Mutation$UpdateUser$updateUser) then) = _CopyWithImpl$Mutation$UpdateUser$updateUser; - factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = - _CopyWithStubImpl$Mutation$UpdateUser$updateUser; + factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser$updateUser; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$UpdateUser$updateUser - implements CopyWith$Mutation$UpdateUser$updateUser { +class _CopyWithImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { _CopyWithImpl$Mutation$UpdateUser$updateUser(this._instance, this._then); final Mutation$UpdateUser$updateUser _instance; @@ -2327,44 +1834,25 @@ class _CopyWithImpl$Mutation$UpdateUser$updateUser Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$UpdateUser$updateUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null ? _instance.message : (message as String), + success: success == _undefined || success == null ? _instance.success : (success as bool), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), + user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null - ? CopyWith$Fragment$userFields.stub(_then(_instance)) - : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$UpdateUser$updateUser - implements CopyWith$Mutation$UpdateUser$updateUser { +class _CopyWithStubImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { _CopyWithStubImpl$Mutation$UpdateUser$updateUser(this._res); TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => - _res; - CopyWith$Fragment$userFields get user => - CopyWith$Fragment$userFields.stub(_res); + call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + + CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2372,8 +1860,7 @@ class Variables$Mutation$AddSshKey { Variables$Mutation$AddSshKey({required this.sshInput}); @override - factory Variables$Mutation$AddSshKey.fromJson(Map json) => - _$Variables$Mutation$AddSshKeyFromJson(json); + factory Variables$Mutation$AddSshKey.fromJson(Map json) => _$Variables$Mutation$AddSshKeyFromJson(json); final Input$SshMutationInput sshInput; @@ -2386,32 +1873,26 @@ class Variables$Mutation$AddSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AddSshKey) || - runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$AddSshKey) || runtimeType != other.runtimeType) return false; final l$sshInput = sshInput; final lOther$sshInput = other.sshInput; if (l$sshInput != lOther$sshInput) return false; return true; } - CopyWith$Variables$Mutation$AddSshKey - get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); + CopyWith$Variables$Mutation$AddSshKey get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$AddSshKey { - factory CopyWith$Variables$Mutation$AddSshKey( - Variables$Mutation$AddSshKey instance, - TRes Function(Variables$Mutation$AddSshKey) then) = + factory CopyWith$Variables$Mutation$AddSshKey(Variables$Mutation$AddSshKey instance, TRes Function(Variables$Mutation$AddSshKey) then) = _CopyWithImpl$Variables$Mutation$AddSshKey; - factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$AddSshKey; + factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$AddSshKey; TRes call({Input$SshMutationInput? sshInput}); } -class _CopyWithImpl$Variables$Mutation$AddSshKey - implements CopyWith$Variables$Mutation$AddSshKey { +class _CopyWithImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); final Variables$Mutation$AddSshKey _instance; @@ -2420,15 +1901,11 @@ class _CopyWithImpl$Variables$Mutation$AddSshKey static const _undefined = {}; - TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$AddSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); + TRes call({Object? sshInput = _undefined}) => _then( + Variables$Mutation$AddSshKey(sshInput: sshInput == _undefined || sshInput == null ? _instance.sshInput : (sshInput as Input$SshMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$AddSshKey - implements CopyWith$Variables$Mutation$AddSshKey { +class _CopyWithStubImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { _CopyWithStubImpl$Variables$Mutation$AddSshKey(this._res); TRes _res; @@ -2441,8 +1918,7 @@ class Mutation$AddSshKey { Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); @override - factory Mutation$AddSshKey.fromJson(Map json) => - _$Mutation$AddSshKeyFromJson(json); + factory Mutation$AddSshKey.fromJson(Map json) => _$Mutation$AddSshKeyFromJson(json); final Mutation$AddSshKey$addSshKey addSshKey; @@ -2459,8 +1935,7 @@ class Mutation$AddSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) - return false; + if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) return false; final l$addSshKey = addSshKey; final lOther$addSshKey = other.addSshKey; if (l$addSshKey != lOther$addSshKey) return false; @@ -2472,24 +1947,19 @@ class Mutation$AddSshKey { } extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { - CopyWith$Mutation$AddSshKey get copyWith => - CopyWith$Mutation$AddSshKey(this, (i) => i); + CopyWith$Mutation$AddSshKey get copyWith => CopyWith$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Mutation$AddSshKey { - factory CopyWith$Mutation$AddSshKey( - Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = - _CopyWithImpl$Mutation$AddSshKey; + factory CopyWith$Mutation$AddSshKey(Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = _CopyWithImpl$Mutation$AddSshKey; - factory CopyWith$Mutation$AddSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$AddSshKey; + factory CopyWith$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey; TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; } -class _CopyWithImpl$Mutation$AddSshKey - implements CopyWith$Mutation$AddSshKey { +class _CopyWithImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); final Mutation$AddSshKey _instance; @@ -2498,31 +1968,24 @@ class _CopyWithImpl$Mutation$AddSshKey static const _undefined = {}; - TRes call( - {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => - _then(Mutation$AddSshKey( - addSshKey: addSshKey == _undefined || addSshKey == null - ? _instance.addSshKey - : (addSshKey as Mutation$AddSshKey$addSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? addSshKey = _undefined, Object? $__typename = _undefined}) => _then(Mutation$AddSshKey( + addSshKey: addSshKey == _undefined || addSshKey == null ? _instance.addSshKey : (addSshKey as Mutation$AddSshKey$addSshKey), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { final local$addSshKey = _instance.addSshKey; - return CopyWith$Mutation$AddSshKey$addSshKey( - local$addSshKey, (e) => call(addSshKey: e)); + return CopyWith$Mutation$AddSshKey$addSshKey(local$addSshKey, (e) => call(addSshKey: e)); } } -class _CopyWithStubImpl$Mutation$AddSshKey - implements CopyWith$Mutation$AddSshKey { +class _CopyWithStubImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { _CopyWithStubImpl$Mutation$AddSshKey(this._res); TRes _res; call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => - CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); + + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); } const documentNodeMutationAddSshKey = DocumentNode(definitions: [ @@ -2532,8 +1995,7 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), + type: NamedTypeNode(name: NameNode(value: 'SshMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -2542,55 +2004,32 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'addSshKey'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], + arguments: [ArgumentNode(name: NameNode(value: 'sshInput'), value: VariableNode(name: NameNode(value: 'sshInput')))], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => - Mutation$AddSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( - dynamic, Mutation$AddSshKey?); -class Options$Mutation$AddSshKey - extends graphql.MutationOptions { +Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => Mutation$AddSshKey.fromJson(data); + +typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function(dynamic, Mutation$AddSshKey?); + +class Options$Mutation$AddSshKey extends graphql.MutationOptions { Options$Mutation$AddSshKey( {String? operationName, required Variables$Mutation$AddSshKey variables, @@ -2611,10 +2050,7 @@ class Options$Mutation$AddSshKey cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$AddSshKey(data)), + onCompleted: onCompleted == null ? null : (data) => onCompleted(data, data == null ? null : _parserFn$Mutation$AddSshKey(data)), update: update, onError: onError, document: documentNodeMutationAddSshKey, @@ -2623,16 +2059,11 @@ class Options$Mutation$AddSshKey final OnMutationCompleted$Mutation$AddSshKey? onCompletedWithParsed; @override - List get properties => [ - ...super.onCompleted == null - ? super.properties - : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed - ]; + List get properties => + [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; } -class WatchOptions$Mutation$AddSshKey - extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$AddSshKey extends graphql.WatchQueryOptions { WatchOptions$Mutation$AddSshKey( {String? operationName, required Variables$Mutation$AddSshKey variables, @@ -2662,27 +2093,17 @@ class WatchOptions$Mutation$AddSshKey } extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { - Future> mutate$AddSshKey( - Options$Mutation$AddSshKey options) async => - await this.mutate(options); - graphql.ObservableQuery watchMutation$AddSshKey( - WatchOptions$Mutation$AddSshKey options) => - this.watchMutation(options); + Future> mutate$AddSshKey(Options$Mutation$AddSshKey options) async => await this.mutate(options); + + graphql.ObservableQuery watchMutation$AddSshKey(WatchOptions$Mutation$AddSshKey options) => this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$AddSshKey$addSshKey - implements Fragment$basicMutationReturnFields { - Mutation$AddSshKey$addSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); +class Mutation$AddSshKey$addSshKey implements Fragment$basicMutationReturnFields { + Mutation$AddSshKey$addSshKey({required this.code, required this.message, required this.success, required this.$__typename, this.user}); @override - factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => - _$Mutation$AddSshKey$addSshKeyFromJson(json); + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => _$Mutation$AddSshKey$addSshKeyFromJson(json); final int code; @@ -2702,15 +2123,13 @@ class Mutation$AddSshKey$addSshKey final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey$addSshKey) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$AddSshKey$addSshKey) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -2730,32 +2149,21 @@ class Mutation$AddSshKey$addSshKey } } -extension UtilityExtension$Mutation$AddSshKey$addSshKey - on Mutation$AddSshKey$addSshKey { - CopyWith$Mutation$AddSshKey$addSshKey - get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); +extension UtilityExtension$Mutation$AddSshKey$addSshKey on Mutation$AddSshKey$addSshKey { + CopyWith$Mutation$AddSshKey$addSshKey get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); } abstract class CopyWith$Mutation$AddSshKey$addSshKey { - factory CopyWith$Mutation$AddSshKey$addSshKey( - Mutation$AddSshKey$addSshKey instance, - TRes Function(Mutation$AddSshKey$addSshKey) then) = + factory CopyWith$Mutation$AddSshKey$addSshKey(Mutation$AddSshKey$addSshKey instance, TRes Function(Mutation$AddSshKey$addSshKey) then) = _CopyWithImpl$Mutation$AddSshKey$addSshKey; - factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; + factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$AddSshKey$addSshKey - implements CopyWith$Mutation$AddSshKey$addSshKey { +class _CopyWithImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); final Mutation$AddSshKey$addSshKey _instance; @@ -2771,44 +2179,25 @@ class _CopyWithImpl$Mutation$AddSshKey$addSshKey Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$AddSshKey$addSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null ? _instance.message : (message as String), + success: success == _undefined || success == null ? _instance.success : (success as bool), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), + user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null - ? CopyWith$Fragment$userFields.stub(_then(_instance)) - : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey - implements CopyWith$Mutation$AddSshKey$addSshKey { +class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { _CopyWithStubImpl$Mutation$AddSshKey$addSshKey(this._res); TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => - _res; - CopyWith$Fragment$userFields get user => - CopyWith$Fragment$userFields.stub(_res); + call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + + CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2816,13 +2205,11 @@ class Variables$Mutation$RemoveSshKey { Variables$Mutation$RemoveSshKey({required this.sshInput}); @override - factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => - _$Variables$Mutation$RemoveSshKeyFromJson(json); + factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => _$Variables$Mutation$RemoveSshKeyFromJson(json); final Input$SshMutationInput sshInput; - Map toJson() => - _$Variables$Mutation$RemoveSshKeyToJson(this); + Map toJson() => _$Variables$Mutation$RemoveSshKeyToJson(this); int get hashCode { final l$sshInput = sshInput; return Object.hashAll([l$sshInput]); @@ -2831,32 +2218,26 @@ class Variables$Mutation$RemoveSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveSshKey) || - runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$RemoveSshKey) || runtimeType != other.runtimeType) return false; final l$sshInput = sshInput; final lOther$sshInput = other.sshInput; if (l$sshInput != lOther$sshInput) return false; return true; } - CopyWith$Variables$Mutation$RemoveSshKey - get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Variables$Mutation$RemoveSshKey get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RemoveSshKey { - factory CopyWith$Variables$Mutation$RemoveSshKey( - Variables$Mutation$RemoveSshKey instance, - TRes Function(Variables$Mutation$RemoveSshKey) then) = + factory CopyWith$Variables$Mutation$RemoveSshKey(Variables$Mutation$RemoveSshKey instance, TRes Function(Variables$Mutation$RemoveSshKey) then) = _CopyWithImpl$Variables$Mutation$RemoveSshKey; - factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; + factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; TRes call({Input$SshMutationInput? sshInput}); } -class _CopyWithImpl$Variables$Mutation$RemoveSshKey - implements CopyWith$Variables$Mutation$RemoveSshKey { +class _CopyWithImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); final Variables$Mutation$RemoveSshKey _instance; @@ -2865,15 +2246,11 @@ class _CopyWithImpl$Variables$Mutation$RemoveSshKey static const _undefined = {}; - TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$RemoveSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); + TRes call({Object? sshInput = _undefined}) => _then(Variables$Mutation$RemoveSshKey( + sshInput: sshInput == _undefined || sshInput == null ? _instance.sshInput : (sshInput as Input$SshMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey - implements CopyWith$Variables$Mutation$RemoveSshKey { +class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { _CopyWithStubImpl$Variables$Mutation$RemoveSshKey(this._res); TRes _res; @@ -2883,12 +2260,10 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey @JsonSerializable(explicitToJson: true) class Mutation$RemoveSshKey { - Mutation$RemoveSshKey( - {required this.removeSshKey, required this.$__typename}); + Mutation$RemoveSshKey({required this.removeSshKey, required this.$__typename}); @override - factory Mutation$RemoveSshKey.fromJson(Map json) => - _$Mutation$RemoveSshKeyFromJson(json); + factory Mutation$RemoveSshKey.fromJson(Map json) => _$Mutation$RemoveSshKeyFromJson(json); final Mutation$RemoveSshKey$removeSshKey removeSshKey; @@ -2905,8 +2280,7 @@ class Mutation$RemoveSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) - return false; + if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) return false; final l$removeSshKey = removeSshKey; final lOther$removeSshKey = other.removeSshKey; if (l$removeSshKey != lOther$removeSshKey) return false; @@ -2918,25 +2292,20 @@ class Mutation$RemoveSshKey { } extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { - CopyWith$Mutation$RemoveSshKey get copyWith => - CopyWith$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Mutation$RemoveSshKey get copyWith => CopyWith$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Mutation$RemoveSshKey { - factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, - TRes Function(Mutation$RemoveSshKey) then) = + factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, TRes Function(Mutation$RemoveSshKey) then) = _CopyWithImpl$Mutation$RemoveSshKey; - factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$RemoveSshKey; + factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey; - TRes call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); + TRes call({Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; } -class _CopyWithImpl$Mutation$RemoveSshKey - implements CopyWith$Mutation$RemoveSshKey { +class _CopyWithImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); final Mutation$RemoveSshKey _instance; @@ -2945,35 +2314,25 @@ class _CopyWithImpl$Mutation$RemoveSshKey static const _undefined = {}; - TRes call( - {Object? removeSshKey = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$RemoveSshKey( - removeSshKey: removeSshKey == _undefined || removeSshKey == null - ? _instance.removeSshKey - : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + TRes call({Object? removeSshKey = _undefined, Object? $__typename = _undefined}) => _then(Mutation$RemoveSshKey( + removeSshKey: + removeSshKey == _undefined || removeSshKey == null ? _instance.removeSshKey : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { final local$removeSshKey = _instance.removeSshKey; - return CopyWith$Mutation$RemoveSshKey$removeSshKey( - local$removeSshKey, (e) => call(removeSshKey: e)); + return CopyWith$Mutation$RemoveSshKey$removeSshKey(local$removeSshKey, (e) => call(removeSshKey: e)); } } -class _CopyWithStubImpl$Mutation$RemoveSshKey - implements CopyWith$Mutation$RemoveSshKey { +class _CopyWithStubImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { _CopyWithStubImpl$Mutation$RemoveSshKey(this._res); TRes _res; - call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, - String? $__typename}) => - _res; - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => - CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); + call({Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}) => _res; + + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); } const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ @@ -2983,8 +2342,7 @@ const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), + type: NamedTypeNode(name: NameNode(value: 'SshMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -2993,56 +2351,32 @@ const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'removeSshKey'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], + arguments: [ArgumentNode(name: NameNode(value: 'sshInput'), value: VariableNode(name: NameNode(value: 'sshInput')))], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) + FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( - Map data) => - Mutation$RemoveSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( - dynamic, Mutation$RemoveSshKey?); -class Options$Mutation$RemoveSshKey - extends graphql.MutationOptions { +Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey(Map data) => Mutation$RemoveSshKey.fromJson(data); + +typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function(dynamic, Mutation$RemoveSshKey?); + +class Options$Mutation$RemoveSshKey extends graphql.MutationOptions { Options$Mutation$RemoveSshKey( {String? operationName, required Variables$Mutation$RemoveSshKey variables, @@ -3063,13 +2397,7 @@ class Options$Mutation$RemoveSshKey cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( - data, - data == null - ? null - : _parserFn$Mutation$RemoveSshKey(data)), + onCompleted: onCompleted == null ? null : (data) => onCompleted(data, data == null ? null : _parserFn$Mutation$RemoveSshKey(data)), update: update, onError: onError, document: documentNodeMutationRemoveSshKey, @@ -3078,16 +2406,11 @@ class Options$Mutation$RemoveSshKey final OnMutationCompleted$Mutation$RemoveSshKey? onCompletedWithParsed; @override - List get properties => [ - ...super.onCompleted == null - ? super.properties - : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed - ]; + List get properties => + [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; } -class WatchOptions$Mutation$RemoveSshKey - extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$RemoveSshKey extends graphql.WatchQueryOptions { WatchOptions$Mutation$RemoveSshKey( {String? operationName, required Variables$Mutation$RemoveSshKey variables, @@ -3117,28 +2440,18 @@ class WatchOptions$Mutation$RemoveSshKey } extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { - Future> mutate$RemoveSshKey( - Options$Mutation$RemoveSshKey options) async => - await this.mutate(options); - graphql.ObservableQuery watchMutation$RemoveSshKey( - WatchOptions$Mutation$RemoveSshKey options) => + Future> mutate$RemoveSshKey(Options$Mutation$RemoveSshKey options) async => await this.mutate(options); + + graphql.ObservableQuery watchMutation$RemoveSshKey(WatchOptions$Mutation$RemoveSshKey options) => this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$RemoveSshKey$removeSshKey - implements Fragment$basicMutationReturnFields { - Mutation$RemoveSshKey$removeSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); +class Mutation$RemoveSshKey$removeSshKey implements Fragment$basicMutationReturnFields { + Mutation$RemoveSshKey$removeSshKey({required this.code, required this.message, required this.success, required this.$__typename, this.user}); @override - factory Mutation$RemoveSshKey$removeSshKey.fromJson( - Map json) => - _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + factory Mutation$RemoveSshKey$removeSshKey.fromJson(Map json) => _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); final int code; @@ -3151,23 +2464,20 @@ class Mutation$RemoveSshKey$removeSshKey final Fragment$userFields? user; - Map toJson() => - _$Mutation$RemoveSshKey$removeSshKeyToJson(this); + Map toJson() => _$Mutation$RemoveSshKey$removeSshKeyToJson(this); int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey$removeSshKey) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$RemoveSshKey$removeSshKey) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -3187,34 +2497,23 @@ class Mutation$RemoveSshKey$removeSshKey } } -extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey - on Mutation$RemoveSshKey$removeSshKey { - CopyWith$Mutation$RemoveSshKey$removeSshKey< - Mutation$RemoveSshKey$removeSshKey> - get copyWith => - CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey on Mutation$RemoveSshKey$removeSshKey { + CopyWith$Mutation$RemoveSshKey$removeSshKey get copyWith => + CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); } abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { factory CopyWith$Mutation$RemoveSshKey$removeSshKey( - Mutation$RemoveSshKey$removeSshKey instance, - TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = + Mutation$RemoveSshKey$removeSshKey instance, TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; - factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = - _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; + factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey - implements CopyWith$Mutation$RemoveSshKey$removeSshKey { +class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); final Mutation$RemoveSshKey$removeSshKey _instance; @@ -3230,42 +2529,23 @@ class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$RemoveSshKey$removeSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null ? _instance.message : (message as String), + success: success == _undefined || success == null ? _instance.success : (success as bool), + $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), + user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null - ? CopyWith$Fragment$userFields.stub(_then(_instance)) - : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey - implements CopyWith$Mutation$RemoveSshKey$removeSshKey { +class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey(this._res); TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => - _res; - CopyWith$Fragment$userFields get user => - CopyWith$Fragment$userFields.stub(_res); + call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + + CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart index 299005f1..a9dfff53 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart @@ -6,37 +6,28 @@ part of 'users.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson(Map json) => Fragment$basicMutationReturnFields( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { +Map _$Fragment$basicMutationReturnFieldsToJson(Fragment$basicMutationReturnFields instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; -Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => - Fragment$userFields( +Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => Fragment$userFields( username: json['username'] as String, - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - sshKeys: - (json['sshKeys'] as List).map((e) => e as String).toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], unknownValue: Enum$UserType.$unknown), + sshKeys: (json['sshKeys'] as List).map((e) => e as String).toList(), $__typename: json['__typename'] as String, ); -Map _$Fragment$userFieldsToJson( - Fragment$userFields instance) => - { +Map _$Fragment$userFieldsToJson(Fragment$userFields instance) => { 'username': instance.username, 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'sshKeys': instance.sshKeys, @@ -50,118 +41,83 @@ const _$Enum$UserTypeEnumMap = { Enum$UserType.$unknown: r'$unknown', }; -Query$AllUsers _$Query$AllUsersFromJson(Map json) => - Query$AllUsers( - users: - Query$AllUsers$users.fromJson(json['users'] as Map), +Query$AllUsers _$Query$AllUsersFromJson(Map json) => Query$AllUsers( + users: Query$AllUsers$users.fromJson(json['users'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$AllUsersToJson(Query$AllUsers instance) => - { +Map _$Query$AllUsersToJson(Query$AllUsers instance) => { 'users': instance.users.toJson(), '__typename': instance.$__typename, }; -Query$AllUsers$users _$Query$AllUsers$usersFromJson( - Map json) => - Query$AllUsers$users( - allUsers: (json['allUsers'] as List) - .map((e) => Fragment$userFields.fromJson(e as Map)) - .toList(), +Query$AllUsers$users _$Query$AllUsers$usersFromJson(Map json) => Query$AllUsers$users( + allUsers: (json['allUsers'] as List).map((e) => Fragment$userFields.fromJson(e as Map)).toList(), + rootUser: json['rootUser'] == null ? null : Fragment$userFields.fromJson(json['rootUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$AllUsers$usersToJson( - Query$AllUsers$users instance) => - { +Map _$Query$AllUsers$usersToJson(Query$AllUsers$users instance) => { 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), + 'rootUser': instance.rootUser?.toJson(), '__typename': instance.$__typename, }; -Variables$Query$GetUser _$Variables$Query$GetUserFromJson( - Map json) => - Variables$Query$GetUser( +Variables$Query$GetUser _$Variables$Query$GetUserFromJson(Map json) => Variables$Query$GetUser( username: json['username'] as String, ); -Map _$Variables$Query$GetUserToJson( - Variables$Query$GetUser instance) => - { +Map _$Variables$Query$GetUserToJson(Variables$Query$GetUser instance) => { 'username': instance.username, }; -Query$GetUser _$Query$GetUserFromJson(Map json) => - Query$GetUser( - users: - Query$GetUser$users.fromJson(json['users'] as Map), +Query$GetUser _$Query$GetUserFromJson(Map json) => Query$GetUser( + users: Query$GetUser$users.fromJson(json['users'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetUserToJson(Query$GetUser instance) => - { +Map _$Query$GetUserToJson(Query$GetUser instance) => { 'users': instance.users.toJson(), '__typename': instance.$__typename, }; -Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => - Query$GetUser$users( - getUser: json['getUser'] == null - ? null - : Fragment$userFields.fromJson( - json['getUser'] as Map), +Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => Query$GetUser$users( + getUser: json['getUser'] == null ? null : Fragment$userFields.fromJson(json['getUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetUser$usersToJson( - Query$GetUser$users instance) => - { +Map _$Query$GetUser$usersToJson(Query$GetUser$users instance) => { 'getUser': instance.getUser?.toJson(), '__typename': instance.$__typename, }; -Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson( - Map json) => - Variables$Mutation$CreateUser( - user: Input$UserMutationInput.fromJson( - json['user'] as Map), +Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson(Map json) => Variables$Mutation$CreateUser( + user: Input$UserMutationInput.fromJson(json['user'] as Map), ); -Map _$Variables$Mutation$CreateUserToJson( - Variables$Mutation$CreateUser instance) => - { +Map _$Variables$Mutation$CreateUserToJson(Variables$Mutation$CreateUser instance) => { 'user': instance.user.toJson(), }; -Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => - Mutation$CreateUser( - createUser: Mutation$CreateUser$createUser.fromJson( - json['createUser'] as Map), +Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => Mutation$CreateUser( + createUser: Mutation$CreateUser$createUser.fromJson(json['createUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$CreateUserToJson( - Mutation$CreateUser instance) => - { +Map _$Mutation$CreateUserToJson(Mutation$CreateUser instance) => { 'createUser': instance.createUser.toJson(), '__typename': instance.$__typename, }; -Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson( - Map json) => - Mutation$CreateUser$createUser( +Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson(Map json) => Mutation$CreateUser$createUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$CreateUser$createUserToJson( - Mutation$CreateUser$createUser instance) => - { +Map _$Mutation$CreateUser$createUserToJson(Mutation$CreateUser$createUser instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -169,92 +125,65 @@ Map _$Mutation$CreateUser$createUserToJson( 'user': instance.user?.toJson(), }; -Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( - Map json) => - Variables$Mutation$DeleteUser( +Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson(Map json) => Variables$Mutation$DeleteUser( username: json['username'] as String, ); -Map _$Variables$Mutation$DeleteUserToJson( - Variables$Mutation$DeleteUser instance) => - { +Map _$Variables$Mutation$DeleteUserToJson(Variables$Mutation$DeleteUser instance) => { 'username': instance.username, }; -Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => - Mutation$DeleteUser( - deleteUser: Mutation$DeleteUser$deleteUser.fromJson( - json['deleteUser'] as Map), +Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => Mutation$DeleteUser( + deleteUser: Mutation$DeleteUser$deleteUser.fromJson(json['deleteUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$DeleteUserToJson( - Mutation$DeleteUser instance) => - { +Map _$Mutation$DeleteUserToJson(Mutation$DeleteUser instance) => { 'deleteUser': instance.deleteUser.toJson(), '__typename': instance.$__typename, }; -Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson( - Map json) => - Mutation$DeleteUser$deleteUser( +Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson(Map json) => Mutation$DeleteUser$deleteUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Mutation$DeleteUser$deleteUserToJson( - Mutation$DeleteUser$deleteUser instance) => - { +Map _$Mutation$DeleteUser$deleteUserToJson(Mutation$DeleteUser$deleteUser instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; -Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson( - Map json) => - Variables$Mutation$UpdateUser( - user: Input$UserMutationInput.fromJson( - json['user'] as Map), +Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson(Map json) => Variables$Mutation$UpdateUser( + user: Input$UserMutationInput.fromJson(json['user'] as Map), ); -Map _$Variables$Mutation$UpdateUserToJson( - Variables$Mutation$UpdateUser instance) => - { +Map _$Variables$Mutation$UpdateUserToJson(Variables$Mutation$UpdateUser instance) => { 'user': instance.user.toJson(), }; -Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => - Mutation$UpdateUser( - updateUser: Mutation$UpdateUser$updateUser.fromJson( - json['updateUser'] as Map), +Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => Mutation$UpdateUser( + updateUser: Mutation$UpdateUser$updateUser.fromJson(json['updateUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$UpdateUserToJson( - Mutation$UpdateUser instance) => - { +Map _$Mutation$UpdateUserToJson(Mutation$UpdateUser instance) => { 'updateUser': instance.updateUser.toJson(), '__typename': instance.$__typename, }; -Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson( - Map json) => - Mutation$UpdateUser$updateUser( +Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson(Map json) => Mutation$UpdateUser$updateUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$UpdateUser$updateUserToJson( - Mutation$UpdateUser$updateUser instance) => - { +Map _$Mutation$UpdateUser$updateUserToJson(Mutation$UpdateUser$updateUser instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -262,47 +191,33 @@ Map _$Mutation$UpdateUser$updateUserToJson( 'user': instance.user?.toJson(), }; -Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( - Map json) => - Variables$Mutation$AddSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), +Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson(Map json) => Variables$Mutation$AddSshKey( + sshInput: Input$SshMutationInput.fromJson(json['sshInput'] as Map), ); -Map _$Variables$Mutation$AddSshKeyToJson( - Variables$Mutation$AddSshKey instance) => - { +Map _$Variables$Mutation$AddSshKeyToJson(Variables$Mutation$AddSshKey instance) => { 'sshInput': instance.sshInput.toJson(), }; -Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => - Mutation$AddSshKey( - addSshKey: Mutation$AddSshKey$addSshKey.fromJson( - json['addSshKey'] as Map), +Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => Mutation$AddSshKey( + addSshKey: Mutation$AddSshKey$addSshKey.fromJson(json['addSshKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => - { +Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => { 'addSshKey': instance.addSshKey.toJson(), '__typename': instance.$__typename, }; -Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( - Map json) => - Mutation$AddSshKey$addSshKey( +Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson(Map json) => Mutation$AddSshKey$addSshKey( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$AddSshKey$addSshKeyToJson( - Mutation$AddSshKey$addSshKey instance) => - { +Map _$Mutation$AddSshKey$addSshKeyToJson(Mutation$AddSshKey$addSshKey instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -310,49 +225,33 @@ Map _$Mutation$AddSshKey$addSshKeyToJson( 'user': instance.user?.toJson(), }; -Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( - Map json) => - Variables$Mutation$RemoveSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), +Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson(Map json) => Variables$Mutation$RemoveSshKey( + sshInput: Input$SshMutationInput.fromJson(json['sshInput'] as Map), ); -Map _$Variables$Mutation$RemoveSshKeyToJson( - Variables$Mutation$RemoveSshKey instance) => - { +Map _$Variables$Mutation$RemoveSshKeyToJson(Variables$Mutation$RemoveSshKey instance) => { 'sshInput': instance.sshInput.toJson(), }; -Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey( - removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( - json['removeSshKey'] as Map), +Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson(Map json) => Mutation$RemoveSshKey( + removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson(json['removeSshKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$RemoveSshKeyToJson( - Mutation$RemoveSshKey instance) => - { +Map _$Mutation$RemoveSshKeyToJson(Mutation$RemoveSshKey instance) => { 'removeSshKey': instance.removeSshKey.toJson(), '__typename': instance.$__typename, }; -Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey$removeSshKey( +Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson(Map json) => Mutation$RemoveSshKey$removeSshKey( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$RemoveSshKey$removeSshKeyToJson( - Mutation$RemoveSshKey$removeSshKey instance) => - { +Map _$Mutation$RemoveSshKey$removeSshKeyToJson(Mutation$RemoveSshKey$removeSshKey instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index c1b2b801..d224f08f 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -21,6 +21,10 @@ mixin UsersApi on ApiMap { print(response.exception.toString()); } users = response.parsedData?.users.allUsers.map((final user) => User.fromGraphQL(user)).toList() ?? []; + final rootUser = response.parsedData?.users.rootUser; + if (rootUser != null) { + users.add(User.fromGraphQL(rootUser)); + } } catch (e) { print(e); } diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 46e39568..442b2ed8 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -1,6 +1,8 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:hive/hive.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -14,8 +16,6 @@ class UsersCubit extends ServerInstallationDependendCubit { serverInstallationCubit, const UsersState( [], - User(login: 'root', type: UserType.root), - User(login: 'loading...', type: UserType.primary), ), ); Box box = Hive.box(BNames.usersBox); @@ -25,167 +25,38 @@ class UsersCubit extends ServerInstallationDependendCubit { @override Future load() async { - if (serverInstallationCubit.state is ServerInstallationFinished) { - final List loadedUsers = box.values.toList(); - final primaryUser = serverInstallationBox.get( - BNames.rootUser, - defaultValue: const User(login: 'loading...', type: UserType.primary), - ); - final List rootKeys = [...serverInstallationBox.get(BNames.rootKeys, defaultValue: [])]; - if (loadedUsers.isNotEmpty) { - emit( - UsersState( - loadedUsers, - User(login: 'root', sshKeys: rootKeys, type: UserType.root), - primaryUser, - ), - ); - } - - final ApiResponse> usersFromServer = await api.getUsersList(); - if (usersFromServer.isSuccess) { - final List updatedList = mergeLocalAndServerUsers(loadedUsers, usersFromServer.data); - emit( - UsersState( - updatedList, - User(login: 'root', sshKeys: rootKeys, type: UserType.root), - primaryUser, - ), - ); - } - - final List usersWithSshKeys = await loadSshKeys(state.users); - // Update the users it the box - box.clear(); - box.addAll(usersWithSshKeys); - - final User rootUserWithSshKeys = (await loadSshKeys([state.rootUser])).first; - serverInstallationBox.put(BNames.rootKeys, rootUserWithSshKeys.sshKeys); - final User primaryUserWithSshKeys = (await loadSshKeys([state.primaryUser])).first; - serverInstallationBox.put(BNames.rootUser, primaryUserWithSshKeys); + if (serverInstallationCubit.state is! ServerInstallationFinished) { + return; + } + final List loadedUsers = box.values.toList(); + if (loadedUsers.isNotEmpty) { emit( UsersState( - usersWithSshKeys, - rootUserWithSshKeys, - primaryUserWithSshKeys, - ), - ); - } - } - - List mergeLocalAndServerUsers( - final List localUsers, - final List serverUsers, - ) { - // If local user not exists on server, add it with isFoundOnServer = false - // If server user not exists on local, add it - - final List mergedUsers = []; - final List serverUsersCopy = List.from(serverUsers); - - for (final User localUser in localUsers) { - if (serverUsersCopy.contains(localUser.login)) { - mergedUsers.add( - User( - login: localUser.login, - type: UserType.normal, - isFoundOnServer: true, - password: localUser.password, - sshKeys: localUser.sshKeys, - ), - ); - serverUsersCopy.remove(localUser.login); - } else { - mergedUsers.add( - User( - login: localUser.login, - type: UserType.normal, - isFoundOnServer: false, - password: localUser.password, - note: localUser.note, - ), - ); - } - } - - for (final String serverUser in serverUsersCopy) { - mergedUsers.add( - User( - login: serverUser, - type: UserType.normal, - isFoundOnServer: true, + loadedUsers, ), ); } - return mergedUsers; - } - - Future> loadSshKeys(final List users) async { - final List updatedUsers = []; - - for (final User user in users) { - if (user.isFoundOnServer || user.login == 'root' || user.login == state.primaryUser.login) { - final ApiResponse> sshKeys = await api.getUserSshKeys(user); - print('sshKeys for $user: ${sshKeys.data}'); - if (sshKeys.isSuccess) { - updatedUsers.add( - User( - login: user.login, - type: user.type, - isFoundOnServer: true, - password: user.password, - sshKeys: sshKeys.data, - note: user.note, - ), - ); - } else { - updatedUsers.add( - User( - login: user.login, - type: user.type, - isFoundOnServer: true, - password: user.password, - note: user.note, - ), - ); - } - } else { - updatedUsers.add( - User( - login: user.login, - type: user.type, - isFoundOnServer: false, - password: user.password, - note: user.note, - ), - ); - } - } - return updatedUsers; + refresh(); } Future refresh() async { - List updatedUsers = List.from(state.users); - final ApiResponse> usersFromServer = await api.getUsersList(); - if (usersFromServer.isSuccess) { - updatedUsers = mergeLocalAndServerUsers(updatedUsers, usersFromServer.data); + if (serverInstallationCubit.state is! ServerInstallationFinished) { + return; + } + final List usersFromServer = await api.getAllUsers(); + if (usersFromServer.isNotEmpty) { + emit( + UsersState( + usersFromServer, + ), + ); + // Update the users it the box + box.clear(); + box.addAll(usersFromServer); + } else { + getIt().showSnackBar('users.could_not_fetch_users'.tr()); } - final List usersWithSshKeys = await loadSshKeys(updatedUsers); - box.clear(); - box.addAll(usersWithSshKeys); - final User rootUserWithSshKeys = (await loadSshKeys([state.rootUser])).first; - serverInstallationBox.put(BNames.rootKeys, rootUserWithSshKeys.sshKeys); - final User primaryUserWithSshKeys = (await loadSshKeys([state.primaryUser])).first; - serverInstallationBox.put(BNames.rootUser, primaryUserWithSshKeys); - emit( - UsersState( - usersWithSshKeys, - rootUserWithSshKeys, - primaryUserWithSshKeys, - ), - ); - return; } Future createUser(final User user) async { @@ -193,18 +64,21 @@ class UsersCubit extends ServerInstallationDependendCubit { if (state.users.any((final User u) => u.login == user.login && u.isFoundOnServer)) { return; } - // If user is root or primary user, do nothing - if (user.login == 'root' || user.login == state.primaryUser.login) { + final String? password = user.password; + if (password == null) { + getIt().showSnackBar('users.could_not_create_user'.tr()); return; } // If API returned error, do nothing - final ApiResponse result = await api.createUser(user); - if (!result.isSuccess) { + final UserMutationResult result = await api.createUser(user.login, password); + final User? createdUser = result.user; + if (!result.success || createdUser == null) { + getIt().showSnackBar(result.message ?? 'users.could_not_create_user'.tr()); return; } final List loadedUsers = List.from(state.users); - loadedUsers.add(result.data); + loadedUsers.add(createdUser); await box.clear(); await box.addAll(loadedUsers); emit(state.copyWith(users: loadedUsers)); @@ -212,142 +86,52 @@ class UsersCubit extends ServerInstallationDependendCubit { Future deleteUser(final User user) async { // If user is primary or root, don't delete - if (user.login == state.primaryUser.login || user.login == 'root') { + if (user.type != UserType.normal) { + getIt().showSnackBar('users.could_not_delete_user'.tr()); return; } final List loadedUsers = List.from(state.users); - final bool result = await api.deleteUser(user); - if (result) { + final GenericMutationResult result = await api.deleteUser(user.login); + if (result.success) { loadedUsers.removeWhere((final User u) => u.login == user.login); await box.clear(); await box.addAll(loadedUsers); emit(state.copyWith(users: loadedUsers)); + } else { + getIt().showSnackBar(result.message ?? 'users.could_not_delete_user'.tr()); + } + } + + Future changeUserPassword(final User user, final String newPassword) async { + if (user.type == UserType.root) { + getIt().showSnackBar('users.could_not_change_password'.tr()); + return; + } + final UserMutationResult result = await api.updateUser(user.login, newPassword); + if (!result.success) { + getIt().showSnackBar(result.message ?? 'users.could_not_change_password'.tr()); } } Future addSshKey(final User user, final String publicKey) async { - // If adding root key, use api.addRootSshKey - // Otherwise, use api.addUserSshKey - if (user.login == 'root') { - final ApiResponse result = await api.addRootSshKey(publicKey); - if (result.isSuccess) { - // Add ssh key to the array of root keys - final List rootKeys = serverInstallationBox.get(BNames.rootKeys, defaultValue: []) as List; - rootKeys.add(publicKey); - serverInstallationBox.put(BNames.rootKeys, rootKeys); - emit( - state.copyWith( - rootUser: User( - login: state.rootUser.login, - type: UserType.root, - isFoundOnServer: true, - password: state.rootUser.password, - sshKeys: rootKeys, - note: state.rootUser.note, - ), - ), - ); - } + final UserMutationResult result = await api.addSshKey(user.login, publicKey); + if (result.success) { + final User updatedUser = result.user!; + await box.putAt(box.values.toList().indexOf(user), updatedUser); + emit( + state.copyWith( + users: box.values.toList(), + ), + ); } else { - final ApiResponse result = await api.addUserSshKey(user, publicKey); - if (result.isSuccess) { - // If it is primary user, update primary user - if (user.login == state.primaryUser.login) { - final List primaryUserKeys = List.from(state.primaryUser.sshKeys); - primaryUserKeys.add(publicKey); - final User updatedUser = User( - login: state.primaryUser.login, - type: UserType.primary, - isFoundOnServer: true, - password: state.primaryUser.password, - sshKeys: primaryUserKeys, - note: state.primaryUser.note, - ); - serverInstallationBox.put(BNames.rootUser, updatedUser); - emit( - state.copyWith( - primaryUser: updatedUser, - ), - ); - } else { - // If it is not primary user, update user - final List userKeys = List.from(user.sshKeys); - userKeys.add(publicKey); - final User updatedUser = User( - login: user.login, - type: UserType.normal, - isFoundOnServer: true, - password: user.password, - sshKeys: userKeys, - note: user.note, - ); - await box.putAt(box.values.toList().indexOf(user), updatedUser); - emit( - state.copyWith( - users: box.values.toList(), - ), - ); - } - } + getIt().showSnackBar(result.message ?? 'users.could_not_add_ssh_key'.tr()); } } Future deleteSshKey(final User user, final String publicKey) async { - // All keys are deleted via api.deleteUserSshKey - - final ApiResponse result = await api.deleteUserSshKey(user, publicKey); - if (result.isSuccess) { - // If it is root user, delete key from root keys - // If it is primary user, update primary user - // If it is not primary user, update user - - if (user.login == 'root') { - final List rootKeys = serverInstallationBox.get(BNames.rootKeys, defaultValue: []) as List; - rootKeys.remove(publicKey); - serverInstallationBox.put(BNames.rootKeys, rootKeys); - emit( - state.copyWith( - rootUser: User( - login: state.rootUser.login, - type: UserType.root, - isFoundOnServer: true, - password: state.rootUser.password, - sshKeys: rootKeys, - note: state.rootUser.note, - ), - ), - ); - return; - } - if (user.login == state.primaryUser.login) { - final List primaryUserKeys = List.from(state.primaryUser.sshKeys); - primaryUserKeys.remove(publicKey); - final User updatedUser = User( - login: state.primaryUser.login, - type: UserType.primary, - isFoundOnServer: true, - password: state.primaryUser.password, - sshKeys: primaryUserKeys, - note: state.primaryUser.note, - ); - serverInstallationBox.put(BNames.rootUser, updatedUser); - emit( - state.copyWith( - primaryUser: updatedUser, - ), - ); - return; - } - final List userKeys = List.from(user.sshKeys); - userKeys.remove(publicKey); - final User updatedUser = User( - login: user.login, - type: UserType.normal, - isFoundOnServer: true, - password: user.password, - sshKeys: userKeys, - note: user.note, - ); + final UserMutationResult result = await api.removeSshKey(user.login, publicKey); + if (result.success) { + final User updatedUser = result.user!; await box.putAt(box.values.toList().indexOf(user), updatedUser); emit( state.copyWith( @@ -362,8 +146,6 @@ class UsersCubit extends ServerInstallationDependendCubit { emit( const UsersState( [], - User(login: 'root', type: UserType.root), - User(login: 'loading...', type: UserType.primary), ), ); } diff --git a/lib/logic/cubit/users/users_state.dart b/lib/logic/cubit/users/users_state.dart index fa4ed1cd..41227447 100644 --- a/lib/logic/cubit/users/users_state.dart +++ b/lib/logic/cubit/users/users_state.dart @@ -1,30 +1,27 @@ part of 'users_cubit.dart'; class UsersState extends ServerInstallationDependendState { - const UsersState(this.users, this.rootUser, this.primaryUser); + const UsersState(this.users); final List users; - final User rootUser; - final User primaryUser; + + User get rootUser => users.firstWhere((final user) => user.type == UserType.root); + + User get primaryUser => users.firstWhere((final user) => user.type == UserType.primary); + + List get normalUsers => users.where((final user) => user.type == UserType.normal).toList(); @override - List get props => [users, rootUser, primaryUser]; + List get props => [users]; UsersState copyWith({ final List? users, - final User? rootUser, - final User? primaryUser, }) => UsersState( users ?? this.users, - rootUser ?? this.rootUser, - primaryUser ?? this.primaryUser, ); - bool isLoginRegistered(final String login) => - users.any((final User user) => user.login == login) || - login == rootUser.login || - login == primaryUser.login; + bool isLoginRegistered(final String login) => users.any((final User user) => user.login == login); bool get isEmpty => users.isEmpty; } diff --git a/lib/logic/models/hive/user.g.dart b/lib/logic/models/hive/user.g.dart index a1889dc1..8076f3bb 100644 --- a/lib/logic/models/hive/user.g.dart +++ b/lib/logic/models/hive/user.g.dart @@ -18,6 +18,7 @@ class UserAdapter extends TypeAdapter { }; return User( login: fields[0] as String, + type: fields[5] == null ? UserType.normal : fields[5] as UserType, password: fields[1] as String?, sshKeys: fields[2] == null ? [] : (fields[2] as List).cast(), isFoundOnServer: fields[3] == null ? true : fields[3] as bool, @@ -28,7 +29,7 @@ class UserAdapter extends TypeAdapter { @override void write(BinaryWriter writer, User obj) { writer - ..writeByte(5) + ..writeByte(6) ..writeByte(0) ..write(obj.login) ..writeByte(1) @@ -38,16 +39,54 @@ class UserAdapter extends TypeAdapter { ..writeByte(3) ..write(obj.isFoundOnServer) ..writeByte(4) - ..write(obj.note); + ..write(obj.note) + ..writeByte(5) + ..write(obj.type); } @override int get hashCode => typeId.hashCode; @override - bool operator ==(Object other) => - identical(this, other) || - other is UserAdapter && - runtimeType == other.runtimeType && - typeId == other.typeId; + bool operator ==(Object other) => identical(this, other) || other is UserAdapter && runtimeType == other.runtimeType && typeId == other.typeId; +} + +class UserTypeAdapter extends TypeAdapter { + @override + final int typeId = 102; + + @override + UserType read(BinaryReader reader) { + switch (reader.readByte()) { + case 0: + return UserType.root; + case 1: + return UserType.primary; + case 2: + return UserType.normal; + default: + return UserType.root; + } + } + + @override + void write(BinaryWriter writer, UserType obj) { + switch (obj) { + case UserType.root: + writer.writeByte(0); + break; + case UserType.primary: + writer.writeByte(1); + break; + case UserType.normal: + writer.writeByte(2); + break; + } + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserTypeAdapter && runtimeType == other.runtimeType && typeId == other.typeId; } From 18b737a3274494d2ad2fe78af65b2bba002399a4 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 5 Sep 2022 07:34:47 +0300 Subject: [PATCH 044/732] Reformatting --- .../graphql_maps/schema/users.graphql.dart | 1698 ++++++++++++----- .../graphql_maps/schema/users.graphql.g.dart | 234 ++- .../graphql_maps/server_api/server.dart | 10 +- .../graphql_maps/server_api/users_api.dart | 26 +- lib/logic/api_maps/rest_maps/server.dart | 55 +- .../server_installation_repository.dart | 97 +- lib/logic/cubit/services/services_state.dart | 28 +- lib/logic/cubit/users/users_cubit.dart | 42 +- lib/logic/cubit/users/users_state.dart | 12 +- lib/logic/models/hive/user.dart | 3 +- lib/logic/models/hive/user.g.dart | 12 +- .../components/brand_cards/brand_cards.dart | 7 +- 12 files changed, 1637 insertions(+), 587 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 5d0e5d63..7200c167 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -10,10 +10,16 @@ part 'users.graphql.g.dart'; @JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields({required this.code, required this.message, required this.success, required this.$__typename}); + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Fragment$basicMutationReturnFields.fromJson(Map json) => _$Fragment$basicMutationReturnFieldsFromJson(json); + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); final int code; @@ -24,7 +30,8 @@ class Fragment$basicMutationReturnFields { @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -36,7 +43,8 @@ class Fragment$basicMutationReturnFields { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Fragment$basicMutationReturnFields) || runtimeType != other.runtimeType) return false; + if (!(other is Fragment$basicMutationReturnFields) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -53,22 +61,28 @@ class Fragment$basicMutationReturnFields { } } -extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { - CopyWith$Fragment$basicMutationReturnFields get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + CopyWith$Fragment$basicMutationReturnFields< + Fragment$basicMutationReturnFields> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, TRes Function(Fragment$basicMutationReturnFields) then) = + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then) = _CopyWithImpl$Fragment$basicMutationReturnFields; - factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields; TRes call({int? code, String? message, bool? success, String? $__typename}); } -class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { +class _CopyWithImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); final Fragment$basicMutationReturnFields _instance; @@ -77,62 +91,115 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith static const _undefined = {}; - TRes call({Object? code = _undefined, Object? message = _undefined, Object? success = _undefined, Object? $__typename = _undefined}) => + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { +class _CopyWithStubImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => _res; + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode(on: NamedTypeNode(name: NameNode(value: 'MutationReturnInterface'), isNonNull: false)), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false)), directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode(name: NameNode(value: 'code'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'message'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'success'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])); -const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, ]); -extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, required Map idFields, bool broadcast = true}) => + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => this.writeFragment( graphql.FragmentRequest( idFields: idFields, - fragment: const graphql.Fragment(fragmentName: 'basicMutationReturnFields', document: documentNodeFragmentbasicMutationReturnFields)), + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), data: data.toJson(), broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({required Map idFields, bool optimistic = true}) { + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( + {required Map idFields, bool optimistic = true}) { final result = this.readFragment( graphql.FragmentRequest( idFields: idFields, - fragment: const graphql.Fragment(fragmentName: 'basicMutationReturnFields', document: documentNodeFragmentbasicMutationReturnFields)), + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), optimistic: optimistic); - return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); } } @JsonSerializable(explicitToJson: true) class Fragment$userFields { - Fragment$userFields({required this.username, required this.userType, required this.sshKeys, required this.$__typename}); + Fragment$userFields( + {required this.username, + required this.userType, + required this.sshKeys, + required this.$__typename}); @override - factory Fragment$userFields.fromJson(Map json) => _$Fragment$userFieldsFromJson(json); + factory Fragment$userFields.fromJson(Map json) => + _$Fragment$userFieldsFromJson(json); final String username; @@ -150,13 +217,19 @@ class Fragment$userFields { final l$userType = userType; final l$sshKeys = sshKeys; final l$$__typename = $__typename; - return Object.hashAll([l$username, l$userType, Object.hashAll(l$sshKeys.map((v) => v)), l$$__typename]); + return Object.hashAll([ + l$username, + l$userType, + Object.hashAll(l$sshKeys.map((v) => v)), + l$$__typename + ]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) return false; + if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) + return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; @@ -180,18 +253,27 @@ class Fragment$userFields { } extension UtilityExtension$Fragment$userFields on Fragment$userFields { - CopyWith$Fragment$userFields get copyWith => CopyWith$Fragment$userFields(this, (i) => i); + CopyWith$Fragment$userFields get copyWith => + CopyWith$Fragment$userFields(this, (i) => i); } abstract class CopyWith$Fragment$userFields { - factory CopyWith$Fragment$userFields(Fragment$userFields instance, TRes Function(Fragment$userFields) then) = _CopyWithImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields(Fragment$userFields instance, + TRes Function(Fragment$userFields) then) = + _CopyWithImpl$Fragment$userFields; - factory CopyWith$Fragment$userFields.stub(TRes res) = _CopyWithStubImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$userFields; - TRes call({String? username, Enum$UserType? userType, List? sshKeys, String? $__typename}); + TRes call( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}); } -class _CopyWithImpl$Fragment$userFields implements CopyWith$Fragment$userFields { +class _CopyWithImpl$Fragment$userFields + implements CopyWith$Fragment$userFields { _CopyWithImpl$Fragment$userFields(this._instance, this._then); final Fragment$userFields _instance; @@ -200,48 +282,97 @@ class _CopyWithImpl$Fragment$userFields implements CopyWith$Fragment$userF static const _undefined = {}; - TRes call({Object? username = _undefined, Object? userType = _undefined, Object? sshKeys = _undefined, Object? $__typename = _undefined}) => + TRes call( + {Object? username = _undefined, + Object? userType = _undefined, + Object? sshKeys = _undefined, + Object? $__typename = _undefined}) => _then(Fragment$userFields( - username: username == _undefined || username == null ? _instance.username : (username as String), - userType: userType == _undefined || userType == null ? _instance.userType : (userType as Enum$UserType), - sshKeys: sshKeys == _undefined || sshKeys == null ? _instance.sshKeys : (sshKeys as List), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + username: username == _undefined || username == null + ? _instance.username + : (username as String), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); } -class _CopyWithStubImpl$Fragment$userFields implements CopyWith$Fragment$userFields { +class _CopyWithStubImpl$Fragment$userFields + implements CopyWith$Fragment$userFields { _CopyWithStubImpl$Fragment$userFields(this._res); TRes _res; - call({String? username, Enum$UserType? userType, List? sshKeys, String? $__typename}) => _res; + call( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}) => + _res; } const fragmentDefinitionuserFields = FragmentDefinitionNode( name: NameNode(value: 'userFields'), - typeCondition: TypeConditionNode(on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), + typeCondition: TypeConditionNode( + on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode(name: NameNode(value: 'username'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'userType'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'sshKeys'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])); const documentNodeFragmentuserFields = DocumentNode(definitions: [ fragmentDefinitionuserFields, ]); extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { - void writeFragment$userFields({required Fragment$userFields data, required Map idFields, bool broadcast = true}) => this - .writeFragment( + void writeFragment$userFields( + {required Fragment$userFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( graphql.FragmentRequest( - idFields: idFields, fragment: const graphql.Fragment(fragmentName: 'userFields', document: documentNodeFragmentuserFields)), + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields)), data: data.toJson(), broadcast: broadcast); - Fragment$userFields? readFragment$userFields({required Map idFields, bool optimistic = true}) { + Fragment$userFields? readFragment$userFields( + {required Map idFields, bool optimistic = true}) { final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, fragment: const graphql.Fragment(fragmentName: 'userFields', document: documentNodeFragmentuserFields)), + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields)), optimistic: optimistic); return result == null ? null : Fragment$userFields.fromJson(result); } @@ -252,7 +383,8 @@ class Query$AllUsers { Query$AllUsers({required this.users, required this.$__typename}); @override - factory Query$AllUsers.fromJson(Map json) => _$Query$AllUsersFromJson(json); + factory Query$AllUsers.fromJson(Map json) => + _$Query$AllUsersFromJson(json); final Query$AllUsers$users users; @@ -269,7 +401,8 @@ class Query$AllUsers { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) return false; + if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) + return false; final l$users = users; final lOther$users = other.users; if (l$users != lOther$users) return false; @@ -281,19 +414,24 @@ class Query$AllUsers { } extension UtilityExtension$Query$AllUsers on Query$AllUsers { - CopyWith$Query$AllUsers get copyWith => CopyWith$Query$AllUsers(this, (i) => i); + CopyWith$Query$AllUsers get copyWith => + CopyWith$Query$AllUsers(this, (i) => i); } abstract class CopyWith$Query$AllUsers { - factory CopyWith$Query$AllUsers(Query$AllUsers instance, TRes Function(Query$AllUsers) then) = _CopyWithImpl$Query$AllUsers; + factory CopyWith$Query$AllUsers( + Query$AllUsers instance, TRes Function(Query$AllUsers) then) = + _CopyWithImpl$Query$AllUsers; - factory CopyWith$Query$AllUsers.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers; + factory CopyWith$Query$AllUsers.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers; TRes call({Query$AllUsers$users? users, String? $__typename}); CopyWith$Query$AllUsers$users get users; } -class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers { +class _CopyWithImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { _CopyWithImpl$Query$AllUsers(this._instance, this._then); final Query$AllUsers _instance; @@ -302,9 +440,14 @@ class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers _then(Query$AllUsers( - users: users == _undefined || users == null ? _instance.users : (users as Query$AllUsers$users), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllUsers( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$AllUsers$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Query$AllUsers$users get users { final local$users = _instance.users; @@ -312,14 +455,16 @@ class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers implements CopyWith$Query$AllUsers { +class _CopyWithStubImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { _CopyWithStubImpl$Query$AllUsers(this._res); TRes _res; call({Query$AllUsers$users? users, String? $__typename}) => _res; - CopyWith$Query$AllUsers$users get users => CopyWith$Query$AllUsers$users.stub(_res); + CopyWith$Query$AllUsers$users get users => + CopyWith$Query$AllUsers$users.stub(_res); } const documentNodeQueryAllUsers = DocumentNode(definitions: [ @@ -341,26 +486,53 @@ const documentNodeQueryAllUsers = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), FieldNode( name: NameNode(value: 'getUser'), alias: NameNode(value: 'rootUser'), - arguments: [ArgumentNode(name: NameNode(value: 'username'), value: StringValueNode(value: 'root', isBlock: false))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: StringValueNode(value: 'root', isBlock: false)) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionuserFields, ]); -Query$AllUsers _parserFn$Query$AllUsers(Map data) => Query$AllUsers.fromJson(data); +Query$AllUsers _parserFn$Query$AllUsers(Map data) => + Query$AllUsers.fromJson(data); class Options$Query$AllUsers extends graphql.QueryOptions { Options$Query$AllUsers( @@ -383,7 +555,8 @@ class Options$Query$AllUsers extends graphql.QueryOptions { parserFn: _parserFn$Query$AllUsers); } -class WatchOptions$Query$AllUsers extends graphql.WatchQueryOptions { +class WatchOptions$Query$AllUsers + extends graphql.WatchQueryOptions { WatchOptions$Query$AllUsers( {String? operationName, graphql.FetchPolicy? fetchPolicy, @@ -411,31 +584,45 @@ class WatchOptions$Query$AllUsers extends graphql.WatchQueryOptions> query$AllUsers([Options$Query$AllUsers? options]) async => + Future> query$AllUsers( + [Options$Query$AllUsers? options]) async => await this.query(options ?? Options$Query$AllUsers()); - graphql.ObservableQuery watchQuery$AllUsers([WatchOptions$Query$AllUsers? options]) => + graphql.ObservableQuery watchQuery$AllUsers( + [WatchOptions$Query$AllUsers? options]) => this.watchQuery(options ?? WatchOptions$Query$AllUsers()); - void writeQuery$AllUsers({required Query$AllUsers data, bool broadcast = true}) => - this.writeQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryAllUsers)), data: data.toJson(), broadcast: broadcast); + void writeQuery$AllUsers( + {required Query$AllUsers data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllUsers)), + data: data.toJson(), + broadcast: broadcast); Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { - final result = this.readQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryAllUsers)), optimistic: optimistic); + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllUsers)), + optimistic: optimistic); return result == null ? null : Query$AllUsers.fromJson(result); } } @JsonSerializable(explicitToJson: true) class Query$AllUsers$users { - Query$AllUsers$users({required this.allUsers, this.rootUser, required this.$__typename}); + Query$AllUsers$users( + {required this.allUsers, this.rootUser, required this.$__typename}); @override - factory Query$AllUsers$users.fromJson(Map json) => _$Query$AllUsers$usersFromJson(json); + factory Query$AllUsers$users.fromJson(Map json) => + _$Query$AllUsers$usersFromJson(json); final List allUsers; @@ -450,13 +637,15 @@ class Query$AllUsers$users { final l$allUsers = allUsers; final l$rootUser = rootUser; final l$$__typename = $__typename; - return Object.hashAll([Object.hashAll(l$allUsers.map((v) => v)), l$rootUser, l$$__typename]); + return Object.hashAll( + [Object.hashAll(l$allUsers.map((v) => v)), l$rootUser, l$$__typename]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) return false; + if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) + return false; final l$allUsers = allUsers; final lOther$allUsers = other.allUsers; if (l$allUsers.length != lOther$allUsers.length) return false; @@ -477,22 +666,33 @@ class Query$AllUsers$users { } extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { - CopyWith$Query$AllUsers$users get copyWith => CopyWith$Query$AllUsers$users(this, (i) => i); + CopyWith$Query$AllUsers$users get copyWith => + CopyWith$Query$AllUsers$users(this, (i) => i); } abstract class CopyWith$Query$AllUsers$users { - factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, TRes Function(Query$AllUsers$users) then) = _CopyWithImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, + TRes Function(Query$AllUsers$users) then) = + _CopyWithImpl$Query$AllUsers$users; - factory CopyWith$Query$AllUsers$users.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers$users; - TRes call({List? allUsers, Fragment$userFields? rootUser, String? $__typename}); + TRes call( + {List? allUsers, + Fragment$userFields? rootUser, + String? $__typename}); - TRes allUsers(Iterable Function(Iterable>) _fn); + TRes allUsers( + Iterable Function( + Iterable>) + _fn); CopyWith$Fragment$userFields get rootUser; } -class _CopyWithImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { +class _CopyWithImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); final Query$AllUsers$users _instance; @@ -501,32 +701,54 @@ class _CopyWithImpl$Query$AllUsers$users implements CopyWith$Query$AllUser static const _undefined = {}; - TRes call({Object? allUsers = _undefined, Object? rootUser = _undefined, Object? $__typename = _undefined}) => _then(Query$AllUsers$users( - allUsers: allUsers == _undefined || allUsers == null ? _instance.allUsers : (allUsers as List), - rootUser: rootUser == _undefined ? _instance.rootUser : (rootUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? allUsers = _undefined, + Object? rootUser = _undefined, + Object? $__typename = _undefined}) => + _then(Query$AllUsers$users( + allUsers: allUsers == _undefined || allUsers == null + ? _instance.allUsers + : (allUsers as List), + rootUser: rootUser == _undefined + ? _instance.rootUser + : (rootUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); - TRes allUsers(Iterable Function(Iterable>) _fn) => - call(allUsers: _fn(_instance.allUsers.map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); + TRes allUsers( + Iterable Function( + Iterable>) + _fn) => + call( + allUsers: _fn(_instance.allUsers + .map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); CopyWith$Fragment$userFields get rootUser { final local$rootUser = _instance.rootUser; return local$rootUser == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) - : CopyWith$Fragment$userFields(local$rootUser, (e) => call(rootUser: e)); + : CopyWith$Fragment$userFields( + local$rootUser, (e) => call(rootUser: e)); } } -class _CopyWithStubImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { +class _CopyWithStubImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { _CopyWithStubImpl$Query$AllUsers$users(this._res); TRes _res; - call({List? allUsers, Fragment$userFields? rootUser, String? $__typename}) => _res; + call( + {List? allUsers, + Fragment$userFields? rootUser, + String? $__typename}) => + _res; allUsers(_fn) => _res; - CopyWith$Fragment$userFields get rootUser => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get rootUser => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -534,7 +756,8 @@ class Variables$Query$GetUser { Variables$Query$GetUser({required this.username}); @override - factory Variables$Query$GetUser.fromJson(Map json) => _$Variables$Query$GetUserFromJson(json); + factory Variables$Query$GetUser.fromJson(Map json) => + _$Variables$Query$GetUserFromJson(json); final String username; @@ -547,26 +770,31 @@ class Variables$Query$GetUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) + return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; return true; } - CopyWith$Variables$Query$GetUser get copyWith => CopyWith$Variables$Query$GetUser(this, (i) => i); + CopyWith$Variables$Query$GetUser get copyWith => + CopyWith$Variables$Query$GetUser(this, (i) => i); } abstract class CopyWith$Variables$Query$GetUser { - factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, TRes Function(Variables$Query$GetUser) then) = + factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, + TRes Function(Variables$Query$GetUser) then) = _CopyWithImpl$Variables$Query$GetUser; - factory CopyWith$Variables$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Variables$Query$GetUser; + factory CopyWith$Variables$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Query$GetUser; TRes call({String? username}); } -class _CopyWithImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { +class _CopyWithImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); final Variables$Query$GetUser _instance; @@ -575,11 +803,14 @@ class _CopyWithImpl$Variables$Query$GetUser implements CopyWith$Variables$ static const _undefined = {}; - TRes call({Object? username = _undefined}) => - _then(Variables$Query$GetUser(username: username == _undefined || username == null ? _instance.username : (username as String))); + TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( + username: username == _undefined || username == null + ? _instance.username + : (username as String))); } -class _CopyWithStubImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { +class _CopyWithStubImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { _CopyWithStubImpl$Variables$Query$GetUser(this._res); TRes _res; @@ -592,7 +823,8 @@ class Query$GetUser { Query$GetUser({required this.users, required this.$__typename}); @override - factory Query$GetUser.fromJson(Map json) => _$Query$GetUserFromJson(json); + factory Query$GetUser.fromJson(Map json) => + _$Query$GetUserFromJson(json); final Query$GetUser$users users; @@ -609,7 +841,8 @@ class Query$GetUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetUser) || runtimeType != other.runtimeType) return false; + if (!(other is Query$GetUser) || runtimeType != other.runtimeType) + return false; final l$users = users; final lOther$users = other.users; if (l$users != lOther$users) return false; @@ -621,19 +854,24 @@ class Query$GetUser { } extension UtilityExtension$Query$GetUser on Query$GetUser { - CopyWith$Query$GetUser get copyWith => CopyWith$Query$GetUser(this, (i) => i); + CopyWith$Query$GetUser get copyWith => + CopyWith$Query$GetUser(this, (i) => i); } abstract class CopyWith$Query$GetUser { - factory CopyWith$Query$GetUser(Query$GetUser instance, TRes Function(Query$GetUser) then) = _CopyWithImpl$Query$GetUser; + factory CopyWith$Query$GetUser( + Query$GetUser instance, TRes Function(Query$GetUser) then) = + _CopyWithImpl$Query$GetUser; - factory CopyWith$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Query$GetUser; + factory CopyWith$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser; TRes call({Query$GetUser$users? users, String? $__typename}); CopyWith$Query$GetUser$users get users; } -class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser { +class _CopyWithImpl$Query$GetUser + implements CopyWith$Query$GetUser { _CopyWithImpl$Query$GetUser(this._instance, this._then); final Query$GetUser _instance; @@ -642,9 +880,14 @@ class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => _then(Query$GetUser( - users: users == _undefined || users == null ? _instance.users : (users as Query$GetUser$users), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$GetUser$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Query$GetUser$users get users { final local$users = _instance.users; @@ -652,14 +895,16 @@ class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser } } -class _CopyWithStubImpl$Query$GetUser implements CopyWith$Query$GetUser { +class _CopyWithStubImpl$Query$GetUser + implements CopyWith$Query$GetUser { _CopyWithStubImpl$Query$GetUser(this._res); TRes _res; call({Query$GetUser$users? users, String? $__typename}) => _res; - CopyWith$Query$GetUser$users get users => CopyWith$Query$GetUser$users.stub(_res); + CopyWith$Query$GetUser$users get users => + CopyWith$Query$GetUser$users.stub(_res); } const documentNodeQueryGetUser = DocumentNode(definitions: [ @@ -669,7 +914,8 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'username')), - type: NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -684,20 +930,41 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'getUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'username'), value: VariableNode(name: NameNode(value: 'username')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionuserFields, ]); -Query$GetUser _parserFn$Query$GetUser(Map data) => Query$GetUser.fromJson(data); +Query$GetUser _parserFn$Query$GetUser(Map data) => + Query$GetUser.fromJson(data); class Options$Query$GetUser extends graphql.QueryOptions { Options$Query$GetUser( @@ -722,7 +989,8 @@ class Options$Query$GetUser extends graphql.QueryOptions { parserFn: _parserFn$Query$GetUser); } -class WatchOptions$Query$GetUser extends graphql.WatchQueryOptions { +class WatchOptions$Query$GetUser + extends graphql.WatchQueryOptions { WatchOptions$Query$GetUser( {String? operationName, required Variables$Query$GetUser variables, @@ -752,21 +1020,41 @@ class WatchOptions$Query$GetUser extends graphql.WatchQueryOptions> query$GetUser(Options$Query$GetUser options) async => await this.query(options); + Future> query$GetUser( + Options$Query$GetUser options) async => + await this.query(options); - graphql.ObservableQuery watchQuery$GetUser(WatchOptions$Query$GetUser options) => this.watchQuery(options); + graphql.ObservableQuery watchQuery$GetUser( + WatchOptions$Query$GetUser options) => + this.watchQuery(options); - void writeQuery$GetUser({required Query$GetUser data, required Variables$Query$GetUser variables, bool broadcast = true}) => - this.writeQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryGetUser), variables: variables.toJson()), - data: data.toJson(), broadcast: broadcast); + void writeQuery$GetUser( + {required Query$GetUser data, + required Variables$Query$GetUser variables, + bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), + data: data.toJson(), + broadcast: broadcast); - Query$GetUser? readQuery$GetUser({required Variables$Query$GetUser variables, bool optimistic = true}) { - final result = this.readQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryGetUser), variables: variables.toJson()), + Query$GetUser? readQuery$GetUser( + {required Variables$Query$GetUser variables, bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), optimistic: optimistic); return result == null ? null : Query$GetUser.fromJson(result); } @@ -777,7 +1065,8 @@ class Query$GetUser$users { Query$GetUser$users({this.getUser, required this.$__typename}); @override - factory Query$GetUser$users.fromJson(Map json) => _$Query$GetUser$usersFromJson(json); + factory Query$GetUser$users.fromJson(Map json) => + _$Query$GetUser$usersFromJson(json); final Fragment$userFields? getUser; @@ -794,7 +1083,8 @@ class Query$GetUser$users { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) return false; + if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) + return false; final l$getUser = getUser; final lOther$getUser = other.getUser; if (l$getUser != lOther$getUser) return false; @@ -806,19 +1096,24 @@ class Query$GetUser$users { } extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { - CopyWith$Query$GetUser$users get copyWith => CopyWith$Query$GetUser$users(this, (i) => i); + CopyWith$Query$GetUser$users get copyWith => + CopyWith$Query$GetUser$users(this, (i) => i); } abstract class CopyWith$Query$GetUser$users { - factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, TRes Function(Query$GetUser$users) then) = _CopyWithImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, + TRes Function(Query$GetUser$users) then) = + _CopyWithImpl$Query$GetUser$users; - factory CopyWith$Query$GetUser$users.stub(TRes res) = _CopyWithStubImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser$users; TRes call({Fragment$userFields? getUser, String? $__typename}); CopyWith$Fragment$userFields get getUser; } -class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { +class _CopyWithImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { _CopyWithImpl$Query$GetUser$users(this._instance, this._then); final Query$GetUser$users _instance; @@ -827,9 +1122,14 @@ class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$ static const _undefined = {}; - TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => _then(Query$GetUser$users( - getUser: getUser == _undefined ? _instance.getUser : (getUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser$users( + getUser: getUser == _undefined + ? _instance.getUser + : (getUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Fragment$userFields get getUser { final local$getUser = _instance.getUser; @@ -839,14 +1139,16 @@ class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$ } } -class _CopyWithStubImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { +class _CopyWithStubImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { _CopyWithStubImpl$Query$GetUser$users(this._res); TRes _res; call({Fragment$userFields? getUser, String? $__typename}) => _res; - CopyWith$Fragment$userFields get getUser => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get getUser => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -854,7 +1156,8 @@ class Variables$Mutation$CreateUser { Variables$Mutation$CreateUser({required this.user}); @override - factory Variables$Mutation$CreateUser.fromJson(Map json) => _$Variables$Mutation$CreateUserFromJson(json); + factory Variables$Mutation$CreateUser.fromJson(Map json) => + _$Variables$Mutation$CreateUserFromJson(json); final Input$UserMutationInput user; @@ -867,26 +1170,32 @@ class Variables$Mutation$CreateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$CreateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$CreateUser) || + runtimeType != other.runtimeType) return false; final l$user = user; final lOther$user = other.user; if (l$user != lOther$user) return false; return true; } - CopyWith$Variables$Mutation$CreateUser get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); + CopyWith$Variables$Mutation$CreateUser + get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$CreateUser { - factory CopyWith$Variables$Mutation$CreateUser(Variables$Mutation$CreateUser instance, TRes Function(Variables$Mutation$CreateUser) then) = + factory CopyWith$Variables$Mutation$CreateUser( + Variables$Mutation$CreateUser instance, + TRes Function(Variables$Mutation$CreateUser) then) = _CopyWithImpl$Variables$Mutation$CreateUser; - factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$CreateUser; + factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$CreateUser; TRes call({Input$UserMutationInput? user}); } -class _CopyWithImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { +class _CopyWithImpl$Variables$Mutation$CreateUser + implements CopyWith$Variables$Mutation$CreateUser { _CopyWithImpl$Variables$Mutation$CreateUser(this._instance, this._then); final Variables$Mutation$CreateUser _instance; @@ -895,11 +1204,14 @@ class _CopyWithImpl$Variables$Mutation$CreateUser implements CopyWith$Vari static const _undefined = {}; - TRes call({Object? user = _undefined}) => - _then(Variables$Mutation$CreateUser(user: user == _undefined || user == null ? _instance.user : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => _then(Variables$Mutation$CreateUser( + user: user == _undefined || user == null + ? _instance.user + : (user as Input$UserMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { +class _CopyWithStubImpl$Variables$Mutation$CreateUser + implements CopyWith$Variables$Mutation$CreateUser { _CopyWithStubImpl$Variables$Mutation$CreateUser(this._res); TRes _res; @@ -912,7 +1224,8 @@ class Mutation$CreateUser { Mutation$CreateUser({required this.createUser, required this.$__typename}); @override - factory Mutation$CreateUser.fromJson(Map json) => _$Mutation$CreateUserFromJson(json); + factory Mutation$CreateUser.fromJson(Map json) => + _$Mutation$CreateUserFromJson(json); final Mutation$CreateUser$createUser createUser; @@ -929,7 +1242,8 @@ class Mutation$CreateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) + return false; final l$createUser = createUser; final lOther$createUser = other.createUser; if (l$createUser != lOther$createUser) return false; @@ -941,19 +1255,24 @@ class Mutation$CreateUser { } extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { - CopyWith$Mutation$CreateUser get copyWith => CopyWith$Mutation$CreateUser(this, (i) => i); + CopyWith$Mutation$CreateUser get copyWith => + CopyWith$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Mutation$CreateUser { - factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, TRes Function(Mutation$CreateUser) then) = _CopyWithImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, + TRes Function(Mutation$CreateUser) then) = + _CopyWithImpl$Mutation$CreateUser; - factory CopyWith$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$CreateUser; TRes call({Mutation$CreateUser$createUser? createUser, String? $__typename}); CopyWith$Mutation$CreateUser$createUser get createUser; } -class _CopyWithImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { +class _CopyWithImpl$Mutation$CreateUser + implements CopyWith$Mutation$CreateUser { _CopyWithImpl$Mutation$CreateUser(this._instance, this._then); final Mutation$CreateUser _instance; @@ -962,24 +1281,35 @@ class _CopyWithImpl$Mutation$CreateUser implements CopyWith$Mutation$Creat static const _undefined = {}; - TRes call({Object? createUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$CreateUser( - createUser: createUser == _undefined || createUser == null ? _instance.createUser : (createUser as Mutation$CreateUser$createUser), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? createUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$CreateUser( + createUser: createUser == _undefined || createUser == null + ? _instance.createUser + : (createUser as Mutation$CreateUser$createUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$CreateUser$createUser get createUser { final local$createUser = _instance.createUser; - return CopyWith$Mutation$CreateUser$createUser(local$createUser, (e) => call(createUser: e)); + return CopyWith$Mutation$CreateUser$createUser( + local$createUser, (e) => call(createUser: e)); } } -class _CopyWithStubImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { +class _CopyWithStubImpl$Mutation$CreateUser + implements CopyWith$Mutation$CreateUser { _CopyWithStubImpl$Mutation$CreateUser(this._res); TRes _res; - call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => _res; + call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => + _res; - CopyWith$Mutation$CreateUser$createUser get createUser => CopyWith$Mutation$CreateUser$createUser.stub(_res); + CopyWith$Mutation$CreateUser$createUser get createUser => + CopyWith$Mutation$CreateUser$createUser.stub(_res); } const documentNodeMutationCreateUser = DocumentNode(definitions: [ @@ -989,7 +1319,8 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode(name: NameNode(value: 'UserMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -998,32 +1329,57 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'createUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'user'), value: VariableNode(name: NameNode(value: 'user')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); +Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => + Mutation$CreateUser.fromJson(data); -typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function(dynamic, Mutation$CreateUser?); +typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( + dynamic, Mutation$CreateUser?); -class Options$Mutation$CreateUser extends graphql.MutationOptions { +class Options$Mutation$CreateUser + extends graphql.MutationOptions { Options$Mutation$CreateUser( {String? operationName, required Variables$Mutation$CreateUser variables, @@ -1044,7 +1400,10 @@ class Options$Mutation$CreateUser extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$CreateUser(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$CreateUser(data)), update: update, onError: onError, document: documentNodeMutationCreateUser, @@ -1053,11 +1412,16 @@ class Options$Mutation$CreateUser extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$CreateUser extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$CreateUser + extends graphql.WatchQueryOptions { WatchOptions$Mutation$CreateUser( {String? operationName, required Variables$Mutation$CreateUser variables, @@ -1087,17 +1451,28 @@ class WatchOptions$Mutation$CreateUser extends graphql.WatchQueryOptions> mutate$CreateUser(Options$Mutation$CreateUser options) async => await this.mutate(options); + Future> mutate$CreateUser( + Options$Mutation$CreateUser options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$CreateUser(WatchOptions$Mutation$CreateUser options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$CreateUser( + WatchOptions$Mutation$CreateUser options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$CreateUser$createUser implements Fragment$basicMutationReturnFields { - Mutation$CreateUser$createUser({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$CreateUser$createUser + implements Fragment$basicMutationReturnFields { + Mutation$CreateUser$createUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$CreateUser$createUser.fromJson(Map json) => _$Mutation$CreateUser$createUserFromJson(json); + factory Mutation$CreateUser$createUser.fromJson(Map json) => + _$Mutation$CreateUser$createUserFromJson(json); final int code; @@ -1117,13 +1492,15 @@ class Mutation$CreateUser$createUser implements Fragment$basicMutationReturnFiel final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser$createUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$CreateUser$createUser) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1143,21 +1520,32 @@ class Mutation$CreateUser$createUser implements Fragment$basicMutationReturnFiel } } -extension UtilityExtension$Mutation$CreateUser$createUser on Mutation$CreateUser$createUser { - CopyWith$Mutation$CreateUser$createUser get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); +extension UtilityExtension$Mutation$CreateUser$createUser + on Mutation$CreateUser$createUser { + CopyWith$Mutation$CreateUser$createUser + get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); } abstract class CopyWith$Mutation$CreateUser$createUser { - factory CopyWith$Mutation$CreateUser$createUser(Mutation$CreateUser$createUser instance, TRes Function(Mutation$CreateUser$createUser) then) = + factory CopyWith$Mutation$CreateUser$createUser( + Mutation$CreateUser$createUser instance, + TRes Function(Mutation$CreateUser$createUser) then) = _CopyWithImpl$Mutation$CreateUser$createUser; - factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser$createUser; + factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$CreateUser$createUser; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { +class _CopyWithImpl$Mutation$CreateUser$createUser + implements CopyWith$Mutation$CreateUser$createUser { _CopyWithImpl$Mutation$CreateUser$createUser(this._instance, this._then); final Mutation$CreateUser$createUser _instance; @@ -1173,25 +1561,45 @@ class _CopyWithImpl$Mutation$CreateUser$createUser implements CopyWith$Mut Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$CreateUser$createUser( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { +class _CopyWithStubImpl$Mutation$CreateUser$createUser + implements CopyWith$Mutation$CreateUser$createUser { _CopyWithStubImpl$Mutation$CreateUser$createUser(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1199,7 +1607,8 @@ class Variables$Mutation$DeleteUser { Variables$Mutation$DeleteUser({required this.username}); @override - factory Variables$Mutation$DeleteUser.fromJson(Map json) => _$Variables$Mutation$DeleteUserFromJson(json); + factory Variables$Mutation$DeleteUser.fromJson(Map json) => + _$Variables$Mutation$DeleteUserFromJson(json); final String username; @@ -1212,26 +1621,32 @@ class Variables$Mutation$DeleteUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DeleteUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$DeleteUser) || + runtimeType != other.runtimeType) return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; return true; } - CopyWith$Variables$Mutation$DeleteUser get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); + CopyWith$Variables$Mutation$DeleteUser + get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$DeleteUser { - factory CopyWith$Variables$Mutation$DeleteUser(Variables$Mutation$DeleteUser instance, TRes Function(Variables$Mutation$DeleteUser) then) = + factory CopyWith$Variables$Mutation$DeleteUser( + Variables$Mutation$DeleteUser instance, + TRes Function(Variables$Mutation$DeleteUser) then) = _CopyWithImpl$Variables$Mutation$DeleteUser; - factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DeleteUser; + factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$DeleteUser; TRes call({String? username}); } -class _CopyWithImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { +class _CopyWithImpl$Variables$Mutation$DeleteUser + implements CopyWith$Variables$Mutation$DeleteUser { _CopyWithImpl$Variables$Mutation$DeleteUser(this._instance, this._then); final Variables$Mutation$DeleteUser _instance; @@ -1240,11 +1655,15 @@ class _CopyWithImpl$Variables$Mutation$DeleteUser implements CopyWith$Vari static const _undefined = {}; - TRes call({Object? username = _undefined}) => - _then(Variables$Mutation$DeleteUser(username: username == _undefined || username == null ? _instance.username : (username as String))); + TRes call({Object? username = _undefined}) => _then( + Variables$Mutation$DeleteUser( + username: username == _undefined || username == null + ? _instance.username + : (username as String))); } -class _CopyWithStubImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { +class _CopyWithStubImpl$Variables$Mutation$DeleteUser + implements CopyWith$Variables$Mutation$DeleteUser { _CopyWithStubImpl$Variables$Mutation$DeleteUser(this._res); TRes _res; @@ -1257,7 +1676,8 @@ class Mutation$DeleteUser { Mutation$DeleteUser({required this.deleteUser, required this.$__typename}); @override - factory Mutation$DeleteUser.fromJson(Map json) => _$Mutation$DeleteUserFromJson(json); + factory Mutation$DeleteUser.fromJson(Map json) => + _$Mutation$DeleteUserFromJson(json); final Mutation$DeleteUser$deleteUser deleteUser; @@ -1274,7 +1694,8 @@ class Mutation$DeleteUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) + return false; final l$deleteUser = deleteUser; final lOther$deleteUser = other.deleteUser; if (l$deleteUser != lOther$deleteUser) return false; @@ -1286,19 +1707,24 @@ class Mutation$DeleteUser { } extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { - CopyWith$Mutation$DeleteUser get copyWith => CopyWith$Mutation$DeleteUser(this, (i) => i); + CopyWith$Mutation$DeleteUser get copyWith => + CopyWith$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Mutation$DeleteUser { - factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, TRes Function(Mutation$DeleteUser) then) = _CopyWithImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, + TRes Function(Mutation$DeleteUser) then) = + _CopyWithImpl$Mutation$DeleteUser; - factory CopyWith$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$DeleteUser; TRes call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser; } -class _CopyWithImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { +class _CopyWithImpl$Mutation$DeleteUser + implements CopyWith$Mutation$DeleteUser { _CopyWithImpl$Mutation$DeleteUser(this._instance, this._then); final Mutation$DeleteUser _instance; @@ -1307,24 +1733,35 @@ class _CopyWithImpl$Mutation$DeleteUser implements CopyWith$Mutation$Delet static const _undefined = {}; - TRes call({Object? deleteUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$DeleteUser( - deleteUser: deleteUser == _undefined || deleteUser == null ? _instance.deleteUser : (deleteUser as Mutation$DeleteUser$deleteUser), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? deleteUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DeleteUser( + deleteUser: deleteUser == _undefined || deleteUser == null + ? _instance.deleteUser + : (deleteUser as Mutation$DeleteUser$deleteUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser { final local$deleteUser = _instance.deleteUser; - return CopyWith$Mutation$DeleteUser$deleteUser(local$deleteUser, (e) => call(deleteUser: e)); + return CopyWith$Mutation$DeleteUser$deleteUser( + local$deleteUser, (e) => call(deleteUser: e)); } } -class _CopyWithStubImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { +class _CopyWithStubImpl$Mutation$DeleteUser + implements CopyWith$Mutation$DeleteUser { _CopyWithStubImpl$Mutation$DeleteUser(this._res); TRes _res; - call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => _res; + call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => + _res; - CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); + CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => + CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); } const documentNodeMutationDeleteUser = DocumentNode(definitions: [ @@ -1334,7 +1771,8 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'username')), - type: NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -1343,22 +1781,41 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'deleteUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'username'), value: VariableNode(name: NameNode(value: 'username')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => Mutation$DeleteUser.fromJson(data); +Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => + Mutation$DeleteUser.fromJson(data); -typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function(dynamic, Mutation$DeleteUser?); +typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( + dynamic, Mutation$DeleteUser?); -class Options$Mutation$DeleteUser extends graphql.MutationOptions { +class Options$Mutation$DeleteUser + extends graphql.MutationOptions { Options$Mutation$DeleteUser( {String? operationName, required Variables$Mutation$DeleteUser variables, @@ -1379,7 +1836,10 @@ class Options$Mutation$DeleteUser extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$DeleteUser(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$DeleteUser(data)), update: update, onError: onError, document: documentNodeMutationDeleteUser, @@ -1388,11 +1848,16 @@ class Options$Mutation$DeleteUser extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$DeleteUser extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$DeleteUser + extends graphql.WatchQueryOptions { WatchOptions$Mutation$DeleteUser( {String? operationName, required Variables$Mutation$DeleteUser variables, @@ -1422,17 +1887,27 @@ class WatchOptions$Mutation$DeleteUser extends graphql.WatchQueryOptions> mutate$DeleteUser(Options$Mutation$DeleteUser options) async => await this.mutate(options); + Future> mutate$DeleteUser( + Options$Mutation$DeleteUser options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$DeleteUser(WatchOptions$Mutation$DeleteUser options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$DeleteUser( + WatchOptions$Mutation$DeleteUser options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$DeleteUser$deleteUser implements Fragment$basicMutationReturnFields { - Mutation$DeleteUser$deleteUser({required this.code, required this.message, required this.success, required this.$__typename}); +class Mutation$DeleteUser$deleteUser + implements Fragment$basicMutationReturnFields { + Mutation$DeleteUser$deleteUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => _$Mutation$DeleteUser$deleteUserFromJson(json); + factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => + _$Mutation$DeleteUser$deleteUserFromJson(json); final int code; @@ -1455,7 +1930,8 @@ class Mutation$DeleteUser$deleteUser implements Fragment$basicMutationReturnFiel @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser$deleteUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$DeleteUser$deleteUser) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1472,20 +1948,26 @@ class Mutation$DeleteUser$deleteUser implements Fragment$basicMutationReturnFiel } } -extension UtilityExtension$Mutation$DeleteUser$deleteUser on Mutation$DeleteUser$deleteUser { - CopyWith$Mutation$DeleteUser$deleteUser get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); +extension UtilityExtension$Mutation$DeleteUser$deleteUser + on Mutation$DeleteUser$deleteUser { + CopyWith$Mutation$DeleteUser$deleteUser + get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); } abstract class CopyWith$Mutation$DeleteUser$deleteUser { - factory CopyWith$Mutation$DeleteUser$deleteUser(Mutation$DeleteUser$deleteUser instance, TRes Function(Mutation$DeleteUser$deleteUser) then) = + factory CopyWith$Mutation$DeleteUser$deleteUser( + Mutation$DeleteUser$deleteUser instance, + TRes Function(Mutation$DeleteUser$deleteUser) then) = _CopyWithImpl$Mutation$DeleteUser$deleteUser; - factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; + factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; TRes call({int? code, String? message, bool? success, String? $__typename}); } -class _CopyWithImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { +class _CopyWithImpl$Mutation$DeleteUser$deleteUser + implements CopyWith$Mutation$DeleteUser$deleteUser { _CopyWithImpl$Mutation$DeleteUser$deleteUser(this._instance, this._then); final Mutation$DeleteUser$deleteUser _instance; @@ -1494,20 +1976,34 @@ class _CopyWithImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mut static const _undefined = {}; - TRes call({Object? code = _undefined, Object? message = _undefined, Object? success = _undefined, Object? $__typename = _undefined}) => + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => _then(Mutation$DeleteUser$deleteUser( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); } -class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { +class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser + implements CopyWith$Mutation$DeleteUser$deleteUser { _CopyWithStubImpl$Mutation$DeleteUser$deleteUser(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => _res; + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1515,7 +2011,8 @@ class Variables$Mutation$UpdateUser { Variables$Mutation$UpdateUser({required this.user}); @override - factory Variables$Mutation$UpdateUser.fromJson(Map json) => _$Variables$Mutation$UpdateUserFromJson(json); + factory Variables$Mutation$UpdateUser.fromJson(Map json) => + _$Variables$Mutation$UpdateUserFromJson(json); final Input$UserMutationInput user; @@ -1528,26 +2025,32 @@ class Variables$Mutation$UpdateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UpdateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$UpdateUser) || + runtimeType != other.runtimeType) return false; final l$user = user; final lOther$user = other.user; if (l$user != lOther$user) return false; return true; } - CopyWith$Variables$Mutation$UpdateUser get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); + CopyWith$Variables$Mutation$UpdateUser + get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$UpdateUser { - factory CopyWith$Variables$Mutation$UpdateUser(Variables$Mutation$UpdateUser instance, TRes Function(Variables$Mutation$UpdateUser) then) = + factory CopyWith$Variables$Mutation$UpdateUser( + Variables$Mutation$UpdateUser instance, + TRes Function(Variables$Mutation$UpdateUser) then) = _CopyWithImpl$Variables$Mutation$UpdateUser; - factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UpdateUser; + factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$UpdateUser; TRes call({Input$UserMutationInput? user}); } -class _CopyWithImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { +class _CopyWithImpl$Variables$Mutation$UpdateUser + implements CopyWith$Variables$Mutation$UpdateUser { _CopyWithImpl$Variables$Mutation$UpdateUser(this._instance, this._then); final Variables$Mutation$UpdateUser _instance; @@ -1556,11 +2059,14 @@ class _CopyWithImpl$Variables$Mutation$UpdateUser implements CopyWith$Vari static const _undefined = {}; - TRes call({Object? user = _undefined}) => - _then(Variables$Mutation$UpdateUser(user: user == _undefined || user == null ? _instance.user : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => _then(Variables$Mutation$UpdateUser( + user: user == _undefined || user == null + ? _instance.user + : (user as Input$UserMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { +class _CopyWithStubImpl$Variables$Mutation$UpdateUser + implements CopyWith$Variables$Mutation$UpdateUser { _CopyWithStubImpl$Variables$Mutation$UpdateUser(this._res); TRes _res; @@ -1573,7 +2079,8 @@ class Mutation$UpdateUser { Mutation$UpdateUser({required this.updateUser, required this.$__typename}); @override - factory Mutation$UpdateUser.fromJson(Map json) => _$Mutation$UpdateUserFromJson(json); + factory Mutation$UpdateUser.fromJson(Map json) => + _$Mutation$UpdateUserFromJson(json); final Mutation$UpdateUser$updateUser updateUser; @@ -1590,7 +2097,8 @@ class Mutation$UpdateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) + return false; final l$updateUser = updateUser; final lOther$updateUser = other.updateUser; if (l$updateUser != lOther$updateUser) return false; @@ -1602,19 +2110,24 @@ class Mutation$UpdateUser { } extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { - CopyWith$Mutation$UpdateUser get copyWith => CopyWith$Mutation$UpdateUser(this, (i) => i); + CopyWith$Mutation$UpdateUser get copyWith => + CopyWith$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Mutation$UpdateUser { - factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, TRes Function(Mutation$UpdateUser) then) = _CopyWithImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, + TRes Function(Mutation$UpdateUser) then) = + _CopyWithImpl$Mutation$UpdateUser; - factory CopyWith$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$UpdateUser; TRes call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}); CopyWith$Mutation$UpdateUser$updateUser get updateUser; } -class _CopyWithImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { +class _CopyWithImpl$Mutation$UpdateUser + implements CopyWith$Mutation$UpdateUser { _CopyWithImpl$Mutation$UpdateUser(this._instance, this._then); final Mutation$UpdateUser _instance; @@ -1623,24 +2136,35 @@ class _CopyWithImpl$Mutation$UpdateUser implements CopyWith$Mutation$Updat static const _undefined = {}; - TRes call({Object? updateUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$UpdateUser( - updateUser: updateUser == _undefined || updateUser == null ? _instance.updateUser : (updateUser as Mutation$UpdateUser$updateUser), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? updateUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UpdateUser( + updateUser: updateUser == _undefined || updateUser == null + ? _instance.updateUser + : (updateUser as Mutation$UpdateUser$updateUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$UpdateUser$updateUser get updateUser { final local$updateUser = _instance.updateUser; - return CopyWith$Mutation$UpdateUser$updateUser(local$updateUser, (e) => call(updateUser: e)); + return CopyWith$Mutation$UpdateUser$updateUser( + local$updateUser, (e) => call(updateUser: e)); } } -class _CopyWithStubImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { +class _CopyWithStubImpl$Mutation$UpdateUser + implements CopyWith$Mutation$UpdateUser { _CopyWithStubImpl$Mutation$UpdateUser(this._res); TRes _res; - call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => _res; + call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => + _res; - CopyWith$Mutation$UpdateUser$updateUser get updateUser => CopyWith$Mutation$UpdateUser$updateUser.stub(_res); + CopyWith$Mutation$UpdateUser$updateUser get updateUser => + CopyWith$Mutation$UpdateUser$updateUser.stub(_res); } const documentNodeMutationUpdateUser = DocumentNode(definitions: [ @@ -1650,7 +2174,8 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode(name: NameNode(value: 'UserMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -1659,32 +2184,57 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'updateUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'user'), value: VariableNode(name: NameNode(value: 'user')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); +Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => + Mutation$UpdateUser.fromJson(data); -typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function(dynamic, Mutation$UpdateUser?); +typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( + dynamic, Mutation$UpdateUser?); -class Options$Mutation$UpdateUser extends graphql.MutationOptions { +class Options$Mutation$UpdateUser + extends graphql.MutationOptions { Options$Mutation$UpdateUser( {String? operationName, required Variables$Mutation$UpdateUser variables, @@ -1705,7 +2255,10 @@ class Options$Mutation$UpdateUser extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$UpdateUser(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$UpdateUser(data)), update: update, onError: onError, document: documentNodeMutationUpdateUser, @@ -1714,11 +2267,16 @@ class Options$Mutation$UpdateUser extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$UpdateUser extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$UpdateUser + extends graphql.WatchQueryOptions { WatchOptions$Mutation$UpdateUser( {String? operationName, required Variables$Mutation$UpdateUser variables, @@ -1748,17 +2306,28 @@ class WatchOptions$Mutation$UpdateUser extends graphql.WatchQueryOptions> mutate$UpdateUser(Options$Mutation$UpdateUser options) async => await this.mutate(options); + Future> mutate$UpdateUser( + Options$Mutation$UpdateUser options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$UpdateUser(WatchOptions$Mutation$UpdateUser options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$UpdateUser( + WatchOptions$Mutation$UpdateUser options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$UpdateUser$updateUser implements Fragment$basicMutationReturnFields { - Mutation$UpdateUser$updateUser({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$UpdateUser$updateUser + implements Fragment$basicMutationReturnFields { + Mutation$UpdateUser$updateUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$UpdateUser$updateUser.fromJson(Map json) => _$Mutation$UpdateUser$updateUserFromJson(json); + factory Mutation$UpdateUser$updateUser.fromJson(Map json) => + _$Mutation$UpdateUser$updateUserFromJson(json); final int code; @@ -1778,13 +2347,15 @@ class Mutation$UpdateUser$updateUser implements Fragment$basicMutationReturnFiel final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser$updateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$UpdateUser$updateUser) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1804,21 +2375,32 @@ class Mutation$UpdateUser$updateUser implements Fragment$basicMutationReturnFiel } } -extension UtilityExtension$Mutation$UpdateUser$updateUser on Mutation$UpdateUser$updateUser { - CopyWith$Mutation$UpdateUser$updateUser get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); +extension UtilityExtension$Mutation$UpdateUser$updateUser + on Mutation$UpdateUser$updateUser { + CopyWith$Mutation$UpdateUser$updateUser + get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); } abstract class CopyWith$Mutation$UpdateUser$updateUser { - factory CopyWith$Mutation$UpdateUser$updateUser(Mutation$UpdateUser$updateUser instance, TRes Function(Mutation$UpdateUser$updateUser) then) = + factory CopyWith$Mutation$UpdateUser$updateUser( + Mutation$UpdateUser$updateUser instance, + TRes Function(Mutation$UpdateUser$updateUser) then) = _CopyWithImpl$Mutation$UpdateUser$updateUser; - factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser$updateUser; + factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$UpdateUser$updateUser; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { +class _CopyWithImpl$Mutation$UpdateUser$updateUser + implements CopyWith$Mutation$UpdateUser$updateUser { _CopyWithImpl$Mutation$UpdateUser$updateUser(this._instance, this._then); final Mutation$UpdateUser$updateUser _instance; @@ -1834,25 +2416,45 @@ class _CopyWithImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mut Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$UpdateUser$updateUser( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { +class _CopyWithStubImpl$Mutation$UpdateUser$updateUser + implements CopyWith$Mutation$UpdateUser$updateUser { _CopyWithStubImpl$Mutation$UpdateUser$updateUser(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1860,7 +2462,8 @@ class Variables$Mutation$AddSshKey { Variables$Mutation$AddSshKey({required this.sshInput}); @override - factory Variables$Mutation$AddSshKey.fromJson(Map json) => _$Variables$Mutation$AddSshKeyFromJson(json); + factory Variables$Mutation$AddSshKey.fromJson(Map json) => + _$Variables$Mutation$AddSshKeyFromJson(json); final Input$SshMutationInput sshInput; @@ -1873,26 +2476,32 @@ class Variables$Mutation$AddSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AddSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$AddSshKey) || + runtimeType != other.runtimeType) return false; final l$sshInput = sshInput; final lOther$sshInput = other.sshInput; if (l$sshInput != lOther$sshInput) return false; return true; } - CopyWith$Variables$Mutation$AddSshKey get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); + CopyWith$Variables$Mutation$AddSshKey + get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$AddSshKey { - factory CopyWith$Variables$Mutation$AddSshKey(Variables$Mutation$AddSshKey instance, TRes Function(Variables$Mutation$AddSshKey) then) = + factory CopyWith$Variables$Mutation$AddSshKey( + Variables$Mutation$AddSshKey instance, + TRes Function(Variables$Mutation$AddSshKey) then) = _CopyWithImpl$Variables$Mutation$AddSshKey; - factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$AddSshKey; + factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$AddSshKey; TRes call({Input$SshMutationInput? sshInput}); } -class _CopyWithImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { +class _CopyWithImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); final Variables$Mutation$AddSshKey _instance; @@ -1901,11 +2510,15 @@ class _CopyWithImpl$Variables$Mutation$AddSshKey implements CopyWith$Varia static const _undefined = {}; - TRes call({Object? sshInput = _undefined}) => _then( - Variables$Mutation$AddSshKey(sshInput: sshInput == _undefined || sshInput == null ? _instance.sshInput : (sshInput as Input$SshMutationInput))); + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$AddSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { +class _CopyWithStubImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { _CopyWithStubImpl$Variables$Mutation$AddSshKey(this._res); TRes _res; @@ -1918,7 +2531,8 @@ class Mutation$AddSshKey { Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); @override - factory Mutation$AddSshKey.fromJson(Map json) => _$Mutation$AddSshKeyFromJson(json); + factory Mutation$AddSshKey.fromJson(Map json) => + _$Mutation$AddSshKeyFromJson(json); final Mutation$AddSshKey$addSshKey addSshKey; @@ -1935,7 +2549,8 @@ class Mutation$AddSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) + return false; final l$addSshKey = addSshKey; final lOther$addSshKey = other.addSshKey; if (l$addSshKey != lOther$addSshKey) return false; @@ -1947,19 +2562,24 @@ class Mutation$AddSshKey { } extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { - CopyWith$Mutation$AddSshKey get copyWith => CopyWith$Mutation$AddSshKey(this, (i) => i); + CopyWith$Mutation$AddSshKey get copyWith => + CopyWith$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Mutation$AddSshKey { - factory CopyWith$Mutation$AddSshKey(Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = _CopyWithImpl$Mutation$AddSshKey; + factory CopyWith$Mutation$AddSshKey( + Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = + _CopyWithImpl$Mutation$AddSshKey; - factory CopyWith$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey; + factory CopyWith$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey; TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; } -class _CopyWithImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { +class _CopyWithImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); final Mutation$AddSshKey _instance; @@ -1968,24 +2588,33 @@ class _CopyWithImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSsh static const _undefined = {}; - TRes call({Object? addSshKey = _undefined, Object? $__typename = _undefined}) => _then(Mutation$AddSshKey( - addSshKey: addSshKey == _undefined || addSshKey == null ? _instance.addSshKey : (addSshKey as Mutation$AddSshKey$addSshKey), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => + _then(Mutation$AddSshKey( + addSshKey: addSshKey == _undefined || addSshKey == null + ? _instance.addSshKey + : (addSshKey as Mutation$AddSshKey$addSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { final local$addSshKey = _instance.addSshKey; - return CopyWith$Mutation$AddSshKey$addSshKey(local$addSshKey, (e) => call(addSshKey: e)); + return CopyWith$Mutation$AddSshKey$addSshKey( + local$addSshKey, (e) => call(addSshKey: e)); } } -class _CopyWithStubImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { +class _CopyWithStubImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { _CopyWithStubImpl$Mutation$AddSshKey(this._res); TRes _res; call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => + CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); } const documentNodeMutationAddSshKey = DocumentNode(definitions: [ @@ -1995,7 +2624,8 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode(name: NameNode(value: 'SshMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -2004,32 +2634,57 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'addSshKey'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'sshInput'), value: VariableNode(name: NameNode(value: 'sshInput')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => Mutation$AddSshKey.fromJson(data); +Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => + Mutation$AddSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function(dynamic, Mutation$AddSshKey?); +typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( + dynamic, Mutation$AddSshKey?); -class Options$Mutation$AddSshKey extends graphql.MutationOptions { +class Options$Mutation$AddSshKey + extends graphql.MutationOptions { Options$Mutation$AddSshKey( {String? operationName, required Variables$Mutation$AddSshKey variables, @@ -2050,7 +2705,10 @@ class Options$Mutation$AddSshKey extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$AddSshKey(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$AddSshKey(data)), update: update, onError: onError, document: documentNodeMutationAddSshKey, @@ -2059,11 +2717,16 @@ class Options$Mutation$AddSshKey extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$AddSshKey extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$AddSshKey + extends graphql.WatchQueryOptions { WatchOptions$Mutation$AddSshKey( {String? operationName, required Variables$Mutation$AddSshKey variables, @@ -2093,17 +2756,28 @@ class WatchOptions$Mutation$AddSshKey extends graphql.WatchQueryOptions> mutate$AddSshKey(Options$Mutation$AddSshKey options) async => await this.mutate(options); + Future> mutate$AddSshKey( + Options$Mutation$AddSshKey options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$AddSshKey(WatchOptions$Mutation$AddSshKey options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$AddSshKey( + WatchOptions$Mutation$AddSshKey options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$AddSshKey$addSshKey implements Fragment$basicMutationReturnFields { - Mutation$AddSshKey$addSshKey({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$AddSshKey$addSshKey + implements Fragment$basicMutationReturnFields { + Mutation$AddSshKey$addSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => _$Mutation$AddSshKey$addSshKeyFromJson(json); + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => + _$Mutation$AddSshKey$addSshKeyFromJson(json); final int code; @@ -2123,13 +2797,15 @@ class Mutation$AddSshKey$addSshKey implements Fragment$basicMutationReturnFields final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey$addSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$AddSshKey$addSshKey) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -2149,21 +2825,32 @@ class Mutation$AddSshKey$addSshKey implements Fragment$basicMutationReturnFields } } -extension UtilityExtension$Mutation$AddSshKey$addSshKey on Mutation$AddSshKey$addSshKey { - CopyWith$Mutation$AddSshKey$addSshKey get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); +extension UtilityExtension$Mutation$AddSshKey$addSshKey + on Mutation$AddSshKey$addSshKey { + CopyWith$Mutation$AddSshKey$addSshKey + get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); } abstract class CopyWith$Mutation$AddSshKey$addSshKey { - factory CopyWith$Mutation$AddSshKey$addSshKey(Mutation$AddSshKey$addSshKey instance, TRes Function(Mutation$AddSshKey$addSshKey) then) = + factory CopyWith$Mutation$AddSshKey$addSshKey( + Mutation$AddSshKey$addSshKey instance, + TRes Function(Mutation$AddSshKey$addSshKey) then) = _CopyWithImpl$Mutation$AddSshKey$addSshKey; - factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; + factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { +class _CopyWithImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); final Mutation$AddSshKey$addSshKey _instance; @@ -2179,25 +2866,45 @@ class _CopyWithImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutat Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$AddSshKey$addSshKey( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { +class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { _CopyWithStubImpl$Mutation$AddSshKey$addSshKey(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2205,11 +2912,13 @@ class Variables$Mutation$RemoveSshKey { Variables$Mutation$RemoveSshKey({required this.sshInput}); @override - factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => _$Variables$Mutation$RemoveSshKeyFromJson(json); + factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => + _$Variables$Mutation$RemoveSshKeyFromJson(json); final Input$SshMutationInput sshInput; - Map toJson() => _$Variables$Mutation$RemoveSshKeyToJson(this); + Map toJson() => + _$Variables$Mutation$RemoveSshKeyToJson(this); int get hashCode { final l$sshInput = sshInput; return Object.hashAll([l$sshInput]); @@ -2218,26 +2927,32 @@ class Variables$Mutation$RemoveSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$RemoveSshKey) || + runtimeType != other.runtimeType) return false; final l$sshInput = sshInput; final lOther$sshInput = other.sshInput; if (l$sshInput != lOther$sshInput) return false; return true; } - CopyWith$Variables$Mutation$RemoveSshKey get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Variables$Mutation$RemoveSshKey + get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RemoveSshKey { - factory CopyWith$Variables$Mutation$RemoveSshKey(Variables$Mutation$RemoveSshKey instance, TRes Function(Variables$Mutation$RemoveSshKey) then) = + factory CopyWith$Variables$Mutation$RemoveSshKey( + Variables$Mutation$RemoveSshKey instance, + TRes Function(Variables$Mutation$RemoveSshKey) then) = _CopyWithImpl$Variables$Mutation$RemoveSshKey; - factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; + factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; TRes call({Input$SshMutationInput? sshInput}); } -class _CopyWithImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { +class _CopyWithImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); final Variables$Mutation$RemoveSshKey _instance; @@ -2246,11 +2961,15 @@ class _CopyWithImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Va static const _undefined = {}; - TRes call({Object? sshInput = _undefined}) => _then(Variables$Mutation$RemoveSshKey( - sshInput: sshInput == _undefined || sshInput == null ? _instance.sshInput : (sshInput as Input$SshMutationInput))); + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$RemoveSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { +class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { _CopyWithStubImpl$Variables$Mutation$RemoveSshKey(this._res); TRes _res; @@ -2260,10 +2979,12 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey implements CopyWit @JsonSerializable(explicitToJson: true) class Mutation$RemoveSshKey { - Mutation$RemoveSshKey({required this.removeSshKey, required this.$__typename}); + Mutation$RemoveSshKey( + {required this.removeSshKey, required this.$__typename}); @override - factory Mutation$RemoveSshKey.fromJson(Map json) => _$Mutation$RemoveSshKeyFromJson(json); + factory Mutation$RemoveSshKey.fromJson(Map json) => + _$Mutation$RemoveSshKeyFromJson(json); final Mutation$RemoveSshKey$removeSshKey removeSshKey; @@ -2280,7 +3001,8 @@ class Mutation$RemoveSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) + return false; final l$removeSshKey = removeSshKey; final lOther$removeSshKey = other.removeSshKey; if (l$removeSshKey != lOther$removeSshKey) return false; @@ -2292,20 +3014,25 @@ class Mutation$RemoveSshKey { } extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { - CopyWith$Mutation$RemoveSshKey get copyWith => CopyWith$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Mutation$RemoveSshKey get copyWith => + CopyWith$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Mutation$RemoveSshKey { - factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, TRes Function(Mutation$RemoveSshKey) then) = + factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, + TRes Function(Mutation$RemoveSshKey) then) = _CopyWithImpl$Mutation$RemoveSshKey; - factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey; + factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey; - TRes call({Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); + TRes call( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; } -class _CopyWithImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { +class _CopyWithImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); final Mutation$RemoveSshKey _instance; @@ -2314,25 +3041,37 @@ class _CopyWithImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$Rem static const _undefined = {}; - TRes call({Object? removeSshKey = _undefined, Object? $__typename = _undefined}) => _then(Mutation$RemoveSshKey( - removeSshKey: - removeSshKey == _undefined || removeSshKey == null ? _instance.removeSshKey : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? removeSshKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RemoveSshKey( + removeSshKey: removeSshKey == _undefined || removeSshKey == null + ? _instance.removeSshKey + : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { final local$removeSshKey = _instance.removeSshKey; - return CopyWith$Mutation$RemoveSshKey$removeSshKey(local$removeSshKey, (e) => call(removeSshKey: e)); + return CopyWith$Mutation$RemoveSshKey$removeSshKey( + local$removeSshKey, (e) => call(removeSshKey: e)); } } -class _CopyWithStubImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { +class _CopyWithStubImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { _CopyWithStubImpl$Mutation$RemoveSshKey(this._res); TRes _res; - call({Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}) => _res; + call( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename}) => + _res; - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => + CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); } const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ @@ -2342,7 +3081,8 @@ const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode(name: NameNode(value: 'SshMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -2351,32 +3091,58 @@ const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'removeSshKey'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'sshInput'), value: VariableNode(name: NameNode(value: 'sshInput')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey(Map data) => Mutation$RemoveSshKey.fromJson(data); +Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( + Map data) => + Mutation$RemoveSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function(dynamic, Mutation$RemoveSshKey?); +typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( + dynamic, Mutation$RemoveSshKey?); -class Options$Mutation$RemoveSshKey extends graphql.MutationOptions { +class Options$Mutation$RemoveSshKey + extends graphql.MutationOptions { Options$Mutation$RemoveSshKey( {String? operationName, required Variables$Mutation$RemoveSshKey variables, @@ -2397,7 +3163,13 @@ class Options$Mutation$RemoveSshKey extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$RemoveSshKey(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RemoveSshKey(data)), update: update, onError: onError, document: documentNodeMutationRemoveSshKey, @@ -2406,11 +3178,16 @@ class Options$Mutation$RemoveSshKey extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$RemoveSshKey extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$RemoveSshKey + extends graphql.WatchQueryOptions { WatchOptions$Mutation$RemoveSshKey( {String? operationName, required Variables$Mutation$RemoveSshKey variables, @@ -2440,18 +3217,29 @@ class WatchOptions$Mutation$RemoveSshKey extends graphql.WatchQueryOptions> mutate$RemoveSshKey(Options$Mutation$RemoveSshKey options) async => await this.mutate(options); + Future> mutate$RemoveSshKey( + Options$Mutation$RemoveSshKey options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$RemoveSshKey(WatchOptions$Mutation$RemoveSshKey options) => + graphql.ObservableQuery watchMutation$RemoveSshKey( + WatchOptions$Mutation$RemoveSshKey options) => this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$RemoveSshKey$removeSshKey implements Fragment$basicMutationReturnFields { - Mutation$RemoveSshKey$removeSshKey({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$RemoveSshKey$removeSshKey + implements Fragment$basicMutationReturnFields { + Mutation$RemoveSshKey$removeSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$RemoveSshKey$removeSshKey.fromJson(Map json) => _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + factory Mutation$RemoveSshKey$removeSshKey.fromJson( + Map json) => + _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); final int code; @@ -2464,20 +3252,23 @@ class Mutation$RemoveSshKey$removeSshKey implements Fragment$basicMutationReturn final Fragment$userFields? user; - Map toJson() => _$Mutation$RemoveSshKey$removeSshKeyToJson(this); + Map toJson() => + _$Mutation$RemoveSshKey$removeSshKeyToJson(this); int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey$removeSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$RemoveSshKey$removeSshKey) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -2497,23 +3288,34 @@ class Mutation$RemoveSshKey$removeSshKey implements Fragment$basicMutationReturn } } -extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey on Mutation$RemoveSshKey$removeSshKey { - CopyWith$Mutation$RemoveSshKey$removeSshKey get copyWith => - CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey + on Mutation$RemoveSshKey$removeSshKey { + CopyWith$Mutation$RemoveSshKey$removeSshKey< + Mutation$RemoveSshKey$removeSshKey> + get copyWith => + CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); } abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { factory CopyWith$Mutation$RemoveSshKey$removeSshKey( - Mutation$RemoveSshKey$removeSshKey instance, TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = + Mutation$RemoveSshKey$removeSshKey instance, + TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; - factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; + factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { +class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); final Mutation$RemoveSshKey$removeSshKey _instance; @@ -2529,23 +3331,43 @@ class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$RemoveSshKey$removeSshKey( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { +class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart index a9dfff53..7fb93e4e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart @@ -6,28 +6,37 @@ part of 'users.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson(Map json) => Fragment$basicMutationReturnFields( +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( + Map json) => + Fragment$basicMutationReturnFields( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Fragment$basicMutationReturnFieldsToJson(Fragment$basicMutationReturnFields instance) => { +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; -Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => Fragment$userFields( +Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => + Fragment$userFields( username: json['username'] as String, - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], unknownValue: Enum$UserType.$unknown), - sshKeys: (json['sshKeys'] as List).map((e) => e as String).toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), $__typename: json['__typename'] as String, ); -Map _$Fragment$userFieldsToJson(Fragment$userFields instance) => { +Map _$Fragment$userFieldsToJson( + Fragment$userFields instance) => + { 'username': instance.username, 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'sshKeys': instance.sshKeys, @@ -41,83 +50,123 @@ const _$Enum$UserTypeEnumMap = { Enum$UserType.$unknown: r'$unknown', }; -Query$AllUsers _$Query$AllUsersFromJson(Map json) => Query$AllUsers( - users: Query$AllUsers$users.fromJson(json['users'] as Map), +Query$AllUsers _$Query$AllUsersFromJson(Map json) => + Query$AllUsers( + users: + Query$AllUsers$users.fromJson(json['users'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$AllUsersToJson(Query$AllUsers instance) => { +Map _$Query$AllUsersToJson(Query$AllUsers instance) => + { 'users': instance.users.toJson(), '__typename': instance.$__typename, }; -Query$AllUsers$users _$Query$AllUsers$usersFromJson(Map json) => Query$AllUsers$users( - allUsers: (json['allUsers'] as List).map((e) => Fragment$userFields.fromJson(e as Map)).toList(), - rootUser: json['rootUser'] == null ? null : Fragment$userFields.fromJson(json['rootUser'] as Map), +Query$AllUsers$users _$Query$AllUsers$usersFromJson( + Map json) => + Query$AllUsers$users( + allUsers: (json['allUsers'] as List) + .map((e) => Fragment$userFields.fromJson(e as Map)) + .toList(), + rootUser: json['rootUser'] == null + ? null + : Fragment$userFields.fromJson( + json['rootUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$AllUsers$usersToJson(Query$AllUsers$users instance) => { +Map _$Query$AllUsers$usersToJson( + Query$AllUsers$users instance) => + { 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), 'rootUser': instance.rootUser?.toJson(), '__typename': instance.$__typename, }; -Variables$Query$GetUser _$Variables$Query$GetUserFromJson(Map json) => Variables$Query$GetUser( +Variables$Query$GetUser _$Variables$Query$GetUserFromJson( + Map json) => + Variables$Query$GetUser( username: json['username'] as String, ); -Map _$Variables$Query$GetUserToJson(Variables$Query$GetUser instance) => { +Map _$Variables$Query$GetUserToJson( + Variables$Query$GetUser instance) => + { 'username': instance.username, }; -Query$GetUser _$Query$GetUserFromJson(Map json) => Query$GetUser( - users: Query$GetUser$users.fromJson(json['users'] as Map), +Query$GetUser _$Query$GetUserFromJson(Map json) => + Query$GetUser( + users: + Query$GetUser$users.fromJson(json['users'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetUserToJson(Query$GetUser instance) => { +Map _$Query$GetUserToJson(Query$GetUser instance) => + { 'users': instance.users.toJson(), '__typename': instance.$__typename, }; -Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => Query$GetUser$users( - getUser: json['getUser'] == null ? null : Fragment$userFields.fromJson(json['getUser'] as Map), +Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => + Query$GetUser$users( + getUser: json['getUser'] == null + ? null + : Fragment$userFields.fromJson( + json['getUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetUser$usersToJson(Query$GetUser$users instance) => { +Map _$Query$GetUser$usersToJson( + Query$GetUser$users instance) => + { 'getUser': instance.getUser?.toJson(), '__typename': instance.$__typename, }; -Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson(Map json) => Variables$Mutation$CreateUser( - user: Input$UserMutationInput.fromJson(json['user'] as Map), +Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson( + Map json) => + Variables$Mutation$CreateUser( + user: Input$UserMutationInput.fromJson( + json['user'] as Map), ); -Map _$Variables$Mutation$CreateUserToJson(Variables$Mutation$CreateUser instance) => { +Map _$Variables$Mutation$CreateUserToJson( + Variables$Mutation$CreateUser instance) => + { 'user': instance.user.toJson(), }; -Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => Mutation$CreateUser( - createUser: Mutation$CreateUser$createUser.fromJson(json['createUser'] as Map), +Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => + Mutation$CreateUser( + createUser: Mutation$CreateUser$createUser.fromJson( + json['createUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$CreateUserToJson(Mutation$CreateUser instance) => { +Map _$Mutation$CreateUserToJson( + Mutation$CreateUser instance) => + { 'createUser': instance.createUser.toJson(), '__typename': instance.$__typename, }; -Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson(Map json) => Mutation$CreateUser$createUser( +Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson( + Map json) => + Mutation$CreateUser$createUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$CreateUser$createUserToJson(Mutation$CreateUser$createUser instance) => { +Map _$Mutation$CreateUser$createUserToJson( + Mutation$CreateUser$createUser instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -125,65 +174,92 @@ Map _$Mutation$CreateUser$createUserToJson(Mutation$CreateUser$ 'user': instance.user?.toJson(), }; -Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson(Map json) => Variables$Mutation$DeleteUser( +Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( + Map json) => + Variables$Mutation$DeleteUser( username: json['username'] as String, ); -Map _$Variables$Mutation$DeleteUserToJson(Variables$Mutation$DeleteUser instance) => { +Map _$Variables$Mutation$DeleteUserToJson( + Variables$Mutation$DeleteUser instance) => + { 'username': instance.username, }; -Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => Mutation$DeleteUser( - deleteUser: Mutation$DeleteUser$deleteUser.fromJson(json['deleteUser'] as Map), +Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => + Mutation$DeleteUser( + deleteUser: Mutation$DeleteUser$deleteUser.fromJson( + json['deleteUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$DeleteUserToJson(Mutation$DeleteUser instance) => { +Map _$Mutation$DeleteUserToJson( + Mutation$DeleteUser instance) => + { 'deleteUser': instance.deleteUser.toJson(), '__typename': instance.$__typename, }; -Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson(Map json) => Mutation$DeleteUser$deleteUser( +Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson( + Map json) => + Mutation$DeleteUser$deleteUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Mutation$DeleteUser$deleteUserToJson(Mutation$DeleteUser$deleteUser instance) => { +Map _$Mutation$DeleteUser$deleteUserToJson( + Mutation$DeleteUser$deleteUser instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; -Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson(Map json) => Variables$Mutation$UpdateUser( - user: Input$UserMutationInput.fromJson(json['user'] as Map), +Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson( + Map json) => + Variables$Mutation$UpdateUser( + user: Input$UserMutationInput.fromJson( + json['user'] as Map), ); -Map _$Variables$Mutation$UpdateUserToJson(Variables$Mutation$UpdateUser instance) => { +Map _$Variables$Mutation$UpdateUserToJson( + Variables$Mutation$UpdateUser instance) => + { 'user': instance.user.toJson(), }; -Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => Mutation$UpdateUser( - updateUser: Mutation$UpdateUser$updateUser.fromJson(json['updateUser'] as Map), +Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => + Mutation$UpdateUser( + updateUser: Mutation$UpdateUser$updateUser.fromJson( + json['updateUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$UpdateUserToJson(Mutation$UpdateUser instance) => { +Map _$Mutation$UpdateUserToJson( + Mutation$UpdateUser instance) => + { 'updateUser': instance.updateUser.toJson(), '__typename': instance.$__typename, }; -Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson(Map json) => Mutation$UpdateUser$updateUser( +Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson( + Map json) => + Mutation$UpdateUser$updateUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$UpdateUser$updateUserToJson(Mutation$UpdateUser$updateUser instance) => { +Map _$Mutation$UpdateUser$updateUserToJson( + Mutation$UpdateUser$updateUser instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -191,33 +267,47 @@ Map _$Mutation$UpdateUser$updateUserToJson(Mutation$UpdateUser$ 'user': instance.user?.toJson(), }; -Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson(Map json) => Variables$Mutation$AddSshKey( - sshInput: Input$SshMutationInput.fromJson(json['sshInput'] as Map), +Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( + Map json) => + Variables$Mutation$AddSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), ); -Map _$Variables$Mutation$AddSshKeyToJson(Variables$Mutation$AddSshKey instance) => { +Map _$Variables$Mutation$AddSshKeyToJson( + Variables$Mutation$AddSshKey instance) => + { 'sshInput': instance.sshInput.toJson(), }; -Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => Mutation$AddSshKey( - addSshKey: Mutation$AddSshKey$addSshKey.fromJson(json['addSshKey'] as Map), +Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => + Mutation$AddSshKey( + addSshKey: Mutation$AddSshKey$addSshKey.fromJson( + json['addSshKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => { +Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => + { 'addSshKey': instance.addSshKey.toJson(), '__typename': instance.$__typename, }; -Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson(Map json) => Mutation$AddSshKey$addSshKey( +Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( + Map json) => + Mutation$AddSshKey$addSshKey( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$AddSshKey$addSshKeyToJson(Mutation$AddSshKey$addSshKey instance) => { +Map _$Mutation$AddSshKey$addSshKeyToJson( + Mutation$AddSshKey$addSshKey instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -225,33 +315,49 @@ Map _$Mutation$AddSshKey$addSshKeyToJson(Mutation$AddSshKey$add 'user': instance.user?.toJson(), }; -Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson(Map json) => Variables$Mutation$RemoveSshKey( - sshInput: Input$SshMutationInput.fromJson(json['sshInput'] as Map), +Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( + Map json) => + Variables$Mutation$RemoveSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), ); -Map _$Variables$Mutation$RemoveSshKeyToJson(Variables$Mutation$RemoveSshKey instance) => { +Map _$Variables$Mutation$RemoveSshKeyToJson( + Variables$Mutation$RemoveSshKey instance) => + { 'sshInput': instance.sshInput.toJson(), }; -Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson(Map json) => Mutation$RemoveSshKey( - removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson(json['removeSshKey'] as Map), +Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey( + removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( + json['removeSshKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$RemoveSshKeyToJson(Mutation$RemoveSshKey instance) => { +Map _$Mutation$RemoveSshKeyToJson( + Mutation$RemoveSshKey instance) => + { 'removeSshKey': instance.removeSshKey.toJson(), '__typename': instance.$__typename, }; -Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson(Map json) => Mutation$RemoveSshKey$removeSshKey( +Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey$removeSshKey( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$RemoveSshKey$removeSshKeyToJson(Mutation$RemoveSshKey$removeSshKey instance) => { +Map _$Mutation$RemoveSshKey$removeSshKeyToJson( + Mutation$RemoveSshKey$removeSshKey instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 77241653..b8739f04 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -1,10 +1,10 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -14,11 +14,11 @@ import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/logic/models/service.dart'; -part 'volume_api.dart'; part 'jobs_api.dart'; part 'server_actions_api.dart'; part 'services_api.dart'; part 'users_api.dart'; +part 'volume_api.dart'; class GenericMutationResult { GenericMutationResult({ @@ -42,7 +42,7 @@ class GenericJobMutationReturn extends GenericMutationResult { } class ServerApi extends ApiMap - with VolumeApi, JobsApi, ServerActionsApi, ServicesApi { + with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi { ServerApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index d224f08f..359967b7 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -7,6 +7,7 @@ class UserMutationResult extends GenericMutationResult { final super.message, this.user, }); + final User? user; } @@ -20,13 +21,17 @@ mixin UsersApi on ApiMap { if (response.hasException) { print(response.exception.toString()); } - users = response.parsedData?.users.allUsers.map((final user) => User.fromGraphQL(user)).toList() ?? []; + users = response.parsedData?.users.allUsers + .map((final user) => User.fromGraphQL(user)) + .toList() ?? + []; final rootUser = response.parsedData?.users.rootUser; if (rootUser != null) { users.add(User.fromGraphQL(rootUser)); } } catch (e) { print(e); + print("Could not"); } return users; } @@ -37,7 +42,8 @@ mixin UsersApi on ApiMap { try { final GraphQLClient client = await getClient(); final variables = Variables$Query$GetUser(username: login); - response = await client.query$GetUser(Options$Query$GetUser(variables: variables)); + response = await client + .query$GetUser(Options$Query$GetUser(variables: variables)); if (response.hasException) { print(response.exception.toString()); } @@ -66,7 +72,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.createUser.success ?? false, code: response.parsedData?.createUser.code ?? 500, message: response.parsedData?.createUser.message, - user: response.parsedData?.createUser.user != null ? User.fromGraphQL(response.parsedData!.createUser.user!) : null, + user: response.parsedData?.createUser.user != null + ? User.fromGraphQL(response.parsedData!.createUser.user!) + : null, ); } catch (e) { print(e); @@ -116,7 +124,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.updateUser.success ?? false, code: response.parsedData?.updateUser.code ?? 500, message: response.parsedData?.updateUser.message, - user: response.parsedData?.updateUser.user != null ? User.fromGraphQL(response.parsedData!.updateUser.user!) : null, + user: response.parsedData?.updateUser.user != null + ? User.fromGraphQL(response.parsedData!.updateUser.user!) + : null, ); } catch (e) { print(e); @@ -146,7 +156,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.addSshKey.success ?? false, code: response.parsedData?.addSshKey.code ?? 500, message: response.parsedData?.addSshKey.message, - user: response.parsedData?.addSshKey.user != null ? User.fromGraphQL(response.parsedData!.addSshKey.user!) : null, + user: response.parsedData?.addSshKey.user != null + ? User.fromGraphQL(response.parsedData!.addSshKey.user!) + : null, ); } catch (e) { print(e); @@ -176,7 +188,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.removeSshKey.success ?? false, code: response.parsedData?.removeSshKey.code ?? 500, message: response.parsedData?.removeSshKey.message, - user: response.parsedData?.removeSshKey.user != null ? User.fromGraphQL(response.parsedData!.removeSshKey.user!) : null, + user: response.parsedData?.removeSshKey.user != null + ? User.fromGraphQL(response.parsedData!.removeSshKey.user!) + : null, ); } catch (e) { print(e); diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 5c94d990..edffda09 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -70,7 +70,9 @@ class ServerApi extends ApiMap { baseUrl: 'https://api.$overrideDomain', connectTimeout: 10000, receiveTimeout: 10000, - headers: customToken != null ? {'Authorization': 'Bearer $customToken'} : null, + headers: customToken != null + ? {'Authorization': 'Bearer $customToken'} + : null, ); } @@ -141,7 +143,8 @@ class ServerApi extends ApiMap { bool isFoundOnServer = false; int code = 0; - final bool isUserCreated = (response.statusCode != null) && (response.statusCode == HttpStatus.created); + final bool isUserCreated = (response.statusCode != null) && + (response.statusCode == HttpStatus.created); if (isUserCreated) { isFoundOnServer = true; @@ -271,7 +274,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/services/ssh/keys/${user.login}'); - res = (response.data as List).map((final e) => e as String).toList(); + res = (response.data as List) + .map((final e) => e as String) + .toList(); } on DioError catch (e) { print(e.message); return ApiResponse>( @@ -330,7 +335,9 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, data: null, - errorMessage: response.data?.containsKey('error') ?? false ? response.data['error'] : null, + errorMessage: response.data?.containsKey('error') ?? false + ? response.data['error'] + : null, ); } @@ -341,7 +348,8 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.delete('/users/${user.login}'); - res = response.statusCode == HttpStatus.ok || response.statusCode == HttpStatus.notFound; + res = response.statusCode == HttpStatus.ok || + response.statusCode == HttpStatus.notFound; } on DioError catch (e) { print(e.message); res = false; @@ -352,7 +360,8 @@ class ServerApi extends ApiMap { } @override - String get rootAddress => throw UnimplementedError('not used in with implementation'); + String get rootAddress => + throw UnimplementedError('not used in with implementation'); Future apply() async { bool res = false; @@ -445,7 +454,8 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/services/restic/backup/list'); - backups = response.data.map((final e) => Backup.fromJson(e)).toList(); + backups = + response.data.map((final e) => Backup.fromJson(e)).toList(); } on DioError catch (e) { print(e.message); } catch (e) { @@ -508,7 +518,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/configuration/pull'); - result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; + result = (response.statusCode != null) + ? (response.statusCode == HttpStatus.ok) + : false; } on DioError catch (e) { print(e.message); } finally { @@ -524,7 +536,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/reboot'); - result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; + result = (response.statusCode != null) + ? (response.statusCode == HttpStatus.ok) + : false; } on DioError catch (e) { print(e.message); } finally { @@ -540,7 +554,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/configuration/upgrade'); - result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; + result = (response.statusCode != null) + ? (response.statusCode == HttpStatus.ok) + : false; } on DioError catch (e) { print(e.message); } finally { @@ -589,7 +605,8 @@ class ServerApi extends ApiMap { Future getServerTimezone() async { // I am not sure how to initialize TimeZoneSettings with default value... final Dio client = await getClient(); - final Response response = await client.get('/system/configuration/timezone'); + final Response response = + await client.get('/system/configuration/timezone'); close(client); return TimeZoneSettings.fromString(response.data); @@ -616,7 +633,11 @@ class ServerApi extends ApiMap { try { response = await client.get('/services/mailserver/dkim'); final Codec base64toString = utf8.fuse(base64); - dkim = base64toString.decode(response.data).split('(')[1].split(')')[0].replaceAll('"', ''); + dkim = base64toString + .decode(response.data) + .split('(')[1] + .split(')')[0] + .replaceAll('"', ''); } on DioError catch (e) { print(e.message); } finally { @@ -647,7 +668,9 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, - data: response.data != null ? RecoveryKeyStatus.fromJson(response.data) : null, + data: response.data != null + ? RecoveryKeyStatus.fromJson(response.data) + : null, ); } @@ -817,7 +840,11 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, - data: (response.data != null) ? response.data.map((final e) => ApiToken.fromJson(e)).toList() : [], + data: (response.data != null) + ? response.data + .map((final e) => ApiToken.fromJson(e)) + .toList() + : [], ); } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 91c09714..0df91227 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -40,10 +40,12 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); - ServerProviderApiFactory? serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( + ServerProviderApiFactory? serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory( ServerProvider.hetzner, // TODO: HARDCODE FOR NOW!!! ); // TODO: Remove when provider selection is implemented. - DnsProviderApiFactory? dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( + DnsProviderApiFactory? dnsProviderApiFactory = + ApiFactoryCreator.createDnsProviderApiFactory( DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! ); @@ -51,11 +53,15 @@ class ServerInstallationRepository { final String? providerApiToken = getIt().hetznerKey; final String? cloudflareToken = getIt().cloudFlareKey; final ServerDomain? serverDomain = getIt().serverDomain; - final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; - final ServerHostingDetails? serverDetails = getIt().serverDetails; + final BackblazeCredential? backblazeCredential = + getIt().backblazeCredential; + final ServerHostingDetails? serverDetails = + getIt().serverDetails; - if (serverDetails != null && serverDetails.provider != ServerProvider.unknown) { - serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( + if (serverDetails != null && + serverDetails.provider != ServerProvider.unknown) { + serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory( serverDetails.provider, ); } @@ -75,12 +81,15 @@ class ServerInstallationRepository { serverDetails: serverDetails!, rootUser: box.get(BNames.rootUser), isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), - isServerResetedFirstTime: box.get(BNames.isServerResetedFirstTime, defaultValue: false), - isServerResetedSecondTime: box.get(BNames.isServerResetedSecondTime, defaultValue: false), + isServerResetedFirstTime: + box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: + box.get(BNames.isServerResetedSecondTime, defaultValue: false), ); } - if (box.get(BNames.isRecoveringServer, defaultValue: false) && serverDomain != null) { + if (box.get(BNames.isRecoveringServer, defaultValue: false) && + serverDomain != null) { return ServerInstallationRecovery( providerApiToken: providerApiToken, cloudFlareKey: cloudflareToken, @@ -106,8 +115,10 @@ class ServerInstallationRepository { serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), - isServerResetedFirstTime: box.get(BNames.isServerResetedFirstTime, defaultValue: false), - isServerResetedSecondTime: box.get(BNames.isServerResetedSecondTime, defaultValue: false), + isServerResetedFirstTime: + box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: + box.get(BNames.isServerResetedSecondTime, defaultValue: false), isLoading: box.get(BNames.isLoading, defaultValue: false), dnsMatches: null, ); @@ -171,7 +182,13 @@ class ServerInstallationRepository { final String? ip4, final Map skippedMatches, ) async { - final List addresses = ['$domainName', 'api.$domainName', 'cloud.$domainName', 'meet.$domainName', 'password.$domainName']; + final List addresses = [ + '$domainName', + 'api.$domainName', + 'cloud.$domainName', + 'meet.$domainName', + 'password.$domainName' + ]; final Map matches = {}; @@ -187,15 +204,19 @@ class ServerInstallationRepository { ); getIt.get().addMessage( Message( - text: 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', + text: + 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', ), ); getIt.get().addMessage( Message( - text: 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', + text: + 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', ), ); - if (lookupRecordRes == null || lookupRecordRes.isEmpty || lookupRecordRes[0].data != ip4) { + if (lookupRecordRes == null || + lookupRecordRes.isEmpty || + lookupRecordRes[0].data != ip4) { matches[address] = false; } else { matches[address] = true; @@ -211,7 +232,8 @@ class ServerInstallationRepository { final String cloudFlareKey, final BackblazeCredential backblazeCredential, { required final void Function() onCancel, - required final Future Function(ServerHostingDetails serverDetails) onSuccess, + required final Future Function(ServerHostingDetails serverDetails) + onSuccess, }) async { final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); try { @@ -315,8 +337,10 @@ class ServerInstallationRepository { final ServerDomain domain, { required final void Function() onCancel, }) async { - final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); - final ServerProviderApi serverApi = serverProviderApiFactory!.getServerProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); + final ServerProviderApi serverApi = + serverProviderApiFactory!.getServerProvider(); await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, @@ -332,7 +356,9 @@ class ServerInstallationRepository { final NavigationService nav = getIt.get(); nav.showPopUpDialog( BrandAlert( - title: e.response!.data['errors'][0]['code'] == 1038 ? 'modals.10'.tr() : 'providers.domain.states.error'.tr(), + title: e.response!.data['errors'][0]['code'] == 1038 + ? 'modals.10'.tr() + : 'providers.domain.states.error'.tr(), contentText: 'modals.6'.tr(), actions: [ ActionButton( @@ -365,7 +391,8 @@ class ServerInstallationRepository { } Future createDkimRecord(final ServerDomain cloudFlareDomain) async { - final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); String dkimRecordString = ''; @@ -432,25 +459,31 @@ class ServerInstallationRepository { final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); if (kIsWeb) { return deviceInfo.webBrowserInfo.then( - (final WebBrowserInfo value) => '${value.browserName} ${value.platform}', + (final WebBrowserInfo value) => + '${value.browserName} ${value.platform}', ); } else { if (Platform.isAndroid) { return deviceInfo.androidInfo.then( - (final AndroidDeviceInfo value) => '${value.model} ${value.version.release}', + (final AndroidDeviceInfo value) => + '${value.model} ${value.version.release}', ); } else if (Platform.isIOS) { return deviceInfo.iosInfo.then( - (final IosDeviceInfo value) => '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', + (final IosDeviceInfo value) => + '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', ); } else if (Platform.isLinux) { - return deviceInfo.linuxInfo.then((final LinuxDeviceInfo value) => value.prettyName); + return deviceInfo.linuxInfo + .then((final LinuxDeviceInfo value) => value.prettyName); } else if (Platform.isMacOS) { return deviceInfo.macOsInfo.then( - (final MacOsDeviceInfo value) => '${value.hostName} ${value.computerName}', + (final MacOsDeviceInfo value) => + '${value.hostName} ${value.computerName}', ); } else if (Platform.isWindows) { - return deviceInfo.windowsInfo.then((final WindowsDeviceInfo value) => value.computerName); + return deviceInfo.windowsInfo + .then((final WindowsDeviceInfo value) => value.computerName); } } return 'Unidentified'; @@ -542,7 +575,8 @@ class ServerInstallationRepository { ); final String serverIp = await getServerIpFromDomain(serverDomain); if (recoveryCapabilities == ServerRecoveryCapabilities.legacy) { - final Map apiResponse = await serverApi.servicesPowerCheck(); + final Map apiResponse = + await serverApi.servicesPowerCheck(); if (apiResponse.isNotEmpty) { return ServerHostingDetails( apiToken: apiToken, @@ -565,7 +599,8 @@ class ServerInstallationRepository { ); } } - final ApiResponse deviceAuthKey = await serverApi.createDeviceToken(); + final ApiResponse deviceAuthKey = + await serverApi.createDeviceToken(); final ApiResponse apiResponse = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), ); @@ -604,7 +639,8 @@ class ServerInstallationRepository { ); final String? serverApiVersion = await serverApi.getApiVersion(); - final ApiResponse> users = await serverApi.getUsersList(withMainUser: true); + final ApiResponse> users = + await serverApi.getUsersList(withMainUser: true); if (serverApiVersion == null || !users.isSuccess) { return fallbackUser; } @@ -704,7 +740,8 @@ class ServerInstallationRepository { Future deleteServer(final ServerDomain serverDomain) async { final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); await api.deleteServer( domainName: serverDomain.domainName, diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index 353786c2..752347c2 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -8,14 +8,30 @@ class ServicesState extends ServerInstallationDependendState { const ServicesState.empty() : this(services: const []); final List services; - bool get isPasswordManagerEnable => services.firstWhere((final service) => service.id == 'bitwarden', orElse: () => Service.empty).isEnabled; - bool get isCloudEnable => services.firstWhere((final service) => service.id == 'nextcloud', orElse: () => Service.empty).isEnabled; - bool get isGitEnable => services.firstWhere((final service) => service.id == 'gitea', orElse: () => Service.empty).isEnabled; - bool get isSocialNetworkEnable => services.firstWhere((final service) => service.id == 'pleroma', orElse: () => Service.empty).isEnabled; - bool get isVpnEnable => services.firstWhere((final service) => service.id == 'ocserv', orElse: () => Service.empty).isEnabled; + bool get isPasswordManagerEnable => services + .firstWhere((final service) => service.id == 'bitwarden', + orElse: () => Service.empty) + .isEnabled; + bool get isCloudEnable => services + .firstWhere((final service) => service.id == 'nextcloud', + orElse: () => Service.empty) + .isEnabled; + bool get isGitEnable => services + .firstWhere((final service) => service.id == 'gitea', + orElse: () => Service.empty) + .isEnabled; + bool get isSocialNetworkEnable => services + .firstWhere((final service) => service.id == 'pleroma', + orElse: () => Service.empty) + .isEnabled; + bool get isVpnEnable => services + .firstWhere((final service) => service.id == 'ocserv', + orElse: () => Service.empty) + .isEnabled; Service? getServiceById(final String id) { - final service = services.firstWhere((final service) => service.id == id, orElse: () => Service.empty); + final service = services.firstWhere((final service) => service.id == id, + orElse: () => Service.empty); if (service.id == 'empty') { return null; } diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 442b2ed8..c9f8e804 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -55,25 +55,30 @@ class UsersCubit extends ServerInstallationDependendCubit { box.clear(); box.addAll(usersFromServer); } else { - getIt().showSnackBar('users.could_not_fetch_users'.tr()); + getIt() + .showSnackBar('users.could_not_fetch_users'.tr()); } } Future createUser(final User user) async { // If user exists on server, do nothing - if (state.users.any((final User u) => u.login == user.login && u.isFoundOnServer)) { + if (state.users + .any((final User u) => u.login == user.login && u.isFoundOnServer)) { return; } final String? password = user.password; if (password == null) { - getIt().showSnackBar('users.could_not_create_user'.tr()); + getIt() + .showSnackBar('users.could_not_create_user'.tr()); return; } // If API returned error, do nothing - final UserMutationResult result = await api.createUser(user.login, password); + final UserMutationResult result = + await api.createUser(user.login, password); final User? createdUser = result.user; if (!result.success || createdUser == null) { - getIt().showSnackBar(result.message ?? 'users.could_not_create_user'.tr()); + getIt() + .showSnackBar(result.message ?? 'users.could_not_create_user'.tr()); return; } @@ -87,7 +92,8 @@ class UsersCubit extends ServerInstallationDependendCubit { Future deleteUser(final User user) async { // If user is primary or root, don't delete if (user.type != UserType.normal) { - getIt().showSnackBar('users.could_not_delete_user'.tr()); + getIt() + .showSnackBar('users.could_not_delete_user'.tr()); return; } final List loadedUsers = List.from(state.users); @@ -98,23 +104,29 @@ class UsersCubit extends ServerInstallationDependendCubit { await box.addAll(loadedUsers); emit(state.copyWith(users: loadedUsers)); } else { - getIt().showSnackBar(result.message ?? 'users.could_not_delete_user'.tr()); + getIt() + .showSnackBar(result.message ?? 'users.could_not_delete_user'.tr()); } } - Future changeUserPassword(final User user, final String newPassword) async { + Future changeUserPassword( + final User user, final String newPassword) async { if (user.type == UserType.root) { - getIt().showSnackBar('users.could_not_change_password'.tr()); + getIt() + .showSnackBar('users.could_not_change_password'.tr()); return; } - final UserMutationResult result = await api.updateUser(user.login, newPassword); + final UserMutationResult result = + await api.updateUser(user.login, newPassword); if (!result.success) { - getIt().showSnackBar(result.message ?? 'users.could_not_change_password'.tr()); + getIt().showSnackBar( + result.message ?? 'users.could_not_change_password'.tr()); } } Future addSshKey(final User user, final String publicKey) async { - final UserMutationResult result = await api.addSshKey(user.login, publicKey); + final UserMutationResult result = + await api.addSshKey(user.login, publicKey); if (result.success) { final User updatedUser = result.user!; await box.putAt(box.values.toList().indexOf(user), updatedUser); @@ -124,12 +136,14 @@ class UsersCubit extends ServerInstallationDependendCubit { ), ); } else { - getIt().showSnackBar(result.message ?? 'users.could_not_add_ssh_key'.tr()); + getIt() + .showSnackBar(result.message ?? 'users.could_not_add_ssh_key'.tr()); } } Future deleteSshKey(final User user, final String publicKey) async { - final UserMutationResult result = await api.removeSshKey(user.login, publicKey); + final UserMutationResult result = + await api.removeSshKey(user.login, publicKey); if (result.success) { final User updatedUser = result.user!; await box.putAt(box.values.toList().indexOf(user), updatedUser); diff --git a/lib/logic/cubit/users/users_state.dart b/lib/logic/cubit/users/users_state.dart index 41227447..1065afc0 100644 --- a/lib/logic/cubit/users/users_state.dart +++ b/lib/logic/cubit/users/users_state.dart @@ -5,11 +5,14 @@ class UsersState extends ServerInstallationDependendState { final List users; - User get rootUser => users.firstWhere((final user) => user.type == UserType.root); + User get rootUser => + users.firstWhere((final user) => user.type == UserType.root); - User get primaryUser => users.firstWhere((final user) => user.type == UserType.primary); + User get primaryUser => + users.firstWhere((final user) => user.type == UserType.primary); - List get normalUsers => users.where((final user) => user.type == UserType.normal).toList(); + List get normalUsers => + users.where((final user) => user.type == UserType.normal).toList(); @override List get props => [users]; @@ -21,7 +24,8 @@ class UsersState extends ServerInstallationDependendState { users ?? this.users, ); - bool isLoginRegistered(final String login) => users.any((final User user) => user.login == login); + bool isLoginRegistered(final String login) => + users.any((final User user) => user.login == login); bool get isEmpty => users.isEmpty; } diff --git a/lib/logic/models/hive/user.dart b/lib/logic/models/hive/user.dart index 042b2485..48c121b7 100644 --- a/lib/logic/models/hive/user.dart +++ b/lib/logic/models/hive/user.dart @@ -51,7 +51,8 @@ class User extends Equatable { Color get color => stringToColor(login); @override - String toString() => '$login, ${isFoundOnServer ? 'found' : 'not found'}, ${sshKeys.length} ssh keys, note: $note'; + String toString() => + '$login, ${isFoundOnServer ? 'found' : 'not found'}, ${sshKeys.length} ssh keys, note: $note'; } @HiveType(typeId: 102) diff --git a/lib/logic/models/hive/user.g.dart b/lib/logic/models/hive/user.g.dart index 8076f3bb..8f5b7b20 100644 --- a/lib/logic/models/hive/user.g.dart +++ b/lib/logic/models/hive/user.g.dart @@ -48,7 +48,11 @@ class UserAdapter extends TypeAdapter { int get hashCode => typeId.hashCode; @override - bool operator ==(Object other) => identical(this, other) || other is UserAdapter && runtimeType == other.runtimeType && typeId == other.typeId; + bool operator ==(Object other) => + identical(this, other) || + other is UserAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; } class UserTypeAdapter extends TypeAdapter { @@ -88,5 +92,9 @@ class UserTypeAdapter extends TypeAdapter { int get hashCode => typeId.hashCode; @override - bool operator ==(Object other) => identical(this, other) || other is UserTypeAdapter && runtimeType == other.runtimeType && typeId == other.typeId; + bool operator ==(Object other) => + identical(this, other) || + other is UserTypeAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; } diff --git a/lib/ui/components/brand_cards/brand_cards.dart b/lib/ui/components/brand_cards/brand_cards.dart index f3273e7a..91737885 100644 --- a/lib/ui/components/brand_cards/brand_cards.dart +++ b/lib/ui/components/brand_cards/brand_cards.dart @@ -96,10 +96,11 @@ class _FilledCard extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(12)), ), clipBehavior: Clip.antiAlias, - color: error ? Theme.of(context).colorScheme.errorContainer + color: error + ? Theme.of(context).colorScheme.errorContainer : tertiary - ? Theme.of(context).colorScheme.tertiaryContainer - : Theme.of(context).colorScheme.surfaceVariant, + ? Theme.of(context).colorScheme.tertiaryContainer + : Theme.of(context).colorScheme.surfaceVariant, child: child, ); } From 5ee1dec6b5dc0f24f6778001185afb0e6f45acb5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 5 Sep 2022 08:21:16 +0300 Subject: [PATCH 045/732] Fix Job adapter runtime error --- lib/config/hive_config.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 03355311..29ab0519 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -21,6 +21,7 @@ class HiveConfig { Hive.registerAdapter(DnsProviderAdapter()); Hive.registerAdapter(ServerProviderAdapter()); + Hive.registerAdapter(UserTypeAdapter()); await Hive.openBox(BNames.appSettingsBox); From 5f58022d423aa5cb2223321e5113b052efeb7c05 Mon Sep 17 00:00:00 2001 From: inexcode Date: Mon, 5 Sep 2022 14:51:01 +0400 Subject: [PATCH 046/732] Update user list screen to properly support newer cubit logic --- assets/translations/en.json | 2 + .../graphql_maps/server_api/users_api.dart | 1 - lib/logic/cubit/services/services_state.dart | 36 ++++++++++----- lib/logic/cubit/users/users_cubit.dart | 15 +++++- lib/logic/cubit/users/users_state.dart | 7 ++- lib/ui/pages/users/empty.dart | 32 +++++++++++++ lib/ui/pages/users/users.dart | 46 +++++++++++++++++-- 7 files changed, 118 insertions(+), 21 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 5e813da5..b68c6b82 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -283,6 +283,8 @@ "account": "Account", "send_registration_data": "Share login credentials", "could_not_fetch_users": "Couldn't fetch users list", + "could_not_fetch_description": "Please check your internet connection and try again", + "refresh_users": "Refresh users list", "could_not_create_user": "Couldn't create user", "could_not_delete_user": "Couldn't delete user", "could_not_add_ssh_key": "Couldn't add SSH key" diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index 359967b7..be7d4fb0 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -31,7 +31,6 @@ mixin UsersApi on ApiMap { } } catch (e) { print(e); - print("Could not"); } return users; } diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index 752347c2..07b82e45 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -9,29 +9,41 @@ class ServicesState extends ServerInstallationDependendState { final List services; bool get isPasswordManagerEnable => services - .firstWhere((final service) => service.id == 'bitwarden', - orElse: () => Service.empty) + .firstWhere( + (final service) => service.id == 'bitwarden', + orElse: () => Service.empty, + ) .isEnabled; bool get isCloudEnable => services - .firstWhere((final service) => service.id == 'nextcloud', - orElse: () => Service.empty) + .firstWhere( + (final service) => service.id == 'nextcloud', + orElse: () => Service.empty, + ) .isEnabled; bool get isGitEnable => services - .firstWhere((final service) => service.id == 'gitea', - orElse: () => Service.empty) + .firstWhere( + (final service) => service.id == 'gitea', + orElse: () => Service.empty, + ) .isEnabled; bool get isSocialNetworkEnable => services - .firstWhere((final service) => service.id == 'pleroma', - orElse: () => Service.empty) + .firstWhere( + (final service) => service.id == 'pleroma', + orElse: () => Service.empty, + ) .isEnabled; bool get isVpnEnable => services - .firstWhere((final service) => service.id == 'ocserv', - orElse: () => Service.empty) + .firstWhere( + (final service) => service.id == 'ocserv', + orElse: () => Service.empty, + ) .isEnabled; Service? getServiceById(final String id) { - final service = services.firstWhere((final service) => service.id == id, - orElse: () => Service.empty); + final service = services.firstWhere( + (final service) => service.id == id, + orElse: () => Service.empty, + ); if (service.id == 'empty') { return null; } diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index c9f8e804..1ff0e9a3 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -16,6 +16,7 @@ class UsersCubit extends ServerInstallationDependendCubit { serverInstallationCubit, const UsersState( [], + false, ), ); Box box = Hive.box(BNames.usersBox); @@ -33,6 +34,7 @@ class UsersCubit extends ServerInstallationDependendCubit { emit( UsersState( loadedUsers, + false, ), ); } @@ -44,11 +46,15 @@ class UsersCubit extends ServerInstallationDependendCubit { if (serverInstallationCubit.state is! ServerInstallationFinished) { return; } + emit(state.copyWith(isLoading: true)); + // sleep for 10 seconds to simulate a slow connection + await Future.delayed(const Duration(seconds: 10)); final List usersFromServer = await api.getAllUsers(); if (usersFromServer.isNotEmpty) { emit( UsersState( usersFromServer, + false, ), ); // Update the users it the box @@ -57,6 +63,7 @@ class UsersCubit extends ServerInstallationDependendCubit { } else { getIt() .showSnackBar('users.could_not_fetch_users'.tr()); + emit(state.copyWith(isLoading: false)); } } @@ -110,7 +117,9 @@ class UsersCubit extends ServerInstallationDependendCubit { } Future changeUserPassword( - final User user, final String newPassword) async { + final User user, + final String newPassword, + ) async { if (user.type == UserType.root) { getIt() .showSnackBar('users.could_not_change_password'.tr()); @@ -120,7 +129,8 @@ class UsersCubit extends ServerInstallationDependendCubit { await api.updateUser(user.login, newPassword); if (!result.success) { getIt().showSnackBar( - result.message ?? 'users.could_not_change_password'.tr()); + result.message ?? 'users.could_not_change_password'.tr(), + ); } } @@ -160,6 +170,7 @@ class UsersCubit extends ServerInstallationDependendCubit { emit( const UsersState( [], + false, ), ); } diff --git a/lib/logic/cubit/users/users_state.dart b/lib/logic/cubit/users/users_state.dart index 1065afc0..dbd931d7 100644 --- a/lib/logic/cubit/users/users_state.dart +++ b/lib/logic/cubit/users/users_state.dart @@ -1,9 +1,10 @@ part of 'users_cubit.dart'; class UsersState extends ServerInstallationDependendState { - const UsersState(this.users); + const UsersState(this.users, this.isLoading); final List users; + final bool isLoading; User get rootUser => users.firstWhere((final user) => user.type == UserType.root); @@ -15,13 +16,15 @@ class UsersState extends ServerInstallationDependendState { users.where((final user) => user.type == UserType.normal).toList(); @override - List get props => [users]; + List get props => [users, isLoading]; UsersState copyWith({ final List? users, + final bool? isLoading, }) => UsersState( users ?? this.users, + isLoading ?? this.isLoading, ); bool isLoginRegistered(final String login) => diff --git a/lib/ui/pages/users/empty.dart b/lib/ui/pages/users/empty.dart index 847003d3..dc2d292b 100644 --- a/lib/ui/pages/users/empty.dart +++ b/lib/ui/pages/users/empty.dart @@ -31,3 +31,35 @@ class _NoUsers extends StatelessWidget { ), ); } + +class _CouldNotLoadUsers extends StatelessWidget { + const _CouldNotLoadUsers({required this.text}); + + final String text; + + @override + Widget build(final BuildContext context) => Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(BrandIcons.users, size: 50, color: BrandColors.grey7), + const SizedBox(height: 20), + BrandText.h2( + 'users.could_not_fetch_users'.tr(), + style: const TextStyle( + color: BrandColors.grey7, + ), + ), + const SizedBox(height: 10), + BrandText.medium( + text, + textAlign: TextAlign.center, + style: const TextStyle( + color: BrandColors.grey7, + ), + ), + ], + ), + ); +} diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 3ccb696a..fb526970 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -14,6 +14,7 @@ import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; @@ -46,10 +47,47 @@ class UsersPage extends StatelessWidget { } else { child = BlocBuilder( builder: (final BuildContext context, final UsersState state) { - print('Rebuild users page'); - final primaryUser = state.primaryUser; - final users = [primaryUser, ...state.users]; + final List users = state.users + .where((final user) => user.type != UserType.root) + .toList(); + // final List users = []; + users.sort( + (final User a, final User b) => + a.login.toLowerCase().compareTo(b.login.toLowerCase()), + ); + if (users.isEmpty) { + if (state.isLoading) { + return const Center( + child: CircularProgressIndicator(), + ); + } + return RefreshIndicator( + onRefresh: () async { + context.read().refresh(); + }, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 15), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + _CouldNotLoadUsers( + text: 'users.could_not_fetch_description'.tr(), + ), + const SizedBox(height: 18), + BrandOutlinedButton( + onPressed: () { + context.read().refresh(); + }, + title: 'users.refresh_users'.tr(), + ), + ], + ), + ), + ), + ); + } return RefreshIndicator( onRefresh: () async { context.read().refresh(); @@ -59,7 +97,7 @@ class UsersPage extends StatelessWidget { itemBuilder: (final BuildContext context, final int index) => _User( user: users[index], - isRootUser: index == 0, + isRootUser: users[index].type == UserType.primary, ), ), ); From 979e8ee37a22d6bfbc24f36e9c9c401eca3998fa Mon Sep 17 00:00:00 2001 From: inexcode Date: Mon, 5 Sep 2022 16:12:00 +0400 Subject: [PATCH 047/732] New user screen UI --- assets/translations/en.json | 5 +- lib/ui/pages/ssh_keys/new_ssh_key.dart | 4 +- lib/ui/pages/ssh_keys/ssh_keys.dart | 2 +- lib/ui/pages/users/user.dart | 6 +- lib/ui/pages/users/user_details.dart | 343 +++++++++++++------------ lib/ui/pages/users/users.dart | 7 +- 6 files changed, 189 insertions(+), 178 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index b68c6b82..501efaff 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -272,6 +272,7 @@ "_comment": "'Users' tab", "add_new_user": "Add a first user", "new_user": "New user", + "delete_user": "Delete user", "not_ready": "Please connect server, domain and DNS in the Providers tab, to be able to add a first user", "nobody_here": "Nobody here", "login": "Login", @@ -287,7 +288,9 @@ "refresh_users": "Refresh users list", "could_not_create_user": "Couldn't create user", "could_not_delete_user": "Couldn't delete user", - "could_not_add_ssh_key": "Couldn't add SSH key" + "could_not_add_ssh_key": "Couldn't add SSH key", + "email_login": "Email login", + "no_sso_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." }, "initializing": { "_comment": "initializing page", diff --git a/lib/ui/pages/ssh_keys/new_ssh_key.dart b/lib/ui/pages/ssh_keys/new_ssh_key.dart index fc558be2..042707ef 100644 --- a/lib/ui/pages/ssh_keys/new_ssh_key.dart +++ b/lib/ui/pages/ssh_keys/new_ssh_key.dart @@ -1,7 +1,7 @@ part of 'ssh_keys.dart'; -class _NewSshKey extends StatelessWidget { - const _NewSshKey(this.user); +class NewSshKey extends StatelessWidget { + const NewSshKey(this.user, {final super.key}); final User user; @override diff --git a/lib/ui/pages/ssh_keys/ssh_keys.dart b/lib/ui/pages/ssh_keys/ssh_keys.dart index 64c1af9c..4bc48e8a 100644 --- a/lib/ui/pages/ssh_keys/ssh_keys.dart +++ b/lib/ui/pages/ssh_keys/ssh_keys.dart @@ -65,7 +65,7 @@ class _SshKeysPageState extends State { backgroundColor: Colors.transparent, builder: (final BuildContext context) => Padding( padding: MediaQuery.of(context).viewInsets, - child: _NewSshKey(widget.user), + child: NewSshKey(widget.user), ), ); }, diff --git a/lib/ui/pages/users/user.dart b/lib/ui/pages/users/user.dart index 69a2e5dc..1602427d 100644 --- a/lib/ui/pages/users/user.dart +++ b/lib/ui/pages/users/user.dart @@ -11,10 +11,8 @@ class _User extends StatelessWidget { @override Widget build(final BuildContext context) => InkWell( onTap: () { - showBrandBottomSheet( - context: context, - builder: (final BuildContext context) => - _UserDetails(user: user, isRootUser: isRootUser), + Navigator.of(context).push( + materialRoute(_UserDetails(user: user, isRootUser: isRootUser)), ); }, child: Container( diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index d758c1f4..0bfbce8c 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -15,179 +15,192 @@ class _UserDetails extends StatelessWidget { final String domainName = UiHelpers.getDomainName(config); - return BrandBottomSheet( - isExpended: true, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Container( - height: 200, - decoration: BoxDecoration( - color: user.color, - borderRadius: const BorderRadius.vertical( - top: Radius.circular(20), + return BrandHeroScreen( + hasBackButton: true, + heroTitle: user.login, + children: [ + BrandCards.filled( + child: Column( + children: [ + ListTile( + title: Text('${user.login}@$domainName'), + subtitle: Text('users.email_login'.tr()), + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + leading: const Icon(Icons.alternate_email_outlined), + iconColor: Theme.of(context).colorScheme.onSurfaceVariant, ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - if (!isRootUser) - Align( - alignment: Alignment.centerRight, - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: 4, - horizontal: 2, - ), - child: PopupMenuButton( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - onSelected: (final PopupMenuItemType result) { - switch (result) { - case PopupMenuItemType.delete: - showDialog( - context: context, - builder: (final BuildContext context) => - AlertDialog( - title: Text('basis.confirmation'.tr()), - content: SingleChildScrollView( - child: ListBody( - children: [ - Text( - 'users.delete_confirm_question'.tr(), - ), - ], - ), - ), - actions: [ - TextButton( - child: Text('basis.cancel'.tr()), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - TextButton( - child: Text( - 'basis.delete'.tr(), - style: const TextStyle( - color: BrandColors.red1, - ), - ), - onPressed: () { - context - .read() - .addJob(DeleteUserJob(user: user)); - Navigator.of(context) - ..pop() - ..pop(); - }, - ), - ], - ), - ); - break; - } - }, - icon: const Icon(Icons.more_vert), - itemBuilder: (final BuildContext context) => [ - PopupMenuItem( - value: PopupMenuItemType.delete, - child: Container( - padding: const EdgeInsets.only(left: 5), - child: Text( - 'basis.delete'.tr(), - style: const TextStyle(color: BrandColors.red1), - ), + ], + ), + ), + const SizedBox(height: 8), + BrandCards.filled( + child: Column( + children: [ + ListTile( + title: Text('ssh.title'.tr()), + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + ), + const Divider(height: 0), + ListTile( + iconColor: Theme.of(context).colorScheme.onSurfaceVariant, + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + title: Text( + 'ssh.create'.tr(), + ), + leading: const Icon(Icons.add_circle_outlined), + onTap: () { + showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => Padding( + padding: MediaQuery.of(context).viewInsets, + child: NewSshKey(user), + ), + ); + }, + ), + Column( + children: user.sshKeys.map((final String key) { + final publicKey = + key.split(' ').length > 1 ? key.split(' ')[1] : key; + final keyType = key.split(' ')[0]; + final keyName = key.split(' ').length > 2 + ? key.split(' ')[2] + : 'ssh.no_key_name'.tr(); + return ListTile( + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + title: Text('$keyName ($keyType)'), + // do not overflow text + subtitle: Text( + publicKey, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + onTap: () { + showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + title: Text('ssh.delete'.tr()), + content: SingleChildScrollView( + child: ListBody( + children: [ + Text('ssh.delete_confirm_question'.tr()), + Text('$keyName ($keyType)'), + Text(publicKey), + ], ), ), - ], - ), + actions: [ + TextButton( + child: Text('basis.cancel'.tr()), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: Text( + 'basis.delete'.tr(), + style: const TextStyle( + color: BrandColors.red1, + ), + ), + onPressed: () { + context.read().addJob( + DeleteSSHKeyJob( + user: user, + publicKey: key, + ), + ); + Navigator.of(context) + ..pop() + ..pop(); + }, + ), + ], + ), + ); + }, + ); + }).toList(), + ), + ], + ), + ), + const SizedBox(height: 8), + ListTile( + iconColor: Theme.of(context).colorScheme.onBackground, + onTap: () => {}, + leading: const Icon(Icons.lock_reset_outlined), + title: Text( + 'users.reset_password'.tr(), + ), + ), + if (!isRootUser) + ListTile( + iconColor: Theme.of(context).colorScheme.error, + textColor: Theme.of(context).colorScheme.error, + onTap: () => { + showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + title: Text('basis.confirmation'.tr()), + content: SingleChildScrollView( + child: ListBody( + children: [ + Text( + 'users.delete_confirm_question'.tr(), + ), + ], ), ), - const Spacer(), - Padding( - padding: const EdgeInsets.symmetric( - vertical: 20, - horizontal: 15, - ), - child: AutoSizeText( - user.login, - style: headline1Style, - softWrap: true, - minFontSize: 9, - maxLines: 3, - overflow: TextOverflow.ellipsis, - ), + actions: [ + TextButton( + child: Text('basis.cancel'.tr()), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: Text( + 'basis.delete'.tr(), + style: const TextStyle( + color: BrandColors.red1, + ), + ), + onPressed: () { + context + .read() + .addJob(DeleteUserJob(user: user)); + Navigator.of(context) + ..pop() + ..pop(); + }, + ), + ], ), - ], + ) + }, + leading: const Icon(Icons.person_remove_outlined), + title: Text( + 'users.delete_user'.tr(), ), ), - const SizedBox(height: 20), - Padding( - padding: paddingH15V0.copyWith(bottom: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BrandText.small('users.account'.tr()), - Container( - height: 40, - alignment: Alignment.centerLeft, - child: BrandText.h4('${user.login}@$domainName'), - ), - if (user.password != null) - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox(height: 14), - BrandText.small('basis.password'.tr()), - Container( - height: 40, - alignment: Alignment.centerLeft, - child: BrandText.h4(user.password), - ), - ], - ), - const SizedBox(height: 24), - const BrandDivider(), - const SizedBox(height: 20), - ListTile( - onTap: () { - Navigator.of(context) - .push(materialRoute(SshKeysPage(user: user))); - }, - title: Text('ssh.title'.tr()), - subtitle: user.sshKeys.isNotEmpty - ? Text( - 'ssh.subtitle_with_keys' - .tr(args: [user.sshKeys.length.toString()]), - ) - : Text('ssh.subtitle_without_keys'.tr()), - trailing: const Icon(BrandIcons.key), - ), - const SizedBox(height: 20), - ListTile( - onTap: () { - Share.share( - 'login: ${user.login}, password: ${user.password}', - ); - }, - title: Text( - 'users.send_registration_data'.tr(), - ), - trailing: const Icon(BrandIcons.share), - ), - ], - ), - ) - ], - ), + const Divider(height: 8), + Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Icon(Icons.warning_amber_outlined, size: 24), + const SizedBox(height: 16), + Text( + 'users.no_sso_notice'.tr(), + ), + ], + ), + ), + ], ); } } - -enum PopupMenuItemType { - // reset, - delete, -} diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index fb526970..9c215ef8 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -1,10 +1,8 @@ -import 'package:auto_size_text/auto_size_text.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/user/user_form_cubit.dart'; @@ -15,15 +13,14 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; +import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/ssh_keys/ssh_keys.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; -import 'package:share_plus/share_plus.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; From 58479256c53bfacacab9a0bc4b886bf7363679d4 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 6 Sep 2022 12:17:44 +0300 Subject: [PATCH 048/732] Refactor disk_size.dart and disk_status.dart to use getters --- lib/logic/models/disk_size.dart | 12 ++++---- lib/ui/pages/server_storage/disk_status.dart | 28 ++++++------------- .../server_storage/extending_volume.dart | 8 +++--- 3 files changed, 18 insertions(+), 30 deletions(-) diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index ecccb2b8..30d16455 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -5,20 +5,20 @@ class DiskSize { int byte; - double asKb() => byte / 1024.0; - double asMb() => byte / 1024.0 / 1024.0; - double asGb() => byte / 1024.0 / 1024.0 / 1024.0; + double get kibibyte => byte / 1024.0; + double get mebibyte => byte / 1024.0 / 1024.0; + double get gibibyte => byte / 1024.0 / 1024.0 / 1024.0; @override String toString() { if (byte < 1024) { return '${byte.toStringAsFixed(0)} ${tr('bytes')}'; } else if (byte < 1024 * 1024) { - return 'providers.storage.kb'.tr(args: [asKb().toStringAsFixed(1)]); + return 'providers.storage.kb'.tr(args: [kibibyte.toStringAsFixed(1)]); } else if (byte < 1024 * 1024 * 1024) { - return 'providers.storage.mb'.tr(args: [asMb().toStringAsFixed(1)]); + return 'providers.storage.mb'.tr(args: [mebibyte.toStringAsFixed(1)]); } else { - return 'providers.storage.gb'.tr(args: [asGb().toStringAsFixed(1)]); + return 'providers.storage.gb'.tr(args: [gibibyte.toStringAsFixed(1)]); } } } diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index 4c9949e0..eae9596a 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -12,25 +12,16 @@ class DiskVolume { ServerVolume? providerVolume; /// from 0.0 to 1.0 - double percentage = 0.0; + double get percentage => sizeTotal.byte == 0 ? 0 : sizeUsed.byte / sizeTotal.byte; + bool get isDiskOkay => percentage < 0.8 && sizeTotal.gibibyte - sizeUsed.gibibyte > 2.0; } class DiskStatus { - DiskStatus() { - isDiskOkay = false; - diskVolumes = []; - } DiskStatus.fromVolumes( final List serverVolumes, final List providerVolumes, ) { - isDiskOkay = true; - - if (providerVolumes.isEmpty || serverVolumes.isEmpty) { - isDiskOkay = false; - } - diskVolumes = serverVolumes.map(( final ServerDiskVolume volume, ) { @@ -60,18 +51,15 @@ class DiskStatus { diskVolume.name = volume.name; diskVolume.root = volume.root; - diskVolume.percentage = - volume.usedSpace != 'None' && volume.totalSpace != 'None' - ? 1.0 / diskVolume.sizeTotal.byte * diskVolume.sizeUsed.byte - : 0.0; - if (diskVolume.percentage >= 0.8 || - diskVolume.sizeTotal.asGb() - diskVolume.sizeUsed.asGb() <= 2.0) { - isDiskOkay = false; - } + return diskVolume; }).toList(); } + DiskStatus() { + diskVolumes = []; + } + + bool get isDiskOkay => diskVolumes.every((final volume) => volume.isDiskOkay); - bool isDiskOkay = false; List diskVolumes = []; } diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 72ef9607..7023685d 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -34,7 +34,7 @@ class _ExtendingVolumePageState extends State { final TextEditingController _priceController = TextEditingController(); void _updateErrorStatuses() { - _isError = minSize.asGb() > _currentSliderGbValue; + _isError = minSize.gibibyte > _currentSliderGbValue; } @override @@ -62,7 +62,7 @@ class _ExtendingVolumePageState extends State { .toStringAsFixed(2); minSize = widget.diskVolumeToResize.sizeTotal; if (_currentSliderGbValue < 0) { - _currentSliderGbValue = minSize.asGb(); + _currentSliderGbValue = minSize.gibibyte; } return BrandHeroScreen( @@ -111,9 +111,9 @@ class _ExtendingVolumePageState extends State { ), const SizedBox(height: 16), Slider( - min: minSize.asGb(), + min: minSize.gibibyte, value: _currentSliderGbValue, - max: maxSize.asGb(), + max: maxSize.gibibyte, onChanged: (final double value) { setState(() { _currentSliderGbValue = value; From 8d2fbb51003f252d6eb0d3389f0dd01666f7b50a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 6 Sep 2022 13:25:28 +0300 Subject: [PATCH 049/732] Implement service page enabling/disabling and service restart --- assets/translations/en.json | 8 ++- assets/translations/ru.json | 6 +++ lib/logic/cubit/services/services_cubit.dart | 4 ++ lib/ui/pages/services/service_page.dart | 52 +++++++++++++++++--- 4 files changed, 63 insertions(+), 7 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 501efaff..6a3317a1 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -192,8 +192,14 @@ "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." }, "services": { - "_comment": "Вкладка сервисы", + "_comment": "Services", "title": "Your personal, private and independent services.", + "service_page": { + "restart": "Restart service", + "disable": "Disable service", + "enable": "Enable service", + "move": "Move to another volume" + }, "mail": { "title": "E-Mail", "subtitle": "E-Mail for company and family.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 1ac780a9..abb9a2d6 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -194,6 +194,12 @@ "services": { "_comment": "Вкладка сервисы", "title": "Ваши личные, приватные и независимые сервисы:", + "service_page": { + "restart": "Перезапустить сервис", + "disable": "Выключить сервис", + "enable": "Включить сервис", + "move": "Переместить на другой диск" + }, "mail": { "title": "Почта", "subtitle": "Электронная почта для семьи или компании.", diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart index 089d9638..c423fd9f 100644 --- a/lib/logic/cubit/services/services_cubit.dart +++ b/lib/logic/cubit/services/services_cubit.dart @@ -37,6 +37,10 @@ class ServicesCubit extends ServerInstallationDependendCubit { } } + Future restart(final String serviceId) async { + await api.restartService(serviceId); + } + @override void clear() async { emit(const ServicesState.empty()); diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 75e7c7cf..d3dad443 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -1,7 +1,10 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; +import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; @@ -32,6 +35,10 @@ class _ServicePageState extends State { ], ); } + + final bool serviceDisabled = service.status == ServiceStatus.inactive || + service.status == ServiceStatus.off; + return BrandHeroScreen( hasBackButton: true, children: [ @@ -73,19 +80,30 @@ class _ServicePageState extends State { const SizedBox(height: 8), ListTile( iconColor: Theme.of(context).colorScheme.onBackground, - onTap: () => {}, + onTap: () => { + context.read().restart(service.id), + }, leading: const Icon(Icons.restart_alt_outlined), title: Text( - 'Restart service', + 'services.service_page.restart'.tr(), style: Theme.of(context).textTheme.titleMedium, ), ), ListTile( iconColor: Theme.of(context).colorScheme.onBackground, - onTap: () => {}, + onTap: () => { + context.read().createOrRemoveServiceToggleJob( + ServiceToggleJob( + type: _idToLegacyType(service.id), + needToTurnOn: serviceDisabled, + ), + ), + }, leading: const Icon(Icons.power_settings_new), title: Text( - 'Disable service', + serviceDisabled + ? 'services.service_page.enable'.tr() + : 'services.service_page.disable'.tr(), style: Theme.of(context).textTheme.titleMedium, ), ), @@ -95,13 +113,35 @@ class _ServicePageState extends State { onTap: () => {}, leading: const Icon(Icons.drive_file_move_outlined), title: Text( - 'Move to another volume', + 'services.service_page.move'.tr(), style: Theme.of(context).textTheme.titleMedium, ), ), ], ); } + +// TODO: Get rid as soon as possible + ServiceTypes _idToLegacyType(final String serviceId) { + switch (serviceId) { + case 'mailserver': + return ServiceTypes.mailserver; + case 'jitsi': + return ServiceTypes.jitsi; + case 'bitwarden': + return ServiceTypes.bitwarden; + case 'nextcloud': + return ServiceTypes.nextcloud; + case 'pleroma': + return ServiceTypes.pleroma; + case 'gitea': + return ServiceTypes.gitea; + case 'ocserv': + return ServiceTypes.ocserv; + default: + throw Exception('wrong state'); + } + } } class ServiceStatusCard extends StatelessWidget { From 6f5ffa0f8033061bef8b16acfb88cca9640d371b Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 6 Sep 2022 13:27:18 +0300 Subject: [PATCH 050/732] Make DiskSize a constant constructor and fix slider on Volume resize screen --- .../provider_volume_cubit.dart | 3 +- lib/logic/models/disk_size.dart | 4 +- lib/logic/models/service.dart | 2 +- lib/ui/pages/server_storage/disk_status.dart | 81 ++++++++++++++----- .../server_storage/extending_volume.dart | 16 +++- 5 files changed, 76 insertions(+), 30 deletions(-) diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 84d8aee1..a4df4469 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -89,8 +89,7 @@ class ApiProviderVolumeCubit final ServerVolume? volume = await providerApi!.getVolumeProvider().createVolume(); - final diskVolume = DiskVolume(); - diskVolume.providerVolume = volume; + final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); await Future.delayed(const Duration(seconds: 10)); diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index 30d16455..60c2d8a1 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -1,9 +1,9 @@ import 'package:easy_localization/easy_localization.dart'; class DiskSize { - DiskSize({final this.byte = 0}); + const DiskSize({final this.byte = 0}); - int byte; + final int byte; double get kibibyte => byte / 1024.0; double get mebibyte => byte / 1024.0 / 1024.0; diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 1085622a..33475588 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -51,7 +51,7 @@ class Service { isMovable: false, status: ServiceStatus.off, storageUsage: ServiceStorageUsage( - used: DiskSize(byte: 0), + used: const DiskSize(byte: 0), volume: '', ), svgIcon: '', diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index eae9596a..dbc01c16 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -3,21 +3,65 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; class DiskVolume { - DiskSize sizeUsed = DiskSize(); - DiskSize sizeTotal = DiskSize(); - String name = ''; - bool root = false; - bool isResizable = true; + DiskVolume({ + this.name = '', + this.sizeTotal = const DiskSize(byte: 0), + this.sizeUsed = const DiskSize(byte: 0), + this.root = false, + this.isResizable = false, + this.serverDiskVolume, + this.providerVolume, + }); + + DiskVolume.fromServerDiscVolume( + final ServerDiskVolume volume, + final ServerVolume? providerVolume, + ) : this( + name: volume.name, + sizeTotal: DiskSize( + byte: + volume.totalSpace == 'None' ? 0 : int.parse(volume.totalSpace), + ), + sizeUsed: DiskSize( + byte: volume.usedSpace == 'None' ? 0 : int.parse(volume.usedSpace), + ), + root: volume.root, + isResizable: providerVolume != null, + serverDiskVolume: volume, + providerVolume: providerVolume, + ); + + /// Get the display name of the volume + /// + /// If it is sda1 and root the name is "System disk" + /// If there is a mapping to providerVolume, the name is "Expandable volume" + /// Otherwise the name is the name of the volume + String get displayName { + if (root) { + return 'System disk'; + } else if (providerVolume != null) { + return 'Expandable volume'; + } else { + return name; + } + } + + DiskSize sizeUsed; + DiskSize sizeTotal; + String name; + bool root; + bool isResizable; ServerDiskVolume? serverDiskVolume; ServerVolume? providerVolume; /// from 0.0 to 1.0 - double get percentage => sizeTotal.byte == 0 ? 0 : sizeUsed.byte / sizeTotal.byte; - bool get isDiskOkay => percentage < 0.8 && sizeTotal.gibibyte - sizeUsed.gibibyte > 2.0; + double get percentage => + sizeTotal.byte == 0 ? 0 : sizeUsed.byte / sizeTotal.byte; + bool get isDiskOkay => + percentage < 0.8 && sizeTotal.gibibyte - sizeUsed.gibibyte > 2.0; } class DiskStatus { - DiskStatus.fromVolumes( final List serverVolumes, final List providerVolumes, @@ -25,32 +69,25 @@ class DiskStatus { diskVolumes = serverVolumes.map(( final ServerDiskVolume volume, ) { - final DiskVolume diskVolume = DiskVolume(); - diskVolume.sizeUsed = DiskSize( - byte: volume.usedSpace == 'None' ? 0 : int.parse(volume.usedSpace), - ); - diskVolume.sizeTotal = DiskSize( - byte: volume.totalSpace == 'None' ? 0 : int.parse(volume.totalSpace), - ); - diskVolume.serverDiskVolume = volume; + ServerVolume? providerVolume; - for (final ServerVolume providerVolume in providerVolumes) { - if (providerVolume.linuxDevice == null || + for (final ServerVolume iterableProviderVolume in providerVolumes) { + if (iterableProviderVolume.linuxDevice == null || volume.model == null || volume.serial == null) { continue; } - final String deviceId = providerVolume.linuxDevice!.split('/').last; + final String deviceId = iterableProviderVolume.linuxDevice!.split('/').last; if (deviceId.contains(volume.model!) && deviceId.contains(volume.serial!)) { - diskVolume.providerVolume = providerVolume; + providerVolume = iterableProviderVolume; break; } } - diskVolume.name = volume.name; - diskVolume.root = volume.root; + final DiskVolume diskVolume = DiskVolume.fromServerDiscVolume(volume, providerVolume); + return diskVolume; }).toList(); diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 7023685d..e6ceb11e 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -22,13 +22,20 @@ class ExtendingVolumePage extends StatefulWidget { } class _ExtendingVolumePageState extends State { + @override + void initState() { + minSize = widget.diskVolumeToResize.sizeTotal; + _currentSliderGbValue = minSize.gibibyte; + super.initState(); + } + bool _isError = false; - double _currentSliderGbValue = -1; + late double _currentSliderGbValue; double _euroPerGb = 1.0; - final DiskSize maxSize = DiskSize(byte: 500000000000); - DiskSize minSize = DiskSize(); + final DiskSize maxSize = const DiskSize(byte: 500000000000); + late DiskSize minSize; final TextEditingController _sizeController = TextEditingController(); final TextEditingController _priceController = TextEditingController(); @@ -52,6 +59,9 @@ class _ExtendingVolumePageState extends State { 'providers.storage.extending_volume_description'.tr(), children: const [ SizedBox(height: 16), + Center( + child: CircularProgressIndicator(), + ), ], ); } From 5f13be9339a7efef83e06f2cce6312e242b3b68c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 6 Sep 2022 14:03:21 +0300 Subject: [PATCH 051/732] Fix Hetzner size storage --- .../server_providers/hetzner/hetzner.dart | 2 +- lib/logic/models/disk_size.dart | 14 ++++++++++++++ lib/ui/pages/server_storage/disk_status.dart | 7 ++++--- lib/ui/pages/server_storage/extending_volume.dart | 5 +++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 6cf5a971..04ded55f 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -150,7 +150,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final List rawVolumes = dbGetResponse.data['volumes']; for (final rawVolume in rawVolumes) { final int dbId = rawVolume['id']; - final int dbSize = rawVolume['size']; + final int dbSize = rawVolume['size'] * 1024 * 1024 * 1024; final dbServer = rawVolume['server']; final String dbName = rawVolume['name']; final dbDevice = rawVolume['linux_device']; diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index 60c2d8a1..9fe18b7d 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -3,12 +3,26 @@ import 'package:easy_localization/easy_localization.dart'; class DiskSize { const DiskSize({final this.byte = 0}); + DiskSize.fromKibibyte(final double kibibyte) + : this(byte: (kibibyte * 1024).round()); + DiskSize.fromMebibyte(final double mebibyte) + : this(byte: (mebibyte * 1024 * 1024).round()); + DiskSize.fromGibibyte(final double gibibyte) + : this(byte: (gibibyte * 1024 * 1024 * 1024).round()); + final int byte; double get kibibyte => byte / 1024.0; double get mebibyte => byte / 1024.0 / 1024.0; double get gibibyte => byte / 1024.0 / 1024.0 / 1024.0; + DiskSize operator +(final DiskSize other) => + DiskSize(byte: byte + other.byte); + DiskSize operator -(final DiskSize other) => + DiskSize(byte: byte - other.byte); + DiskSize operator *(final double other) => + DiskSize(byte: (byte * other).round()); + @override String toString() { if (byte < 1024) { diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index dbc01c16..1803f609 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -78,7 +78,8 @@ class DiskStatus { continue; } - final String deviceId = iterableProviderVolume.linuxDevice!.split('/').last; + final String deviceId = + iterableProviderVolume.linuxDevice!.split('/').last; if (deviceId.contains(volume.model!) && deviceId.contains(volume.serial!)) { providerVolume = iterableProviderVolume; @@ -86,8 +87,8 @@ class DiskStatus { } } - final DiskVolume diskVolume = DiskVolume.fromServerDiscVolume(volume, providerVolume); - + final DiskVolume diskVolume = + DiskVolume.fromServerDiscVolume(volume, providerVolume); return diskVolume; }).toList(); diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index e6ceb11e..0c748190 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -24,7 +24,7 @@ class ExtendingVolumePage extends StatefulWidget { class _ExtendingVolumePageState extends State { @override void initState() { - minSize = widget.diskVolumeToResize.sizeTotal; + minSize = widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(2); _currentSliderGbValue = minSize.gibibyte; super.initState(); } @@ -70,7 +70,8 @@ class _ExtendingVolumePageState extends State { _priceController.text = (_euroPerGb * double.parse(_sizeController.text)) .toStringAsFixed(2); - minSize = widget.diskVolumeToResize.sizeTotal; + minSize = + widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(2); if (_currentSliderGbValue < 0) { _currentSliderGbValue = minSize.gibibyte; } From 580da306e153243c4847d2b38861c38c9ee197a6 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 6 Sep 2022 15:33:12 +0300 Subject: [PATCH 052/732] Fix extending volume button error --- lib/ui/pages/server_storage/extending_volume.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 0c748190..02b1dba7 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -135,7 +135,7 @@ class _ExtendingVolumePageState extends State { const SizedBox(height: 16), FilledButton( title: 'providers.storage.extend_volume_button.title'.tr(), - onPressed: null, + onPressed: _isError ? null : () => {}, disabled: _isError, ), const SizedBox(height: 16), From 3eda30d924a03ad42742ab9fe2b5bdf93fcc9858 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 8 Sep 2022 10:53:25 +0300 Subject: [PATCH 053/732] Refresh DNS screen design --- lib/ui/pages/dns_details/dns_details.dart | 237 ++++++++++------------ 1 file changed, 112 insertions(+), 125 deletions(-) diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 44d6db0d..c59d26b6 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -22,46 +22,59 @@ class _DnsDetailsPageState extends State { String description = ''; String subtitle = ''; Icon icon = const Icon( - Icons.check, - color: Colors.green, + Icons.check_circle_outline, + size: 24.0, ); + bool isError = false; switch (dnsState) { case DnsRecordsStatus.uninitialized: description = 'providers.domain.states.uninitialized'.tr(); icon = const Icon( Icons.refresh, + size: 24.0, ); + isError = false; break; case DnsRecordsStatus.refreshing: description = 'providers.domain.states.refreshing'.tr(); icon = const Icon( Icons.refresh, + size: 24.0, ); + isError = false; break; case DnsRecordsStatus.good: description = 'providers.domain.states.ok'.tr(); icon = const Icon( - Icons.check, - color: Colors.green, + Icons.check_circle_outline, + size: 24.0, ); + isError = false; break; case DnsRecordsStatus.error: description = 'providers.domain.states.error'.tr(); subtitle = 'providers.domain.states.error_subtitle'.tr(); icon = const Icon( - Icons.error, - color: Colors.red, + Icons.error_outline, + size: 24.0, ); + isError = true; break; } - return ListTile( - onTap: dnsState == DnsRecordsStatus.error ? () => fixCallback() : null, - title: Text( - description, - style: Theme.of(context).textTheme.headline6, + return BrandCards.filled( + child: ListTile( + onTap: dnsState == DnsRecordsStatus.error ? () => fixCallback() : null, + leading: icon, + title: Text(description), + subtitle: subtitle != '' ? Text(subtitle) : null, + textColor: isError + ? Theme.of(context).colorScheme.error + : Theme.of(context).colorScheme.onSurfaceVariant, + iconColor: isError + ? Theme.of(context).colorScheme.error + : Theme.of(context).colorScheme.onSurfaceVariant, ), - subtitle: subtitle != '' ? Text(subtitle) : null, - leading: icon, + error: isError, ); } @@ -94,132 +107,106 @@ class _DnsDetailsPageState extends State { ); } + final Color goodColor = Theme.of(context).colorScheme.onBackground; + final Color errorColor = Theme.of(context).colorScheme.error; + final Color neutralColor = Theme.of(context).colorScheme.onBackground; + return BrandHeroScreen( hasBackButton: true, heroSubtitle: domain, heroIcon: BrandIcons.globe, heroTitle: 'providers.domain.screen_title'.tr(), children: [ - BrandCards.outlined( - child: Column( - children: [ - _getStateCard(dnsCubit.dnsState, () { - context.read().fix(); - }), - ], - ), - ), - + _getStateCard(dnsCubit.dnsState, () { + context.read().fix(); + }), const SizedBox(height: 16.0), - // Outlined card with a list of A records and their - // status. - BrandCards.outlined( - child: Column( - children: [ - ListTile( - title: Text( - 'providers.domain.cards.services.title'.tr(), - style: Theme.of(context).textTheme.headline6, + ListTile( + title: Text( + 'providers.domain.cards.services.title'.tr(), + style: Theme.of(context).textTheme.headlineSmall!.copyWith( + color: Theme.of(context).colorScheme.secondary, ), - subtitle: Text( - 'providers.domain.cards.services.subtitle'.tr(), - style: Theme.of(context).textTheme.caption, - ), - ), - ...dnsCubit.dnsRecords - .where( - (final dnsRecord) => - dnsRecord.category == DnsRecordsCategory.services, - ) - .map( - (final dnsRecord) => Column( - children: [ - const Divider( - height: 1.0, - ), - ListTile( - leading: Icon( - dnsRecord.isSatisfied - ? Icons.check - : dnsCubit.dnsState == - DnsRecordsStatus.refreshing - ? Icons.refresh - : Icons.error, - color: dnsRecord.isSatisfied - ? Colors.green - : dnsCubit.dnsState == - DnsRecordsStatus.refreshing - ? Colors.grey - : Colors.red, - ), - title: Text( - dnsRecord.description.tr(), - style: Theme.of(context).textTheme.labelLarge, - ), - subtitle: Text( - dnsRecord.name, - style: Theme.of(context).textTheme.caption, - ), - ), - ], - ), - ) - .toList(), - ], + ), + subtitle: Text( + 'providers.domain.cards.services.subtitle'.tr(), + style: Theme.of(context).textTheme.labelMedium, ), ), + ...dnsCubit.dnsRecords + .where( + (final dnsRecord) => + dnsRecord.category == DnsRecordsCategory.services, + ) + .map( + (final dnsRecord) => Column( + children: [ + ListTile( + leading: Icon( + dnsRecord.isSatisfied + ? Icons.check_circle_outline + : dnsCubit.dnsState == DnsRecordsStatus.refreshing + ? Icons.refresh + : Icons.error_outline, + color: dnsRecord.isSatisfied + ? goodColor + : dnsCubit.dnsState == DnsRecordsStatus.refreshing + ? neutralColor + : errorColor, + ), + title: Text( + dnsRecord.description.tr(), + ), + subtitle: Text( + dnsRecord.name, + ), + ), + ], + ), + ) + .toList(), const SizedBox(height: 16.0), - BrandCards.outlined( - child: Column( - children: [ - ListTile( - title: Text( - 'providers.domain.cards.email.title'.tr(), - style: Theme.of(context).textTheme.headline6, + ListTile( + title: Text( + 'providers.domain.cards.email.title'.tr(), + style: Theme.of(context).textTheme.headlineSmall!.copyWith( + color: Theme.of(context).colorScheme.secondary, ), - subtitle: Text( - 'providers.domain.cards.email.subtitle'.tr(), - style: Theme.of(context).textTheme.caption, - ), - ), - ...dnsCubit.dnsRecords - .where( - (final dnsRecord) => - dnsRecord.category == DnsRecordsCategory.email, - ) - .map( - (final dnsRecord) => Column( - children: [ - const Divider( - height: 1.0, - ), - ListTile( - leading: Icon( - dnsRecord.isSatisfied - ? Icons.check - : dnsCubit.dnsState == - DnsRecordsStatus.refreshing - ? Icons.refresh - : Icons.error, - color: dnsRecord.isSatisfied - ? Colors.green - : dnsCubit.dnsState == - DnsRecordsStatus.refreshing - ? Colors.grey - : Colors.red, - ), - title: Text( - dnsRecord.description.tr(), - style: Theme.of(context).textTheme.labelLarge, - ), - ), - ], - ), - ) - .toList(), - ], + ), + subtitle: Text( + 'providers.domain.cards.email.subtitle'.tr(), + style: Theme.of(context).textTheme.labelMedium, ), ), + ...dnsCubit.dnsRecords + .where( + (final dnsRecord) => + dnsRecord.category == DnsRecordsCategory.email, + ) + .map( + (final dnsRecord) => Column( + children: [ + ListTile( + leading: Icon( + dnsRecord.isSatisfied + ? Icons.check_circle_outline + : dnsCubit.dnsState == DnsRecordsStatus.refreshing + ? Icons.refresh + : Icons.error_outline, + color: dnsRecord.isSatisfied + ? goodColor + : dnsCubit.dnsState == DnsRecordsStatus.refreshing + ? neutralColor + : errorColor, + ), + title: Text( + dnsRecord.description.tr(), + ), + ), + ], + ), + ) + .toList(), ], ); } From 981b9865cd0e79adcb44e521551db52f513777ec Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 8 Sep 2022 18:13:18 +0300 Subject: [PATCH 054/732] Fix users not changing SSH keys and remove SSH keys screen --- lib/logic/cubit/users/users_cubit.dart | 14 +- lib/ui/pages/more/more.dart | 7 +- lib/ui/pages/ssh_keys/new_ssh_key.dart | 76 ---- lib/ui/pages/ssh_keys/ssh_keys.dart | 144 -------- lib/ui/pages/users/user.dart | 2 +- lib/ui/pages/users/user_details.dart | 465 ++++++++++++++++--------- lib/ui/pages/users/users.dart | 2 +- 7 files changed, 315 insertions(+), 395 deletions(-) delete mode 100644 lib/ui/pages/ssh_keys/new_ssh_key.dart delete mode 100644 lib/ui/pages/ssh_keys/ssh_keys.dart diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 1ff0e9a3..87abcffd 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -47,8 +47,6 @@ class UsersCubit extends ServerInstallationDependendCubit { return; } emit(state.copyWith(isLoading: true)); - // sleep for 10 seconds to simulate a slow connection - await Future.delayed(const Duration(seconds: 10)); final List usersFromServer = await api.getAllUsers(); if (usersFromServer.isNotEmpty) { emit( @@ -58,8 +56,8 @@ class UsersCubit extends ServerInstallationDependendCubit { ), ); // Update the users it the box - box.clear(); - box.addAll(usersFromServer); + await box.clear(); + await box.addAll(usersFromServer); } else { getIt() .showSnackBar('users.could_not_fetch_users'.tr()); @@ -139,7 +137,9 @@ class UsersCubit extends ServerInstallationDependendCubit { await api.addSshKey(user.login, publicKey); if (result.success) { final User updatedUser = result.user!; - await box.putAt(box.values.toList().indexOf(user), updatedUser); + final int index = + state.users.indexWhere((final User u) => u.login == user.login); + await box.putAt(index, updatedUser); emit( state.copyWith( users: box.values.toList(), @@ -156,7 +156,9 @@ class UsersCubit extends ServerInstallationDependendCubit { await api.removeSshKey(user.login, publicKey); if (result.success) { final User updatedUser = result.user!; - await box.putAt(box.values.toList().indexOf(user), updatedUser); + final int index = + state.users.indexWhere((final User u) => u.login == user.login); + await box.putAt(index, updatedUser); emit( state.copyWith( users: box.values.toList(), diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 5a02da3c..fce3f640 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -11,10 +11,9 @@ import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; import 'package:selfprivacy/ui/pages/setup/initializing.dart'; import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; -import 'package:selfprivacy/ui/pages/ssh_keys/ssh_keys.dart'; +import 'package:selfprivacy/ui/pages/users/users.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; -import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/ui/pages/more/about/about.dart'; import 'package:selfprivacy/ui/pages/more/app_settings/app_setting.dart'; import 'package:selfprivacy/ui/pages/more/console/console.dart'; @@ -53,8 +52,8 @@ class MorePage extends StatelessWidget { _MoreMenuItem( title: 'more.create_ssh_key'.tr(), iconData: Ionicons.key_outline, - goTo: SshKeysPage( - user: context.read().state.rootUser, + goTo: const UserDetails( + login: 'root', ), ), if (isReady) diff --git a/lib/ui/pages/ssh_keys/new_ssh_key.dart b/lib/ui/pages/ssh_keys/new_ssh_key.dart deleted file mode 100644 index 042707ef..00000000 --- a/lib/ui/pages/ssh_keys/new_ssh_key.dart +++ /dev/null @@ -1,76 +0,0 @@ -part of 'ssh_keys.dart'; - -class NewSshKey extends StatelessWidget { - const NewSshKey(this.user, {final super.key}); - final User user; - - @override - Widget build(final BuildContext context) => BrandBottomSheet( - child: BlocProvider( - create: (final context) { - final jobCubit = context.read(); - final jobState = jobCubit.state; - if (jobState is JobsStateWithJobs) { - final jobs = jobState.clientJobList; - for (final job in jobs) { - if (job is CreateSSHKeyJob && job.user.login == user.login) { - user.sshKeys.add(job.publicKey); - } - } - } - return SshFormCubit( - jobsCubit: jobCubit, - user: user, - ); - }, - child: Builder( - builder: (final context) { - final formCubitState = context.watch().state; - - return BlocListener( - listener: (final context, final state) { - if (state.isSubmitted) { - Navigator.pop(context); - } - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - BrandHeader( - title: user.login, - ), - const SizedBox(width: 14), - Padding( - padding: paddingH15V0, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - IntrinsicHeight( - child: CubitFormTextField( - formFieldCubit: context.read().key, - decoration: InputDecoration( - labelText: 'ssh.input_label'.tr(), - ), - ), - ), - const SizedBox(height: 30), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => - context.read().trySubmit(), - text: 'ssh.create'.tr(), - ), - const SizedBox(height: 30), - ], - ), - ), - ], - ), - ); - }, - ), - ), - ); -} diff --git a/lib/ui/pages/ssh_keys/ssh_keys.dart b/lib/ui/pages/ssh_keys/ssh_keys.dart deleted file mode 100644 index 4bc48e8a..00000000 --- a/lib/ui/pages/ssh_keys/ssh_keys.dart +++ /dev/null @@ -1,144 +0,0 @@ -import 'package:cubit_form/cubit_form.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:selfprivacy/logic/cubit/forms/user/ssh_form_cubit.dart'; -import 'package:selfprivacy/logic/models/job.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; - -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; -import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; - -part 'new_ssh_key.dart'; - -// Get user object as a parameter -class SshKeysPage extends StatefulWidget { - const SshKeysPage({required this.user, final super.key}); - final User user; - - @override - State createState() => _SshKeysPageState(); -} - -class _SshKeysPageState extends State { - @override - Widget build(final BuildContext context) => BrandHeroScreen( - heroTitle: 'ssh.title'.tr(), - heroSubtitle: widget.user.login, - heroIcon: BrandIcons.key, - children: [ - if (widget.user.login == 'root') - Column( - children: [ - // Show alert card if user is root - BrandCards.outlined( - child: ListTile( - leading: Icon( - Icons.warning_rounded, - color: Theme.of(context).colorScheme.error, - ), - title: Text('ssh.root.title'.tr()), - subtitle: Text('ssh.root.subtitle'.tr()), - ), - ) - ], - ), - BrandCards.outlined( - child: Column( - children: [ - ListTile( - title: Text( - 'ssh.create'.tr(), - style: Theme.of(context).textTheme.headline6, - ), - leading: const Icon(Icons.add_circle_outline_rounded), - onTap: () { - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: MediaQuery.of(context).viewInsets, - child: NewSshKey(widget.user), - ), - ); - }, - ), - const Divider(height: 0), - // show a list of ListTiles with ssh keys - // Clicking on one should delete it - Column( - children: widget.user.sshKeys.map((final String key) { - final publicKey = - key.split(' ').length > 1 ? key.split(' ')[1] : key; - final keyType = key.split(' ')[0]; - final keyName = key.split(' ').length > 2 - ? key.split(' ')[2] - : 'ssh.no_key_name'.tr(); - return ListTile( - title: Text('$keyName ($keyType)'), - // do not overflow text - subtitle: Text( - publicKey, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - onTap: () { - showDialog( - context: context, - builder: (final BuildContext context) => AlertDialog( - title: Text('ssh.delete'.tr()), - content: SingleChildScrollView( - child: ListBody( - children: [ - Text('ssh.delete_confirm_question'.tr()), - Text('$keyName ($keyType)'), - Text(publicKey), - ], - ), - ), - actions: [ - TextButton( - child: Text('basis.cancel'.tr()), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - TextButton( - child: Text( - 'basis.delete'.tr(), - style: const TextStyle( - color: BrandColors.red1, - ), - ), - onPressed: () { - context.read().addJob( - DeleteSSHKeyJob( - user: widget.user, - publicKey: key, - ), - ); - Navigator.of(context) - ..pop() - ..pop(); - }, - ), - ], - ), - ); - }, - ); - }).toList(), - ) - ], - ), - ), - ], - ); -} diff --git a/lib/ui/pages/users/user.dart b/lib/ui/pages/users/user.dart index 1602427d..1d781811 100644 --- a/lib/ui/pages/users/user.dart +++ b/lib/ui/pages/users/user.dart @@ -12,7 +12,7 @@ class _User extends StatelessWidget { Widget build(final BuildContext context) => InkWell( onTap: () { Navigator.of(context).push( - materialRoute(_UserDetails(user: user, isRootUser: isRootUser)), + materialRoute(UserDetails(login: user.login)), ); }, child: Container( diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 0bfbce8c..dfa08dc6 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -1,13 +1,12 @@ part of 'users.dart'; -class _UserDetails extends StatelessWidget { - const _UserDetails({ - required this.user, - required this.isRootUser, +class UserDetails extends StatelessWidget { + const UserDetails({ + required this.login, + final super.key, }); - final User user; - final bool isRootUser; + final String login; @override Widget build(final BuildContext context) { final ServerInstallationState config = @@ -15,118 +14,46 @@ class _UserDetails extends StatelessWidget { final String domainName = UiHelpers.getDomainName(config); + final User user = context.watch().state.users.firstWhere( + (final User user) => user.login == login, + orElse: () => const User( + type: UserType.normal, + login: 'error', + ), + ); + + if (user.type == UserType.root) { + return BrandHeroScreen( + hasBackButton: true, + heroTitle: user.login, + heroSubtitle: 'ssh.root.title'.tr(), + children: [ + _SshKeysCard(user: user), + const SizedBox(height: 8), + Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Icon(Icons.warning_amber_outlined, size: 24), + const SizedBox(height: 16), + Text( + 'ssh.root.subtitle'.tr(), + ), + ], + ), + ), + ], + ); + } + return BrandHeroScreen( hasBackButton: true, heroTitle: user.login, children: [ - BrandCards.filled( - child: Column( - children: [ - ListTile( - title: Text('${user.login}@$domainName'), - subtitle: Text('users.email_login'.tr()), - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - leading: const Icon(Icons.alternate_email_outlined), - iconColor: Theme.of(context).colorScheme.onSurfaceVariant, - ), - ], - ), - ), + _UserLogins(user: user, domainName: domainName), const SizedBox(height: 8), - BrandCards.filled( - child: Column( - children: [ - ListTile( - title: Text('ssh.title'.tr()), - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - ), - const Divider(height: 0), - ListTile( - iconColor: Theme.of(context).colorScheme.onSurfaceVariant, - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - title: Text( - 'ssh.create'.tr(), - ), - leading: const Icon(Icons.add_circle_outlined), - onTap: () { - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: MediaQuery.of(context).viewInsets, - child: NewSshKey(user), - ), - ); - }, - ), - Column( - children: user.sshKeys.map((final String key) { - final publicKey = - key.split(' ').length > 1 ? key.split(' ')[1] : key; - final keyType = key.split(' ')[0]; - final keyName = key.split(' ').length > 2 - ? key.split(' ')[2] - : 'ssh.no_key_name'.tr(); - return ListTile( - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - title: Text('$keyName ($keyType)'), - // do not overflow text - subtitle: Text( - publicKey, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - onTap: () { - showDialog( - context: context, - builder: (final BuildContext context) => AlertDialog( - title: Text('ssh.delete'.tr()), - content: SingleChildScrollView( - child: ListBody( - children: [ - Text('ssh.delete_confirm_question'.tr()), - Text('$keyName ($keyType)'), - Text(publicKey), - ], - ), - ), - actions: [ - TextButton( - child: Text('basis.cancel'.tr()), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - TextButton( - child: Text( - 'basis.delete'.tr(), - style: const TextStyle( - color: BrandColors.red1, - ), - ), - onPressed: () { - context.read().addJob( - DeleteSSHKeyJob( - user: user, - publicKey: key, - ), - ); - Navigator.of(context) - ..pop() - ..pop(); - }, - ), - ], - ), - ); - }, - ); - }).toList(), - ), - ], - ), - ), + _SshKeysCard(user: user), const SizedBox(height: 8), ListTile( iconColor: Theme.of(context).colorScheme.onBackground, @@ -136,56 +63,7 @@ class _UserDetails extends StatelessWidget { 'users.reset_password'.tr(), ), ), - if (!isRootUser) - ListTile( - iconColor: Theme.of(context).colorScheme.error, - textColor: Theme.of(context).colorScheme.error, - onTap: () => { - showDialog( - context: context, - builder: (final BuildContext context) => AlertDialog( - title: Text('basis.confirmation'.tr()), - content: SingleChildScrollView( - child: ListBody( - children: [ - Text( - 'users.delete_confirm_question'.tr(), - ), - ], - ), - ), - actions: [ - TextButton( - child: Text('basis.cancel'.tr()), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - TextButton( - child: Text( - 'basis.delete'.tr(), - style: const TextStyle( - color: BrandColors.red1, - ), - ), - onPressed: () { - context - .read() - .addJob(DeleteUserJob(user: user)); - Navigator.of(context) - ..pop() - ..pop(); - }, - ), - ], - ), - ) - }, - leading: const Icon(Icons.person_remove_outlined), - title: Text( - 'users.delete_user'.tr(), - ), - ), + if (user.type == UserType.normal) _DeleteUserTile(user: user), const Divider(height: 8), Padding( padding: const EdgeInsets.all(16.0), @@ -204,3 +82,264 @@ class _UserDetails extends StatelessWidget { ); } } + +class _DeleteUserTile extends StatelessWidget { + const _DeleteUserTile({ + required this.user, + }); + + final User user; + + @override + Widget build(final BuildContext context) => ListTile( + iconColor: Theme.of(context).colorScheme.error, + textColor: Theme.of(context).colorScheme.error, + onTap: () => { + showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + title: Text('basis.confirmation'.tr()), + content: SingleChildScrollView( + child: ListBody( + children: [ + Text( + 'users.delete_confirm_question'.tr(), + ), + ], + ), + ), + actions: [ + TextButton( + child: Text('basis.cancel'.tr()), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: Text( + 'basis.delete'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + onPressed: () { + context.read().addJob(DeleteUserJob(user: user)); + Navigator.of(context) + ..pop() + ..pop(); + }, + ), + ], + ), + ) + }, + leading: const Icon(Icons.person_remove_outlined), + title: Text( + 'users.delete_user'.tr(), + ), + ); +} + +class _UserLogins extends StatelessWidget { + const _UserLogins({ + required this.user, + required this.domainName, + }); + + final User user; + final String domainName; + + @override + Widget build(final BuildContext context) => BrandCards.filled( + child: Column( + children: [ + ListTile( + title: Text('${user.login}@$domainName'), + subtitle: Text('users.email_login'.tr()), + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + leading: const Icon(Icons.alternate_email_outlined), + iconColor: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ], + ), + ); +} + +class _SshKeysCard extends StatelessWidget { + const _SshKeysCard({ + required this.user, + }); + + final User user; + + @override + Widget build(final BuildContext context) => BrandCards.filled( + child: Column( + children: [ + ListTile( + title: Text('ssh.title'.tr()), + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + ), + const Divider(height: 0), + ListTile( + iconColor: Theme.of(context).colorScheme.onSurfaceVariant, + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + title: Text( + 'ssh.create'.tr(), + ), + leading: const Icon(Icons.add_circle_outlined), + onTap: () { + showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => Padding( + padding: MediaQuery.of(context).viewInsets, + child: NewSshKey(user), + ), + ); + }, + ), + Column( + children: user.sshKeys.map((final String key) { + final publicKey = + key.split(' ').length > 1 ? key.split(' ')[1] : key; + final keyType = key.split(' ')[0]; + final keyName = key.split(' ').length > 2 + ? key.split(' ')[2] + : 'ssh.no_key_name'.tr(); + return ListTile( + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + title: Text('$keyName ($keyType)'), + // do not overflow text + subtitle: Text( + publicKey, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + onTap: () { + showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + title: Text('ssh.delete'.tr()), + content: SingleChildScrollView( + child: ListBody( + children: [ + Text('ssh.delete_confirm_question'.tr()), + Text('$keyName ($keyType)'), + Text(publicKey), + ], + ), + ), + actions: [ + TextButton( + child: Text('basis.cancel'.tr()), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: Text( + 'basis.delete'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + onPressed: () { + context.read().addJob( + DeleteSSHKeyJob( + user: user, + publicKey: key, + ), + ); + Navigator.of(context) + ..pop() + ..pop(); + }, + ), + ], + ), + ); + }, + ); + }).toList(), + ), + ], + ), + ); +} + +class NewSshKey extends StatelessWidget { + const NewSshKey(this.user, {final super.key}); + final User user; + + @override + Widget build(final BuildContext context) => BrandBottomSheet( + child: BlocProvider( + create: (final context) { + final jobCubit = context.read(); + final jobState = jobCubit.state; + if (jobState is JobsStateWithJobs) { + final jobs = jobState.clientJobList; + for (final job in jobs) { + if (job is CreateSSHKeyJob && job.user.login == user.login) { + user.sshKeys.add(job.publicKey); + } + } + } + return SshFormCubit( + jobsCubit: jobCubit, + user: user, + ); + }, + child: Builder( + builder: (final context) { + final formCubitState = context.watch().state; + + return BlocListener( + listener: (final context, final state) { + if (state.isSubmitted) { + Navigator.pop(context); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + BrandHeader( + title: user.login, + ), + const SizedBox(width: 14), + Padding( + padding: paddingH15V0, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + IntrinsicHeight( + child: CubitFormTextField( + formFieldCubit: context.read().key, + decoration: InputDecoration( + labelText: 'ssh.input_label'.tr(), + ), + ), + ), + const SizedBox(height: 30), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => + context.read().trySubmit(), + text: 'ssh.create'.tr(), + ), + const SizedBox(height: 30), + ], + ), + ), + ], + ), + ); + }, + ), + ), + ); +} diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 9c215ef8..bf76ba89 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -3,6 +3,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/cubit/forms/user/ssh_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/user/user_form_cubit.dart'; @@ -19,7 +20,6 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; -import 'package:selfprivacy/ui/pages/ssh_keys/ssh_keys.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; From 2826892400d2841c8085976440a5ebddee321334 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 8 Sep 2022 18:14:05 +0300 Subject: [PATCH 055/732] Add a new filled card style and fix red texts --- .../action_button/action_button.dart | 5 +++-- lib/ui/components/brand_cards/brand_cards.dart | 18 ++++++++++++++---- .../pages/backup_details/backup_details.dart | 5 ++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/lib/ui/components/action_button/action_button.dart b/lib/ui/components/action_button/action_button.dart index 3a518496..6572794b 100644 --- a/lib/ui/components/action_button/action_button.dart +++ b/lib/ui/components/action_button/action_button.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; class ActionButton extends StatelessWidget { const ActionButton({ @@ -20,7 +19,9 @@ class ActionButton extends StatelessWidget { return TextButton( child: Text( text!, - style: isRed ? const TextStyle(color: BrandColors.red1) : null, + style: isRed + ? TextStyle(color: Theme.of(context).colorScheme.error) + : null, ), onPressed: () { navigator.pop(); diff --git a/lib/ui/components/brand_cards/brand_cards.dart b/lib/ui/components/brand_cards/brand_cards.dart index 91737885..c9196000 100644 --- a/lib/ui/components/brand_cards/brand_cards.dart +++ b/lib/ui/components/brand_cards/brand_cards.dart @@ -25,11 +25,15 @@ class BrandCards { static Widget filled({ required final Widget child, final bool tertiary = false, + final bool secondary = false, final bool error = false, + final bool clipped = true, }) => _FilledCard( tertiary: tertiary, + secondary: secondary, error: error, + clipped: clipped, child: child, ); } @@ -82,25 +86,31 @@ class _OutlinedCard extends StatelessWidget { class _FilledCard extends StatelessWidget { const _FilledCard({ required this.child, + required this.secondary, required this.tertiary, required this.error, + required this.clipped, }); final Widget child; final bool tertiary; final bool error; + final bool clipped; + final bool secondary; @override Widget build(final BuildContext context) => Card( elevation: 0.0, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(12)), ), - clipBehavior: Clip.antiAlias, + clipBehavior: clipped ? Clip.antiAlias : Clip.none, color: error ? Theme.of(context).colorScheme.errorContainer - : tertiary - ? Theme.of(context).colorScheme.tertiaryContainer - : Theme.of(context).colorScheme.surfaceVariant, + : secondary + ? Theme.of(context).colorScheme.secondaryContainer + : tertiary + ? Theme.of(context).colorScheme.tertiaryContainer + : Theme.of(context).colorScheme.surfaceVariant, child: child, ); } diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 55a8dd12..c4a62284 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -1,6 +1,5 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; @@ -110,9 +109,9 @@ class _BackupDetailsState extends State ), if (backupStatus == BackupStatusEnum.error) ListTile( - leading: const Icon( + leading: Icon( Icons.error_outline, - color: BrandColors.red1, + color: Theme.of(context).colorScheme.error, ), title: Text( 'providers.backup.error_pending'.tr(), From da63ce45c880399f163a2bfb712f203e93c79373 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 8 Sep 2022 18:39:49 +0300 Subject: [PATCH 056/732] Simplify root SSH keys page --- lib/ui/pages/users/user_details.dart | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index dfa08dc6..4b1049c1 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -25,24 +25,10 @@ class UserDetails extends StatelessWidget { if (user.type == UserType.root) { return BrandHeroScreen( hasBackButton: true, - heroTitle: user.login, - heroSubtitle: 'ssh.root.title'.tr(), + heroTitle: 'ssh.root.title'.tr(), + heroSubtitle: 'ssh.root.subtitle'.tr(), children: [ _SshKeysCard(user: user), - const SizedBox(height: 8), - Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon(Icons.warning_amber_outlined, size: 24), - const SizedBox(height: 16), - Text( - 'ssh.root.subtitle'.tr(), - ), - ], - ), - ), ], ); } From 06fbcff9a941812f8e29c92b2d09dbc96a601e41 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 8 Sep 2022 22:58:45 +0300 Subject: [PATCH 057/732] Fix graphql type errors --- .../graphql_maps/schema/users.graphql.dart | 56 +------------------ .../graphql_maps/server_api/jobs_api.dart | 13 +++-- .../dns_providers/cloudflare/cloudflare.dart | 37 ++++++------ lib/logic/models/json/server_job.dart | 19 ++++++- lib/logic/models/json/server_job.g.dart | 10 ++-- 5 files changed, 52 insertions(+), 83 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 7200c167..a132155a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,11 +1,9 @@ import 'dart:async'; - +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; - import 'schema.graphql.dart'; - part 'users.graphql.g.dart'; @JsonSerializable(explicitToJson: true) @@ -173,7 +171,6 @@ extension ClientExtension$Fragment$basicMutationReturnFields document: documentNodeFragmentbasicMutationReturnFields)), data: data.toJson(), broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( {required Map idFields, bool optimistic = true}) { final result = this.readFragment( @@ -364,7 +361,6 @@ extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { document: documentNodeFragmentuserFields)), data: data.toJson(), broadcast: broadcast); - Fragment$userFields? readFragment$userFields( {required Map idFields, bool optimistic = true}) { final result = this.readFragment( @@ -448,7 +444,6 @@ class _CopyWithImpl$Query$AllUsers $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Query$AllUsers$users get users { final local$users = _instance.users; return CopyWith$Query$AllUsers$users(local$users, (e) => call(users: e)); @@ -462,7 +457,6 @@ class _CopyWithStubImpl$Query$AllUsers TRes _res; call({Query$AllUsers$users? users, String? $__typename}) => _res; - CopyWith$Query$AllUsers$users get users => CopyWith$Query$AllUsers$users.stub(_res); } @@ -530,7 +524,6 @@ const documentNodeQueryAllUsers = DocumentNode(definitions: [ ])), fragmentDefinitionuserFields, ]); - Query$AllUsers _parserFn$Query$AllUsers(Map data) => Query$AllUsers.fromJson(data); @@ -592,11 +585,9 @@ extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { Future> query$AllUsers( [Options$Query$AllUsers? options]) async => await this.query(options ?? Options$Query$AllUsers()); - graphql.ObservableQuery watchQuery$AllUsers( [WatchOptions$Query$AllUsers? options]) => this.watchQuery(options ?? WatchOptions$Query$AllUsers()); - void writeQuery$AllUsers( {required Query$AllUsers data, bool broadcast = true}) => this.writeQuery( @@ -605,7 +596,6 @@ extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { graphql.Operation(document: documentNodeQueryAllUsers)), data: data.toJson(), broadcast: broadcast); - Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { final result = this.readQuery( graphql.Request( @@ -632,7 +622,6 @@ class Query$AllUsers$users { final String $__typename; Map toJson() => _$Query$AllUsers$usersToJson(this); - int get hashCode { final l$allUsers = allUsers; final l$rootUser = rootUser; @@ -682,12 +671,10 @@ abstract class CopyWith$Query$AllUsers$users { {List? allUsers, Fragment$userFields? rootUser, String? $__typename}); - TRes allUsers( Iterable Function( Iterable>) _fn); - CopyWith$Fragment$userFields get rootUser; } @@ -715,7 +702,6 @@ class _CopyWithImpl$Query$AllUsers$users $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - TRes allUsers( Iterable Function( Iterable>) @@ -723,7 +709,6 @@ class _CopyWithImpl$Query$AllUsers$users call( allUsers: _fn(_instance.allUsers .map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); - CopyWith$Fragment$userFields get rootUser { final local$rootUser = _instance.rootUser; return local$rootUser == null @@ -744,9 +729,7 @@ class _CopyWithStubImpl$Query$AllUsers$users Fragment$userFields? rootUser, String? $__typename}) => _res; - allUsers(_fn) => _res; - CopyWith$Fragment$userFields get rootUser => CopyWith$Fragment$userFields.stub(_res); } @@ -888,7 +871,6 @@ class _CopyWithImpl$Query$GetUser $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Query$GetUser$users get users { final local$users = _instance.users; return CopyWith$Query$GetUser$users(local$users, (e) => call(users: e)); @@ -902,7 +884,6 @@ class _CopyWithStubImpl$Query$GetUser TRes _res; call({Query$GetUser$users? users, String? $__typename}) => _res; - CopyWith$Query$GetUser$users get users => CopyWith$Query$GetUser$users.stub(_res); } @@ -962,7 +943,6 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ ])), fragmentDefinitionuserFields, ]); - Query$GetUser _parserFn$Query$GetUser(Map data) => Query$GetUser.fromJson(data); @@ -1033,11 +1013,9 @@ extension ClientExtension$Query$GetUser on graphql.GraphQLClient { Future> query$GetUser( Options$Query$GetUser options) async => await this.query(options); - graphql.ObservableQuery watchQuery$GetUser( WatchOptions$Query$GetUser options) => this.watchQuery(options); - void writeQuery$GetUser( {required Query$GetUser data, required Variables$Query$GetUser variables, @@ -1048,7 +1026,6 @@ extension ClientExtension$Query$GetUser on graphql.GraphQLClient { variables: variables.toJson()), data: data.toJson(), broadcast: broadcast); - Query$GetUser? readQuery$GetUser( {required Variables$Query$GetUser variables, bool optimistic = true}) { final result = this.readQuery( @@ -1130,7 +1107,6 @@ class _CopyWithImpl$Query$GetUser$users $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Fragment$userFields get getUser { final local$getUser = _instance.getUser; return local$getUser == null @@ -1146,7 +1122,6 @@ class _CopyWithStubImpl$Query$GetUser$users TRes _res; call({Fragment$userFields? getUser, String? $__typename}) => _res; - CopyWith$Fragment$userFields get getUser => CopyWith$Fragment$userFields.stub(_res); } @@ -1291,7 +1266,6 @@ class _CopyWithImpl$Mutation$CreateUser $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Mutation$CreateUser$createUser get createUser { final local$createUser = _instance.createUser; return CopyWith$Mutation$CreateUser$createUser( @@ -1307,7 +1281,6 @@ class _CopyWithStubImpl$Mutation$CreateUser call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => _res; - CopyWith$Mutation$CreateUser$createUser get createUser => CopyWith$Mutation$CreateUser$createUser.stub(_res); } @@ -1371,10 +1344,8 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); - Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); - typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( dynamic, Mutation$CreateUser?); @@ -1454,7 +1425,6 @@ extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { Future> mutate$CreateUser( Options$Mutation$CreateUser options) async => await this.mutate(options); - graphql.ObservableQuery watchMutation$CreateUser( WatchOptions$Mutation$CreateUser options) => this.watchMutation(options); @@ -1597,7 +1567,6 @@ class _CopyWithStubImpl$Mutation$CreateUser$createUser String? $__typename, Fragment$userFields? user}) => _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } @@ -1743,7 +1712,6 @@ class _CopyWithImpl$Mutation$DeleteUser $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Mutation$DeleteUser$deleteUser get deleteUser { final local$deleteUser = _instance.deleteUser; return CopyWith$Mutation$DeleteUser$deleteUser( @@ -1759,7 +1727,6 @@ class _CopyWithStubImpl$Mutation$DeleteUser call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => _res; - CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); } @@ -1807,10 +1774,8 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ ])), fragmentDefinitionbasicMutationReturnFields, ]); - Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => Mutation$DeleteUser.fromJson(data); - typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( dynamic, Mutation$DeleteUser?); @@ -1890,7 +1855,6 @@ extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { Future> mutate$DeleteUser( Options$Mutation$DeleteUser options) async => await this.mutate(options); - graphql.ObservableQuery watchMutation$DeleteUser( WatchOptions$Mutation$DeleteUser options) => this.watchMutation(options); @@ -2146,7 +2110,6 @@ class _CopyWithImpl$Mutation$UpdateUser $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Mutation$UpdateUser$updateUser get updateUser { final local$updateUser = _instance.updateUser; return CopyWith$Mutation$UpdateUser$updateUser( @@ -2162,7 +2125,6 @@ class _CopyWithStubImpl$Mutation$UpdateUser call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => _res; - CopyWith$Mutation$UpdateUser$updateUser get updateUser => CopyWith$Mutation$UpdateUser$updateUser.stub(_res); } @@ -2226,10 +2188,8 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); - Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); - typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( dynamic, Mutation$UpdateUser?); @@ -2309,7 +2269,6 @@ extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { Future> mutate$UpdateUser( Options$Mutation$UpdateUser options) async => await this.mutate(options); - graphql.ObservableQuery watchMutation$UpdateUser( WatchOptions$Mutation$UpdateUser options) => this.watchMutation(options); @@ -2452,7 +2411,6 @@ class _CopyWithStubImpl$Mutation$UpdateUser$updateUser String? $__typename, Fragment$userFields? user}) => _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } @@ -2597,7 +2555,6 @@ class _CopyWithImpl$Mutation$AddSshKey $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { final local$addSshKey = _instance.addSshKey; return CopyWith$Mutation$AddSshKey$addSshKey( @@ -2612,7 +2569,6 @@ class _CopyWithStubImpl$Mutation$AddSshKey TRes _res; call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); } @@ -2676,10 +2632,8 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); - Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => Mutation$AddSshKey.fromJson(data); - typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( dynamic, Mutation$AddSshKey?); @@ -2759,7 +2713,6 @@ extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { Future> mutate$AddSshKey( Options$Mutation$AddSshKey options) async => await this.mutate(options); - graphql.ObservableQuery watchMutation$AddSshKey( WatchOptions$Mutation$AddSshKey options) => this.watchMutation(options); @@ -2902,7 +2855,6 @@ class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey String? $__typename, Fragment$userFields? user}) => _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } @@ -3051,7 +3003,6 @@ class _CopyWithImpl$Mutation$RemoveSshKey $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { final local$removeSshKey = _instance.removeSshKey; return CopyWith$Mutation$RemoveSshKey$removeSshKey( @@ -3069,7 +3020,6 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}) => _res; - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); } @@ -3133,11 +3083,9 @@ const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); - Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( Map data) => Mutation$RemoveSshKey.fromJson(data); - typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( dynamic, Mutation$RemoveSshKey?); @@ -3220,7 +3168,6 @@ extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { Future> mutate$RemoveSshKey( Options$Mutation$RemoveSshKey options) async => await this.mutate(options); - graphql.ObservableQuery watchMutation$RemoveSshKey( WatchOptions$Mutation$RemoveSshKey options) => this.watchMutation(options); @@ -3367,7 +3314,6 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey String? $__typename, Fragment$userFields? user}) => _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart index f6bf36f8..28f362a9 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -2,8 +2,8 @@ part of 'server.dart'; mixin JobsApi on ApiMap { Future> getServerJobs() async { - QueryResult response; - List jobs = []; + QueryResult response; + List jobsList = []; try { final GraphQLClient client = await getClient(); @@ -11,14 +11,15 @@ mixin JobsApi on ApiMap { if (response.hasException) { print(response.exception.toString()); } - jobs = response.data!['jobs'] - .map((final e) => ServerJob.fromJson(e)) - .toList(); + jobsList = jobsList = response.parsedData?.jobs.getJobs + .map((final job) => ServerJob.fromGraphQL(job)) + .toList() ?? + []; } catch (e) { print(e); } - return jobs; + return jobsList; } Future removeApiJob(final String uid) async { diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 46dc72ac..e0fb469a 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -126,32 +126,37 @@ class CloudflareApi extends DnsProviderApi { Future> getDnsRecords({ required final ServerDomain domain, }) async { + Response response; final String domainName = domain.domainName; final String domainZoneId = domain.zoneId; + final List allRecords = []; final String url = '/zones/$domainZoneId/dns_records'; final Dio client = await getClient(); - final Response response = await client.get(url); + try { + response = await client.get(url); + final List records = response.data['result'] ?? []; - final List records = response.data['result'] ?? []; - final List allRecords = []; - - for (final record in records) { - if (record['zone_name'] == domainName) { - allRecords.add( - DnsRecord( - name: record['name'], - type: record['type'], - content: record['content'], - ttl: record['ttl'], - proxied: record['proxied'], - ), - ); + for (final record in records) { + if (record['zone_name'] == domainName) { + allRecords.add( + DnsRecord( + name: record['name'], + type: record['type'], + content: record['content'], + ttl: record['ttl'], + proxied: record['proxied'], + ), + ); + } } + } catch (e) { + print(e); + } finally { + close(client); } - close(client); return allRecords; } diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index a54b7651..94b9e432 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -1,4 +1,5 @@ import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; part 'server_job.g.dart'; @@ -20,16 +21,30 @@ class ServerJob { final this.finishedAt, }); + ServerJob.fromGraphQL(final Query$GetApiJobs$jobs$getJobs serverJob) + : this( + createdAt: serverJob.createdAt, + description: serverJob.description, + error: serverJob.error, + finishedAt: serverJob.finishedAt, + name: serverJob.name, + progress: serverJob.progress, + result: serverJob.result, + status: serverJob.status, + statusText: serverJob.statusText, + uid: serverJob.uid, + updatedAt: serverJob.updatedAt, + ); final String name; final String description; final String status; final String uid; - final String updatedAt; + final DateTime updatedAt; final DateTime createdAt; final String? error; final int? progress; final String? result; final String? statusText; - final String? finishedAt; + final DateTime? finishedAt; } diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart index 025e1ebc..b74590b6 100644 --- a/lib/logic/models/json/server_job.g.dart +++ b/lib/logic/models/json/server_job.g.dart @@ -11,13 +11,15 @@ ServerJob _$ServerJobFromJson(Map json) => ServerJob( description: json['description'] as String, status: json['status'] as String, uid: json['uid'] as String, - updatedAt: json['updatedAt'] as String, + updatedAt: DateTime.parse(json['updatedAt'] as String), createdAt: DateTime.parse(json['createdAt'] as String), error: json['error'] as String?, progress: json['progress'] as int?, result: json['result'] as String?, statusText: json['statusText'] as String?, - finishedAt: json['finishedAt'] as String?, + finishedAt: json['finishedAt'] == null + ? null + : DateTime.parse(json['finishedAt'] as String), ); Map _$ServerJobToJson(ServerJob instance) => { @@ -25,11 +27,11 @@ Map _$ServerJobToJson(ServerJob instance) => { 'description': instance.description, 'status': instance.status, 'uid': instance.uid, - 'updatedAt': instance.updatedAt, + 'updatedAt': instance.updatedAt.toIso8601String(), 'createdAt': instance.createdAt.toIso8601String(), 'error': instance.error, 'progress': instance.progress, 'result': instance.result, 'statusText': instance.statusText, - 'finishedAt': instance.finishedAt, + 'finishedAt': instance.finishedAt?.toIso8601String(), }; From e4bb35d5d817c2a8c895f566b42a8b970fc0a338 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 9 Sep 2022 12:14:37 +0300 Subject: [PATCH 058/732] Catch cloudflare exceptions --- .../dns_providers/cloudflare/cloudflare.dart | 96 +++++++++++-------- .../rest_maps/dns_providers/dns_provider.dart | 2 +- .../initializing/domain_setup_cubit.dart | 18 ++-- .../server_installation_repository.dart | 8 +- 4 files changed, 69 insertions(+), 55 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index e0fb469a..3088de67 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -76,22 +76,23 @@ class CloudflareApi extends DnsProviderApi { } @override - Future getZoneId(final String domain) async { - validateStatus = (final status) => - status == HttpStatus.ok || status == HttpStatus.forbidden; + Future getZoneId(final String domain) async { + String? zoneId; + final Dio client = await getClient(); - final Response response = await client.get( - '/zones', - queryParameters: {'name': domain}, - ); - - close(client); - - if (response.data['result'].isEmpty) { - throw DomainNotFoundException('No domains found'); - } else { - return response.data['result'][0]['id']; + try { + final Response response = await client.get( + '/zones', + queryParameters: {'name': domain}, + ); + zoneId = response.data['result'][0]['id']; + } catch (e) { + print(e); + } finally { + close(client); } + + return zoneId; } @override @@ -105,21 +106,25 @@ class CloudflareApi extends DnsProviderApi { final String url = '/zones/$domainZoneId/dns_records'; final Dio client = await getClient(); - final Response response = await client.get(url); + try { + final Response response = await client.get(url); - final List records = response.data['result'] ?? []; - final List allDeleteFutures = []; + final List records = response.data['result'] ?? []; + final List allDeleteFutures = []; - for (final record in records) { - if (record['zone_name'] == domainName) { - allDeleteFutures.add( - client.delete('$url/${record["id"]}'), - ); + for (final record in records) { + if (record['zone_name'] == domainName) { + allDeleteFutures.add( + client.delete('$url/${record["id"]}'), + ); + } } + await Future.wait(allDeleteFutures); + } catch (e) { + print(e); + } finally { + close(client); } - - await Future.wait(allDeleteFutures); - close(client); } @override @@ -252,27 +257,38 @@ class CloudflareApi extends DnsProviderApi { ); final Dio client = await getClient(); - await client.post( - url, - data: dkimRecord.toJson(), - ); - - client.close(); + try { + await client.post( + url, + data: dkimRecord.toJson(), + ); + } catch (e) { + print(e); + } finally { + close(client); + } } @override Future> domainList() async { final String url = '$rootAddress/zones'; + List domains = []; + final Dio client = await getClient(); + try { + final Response response = await client.get( + url, + queryParameters: {'per_page': 50}, + ); + domains = response.data['result'] + .map((final el) => el['name'] as String) + .toList(); + } catch (e) { + print(e); + } finally { + close(client); + } - final Response response = await client.get( - url, - queryParameters: {'per_page': 50}, - ); - - close(client); - return response.data['result'] - .map((final el) => el['name'] as String) - .toList(); + return domains; } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 5c2a9369..6680975e 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -23,7 +23,7 @@ abstract class DnsProviderApi extends ApiMap { final String dkimRecordString, final ServerDomain domain, ); - Future getZoneId(final String domain); + Future getZoneId(final String domain); Future> domainList(); Future isApiTokenValid(final String token); diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index 4a14b862..a1c458fb 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -31,19 +31,21 @@ class DomainSetupCubit extends Cubit { emit(Loading(LoadingTypes.saving)); - final String zoneId = await serverInstallationCubit + final String? zoneId = await serverInstallationCubit .repository.dnsProviderApiFactory! .getDnsProvider() .getZoneId(domainName); - final ServerDomain domain = ServerDomain( - domainName: domainName, - zoneId: zoneId, - provider: DnsProvider.cloudflare, - ); + if (zoneId != null) { + final ServerDomain domain = ServerDomain( + domainName: domainName, + zoneId: zoneId, + provider: DnsProvider.cloudflare, + ); - serverInstallationCubit.setDomain(domain); - emit(DomainSet()); + serverInstallationCubit.setDomain(domain); + emit(DomainSet()); + } } } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 0df91227..76089229 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -169,12 +169,8 @@ class ServerInstallationRepository { ), ); - try { - final String domainId = await dnsProviderApi.getZoneId(domain); - return domainId; - } on DomainNotFoundException { - return null; - } + final String? domainId = await dnsProviderApi.getZoneId(domain); + return domainId; } Future> isDnsAddressesMatch( From ae8827975adf4850c27582ad471fe8058fe7a574 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 9 Sep 2022 17:55:04 +0300 Subject: [PATCH 059/732] Fix server_storage_list_item.dart colors and text --- lib/ui/components/brand_divider/brand_divider.dart | 3 +-- lib/ui/pages/server_storage/server_storage_list_item.dart | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ui/components/brand_divider/brand_divider.dart b/lib/ui/components/brand_divider/brand_divider.dart index 03e44653..646989a1 100644 --- a/lib/ui/components/brand_divider/brand_divider.dart +++ b/lib/ui/components/brand_divider/brand_divider.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; class BrandDivider extends StatelessWidget { const BrandDivider({final super.key}); @@ -8,6 +7,6 @@ class BrandDivider extends StatelessWidget { Widget build(final BuildContext context) => Container( width: double.infinity, height: 1, - color: BrandColors.dividerColor, + color: Theme.of(context).colorScheme.onSurface.withAlpha(30), ); } diff --git a/lib/ui/pages/server_storage/server_storage_list_item.dart b/lib/ui/pages/server_storage/server_storage_list_item.dart index 4bb8d323..3aad19b2 100644 --- a/lib/ui/pages/server_storage/server_storage_list_item.dart +++ b/lib/ui/pages/server_storage/server_storage_list_item.dart @@ -28,10 +28,10 @@ class ServerStorageListItem extends StatelessWidget { return Row( children: [ if (showIcon) - const Icon( + Icon( Icons.storage_outlined, size: 24, - color: Colors.white, + color: Theme.of(context).colorScheme.onBackground, ), if (showIcon) const SizedBox(width: 16), Expanded( @@ -60,7 +60,7 @@ class ServerStorageListItem extends StatelessWidget { 'providers.storage.disk_total'.tr( args: [ volume.sizeTotal.toString(), - volume.name, + volume.displayName, ], ), style: subtitleStyle, From 11885b7ac7c08ed5b13c1fd700e8e55785a59da7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 9 Sep 2022 17:57:34 +0300 Subject: [PATCH 060/732] Fix app connecting to 'https://api./' after access recovery We no longer hold server domain in ServerAPI class. Instead, we get a domain from the app config every time. --- lib/logic/api_maps/graphql_maps/server_api/server.dart | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index b8739f04..56b92371 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -7,7 +7,6 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphq import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; @@ -47,10 +46,8 @@ class ServerApi extends ApiMap this.hasLogger = false, this.isWithToken = true, this.customToken = '', - }) { - final ServerDomain? serverDomain = getIt().serverDomain; - rootAddress = serverDomain?.domainName ?? ''; - } + }); + @override bool hasLogger; @override @@ -58,7 +55,7 @@ class ServerApi extends ApiMap @override String customToken; @override - String? rootAddress; + String? get rootAddress => getIt().serverDomain?.domainName; Future getApiVersion() async { QueryResult response; From ef7d906504a42a301b3f48bc4345a378712ed3b6 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 9 Sep 2022 17:58:01 +0300 Subject: [PATCH 061/732] Catch Hetzner metrics trying to emit when closed and disable logging. --- lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart | 6 +++++- .../cubit/hetzner_metrics/hetzner_metrics_repository.dart | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart index aaae36c5..cb398dcd 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart @@ -45,6 +45,10 @@ class HetznerMetricsCubit extends Cubit { () => load(newState.period), ); - emit(newState); + try { + emit(newState); + } on StateError { + print('Tried to emit Hetzner metrics when cubit is closed'); + } } } diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart index 0fb780ae..dc0805c7 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart @@ -21,7 +21,7 @@ class HetznerMetricsRepository { break; } - final HetznerApi api = HetznerApi(hasLogger: true); + final HetznerApi api = HetznerApi(hasLogger: false); final List> results = await Future.wait([ api.getMetrics(start, end, 'cpu'), From 78f6dff028e4603f110edfb43527864d5fe48c6b Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 10 Sep 2022 18:10:27 +0300 Subject: [PATCH 062/732] Ops: refactor CI/CD pipeline, isolated Podman environment, various Linux builds (#112) - New Podman-based building environment - caches everything - can build artifacts without the Internet - rootless, needs no system capabilities (only when uses FUSE, well) - the cost is it's VERY HUGE, but useful - Refactored CI/CD pipeline - now it's a Python script, not a bunch of shell commands - optional nix flake for development environment and building a derivation - uploads all artifacts as a Gitea release - New targets - AppImage bundle - Flatpak bundle - simple archive with binaries Co-authored-by: Alya Sirko Reviewed-on: https://git.selfprivacy.org/kherel/selfprivacy.org.app/pulls/112 Reviewed-by: Inex Code Co-authored-by: Alya Sirko Co-committed-by: Alya Sirko --- .drone.yml | 141 +++++++++++++++++++----------------- Dockerfile | 48 ++++++++++++ appimage.yml | 53 ++++++++++++++ assets/images/icon/logo.svg | 9 +++ ci.py | 139 +++++++++++++++++++++++++++++++++++ flake.lock | 78 ++++++++++++++++++-- flake.nix | 136 +++++++++++++++++++++++++++++----- flatpak.yml | 46 ++++++++++++ 8 files changed, 560 insertions(+), 90 deletions(-) create mode 100644 Dockerfile create mode 100644 appimage.yml create mode 100644 assets/images/icon/logo.svg create mode 100755 ci.py create mode 100644 flatpak.yml diff --git a/.drone.yml b/.drone.yml index eedcec9b..13ec2c42 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,12 +3,13 @@ type: exec name: Continuous Integration steps: - - name: Build Debug Artifacts + - name: Prepare commands: - - flutter build apk --debug --split-per-abi - - mv build/app/outputs/flutter-apk/*-debug.apk . - - rename app pro.kherel.selfprivacy *.apk && rename debug "$DRONE_COMMIT" *.apk - - ls *.apk + - ln -s /var/lib/drone-runner-exec/.local $HOME/.local + + - name: Build + commands: + - ./ci.py --run-ci-build trigger: event: @@ -25,84 +26,89 @@ type: exec name: Release steps: - - name: Prepare for Build + - name: Prepare commands: - # Reset building environment - - nixos-container stop isolated - - nixos-container start isolated - # Prepare SSH keys - - eval `ssh-agent -s` - - echo "$SSH_PRIVATE_KEY" | ssh-add - - # Copy sources to the building environment - - scp -r `pwd` builder@isolated:~ - environment: - SSH_PRIVATE_KEY: - from_secret: SSH_PRIVATE_KEY + - ln -s /var/lib/drone-runner-exec/.local $HOME/.local + - if podman volume exists src; then podman volume rm -f src; podman volume create src; else podman volume create src; fi + - git archive --format=tar HEAD | podman volume import src - - - name: Build Intermediate Release Artifact + - name: Build Intermediate Linux Release Artifact (Binary) commands: - # Prepare SSH keys - - eval `ssh-agent -s` - - echo "$SSH_PRIVATE_KEY" | ssh-add - - # Build intermediate release artifact - - ssh builder@isolated "cd src && flutter build apk --release" - # Fetch the release artifact - - scp builder@isolated:src/build/app/outputs/flutter-apk/app-release.apk . + - ./ci.py --build-linux environment: - SSH_PRIVATE_KEY: - from_secret: SSH_PRIVATE_KEY + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS - - name: Sign Release Artifact for Standalone Use + - name: Build Intermediate Android Release Artifact (.APK) commands: - # Get app build ID - - export APP_BUILD_ID=`yq '.version' pubspec.yaml | cut -d "+" -f2` - # Prepare SSH keys - - eval `ssh-agent -s` - - echo "$SSH_PRIVATE_KEY" | ssh-add - - # Upload and sign the artifact - - scp app-release.apk builder@isolated:~ - - ssh builder@isolated "zipalign -f -v 4 app-release.apk standalone_app-release.apk && apksigner sign --ks /run/secrets/standalone-keystore --ks-key-alias standalone --ks-pass file:/run/secrets/standalone-keystore-pass standalone_app-release.apk" - # Fetch the signed artifact - - scp builder@isolated:standalone_app-release.apk standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk - - scp builder@isolated:standalone_app-release.apk.idsig standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk.idsig + - ./ci.py --build-apk environment: - SSH_PRIVATE_KEY: - from_secret: SSH_PRIVATE_KEY + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS - - name: Sign Release Artifact for F-Droid Repository + - name: Sign Android Release Artifact (.APK) for Standalone Use commands: - # Get app build ID - - export APP_BUILD_ID=`yq '.version' pubspec.yaml | cut -d "+" -f2` - # Prepare SSH keys - - eval `ssh-agent -s` - - echo "$SSH_PRIVATE_KEY" | ssh-add - - # Upload and sign the artifact - - scp app-release.apk fdroid@isolated:unsigned/pro.kherel.selfprivacy_"$APP_BUILD_ID".apk - - ssh fdroid@isolated 'export FDROID_KEY_STORE_PASS=`cat /run/secrets/fdroid-keystore-pass` && fdroid publish && fdroid update' - - scp -r fdroid@isolated:repo . + - ./ci.py --sign-apk-standalone environment: - SSH_PRIVATE_KEY: - from_secret: SSH_PRIVATE_KEY + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS - - name: Create Release on Gitea Repository + - name: Sign Android Release Artifact (.APK) for F-Droid Repository commands: - # Get app build ID - - export APP_BUILD_ID=`yq '.version' pubspec.yaml | cut -d "+" -f2` - # Prepare tea CLI - - tea login add --token "$GITEA_RELEASE_TOKEN" --url https://git.selfprivacy.org - # Create release and push artifacts - - tea releases create --repo "$DRONE_REPO" --tag "$DRONE_SEMVER" --title "$DRONE_SEMVER" --asset standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk --asset standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk.idsig + - ./ci.py --sign-apk-fdroid + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + + - name: Package Linux AppImage Artifact + commands: + - ./ci.py --package-linux-appimage + + - name: Package Linux Flatpak Artifact + commands: + - ./ci.py --package-linux-flatpak + + - name: Package Linux Archive Artifact + commands: + - ./ci.py --package-linux-archive + +trigger: + event: + - tag + +node: + server: builder + +--- + +kind: pipeline +type: exec +name: Deploy + +steps: + - name: Prepare + commands: + - ln -s /var/lib/drone-runner-exec/.local $HOME/.local + - podman unshare podman volume mount src + + - name: Create Release and Deploy Artifacts + commands: + - podman unshare ./ci.py --deploy-gitea-release environment: GITEA_RELEASE_TOKEN: from_secret: GITEA_RELEASE_TOKEN - - name: Deploy F-Droid Repository + - name: Deploy F-Droid Repo commands: - # Prepare SSH keys - - eval `ssh-agent -s` - - echo "$SSH_PRIVATE_KEY" | ssh-add - - # Copy the repository to the production server - - scp -r repo/* deployer@production:/var/www/fdroid.selfprivacy.org + - podman unshare ./ci.py --deploy-fdroid-repo environment: SSH_PRIVATE_KEY: from_secret: SSH_PRIVATE_KEY @@ -113,3 +119,6 @@ trigger: node: server: builder + +depends_on: + - Release diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..7efdf1ed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,48 @@ +FROM ubuntu:22.04 + +ENV PACKAGES "build-essential openjdk-11-jdk-headless clang cmake curl git jq libblkid1 libblkid-dev libc6 libc6-dev libc-bin libcrypt1 libdbus-1-3 libexpat1 libffi7 libgcc-s1 libgcrypt20 libgcrypt20-dev libglib2.0-0 libglib2.0-dev libglu1-mesa libgpg-error0 libgtk-3-0 libgtk-3-dev liblz4-1 liblz4-dev liblzma5 liblzma-dev libmount1 libpcre3 libselinux1 libsepol2 libstdc++-10-dev libstdc++6 libuuid1 ninja-build pkg-config rsync unzip xz-utils zlib1g unzip libsecret-1-dev libsecret-tools libsecret-1-0 libjsoncpp-dev fuse flatpak-builder binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync" +ENV ANDROID_SDK_TOOLS_VERSION "commandlinetools-linux-8512546_latest" +ENV ANDROID_SDK_TOOLS_URL "https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip" +ENV FLUTTER_VERSION "flutter_linux_3.3.1-stable" +ENV FLUTTER_URL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.3.1-stable.tar.xz" +ENV FREEDESKTOP_SDK_VERSION "22.08" + +# Update packages +RUN apt-get update && apt-get upgrade -y && apt-get install -y $PACKAGES + +# Add a non-privileged user +RUN useradd -d /var/lib/builder -m -r -s /bin/bash builder +USER builder +WORKDIR /var/lib/builder + +# Install Android SDK +ADD --chown=builder $ANDROID_SDK_TOOLS_URL . +RUN mkdir -p android-sdk/cmdline-tools && unzip $ANDROID_SDK_TOOLS_VERSION.zip \ + && rm $ANDROID_SDK_TOOLS_VERSION.zip && mv cmdline-tools android-sdk/cmdline-tools/latest + +# Install Flutter +ADD --chown=builder $FLUTTER_URL . +RUN tar -vxf $FLUTTER_VERSION.tar.xz && rm $FLUTTER_VERSION.tar.xz + +ENV ANDROID_HOME "/var/lib/builder/android-sdk" +ENV ANDROID_SDK_ROOT "/var/lib/builder/android-sdk" +ENV PATH "$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:/var/lib/builder/flutter/bin:/var/lib/builder/.local/bin" + +# Install needed Android SDK packages +RUN yes | sdkmanager 'build-tools;30.0.3' 'platforms;android-29' 'platforms;android-30' 'platforms;android-31' + +# Prepare dependencies for offline build +RUN git clone --depth=1 --single-branch https://git.selfprivacy.org/kherel/selfprivacy.org.app.git deps +WORKDIR /var/lib/builder/deps +RUN flutter build linux +RUN flutter build apk +WORKDIR /var/lib/builder +RUN rm -rf deps + +# Install AppImage Builder +RUN pip3 install --user appimage-builder + +# Install Flatpak dependencies +RUN flatpak --user remote-add flathub https://flathub.org/repo/flathub.flatpakrepo \ + && flatpak --user install -y org.freedesktop.Sdk/x86_64/$FREEDESKTOP_SDK_VERSION \ + org.freedesktop.Platform/x86_64/$FREEDESKTOP_SDK_VERSION diff --git a/appimage.yml b/appimage.yml new file mode 100644 index 00000000..8e7a3b5c --- /dev/null +++ b/appimage.yml @@ -0,0 +1,53 @@ +# appimage-builder recipe see https://appimage-builder.readthedocs.io for details +version: 1 +script: + - rm -rf AppDir || true + - cp -r build/linux/x64/release/bundle AppDir + - install -Dm644 assets/images/icon/logo.svg AppDir/usr/share/icons/hicolor/scalable/apps/pro.kherel.selfprivacy.svg +AppDir: + path: AppDir + app_info: + id: pro.kherel.selfprivacy + name: SelfPrivacy + icon: pro.kherel.selfprivacy + version: 0.6.0 + exec: selfprivacy + exec_args: $@ + apt: + arch: + - amd64 + allow_unauthenticated: true + sources: + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main restricted + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy universe + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates universe + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy multiverse + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse + - sourceline: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted + - sourceline: deb http://security.ubuntu.com/ubuntu/ jammy-security universe + - sourceline: deb http://security.ubuntu.com/ubuntu/ jammy-security multiverse + include: + - libjsoncpp-dev + - libsecret-1-0 + - xdg-desktop-portal + test: + fedora-30: + image: appimagecrafters/tests-env:fedora-30 + command: ./AppRun + debian-stable: + image: appimagecrafters/tests-env:debian-stable + command: ./AppRun + archlinux-latest: + image: appimagecrafters/tests-env:archlinux-latest + command: ./AppRun + centos-7: + image: appimagecrafters/tests-env:centos-7 + command: ./AppRun + ubuntu-xenial: + image: appimagecrafters/tests-env:ubuntu-xenial + command: ./AppRun +AppImage: + arch: x86_64 + update-information: guess diff --git a/assets/images/icon/logo.svg b/assets/images/icon/logo.svg new file mode 100644 index 00000000..881a57fe --- /dev/null +++ b/assets/images/icon/logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ci.py b/ci.py new file mode 100755 index 00000000..d8412580 --- /dev/null +++ b/ci.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 + +import os +import subprocess +import yaml +import argparse + +CONTAINER_IMAGE = "localhost/flutter-build-env" +HOST_HOME = "/var/lib/drone-runner-exec" +CONTAINER_HOME = "/var/lib/builder" + +APP_NAME = "pro.kherel.selfprivacy" +APP_VERSION_FULL = yaml.safe_load(open("pubspec.yaml", "r"))['version'] +APP_SEMVER = APP_VERSION_FULL[:APP_VERSION_FULL.find("+")] +APP_BUILD_ID = APP_VERSION_FULL[APP_VERSION_FULL.find("+"):][1::] + +HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/src/_data" + +# Environments + +def podman_offline(dir, *args): + subprocess.run(["podman", "run", "--rm", "--network=none", f"--workdir={dir}", + "-v", f"src:{CONTAINER_HOME}/src:U", + "-v", f"{HOST_HOME}/fdroid:{CONTAINER_HOME}/fdroid:U", + "-v", f"{HOST_HOME}/fdroid-keystore:{CONTAINER_HOME}/fdroid/fdroid-keystore:U", + "-v", f"{HOST_HOME}/standalone-keystore:{CONTAINER_HOME}/fdroid/standalone-keystore:U", + "--env", "FDROID_KEYSTORE_PASS=" + os.environ.get('FDROID_KEYSTORE_PASS'), + "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get('STANDALONE_KEYSTORE_PASS'), + CONTAINER_IMAGE, "bash", "-c", ' '.join(args) + ]) + +def podman_online(dir, *args): + subprocess.run(["podman", "run", "--rm", "--privileged", f"--workdir={dir}", + "-v", f"src:{CONTAINER_HOME}/src:U", + CONTAINER_IMAGE, "bash", "-c", ' '.join(args) + ]) + +def podman_ci(dir, *args): + subprocess.run(["podman", "run", "--rm", "--privileged", f"--workdir={dir}", + "-v", os.getcwd() + f":{CONTAINER_HOME}/src:U", + CONTAINER_IMAGE, "bash", "-c", ' '.join(args) + ]) + +# Targets + +def build_linux(): + podman_offline(f"{CONTAINER_HOME}/src", "flutter pub get --offline") + podman_offline(f"{CONTAINER_HOME}/src", "flutter build linux") + +def build_apk(): + podman_offline(f"{CONTAINER_HOME}/src", "flutter pub get --offline") + podman_offline(f"{CONTAINER_HOME}/src", "flutter build apk") + +def sign_apk_standalone(): + podman_offline(f"{CONTAINER_HOME}/fdroid", + "zipalign -f -v 4 ../src/build/app/outputs/flutter-apk/app-release.apk", + f"standalone_{APP_NAME}-{APP_SEMVER}.apk") + podman_offline(f"{CONTAINER_HOME}/fdroid", + "apksigner sign --ks standalone-keystore --ks-key-alias standalone --ks-pass", + f"env:STANDALONE_KEYSTORE_PASS standalone_{APP_NAME}-{APP_SEMVER}.apk") + +def sign_apk_fdroid(): + podman_offline(f"{CONTAINER_HOME}/fdroid", f"rm -rf {CONTAINER_HOME}/fdroid/unsigned/*") + podman_offline(f"{CONTAINER_HOME}/fdroid", + f"test ! -f {CONTAINER_HOME}/fdroid/repo/{APP_NAME}_{APP_BUILD_ID}.apk", + "&& cp ../src/build/app/outputs/flutter-apk/app-release.apk", + f"unsigned/{APP_NAME}_{APP_BUILD_ID}.apk || echo exist") + podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") + podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") + +def package_linux_appimage(): + podman_online(f"{CONTAINER_HOME}/src", "appimage-builder --recipe appimage.yml") + +def package_linux_flatpak(): + podman_online(f"{CONTAINER_HOME}/src", "flatpak-builder --disable-rofiles-fuse --force-clean --repo=flatpak-repo flatpak-build flatpak.yml") + podman_online(f"{CONTAINER_HOME}/src", f"flatpak build-bundle flatpak-repo {APP_NAME}-{APP_SEMVER}.flatpak pro.kherel.selfprivacy") + +def package_linux_archive(): + podman_online(f"{CONTAINER_HOME}/src", f"tar -C build/linux/x64/release/bundle -vacf {APP_NAME}-{APP_SEMVER}.tar.zstd .") + +def deploy_gitea_release(): + subprocess.run(["tea", "login", "add", "--token", os.environ.get('GITEA_RELEASE_TOKEN'), + "--url", "https://git.selfprivacy.org"]) + subprocess.run(["tea", "releases", "create", "--repo", os.environ.get('DRONE_REPO'), + "--tag", os.environ.get('DRONE_SEMVER'), "--title", os.environ.get('DRONE_SEMVER'), + "--asset", f"{HOST_HOME}/fdroid/standalone_{APP_NAME}-{APP_SEMVER}.apk", + "--asset", f"{HOST_HOME}/fdroid/standalone_{APP_NAME}-{APP_SEMVER}.apk.idsig", + "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage", + "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage.zsync", + "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.flatpak", + "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.tar.zstd"]) + +def deploy_fdroid_repo(): + subprocess.run([f"""eval $(ssh-agent -s) && + echo \"$SSH_PRIVATE_KEY\" | tr -d '\r' | ssh-add - && + scp -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -r {HOST_HOME}/fdroid/repo/* deployer@selfprivacy.org:/var/www/fdroid.selfprivacy.org + """], shell=True) + +def run_ci_build(): + podman_ci(f"{CONTAINER_HOME}/src", "flutter build linux --debug") + podman_ci(f"{CONTAINER_HOME}/src", "flutter build apk --debug") + +# Arguments + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + group = parser.add_mutually_exclusive_group() + group.add_argument("--build-linux", action="store_true", help="depends on podman src volume") + group.add_argument("--build-apk", action="store_true", help="depends on podman src volume") + group.add_argument("--sign-apk-standalone", action="store_true", help="depends on $STANDALONE_KEYSTORE_PASS") + group.add_argument("--sign-apk-fdroid", action="store_true", help="depends on $FDROID_KEYSTORE_PASS") + group.add_argument("--package-linux-appimage", action="store_true") + group.add_argument("--package-linux-flatpak", action="store_true") + group.add_argument("--package-linux-archive", action="store_true") + group.add_argument("--deploy-gitea-release", action="store_true", help="depends on $GITEA_RELEASE_TOKEN") + group.add_argument("--deploy-fdroid-repo", action="store_true", help="depends on $SSH_PRIVATE_KEY") + group.add_argument("--run-ci-build", action="store_true") + args = parser.parse_args() + +if args.build_linux: + build_linux() +elif args.build_apk: + build_apk() +elif args.sign_apk_standalone: + sign_apk_standalone() +elif args.sign_apk_fdroid: + sign_apk_fdroid() +elif args.package_linux_appimage: + package_linux_appimage() +elif args.package_linux_flatpak: + package_linux_flatpak() +elif args.package_linux_archive: + package_linux_archive() +elif args.deploy_gitea_release: + deploy_gitea_release() +elif args.deploy_fdroid_repo: + deploy_fdroid_repo() +elif args.run_ci_build: + run_ci_build() diff --git a/flake.lock b/flake.lock index ca75926d..cfd8ecfe 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,89 @@ { "nodes": { - "nixpkgs-unstable": { + "flake-utils": { "locked": { - "lastModified": 1662019588, - "narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixgl": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1661367362, + "narHash": "sha256-Qc8MXcV+YCPREu8kk6oggk23ZBKLqeQRAIsLbHEviPE=", + "owner": "guibou", + "repo": "nixGL", + "rev": "7165ffbccbd2cf4379b6cd6d2edd1620a427e5ae", + "type": "github" + }, + "original": { + "owner": "guibou", + "repo": "nixGL", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1660551188, + "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1662096612, + "narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2da64a81275b68fdad38af669afeda43d401e94b", + "rev": "21de2b973f9fee595a7a1ac4693efff791245c34", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "type": "indirect" } }, "root": { "inputs": { - "nixpkgs-unstable": "nixpkgs-unstable" + "flake-utils": "flake-utils", + "nixgl": "nixgl", + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index ed8dad75..d1895b0a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,22 +1,122 @@ { - inputs.nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; + nixConfig.bash-prompt = "\[selfprivacy\]$ "; - outputs = { self, nixpkgs-unstable }: - let - pkgs = import nixpkgs-unstable { config.allowUnfree = true; config.android_sdk.accept_license = true; }; - androidComposition = pkgs.androidenv.composeAndroidPackages { - toolsVersion = "26.1.1"; - platformToolsVersion = "33.0.2"; - buildToolsVersions = [ "30.0.3" ]; - platformVersions = [ "31" "30" "29" ]; - }; - in { - devShell.x86_64-linux = pkgs.mkShell { - JAVA_HOME = "${pkgs.openjdk11_headless.home}"; - ANDROID_HOME = "${androidComposition.androidsdk}/libexec/android-sdk"; - ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk"; + inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.nixgl.url = "github:guibou/nixGL"; - buildInputs = with pkgs; [ bash git androidComposition.androidsdk flutter openjdk11_headless ]; - }; - }; + outputs = { self, nixpkgs, flake-utils, nixgl }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + config.allowUnfree = true; + config.android_sdk.accept_license = true; + system = "x86_64-linux"; + overlays = [ nixgl.overlay ]; + }; + + androidComposition = pkgs.androidenv.composeAndroidPackages { + toolsVersion = "26.1.1"; + platformToolsVersion = "33.0.2"; + buildToolsVersions = [ "30.0.3" ]; + platformVersions = [ "31" "30" "29" ]; + }; + + buildDeps = with pkgs; [ + gtk3 + glib + pcre + util-linux + libselinux + libsepol + libthai + libdatrie + xorg.libXdmcp + xorg.libXtst + libxkbcommon + dbus + at-spi2-core + libsecret + jsoncpp + xorg.libX11 + libepoxy + libgcrypt + libgpg-error + ]; + + nativeBuildDeps = with pkgs; [ + flutter.unwrapped + bash + curl + flutter.dart + git + unzip + which + xz + cmake + ninja + pkg-config + wrapGAppsHook + autoPatchelfHook + androidComposition.androidsdk + openjdk11_headless + clang + ]; + + releaseDerivation = pkgs.flutter.mkFlutterApp rec { + pname = "selfprivacy"; + version = "0.6.0"; + + vendorHash = "sha256-7cbiAyIlaz3HqEsZN/nZxaLZjseJv5CmiIHqsoGa4ZI="; + + nativeBuildInputs = [ pkgs.nixgl.auto.nixGLDefault ]; + + src = ./.; + + desktopItem = pkgs.makeDesktopItem { + name = "${pname}"; + exec = "@out@/bin/${pname}"; + desktopName = "SelfPrivacy"; + }; + + postInstall = '' + rm $out/bin/$pname + + printf "#!/bin/sh\n${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL $out/app/${pname}" > $out/bin/$pname + patchShebangs $out/bin/$pname + chmod +x $out/bin/$pname + wrapProgram $out/bin/$pname --set PATH ${pkgs.lib.makeBinPath [ pkgs.xdg-user-dirs ]} + + mkdir -p $out/share/applications + cp $desktopItem/share/applications/*.desktop $out/share/applications + substituteInPlace $out/share/applications/*.desktop --subst-var out + ''; + }; + in + { + packages = { + release = releaseDerivation; + }; + defaultPackage = releaseDerivation; + + devShell = pkgs.mkShell { + buildInputs = buildDeps; + nativeBuildInputs = nativeBuildDeps; + + JAVA_HOME = "${pkgs.openjdk11_headless.home}"; + ANDROID_HOME = "${androidComposition.androidsdk}/libexec/android-sdk"; + ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk"; + + NIX_LDFLAGS = "-rpath ${pkgs.lib.makeLibraryPath buildDeps}"; + NIX_CFLAGS_COMPILE = "-I${pkgs.xorg.libX11}/include"; + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildDeps; + + shellHook = '' + export TMP=$(mktemp -d) + export HOME="$TMP" + export PUB_CACHE=''${PUB_CACHE:-"$HOME/.pub-cache"} + export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1 + ''; + }; + }); } diff --git a/flatpak.yml b/flatpak.yml new file mode 100644 index 00000000..6808b84e --- /dev/null +++ b/flatpak.yml @@ -0,0 +1,46 @@ +app-id: pro.kherel.selfprivacy +runtime: org.freedesktop.Platform +runtime-version: '22.08' +sdk: org.freedesktop.Sdk +command: selfprivacy +finish-args: + - "--share=ipc" + - "--socket=x11" + - "--socket=fallback-x11" + - "--socket=wayland" + - "--share=network" + - "--own-name=pro.kherel.selfprivacy" +modules: + - name: selfprivacy + buildsystem: simple + build-commands: + - cp -r * /app + - mkdir /app/bin + - ln -s /app/selfprivacy /app/bin/selfprivacy + - install -Dm644 logo.svg /app/share/icons/hicolor/scalable/apps/pro.kherel.selfprivacy.svg + - install -Dm644 pro.kherel.selfprivacy.desktop /app/share/applications/pro.kherel.selfprivacy.desktop + sources: + - type: dir + path: build/linux/x64/release/bundle + - type: file + path: assets/images/icon/logo.svg + - type: file + path: pro.kherel.selfprivacy.desktop + - name: libsecret + buildsystem: meson + config-opts: + - "-Dvapi=false" + - "-Dgtk_doc=false" + sources: + - type: git + url: https://gitlab.gnome.org/GNOME/libsecret.git + tag: 0.20.5 + - name: libjsoncpp + buildsystem: meson + config-opts: + - "--buildtype=release" + - "--default-library=shared" + sources: + - type: git + url: https://github.com/open-source-parsers/jsoncpp.git + tag: 1.9.5 From b3ba7d959f10fcd0b0fd17be5aa7e3e75e40e159 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 12 Sep 2022 14:41:22 +0300 Subject: [PATCH 063/732] Rename to org.selfprivacy.app and add flavors. --- android/app/build.gradle | 21 +++++++++++++++++-- android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 2 +- .../selfprivacy/app}/MainActivity.kt | 2 +- android/app/src/profile/AndroidManifest.xml | 2 +- android/build.gradle | 13 ++++++++++++ linux/CMakeLists.txt | 2 +- 7 files changed, 37 insertions(+), 7 deletions(-) rename android/app/src/main/kotlin/{pro/kherel/selfprivacy => org/selfprivacy/app}/MainActivity.kt (75%) diff --git a/android/app/build.gradle b/android/app/build.gradle index 0963724e..3811c5e7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,9 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + namespace 'org.selfprivacy.app' + + compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion sourceSets { @@ -48,7 +50,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "pro.kherel.selfprivacy" + applicationId "org.selfprivacy.app" minSdkVersion 21 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() @@ -62,6 +64,21 @@ android { signingConfig signingConfigs.debug } } + + flavorDimensions "default" + productFlavors { + fdroid { + applicationId "pro.kherel.selfprivacy" + } + production { + applicationIdSuffix "" + } + nightly { + applicationIdSuffix ".nightly" + versionCode project.getVersionCode() + versionName "nightly-" + project.getVersionCode() + } + } } flutter { diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 27e1af1d..dddeb01f 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="org.selfprivacy.app"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 33c2ba9a..50f47475 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="org.selfprivacy.app"> diff --git a/android/build.gradle b/android/build.gradle index 31e95773..d78205d8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,18 @@ buildscript { ext.kotlin_version = '1.6.10' + ext.getVersionCode = { -> + try { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-list', '--first-parent', '--count', 'origin/master' + standardOutput = stdout + } + return Integer.parseInt(stdout.toString().trim()) + } + catch (ignored) { + return -1 + } + } repositories { google() jcenter() diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index cc332a28..94dd8d0b 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -7,7 +7,7 @@ project(runner LANGUAGES CXX) set(BINARY_NAME "selfprivacy") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "pro.kherel.selfprivacy") +set(APPLICATION_ID "org.selfprivacy.app") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. From c5eed6ace958aa78428d234950f9d50d478e922b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 12 Sep 2022 20:38:22 +0300 Subject: [PATCH 064/732] Improve server settings page --- assets/translations/en.json | 7 +++++ assets/translations/ru.json | 7 +++++ .../graphql_maps/server_api/server.dart | 22 ++++++++++++++ lib/logic/api_maps/rest_maps/server.dart | 17 +++++++---- .../server_detailed_info_repository.dart | 17 +++++------ lib/logic/models/timezone_settings.dart | 11 ++++--- .../pages/server_details/server_settings.dart | 29 +++++++------------ 7 files changed, 73 insertions(+), 37 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 6a3317a1..61d60767 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -101,6 +101,13 @@ "month": "Month", "day": "Day", "hour": "Hour" + }, + "settings": { + "allow_autoupgrade": "Allow auto-upgrade", + "allow_autoupgrade_hint": "Allow automatic packages upgrades on server", + "reboot_after_upgrade": "Reboot after upgrade", + "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", + "server_timezone": "Server timezone" } }, "domain": { diff --git a/assets/translations/ru.json b/assets/translations/ru.json index abb9a2d6..9040ed80 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -101,6 +101,13 @@ "month": "Месяц", "day": "День", "hour": "Час" + }, + "settings": { + "allow_autoupgrade": "Разрешить авто-обноления", + "allow_autoupgrade_hint": "Разрешить автоматичесую установку обновлений на сервер", + "reboot_after_upgrade": "Перезагружать после обновлений", + "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", + "server_timezone": "Часовой пояс сервера" } }, "domain": { diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 56b92371..3cb39d89 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -126,4 +126,26 @@ class ServerApi extends ApiMap print(e); } } + + Future setAutoUpgradeSettings( + final bool allowReboot, + final bool enableAutoUpgrade, + ) async { + try { + final GraphQLClient client = await getClient(); + final input = Input$AutoUpgradeSettingsInput( + allowReboot: allowReboot, + enableAutoUpgrade: enableAutoUpgrade, + ); + final variables = Variables$Mutation$ChangeAutoUpgradeSettings( + settings: input, + ); + final mutation = Options$Mutation$ChangeAutoUpgradeSettings( + variables: variables, + ); + await client.mutate$ChangeAutoUpgradeSettings(mutation); + } catch (e) { + print(e); + } + } } diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index edffda09..3660d499 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -603,13 +603,20 @@ class ServerApi extends ApiMap { } Future getServerTimezone() async { - // I am not sure how to initialize TimeZoneSettings with default value... + TimeZoneSettings settings = TimeZoneSettings(); final Dio client = await getClient(); - final Response response = - await client.get('/system/configuration/timezone'); - close(client); + try { + final Response response = await client.get( + '/system/configuration/timezone', + ); + settings = TimeZoneSettings.fromString(response.data); + } catch (e) { + print(e); + } finally { + close(client); + } - return TimeZoneSettings.fromString(response.data); + return settings; } Future updateServerTimezone(final TimeZoneSettings settings) async { diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index e5858d2d..4cbe3e87 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -5,17 +5,14 @@ import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ServerDetailsRepository { - HetznerApi hetznerAPi = HetznerApi(); - ServerApi selfprivacyServer = ServerApi(); + HetznerApi hetzner = HetznerApi(); + ServerApi server = ServerApi(); - Future load() async { - print('load'); - return ServerDetailsRepositoryDto( - autoUpgradeSettings: await selfprivacyServer.getAutoUpgradeSettings(), - hetznerServerInfo: await hetznerAPi.getInfo(), - serverTimezone: await selfprivacyServer.getServerTimezone(), - ); - } + Future load() async => ServerDetailsRepositoryDto( + autoUpgradeSettings: await server.getAutoUpgradeSettings(), + hetznerServerInfo: await hetzner.getInfo(), + serverTimezone: await server.getServerTimezone(), + ); } class ServerDetailsRepositoryDto { diff --git a/lib/logic/models/timezone_settings.dart b/lib/logic/models/timezone_settings.dart index 22c84b44..4b4334af 100644 --- a/lib/logic/models/timezone_settings.dart +++ b/lib/logic/models/timezone_settings.dart @@ -3,13 +3,16 @@ import 'package:timezone/timezone.dart'; class TimeZoneSettings { factory TimeZoneSettings.fromString(final String string) { final Location location = timeZoneDatabase.locations[string]!; - return TimeZoneSettings(location); + return TimeZoneSettings(timezone: location); } - TimeZoneSettings(this.timezone); - final Location timezone; + TimeZoneSettings({this.timezone}); + final Location? timezone; Map toJson() => { - 'timezone': timezone.name, + 'timezone': timezone?.name ?? 'Unknown', }; + + @override + String toString() => timezone?.name ?? 'Unknown'; } diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index 18d425e6..418014c2 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -11,7 +11,7 @@ class _ServerSettings extends StatelessWidget { Widget build(final BuildContext context) { final serverDetailsState = context.watch().state; if (serverDetailsState is ServerDetailsNotReady) { - return const Text('not ready'); + return Text('basis.loading'.tr()); } else if (serverDetailsState is! Loaded) { return BrandLoader.horizontal(); } @@ -38,19 +38,17 @@ class _ServerSettings extends StatelessWidget { SwitcherBlock( onChange: (final _) {}, isActive: serverDetailsState.autoUpgradeSettings.enable, - child: const _TextColumn( - title: 'Allow Auto-upgrade', - value: 'Wether to allow automatic packages upgrades', - hasWarning: false, + child: _TextColumn( + title: 'providers.server.settings.allow_autoupgrade'.tr(), + value: 'providers.server.settings.allow_autoupgrade_hint'.tr(), ), ), SwitcherBlock( onChange: (final _) {}, isActive: serverDetailsState.autoUpgradeSettings.allowReboot, - child: const _TextColumn( - title: 'Reboot after upgrade', - value: 'Reboot without prompt after applying updates', - hasWarning: false, + child: _TextColumn( + title: 'providers.server.settings.reboot_after_upgrade'.tr(), + value: 'providers.server.settings.reboot_after_upgrade_hint'.tr(), ), ), _Button( @@ -58,9 +56,8 @@ class _ServerSettings extends StatelessWidget { Navigator.of(context).push(materialRoute(const SelectTimezone())); }, child: _TextColumn( - title: 'Server Timezone', - value: serverDetailsState.serverTimezone.timezone.name, - hasWarning: false, + title: 'providers.server.settings.server_timezone'.tr(), + value: serverDetailsState.serverTimezone.toString(), ), ), ], @@ -108,16 +105,12 @@ class _TextColumn extends StatelessWidget { children: [ BrandText.body1( title, - style: TextStyle(color: hasWarning ? BrandColors.warning : null), + style: Theme.of(context).textTheme.bodyLarge, ), const SizedBox(height: 5), BrandText.body1( value, - style: TextStyle( - fontSize: 13, - height: 1.53, - color: hasWarning ? BrandColors.warning : BrandColors.gray1, - ), + style: Theme.of(context).textTheme.bodyMedium, ), ], ); From 7e10c1324ca268502ce330f310ad659a54ffa6cd Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 14 Sep 2022 16:37:29 +0300 Subject: [PATCH 065/732] Remove BrandDivider and use vanilla instead. --- lib/ui/components/one_page/one_page.dart | 48 ------------------- .../pages/more/app_settings/app_setting.dart | 32 ++++--------- lib/ui/pages/more/console/console.dart | 4 +- lib/ui/pages/more/info/info.dart | 2 - .../server_details/server_details_screen.dart | 2 - .../pages/server_details/server_settings.dart | 10 ++-- 6 files changed, 12 insertions(+), 86 deletions(-) delete mode 100644 lib/ui/components/one_page/one_page.dart diff --git a/lib/ui/components/one_page/one_page.dart b/lib/ui/components/one_page/one_page.dart deleted file mode 100644 index d16dd5f3..00000000 --- a/lib/ui/components/one_page/one_page.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/ui/components/pre_styled_buttons/pre_styled_buttons.dart'; - -class OnePage extends StatelessWidget { - const OnePage({ - required this.title, - required this.child, - final super.key, - }); - - final String title; - final Widget child; - - @override - Widget build(final BuildContext context) => Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: Column( - children: [ - Container( - height: 51, - alignment: Alignment.center, - padding: const EdgeInsets.symmetric(horizontal: 15), - child: BrandText.h4('basis.details'.tr()), - ), - const BrandDivider(), - ], - ), - ), - body: child, - bottomNavigationBar: SafeArea( - child: Container( - decoration: BoxDecoration(boxShadow: kElevationToShadow[3]), - height: kBottomNavigationBarHeight, - child: Container( - color: Theme.of(context).scaffoldBackgroundColor, - alignment: Alignment.center, - child: PreStyledButtons.close( - onPress: () => Navigator.of(context).pop(), - ), - ), - ), - ), - ); -} diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart index 862815c1..8c2cf506 100644 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ b/lib/ui/pages/more/app_settings/app_setting.dart @@ -5,7 +5,6 @@ import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_switch/brand_switch.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; @@ -38,15 +37,9 @@ class _AppSettingsPageState extends State { body: ListView( padding: paddingH15V0, children: [ - const BrandDivider(), + const Divider(height: 1), Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: - BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -68,14 +61,9 @@ class _AppSettingsPageState extends State { ], ), ), + const Divider(height: 0), Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: - BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -127,7 +115,8 @@ class _AppSettingsPageState extends State { ], ), ), - deleteServer(context) + const Divider(height: 0), + _DeleteServer(context) ], ), ), @@ -135,16 +124,11 @@ class _AppSettingsPageState extends State { ); } - Widget deleteServer(final BuildContext context) { + Widget _DeleteServer(final BuildContext context) { final bool isDisabled = context.watch().state.serverDetails == null; return Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, diff --git a/lib/ui/pages/more/console/console.dart b/lib/ui/pages/more/console/console.dart index 76703444..e3951013 100644 --- a/lib/ui/pages/more/console/console.dart +++ b/lib/ui/pages/more/console/console.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; class Console extends StatefulWidget { @@ -37,8 +36,7 @@ class _ConsoleState extends State { preferredSize: const Size.fromHeight(53), child: Column( children: const [ - BrandHeader(title: 'Console', hasBackButton: true), - BrandDivider(), + BrandHeader(title: 'Console', hasBackButton: true) ], ), ), diff --git a/lib/ui/pages/more/info/info.dart b/lib/ui/pages/more/info/info.dart index ac0419fc..8d2526d6 100644 --- a/lib/ui/pages/more/info/info.dart +++ b/lib/ui/pages/more/info/info.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:package_info/package_info.dart'; @@ -21,7 +20,6 @@ class InfoPage extends StatelessWidget { body: ListView( padding: paddingH15V0, children: [ - const BrandDivider(), const SizedBox(height: 10), FutureBuilder( future: _packageVersion(), diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 1f442220..38edcc63 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -8,7 +8,6 @@ import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.da import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; @@ -78,7 +77,6 @@ class _ServerDetailsScreenState extends State padding: const EdgeInsets.symmetric(horizontal: 15), child: BrandText.h4('basis.details'.tr()), ), - const BrandDivider(), ], ), ), diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index 418014c2..a5c98ff3 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -34,7 +34,6 @@ class _ServerSettings extends StatelessWidget { ], ), ), - const BrandDivider(), SwitcherBlock( onChange: (final _) {}, isActive: serverDetailsState.autoUpgradeSettings.enable, @@ -43,6 +42,7 @@ class _ServerSettings extends StatelessWidget { value: 'providers.server.settings.allow_autoupgrade_hint'.tr(), ), ), + const Divider(height: 0), SwitcherBlock( onChange: (final _) {}, isActive: serverDetailsState.autoUpgradeSettings.allowReboot, @@ -51,6 +51,7 @@ class _ServerSettings extends StatelessWidget { value: 'providers.server.settings.reboot_after_upgrade_hint'.tr(), ), ), + const Divider(height: 0), _Button( onTap: () { Navigator.of(context).push(materialRoute(const SelectTimezone())); @@ -78,12 +79,7 @@ class _Button extends StatelessWidget { Widget build(final BuildContext context) => InkWell( onTap: onTap, child: Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: child, ), ); From 31624a3412587fb4254bdeb1530c3369f5bf09c4 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 14 Sep 2022 16:37:29 +0300 Subject: [PATCH 066/732] Remove BrandDivider and use vanilla instead. --- lib/ui/components/brand_divider/brand_divider.dart | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 lib/ui/components/brand_divider/brand_divider.dart diff --git a/lib/ui/components/brand_divider/brand_divider.dart b/lib/ui/components/brand_divider/brand_divider.dart deleted file mode 100644 index 646989a1..00000000 --- a/lib/ui/components/brand_divider/brand_divider.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:flutter/material.dart'; - -class BrandDivider extends StatelessWidget { - const BrandDivider({final super.key}); - - @override - Widget build(final BuildContext context) => Container( - width: double.infinity, - height: 1, - color: Theme.of(context).colorScheme.onSurface.withAlpha(30), - ); -} From 1a17f73df464ea95c9bb818bcce0018621c7da28 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 14 Sep 2022 18:14:55 +0300 Subject: [PATCH 067/732] Delete unused UI components. --- .../brand_modal_sheet/brand_modal_sheet.dart | 63 -------------- .../components/brand_radio/brand_radio.dart | 2 + .../brand_radio_tile/brand_radio_tile.dart | 2 + .../brand_span_button/brand_span_button.dart | 35 -------- lib/ui/components/brand_text/brand_text.dart | 2 + .../dots_indicator/dots_indicator.dart | 33 ------- .../components/pre_styled_buttons/close.dart | 19 ---- .../components/pre_styled_buttons/flash.dart | 87 ------------------- .../pre_styled_buttons/flash_fab.dart | 1 + .../pre_styled_buttons.dart | 22 ----- lib/utils/extensions/elevation_extension.dart | 32 ------- lib/utils/route_transitions/slide_bottom.dart | 49 ----------- lib/utils/route_transitions/slide_right.dart | 48 ---------- 13 files changed, 7 insertions(+), 388 deletions(-) delete mode 100644 lib/ui/components/brand_modal_sheet/brand_modal_sheet.dart delete mode 100644 lib/ui/components/brand_span_button/brand_span_button.dart delete mode 100644 lib/ui/components/dots_indicator/dots_indicator.dart delete mode 100644 lib/ui/components/pre_styled_buttons/close.dart delete mode 100644 lib/ui/components/pre_styled_buttons/flash.dart delete mode 100644 lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart delete mode 100644 lib/utils/extensions/elevation_extension.dart delete mode 100644 lib/utils/route_transitions/slide_bottom.dart delete mode 100644 lib/utils/route_transitions/slide_right.dart diff --git a/lib/ui/components/brand_modal_sheet/brand_modal_sheet.dart b/lib/ui/components/brand_modal_sheet/brand_modal_sheet.dart deleted file mode 100644 index 6435f7bc..00000000 --- a/lib/ui/components/brand_modal_sheet/brand_modal_sheet.dart +++ /dev/null @@ -1,63 +0,0 @@ -// import 'package:flutter/material.dart'; - -// var navigatorKey = GlobalKey(); - -// class BrandModalSheet extends StatelessWidget { -// const BrandModalSheet({ -// Key? key, -// this.child, -// }) : super(key: key); - -// final Widget? child; -// @override -// Widget build(BuildContext context) { -// return DraggableScrollableSheet( -// minChildSize: 1, -// initialChildSize: 1, -// maxChildSize: 1, -// builder: (context, scrollController) { -// return SingleChildScrollView( -// controller: scrollController, -// physics: ClampingScrollPhysics(), -// child: Container( -// child: Column( -// children: [ -// GestureDetector( -// onTap: () => Navigator.of(context).pop(), -// behavior: HitTestBehavior.opaque, -// child: Container( -// width: double.infinity, -// child: Center( -// child: Padding( -// padding: EdgeInsets.only(top: 132, bottom: 6), -// child: Container( -// height: 4, -// width: 30, -// decoration: BoxDecoration( -// borderRadius: BorderRadius.circular(2), -// color: Color(0xFFE3E3E3).withOpacity(0.65), -// ), -// ), -// ), -// ), -// ), -// ), -// Container( -// constraints: BoxConstraints( -// minHeight: MediaQuery.of(context).size.height - 132, -// maxHeight: MediaQuery.of(context).size.height - 132, -// ), -// decoration: BoxDecoration( -// borderRadius: -// BorderRadius.vertical(top: Radius.circular(20)), -// color: Theme.of(context).scaffoldBackgroundColor, -// ), -// width: double.infinity, -// child: child), -// ], -// ), -// ), -// ); -// }); -// } -// } diff --git a/lib/ui/components/brand_radio/brand_radio.dart b/lib/ui/components/brand_radio/brand_radio.dart index 60f41fb5..2dc8fc00 100644 --- a/lib/ui/components/brand_radio/brand_radio.dart +++ b/lib/ui/components/brand_radio/brand_radio.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; +// TODO: Delete this file. + class BrandRadio extends StatelessWidget { const BrandRadio({ required this.isChecked, diff --git a/lib/ui/components/brand_radio_tile/brand_radio_tile.dart b/lib/ui/components/brand_radio_tile/brand_radio_tile.dart index 5b18247d..3226c97b 100644 --- a/lib/ui/components/brand_radio_tile/brand_radio_tile.dart +++ b/lib/ui/components/brand_radio_tile/brand_radio_tile.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_radio/brand_radio.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; +// TODO: Delete this file + class BrandRadioTile extends StatelessWidget { const BrandRadioTile({ required this.isChecked, diff --git a/lib/ui/components/brand_span_button/brand_span_button.dart b/lib/ui/components/brand_span_button/brand_span_button.dart deleted file mode 100644 index de19730e..00000000 --- a/lib/ui/components/brand_span_button/brand_span_button.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class BrandSpanButton extends TextSpan { - BrandSpanButton({ - required final String text, - required final VoidCallback onTap, - final TextStyle? style, - }) : super( - recognizer: TapGestureRecognizer()..onTap = onTap, - text: text, - style: (style ?? const TextStyle()).copyWith(color: BrandColors.blue), - ); - - BrandSpanButton.link({ - required final String text, - final String? urlString, - final TextStyle? style, - }) : super( - recognizer: TapGestureRecognizer() - ..onTap = () => _launchURL(urlString ?? text), - text: text, - style: (style ?? const TextStyle()).copyWith(color: BrandColors.blue), - ); - - static Future _launchURL(final String link) async { - if (await canLaunchUrl(Uri.parse(link))) { - await launchUrl(Uri.parse(link)); - } else { - throw 'Could not launch $link'; - } - } -} diff --git a/lib/ui/components/brand_text/brand_text.dart b/lib/ui/components/brand_text/brand_text.dart index 544ffcec..00e9d736 100644 --- a/lib/ui/components/brand_text/brand_text.dart +++ b/lib/ui/components/brand_text/brand_text.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/text_themes.dart'; export 'package:selfprivacy/utils/extensions/text_extensions.dart'; +// TODO: Delete this file + enum TextType { h1, // right now only at onboarding and opened providers h2, // cards titles diff --git a/lib/ui/components/dots_indicator/dots_indicator.dart b/lib/ui/components/dots_indicator/dots_indicator.dart deleted file mode 100644 index fff647b7..00000000 --- a/lib/ui/components/dots_indicator/dots_indicator.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; - -class DotsIndicator extends StatelessWidget { - const DotsIndicator({ - required this.activeIndex, - required this.count, - final super.key, - }); - - final int activeIndex; - final int count; - - @override - Widget build(final BuildContext context) { - final List dots = List.generate( - count, - (final index) => Container( - margin: const EdgeInsets.symmetric(horizontal: 5, vertical: 10), - height: 10, - width: 10, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: index == activeIndex ? BrandColors.blue : BrandColors.gray2, - ), - ), - ); - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: dots, - ); - } -} diff --git a/lib/ui/components/pre_styled_buttons/close.dart b/lib/ui/components/pre_styled_buttons/close.dart deleted file mode 100644 index 48a1bddb..00000000 --- a/lib/ui/components/pre_styled_buttons/close.dart +++ /dev/null @@ -1,19 +0,0 @@ -part of 'pre_styled_buttons.dart'; - -class _CloseButton extends StatelessWidget { - const _CloseButton({required this.onPress}); - - final VoidCallback onPress; - - @override - Widget build(final BuildContext context) => OutlinedButton( - onPressed: () => Navigator.of(context).pop(), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - BrandText.h4('basis.close'.tr()), - const Icon(Icons.close), - ], - ), - ); -} diff --git a/lib/ui/components/pre_styled_buttons/flash.dart b/lib/ui/components/pre_styled_buttons/flash.dart deleted file mode 100644 index 3e780fd7..00000000 --- a/lib/ui/components/pre_styled_buttons/flash.dart +++ /dev/null @@ -1,87 +0,0 @@ -part of 'pre_styled_buttons.dart'; - -class _BrandFlashButton extends StatefulWidget { - @override - _BrandFlashButtonState createState() => _BrandFlashButtonState(); -} - -class _BrandFlashButtonState extends State<_BrandFlashButton> - with SingleTickerProviderStateMixin { - late AnimationController _animationController; - late Animation _colorTween; - - @override - void initState() { - _animationController = AnimationController( - vsync: this, - duration: const Duration(milliseconds: 800), - ); - _colorTween = ColorTween( - begin: BrandColors.black, - end: BrandColors.primary, - ).animate(_animationController); - - super.initState(); - WidgetsBinding.instance.addPostFrameCallback(_afterLayout); - } - - void _afterLayout(final _) { - if (Theme.of(context).brightness == Brightness.dark) { - setState(() { - _colorTween = ColorTween( - begin: BrandColors.white, - end: BrandColors.primary, - ).animate(_animationController); - }); - } - } - - @override - void dispose() { - _animationController.dispose(); - super.dispose(); - } - - bool wasPrevStateIsEmpty = true; - - @override - Widget build(final BuildContext context) => - BlocListener( - listener: (final context, final state) { - if (wasPrevStateIsEmpty && state is! JobsStateEmpty) { - wasPrevStateIsEmpty = false; - _animationController.forward(); - } else if (!wasPrevStateIsEmpty && state is JobsStateEmpty) { - wasPrevStateIsEmpty = true; - - _animationController.reverse(); - } - }, - child: IconButton( - onPressed: () { - showBrandBottomSheet( - context: context, - builder: (final context) => const BrandBottomSheet( - isExpended: true, - child: JobsContent(), - ), - ); - }, - icon: AnimatedBuilder( - animation: _colorTween, - builder: (final context, final child) { - final double v = _animationController.value; - final IconData icon = - v > 0.5 ? Ionicons.flash : Ionicons.flash_outline; - return Transform.scale( - scale: 1 + (v < 0.5 ? v : 1 - v) * 2, - child: Icon( - icon, - color: _colorTween.value, - ), - ); - }, - ), - ), - ); -} diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/components/pre_styled_buttons/flash_fab.dart index c9fb754f..b97f3bd6 100644 --- a/lib/ui/components/pre_styled_buttons/flash_fab.dart +++ b/lib/ui/components/pre_styled_buttons/flash_fab.dart @@ -55,6 +55,7 @@ class _BrandFabState extends State }, child: FloatingActionButton( onPressed: () { + // TODO: Make a hero animation to the screen showBrandBottomSheet( context: context, builder: (final BuildContext context) => const BrandBottomSheet( diff --git a/lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart b/lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart deleted file mode 100644 index 5649236c..00000000 --- a/lib/ui/components/pre_styled_buttons/pre_styled_buttons.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:ionicons/ionicons.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; - -part 'close.dart'; -part 'flash.dart'; - -class PreStyledButtons { - static Widget close({ - required final VoidCallback onPress, - }) => - _CloseButton(onPress: onPress); - - static Widget flash() => _BrandFlashButton(); -} diff --git a/lib/utils/extensions/elevation_extension.dart b/lib/utils/extensions/elevation_extension.dart deleted file mode 100644 index 9c6bbc14..00000000 --- a/lib/utils/extensions/elevation_extension.dart +++ /dev/null @@ -1,32 +0,0 @@ -library elevation_extension; - -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; - -extension ElevationExtension on BoxDecoration { - BoxDecoration copyWith({ - final Color? color, - final DecorationImage? image, - final BoxBorder? border, - final BorderRadiusGeometry? borderRadius, - final List? boxShadow, - final Gradient? gradient, - final BlendMode? backgroundBlendMode, - final BoxShape? shape, - }) => - BoxDecoration( - color: color ?? this.color, - image: image ?? this.image, - border: border ?? this.border, - borderRadius: borderRadius ?? this.borderRadius, - boxShadow: this.boxShadow != null || boxShadow != null - ? [ - ...this.boxShadow ?? [], - ...boxShadow ?? [] - ] - : null, - gradient: gradient ?? this.gradient, - backgroundBlendMode: backgroundBlendMode ?? this.backgroundBlendMode, - shape: shape ?? this.shape, - ); -} diff --git a/lib/utils/route_transitions/slide_bottom.dart b/lib/utils/route_transitions/slide_bottom.dart deleted file mode 100644 index e187b4d7..00000000 --- a/lib/utils/route_transitions/slide_bottom.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:flutter/material.dart'; - -Function pageBuilder = (final Widget widget) => ( - final BuildContext context, - final Animation animation, - final Animation secondaryAnimation, - ) => - widget; - -Function transitionsBuilder = ( - final BuildContext context, - final Animation animation, - final Animation secondaryAnimation, - final Widget child, -) => - SlideTransition( - position: Tween( - begin: const Offset(0, 1), - end: Offset.zero, - ).animate(animation), - child: Container( - decoration: animation.isCompleted - ? null - : const BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.black, - ), - ), - ), - child: child, - ), - ); - -class SlideBottomRoute extends PageRouteBuilder { - SlideBottomRoute(this.widget) - : super( - transitionDuration: const Duration(milliseconds: 150), - pageBuilder: pageBuilder(widget), - transitionsBuilder: transitionsBuilder as Widget Function( - BuildContext, - Animation, - Animation, - Widget, - ), - ); - - final Widget widget; -} diff --git a/lib/utils/route_transitions/slide_right.dart b/lib/utils/route_transitions/slide_right.dart deleted file mode 100644 index eae4414d..00000000 --- a/lib/utils/route_transitions/slide_right.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; - -Function pageBuilder = (final Widget widget) => ( - final BuildContext context, - final Animation animation, - final Animation secondaryAnimation, - ) => - widget; - -Function transitionsBuilder = ( - final BuildContext context, - final Animation animation, - final Animation secondaryAnimation, - final Widget child, -) => - SlideTransition( - position: Tween( - begin: const Offset(-1, 0), - end: Offset.zero, - ).animate(animation), - child: Container( - decoration: animation.isCompleted - ? null - : const BoxDecoration( - border: Border( - right: BorderSide( - color: Colors.black, - ), - ), - ), - child: child, - ), - ); - -class SlideRightRoute extends PageRouteBuilder { - SlideRightRoute(this.widget) - : super( - pageBuilder: pageBuilder(widget), - transitionsBuilder: transitionsBuilder as Widget Function( - BuildContext, - Animation, - Animation, - Widget, - ), - ); - - final Widget widget; -} From 34837d8e29524c1c0b835ac3423528e1a6b67fd3 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 14 Sep 2022 19:45:50 +0300 Subject: [PATCH 068/732] Introducing InfoBox widget, small UI fixes --- lib/ui/components/info_box/info_box.dart | 31 +++++++++++++++++++ .../components/switch_block/switch_bloc.dart | 9 ++---- lib/ui/pages/devices/devices.dart | 16 ++-------- .../recovery_key/recovery_key_receiving.dart | 10 ++---- lib/ui/pages/services/service_page.dart | 1 + lib/ui/pages/users/user_details.dart | 12 ++----- lib/ui/pages/users/users.dart | 1 + 7 files changed, 43 insertions(+), 37 deletions(-) create mode 100644 lib/ui/components/info_box/info_box.dart diff --git a/lib/ui/components/info_box/info_box.dart b/lib/ui/components/info_box/info_box.dart new file mode 100644 index 00000000..5a4129c2 --- /dev/null +++ b/lib/ui/components/info_box/info_box.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; + +class InfoBox extends StatelessWidget { + const InfoBox({ + required this.text, + this.isWarning = false, + final super.key, + }); + + final String text; + final bool isWarning; + + @override + Widget build(final BuildContext context) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + isWarning ? Icons.warning_amber_outlined : Icons.info_outline, + size: 24, + color: Theme.of(context).colorScheme.onBackground, + ), + const SizedBox(height: 16), + Text( + text, + style: Theme.of(context).textTheme.bodyMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + ], + ); +} diff --git a/lib/ui/components/switch_block/switch_bloc.dart b/lib/ui/components/switch_block/switch_bloc.dart index ae593f1e..cce3b742 100644 --- a/lib/ui/components/switch_block/switch_bloc.dart +++ b/lib/ui/components/switch_block/switch_bloc.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; +// TODO: Delete this file. + class SwitcherBlock extends StatelessWidget { const SwitcherBlock({ required this.child, @@ -15,12 +17,7 @@ class SwitcherBlock extends StatelessWidget { @override Widget build(final BuildContext context) => Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index ad48096e..e89535ab 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -6,6 +6,7 @@ import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/pages/devices/new_device.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -51,20 +52,7 @@ class _DevicesScreenState extends State { const SizedBox(height: 16), const Divider(height: 1), const SizedBox(height: 16), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Icon( - Icons.info_outline, - color: Theme.of(context).colorScheme.onBackground, - ), - const SizedBox(height: 16), - Text( - 'devices.main_screen.tip'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - ], - ), + InfoBox(text: 'devices.main_screen.tip'.tr(),), ], const SizedBox(height: 24), ], diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index 7ae6adaf..521cf723 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; class RecoveryKeyReceiving extends StatelessWidget { const RecoveryKeyReceiving({required this.recoveryKey, final super.key}); @@ -28,14 +29,7 @@ class RecoveryKeyReceiving extends StatelessWidget { const SizedBox(height: 16), const Divider(), const SizedBox(height: 16), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon(Icons.info_outlined, size: 24), - const SizedBox(height: 16), - Text('recovery_key.key_receiving_info'.tr()), - ], - ), + InfoBox(text: 'recovery_key.key_receiving_info'.tr(),), const SizedBox(height: 16), FilledButton( title: 'recovery_key.key_receiving_done'.tr(), diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index d3dad443..7dfa5a18 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -48,6 +48,7 @@ class _ServicePageState extends State { service.svgIcon, width: 48.0, height: 48.0, + color: Theme.of(context).colorScheme.onBackground, ), ), const SizedBox(height: 16), diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 4b1049c1..f6efb0df 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -53,15 +53,9 @@ class UserDetails extends StatelessWidget { const Divider(height: 8), Padding( padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon(Icons.warning_amber_outlined, size: 24), - const SizedBox(height: 16), - Text( - 'users.no_sso_notice'.tr(), - ), - ], + child: InfoBox( + text: 'users.no_sso_notice'.tr(), + isWarning: true, ), ), ], diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index bf76ba89..886be330 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -19,6 +19,7 @@ import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; From 12d4cd23ec83fb0f9c825e489cfddc4e0171c625 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 14 Sep 2022 19:46:38 +0300 Subject: [PATCH 069/732] Binds migration screen --- lib/ui/pages/more/more.dart | 34 ++++ .../pages/server_storage/data_migration.dart | 153 +++++++++++++++--- lib/ui/pages/server_storage/disk_status.dart | 18 +++ .../service_migration_list_item.dart | 90 +++++++++++ 4 files changed, 275 insertions(+), 20 deletions(-) create mode 100644 lib/ui/pages/server_storage/service_migration_list_item.dart diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index fce3f640..3a3b1f5e 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -2,12 +2,17 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:ionicons/ionicons.dart'; import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; +import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; +import 'package:selfprivacy/ui/pages/server_storage/data_migration.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/setup/initializing.dart'; import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; @@ -27,6 +32,9 @@ class MorePage extends StatelessWidget { final bool isReady = context.watch().state is ServerInstallationFinished; + final bool? usesBinds = + context.watch().state.usesBinds; + return Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(52), @@ -40,6 +48,32 @@ class MorePage extends StatelessWidget { padding: paddingH15V0, child: Column( children: [ + if (isReady && usesBinds != null && !usesBinds) + _MoreMenuItem( + title: 'providers.storage.start_migration_button'.tr(), + iconData: Icons.drive_file_move_outline, + goTo: DataMigrationPage( + diskStatus: DiskStatus.fromVolumes( + context.read().state.volumes, + context.read().state.volumes, + ), + services: context + .read() + .state + .services + .where( + (final service) => + service.id == 'bitwarden' || + service.id == 'gitea' || + service.id == 'pleroma' || + service.id == 'mailserver' || + service.id == 'nextcloud', + ) + .toList(), + ), + subtitle: 'not_ready_card.in_menu'.tr(), + accent: true, + ), if (!isReady) _MoreMenuItem( title: 'more.configuration_wizard'.tr(), diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index 5085c790..05948840 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -1,44 +1,157 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; +import 'package:selfprivacy/ui/pages/server_storage/service_migration_list_item.dart'; class DataMigrationPage extends StatefulWidget { const DataMigrationPage({ - required this.diskVolumeToResize, + required this.services, required this.diskStatus, - required this.resizeTarget, final super.key, }); - final DiskVolume diskVolumeToResize; final DiskStatus diskStatus; - final DiskSize resizeTarget; + final List services; @override State createState() => _DataMigrationPageState(); } class _DataMigrationPageState extends State { + /// Service id to target migration disk name + final Map serviceToDisk = {}; + + static const headerHeight = 52.0; + static const headerVerticalPadding = 8.0; + static const listItemHeight = 62.0; + @override - Widget build(final BuildContext context) => BrandHeroScreen( - hasBackButton: true, - heroTitle: 'providers.storage.data_migration_title'.tr(), - children: [ - ...widget.diskStatus.diskVolumes - .map( - (final volume) => Column( + void initState() { + super.initState(); + + for (final Service service in widget.services) { + if (service.storageUsage.volume != null) { + serviceToDisk[service.id] = service.storageUsage.volume!; + } + } + } + + void onChange(final String volumeName, final String serviceId) { + setState(() { + serviceToDisk[serviceId] = volumeName; + }); + } + + /// Check the services and if a service is moved (in a serviceToDisk entry) + /// subtract the used storage from the old volume and add it to the new volume. + /// The old volume is the volume the service is currently on, shown in services list. + DiskVolume recalculatedDiskUsages(final DiskVolume volume, final List services) { + DiskSize used = volume.sizeUsed; + + for (final Service service in services) { + if (service.storageUsage.volume != null) { + if (service.storageUsage.volume == volume.name) { + if (serviceToDisk[service.id] != null && serviceToDisk[service.id] != volume.name) { + used -= service.storageUsage.used; + } + } else { + if (serviceToDisk[service.id] != null && serviceToDisk[service.id] == volume.name) { + used += service.storageUsage.used; + } + } + } + } + + return volume.copyWith(sizeUsed: used); + } + + @override + Widget build(final BuildContext context) { + final Size appBarHeight = Size.fromHeight( + headerHeight + + headerVerticalPadding * 2 + + listItemHeight * widget.diskStatus.diskVolumes.length + + headerVerticalPadding * widget.diskStatus.diskVolumes.length, + ); + return SafeArea( + child: Scaffold( + appBar: PreferredSize( + preferredSize: appBarHeight, + child: Column( + children: [ + BrandHeader( + title: 'providers.storage.data_migration_title'.tr(), + hasBackButton: true, + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 16.0, + vertical: headerVerticalPadding, + ), + child: Column( children: [ - ServerStorageListItem( - volume: volume, - ), - const SizedBox(height: 16), + ...widget.diskStatus.diskVolumes + .map( + (final volume) => Column( + children: [ + ServerStorageListItem( + volume: recalculatedDiskUsages(volume, widget.services), + dense: true, + ), + const SizedBox(height: headerVerticalPadding), + ], + ), + ) + .toList(), ], ), - ) - .toList(), - ], - ); + ), + const Divider(height: 0), + ], + ), + ), + body: ListView( + padding: const EdgeInsets.all(16.0), + children: [ + if (widget.services.isEmpty) const Center(child: CircularProgressIndicator()), + ...widget.services + .map( + (final service) => Column( + children: [ + const SizedBox(height: 8), + ServiceMigrationListItem( + service: service, + diskStatus: widget.diskStatus, + selectedVolume: serviceToDisk[service.id]!, + onChange: onChange, + ), + const SizedBox(height: 4), + const Divider(), + ], + ), + ) + .toList(), + Padding( + padding: const EdgeInsets.all(8.0), + child: InfoBox(text: 'providers.storage.data_migration_notice'.tr(), isWarning: true,), + ), + const SizedBox(height: 16), + FilledButton( + title: 'providers.storage.start_migration_button'.tr(), + onPressed: () { + // TODO: Implement migration + }, + ), + const SizedBox(height: 32), + ], + ), + ), + ); + } } diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index 1803f609..a4f921e9 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -59,6 +59,24 @@ class DiskVolume { sizeTotal.byte == 0 ? 0 : sizeUsed.byte / sizeTotal.byte; bool get isDiskOkay => percentage < 0.8 && sizeTotal.gibibyte - sizeUsed.gibibyte > 2.0; + + DiskVolume copyWith({ + final DiskSize? sizeUsed, + final DiskSize? sizeTotal, + final String? name, + final bool? root, + final bool? isResizable, + final ServerDiskVolume? serverDiskVolume, + final ServerVolume? providerVolume, + }) => DiskVolume( + sizeUsed: sizeUsed ?? this.sizeUsed, + sizeTotal: sizeTotal ?? this.sizeTotal, + name: name ?? this.name, + root: root ?? this.root, + isResizable: isResizable ?? this.isResizable, + serverDiskVolume: serverDiskVolume ?? this.serverDiskVolume, + providerVolume: providerVolume ?? this.providerVolume, + ); } class DiskStatus { diff --git a/lib/ui/pages/server_storage/service_migration_list_item.dart b/lib/ui/pages/server_storage/service_migration_list_item.dart new file mode 100644 index 00000000..ac6fc5bf --- /dev/null +++ b/lib/ui/pages/server_storage/service_migration_list_item.dart @@ -0,0 +1,90 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; + +class ServiceMigrationListItem extends StatelessWidget { + const ServiceMigrationListItem({ + required this.service, + required this.diskStatus, + required this.selectedVolume, + required this.onChange, + final super.key, + }); + + final Service service; + final DiskStatus diskStatus; + final String selectedVolume; + final Function onChange; + + @override + Widget build(final BuildContext context) => Column( + children: [ + _headerRow(context), + const SizedBox(height: 16), + ..._radioRows(context), + ], + ); + + Widget _headerRow(final BuildContext context) => SizedBox( + height: 24, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: Row( + children: [ + Container( + alignment: Alignment.topLeft, + child: SvgPicture.string( + service.svgIcon, + width: 24.0, + height: 24.0, + color: Theme.of(context).colorScheme.onBackground, + ), + ), + const SizedBox(width: 16), + Container( + alignment: Alignment.topLeft, + child: Text( + service.displayName, + style: Theme.of(context).textTheme.titleMedium, + ), + ), + const SizedBox(width: 16), + Expanded( + child: Container( + alignment: Alignment.centerRight, + child: Text( + service.storageUsage.used.toString(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + ), + ], + ), + ), + ); + + List _radioRows(final BuildContext context) { + final List volumeRows = []; + + for (final DiskVolume volume in diskStatus.diskVolumes) { + volumeRows.add( + RadioListTile( + title: Text( + volume.displayName, + ), + contentPadding: EdgeInsets.zero, + activeColor: Theme.of(context).colorScheme.secondary, + dense: true, + value: volume.name, + groupValue: selectedVolume, + onChanged: (final value) { + onChange(value, service.id); + }, + ), + ); + } + + return volumeRows; + } +} From dc72b6d1b2e46935161a6d255be1fa2420f7d4f8 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 15 Sep 2022 02:31:25 +0300 Subject: [PATCH 070/732] Implement server settings page functionality --- assets/translations/en.json | 3 +- assets/translations/ru.json | 3 +- lib/config/bloc_config.dart | 1 + .../schema/server_settings.graphql | 1 - .../schema/server_settings.graphql.dart | 42 +----------- .../schema/server_settings.graphql.g.dart | 4 -- .../graphql_maps/server_api/server.dart | 53 +++++++++++++-- lib/logic/api_maps/rest_maps/server.dart | 38 ----------- .../server_detailed_info_cubit.dart | 2 +- .../server_detailed_info_repository.dart | 33 ++++++++-- lib/logic/models/auto_upgrade_settings.dart | 18 +++++ .../models/json/auto_upgrade_settings.dart | 22 ------- .../models/json/auto_upgrade_settings.g.dart | 20 ------ lib/logic/models/ssh_settings.dart | 17 +++++ lib/logic/models/system_settings.dart | 26 ++++++++ .../server_details/server_details_screen.dart | 1 + .../pages/server_details/server_settings.dart | 65 +++++++++++++++---- .../server_details/time_zone/time_zone.dart | 56 ++++++++++------ 18 files changed, 234 insertions(+), 171 deletions(-) create mode 100644 lib/logic/models/auto_upgrade_settings.dart delete mode 100644 lib/logic/models/json/auto_upgrade_settings.dart delete mode 100644 lib/logic/models/json/auto_upgrade_settings.g.dart create mode 100644 lib/logic/models/ssh_settings.dart create mode 100644 lib/logic/models/system_settings.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 61d60767..a51f0da9 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -107,7 +107,8 @@ "allow_autoupgrade_hint": "Allow automatic packages upgrades on server", "reboot_after_upgrade": "Reboot after upgrade", "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", - "server_timezone": "Server timezone" + "server_timezone": "Server timezone", + "select_timezone": "Select timezone" } }, "domain": { diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 9040ed80..906e9471 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -107,7 +107,8 @@ "allow_autoupgrade_hint": "Разрешить автоматичесую установку обновлений на сервер", "reboot_after_upgrade": "Перезагружать после обновлений", "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", - "server_timezone": "Часовой пояс сервера" + "server_timezone": "Часовой пояс сервера", + "select_timezone": "Выберите часовой пояс" } }, "domain": { diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index fd00db2b..fb24a02b 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql index 5f175e8a..d8a1d62d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql @@ -14,7 +14,6 @@ query SystemSettings { ssh { enable passwordAuthentication - rootSshKeys } timezone } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 924f5d00..538b58cf 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -336,12 +336,6 @@ const documentNodeQuerySystemSettings = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: null), - FieldNode( - name: NameNode(value: 'rootSshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -810,7 +804,6 @@ class Query$SystemSettings$system$settings$ssh { Query$SystemSettings$system$settings$ssh( {required this.enable, required this.passwordAuthentication, - required this.rootSshKeys, required this.$__typename}); @override @@ -822,8 +815,6 @@ class Query$SystemSettings$system$settings$ssh { final bool passwordAuthentication; - final List rootSshKeys; - @JsonKey(name: '__typename') final String $__typename; @@ -832,14 +823,8 @@ class Query$SystemSettings$system$settings$ssh { int get hashCode { final l$enable = enable; final l$passwordAuthentication = passwordAuthentication; - final l$rootSshKeys = rootSshKeys; final l$$__typename = $__typename; - return Object.hashAll([ - l$enable, - l$passwordAuthentication, - Object.hashAll(l$rootSshKeys.map((v) => v)), - l$$__typename - ]); + return Object.hashAll([l$enable, l$passwordAuthentication, l$$__typename]); } @override @@ -853,15 +838,6 @@ class Query$SystemSettings$system$settings$ssh { final l$passwordAuthentication = passwordAuthentication; final lOther$passwordAuthentication = other.passwordAuthentication; if (l$passwordAuthentication != lOther$passwordAuthentication) return false; - final l$rootSshKeys = rootSshKeys; - final lOther$rootSshKeys = other.rootSshKeys; - if (l$rootSshKeys.length != lOther$rootSshKeys.length) return false; - for (int i = 0; i < l$rootSshKeys.length; i++) { - final l$rootSshKeys$entry = l$rootSshKeys[i]; - final lOther$rootSshKeys$entry = lOther$rootSshKeys[i]; - if (l$rootSshKeys$entry != lOther$rootSshKeys$entry) return false; - } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) return false; @@ -886,11 +862,7 @@ abstract class CopyWith$Query$SystemSettings$system$settings$ssh { factory CopyWith$Query$SystemSettings$system$settings$ssh.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh; - TRes call( - {bool? enable, - bool? passwordAuthentication, - List? rootSshKeys, - String? $__typename}); + TRes call({bool? enable, bool? passwordAuthentication, String? $__typename}); } class _CopyWithImpl$Query$SystemSettings$system$settings$ssh @@ -907,7 +879,6 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$ssh TRes call( {Object? enable = _undefined, Object? passwordAuthentication = _undefined, - Object? rootSshKeys = _undefined, Object? $__typename = _undefined}) => _then(Query$SystemSettings$system$settings$ssh( enable: enable == _undefined || enable == null @@ -917,9 +888,6 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$ssh passwordAuthentication == null ? _instance.passwordAuthentication : (passwordAuthentication as bool), - rootSshKeys: rootSshKeys == _undefined || rootSshKeys == null - ? _instance.rootSshKeys - : (rootSshKeys as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); @@ -931,11 +899,7 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh TRes _res; - call( - {bool? enable, - bool? passwordAuthentication, - List? rootSshKeys, - String? $__typename}) => + call({bool? enable, bool? passwordAuthentication, String? $__typename}) => _res; } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart index d60ae006..fc66954b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart @@ -98,9 +98,6 @@ Query$SystemSettings$system$settings$ssh Query$SystemSettings$system$settings$ssh( enable: json['enable'] as bool, passwordAuthentication: json['passwordAuthentication'] as bool, - rootSshKeys: (json['rootSshKeys'] as List) - .map((e) => e as String) - .toList(), $__typename: json['__typename'] as String, ); @@ -109,7 +106,6 @@ Map _$Query$SystemSettings$system$settings$sshToJson( { 'enable': instance.enable, 'passwordAuthentication': instance.passwordAuthentication, - 'rootSshKeys': instance.rootSshKeys, '__typename': instance.$__typename, }; diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 3cb39d89..0e20fb02 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -7,11 +7,14 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphq import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; +import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/logic/models/ssh_settings.dart'; +import 'package:selfprivacy/logic/models/system_settings.dart'; part 'jobs_api.dart'; part 'server_actions_api.dart'; @@ -128,14 +131,13 @@ class ServerApi extends ApiMap } Future setAutoUpgradeSettings( - final bool allowReboot, - final bool enableAutoUpgrade, + final AutoUpgradeSettings settings, ) async { try { final GraphQLClient client = await getClient(); final input = Input$AutoUpgradeSettingsInput( - allowReboot: allowReboot, - enableAutoUpgrade: enableAutoUpgrade, + allowReboot: settings.allowReboot, + enableAutoUpgrade: settings.enable, ); final variables = Variables$Mutation$ChangeAutoUpgradeSettings( settings: input, @@ -148,4 +150,47 @@ class ServerApi extends ApiMap print(e); } } + + Future setTimezone(final String timezone) async { + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$ChangeTimezone( + timezone: timezone, + ); + final mutation = Options$Mutation$ChangeTimezone( + variables: variables, + ); + await client.mutate$ChangeTimezone(mutation); + } catch (e) { + print(e); + } + } + + Future getSystemSettings() async { + QueryResult response; + SystemSettings settings = SystemSettings( + autoUpgradeSettings: AutoUpgradeSettings( + allowReboot: false, + enable: false, + ), + sshSettings: SshSettings( + enable: false, + passwordAuthentication: false, + ), + timezone: 'Unknown', + ); + + try { + final GraphQLClient client = await getClient(); + response = await client.query$SystemSettings(); + if (response.hasException) { + print(response.exception.toString()); + } + settings = SystemSettings.fromGraphQL(response.parsedData!.system); + } catch (e) { + print(e); + } + + return settings; + } } diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 3660d499..f7e78eba 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -10,7 +10,6 @@ import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; -import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; @@ -565,43 +564,6 @@ class ServerApi extends ApiMap { return result; } - Future getAutoUpgradeSettings() async { - Response response; - AutoUpgradeSettings settings = const AutoUpgradeSettings( - enable: false, - allowReboot: false, - ); - - final Dio client = await getClient(); - try { - response = await client.get('/system/configuration/autoUpgrade'); - if (response.data != null) { - settings = AutoUpgradeSettings.fromJson(response.data); - } - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - return settings; - } - - Future updateAutoUpgradeSettings( - final AutoUpgradeSettings settings, - ) async { - final Dio client = await getClient(); - try { - await client.put( - '/system/configuration/autoUpgrade', - data: settings.toJson(), - ); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - } - Future getServerTimezone() async { TimeZoneSettings settings = TimeZoneSettings(); final Dio client = await getClient(); diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart index 613069b0..2290c0a5 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart @@ -2,7 +2,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_repository.dart'; -import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; +import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index 4cbe3e87..dada896b 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,6 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; -import 'package:selfprivacy/logic/models/json/auto_upgrade_settings.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; @@ -8,11 +8,30 @@ class ServerDetailsRepository { HetznerApi hetzner = HetznerApi(); ServerApi server = ServerApi(); - Future load() async => ServerDetailsRepositoryDto( - autoUpgradeSettings: await server.getAutoUpgradeSettings(), - hetznerServerInfo: await hetzner.getInfo(), - serverTimezone: await server.getServerTimezone(), - ); + Future load() async { + final settings = await server.getSystemSettings(); + return ServerDetailsRepositoryDto( + autoUpgradeSettings: settings.autoUpgradeSettings, + hetznerServerInfo: await hetzner.getInfo(), + serverTimezone: TimeZoneSettings.fromString( + settings.timezone, + ), + ); + } + + Future setAutoUpgradeSettings( + final AutoUpgradeSettings settings, + ) async { + await server.setAutoUpgradeSettings(settings); + } + + Future setTimezone( + final String timezone, + ) async { + if (timezone.isNotEmpty) { + await server.setTimezone(timezone); + } + } } class ServerDetailsRepositoryDto { diff --git a/lib/logic/models/auto_upgrade_settings.dart b/lib/logic/models/auto_upgrade_settings.dart new file mode 100644 index 00000000..19130422 --- /dev/null +++ b/lib/logic/models/auto_upgrade_settings.dart @@ -0,0 +1,18 @@ +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; + +class AutoUpgradeSettings { + AutoUpgradeSettings({ + required this.enable, + required this.allowReboot, + }); + + AutoUpgradeSettings.fromGraphQL( + final Query$SystemSettings$system$settings$autoUpgrade autoUpgrade, + ) : this( + enable: autoUpgrade.enable, + allowReboot: autoUpgrade.allowReboot, + ); + + final bool enable; + final bool allowReboot; +} diff --git a/lib/logic/models/json/auto_upgrade_settings.dart b/lib/logic/models/json/auto_upgrade_settings.dart deleted file mode 100644 index 421f9b88..00000000 --- a/lib/logic/models/json/auto_upgrade_settings.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:json_annotation/json_annotation.dart'; - -part 'auto_upgrade_settings.g.dart'; - -@JsonSerializable(createToJson: true) -class AutoUpgradeSettings extends Equatable { - factory AutoUpgradeSettings.fromJson(final Map json) => - _$AutoUpgradeSettingsFromJson(json); - - const AutoUpgradeSettings({ - required this.enable, - required this.allowReboot, - }); - final bool enable; - final bool allowReboot; - - @override - List get props => [enable, allowReboot]; - - Map toJson() => _$AutoUpgradeSettingsToJson(this); -} diff --git a/lib/logic/models/json/auto_upgrade_settings.g.dart b/lib/logic/models/json/auto_upgrade_settings.g.dart deleted file mode 100644 index e6accc2f..00000000 --- a/lib/logic/models/json/auto_upgrade_settings.g.dart +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'auto_upgrade_settings.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -AutoUpgradeSettings _$AutoUpgradeSettingsFromJson(Map json) => - AutoUpgradeSettings( - enable: json['enable'] as bool, - allowReboot: json['allowReboot'] as bool, - ); - -Map _$AutoUpgradeSettingsToJson( - AutoUpgradeSettings instance) => - { - 'enable': instance.enable, - 'allowReboot': instance.allowReboot, - }; diff --git a/lib/logic/models/ssh_settings.dart b/lib/logic/models/ssh_settings.dart new file mode 100644 index 00000000..008b07ee --- /dev/null +++ b/lib/logic/models/ssh_settings.dart @@ -0,0 +1,17 @@ +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; + +class SshSettings { + SshSettings({ + required this.enable, + required this.passwordAuthentication, + }); + + SshSettings.fromGraphQL(final Query$SystemSettings$system$settings$ssh ssh) + : this( + enable: ssh.enable, + passwordAuthentication: ssh.passwordAuthentication, + ); + + final bool enable; + final bool passwordAuthentication; +} diff --git a/lib/logic/models/system_settings.dart b/lib/logic/models/system_settings.dart new file mode 100644 index 00000000..88ef5c7a --- /dev/null +++ b/lib/logic/models/system_settings.dart @@ -0,0 +1,26 @@ +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; +import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; +import 'package:selfprivacy/logic/models/ssh_settings.dart'; + +class SystemSettings { + SystemSettings({ + required this.sshSettings, + required this.autoUpgradeSettings, + required this.timezone, + }); + + SystemSettings.fromGraphQL(final Query$SystemSettings$system system) + : this( + sshSettings: SshSettings.fromGraphQL( + system.settings.ssh, + ), + autoUpgradeSettings: AutoUpgradeSettings.fromGraphQL( + system.settings.autoUpgrade, + ), + timezone: system.settings.timezone, + ); + + final SshSettings sshSettings; + final AutoUpgradeSettings autoUpgradeSettings; + final String timezone; +} diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 38edcc63..00043692 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -7,6 +7,7 @@ import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index a5c98ff3..bf0325a8 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -1,12 +1,18 @@ part of 'server_details_screen.dart'; -class _ServerSettings extends StatelessWidget { - const _ServerSettings({ - required this.tabController, - }); +class _ServerSettings extends StatefulWidget { + const _ServerSettings({required this.tabController}); final TabController tabController; + @override + State<_ServerSettings> createState() => _ServerSettingsState(); +} + +class _ServerSettingsState extends State<_ServerSettings> { + bool? allowAutoUpgrade; + bool? rebootAfterUpgrade; + @override Widget build(final BuildContext context) { final serverDetailsState = context.watch().state; @@ -15,6 +21,11 @@ class _ServerSettings extends StatelessWidget { } else if (serverDetailsState is! Loaded) { return BrandLoader.horizontal(); } + if (allowAutoUpgrade == null || rebootAfterUpgrade == null) { + allowAutoUpgrade = serverDetailsState.autoUpgradeSettings.enable; + rebootAfterUpgrade = serverDetailsState.autoUpgradeSettings.allowReboot; + } + return ListView( padding: paddingH15V0, children: [ @@ -27,7 +38,7 @@ class _ServerSettings extends StatelessWidget { children: [ IconButton( icon: const Icon(BrandIcons.arrowLeft), - onPressed: () => tabController.animateTo(0), + onPressed: () => widget.tabController.animateTo(0), ), const SizedBox(width: 10), BrandText.h4('basis.settings'.tr()), @@ -35,8 +46,21 @@ class _ServerSettings extends StatelessWidget { ), ), SwitcherBlock( - onChange: (final _) {}, - isActive: serverDetailsState.autoUpgradeSettings.enable, + onChange: (final switched) { + context + .read() + .repository + .setAutoUpgradeSettings( + AutoUpgradeSettings( + enable: switched, + allowReboot: rebootAfterUpgrade ?? false, + ), + ); + setState(() { + allowAutoUpgrade = switched; + }); + }, + isActive: allowAutoUpgrade ?? false, child: _TextColumn( title: 'providers.server.settings.allow_autoupgrade'.tr(), value: 'providers.server.settings.allow_autoupgrade_hint'.tr(), @@ -44,8 +68,23 @@ class _ServerSettings extends StatelessWidget { ), const Divider(height: 0), SwitcherBlock( - onChange: (final _) {}, - isActive: serverDetailsState.autoUpgradeSettings.allowReboot, + onChange: (final switched) { + context + .read() + .repository + .setAutoUpgradeSettings( + AutoUpgradeSettings( + enable: allowAutoUpgrade ?? false, + allowReboot: switched, + ), + ); + setState( + () { + rebootAfterUpgrade = switched; + }, + ); + }, + isActive: rebootAfterUpgrade ?? false, child: _TextColumn( title: 'providers.server.settings.reboot_after_upgrade'.tr(), value: 'providers.server.settings.reboot_after_upgrade_hint'.tr(), @@ -54,7 +93,11 @@ class _ServerSettings extends StatelessWidget { const Divider(height: 0), _Button( onTap: () { - Navigator.of(context).push(materialRoute(const SelectTimezone())); + Navigator.of(context).push( + materialRoute( + const SelectTimezone(), + ), + ); }, child: _TextColumn( title: 'providers.server.settings.server_timezone'.tr(), @@ -89,12 +132,10 @@ class _TextColumn extends StatelessWidget { const _TextColumn({ required this.title, required this.value, - this.hasWarning = false, }); final String title; final String value; - final bool hasWarning; @override Widget build(final BuildContext context) => Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index 33799c35..fa652a58 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -47,10 +47,10 @@ class _SelectTimezoneState extends State { @override Widget build(final BuildContext context) => Scaffold( - appBar: const PreferredSize( - preferredSize: Size.fromHeight(52), + appBar: PreferredSize( + preferredSize: const Size.fromHeight(52), child: BrandHeader( - title: 'select timezone', + title: 'providers.server.settings.select_timezone'.tr(), hasBackButton: true, ), ), @@ -76,7 +76,7 @@ class _SelectTimezoneState extends State { return MapEntry( key, Container( - height: 60, + height: 75, padding: const EdgeInsets.symmetric(horizontal: 20), decoration: const BoxDecoration( border: Border( @@ -85,24 +85,38 @@ class _SelectTimezoneState extends State { ), ), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - BrandText.body1( - timezoneName, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - ), + child: InkWell( + onTap: () { + context + .read() + .repository + .setTimezone( + timezoneName, + ); + Navigator.of(context).pop(); + }, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + BrandText.body1( + timezoneName, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + BrandText.small( + 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', + style: const TextStyle( + fontSize: 13, + ), + ), + ], ), - BrandText.small( - 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', - style: const TextStyle( - fontSize: 13, - ), - ), - ], + ), ), ), ); From 8039283f3725d5e87466a5b69a9846e460b80cf1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 15 Sep 2022 16:05:23 +0300 Subject: [PATCH 071/732] Wrap get metrics endpoint with try-catch --- .../server_providers/hetzner/hetzner.dart | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 04ded55f..8340676d 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -466,19 +466,27 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ) async { final ServerHostingDetails? hetznerServer = getIt().serverDetails; - final Dio client = await getClient(); - final Map queryParameters = { - 'start': start.toUtc().toIso8601String(), - 'end': end.toUtc().toIso8601String(), - 'type': type - }; - final Response res = await client.get( - '/servers/${hetznerServer!.id}/metrics', - queryParameters: queryParameters, - ); - close(client); - return res.data; + Map metrics = {}; + final Dio client = await getClient(); + try { + final Map queryParameters = { + 'start': start.toUtc().toIso8601String(), + 'end': end.toUtc().toIso8601String(), + 'type': type + }; + final Response res = await client.get( + '/servers/${hetznerServer!.id}/metrics', + queryParameters: queryParameters, + ); + metrics = res.data; + } catch (e) { + print(e); + } finally { + close(client); + } + + return metrics; } Future getInfo() async { From 03c38f637f419bed0e53eb852421e93692ca049c Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 15 Sep 2022 18:40:02 +0300 Subject: [PATCH 072/732] Initial charts rework --- .../server_details/charts/bottom_title.dart | 29 +++ .../server_details/{ => charts}/chart.dart | 24 ++- .../server_details/charts/cpu_chart.dart | 175 ++++++++++++++++++ .../{ => charts}/network_charts.dart | 30 +-- lib/ui/pages/server_details/cpu_chart.dart | 135 -------------- .../server_details/server_details_screen.dart | 7 +- 6 files changed, 234 insertions(+), 166 deletions(-) create mode 100644 lib/ui/pages/server_details/charts/bottom_title.dart rename lib/ui/pages/server_details/{ => charts}/chart.dart (86%) create mode 100644 lib/ui/pages/server_details/charts/cpu_chart.dart rename lib/ui/pages/server_details/{ => charts}/network_charts.dart (89%) delete mode 100644 lib/ui/pages/server_details/cpu_chart.dart diff --git a/lib/ui/pages/server_details/charts/bottom_title.dart b/lib/ui/pages/server_details/charts/bottom_title.dart new file mode 100644 index 00000000..3db976ad --- /dev/null +++ b/lib/ui/pages/server_details/charts/bottom_title.dart @@ -0,0 +1,29 @@ +import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; +import 'package:intl/intl.dart'; + +String bottomTitle( + final int value, + final List data, + final Period period, +) { + final hhmm = DateFormat('HH:mm'); + final day = DateFormat('MMMd'); + String res; + + if (value <= 0) { + return ''; + } + + final time = data[value].time; + switch (period) { + case Period.hour: + case Period.day: + res = hhmm.format(time); + break; + case Period.month: + res = day.format(time); + } + + return res; +} diff --git a/lib/ui/pages/server_details/chart.dart b/lib/ui/pages/server_details/charts/chart.dart similarity index 86% rename from lib/ui/pages/server_details/chart.dart rename to lib/ui/pages/server_details/charts/chart.dart index f7972e9c..d5affc08 100644 --- a/lib/ui/pages/server_details/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -1,4 +1,4 @@ -part of 'server_details_screen.dart'; +part of '../server_details_screen.dart'; class _Chart extends StatelessWidget { @override @@ -17,9 +17,25 @@ class _Chart extends StatelessWidget { ]; } else if (state is HetznerMetricsLoaded) { charts = [ - const Legend(color: Colors.red, text: 'CPU %'), - const SizedBox(height: 20), - getCpuChart(state), + BrandCards.filled( + clipped: false, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'CPU Usage', + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + const SizedBox(height: 16), + getCpuChart(state), + ], + ), + ), + ), Row( mainAxisAlignment: MainAxisAlignment.end, children: [ diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart new file mode 100644 index 00000000..14e30dcc --- /dev/null +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -0,0 +1,175 @@ +import 'package:flutter/material.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; +import 'package:intl/intl.dart'; +import 'package:selfprivacy/ui/pages/server_details/charts/bottom_title.dart'; + +class CpuChart extends StatelessWidget { + const CpuChart({ + required this.data, + required this.period, + required this.start, + final super.key, + }); + + final List data; + final Period period; + final DateTime start; + + List getSpots() { + var i = 0; + final List res = []; + + for (final d in data) { + res.add(FlSpot(i.toDouble(), d.value)); + i++; + } + + return res; + } + + @override + Widget build(final BuildContext context) => LineChart( + LineChartData( + lineTouchData: LineTouchData( + enabled: true, + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Theme.of(context).colorScheme.surface, + tooltipPadding: const EdgeInsets.all(8), + getTooltipItems: (final List touchedBarSpots) { + final List res = []; + + for (final spot in touchedBarSpots) { + final value = spot.y; + final date = data[spot.x.toInt()].time; + + res.add( + LineTooltipItem( + '${value.toStringAsFixed(2)}% at ${DateFormat('HH:mm dd.MM.yyyy').format(date)}', + TextStyle( + color: Theme.of(context).colorScheme.onSurface, + fontWeight: FontWeight.bold, + ), + ), + ); + } + + return res; + }, + ), + ), + lineBarsData: [ + LineChartBarData( + spots: getSpots(), + isCurved: false, + barWidth: 2, + color: Theme.of(context).colorScheme.primary, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: true, + gradient: LinearGradient( + colors: [ + Theme.of(context).colorScheme.primary.withOpacity(0.5), + Theme.of(context).colorScheme.primary.withOpacity(0.0), + ], + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + ), + ), + ), + ], + minY: 0, + maxY: 100, + minX: data.length - 200, + titlesData: FlTitlesData( + topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), + bottomTitles: AxisTitles( + sideTitles: SideTitles( + interval: 40, + reservedSize: 30, + getTitlesWidget: (final value, final titleMeta) => Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + bottomTitle( + value.toInt(), + data, + period, + ), + style: Theme.of(context).textTheme.labelSmall?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + ), + showTitles: true, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: false, + ), + ), + rightTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: false, + ), + ), + ), + gridData: FlGridData( + show: true, + drawVerticalLine: true, + horizontalInterval: 25, + verticalInterval: 40, + getDrawingHorizontalLine: (final value) => FlLine( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + strokeWidth: 1, + ), + getDrawingVerticalLine: (final value) => FlLine( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + strokeWidth: 1, + ), + ), + borderData: FlBorderData( + show: true, + border: Border( + bottom: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + left: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + right: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + top: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + ), + ), + ), + ); + + bool checkToShowTitle( + final double minValue, + final double maxValue, + final SideTitles sideTitles, + final double appliedInterval, + final double value, + ) { + if (value < 0) { + return false; + } else if (value == 0) { + return true; + } + + final localValue = value - minValue; + final v = localValue / 20; + return v - v.floor() == 0; + } +} diff --git a/lib/ui/pages/server_details/network_charts.dart b/lib/ui/pages/server_details/charts/network_charts.dart similarity index 89% rename from lib/ui/pages/server_details/network_charts.dart rename to lib/ui/pages/server_details/charts/network_charts.dart index d1375ae6..75d866a1 100644 --- a/lib/ui/pages/server_details/network_charts.dart +++ b/lib/ui/pages/server_details/charts/network_charts.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; -import 'package:intl/intl.dart'; +import 'package:selfprivacy/ui/pages/server_details/charts/bottom_title.dart'; class NetworkChart extends StatelessWidget { const NetworkChart({ @@ -77,7 +77,11 @@ class NetworkChart extends StatelessWidget { child: RotatedBox( quarterTurns: 1, child: Text( - bottomTitle(value.toInt()), + bottomTitle( + value.toInt(), + listData[0], + period, + ), style: const TextStyle( fontSize: 10, color: Colors.purple, @@ -135,26 +139,4 @@ class NetworkChart extends StatelessWidget { final finalValue = diff / 20; return finalValue - finalValue.floor() == 0; } - - String bottomTitle(final int value) { - final hhmm = DateFormat('HH:mm'); - final day = DateFormat('MMMd'); - String res; - - if (value <= 0) { - return ''; - } - - final time = listData[0][value].time; - switch (period) { - case Period.hour: - case Period.day: - res = hhmm.format(time); - break; - case Period.month: - res = day.format(time); - } - - return res; - } } diff --git a/lib/ui/pages/server_details/cpu_chart.dart b/lib/ui/pages/server_details/cpu_chart.dart deleted file mode 100644 index 11f1eaef..00000000 --- a/lib/ui/pages/server_details/cpu_chart.dart +++ /dev/null @@ -1,135 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fl_chart/fl_chart.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/text_themes.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; -import 'package:intl/intl.dart'; - -class CpuChart extends StatelessWidget { - const CpuChart({ - required this.data, - required this.period, - required this.start, - final super.key, - }); - - final List data; - final Period period; - final DateTime start; - - List getSpots() { - var i = 0; - final List res = []; - - for (final d in data) { - res.add(FlSpot(i.toDouble(), d.value)); - i++; - } - - return res; - } - - @override - Widget build(final BuildContext context) => LineChart( - LineChartData( - lineTouchData: LineTouchData(enabled: false), - lineBarsData: [ - LineChartBarData( - spots: getSpots(), - isCurved: true, - barWidth: 1, - color: Colors.red, - dotData: FlDotData( - show: false, - ), - ), - ], - minY: 0, - maxY: 100, - minX: data.length - 200, - titlesData: FlTitlesData( - topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), - bottomTitles: AxisTitles( - sideTitles: SideTitles( - interval: 20, - reservedSize: 50, - getTitlesWidget: (final value, final titleMeta) => Padding( - padding: const EdgeInsets.all(8.0), - child: RotatedBox( - quarterTurns: 1, - child: Text( - bottomTitle(value.toInt()), - style: const TextStyle( - fontSize: 10, - color: Colors.purple, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - showTitles: true, - ), - ), - leftTitles: AxisTitles( - sideTitles: SideTitles( - getTitlesWidget: (final value, final titleMeta) => Padding( - padding: const EdgeInsets.only(right: 15), - child: Text( - value.toInt().toString(), - style: progressTextStyleLight.copyWith( - color: Theme.of(context).brightness == Brightness.dark - ? BrandColors.gray4 - : null, - ), - ), - ), - interval: 25, - showTitles: false, - ), - ), - ), - gridData: FlGridData(show: true), - ), - ); - - bool checkToShowTitle( - final double minValue, - final double maxValue, - final SideTitles sideTitles, - final double appliedInterval, - final double value, - ) { - if (value < 0) { - return false; - } else if (value == 0) { - return true; - } - - final localValue = value - minValue; - final v = localValue / 20; - return v - v.floor() == 0; - } - - String bottomTitle(final int value) { - final hhmm = DateFormat('HH:mm'); - final day = DateFormat('MMMd'); - String res; - - if (value <= 0) { - return ''; - } - - final time = data[value].time; - switch (period) { - case Period.hour: - case Period.day: - res = hhmm.format(time); - break; - case Period.month: - res = day.format(time); - } - - return res; - } -} diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 00043692..5c60b322 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -9,6 +9,7 @@ import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_inf import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; +import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; @@ -22,10 +23,10 @@ import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:timezone/timezone.dart'; -import 'package:selfprivacy/ui/pages/server_details/cpu_chart.dart'; -import 'package:selfprivacy/ui/pages/server_details/network_charts.dart'; +import 'package:selfprivacy/ui/pages/server_details/charts/cpu_chart.dart'; +import 'package:selfprivacy/ui/pages/server_details/charts/network_charts.dart'; -part 'chart.dart'; +part 'charts/chart.dart'; part 'header.dart'; part 'server_settings.dart'; part 'text_details.dart'; From bb0da1ac14a449cfc6dd91640356725848725d02 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 15 Sep 2022 19:55:28 +0300 Subject: [PATCH 073/732] Start the changelog for 0.7.0 --- fastlane/metadata/android/en-US/changelogs/0.7.0.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/0.7.0.txt diff --git a/fastlane/metadata/android/en-US/changelogs/0.7.0.txt b/fastlane/metadata/android/en-US/changelogs/0.7.0.txt new file mode 100644 index 00000000..60316c0b --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/0.7.0.txt @@ -0,0 +1,9 @@ +- Server storage management +- New screen for service management +- New users management screen +- User passwords can be changed +- Server auto upgrade settings can be changed now +- Server timezone can be changed +- Fixed bugs related to users list synchronization +- UI fixes +- Minor bug fixes From 0c31e7697cb6beb879e777570e61a108e51d896e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 15 Sep 2022 19:57:26 +0300 Subject: [PATCH 074/732] Refactor cards, move server details screen from modal to screen, move storage card to server screen. --- lib/config/bloc_config.dart | 1 - .../components/brand_cards/brand_cards.dart | 69 --------------- .../components/brand_cards/filled_card.dart | 34 ++++++++ .../components/brand_cards/outlined_card.dart | 22 +++++ .../pages/backup_details/backup_details.dart | 8 +- lib/ui/pages/dns_details/dns_details.dart | 8 +- .../pages/more/app_settings/app_setting.dart | 4 +- lib/ui/pages/more/more.dart | 4 +- lib/ui/pages/providers/providers.dart | 11 +-- lib/ui/pages/providers/storage_card.dart | 85 +++++++++--------- lib/ui/pages/recovery_key/recovery_key.dart | 4 +- lib/ui/pages/server_details/charts/chart.dart | 83 ++++++------------ lib/ui/pages/server_details/header.dart | 58 ------------- .../server_details/server_details_screen.dart | 87 +++++++------------ .../pages/server_details/server_settings.dart | 23 +---- lib/ui/pages/services/service_page.dart | 42 ++++----- .../recovering/recovery_confirm_server.dart | 4 +- .../recovering/recovery_method_select.dart | 12 +-- lib/ui/pages/users/user_details.dart | 4 +- lib/ui/pages/users/users.dart | 2 +- 20 files changed, 208 insertions(+), 357 deletions(-) create mode 100644 lib/ui/components/brand_cards/filled_card.dart create mode 100644 lib/ui/components/brand_cards/outlined_card.dart delete mode 100644 lib/ui/pages/server_details/header.dart diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index fb24a02b..fd00db2b 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; -import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; diff --git a/lib/ui/components/brand_cards/brand_cards.dart b/lib/ui/components/brand_cards/brand_cards.dart index c9196000..67e7f725 100644 --- a/lib/ui/components/brand_cards/brand_cards.dart +++ b/lib/ui/components/brand_cards/brand_cards.dart @@ -19,23 +19,6 @@ class BrandCards { borderRadius: BorderRadius.circular(10), child: child, ); - static Widget outlined({required final Widget child}) => _OutlinedCard( - child: child, - ); - static Widget filled({ - required final Widget child, - final bool tertiary = false, - final bool secondary = false, - final bool error = false, - final bool clipped = true, - }) => - _FilledCard( - tertiary: tertiary, - secondary: secondary, - error: error, - clipped: clipped, - child: child, - ); } class _BrandCard extends StatelessWidget { @@ -63,58 +46,6 @@ class _BrandCard extends StatelessWidget { ); } -class _OutlinedCard extends StatelessWidget { - const _OutlinedCard({ - required this.child, - }); - - final Widget child; - @override - Widget build(final BuildContext context) => Card( - elevation: 0.0, - shape: RoundedRectangleBorder( - borderRadius: const BorderRadius.all(Radius.circular(12)), - side: BorderSide( - color: Theme.of(context).colorScheme.outline, - ), - ), - clipBehavior: Clip.antiAlias, - child: child, - ); -} - -class _FilledCard extends StatelessWidget { - const _FilledCard({ - required this.child, - required this.secondary, - required this.tertiary, - required this.error, - required this.clipped, - }); - - final Widget child; - final bool tertiary; - final bool error; - final bool clipped; - final bool secondary; - @override - Widget build(final BuildContext context) => Card( - elevation: 0.0, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(12)), - ), - clipBehavior: clipped ? Clip.antiAlias : Clip.none, - color: error - ? Theme.of(context).colorScheme.errorContainer - : secondary - ? Theme.of(context).colorScheme.secondaryContainer - : tertiary - ? Theme.of(context).colorScheme.tertiaryContainer - : Theme.of(context).colorScheme.surfaceVariant, - child: child, - ); -} - final List bigShadow = [ BoxShadow( offset: const Offset(0, 4), diff --git a/lib/ui/components/brand_cards/filled_card.dart b/lib/ui/components/brand_cards/filled_card.dart new file mode 100644 index 00000000..3a706c8c --- /dev/null +++ b/lib/ui/components/brand_cards/filled_card.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +class FilledCard extends StatelessWidget { + const FilledCard({ + required this.child, + this.secondary = false, + this.tertiary = false, + this.error = false, + this.clipped = true, + final super.key, + }); + + final Widget child; + final bool tertiary; + final bool error; + final bool clipped; + final bool secondary; + @override + Widget build(final BuildContext context) => Card( + elevation: 0.0, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + ), + clipBehavior: clipped ? Clip.antiAlias : Clip.none, + color: error + ? Theme.of(context).colorScheme.errorContainer + : secondary + ? Theme.of(context).colorScheme.secondaryContainer + : tertiary + ? Theme.of(context).colorScheme.tertiaryContainer + : Theme.of(context).colorScheme.surfaceVariant, + child: child, + ); +} diff --git a/lib/ui/components/brand_cards/outlined_card.dart b/lib/ui/components/brand_cards/outlined_card.dart new file mode 100644 index 00000000..9da63902 --- /dev/null +++ b/lib/ui/components/brand_cards/outlined_card.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; + +class OutlinedCard extends StatelessWidget { + const OutlinedCard({ + required this.child, + final super.key, + }); + + final Widget child; + @override + Widget build(final BuildContext context) => Card( + elevation: 0.0, + shape: RoundedRectangleBorder( + borderRadius: const BorderRadius.all(Radius.circular(12)), + side: BorderSide( + color: Theme.of(context).colorScheme.outline, + ), + ), + clipBehavior: Clip.antiAlias, + child: child, + ); +} diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index c4a62284..aad55208 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -8,11 +8,11 @@ import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -63,7 +63,7 @@ class _BackupDetailsState extends State BrandText.body1('providers.backup.waitingForRebuild'.tr()), if (backupStatus != BackupStatusEnum.initializing && backupStatus != BackupStatusEnum.noKey) - BrandCards.outlined( + OutlinedCard( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -127,7 +127,7 @@ class _BackupDetailsState extends State // When clicked, starts the restore action if (backupStatus != BackupStatusEnum.initializing && backupStatus != BackupStatusEnum.noKey) - BrandCards.outlined( + OutlinedCard( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -195,7 +195,7 @@ class _BackupDetailsState extends State ), ), const SizedBox(height: 16), - BrandCards.outlined( + OutlinedCard( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index c59d26b6..91c7d007 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; @@ -61,7 +61,8 @@ class _DnsDetailsPageState extends State { isError = true; break; } - return BrandCards.filled( + return FilledCard( + error: isError, child: ListTile( onTap: dnsState == DnsRecordsStatus.error ? () => fixCallback() : null, leading: icon, @@ -74,7 +75,6 @@ class _DnsDetailsPageState extends State { ? Theme.of(context).colorScheme.error : Theme.of(context).colorScheme.onSurfaceVariant, ), - error: isError, ); } @@ -95,7 +95,7 @@ class _DnsDetailsPageState extends State { heroIcon: BrandIcons.globe, heroTitle: 'providers.domain.screen_title'.tr(), children: [ - BrandCards.outlined( + FilledCard( child: ListTile( title: Text( 'not_ready_card.in_menu'.tr(), diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart index 8c2cf506..47e2e1a8 100644 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ b/lib/ui/pages/more/app_settings/app_setting.dart @@ -116,7 +116,7 @@ class _AppSettingsPageState extends State { ), ), const Divider(height: 0), - _DeleteServer(context) + _deleteServer(context) ], ), ), @@ -124,7 +124,7 @@ class _AppSettingsPageState extends State { ); } - Widget _DeleteServer(final BuildContext context) { + Widget _deleteServer(final BuildContext context) { final bool isDisabled = context.watch().state.serverDetails == null; return Container( diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 3a3b1f5e..e2b78423 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.d import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; @@ -157,7 +157,7 @@ class _MoreMenuItem extends StatelessWidget { final Color color = accent ? Theme.of(context).colorScheme.onTertiaryContainer : Theme.of(context).colorScheme.onSurface; - return BrandCards.filled( + return FilledCard( tertiary: accent, child: ListTile( contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index a1e03a19..bd150de3 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -8,13 +8,11 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/provider.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; import 'package:selfprivacy/ui/pages/providers/storage_card.dart'; @@ -122,14 +120,7 @@ class _Card extends StatelessWidget { case ProviderType.server: title = 'providers.server.card_title'.tr(); stableText = 'providers.server.status'.tr(); - onTap = () => showBrandBottomSheet( - context: context, - builder: (final BuildContext context) => const BrandBottomSheet( - isExpended: true, - child: ServerDetailsScreen(), - ), - ); - + onTap = () => Navigator.of(context).push(materialRoute(const ServerDetailsScreen())); break; case ProviderType.domain: title = 'providers.domain.screen_title'.tr(); diff --git a/lib/ui/pages/providers/storage_card.dart b/lib/ui/pages/providers/storage_card.dart index f2facd21..69e245c6 100644 --- a/lib/ui/pages/providers/storage_card.dart +++ b/lib/ui/pages/providers/storage_card.dart @@ -2,7 +2,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; @@ -42,7 +41,9 @@ class StorageCard extends StatelessWidget { state = StateType.error; } - return GestureDetector( + return Card( + child: InkResponse( + highlightShape: BoxShape.rectangle, onTap: () => Navigator.of(context).push( materialRoute( ServerStoragePage( @@ -50,49 +51,49 @@ class StorageCard extends StatelessWidget { ), ), ), - child: BrandCards.big( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - IconStatusMask( - status: state, - child: const Icon( - Icons.storage_outlined, - size: 30, - color: Colors.white, + + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'providers.storage.card_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + if (state != StateType.uninitialized) + Text( + diskStatus.isDiskOkay + ? 'providers.storage.status_ok'.tr() + : 'providers.storage.status_error'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + ], ), - ), - if (state != StateType.uninitialized) - IconStatusMask( - status: state, - child: Icon( - diskStatus.isDiskOkay - ? Icons.check_circle_outline - : Icons.error_outline, - size: 24, - color: Colors.white, + if (state != StateType.uninitialized) + IconStatusMask( + status: state, + child: Icon( + diskStatus.isDiskOkay + ? Icons.check_circle_outline + : Icons.error_outline, + size: 24, + color: Colors.white, + ), ), - ), - ], - ), - const SizedBox(height: 16), - Text( - 'providers.storage.card_title'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - if (state != StateType.uninitialized) - Text( - diskStatus.isDiskOkay - ? 'providers.storage.status_ok'.tr() - : 'providers.storage.status_error'.tr(), - style: Theme.of(context).textTheme.bodyLarge, + ], ), - ...sections, - const SizedBox(height: 8), - ], + ...sections, + const SizedBox(height: 8), + ], + ), ), ), ); diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index ba3069ae..2254879d 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -112,7 +112,7 @@ class RecoveryKeyStatusCard extends StatelessWidget { final bool isValid; @override - Widget build(final BuildContext context) => BrandCards.filled( + Widget build(final BuildContext context) => FilledCard( child: ListTile( title: isValid ? Text( diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index d5affc08..4b23f90f 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -17,7 +17,7 @@ class _Chart extends StatelessWidget { ]; } else if (state is HetznerMetricsLoaded) { charts = [ - BrandCards.filled( + FilledCard( clipped: false, child: Padding( padding: const EdgeInsets.all(16.0), @@ -36,18 +36,6 @@ class _Chart extends StatelessWidget { ), ), ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - BrandText.small('Public Network interface packets per sec'), - const SizedBox(width: 10), - const Legend(color: Colors.red, text: 'IN'), - const SizedBox(width: 5), - const Legend(color: Colors.green, text: 'OUT'), - ], - ), - const SizedBox(height: 20), - getPpsChart(state), const SizedBox(height: 1), Row( mainAxisAlignment: MainAxisAlignment.end, @@ -66,36 +54,33 @@ class _Chart extends StatelessWidget { throw 'wrong state'; } - return Container( - padding: const EdgeInsets.symmetric(horizontal: 5), - child: Column( - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - BrandRadioTile( - isChecked: period == Period.month, - text: 'providers.server.chart.month'.tr(), - onPress: () => cubit.changePeriod(Period.month), - ), - BrandRadioTile( - isChecked: period == Period.day, - text: 'providers.server.chart.day'.tr(), - onPress: () => cubit.changePeriod(Period.day), - ), - BrandRadioTile( - isChecked: period == Period.hour, - text: 'providers.server.chart.hour'.tr(), - onPress: () => cubit.changePeriod(Period.hour), - ), - ], - ), + return Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BrandRadioTile( + isChecked: period == Period.month, + text: 'providers.server.chart.month'.tr(), + onPress: () => cubit.changePeriod(Period.month), + ), + BrandRadioTile( + isChecked: period == Period.day, + text: 'providers.server.chart.day'.tr(), + onPress: () => cubit.changePeriod(Period.day), + ), + BrandRadioTile( + isChecked: period == Period.hour, + text: 'providers.server.chart.hour'.tr(), + onPress: () => cubit.changePeriod(Period.hour), + ), + ], ), - ...charts, - ], - ), + ), + ...charts, + ], ); } @@ -112,20 +97,6 @@ class _Chart extends StatelessWidget { ); } - Widget getPpsChart(final HetznerMetricsLoaded state) { - final ppsIn = state.ppsIn; - final ppsOut = state.ppsOut; - - return SizedBox( - height: 200, - child: NetworkChart( - listData: [ppsIn, ppsOut], - period: state.period, - start: state.start, - ), - ); - } - Widget getBandwidthChart(final HetznerMetricsLoaded state) { final ppsIn = state.bandwidthIn; final ppsOut = state.bandwidthOut; diff --git a/lib/ui/pages/server_details/header.dart b/lib/ui/pages/server_details/header.dart deleted file mode 100644 index a10bc1cf..00000000 --- a/lib/ui/pages/server_details/header.dart +++ /dev/null @@ -1,58 +0,0 @@ -part of 'server_details_screen.dart'; - -class _Header extends StatelessWidget { - const _Header({ - required this.providerState, - required this.tabController, - }); - - final StateType providerState; - final TabController tabController; - - @override - Widget build(final BuildContext context) => Row( - children: [ - IconStatusMask( - status: providerState, - child: const Icon( - BrandIcons.server, - size: 40, - color: Colors.white, - ), - ), - const SizedBox(width: 10), - BrandText.h2('providers.server.card_title'.tr()), - const Spacer(), - Padding( - padding: const EdgeInsets.symmetric( - vertical: 4, - horizontal: 2, - ), - child: PopupMenuButton<_PopupMenuItemType>( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - onSelected: (final _PopupMenuItemType result) { - switch (result) { - case _PopupMenuItemType.setting: - tabController.animateTo(1); - break; - } - }, - icon: const Icon(Icons.more_vert), - itemBuilder: (final BuildContext context) => [ - PopupMenuItem<_PopupMenuItemType>( - value: _PopupMenuItemType.setting, - child: Container( - padding: const EdgeInsets.only(left: 5), - child: Text('basis.settings'.tr()), - ), - ), - ], - ), - ), - ], - ); -} - -enum _PopupMenuItemType { setting } diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 5c60b322..ffd48e7e 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -2,22 +2,24 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_radio_tile/brand_radio_tile.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; -import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/switch_block/switch_bloc.dart'; +import 'package:selfprivacy/ui/pages/providers/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/time_zone/lang.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -27,7 +29,6 @@ import 'package:selfprivacy/ui/pages/server_details/charts/cpu_chart.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/network_charts.dart'; part 'charts/chart.dart'; -part 'header.dart'; part 'server_settings.dart'; part 'text_details.dart'; part 'time_zone/time_zone.dart'; @@ -64,59 +65,37 @@ class _ServerDetailsScreenState extends State Widget build(final BuildContext context) { final bool isReady = context.watch().state is ServerInstallationFinished; - final providerState = isReady ? StateType.stable : StateType.uninitialized; + + if (!isReady) { + return BrandHeroScreen( + heroIcon: BrandIcons.server, + heroTitle: 'providers.server.card_title'.tr(), + heroSubtitle: 'not_ready_card.in_menu'.tr(), + children: const [], + ); + } return BlocProvider( create: (final context) => ServerDetailsCubit()..check(), - child: Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: Column( - children: [ - Container( - height: 51, - alignment: Alignment.center, - padding: const EdgeInsets.symmetric(horizontal: 15), - child: BrandText.h4('basis.details'.tr()), - ), - ], - ), - ), - body: TabBarView( - physics: const NeverScrollableScrollPhysics(), - controller: tabController, - children: [ - SingleChildScrollView( - physics: const ClampingScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: paddingH15V0, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _Header( - providerState: providerState, - tabController: tabController, - ), - BrandText.body1('providers.server.bottom_sheet.1'.tr()), - ], - ), - ), - const SizedBox(height: 10), - BlocProvider( - create: (final context) => HetznerMetricsCubit()..restart(), - child: _Chart(), - ), - const SizedBox(height: 20), - _TextDetails(), - ], - ), + child: BrandHeroScreen( + heroIcon: BrandIcons.server, + heroTitle: 'providers.server.card_title'.tr(), + heroSubtitle: 'providers.server.bottom_sheet.1'.tr(), + children: [ + StorageCard( + diskStatus: DiskStatus.fromVolumes( + context.read().state.volumes, + context.read().state.volumes, ), - _ServerSettings(tabController: tabController), - ], - ), + ), + BlocProvider( + create: (final context) => HetznerMetricsCubit()..restart(), + child: _Chart(), + ), + const SizedBox(height: 20), + _TextDetails(), + const _ServerSettings(), + ], ), ); } diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index bf0325a8..62269496 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -1,9 +1,7 @@ part of 'server_details_screen.dart'; class _ServerSettings extends StatefulWidget { - const _ServerSettings({required this.tabController}); - - final TabController tabController; + const _ServerSettings(); @override State<_ServerSettings> createState() => _ServerSettingsState(); @@ -26,25 +24,8 @@ class _ServerSettingsState extends State<_ServerSettings> { rebootAfterUpgrade = serverDetailsState.autoUpgradeSettings.allowReboot; } - return ListView( - padding: paddingH15V0, + return Column( children: [ - const SizedBox(height: 10), - Container( - height: 52, - alignment: Alignment.centerLeft, - padding: const EdgeInsets.only(left: 1), - child: Row( - children: [ - IconButton( - icon: const Icon(BrandIcons.arrowLeft), - onPressed: () => widget.tabController.animateTo(0), - ), - const SizedBox(width: 10), - BrandText.h4('basis.settings'.tr()), - ], - ), - ), SwitcherBlock( onChange: (final switched) { context diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 7dfa5a18..2bdf8f72 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -156,8 +156,8 @@ class ServiceStatusCard extends StatelessWidget { Widget build(final BuildContext context) { switch (status) { case ServiceStatus.active: - return BrandCards.filled( - child: const ListTile( + return const FilledCard( + child: ListTile( leading: Icon( Icons.check_circle_outline, size: 24, @@ -166,70 +166,70 @@ class ServiceStatusCard extends StatelessWidget { ), ); case ServiceStatus.inactive: - return BrandCards.filled( - child: const ListTile( + return const FilledCard( + tertiary: true, + child: ListTile( leading: Icon( Icons.stop_circle_outlined, size: 24, ), title: Text('Stopped'), ), - tertiary: true, ); case ServiceStatus.failed: - return BrandCards.filled( - child: const ListTile( + return const FilledCard( + error: true, + child: ListTile( leading: Icon( Icons.error_outline, size: 24, ), title: Text('Failed to start'), ), - error: true, ); case ServiceStatus.off: - return BrandCards.filled( - child: const ListTile( + return const FilledCard( + tertiary: true, + child: ListTile( leading: Icon( Icons.power_settings_new, size: 24, ), title: Text('Disabled'), ), - tertiary: true, ); case ServiceStatus.activating: - return BrandCards.filled( - child: const ListTile( + return const FilledCard( + tertiary: true, + child: ListTile( leading: Icon( Icons.restart_alt_outlined, size: 24, ), title: Text('Activating'), ), - tertiary: true, ); case ServiceStatus.deactivating: - return BrandCards.filled( - child: const ListTile( + return const FilledCard( + tertiary: true, + child: ListTile( leading: Icon( Icons.restart_alt_outlined, size: 24, ), title: Text('Deactivating'), ), - tertiary: true, ); case ServiceStatus.reloading: - return BrandCards.filled( - child: const ListTile( + return const FilledCard( + tertiary: true, + child: ListTile( leading: Icon( Icons.restart_alt_outlined, size: 24, ), title: Text('Restarting'), ), - tertiary: true, ); } } diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 063bd890..d8510650 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -4,7 +4,7 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class RecoveryConfirmServer extends StatefulWidget { @@ -135,7 +135,7 @@ class _RecoveryConfirmServerState extends State { required final ServerBasicInfoWithValidators server, final VoidCallback? onTap, }) => - BrandCards.filled( + FilledCard( child: ListTile( contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index fe622acb..d34b896d 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -20,7 +20,7 @@ class RecoveryMethodSelect extends StatelessWidget { onBackButtonPressed: context.read().revertRecoveryStep, children: [ - BrandCards.outlined( + OutlinedCard( child: ListTile( title: Text( 'recovering.method_select_other_device'.tr(), @@ -33,7 +33,7 @@ class RecoveryMethodSelect extends StatelessWidget { ), ), const SizedBox(height: 16), - BrandCards.outlined( + OutlinedCard( child: ListTile( title: Text( 'recovering.method_select_recovery_key'.tr(), @@ -75,7 +75,7 @@ class RecoveryFallbackMethodSelect extends StatelessWidget { hasBackButton: true, hasFlashButton: false, children: [ - BrandCards.outlined( + OutlinedCard( child: ListTile( title: Text( 'recovering.fallback_select_token_copy'.tr(), @@ -92,7 +92,7 @@ class RecoveryFallbackMethodSelect extends StatelessWidget { ), ), const SizedBox(height: 16), - BrandCards.outlined( + OutlinedCard( child: ListTile( title: Text( 'recovering.fallback_select_root_ssh'.tr(), @@ -109,7 +109,7 @@ class RecoveryFallbackMethodSelect extends StatelessWidget { ), ), const SizedBox(height: 16), - BrandCards.outlined( + OutlinedCard( child: ListTile( title: Text( 'recovering.fallback_select_provider_console'.tr(), diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index f6efb0df..2ec6baee 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -130,7 +130,7 @@ class _UserLogins extends StatelessWidget { final String domainName; @override - Widget build(final BuildContext context) => BrandCards.filled( + Widget build(final BuildContext context) => FilledCard( child: Column( children: [ ListTile( @@ -153,7 +153,7 @@ class _SshKeysCard extends StatelessWidget { final User user; @override - Widget build(final BuildContext context) => BrandCards.filled( + Widget build(final BuildContext context) => FilledCard( child: Column( children: [ ListTile( diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 886be330..6b8709fd 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -14,7 +14,7 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; From 6619e42cfa11eca89090704a3bc6a6e57055b687 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 00:08:14 +0300 Subject: [PATCH 075/732] New providers page cards --- lib/ui/pages/providers/providers.dart | 222 ++++++++++-------- .../server_details/server_details_screen.dart | 2 +- .../storage_card.dart | 11 +- 3 files changed, 124 insertions(+), 111 deletions(-) rename lib/ui/pages/{providers => server_storage}/storage_card.dart (95%) diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index bd150de3..6aa06287 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -3,19 +3,18 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; -import 'package:selfprivacy/logic/models/provider.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; +import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; -import 'package:selfprivacy/ui/pages/providers/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -39,6 +38,25 @@ class _ProvidersPageState extends State { final DnsRecordsStatus dnsStatus = context.watch().state.dnsState; + final List serverVolumes = + context.watch().state.volumes; + final List providerVolumes = + context.watch().state.volumes; + final diskStatus = DiskStatus.fromVolumes(serverVolumes, providerVolumes); + + final ServerInstallationState appConfig = + context.watch().state; + + StateType getServerStatus() { + if (!isReady) { + return StateType.uninitialized; + } + if (!diskStatus.isDiskOkay) { + return StateType.warning; + } + return StateType.stable; + } + StateType getDnsStatus() { if (dnsStatus == DnsRecordsStatus.uninitialized || dnsStatus == DnsRecordsStatus.refreshing) { @@ -50,36 +68,6 @@ class _ProvidersPageState extends State { return StateType.stable; } - final List cards = ProviderType.values - .map( - (final ProviderType type) => Padding( - padding: const EdgeInsets.only(bottom: 30), - child: _Card( - provider: ProviderModel( - state: isReady - ? (type == ProviderType.backup && !isBackupInitialized - ? StateType.uninitialized - : (type == ProviderType.domain) - ? getDnsStatus() - : StateType.stable) - : StateType.uninitialized, - type: type, - ), - ), - ), - ) - .toList(); - cards.add( - Padding( - padding: const EdgeInsets.only(bottom: 30), - child: StorageCard( - diskStatus: DiskStatus.fromVolumes( - context.read().state.volumes, - context.read().state.volumes, - ), - ), - ), - ); return Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(52), @@ -94,7 +82,45 @@ class _ProvidersPageState extends State { const NotReadyCard(), const SizedBox(height: 24), ], - ...cards, + _Card( + state: getServerStatus(), + icon: BrandIcons.server, + title: 'providers.server.card_title'.tr(), + subtitle: diskStatus.isDiskOkay + ? 'providers.storage.status_ok'.tr() + : 'providers.storage.status_error'.tr(), + onTap: () => Navigator.of(context) + .push(materialRoute(const ServerDetailsScreen())), + ), + const SizedBox(height: 16), + _Card( + state: getDnsStatus(), + icon: BrandIcons.globe, + title: 'providers.domain.screen_title'.tr(), + subtitle: appConfig.isDomainSelected + ? appConfig.serverDomain!.domainName + : '', + onTap: () => Navigator.of(context).push( + materialRoute( + const DnsDetailsPage(), + ), + ), + ), + const SizedBox(height: 16), + // TODO: When backups are fixed, show this card + if (isBackupInitialized) + _Card( + state: isBackupInitialized + ? StateType.stable + : StateType.uninitialized, + icon: BrandIcons.save, + title: 'providers.backup.card_title'.tr(), + subtitle: isBackupInitialized + ? 'providers.backup.card_subtitle'.tr() + : '', + onTap: () => Navigator.of(context) + .push(materialRoute(const BackupDetails())), + ), ], ), ); @@ -102,76 +128,64 @@ class _ProvidersPageState extends State { } class _Card extends StatelessWidget { - const _Card({required this.provider}); + const _Card({ + required final this.state, + required final this.icon, + required final this.title, + required final this.subtitle, + final this.onTap, + }); + + final Function()? onTap; + final StateType state; + final IconData icon; + final String title; + final String subtitle; - final ProviderModel provider; @override - Widget build(final BuildContext context) { - late String title; - String? message; - late String stableText; - late VoidCallback onTap; - final bool isReady = context.watch().state - is ServerInstallationFinished; - final ServerInstallationState appConfig = - context.watch().state; - - switch (provider.type) { - case ProviderType.server: - title = 'providers.server.card_title'.tr(); - stableText = 'providers.server.status'.tr(); - onTap = () => Navigator.of(context).push(materialRoute(const ServerDetailsScreen())); - break; - case ProviderType.domain: - title = 'providers.domain.screen_title'.tr(); - message = appConfig.isDomainSelected - ? appConfig.serverDomain!.domainName - : ''; - stableText = 'providers.domain.status'.tr(); - - onTap = () => Navigator.of(context).push( - materialRoute( - const DnsDetailsPage(), - ), - ); - break; - case ProviderType.backup: - title = 'providers.backup.card_title'.tr(); - stableText = 'providers.backup.status'.tr(); - - onTap = () => Navigator.of(context).push( - materialRoute( - const BackupDetails(), - ), - ); - break; - } - return GestureDetector( - onTap: isReady ? onTap : null, - child: BrandCards.big( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - IconStatusMask( - status: provider.state, - child: Icon(provider.icon, size: 30, color: Colors.white), + Widget build(final BuildContext context) => Card( + child: InkResponse( + highlightShape: BoxShape.rectangle, + onTap: onTap, + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconStatusMask( + status: state, + child: Icon(icon, size: 30, color: Colors.white), + ), + if (state != StateType.uninitialized) + IconStatusMask( + status: state, + child: Icon( + state == StateType.stable + ? Icons.check_circle_outline + : state == StateType.warning + ? Icons.warning_amber_outlined + : Icons.error_outline, + color: Colors.white, + ), + ), + ], + ), + const SizedBox(height: 8), + Text( + title, + style: Theme.of(context).textTheme.titleLarge, + ), + if (state != StateType.uninitialized) + Text( + subtitle, + style: Theme.of(context).textTheme.bodyLarge, + ), + ], ), - const SizedBox(height: 16), - Text( - title, - style: Theme.of(context).textTheme.titleLarge, - ), - if (message != null) ...[ - Text( - message, - style: Theme.of(context).textTheme.titleLarge, - ), - const SizedBox(height: 16), - ], - if (provider.state == StateType.stable) BrandText.body2(stableText), - ], + ), ), - ), - ); - } + ); } diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index ffd48e7e..ac7b13bb 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -17,7 +17,7 @@ import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_radio_tile/brand_radio_tile.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/switch_block/switch_bloc.dart'; -import 'package:selfprivacy/ui/pages/providers/storage_card.dart'; +import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/time_zone/lang.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; diff --git a/lib/ui/pages/providers/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart similarity index 95% rename from lib/ui/pages/providers/storage_card.dart rename to lib/ui/pages/server_storage/storage_card.dart index 69e245c6..c7c2e4ab 100644 --- a/lib/ui/pages/providers/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -44,14 +44,13 @@ class StorageCard extends StatelessWidget { return Card( child: InkResponse( highlightShape: BoxShape.rectangle, - onTap: () => Navigator.of(context).push( - materialRoute( - ServerStoragePage( - diskStatus: diskStatus, + onTap: () => Navigator.of(context).push( + materialRoute( + ServerStoragePage( + diskStatus: diskStatus, + ), ), ), - ), - child: Padding( padding: const EdgeInsets.all(16.0), child: Column( From 71a18695e450c730e93ad292c31ccb555559f4ec Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 00:08:32 +0300 Subject: [PATCH 076/732] Formatting fixes --- .../components/brand_cards/filled_card.dart | 28 ++++++++-------- .../components/brand_cards/outlined_card.dart | 20 ++++++------ lib/ui/components/info_box/info_box.dart | 32 +++++++++---------- .../pages/backup_details/backup_details.dart | 1 - lib/ui/pages/devices/devices.dart | 4 ++- .../recovery_key/recovery_key_receiving.dart | 4 ++- .../pages/server_storage/data_migration.dart | 20 ++++++++---- lib/ui/pages/server_storage/disk_status.dart | 19 +++++------ 8 files changed, 70 insertions(+), 58 deletions(-) diff --git a/lib/ui/components/brand_cards/filled_card.dart b/lib/ui/components/brand_cards/filled_card.dart index 3a706c8c..02d46604 100644 --- a/lib/ui/components/brand_cards/filled_card.dart +++ b/lib/ui/components/brand_cards/filled_card.dart @@ -17,18 +17,18 @@ class FilledCard extends StatelessWidget { final bool secondary; @override Widget build(final BuildContext context) => Card( - elevation: 0.0, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(12)), - ), - clipBehavior: clipped ? Clip.antiAlias : Clip.none, - color: error - ? Theme.of(context).colorScheme.errorContainer - : secondary - ? Theme.of(context).colorScheme.secondaryContainer - : tertiary - ? Theme.of(context).colorScheme.tertiaryContainer - : Theme.of(context).colorScheme.surfaceVariant, - child: child, - ); + elevation: 0.0, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + ), + clipBehavior: clipped ? Clip.antiAlias : Clip.none, + color: error + ? Theme.of(context).colorScheme.errorContainer + : secondary + ? Theme.of(context).colorScheme.secondaryContainer + : tertiary + ? Theme.of(context).colorScheme.tertiaryContainer + : Theme.of(context).colorScheme.surfaceVariant, + child: child, + ); } diff --git a/lib/ui/components/brand_cards/outlined_card.dart b/lib/ui/components/brand_cards/outlined_card.dart index 9da63902..dc959dc2 100644 --- a/lib/ui/components/brand_cards/outlined_card.dart +++ b/lib/ui/components/brand_cards/outlined_card.dart @@ -9,14 +9,14 @@ class OutlinedCard extends StatelessWidget { final Widget child; @override Widget build(final BuildContext context) => Card( - elevation: 0.0, - shape: RoundedRectangleBorder( - borderRadius: const BorderRadius.all(Radius.circular(12)), - side: BorderSide( - color: Theme.of(context).colorScheme.outline, - ), - ), - clipBehavior: Clip.antiAlias, - child: child, - ); + elevation: 0.0, + shape: RoundedRectangleBorder( + borderRadius: const BorderRadius.all(Radius.circular(12)), + side: BorderSide( + color: Theme.of(context).colorScheme.outline, + ), + ), + clipBehavior: Clip.antiAlias, + child: child, + ); } diff --git a/lib/ui/components/info_box/info_box.dart b/lib/ui/components/info_box/info_box.dart index 5a4129c2..816053e3 100644 --- a/lib/ui/components/info_box/info_box.dart +++ b/lib/ui/components/info_box/info_box.dart @@ -12,20 +12,20 @@ class InfoBox extends StatelessWidget { @override Widget build(final BuildContext context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Icon( - isWarning ? Icons.warning_amber_outlined : Icons.info_outline, - size: 24, - color: Theme.of(context).colorScheme.onBackground, - ), - const SizedBox(height: 16), - Text( - text, - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - ], - ); + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + isWarning ? Icons.warning_amber_outlined : Icons.info_outline, + size: 24, + color: Theme.of(context).colorScheme.onBackground, + ), + const SizedBox(height: 16), + Text( + text, + style: Theme.of(context).textTheme.bodyMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + ], + ); } diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index aad55208..b3635d3f 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -13,7 +13,6 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; - GlobalKey navigatorKey = GlobalKey(); class BackupDetails extends StatefulWidget { diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index e89535ab..bc608339 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -52,7 +52,9 @@ class _DevicesScreenState extends State { const SizedBox(height: 16), const Divider(height: 1), const SizedBox(height: 16), - InfoBox(text: 'devices.main_screen.tip'.tr(),), + InfoBox( + text: 'devices.main_screen.tip'.tr(), + ), ], const SizedBox(height: 24), ], diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index 521cf723..60169e5a 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -29,7 +29,9 @@ class RecoveryKeyReceiving extends StatelessWidget { const SizedBox(height: 16), const Divider(), const SizedBox(height: 16), - InfoBox(text: 'recovery_key.key_receiving_info'.tr(),), + InfoBox( + text: 'recovery_key.key_receiving_info'.tr(), + ), const SizedBox(height: 16), FilledButton( title: 'recovery_key.key_receiving_done'.tr(), diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index 05948840..6a3756a9 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -51,17 +51,20 @@ class _DataMigrationPageState extends State { /// Check the services and if a service is moved (in a serviceToDisk entry) /// subtract the used storage from the old volume and add it to the new volume. /// The old volume is the volume the service is currently on, shown in services list. - DiskVolume recalculatedDiskUsages(final DiskVolume volume, final List services) { + DiskVolume recalculatedDiskUsages( + final DiskVolume volume, final List services) { DiskSize used = volume.sizeUsed; for (final Service service in services) { if (service.storageUsage.volume != null) { if (service.storageUsage.volume == volume.name) { - if (serviceToDisk[service.id] != null && serviceToDisk[service.id] != volume.name) { + if (serviceToDisk[service.id] != null && + serviceToDisk[service.id] != volume.name) { used -= service.storageUsage.used; } } else { - if (serviceToDisk[service.id] != null && serviceToDisk[service.id] == volume.name) { + if (serviceToDisk[service.id] != null && + serviceToDisk[service.id] == volume.name) { used += service.storageUsage.used; } } @@ -101,7 +104,8 @@ class _DataMigrationPageState extends State { (final volume) => Column( children: [ ServerStorageListItem( - volume: recalculatedDiskUsages(volume, widget.services), + volume: recalculatedDiskUsages( + volume, widget.services), dense: true, ), const SizedBox(height: headerVerticalPadding), @@ -119,7 +123,8 @@ class _DataMigrationPageState extends State { body: ListView( padding: const EdgeInsets.all(16.0), children: [ - if (widget.services.isEmpty) const Center(child: CircularProgressIndicator()), + if (widget.services.isEmpty) + const Center(child: CircularProgressIndicator()), ...widget.services .map( (final service) => Column( @@ -139,7 +144,10 @@ class _DataMigrationPageState extends State { .toList(), Padding( padding: const EdgeInsets.all(8.0), - child: InfoBox(text: 'providers.storage.data_migration_notice'.tr(), isWarning: true,), + child: InfoBox( + text: 'providers.storage.data_migration_notice'.tr(), + isWarning: true, + ), ), const SizedBox(height: 16), FilledButton( diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index a4f921e9..2a37ad77 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -68,15 +68,16 @@ class DiskVolume { final bool? isResizable, final ServerDiskVolume? serverDiskVolume, final ServerVolume? providerVolume, - }) => DiskVolume( - sizeUsed: sizeUsed ?? this.sizeUsed, - sizeTotal: sizeTotal ?? this.sizeTotal, - name: name ?? this.name, - root: root ?? this.root, - isResizable: isResizable ?? this.isResizable, - serverDiskVolume: serverDiskVolume ?? this.serverDiskVolume, - providerVolume: providerVolume ?? this.providerVolume, - ); + }) => + DiskVolume( + sizeUsed: sizeUsed ?? this.sizeUsed, + sizeTotal: sizeTotal ?? this.sizeTotal, + name: name ?? this.name, + root: root ?? this.root, + isResizable: isResizable ?? this.isResizable, + serverDiskVolume: serverDiskVolume ?? this.serverDiskVolume, + providerVolume: providerVolume ?? this.providerVolume, + ); } class DiskStatus { From 469fbde6c49b2632355780b08017bcd211430cc6 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 00:59:37 +0300 Subject: [PATCH 077/732] Replace brand_radio_tile.dart with segmented_buttons.dart --- .../brand_button/segmented_buttons.dart | 52 +++++++++++++++++++ .../brand_radio_tile/brand_radio_tile.dart | 37 ------------- lib/ui/pages/server_details/charts/chart.dart | 46 ++++++++-------- .../server_details/server_details_screen.dart | 2 +- .../pages/server_storage/data_migration.dart | 8 ++- 5 files changed, 83 insertions(+), 62 deletions(-) create mode 100644 lib/ui/components/brand_button/segmented_buttons.dart delete mode 100644 lib/ui/components/brand_radio_tile/brand_radio_tile.dart diff --git a/lib/ui/components/brand_button/segmented_buttons.dart b/lib/ui/components/brand_button/segmented_buttons.dart new file mode 100644 index 00000000..444aa906 --- /dev/null +++ b/lib/ui/components/brand_button/segmented_buttons.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; + +class SegmentedButtons extends StatelessWidget { + const SegmentedButtons({ + required this.isSelected, + required this.onPressed, + required this.titles, + final super.key, + }); + + final List isSelected; + final Function(int)? onPressed; + final List titles; + + @override + Widget build(final BuildContext context) => LayoutBuilder( + builder: (final context, final constraints) => ToggleButtons( + constraints: BoxConstraints( + minWidth: (constraints.maxWidth - 8) / 3, + minHeight: 40, + ), + borderRadius: BorderRadius.circular(48), + borderColor: Theme.of(context).colorScheme.outline, + selectedBorderColor: Theme.of(context).colorScheme.outline, + fillColor: Theme.of(context).colorScheme.secondaryContainer, + selectedColor: Theme.of(context).colorScheme.onSecondaryContainer, + color: Theme.of(context).colorScheme.onSurface, + isSelected: isSelected, + onPressed: onPressed, + children: titles.asMap().entries.map((final entry) { + final index = entry.key; + final title = entry.value; + return Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + if (isSelected[index]) + Icon( + Icons.check, + size: 18, + color: Theme.of(context).colorScheme.onSecondaryContainer, + ), + if (isSelected[index]) const SizedBox(width: 8), + Text( + title, + style: Theme.of(context).textTheme.labelLarge, + ), + ], + ); + }).toList(), + ), + ); +} diff --git a/lib/ui/components/brand_radio_tile/brand_radio_tile.dart b/lib/ui/components/brand_radio_tile/brand_radio_tile.dart deleted file mode 100644 index 3226c97b..00000000 --- a/lib/ui/components/brand_radio_tile/brand_radio_tile.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_radio/brand_radio.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; - -// TODO: Delete this file - -class BrandRadioTile extends StatelessWidget { - const BrandRadioTile({ - required this.isChecked, - required this.text, - required this.onPress, - final super.key, - }); - - final bool isChecked; - - final String text; - final VoidCallback onPress; - - @override - Widget build(final BuildContext context) => GestureDetector( - onTap: onPress, - behavior: HitTestBehavior.translucent, - child: Padding( - padding: const EdgeInsets.all(2), - child: Row( - children: [ - BrandRadio( - isChecked: isChecked, - ), - const SizedBox(width: 9), - BrandText.h5(text) - ], - ), - ), - ); -} diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index 4b23f90f..0ff2dd40 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -56,28 +56,30 @@ class _Chart extends StatelessWidget { return Column( children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - BrandRadioTile( - isChecked: period == Period.month, - text: 'providers.server.chart.month'.tr(), - onPress: () => cubit.changePeriod(Period.month), - ), - BrandRadioTile( - isChecked: period == Period.day, - text: 'providers.server.chart.day'.tr(), - onPress: () => cubit.changePeriod(Period.day), - ), - BrandRadioTile( - isChecked: period == Period.hour, - text: 'providers.server.chart.hour'.tr(), - onPress: () => cubit.changePeriod(Period.hour), - ), - ], - ), + SegmentedButtons( + isSelected: [ + period == Period.month, + period == Period.day, + period == Period.hour, + ], + onPressed: (final index) { + switch (index) { + case 0: + cubit.changePeriod(Period.month); + break; + case 1: + cubit.changePeriod(Period.day); + break; + case 2: + cubit.changePeriod(Period.hour); + break; + } + }, + titles: [ + 'providers.server.chart.month'.tr(), + 'providers.server.chart.day'.tr(), + 'providers.server.chart.hour'.tr() + ], ), ...charts, ], diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index ac7b13bb..0457c80f 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -9,12 +9,12 @@ import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_inf import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; +import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; -import 'package:selfprivacy/ui/components/brand_radio_tile/brand_radio_tile.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/switch_block/switch_bloc.dart'; import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index 6a3756a9..67eca453 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -52,7 +52,9 @@ class _DataMigrationPageState extends State { /// subtract the used storage from the old volume and add it to the new volume. /// The old volume is the volume the service is currently on, shown in services list. DiskVolume recalculatedDiskUsages( - final DiskVolume volume, final List services) { + final DiskVolume volume, + final List services, + ) { DiskSize used = volume.sizeUsed; for (final Service service in services) { @@ -105,7 +107,9 @@ class _DataMigrationPageState extends State { children: [ ServerStorageListItem( volume: recalculatedDiskUsages( - volume, widget.services), + volume, + widget.services, + ), dense: true, ), const SizedBox(height: headerVerticalPadding), From 6e9bde827aa924cef983db7773bdbeca0979c3f9 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 01:01:41 +0300 Subject: [PATCH 078/732] Fix clipping on Cards with InkResponse --- lib/ui/pages/providers/providers.dart | 1 + lib/ui/pages/server_storage/storage_card.dart | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 6aa06287..6cc1495d 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -144,6 +144,7 @@ class _Card extends StatelessWidget { @override Widget build(final BuildContext context) => Card( + clipBehavior: Clip.antiAlias, child: InkResponse( highlightShape: BoxShape.rectangle, onTap: onTap, diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index c7c2e4ab..210eec48 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -42,6 +42,7 @@ class StorageCard extends StatelessWidget { } return Card( + clipBehavior: Clip.antiAlias, child: InkResponse( highlightShape: BoxShape.rectangle, onTap: () => Navigator.of(context).push( From 3079b4bcc5f7565c277a23bc55e6f65e6364c9c7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 01:28:10 +0300 Subject: [PATCH 079/732] Add animations to segmented_buttons.dart --- .../brand_button/segmented_buttons.dart | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/lib/ui/components/brand_button/segmented_buttons.dart b/lib/ui/components/brand_button/segmented_buttons.dart index 444aa906..8ddccb5b 100644 --- a/lib/ui/components/brand_button/segmented_buttons.dart +++ b/lib/ui/components/brand_button/segmented_buttons.dart @@ -30,19 +30,34 @@ class SegmentedButtons extends StatelessWidget { children: titles.asMap().entries.map((final entry) { final index = entry.key; final title = entry.value; - return Row( - crossAxisAlignment: CrossAxisAlignment.center, + return Stack( + alignment: Alignment.centerLeft, children: [ - if (isSelected[index]) - Icon( - Icons.check, - size: 18, - color: Theme.of(context).colorScheme.onSecondaryContainer, + AnimatedOpacity( + duration: const Duration(milliseconds: 200), + opacity: isSelected[index] ? 1 : 0, + child: AnimatedScale( + duration: const Duration(milliseconds: 200), + curve: Curves.easeInOut, + alignment: Alignment.centerLeft, + scale: isSelected[index] ? 1 : 0, + child: Icon( + Icons.check, + size: 18, + color: Theme.of(context).colorScheme.onSecondaryContainer, + ), + ), + ), + AnimatedPadding( + padding: isSelected[index] + ? const EdgeInsets.only(left: 24) + : EdgeInsets.zero, + duration: const Duration(milliseconds: 200), + curve: Curves.easeInOut, + child: Text( + title, + style: Theme.of(context).textTheme.labelLarge, ), - if (isSelected[index]) const SizedBox(width: 8), - Text( - title, - style: Theme.of(context).textTheme.labelLarge, ), ], ); From 36cbc8e89bfd9cc080980bb14fd81efc901ef122 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 10:50:05 +0300 Subject: [PATCH 080/732] Catch StateError on server_detailed_info_cubit.dart --- .../server_detailed_info_cubit.dart | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart index 2290c0a5..5f75497b 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart @@ -15,19 +15,23 @@ class ServerDetailsCubit extends Cubit { void check() async { final bool isReadyToCheck = getIt().serverDetails != null; - if (isReadyToCheck) { - emit(ServerDetailsLoading()); - final ServerDetailsRepositoryDto data = await repository.load(); - emit( - Loaded( - serverInfo: data.hetznerServerInfo, - autoUpgradeSettings: data.autoUpgradeSettings, - serverTimezone: data.serverTimezone, - checkTime: DateTime.now(), - ), - ); - } else { - emit(ServerDetailsNotReady()); + try { + if (isReadyToCheck) { + emit(ServerDetailsLoading()); + final ServerDetailsRepositoryDto data = await repository.load(); + emit( + Loaded( + serverInfo: data.hetznerServerInfo, + autoUpgradeSettings: data.autoUpgradeSettings, + serverTimezone: data.serverTimezone, + checkTime: DateTime.now(), + ), + ); + } else { + emit(ServerDetailsNotReady()); + } + } on StateError { + print('Tried to emit server info state when cubit is closed'); } } } From a7248a9b3046b94fc71815b1678118fc8d391d7f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 10:50:21 +0300 Subject: [PATCH 081/732] Remove unnecessary logging --- .../server_installation_cubit.dart | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 4575fa4b..9cb68359 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -608,24 +608,6 @@ class ServerInstallationCubit extends Cubit { @override void onChange(final Change change) { super.onChange(change); - print('================================'); - print('ServerInstallationState changed!'); - print('Current type: ${change.nextState.runtimeType}'); - print('Hetzner key: ${change.nextState.providerApiToken}'); - print('Cloudflare key: ${change.nextState.cloudFlareKey}'); - print('Domain: ${change.nextState.serverDomain}'); - print('BackblazeCredential: ${change.nextState.backblazeCredential}'); - if (change.nextState is ServerInstallationRecovery) { - print( - 'Recovery Step: ${(change.nextState as ServerInstallationRecovery).currentStep}', - ); - print( - 'Recovery Capabilities: ${(change.nextState as ServerInstallationRecovery).recoveryCapabilities}', - ); - } - if (change.nextState is TimerState) { - print('Timer: ${(change.nextState as TimerState).duration}'); - } } void clearAppConfig() { From e3d7f2b3d7b14dceb3242c4a0982e73198e83876 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 16 Sep 2022 11:06:27 +0300 Subject: [PATCH 082/732] Fix ServerDetailsCubit exception --- lib/config/bloc_config.dart | 4 +++ .../server_detailed_info_cubit.dart | 34 ++++++++++++++++--- .../server_detailed_info_state.dart | 2 +- .../server_details/server_details_screen.dart | 2 +- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index fd00db2b..1e9d5c12 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -32,6 +32,7 @@ class BlocAndProviderConfig extends StatelessWidget { final apiVolumesCubit = ApiProviderVolumeCubit(serverInstallationCubit); final apiServerVolumesCubit = ApiServerVolumeCubit(serverInstallationCubit); final serverJobsCubit = ServerJobsCubit(serverInstallationCubit); + final serverDetailsCubit = ServerDetailsCubit(serverInstallationCubit); return MultiProvider( providers: [ @@ -78,6 +79,9 @@ class BlocAndProviderConfig extends StatelessWidget { BlocProvider( create: (final _) => serverJobsCubit..load(), ), + BlocProvider( + create: (final _) => serverDetailsCubit..load(), + ), BlocProvider( create: (final _) => JobsCubit( usersCubit: usersCubit, diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart index 5f75497b..537524c7 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart @@ -1,6 +1,5 @@ -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_repository.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; @@ -8,8 +7,10 @@ import 'package:selfprivacy/logic/models/timezone_settings.dart'; part 'server_detailed_info_state.dart'; -class ServerDetailsCubit extends Cubit { - ServerDetailsCubit() : super(ServerDetailsInitial()); +class ServerDetailsCubit + extends ServerInstallationDependendCubit { + ServerDetailsCubit(final ServerInstallationCubit serverInstallationCubit) + : super(serverInstallationCubit, ServerDetailsInitial()); ServerDetailsRepository repository = ServerDetailsRepository(); @@ -34,4 +35,29 @@ class ServerDetailsCubit extends Cubit { print('Tried to emit server info state when cubit is closed'); } } + + Future setTimezone( + final String timezone, + ) async { + final ServerDetailsRepositoryDto data = await repository.load(); + await repository.setTimezone(timezone); + emit( + Loaded( + serverInfo: data.hetznerServerInfo, + autoUpgradeSettings: data.autoUpgradeSettings, + serverTimezone: TimeZoneSettings.fromString(timezone), + checkTime: DateTime.now(), + ), + ); + } + + @override + void clear() { + emit(ServerDetailsNotReady()); + } + + @override + void load() async { + check(); + } } diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart index ef226c1e..ea5f4864 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart @@ -1,6 +1,6 @@ part of 'server_detailed_info_cubit.dart'; -abstract class ServerDetailsState extends Equatable { +abstract class ServerDetailsState extends ServerInstallationDependendState { const ServerDetailsState(); @override diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 0457c80f..16f87be8 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -76,7 +76,7 @@ class _ServerDetailsScreenState extends State } return BlocProvider( - create: (final context) => ServerDetailsCubit()..check(), + create: (final context) => context.read()..check(), child: BrandHeroScreen( heroIcon: BrandIcons.server, heroTitle: 'providers.server.card_title'.tr(), From d75c2837ca060905a60d23b6f0bd99f537647154 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 11:07:37 +0300 Subject: [PATCH 083/732] Catch error on metrics loading from Hetzner --- lib/logic/common_enum/common_enum.dart | 17 ++++++++++++++++- .../hetzner_metrics/hetzner_metrics_cubit.dart | 16 ++++++++++------ .../hetzner_metrics_repository.dart | 9 +++++++++ 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/lib/logic/common_enum/common_enum.dart b/lib/logic/common_enum/common_enum.dart index 93334069..77c2fa82 100644 --- a/lib/logic/common_enum/common_enum.dart +++ b/lib/logic/common_enum/common_enum.dart @@ -20,7 +20,22 @@ enum InitializingSteps { checkSystemDnsAndDkimSet, } -enum Period { hour, day, month } +enum Period { + hour, + day, + month; + + int get stepPeriodInSeconds { + switch (this) { + case Period.hour: + return 18; + case Period.day: + return 432; + case Period.month: + return 6480; + } + } +} enum ServiceTypes { mailserver, diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart index cb398dcd..1cfdc23a 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart @@ -39,16 +39,20 @@ class HetznerMetricsCubit extends Cubit { } void load(final Period period) async { - final HetznerMetricsLoaded newState = await repository.getMetrics(period); - timer = Timer( - Duration(seconds: newState.stepInSeconds.toInt()), - () => load(newState.period), - ); - try { + final HetznerMetricsLoaded newState = await repository.getMetrics(period); + timer = Timer( + Duration(seconds: newState.stepInSeconds.toInt()), + () => load(newState.period), + ); emit(newState); } on StateError { print('Tried to emit Hetzner metrics when cubit is closed'); + } on MetricsLoadException { + timer = Timer( + Duration(seconds: state.period.stepPeriodInSeconds), + () => load(state.period), + ); } } } diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart index dc0805c7..134c955e 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart @@ -4,6 +4,11 @@ import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart'; +class MetricsLoadException implements Exception { + MetricsLoadException(this.message); + final String message; +} + class HetznerMetricsRepository { Future getMetrics(final Period period) async { final DateTime end = DateTime.now(); @@ -31,6 +36,10 @@ class HetznerMetricsRepository { final cpuMetricsData = results[0]['metrics']; final networkMetricsData = results[1]['metrics']; + if (cpuMetricsData == null || networkMetricsData == null) { + throw MetricsLoadException('Metrics data is null'); + } + return HetznerMetricsLoaded( period: period, start: start, From 4a4fa35de3cec2370ec5e1f855152201630bc52d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 16 Sep 2022 11:11:03 +0300 Subject: [PATCH 084/732] Remove setTimezone from ServerDetailedInfo cubit --- lib/config/bloc_config.dart | 1 + .../server_detailed_info_cubit.dart | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index 1e9d5c12..a6cf7202 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart index 537524c7..a3af96e8 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart @@ -36,21 +36,6 @@ class ServerDetailsCubit } } - Future setTimezone( - final String timezone, - ) async { - final ServerDetailsRepositoryDto data = await repository.load(); - await repository.setTimezone(timezone); - emit( - Loaded( - serverInfo: data.hetznerServerInfo, - autoUpgradeSettings: data.autoUpgradeSettings, - serverTimezone: TimeZoneSettings.fromString(timezone), - checkTime: DateTime.now(), - ), - ); - } - @override void clear() { emit(ServerDetailsNotReady()); From 11e58981b5339c88cbbb395bd3cccdd58fa4443a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 16 Sep 2022 12:08:31 +0300 Subject: [PATCH 085/732] Implement migration process page --- assets/translations/en.json | 4 +- assets/translations/ru.json | 4 +- .../graphql_maps/server_api/volume_api.dart | 19 ++++++ .../migration_process_page.dart | 67 +++++++++++++++++++ 4 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 lib/ui/pages/server_storage/migration_process_page.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index a51f0da9..d83fcd17 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -189,7 +189,9 @@ "euro": "Euro", "data_migration_title": "Data migration", "data_migration_notice": "During migration all services will be turned off.", - "start_migration_button": "Start migration" + "start_migration_button": "Start migration", + "migration_process": "Migrating...", + "migration_done": "Finish" } }, "not_ready_card": { diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 906e9471..aa755a7c 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -189,7 +189,9 @@ "euro": "Евро", "data_migration_title": "Миграция данных", "data_migration_notice": "На время миграции данных все сервисы будут выключены.", - "start_migration_button": "Начать миграцию" + "start_migration_button": "Начать миграцию", + "migration_process": "Мигрируем...", + "migration_done": "Завершить" } }, "not_ready_card": { diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index ada66d58..06d6e5bc 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -56,4 +56,23 @@ mixin VolumeApi on ApiMap { print(e); } } + + Future migrateToBinds(final Map serviceToDisk) async { + try { + final GraphQLClient client = await getClient(); + final input = Input$MigrateToBindsInput( + bitwardenBlockDevice: serviceToDisk['bitwarden']!, + emailBlockDevice: serviceToDisk['mailserver']!, + giteaBlockDevice: serviceToDisk['gitea']!, + nextcloudBlockDevice: serviceToDisk['nextcloud']!, + pleromaBlockDevice: serviceToDisk['pleroma']!, + ); + final variables = Variables$Mutation$MigrateToBinds(input: input); + final migrateMutation = + Options$Mutation$MigrateToBinds(variables: variables); + await client.mutate$MigrateToBinds(migrateMutation); + } catch (e) { + print(e); + } + } } diff --git a/lib/ui/pages/server_storage/migration_process_page.dart b/lib/ui/pages/server_storage/migration_process_page.dart new file mode 100644 index 00000000..12dd8fea --- /dev/null +++ b/lib/ui/pages/server_storage/migration_process_page.dart @@ -0,0 +1,67 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; +import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; + +class MigrationProcessPage extends StatefulWidget { + const MigrationProcessPage({ + required this.jobUid, + final super.key, + }); + + final String jobUid; + + @override + State createState() => _MigrationProcessPageState(); +} + +class _MigrationProcessPageState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(final BuildContext context) { + final serverJobsState = context.watch().state; + final ServerJob job = serverJobsState.serverJobList.firstWhere( + (final ServerJob job) => job.uid == widget.jobUid, + ); + final double value = job.progress == null ? 0.0 : job.progress! / 100; + return BrandHeroScreen( + hasBackButton: false, + heroTitle: 'providers.storage.migration_process'.tr(), + heroSubtitle: job.statusText, + children: [ + BrandLinearIndicator( + value: value, + color: Theme.of(context).colorScheme.primary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 14.0, + ), + const SizedBox(height: 16), + if (job.finishedAt != null) + Text( + job.result!, + style: Theme.of(context).textTheme.titleMedium, + ), + if (job.finishedAt != null) const SizedBox(height: 16), + if (job.finishedAt != null) + FilledButton( + title: 'providers.storage.migration_done'.tr(), + onPressed: () { + Navigator.of(context).pushAndRemoveUntil( + materialRoute(const RootPage()), + (final predicate) => false, + ); + }, + ) + ], + ); + } +} From 5ca58a0cd32ef8ad2db0637e8f5946f0a7acbd86 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 12:44:15 +0300 Subject: [PATCH 086/732] Refactor network chart --- assets/translations/en.json | 6 +- assets/translations/ru.json | 6 +- lib/config/bloc_observer.dart | 13 +- lib/ui/pages/server_details/charts/chart.dart | 57 ++-- .../server_details/charts/network_charts.dart | 245 ++++++++++++------ 5 files changed, 218 insertions(+), 109 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index d83fcd17..253d39e1 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -100,7 +100,11 @@ "chart": { "month": "Month", "day": "Day", - "hour": "Hour" + "hour": "Hour", + "cpu_title": "CPU Usage", + "network_title": "Network Usage", + "in": "In", + "out": "Out" }, "settings": { "allow_autoupgrade": "Allow auto-upgrade", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index aa755a7c..df68f75f 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -100,7 +100,11 @@ "chart": { "month": "Месяц", "day": "День", - "hour": "Час" + "hour": "Час", + "cpu_title": "Использование процессора", + "network_title": "Использование сети", + "in": "Получено", + "out": "Отправлено" }, "settings": { "allow_autoupgrade": "Разрешить авто-обноления", diff --git a/lib/config/bloc_observer.dart b/lib/config/bloc_observer.dart index e68923c9..3f2f26d8 100644 --- a/lib/config/bloc_observer.dart +++ b/lib/config/bloc_observer.dart @@ -1,7 +1,4 @@ -import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:selfprivacy/ui/components/error/error.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/config/get_it_config.dart'; @@ -14,15 +11,9 @@ class SimpleBlocObserver extends BlocObserver { final Object error, final StackTrace stackTrace, ) { - final NavigatorState navigator = getIt.get().navigator!; - navigator.push( - materialRoute( - BrandError( - error: error, - stackTrace: stackTrace, - ), - ), + getIt().showSnackBar( + 'Bloc error: ${error.toString()}', ); super.onError(bloc, error, stackTrace); } diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index 0ff2dd40..12528767 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -25,7 +25,7 @@ class _Chart extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'CPU Usage', + 'providers.server.chart.cpu_title'.tr(), style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Theme.of(context).colorScheme.onSurfaceVariant, ), @@ -36,19 +36,40 @@ class _Chart extends StatelessWidget { ), ), ), - const SizedBox(height: 1), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - BrandText.small('Public Network interface bytes per sec'), - const SizedBox(width: 10), - const Legend(color: Colors.red, text: 'IN'), - const SizedBox(width: 5), - const Legend(color: Colors.green, text: 'OUT'), - ], + const SizedBox(height: 8), + FilledCard( + clipped: false, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'providers.server.chart.network_title'.tr(), + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: + Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + const Spacer(), + Legend( + color: Theme.of(context).colorScheme.primary, + text: 'providers.server.chart.in'.tr()), + const SizedBox(width: 5), + Legend( + color: Theme.of(context).colorScheme.tertiary, + text: 'providers.server.chart.out'.tr()), + ], + ), + const SizedBox(height: 20), + getBandwidthChart(state), + ], + ), + ), ), - const SizedBox(height: 20), - getBandwidthChart(state), ]; } else { throw 'wrong state'; @@ -81,6 +102,7 @@ class _Chart extends StatelessWidget { 'providers.server.chart.hour'.tr() ], ), + const SizedBox(height: 8), ...charts, ], ); @@ -129,7 +151,10 @@ class Legend extends StatelessWidget { children: [ _ColoredBox(color: color), const SizedBox(width: 5), - BrandText.small(text), + Text( + text, + style: Theme.of(context).textTheme.labelSmall, + ), ], ); } @@ -146,9 +171,11 @@ class _ColoredBox extends StatelessWidget { width: 10, height: 10, decoration: BoxDecoration( - color: color.withOpacity(0.3), + borderRadius: BorderRadius.circular(5), + color: color.withOpacity(0.4), border: Border.all( color: color, + width: 1.5, ), ), ); diff --git a/lib/ui/pages/server_details/charts/network_charts.dart b/lib/ui/pages/server_details/charts/network_charts.dart index 75d866a1..7487fd32 100644 --- a/lib/ui/pages/server_details/charts/network_charts.dart +++ b/lib/ui/pages/server_details/charts/network_charts.dart @@ -1,10 +1,10 @@ import 'dart:math'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:fl_chart/fl_chart.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/bottom_title.dart'; @@ -33,91 +33,174 @@ class NetworkChart extends StatelessWidget { } @override - Widget build(final BuildContext context) => SizedBox( - height: 150, - width: MediaQuery.of(context).size.width, - child: LineChart( - LineChartData( - lineTouchData: LineTouchData(enabled: false), - lineBarsData: [ - LineChartBarData( - spots: getSpots(listData[0]), - isCurved: true, - barWidth: 1, - color: Colors.red, - dotData: FlDotData( - show: false, - ), - ), - LineChartBarData( - spots: getSpots(listData[1]), - isCurved: true, - barWidth: 1, - color: Colors.green, - dotData: FlDotData( - show: false, - ), - ), - ], - minY: 0, - maxY: [ - ...listData[0].map((final e) => e.value), - ...listData[1].map((final e) => e.value) - ].reduce(max) * - 1.2, - minX: listData[0].length - 200, - titlesData: FlTitlesData( - topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), - bottomTitles: AxisTitles( - sideTitles: SideTitles( - interval: 20, - reservedSize: 50, - getTitlesWidget: (final value, final titleMeta) => Padding( - padding: const EdgeInsets.all(8.0), - child: RotatedBox( - quarterTurns: 1, - child: Text( - bottomTitle( - value.toInt(), - listData[0], - period, - ), - style: const TextStyle( - fontSize: 10, - color: Colors.purple, - fontWeight: FontWeight.bold, - ), + Widget build(final BuildContext context) => LineChart( + LineChartData( + lineTouchData: LineTouchData( + enabled: true, + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Theme.of(context).colorScheme.surface, + tooltipPadding: const EdgeInsets.all(8), + getTooltipItems: (final List touchedBarSpots) { + final List res = []; + + bool timeShown = false; + + for (final spot in touchedBarSpots) { + final value = spot.y; + final date = listData[0][spot.x.toInt()].time; + + res.add( + LineTooltipItem( + '${timeShown ? '' : DateFormat('HH:mm dd.MM.yyyy').format(date)} ${spot.barIndex == 0 ? 'providers.server.chart.in'.tr() : 'providers.server.chart.out'.tr()} ${DiskSize(byte: value.toInt()).toString()}', + TextStyle( + color: Theme.of(context).colorScheme.onSurface, + fontWeight: FontWeight.bold, ), ), - ), - showTitles: true, - ), + ); + + timeShown = true; + } + + return res; + }, + ), + ), + lineBarsData: [ + // IN + LineChartBarData( + spots: getSpots(listData[0]), + isCurved: false, + barWidth: 2, + color: Theme.of(context).colorScheme.primary, + dotData: FlDotData( + show: false, ), - leftTitles: AxisTitles( - sideTitles: SideTitles( - reservedSize: 50, - getTitlesWidget: (final value, final titleMeta) => Padding( - padding: const EdgeInsets.only(right: 5), - child: Text( - value.toInt().toString(), - style: progressTextStyleLight.copyWith( - color: Theme.of(context).brightness == Brightness.dark - ? BrandColors.gray4 - : null, - ), - ), - ), - interval: [ - ...listData[0].map((final e) => e.value), - ...listData[1].map((final e) => e.value) - ].reduce(max) * - 2 / - 10, - showTitles: false, + belowBarData: BarAreaData( + show: true, + gradient: LinearGradient( + colors: [ + Theme.of(context).colorScheme.primary.withOpacity(0.5), + Theme.of(context).colorScheme.primary.withOpacity(0.0), + ], + begin: Alignment.bottomCenter, + end: Alignment.topCenter, ), ), ), - gridData: FlGridData(show: true), + // OUT + LineChartBarData( + spots: getSpots(listData[1]), + isCurved: false, + barWidth: 2, + color: Theme.of(context).colorScheme.tertiary, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: true, + gradient: LinearGradient( + colors: [ + Theme.of(context).colorScheme.tertiary.withOpacity(0.5), + Theme.of(context).colorScheme.tertiary.withOpacity(0.0), + ], + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + ), + ), + ), + ], + minY: 0, + maxY: [ + ...listData[0].map((final e) => e.value), + ...listData[1].map((final e) => e.value) + ].reduce(max) * + 1.2, + minX: listData[0].length - 200, + titlesData: FlTitlesData( + topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), + bottomTitles: AxisTitles( + sideTitles: SideTitles( + interval: 40, + reservedSize: 30, + getTitlesWidget: (final value, final titleMeta) => Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + bottomTitle( + value.toInt(), + listData[0], + period, + ), + style: Theme.of(context).textTheme.labelSmall?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + ), + showTitles: true, + ), + ), + leftTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), + rightTitles: AxisTitles( + sideTitles: SideTitles( + reservedSize: 50, + getTitlesWidget: (final value, final titleMeta) => Padding( + padding: const EdgeInsets.only(left: 5), + child: Text( + DiskSize(byte: value.toInt()).toString(), + style: Theme.of(context).textTheme.labelSmall?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + ), + interval: [ + ...listData[0].map((final e) => e.value), + ...listData[1].map((final e) => e.value) + ].reduce(max) * + 2 / + 6.5, + showTitles: true, + ), + ), + ), + gridData: FlGridData( + show: true, + drawVerticalLine: true, + verticalInterval: 40, + horizontalInterval: [ + ...listData[0].map((final e) => e.value), + ...listData[1].map((final e) => e.value) + ].reduce(max) * + 2 / + 6.5, + getDrawingHorizontalLine: (final value) => FlLine( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + strokeWidth: 1, + ), + getDrawingVerticalLine: (final value) => FlLine( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + strokeWidth: 1, + ), + ), + borderData: FlBorderData( + show: true, + border: Border( + bottom: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + left: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + right: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + top: BorderSide( + color: Theme.of(context).colorScheme.outline.withOpacity(0.3), + width: 1, + ), + ), ), ), ); From c8581e65aa70de9751f000312877095fe06e41de Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 12:54:18 +0300 Subject: [PATCH 087/732] Add adaptive density --- lib/theming/factory/app_theme_factory.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/theming/factory/app_theme_factory.dart b/lib/theming/factory/app_theme_factory.dart index 48f4b086..c44be7a3 100644 --- a/lib/theming/factory/app_theme_factory.dart +++ b/lib/theming/factory/app_theme_factory.dart @@ -60,6 +60,7 @@ abstract class AppThemeFactory { final Typography appTypography = Typography.material2021(); final ThemeData materialThemeData = ThemeData( + visualDensity: VisualDensity.adaptivePlatformDensity, colorScheme: colorScheme, brightness: colorScheme.brightness, typography: appTypography, From 41efde80b2f7f9cae63d2f606ac87ef651a0e41c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 13:07:26 +0300 Subject: [PATCH 088/732] Make SegmentedButtons responsive to visual density --- lib/ui/components/brand_button/segmented_buttons.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/components/brand_button/segmented_buttons.dart b/lib/ui/components/brand_button/segmented_buttons.dart index 8ddccb5b..e3ce50cd 100644 --- a/lib/ui/components/brand_button/segmented_buttons.dart +++ b/lib/ui/components/brand_button/segmented_buttons.dart @@ -17,7 +17,7 @@ class SegmentedButtons extends StatelessWidget { builder: (final context, final constraints) => ToggleButtons( constraints: BoxConstraints( minWidth: (constraints.maxWidth - 8) / 3, - minHeight: 40, + minHeight: 40 + Theme.of(context).visualDensity.vertical * 4, ), borderRadius: BorderRadius.circular(48), borderColor: Theme.of(context).colorScheme.outline, From 61d049118fb5eb27b80d302dba535fc43ca8d094 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 13:36:26 +0300 Subject: [PATCH 089/732] Add animation for graph loading --- assets/translations/en.json | 1 + lib/config/bloc_observer.dart | 1 - lib/ui/pages/server_details/charts/chart.dart | 54 +++++++++++++------ .../server_details/server_details_screen.dart | 8 ++- 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 253d39e1..c4d319dc 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -106,6 +106,7 @@ "in": "In", "out": "Out" }, + "resource_usage": "Resource usage", "settings": { "allow_autoupgrade": "Allow auto-upgrade", "allow_autoupgrade_hint": "Allow automatic packages upgrades on server", diff --git a/lib/config/bloc_observer.dart b/lib/config/bloc_observer.dart index 3f2f26d8..d8bf846a 100644 --- a/lib/config/bloc_observer.dart +++ b/lib/config/bloc_observer.dart @@ -11,7 +11,6 @@ class SimpleBlocObserver extends BlocObserver { final Object error, final StackTrace stackTrace, ) { - getIt().showSnackBar( 'Bloc error: ${error.toString()}', ); diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index 12528767..60dfc092 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -7,15 +7,7 @@ class _Chart extends StatelessWidget { final Period period = cubit.state.period; final HetznerMetricsState state = cubit.state; List charts; - if (state is HetznerMetricsLoading) { - charts = [ - Container( - height: 200, - alignment: Alignment.center, - child: Text('basis.loading'.tr()), - ) - ]; - } else if (state is HetznerMetricsLoaded) { + if (state is HetznerMetricsLoaded || state is HetznerMetricsLoading) { charts = [ FilledCard( clipped: false, @@ -31,7 +23,17 @@ class _Chart extends StatelessWidget { ), ), const SizedBox(height: 16), - getCpuChart(state), + Stack( + alignment: Alignment.center, + children: [ + if (state is HetznerMetricsLoaded) getCpuChart(state), + AnimatedOpacity( + duration: const Duration(milliseconds: 200), + opacity: state is HetznerMetricsLoading ? 1 : 0, + child: const _GraphLoadingCardContent(), + ), + ], + ), ], ), ), @@ -56,16 +58,28 @@ class _Chart extends StatelessWidget { ), const Spacer(), Legend( - color: Theme.of(context).colorScheme.primary, - text: 'providers.server.chart.in'.tr()), + color: Theme.of(context).colorScheme.primary, + text: 'providers.server.chart.in'.tr(), + ), const SizedBox(width: 5), Legend( - color: Theme.of(context).colorScheme.tertiary, - text: 'providers.server.chart.out'.tr()), + color: Theme.of(context).colorScheme.tertiary, + text: 'providers.server.chart.out'.tr(), + ), ], ), const SizedBox(height: 20), - getBandwidthChart(state), + Stack( + alignment: Alignment.center, + children: [ + if (state is HetznerMetricsLoaded) getBandwidthChart(state), + AnimatedOpacity( + duration: const Duration(milliseconds: 200), + opacity: state is HetznerMetricsLoading ? 1 : 0, + child: const _GraphLoadingCardContent(), + ), + ], + ), ], ), ), @@ -136,6 +150,16 @@ class _Chart extends StatelessWidget { } } +class _GraphLoadingCardContent extends StatelessWidget { + const _GraphLoadingCardContent(); + + @override + Widget build(final BuildContext context) => const SizedBox( + height: 200, + child: Center(child: CircularProgressIndicator()), + ); +} + class Legend extends StatelessWidget { const Legend({ required this.color, diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 16f87be8..5b839ef1 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -88,11 +88,17 @@ class _ServerDetailsScreenState extends State context.read().state.volumes, ), ), + const Divider(height: 32), + Text( + 'providers.server.resource_usage'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 8), BlocProvider( create: (final context) => HetznerMetricsCubit()..restart(), child: _Chart(), ), - const SizedBox(height: 20), + const Divider(height: 32), _TextDetails(), const _ServerSettings(), ], From 641e329725df8579462401b5bca7568f758b7ea6 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 14:28:17 +0300 Subject: [PATCH 090/732] Move DiskStatus to the server volume cubit --- lib/config/bloc_config.dart | 2 +- .../provider_volume_cubit.dart | 2 +- .../server_volumes/server_volume_cubit.dart | 47 +++++++++++++++++-- .../server_volumes/server_volume_state.dart | 13 +++-- .../models}/disk_status.dart | 0 lib/ui/pages/more/more.dart | 7 +-- lib/ui/pages/providers/providers.dart | 10 +--- .../server_details/server_details_screen.dart | 7 +-- .../pages/server_storage/data_migration.dart | 2 +- .../server_storage/extending_volume.dart | 2 +- .../pages/server_storage/server_storage.dart | 2 +- .../server_storage_list_item.dart | 2 +- .../service_migration_list_item.dart | 2 +- lib/ui/pages/server_storage/storage_card.dart | 2 +- lib/ui/pages/services/service_page.dart | 4 ++ 15 files changed, 68 insertions(+), 36 deletions(-) rename lib/{ui/pages/server_storage => logic/models}/disk_status.dart (100%) diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index a6cf7202..b80dada7 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -31,7 +31,7 @@ class BlocAndProviderConfig extends StatelessWidget { final recoveryKeyCubit = RecoveryKeyCubit(serverInstallationCubit); final apiDevicesCubit = ApiDevicesCubit(serverInstallationCubit); final apiVolumesCubit = ApiProviderVolumeCubit(serverInstallationCubit); - final apiServerVolumesCubit = ApiServerVolumeCubit(serverInstallationCubit); + final apiServerVolumesCubit = ApiServerVolumeCubit(serverInstallationCubit, apiVolumesCubit); final serverJobsCubit = ServerJobsCubit(serverInstallationCubit); final serverDetailsCubit = ServerDetailsCubit(serverInstallationCubit); diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index a4df4469..d64a32c8 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_pro import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; part 'provider_volume_state.dart'; diff --git a/lib/logic/cubit/server_volumes/server_volume_cubit.dart b/lib/logic/cubit/server_volumes/server_volume_cubit.dart index 53b185c7..f13a4b07 100644 --- a/lib/logic/cubit/server_volumes/server_volume_cubit.dart +++ b/lib/logic/cubit/server_volumes/server_volume_cubit.dart @@ -1,14 +1,22 @@ +import 'dart:async'; + import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; part 'server_volume_state.dart'; class ApiServerVolumeCubit extends ServerInstallationDependendCubit { - ApiServerVolumeCubit(final ServerInstallationCubit serverInstallationCubit) - : super(serverInstallationCubit, const ApiServerVolumeState.initial()); + ApiServerVolumeCubit( + final ServerInstallationCubit serverInstallationCubit, this.providerVolumeCubit, + ) : super(serverInstallationCubit, ApiServerVolumeState.initial()) { + _providerVolumeSubscription = + providerVolumeCubit.stream.listen(checkProviderVolumes); + } final ServerApi serverApi = ServerApi(); @@ -19,6 +27,21 @@ class ApiServerVolumeCubit } } + late StreamSubscription _providerVolumeSubscription; + final ApiProviderVolumeCubit providerVolumeCubit; + + void checkProviderVolumes(final ApiProviderVolumeState state) { + emit( + ApiServerVolumeState( + this.state._volumes, + this.state.status, + this.state.usesBinds, + DiskStatus.fromVolumes(this.state._volumes, state.volumes), + ), + ); + return; + } + Future _refetch() async { final volumes = await serverApi.getServerDiskVolumes(); final usesBinds = await serverApi.isUsingBinds(); @@ -28,11 +51,27 @@ class ApiServerVolumeCubit status = LoadingStatus.success; } - emit(ApiServerVolumeState(volumes, status, usesBinds)); + emit( + ApiServerVolumeState( + volumes, + status, + usesBinds, + DiskStatus.fromVolumes( + volumes, + providerVolumeCubit.state.volumes, + ), + ), + ); } @override void clear() { - emit(const ApiServerVolumeState.initial()); + emit(ApiServerVolumeState.initial()); + } + + @override + Future close() { + _providerVolumeSubscription.cancel(); + return super.close(); } } diff --git a/lib/logic/cubit/server_volumes/server_volume_state.dart b/lib/logic/cubit/server_volumes/server_volume_state.dart index 3df43855..1764d7fc 100644 --- a/lib/logic/cubit/server_volumes/server_volume_state.dart +++ b/lib/logic/cubit/server_volumes/server_volume_state.dart @@ -5,26 +5,33 @@ class ApiServerVolumeState extends ServerInstallationDependendState { this._volumes, this.status, this.usesBinds, + this._diskStatus, ); - const ApiServerVolumeState.initial() - : this(const [], LoadingStatus.uninitialized, null); + ApiServerVolumeState.initial() + : this(const [], LoadingStatus.uninitialized, null, DiskStatus()); final List _volumes; + final DiskStatus _diskStatus; final bool? usesBinds; final LoadingStatus status; - List get volumes => _volumes; + List get volumes => _diskStatus.diskVolumes; + DiskStatus get diskStatus => _diskStatus; + + DiskVolume getVolume(final String volumeName) => volumes.firstWhere((final volume) => volume.name == volumeName, orElse: () => DiskVolume()); ApiServerVolumeState copyWith({ final List? volumes, final LoadingStatus? status, final bool? usesBinds, + final DiskStatus? diskStatus, }) => ApiServerVolumeState( volumes ?? _volumes, status ?? this.status, usesBinds ?? this.usesBinds, + diskStatus ?? _diskStatus, ); @override diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/logic/models/disk_status.dart similarity index 100% rename from lib/ui/pages/server_storage/disk_status.dart rename to lib/logic/models/disk_status.dart diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index e2b78423..593abc28 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -2,7 +2,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:ionicons/ionicons.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; @@ -12,7 +11,6 @@ import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; import 'package:selfprivacy/ui/pages/server_storage/data_migration.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/setup/initializing.dart'; import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; @@ -53,10 +51,7 @@ class MorePage extends StatelessWidget { title: 'providers.storage.start_migration_button'.tr(), iconData: Icons.drive_file_move_outline, goTo: DataMigrationPage( - diskStatus: DiskStatus.fromVolumes( - context.read().state.volumes, - context.read().state.volumes, - ), + diskStatus: context.watch().state.diskStatus, services: context .read() .state diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 6cc1495d..8b06751b 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -3,12 +3,9 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; -import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; @@ -16,7 +13,6 @@ import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -38,11 +34,7 @@ class _ProvidersPageState extends State { final DnsRecordsStatus dnsStatus = context.watch().state.dnsState; - final List serverVolumes = - context.watch().state.volumes; - final List providerVolumes = - context.watch().state.volumes; - final diskStatus = DiskStatus.fromVolumes(serverVolumes, providerVolumes); + final diskStatus = context.watch().state.diskStatus; final ServerInstallationState appConfig = context.watch().state; diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 5b839ef1..9d25e8ba 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart'; -import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; @@ -19,7 +18,6 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/switch_block/switch_bloc.dart'; import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/time_zone/lang.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -83,10 +81,7 @@ class _ServerDetailsScreenState extends State heroSubtitle: 'providers.server.bottom_sheet.1'.tr(), children: [ StorageCard( - diskStatus: DiskStatus.fromVolumes( - context.read().state.volumes, - context.read().state.volumes, - ), + diskStatus: context.watch().state.diskStatus, ), const Divider(height: 32), Text( diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index 67eca453..cf43bd9c 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; import 'package:selfprivacy/ui/pages/server_storage/service_migration_list_item.dart'; diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 02b1dba7..c0c48b2e 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.d import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; class ExtendingVolumePage extends StatefulWidget { const ExtendingVolumePage({ diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 766440be..94a0532e 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/server_storage/server_storage_list_item.dart b/lib/ui/pages/server_storage/server_storage_list_item.dart index 3aad19b2..371769a8 100644 --- a/lib/ui/pages/server_storage/server_storage_list_item.dart +++ b/lib/ui/pages/server_storage/server_storage_list_item.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; class ServerStorageListItem extends StatelessWidget { const ServerStorageListItem({ diff --git a/lib/ui/pages/server_storage/service_migration_list_item.dart b/lib/ui/pages/server_storage/service_migration_list_item.dart index ac6fc5bf..f6b59663 100644 --- a/lib/ui/pages/server_storage/service_migration_list_item.dart +++ b/lib/ui/pages/server_storage/service_migration_list_item.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; class ServiceMigrationListItem extends StatelessWidget { const ServiceMigrationListItem({ diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index 210eec48..7bad8958 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; -import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 2bdf8f72..dd5f8e86 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -117,6 +117,10 @@ class _ServicePageState extends State { 'services.service_page.move'.tr(), style: Theme.of(context).textTheme.titleMedium, ), + // subtitle: Text( + // 'Uses ${service.storageUsage.used} on ${context.read().state.totalStorage}', + // style: Theme.of(context).textTheme.bodyMedium, + // ), ), ], ); From 6f6df3076788bc4403d3b077f41f2e280c9d54d1 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 15:00:15 +0300 Subject: [PATCH 091/732] Animate BrandLinearIndicator --- .../brand_linear_indicator.dart | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart index 807d3224..16ffb40a 100644 --- a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart +++ b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart @@ -15,21 +15,29 @@ class BrandLinearIndicator extends StatelessWidget { final double height; @override - Widget build(final BuildContext context) => Container( - height: height, - width: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - color: backgroundColor, - borderRadius: BorderRadius.circular(height), - ), - alignment: Alignment.centerLeft, - child: FractionallySizedBox( - widthFactor: value, - child: Container( - decoration: BoxDecoration( - color: color, - borderRadius: BorderRadius.circular(height), + Widget build(final BuildContext context) => LayoutBuilder( + builder: (final context, final constraints) => Container( + height: height, + width: constraints.maxWidth, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + color: backgroundColor, + borderRadius: BorderRadius.circular(height), + ), + alignment: Alignment.centerLeft, + child: AnimatedSlide( + duration: const Duration(milliseconds: 400), + curve: Curves.easeInOut, + offset: Offset( + -(1 - value), + 0, + ), + child: Container( + width: constraints.maxWidth, + decoration: BoxDecoration( + color: color, + borderRadius: BorderRadius.circular(height), + ), ), ), ), From ae0295d9598121f76d64dc216e5838b7e9de20dd Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 16:36:51 +0300 Subject: [PATCH 092/732] Add storage usage to service screen, formatting --- assets/translations/en.json | 4 +++- assets/translations/ru.json | 4 +++- lib/config/bloc_config.dart | 3 ++- .../server_volumes/server_volume_cubit.dart | 3 ++- .../server_volumes/server_volume_state.dart | 6 ++++-- lib/ui/pages/more/more.dart | 5 ++++- lib/ui/pages/services/service_page.dart | 20 ++++++++++++++----- 7 files changed, 33 insertions(+), 12 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index c4d319dc..f3ec3523 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -210,10 +210,12 @@ "_comment": "Services", "title": "Your personal, private and independent services.", "service_page": { + "open_in_browser": "Open in browser", "restart": "Restart service", "disable": "Disable service", "enable": "Enable service", - "move": "Move to another volume" + "move": "Move to another volume", + "uses": "Uses {usage} on {volume}" }, "mail": { "title": "E-Mail", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index df68f75f..5072c88b 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -209,10 +209,12 @@ "_comment": "Вкладка сервисы", "title": "Ваши личные, приватные и независимые сервисы:", "service_page": { + "open_in_browser": "Открыть в браузере", "restart": "Перезапустить сервис", "disable": "Выключить сервис", "enable": "Включить сервис", - "move": "Переместить на другой диск" + "move": "Переместить на другой диск", + "uses": "Использует {usage} на {volume}" }, "mail": { "title": "Почта", diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index b80dada7..b88b21d7 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -31,7 +31,8 @@ class BlocAndProviderConfig extends StatelessWidget { final recoveryKeyCubit = RecoveryKeyCubit(serverInstallationCubit); final apiDevicesCubit = ApiDevicesCubit(serverInstallationCubit); final apiVolumesCubit = ApiProviderVolumeCubit(serverInstallationCubit); - final apiServerVolumesCubit = ApiServerVolumeCubit(serverInstallationCubit, apiVolumesCubit); + final apiServerVolumesCubit = + ApiServerVolumeCubit(serverInstallationCubit, apiVolumesCubit); final serverJobsCubit = ServerJobsCubit(serverInstallationCubit); final serverDetailsCubit = ServerDetailsCubit(serverInstallationCubit); diff --git a/lib/logic/cubit/server_volumes/server_volume_cubit.dart b/lib/logic/cubit/server_volumes/server_volume_cubit.dart index f13a4b07..ca6dbb6e 100644 --- a/lib/logic/cubit/server_volumes/server_volume_cubit.dart +++ b/lib/logic/cubit/server_volumes/server_volume_cubit.dart @@ -12,7 +12,8 @@ part 'server_volume_state.dart'; class ApiServerVolumeCubit extends ServerInstallationDependendCubit { ApiServerVolumeCubit( - final ServerInstallationCubit serverInstallationCubit, this.providerVolumeCubit, + final ServerInstallationCubit serverInstallationCubit, + this.providerVolumeCubit, ) : super(serverInstallationCubit, ApiServerVolumeState.initial()) { _providerVolumeSubscription = providerVolumeCubit.stream.listen(checkProviderVolumes); diff --git a/lib/logic/cubit/server_volumes/server_volume_state.dart b/lib/logic/cubit/server_volumes/server_volume_state.dart index 1764d7fc..b2b1fce0 100644 --- a/lib/logic/cubit/server_volumes/server_volume_state.dart +++ b/lib/logic/cubit/server_volumes/server_volume_state.dart @@ -5,7 +5,7 @@ class ApiServerVolumeState extends ServerInstallationDependendState { this._volumes, this.status, this.usesBinds, - this._diskStatus, + this._diskStatus, ); ApiServerVolumeState.initial() @@ -19,7 +19,9 @@ class ApiServerVolumeState extends ServerInstallationDependendState { List get volumes => _diskStatus.diskVolumes; DiskStatus get diskStatus => _diskStatus; - DiskVolume getVolume(final String volumeName) => volumes.firstWhere((final volume) => volume.name == volumeName, orElse: () => DiskVolume()); + DiskVolume getVolume(final String volumeName) => + volumes.firstWhere((final volume) => volume.name == volumeName, + orElse: () => DiskVolume()); ApiServerVolumeState copyWith({ final List? volumes, diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 593abc28..0d1f9802 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -51,7 +51,10 @@ class MorePage extends StatelessWidget { title: 'providers.storage.start_migration_button'.tr(), iconData: Icons.drive_file_move_outline, goTo: DataMigrationPage( - diskStatus: context.watch().state.diskStatus, + diskStatus: context + .watch() + .state + .diskStatus, services: context .read() .state diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index dd5f8e86..82dde3dc 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; @@ -68,7 +69,7 @@ class _ServicePageState extends State { onTap: () => _launchURL(service.url), leading: const Icon(Icons.open_in_browser), title: Text( - 'Open in browser', + 'services.service_page.open_in_browser'.tr(), style: Theme.of(context).textTheme.titleMedium, ), subtitle: Text( @@ -117,10 +118,19 @@ class _ServicePageState extends State { 'services.service_page.move'.tr(), style: Theme.of(context).textTheme.titleMedium, ), - // subtitle: Text( - // 'Uses ${service.storageUsage.used} on ${context.read().state.totalStorage}', - // style: Theme.of(context).textTheme.bodyMedium, - // ), + subtitle: Text( + 'services.service_page.uses'.tr( + namedArgs: { + 'usage': service.storageUsage.used.toString(), + 'volume': context + .read() + .state + .getVolume(service.storageUsage.volume ?? '') + .displayName + }, + ), + style: Theme.of(context).textTheme.bodyMedium, + ), ), ], ); From c84d16d8b7e1cc3d0ac2fe179a92aea1dbe095f6 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 16:49:53 +0300 Subject: [PATCH 093/732] Move files related to storage --- .../cubit/server_volumes/server_volume_state.dart | 7 ++++--- .../server_storage_list_item.dart | 0 .../service_migration_list_item.dart | 0 .../service_storage_consumption_list_item.dart | 0 lib/ui/pages/more/more.dart | 4 ++-- .../data_to_binds_migration.dart} | 13 +++++++------ .../migration_process_page.dart | 2 +- lib/ui/pages/server_storage/server_storage.dart | 2 +- lib/ui/pages/server_storage/storage_card.dart | 2 +- 9 files changed, 16 insertions(+), 14 deletions(-) rename lib/ui/{pages/server_storage => components/storage_list_items}/server_storage_list_item.dart (100%) rename lib/ui/{pages/server_storage => components/storage_list_items}/service_migration_list_item.dart (100%) rename lib/ui/{pages/server_storage => components/storage_list_items}/service_storage_consumption_list_item.dart (100%) rename lib/ui/pages/server_storage/{data_migration.dart => binds_migration/data_to_binds_migration.dart} (92%) rename lib/ui/pages/server_storage/{ => binds_migration}/migration_process_page.dart (98%) diff --git a/lib/logic/cubit/server_volumes/server_volume_state.dart b/lib/logic/cubit/server_volumes/server_volume_state.dart index b2b1fce0..d68daa58 100644 --- a/lib/logic/cubit/server_volumes/server_volume_state.dart +++ b/lib/logic/cubit/server_volumes/server_volume_state.dart @@ -19,9 +19,10 @@ class ApiServerVolumeState extends ServerInstallationDependendState { List get volumes => _diskStatus.diskVolumes; DiskStatus get diskStatus => _diskStatus; - DiskVolume getVolume(final String volumeName) => - volumes.firstWhere((final volume) => volume.name == volumeName, - orElse: () => DiskVolume()); + DiskVolume getVolume(final String volumeName) => volumes.firstWhere( + (final volume) => volume.name == volumeName, + orElse: () => DiskVolume(), + ); ApiServerVolumeState copyWith({ final List? volumes, diff --git a/lib/ui/pages/server_storage/server_storage_list_item.dart b/lib/ui/components/storage_list_items/server_storage_list_item.dart similarity index 100% rename from lib/ui/pages/server_storage/server_storage_list_item.dart rename to lib/ui/components/storage_list_items/server_storage_list_item.dart diff --git a/lib/ui/pages/server_storage/service_migration_list_item.dart b/lib/ui/components/storage_list_items/service_migration_list_item.dart similarity index 100% rename from lib/ui/pages/server_storage/service_migration_list_item.dart rename to lib/ui/components/storage_list_items/service_migration_list_item.dart diff --git a/lib/ui/pages/server_storage/service_storage_consumption_list_item.dart b/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart similarity index 100% rename from lib/ui/pages/server_storage/service_storage_consumption_list_item.dart rename to lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 0d1f9802..eeedd4d8 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; -import 'package:selfprivacy/ui/pages/server_storage/data_migration.dart'; +import 'package:selfprivacy/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart'; import 'package:selfprivacy/ui/pages/setup/initializing.dart'; import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; @@ -50,7 +50,7 @@ class MorePage extends StatelessWidget { _MoreMenuItem( title: 'providers.storage.start_migration_button'.tr(), iconData: Icons.drive_file_move_outline, - goTo: DataMigrationPage( + goTo: DataToBindsMigrationPage( diskStatus: context .watch() .state diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart similarity index 92% rename from lib/ui/pages/server_storage/data_migration.dart rename to lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart index cf43bd9c..7c21e102 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart @@ -6,11 +6,11 @@ import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; -import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; -import 'package:selfprivacy/ui/pages/server_storage/service_migration_list_item.dart'; +import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; +import 'package:selfprivacy/ui/components/storage_list_items/service_migration_list_item.dart'; -class DataMigrationPage extends StatefulWidget { - const DataMigrationPage({ +class DataToBindsMigrationPage extends StatefulWidget { + const DataToBindsMigrationPage({ required this.services, required this.diskStatus, final super.key, @@ -20,10 +20,11 @@ class DataMigrationPage extends StatefulWidget { final List services; @override - State createState() => _DataMigrationPageState(); + State createState() => + _DataToBindsMigrationPageState(); } -class _DataMigrationPageState extends State { +class _DataToBindsMigrationPageState extends State { /// Service id to target migration disk name final Map serviceToDisk = {}; diff --git a/lib/ui/pages/server_storage/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart similarity index 98% rename from lib/ui/pages/server_storage/migration_process_page.dart rename to lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index 12dd8fea..b1d20411 100644 --- a/lib/ui/pages/server_storage/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -42,7 +42,7 @@ class _MigrationProcessPageState extends State { value: value, color: Theme.of(context).colorScheme.primary, backgroundColor: Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, + height: 4.0, ), const SizedBox(height: 16), if (job.finishedAt != null) diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 94a0532e..f29e9694 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; -import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; +import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ServerStoragePage extends StatefulWidget { diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index 7bad8958..33b742a2 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; -import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; +import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class StorageCard extends StatelessWidget { From 3d34f0bb55e28569533f316e4b9923c7b19b70bb Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Sep 2022 17:14:29 +0300 Subject: [PATCH 094/732] Fix screens when no server initialized --- lib/ui/pages/dns_details/dns_details.dart | 12 ++---------- lib/ui/pages/services/services.dart | 6 ++++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 91c7d007..5a3d0dfd 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -94,16 +94,8 @@ class _DnsDetailsPageState extends State { headerTitle: '', heroIcon: BrandIcons.globe, heroTitle: 'providers.domain.screen_title'.tr(), - children: [ - FilledCard( - child: ListTile( - title: Text( - 'not_ready_card.in_menu'.tr(), - style: Theme.of(context).textTheme.headline6, - ), - ), - ), - ], + heroSubtitle: 'not_ready_card.in_menu'.tr(), + children: const [], ); } diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index a469d06b..d638866a 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -115,8 +115,10 @@ class _Card extends StatelessWidget { final domainName = UiHelpers.getDomainName(config); return GestureDetector( - onTap: () => Navigator.of(context) - .push(materialRoute(ServicePage(serviceId: serviceType.name))), + onTap: isReady + ? () => Navigator.of(context) + .push(materialRoute(ServicePage(serviceId: serviceType.name))) + : null, child: BrandCards.big( child: Column( crossAxisAlignment: CrossAxisAlignment.start, From 5ca4ee27e3c3228fcdcd6df53c794fef9f55c416 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 16:24:17 +0300 Subject: [PATCH 095/732] Introduce ListTileOnSurfaceVariant and refactor TextDetails on server details screen. --- assets/translations/en.json | 13 ++ assets/translations/ru.json | 16 ++ .../list_tile_on_surface_variant.dart | 44 +++++ .../server_details/server_details_screen.dart | 2 + lib/ui/pages/server_details/text_details.dart | 154 ++++++------------ lib/ui/pages/users/user_details.dart | 37 ++--- lib/ui/pages/users/users.dart | 1 + lib/utils/extensions/string_extensions.dart | 4 + 8 files changed, 139 insertions(+), 132 deletions(-) create mode 100644 lib/ui/components/list_tiles/list_tile_on_surface_variant.dart create mode 100644 lib/utils/extensions/string_extensions.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index f3ec3523..485d4076 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -114,6 +114,19 @@ "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", "server_timezone": "Server timezone", "select_timezone": "Select timezone" + }, + "info": { + "server_id": "Server ID", + "status": "Status", + "cpu": "CPU", + "ram": "Memory", + "disk": "Disk local", + "monthly_cost": "Monthly cost", + "location": "Location", + "core_count": { + "one": "{} core", + "other": "{} cores" + } } }, "domain": { diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 5072c88b..a6b4bc59 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -113,6 +113,22 @@ "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", "server_timezone": "Часовой пояс сервера", "select_timezone": "Выберите часовой пояс" + }, + "info": { + "server_id": "ID сервера", + "status": "Статус", + "cpu": "Процессор", + "ram": "Операивная память", + "disk": "Диск", + "monthly_cost": "Ежемесячная стоимость", + "location": "Размещение", + "core_count": { + "one": "{} ядро", + "two": "{} ядра", + "few": "{} ядра", + "many": "{} ядер", + "other": "{} ядер" + } } }, "domain": { diff --git a/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart b/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart new file mode 100644 index 00000000..c31315bd --- /dev/null +++ b/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; + +class ListTileOnSurfaceVariant extends StatelessWidget { + const ListTileOnSurfaceVariant({ + required this.title, + this.subtitle, + this.leadingIcon, + this.onTap, + this.disableSubtitleOverflow = false, + final super.key, + }); + + final String title; + final String? subtitle; + final IconData? leadingIcon; + final Function()? onTap; + final bool disableSubtitleOverflow; + + Widget? getSubtitle() { + if (subtitle == null) { + return null; + } + if (disableSubtitleOverflow) { + return Text( + subtitle!, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ); + } + return Text( + subtitle!, + ); + } + + @override + Widget build(final BuildContext context) => ListTile( + title: Text(title), + subtitle: getSubtitle(), + onTap: onTap, + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + leading: leadingIcon != null ? Icon(leadingIcon) : null, + iconColor: Theme.of(context).colorScheme.onSurfaceVariant, + ); +} diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 9d25e8ba..4d5d5ebd 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -15,10 +15,12 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; +import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/components/switch_block/switch_bloc.dart'; import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/time_zone/lang.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; +import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:timezone/timezone.dart'; diff --git a/lib/ui/pages/server_details/text_details.dart b/lib/ui/pages/server_details/text_details.dart index 2285d305..f512e917 100644 --- a/lib/ui/pages/server_details/text_details.dart +++ b/lib/ui/pages/server_details/text_details.dart @@ -11,115 +11,53 @@ class _TextDetails extends StatelessWidget { return _TempMessage(message: 'basis.no_data'.tr()); } else if (details is Loaded) { final data = details.serverInfo; - final checkTime = details.checkTime; - return Column( - children: [ - Center(child: BrandText.h3('providers.server.bottom_sheet.2'.tr())), - const SizedBox(height: 10), - Table( - columnWidths: const { - 0: FractionColumnWidth(.5), - 1: FractionColumnWidth(.5), - }, - defaultVerticalAlignment: TableCellVerticalAlignment.middle, - children: [ - TableRow( - children: [ - getRowTitle('Last check:'), - getRowValue(formatter.format(checkTime)), - ], + return FilledCard( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(16.0), + child: Text( + 'providers.server.bottom_sheet.2'.tr(), + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), ), - TableRow( - children: [ - getRowTitle('Server Id:'), - getRowValue(data.id.toString()), - ], - ), - TableRow( - children: [ - getRowTitle('Status:'), - getRowValue( - data.status.toString().split('.')[1].toUpperCase(), - isBold: true, - ), - ], - ), - TableRow( - children: [ - getRowTitle('CPU:'), - getRowValue( - data.serverType.cores.toString(), - ), - ], - ), - TableRow( - children: [ - getRowTitle('Memory:'), - getRowValue( - '${data.serverType.memory.toString()} GB', - ), - ], - ), - TableRow( - children: [ - getRowTitle('Disk Local:'), - getRowValue( - '${data.serverType.disk.toString()} GB', - ), - ], - ), - TableRow( - children: [ - getRowTitle('Price monthly:'), - getRowValue( - data.serverType.prices[1].monthly.toString(), - ), - ], - ), - TableRow( - children: [ - getRowTitle('Price hourly:'), - getRowValue( - data.serverType.prices[1].hourly.toString(), - ), - ], - ), - ], - ), - const SizedBox(height: 30), - Center(child: BrandText.h3('providers.server.bottom_sheet.3'.tr())), - const SizedBox(height: 10), - Table( - columnWidths: const { - 0: FractionColumnWidth(.5), - 1: FractionColumnWidth(.5), - }, - defaultVerticalAlignment: TableCellVerticalAlignment.middle, - children: [ - TableRow( - children: [ - getRowTitle('Country:'), - getRowValue( - data.location.country, - ), - ], - ), - TableRow( - children: [ - getRowTitle('City:'), - getRowValue(data.location.city), - ], - ), - TableRow( - children: [ - getRowTitle('Description:'), - getRowValue(data.location.description), - ], - ), - ], - ), - const SizedBox(height: 20), - ], + ), + ListTileOnSurfaceVariant( + leadingIcon: Icons.numbers_outlined, + title: data.id.toString(), + subtitle: 'providers.server.info.server_id'.tr(), + ), + ListTileOnSurfaceVariant( + leadingIcon: Icons.mode_standby_outlined, + title: data.status.toString().split('.')[1].capitalize(), + subtitle: 'providers.server.info.status'.tr(), + ), + ListTileOnSurfaceVariant( + leadingIcon: Icons.memory_outlined, + title: 'providers.server.info.core_count' + .plural(data.serverType.cores), + subtitle: 'providers.server.info.cpu'.tr(), + ), + ListTileOnSurfaceVariant( + leadingIcon: Icons.memory_outlined, + title: '${data.serverType.memory.toString()} GB', + subtitle: 'providers.server.info.ram'.tr(), + ), + ListTileOnSurfaceVariant( + leadingIcon: Icons.euro_outlined, + title: data.serverType.prices[1].monthly.toStringAsFixed(2), + subtitle: 'providers.server.info.monthly_cost'.tr(), + ), + // Server location + ListTileOnSurfaceVariant( + leadingIcon: Icons.location_on_outlined, + title: '${data.location.city}, ${data.location.country}', + subtitle: 'providers.server.info.location'.tr(), + ), + ], + ), ); } else { throw Exception('wrong state'); diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 2ec6baee..24f2457f 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -133,12 +133,10 @@ class _UserLogins extends StatelessWidget { Widget build(final BuildContext context) => FilledCard( child: Column( children: [ - ListTile( - title: Text('${user.login}@$domainName'), - subtitle: Text('users.email_login'.tr()), - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - leading: const Icon(Icons.alternate_email_outlined), - iconColor: Theme.of(context).colorScheme.onSurfaceVariant, + ListTileOnSurfaceVariant( + title: '${user.login}@$domainName', + subtitle: 'users.email_login'.tr(), + leadingIcon: Icons.alternate_email_outlined, ), ], ), @@ -156,18 +154,13 @@ class _SshKeysCard extends StatelessWidget { Widget build(final BuildContext context) => FilledCard( child: Column( children: [ - ListTile( - title: Text('ssh.title'.tr()), - textColor: Theme.of(context).colorScheme.onSurfaceVariant, + ListTileOnSurfaceVariant( + title: 'ssh.title'.tr(), ), const Divider(height: 0), - ListTile( - iconColor: Theme.of(context).colorScheme.onSurfaceVariant, - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - title: Text( - 'ssh.create'.tr(), - ), - leading: const Icon(Icons.add_circle_outlined), + ListTileOnSurfaceVariant( + title: 'ssh.create'.tr(), + leadingIcon: Icons.add_circle_outline, onTap: () { showModalBottomSheet( context: context, @@ -188,15 +181,11 @@ class _SshKeysCard extends StatelessWidget { final keyName = key.split(' ').length > 2 ? key.split(' ')[2] : 'ssh.no_key_name'.tr(); - return ListTile( - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - title: Text('$keyName ($keyType)'), + return ListTileOnSurfaceVariant( + title: '$keyName ($keyType)', + disableSubtitleOverflow: true, // do not overflow text - subtitle: Text( - publicKey, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), + subtitle: publicKey, onTap: () { showDialog( context: context, diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 6b8709fd..7e255935 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -20,6 +20,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; diff --git a/lib/utils/extensions/string_extensions.dart b/lib/utils/extensions/string_extensions.dart new file mode 100644 index 00000000..91cb543b --- /dev/null +++ b/lib/utils/extensions/string_extensions.dart @@ -0,0 +1,4 @@ +extension StringExtension on String { + String capitalize() => + '${this[0].toUpperCase()}${substring(1).toLowerCase()}'; +} From 39358a827fc1cc6813b5713e64f9dabbbed39b66 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 18 Sep 2022 17:05:41 +0300 Subject: [PATCH 096/732] Implement migrate to binds logic --- .../graphql_maps/server_api/volume_api.dart | 14 ++++- .../cubit/server_jobs/server_jobs_cubit.dart | 31 ++++++++--- .../cubit/server_jobs/server_jobs_state.dart | 10 +++- .../data_to_binds_migration.dart | 8 ++- .../migration_process_page.dart | 52 ++++++++++++------- 5 files changed, 85 insertions(+), 30 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index 06d6e5bc..e0c68cc4 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -57,7 +57,10 @@ mixin VolumeApi on ApiMap { } } - Future migrateToBinds(final Map serviceToDisk) async { + Future migrateToBinds( + final Map serviceToDisk, + ) async { + String? jobUid; try { final GraphQLClient client = await getClient(); final input = Input$MigrateToBindsInput( @@ -70,9 +73,16 @@ mixin VolumeApi on ApiMap { final variables = Variables$Mutation$MigrateToBinds(input: input); final migrateMutation = Options$Mutation$MigrateToBinds(variables: variables); - await client.mutate$MigrateToBinds(migrateMutation); + final QueryResult result = + await client.mutate$MigrateToBinds( + migrateMutation, + ); + + jobUid = result.parsedData!.migrateToBinds.job!.uid; } catch (e) { print(e); } + + return jobUid; } } diff --git a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart index 254e6380..74ce932d 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart @@ -13,9 +13,7 @@ class ServerJobsCubit ServerJobsCubit(final ServerInstallationCubit serverInstallationCubit) : super( serverInstallationCubit, - const ServerJobsState( - serverJobList: [], - ), + const ServerJobsState(), ); Timer? timer; @@ -24,9 +22,7 @@ class ServerJobsCubit @override void clear() async { emit( - const ServerJobsState( - serverJobList: [], - ), + const ServerJobsState(), ); if (timer != null && timer!.isActive) { timer!.cancel(); @@ -47,6 +43,29 @@ class ServerJobsCubit } } + Future migrateToBinds(final Map serviceToDisk) async { + final String? jobUid = await api.migrateToBinds(serviceToDisk); + emit( + ServerJobsState( + migrationJobUid: jobUid, + ), + ); + } + + ServerJob? getServerJobByUid(final String uid) { + ServerJob? job; + + try { + job = state.serverJobList.firstWhere( + (final ServerJob job) => job.uid == uid, + ); + } catch (e) { + print(e); + } + + return job; + } + Future reload({final bool useTimer = false}) async { final List jobs = await api.getServerJobs(); emit( diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index 82ac4377..bf7d0adb 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -1,16 +1,22 @@ part of 'server_jobs_cubit.dart'; class ServerJobsState extends ServerInstallationDependendState { - const ServerJobsState({this.serverJobList = const []}); + const ServerJobsState({ + this.serverJobList = const [], + this.migrationJobUid, + }); final List serverJobList; + final String? migrationJobUid; @override - List get props => serverJobList; + List get props => [migrationJobUid, ...serverJobList]; ServerJobsState copyWith({ final List? serverJobList, + final String? migrationJobUid, }) => ServerJobsState( serverJobList: serverJobList ?? this.serverJobList, + migrationJobUid: migrationJobUid ?? this.migrationJobUid, ); } diff --git a/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart b/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart index 7c21e102..a88b70cb 100644 --- a/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart @@ -1,5 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; @@ -8,6 +9,8 @@ import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/ui/components/storage_list_items/service_migration_list_item.dart'; +import 'package:selfprivacy/ui/pages/server_storage/binds_migration/migration_process_page.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; class DataToBindsMigrationPage extends StatefulWidget { const DataToBindsMigrationPage({ @@ -158,7 +161,10 @@ class _DataToBindsMigrationPageState extends State { FilledButton( title: 'providers.storage.start_migration_button'.tr(), onPressed: () { - // TODO: Implement migration + context.read().migrateToBinds(serviceToDisk); + Navigator.of(context).push( + materialRoute(const MigrationProcessPage()), + ); }, ), const SizedBox(height: 32), diff --git a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index b1d20411..a63748c6 100644 --- a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -10,12 +10,9 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; class MigrationProcessPage extends StatefulWidget { const MigrationProcessPage({ - required this.jobUid, final super.key, }); - final String jobUid; - @override State createState() => _MigrationProcessPageState(); } @@ -28,22 +25,25 @@ class _MigrationProcessPageState extends State { @override Widget build(final BuildContext context) { + ServerJob? job; + String? subtitle = ''; + double value = 0.0; + List children = []; + final serverJobsState = context.watch().state; - final ServerJob job = serverJobsState.serverJobList.firstWhere( - (final ServerJob job) => job.uid == widget.jobUid, - ); - final double value = job.progress == null ? 0.0 : job.progress! / 100; - return BrandHeroScreen( - hasBackButton: false, - heroTitle: 'providers.storage.migration_process'.tr(), - heroSubtitle: job.statusText, - children: [ - BrandLinearIndicator( - value: value, - color: Theme.of(context).colorScheme.primary, - backgroundColor: Theme.of(context).colorScheme.surfaceVariant, - height: 4.0, - ), + if (serverJobsState.migrationJobUid != null) { + job = context.read().getServerJobByUid( + serverJobsState.migrationJobUid!, + ); + } + + if (job == null) { + subtitle = 'basis.loading'.tr(); + } else { + value = job.progress == null ? 0.0 : job.progress! / 100; + subtitle = job.statusText; + children = [ + ...children, const SizedBox(height: 16), if (job.finishedAt != null) Text( @@ -60,7 +60,21 @@ class _MigrationProcessPageState extends State { (final predicate) => false, ); }, - ) + ), + ]; + } + return BrandHeroScreen( + hasBackButton: false, + heroTitle: 'providers.storage.migration_process'.tr(), + heroSubtitle: subtitle, + children: [ + BrandLinearIndicator( + value: value, + color: Theme.of(context).colorScheme.primary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 4.0, + ), + ...children, ], ); } From cb660eb2bb1e08c8864c36a33a19711d3322735e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 17:17:13 +0300 Subject: [PATCH 097/732] Refactor server_settings.dart to use vanilla ListTiles --- .../server_details/server_details_screen.dart | 6 +- .../pages/server_details/server_settings.dart | 90 +++++-------------- 2 files changed, 25 insertions(+), 71 deletions(-) diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 4d5d5ebd..367d8de8 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -16,7 +16,6 @@ import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; -import 'package:selfprivacy/ui/components/switch_block/switch_bloc.dart'; import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/time_zone/lang.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; @@ -85,6 +84,8 @@ class _ServerDetailsScreenState extends State StorageCard( diskStatus: context.watch().state.diskStatus, ), + const SizedBox(height: 16), + const _ServerSettings(), const Divider(height: 32), Text( 'providers.server.resource_usage'.tr(), @@ -95,9 +96,8 @@ class _ServerDetailsScreenState extends State create: (final context) => HetznerMetricsCubit()..restart(), child: _Chart(), ), - const Divider(height: 32), + const SizedBox(height: 8), _TextDetails(), - const _ServerSettings(), ], ), ); diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index 62269496..9a35e74a 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -26,8 +26,9 @@ class _ServerSettingsState extends State<_ServerSettings> { return Column( children: [ - SwitcherBlock( - onChange: (final switched) { + SwitchListTile( + value: allowAutoUpgrade ?? false, + onChanged: (final switched) { context .read() .repository @@ -41,15 +42,15 @@ class _ServerSettingsState extends State<_ServerSettings> { allowAutoUpgrade = switched; }); }, - isActive: allowAutoUpgrade ?? false, - child: _TextColumn( - title: 'providers.server.settings.allow_autoupgrade'.tr(), - value: 'providers.server.settings.allow_autoupgrade_hint'.tr(), + title: Text('providers.server.settings.allow_autoupgrade'.tr()), + subtitle: Text( + 'providers.server.settings.allow_autoupgrade_hint'.tr(), ), + activeColor: Theme.of(context).colorScheme.primary, ), - const Divider(height: 0), - SwitcherBlock( - onChange: (final switched) { + SwitchListTile( + value: rebootAfterUpgrade ?? false, + onChanged: (final switched) { context .read() .repository @@ -59,20 +60,21 @@ class _ServerSettingsState extends State<_ServerSettings> { allowReboot: switched, ), ); - setState( - () { - rebootAfterUpgrade = switched; - }, - ); + setState(() { + rebootAfterUpgrade = switched; + }); }, - isActive: rebootAfterUpgrade ?? false, - child: _TextColumn( - title: 'providers.server.settings.reboot_after_upgrade'.tr(), - value: 'providers.server.settings.reboot_after_upgrade_hint'.tr(), + title: Text('providers.server.settings.reboot_after_upgrade'.tr()), + subtitle: Text( + 'providers.server.settings.reboot_after_upgrade_hint'.tr(), ), + activeColor: Theme.of(context).colorScheme.primary, ), - const Divider(height: 0), - _Button( + ListTile( + title: Text('providers.server.settings.server_timezone'.tr()), + subtitle: Text( + serverDetailsState.serverTimezone.toString(), + ), onTap: () { Navigator.of(context).push( materialRoute( @@ -80,56 +82,8 @@ class _ServerSettingsState extends State<_ServerSettings> { ), ); }, - child: _TextColumn( - title: 'providers.server.settings.server_timezone'.tr(), - value: serverDetailsState.serverTimezone.toString(), - ), ), ], ); } } - -class _Button extends StatelessWidget { - const _Button({ - required this.onTap, - required this.child, - }); - - final Widget child; - final VoidCallback onTap; - - @override - Widget build(final BuildContext context) => InkWell( - onTap: onTap, - child: Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: child, - ), - ); -} - -class _TextColumn extends StatelessWidget { - const _TextColumn({ - required this.title, - required this.value, - }); - - final String title; - final String value; - @override - Widget build(final BuildContext context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BrandText.body1( - title, - style: Theme.of(context).textTheme.bodyLarge, - ), - const SizedBox(height: 5), - BrandText.body1( - value, - style: Theme.of(context).textTheme.bodyMedium, - ), - ], - ); -} From 159f86196507d3ee59294e5fbe747c1c1bcf545e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 18 Sep 2022 17:29:00 +0300 Subject: [PATCH 098/732] Implement initialization migration to binds error handling --- .../graphql_maps/server_api/volume_api.dart | 31 ++++++++++++++++--- .../cubit/server_jobs/server_jobs_cubit.dart | 10 ++++-- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index e0c68cc4..4865a565 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -1,5 +1,15 @@ part of 'server.dart'; +class MigrateToBindsMutationReturn extends GenericMutationResult { + MigrateToBindsMutationReturn({ + required final super.success, + required final super.code, + final super.message, + this.jobUid, + }); + final String? jobUid; +} + mixin VolumeApi on ApiMap { Future> getServerDiskVolumes() async { QueryResult response; @@ -57,10 +67,11 @@ mixin VolumeApi on ApiMap { } } - Future migrateToBinds( + Future migrateToBinds( final Map serviceToDisk, ) async { - String? jobUid; + MigrateToBindsMutationReturn? mutation; + try { final GraphQLClient client = await getClient(); final input = Input$MigrateToBindsInput( @@ -77,12 +88,22 @@ mixin VolumeApi on ApiMap { await client.mutate$MigrateToBinds( migrateMutation, ); - - jobUid = result.parsedData!.migrateToBinds.job!.uid; + mutation = mutation = MigrateToBindsMutationReturn( + success: result.parsedData!.migrateToBinds.success, + code: result.parsedData!.migrateToBinds.code, + message: result.parsedData!.migrateToBinds.message, + jobUid: result.parsedData!.migrateToBinds.job?.uid, + ); } catch (e) { print(e); + mutation = MigrateToBindsMutationReturn( + success: false, + code: 0, + message: e.toString(), + jobUid: null, + ); } - return jobUid; + return mutation; } } diff --git a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart index 74ce932d..46f04e5b 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; @@ -44,10 +45,15 @@ class ServerJobsCubit } Future migrateToBinds(final Map serviceToDisk) async { - final String? jobUid = await api.migrateToBinds(serviceToDisk); + final result = await api.migrateToBinds(serviceToDisk); + if (!result.success || result.jobUid == null) { + getIt().showSnackBar(result.message!); + return; + } + emit( ServerJobsState( - migrationJobUid: jobUid, + migrationJobUid: result.jobUid, ), ); } From 8017c5ab4c8ab85ab19be8b55e5ff9bc37f8f2f4 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 19:06:17 +0300 Subject: [PATCH 099/732] Show services in Server Storage screen --- .../server_storage_list_item.dart | 106 +++++++++++++----- .../service_migration_list_item.dart | 62 +++++----- .../pages/server_storage/server_storage.dart | 57 ++++++++++ 3 files changed, 171 insertions(+), 54 deletions(-) diff --git a/lib/ui/components/storage_list_items/server_storage_list_item.dart b/lib/ui/components/storage_list_items/server_storage_list_item.dart index 371769a8..1cc07572 100644 --- a/lib/ui/components/storage_list_items/server_storage_list_item.dart +++ b/lib/ui/components/storage_list_items/server_storage_list_item.dart @@ -15,6 +15,55 @@ class ServerStorageListItem extends StatelessWidget { final bool showIcon; final bool dense; + @override + Widget build(final BuildContext context) => ConsumptionListItem( + title: 'providers.storage.disk_usage'.tr( + args: [ + volume.sizeUsed.toString(), + ], + ), + subtitle: 'providers.storage.disk_total'.tr( + args: [ + volume.sizeTotal.toString(), + volume.displayName, + ], + ), + dense: dense, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + percentage: volume.percentage, + icon: Icon( + Icons.storage_outlined, + size: 24, + color: Theme.of(context).colorScheme.onBackground, + ), + ); +} + +class ConsumptionListItem extends StatelessWidget { + const ConsumptionListItem({ + required this.title, + required this.color, + required this.backgroundColor, + required this.percentage, + this.subtitle, + this.rightSideText, + this.icon, + this.dense = false, + final super.key, + }); + + final String title; + final String? subtitle; + final String? rightSideText; + final Color color; + final Color backgroundColor; + final double percentage; + final Widget? icon; + final bool dense; + @override Widget build(final BuildContext context) { final TextStyle? titleStyle = dense @@ -26,45 +75,46 @@ class ServerStorageListItem extends StatelessWidget { : Theme.of(context).textTheme.bodyMedium; return Row( + crossAxisAlignment: CrossAxisAlignment.center, children: [ - if (showIcon) - Icon( - Icons.storage_outlined, - size: 24, - color: Theme.of(context).colorScheme.onBackground, - ), - if (showIcon) const SizedBox(width: 16), + if (icon != null) icon!, + if (icon != null) const SizedBox(width: 16), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.sizeUsed.toString(), - ], - ), - style: titleStyle, + Row( + mainAxisAlignment: rightSideText != null + ? MainAxisAlignment.spaceBetween + : MainAxisAlignment.start, + children: [ + Text( + title, + style: titleStyle, + textAlign: TextAlign.start, + ), + if (rightSideText != null) + Text( + rightSideText!, + style: Theme.of(context).textTheme.bodyMedium, + textAlign: TextAlign.end, + ), + ], ), const SizedBox(height: 4), BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, + value: percentage, + color: color, + backgroundColor: backgroundColor, + height: dense ? 8.0 : 14.0, ), const SizedBox(height: 4), - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.sizeTotal.toString(), - volume.displayName, - ], + if (subtitle != null) + Text( + subtitle!, + style: subtitleStyle, + textAlign: TextAlign.start, ), - style: subtitleStyle, - ), ], ), ), diff --git a/lib/ui/components/storage_list_items/service_migration_list_item.dart b/lib/ui/components/storage_list_items/service_migration_list_item.dart index f6b59663..847d2cf6 100644 --- a/lib/ui/components/storage_list_items/service_migration_list_item.dart +++ b/lib/ui/components/storage_list_items/service_migration_list_item.dart @@ -20,13 +20,47 @@ class ServiceMigrationListItem extends StatelessWidget { @override Widget build(final BuildContext context) => Column( children: [ - _headerRow(context), + ServiceConsumptionTitle(service: service), const SizedBox(height: 16), ..._radioRows(context), ], ); - Widget _headerRow(final BuildContext context) => SizedBox( + List _radioRows(final BuildContext context) { + final List volumeRows = []; + + for (final DiskVolume volume in diskStatus.diskVolumes) { + volumeRows.add( + RadioListTile( + title: Text( + volume.displayName, + ), + contentPadding: EdgeInsets.zero, + activeColor: Theme.of(context).colorScheme.secondary, + dense: true, + value: volume.name, + groupValue: selectedVolume, + onChanged: (final value) { + onChange(value, service.id); + }, + ), + ); + } + + return volumeRows; + } +} + +class ServiceConsumptionTitle extends StatelessWidget { + const ServiceConsumptionTitle({ + required this.service, + final super.key, + }); + + final Service service; + + @override + Widget build(final BuildContext context) => SizedBox( height: 24, child: Padding( padding: const EdgeInsets.symmetric(horizontal: 8), @@ -63,28 +97,4 @@ class ServiceMigrationListItem extends StatelessWidget { ), ), ); - - List _radioRows(final BuildContext context) { - final List volumeRows = []; - - for (final DiskVolume volume in diskStatus.diskVolumes) { - volumeRows.add( - RadioListTile( - title: Text( - volume.displayName, - ), - contentPadding: EdgeInsets.zero, - activeColor: Theme.of(context).colorScheme.secondary, - dense: true, - value: volume.name, - groupValue: selectedVolume, - onChanged: (final value) { - onChange(value, service.id); - }, - ), - ); - } - - return volumeRows; - } } diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index f29e9694..9a83789a 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -1,6 +1,9 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; +import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; @@ -23,6 +26,9 @@ class _ServerStoragePageState extends State { final bool isReady = context.watch().state is ServerInstallationFinished; + final List services = + context.watch().state.services; + if (!isReady) { return BrandHeroScreen( hasBackButton: true, @@ -39,10 +45,17 @@ class _ServerStoragePageState extends State { ...widget.diskStatus.diskVolumes .map( (final volume) => Column( + mainAxisSize: MainAxisSize.min, children: [ ServerStorageSection( volume: volume, diskStatus: widget.diskStatus, + services: services + .where( + (final service) => + service.storageUsage.volume == volume.name, + ) + .toList(), ), const SizedBox(height: 16), const Divider(), @@ -61,18 +74,30 @@ class ServerStorageSection extends StatelessWidget { const ServerStorageSection({ required this.volume, required this.diskStatus, + required this.services, final super.key, }); final DiskVolume volume; final DiskStatus diskStatus; + final List services; @override Widget build(final BuildContext context) => Column( + mainAxisSize: MainAxisSize.min, children: [ ServerStorageListItem( volume: volume, ), + const SizedBox(height: 16), + ...services + .map( + (final service) => ServerConsumptionListTile( + service: service, + volume: volume, + ), + ) + .toList(), if (volume.isResizable) ...[ const SizedBox(height: 16), BrandOutlinedButton( @@ -90,3 +115,35 @@ class ServerStorageSection extends StatelessWidget { ], ); } + +class ServerConsumptionListTile extends StatelessWidget { + const ServerConsumptionListTile({ + required this.service, + required this.volume, + final super.key, + }); + + final Service service; + final DiskVolume volume; + + @override + Widget build(final BuildContext context) => Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: ConsumptionListItem( + title: service.displayName, + icon: SvgPicture.string( + service.svgIcon, + width: 24.0, + height: 24.0, + color: Theme.of(context).colorScheme.onBackground, + ), + rightSideText: service.storageUsage.used.toString(), + percentage: service.storageUsage.used.byte / volume.sizeTotal.byte, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + dense: true, + ), + ); +} From d9b82b1250357deb792ccba32aec6f7a6c88ab62 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 18 Sep 2022 19:26:55 +0300 Subject: [PATCH 100/732] Implement volume extending button --- assets/translations/en.json | 1 + assets/translations/ru.json | 1 + .../cubit/provider_volumes/provider_volume_cubit.dart | 4 ++++ lib/ui/pages/server_storage/extending_volume.dart | 9 ++++++++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 485d4076..8abf8d39 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -203,6 +203,7 @@ "extending_volume_title": "Extending volume", "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner.", + "extending_volume_error": "Couldn't initialize volume extending.", "size": "Size", "euro": "Euro", "data_migration_title": "Data migration", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index a6b4bc59..a8d3f0d5 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -205,6 +205,7 @@ "extending_volume_title": "Расширение хранилища", "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner.", + "extending_volume_error": "Не удалось начать расширение хранилища.", "size": "Размер", "euro": "Евро", "data_migration_title": "Миграция данных", diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index d64a32c8..88f798ca 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -1,3 +1,4 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; @@ -77,6 +78,9 @@ class ApiProviderVolumeCubit ); if (!resized) { + getIt().showSnackBar( + 'providers.storage.extending_volume_error'.tr(), + ); return false; } diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index c0c48b2e..52de1239 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -135,7 +135,14 @@ class _ExtendingVolumePageState extends State { const SizedBox(height: 16), FilledButton( title: 'providers.storage.extend_volume_button.title'.tr(), - onPressed: _isError ? null : () => {}, + onPressed: _isError + ? null + : () => { + context.read().resizeVolume( + widget.diskVolumeToResize, + _currentSliderGbValue.round(), + ), + }, disabled: _isError, ), const SizedBox(height: 16), From 89c907b109fbbcbb5a3de6514a1bc1bf7873efd7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 19:29:06 +0300 Subject: [PATCH 101/732] Make job status an enum --- lib/logic/models/json/server_job.dart | 30 +++++++++++++++++++++++-- lib/logic/models/json/server_job.g.dart | 11 +++++++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 94b9e432..156ebc25 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -30,14 +30,14 @@ class ServerJob { name: serverJob.name, progress: serverJob.progress, result: serverJob.result, - status: serverJob.status, + status: JobStatusEnum.fromString(serverJob.status), statusText: serverJob.statusText, uid: serverJob.uid, updatedAt: serverJob.updatedAt, ); final String name; final String description; - final String status; + final JobStatusEnum status; final String uid; final DateTime updatedAt; final DateTime createdAt; @@ -48,3 +48,29 @@ class ServerJob { final String? statusText; final DateTime? finishedAt; } + +enum JobStatusEnum { + @JsonValue('CREATED') + created, + @JsonValue('RUNNING') + running, + @JsonValue('FINISHED') + finished, + @JsonValue('ERROR') + error; + + factory JobStatusEnum.fromString(final String status) { + switch (status) { + case 'CREATED': + return created; + case 'RUNNING': + return running; + case 'FINISHED': + return finished; + case 'ERROR': + return error; + default: + throw Exception('Unknown status: $status'); + } + } +} diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart index b74590b6..54719f80 100644 --- a/lib/logic/models/json/server_job.g.dart +++ b/lib/logic/models/json/server_job.g.dart @@ -9,7 +9,7 @@ part of 'server_job.dart'; ServerJob _$ServerJobFromJson(Map json) => ServerJob( name: json['name'] as String, description: json['description'] as String, - status: json['status'] as String, + status: $enumDecode(_$JobStatusEnumEnumMap, json['status']), uid: json['uid'] as String, updatedAt: DateTime.parse(json['updatedAt'] as String), createdAt: DateTime.parse(json['createdAt'] as String), @@ -25,7 +25,7 @@ ServerJob _$ServerJobFromJson(Map json) => ServerJob( Map _$ServerJobToJson(ServerJob instance) => { 'name': instance.name, 'description': instance.description, - 'status': instance.status, + 'status': _$JobStatusEnumEnumMap[instance.status]!, 'uid': instance.uid, 'updatedAt': instance.updatedAt.toIso8601String(), 'createdAt': instance.createdAt.toIso8601String(), @@ -35,3 +35,10 @@ Map _$ServerJobToJson(ServerJob instance) => { 'statusText': instance.statusText, 'finishedAt': instance.finishedAt?.toIso8601String(), }; + +const _$JobStatusEnumEnumMap = { + JobStatusEnum.created: 'CREATED', + JobStatusEnum.running: 'RUNNING', + JobStatusEnum.finished: 'FINISHED', + JobStatusEnum.error: 'ERROR', +}; From 35a617065e9be17bc91c705798e3ba6f1d997d09 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 18 Sep 2022 19:31:22 +0300 Subject: [PATCH 102/732] Implement root page pushing after extending volume button --- .../pages/server_storage/extending_volume.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 52de1239..38aed993 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -6,6 +6,8 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; +import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ExtendingVolumePage extends StatefulWidget { const ExtendingVolumePage({ @@ -137,12 +139,16 @@ class _ExtendingVolumePageState extends State { title: 'providers.storage.extend_volume_button.title'.tr(), onPressed: _isError ? null - : () => { - context.read().resizeVolume( - widget.diskVolumeToResize, - _currentSliderGbValue.round(), - ), - }, + : () { + context.read().resizeVolume( + widget.diskVolumeToResize, + _currentSliderGbValue.round(), + ); + Navigator.of(context).pushAndRemoveUntil( + materialRoute(const RootPage()), + (final predicate) => false, + ); + }, disabled: _isError, ), const SizedBox(height: 16), From 34d635c2c598bc8881069ee135399d93ea1d9161 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 18 Sep 2022 19:35:16 +0300 Subject: [PATCH 103/732] Add delay between provider and server storage resizing calls --- lib/logic/cubit/provider_volumes/provider_volume_cubit.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 88f798ca..65c313b1 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -84,6 +84,8 @@ class ApiProviderVolumeCubit return false; } + await Future.delayed(const Duration(seconds: 10)); + await ServerApi().resizeVolume(volume.name); refresh(); return true; From 1817031be8bd0fe3f8157ad19bf93b313d0dbf6c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 20:56:37 +0300 Subject: [PATCH 104/732] Animate color of BrandLinearIndicator --- .../brand_linear_indicator/brand_linear_indicator.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart index 16ffb40a..50104aa0 100644 --- a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart +++ b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart @@ -32,7 +32,9 @@ class BrandLinearIndicator extends StatelessWidget { -(1 - value), 0, ), - child: Container( + child: AnimatedContainer( + duration: const Duration(milliseconds: 400), + curve: Curves.easeInOut, width: constraints.maxWidth, decoration: BoxDecoration( color: color, From 19aab4b57f4294e58bac38c04061c2b084727540 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 20:56:55 +0300 Subject: [PATCH 105/732] Redesign the ServerJobCard --- .../jobs_content/server_job_card.dart | 75 ++++++++++++++++--- 1 file changed, 63 insertions(+), 12 deletions(-) diff --git a/lib/ui/components/jobs_content/server_job_card.dart b/lib/ui/components/jobs_content/server_job_card.dart index 6f8c50fa..1dadb687 100644 --- a/lib/ui/components/jobs_content/server_job_card.dart +++ b/lib/ui/components/jobs_content/server_job_card.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; class ServerJobCard extends StatelessWidget { @@ -12,31 +11,83 @@ class ServerJobCard extends StatelessWidget { final ServerJob serverJob; @override - Widget build(final BuildContext context) => GestureDetector( - child: BrandCards.big( + Widget build(final BuildContext context) { + Color color; + IconData icon; + + switch (serverJob.status) { + case JobStatusEnum.created: + color = Theme.of(context).colorScheme.secondary; + icon = Icons.query_builder_outlined; + break; + case JobStatusEnum.running: + color = Theme.of(context).colorScheme.tertiary; + icon = Icons.pending_outlined; + break; + case JobStatusEnum.finished: + color = Theme.of(context).colorScheme.primary; + icon = Icons.check_circle_outline; + break; + case JobStatusEnum.error: + color = Theme.of(context).colorScheme.error; + icon = Icons.error_outline; + break; + } + + final String? statusString = + serverJob.error ?? serverJob.result ?? serverJob.statusText; + + return GestureDetector( + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - serverJob.name, - style: Theme.of(context).textTheme.bodyMedium, - ), - Text( - serverJob.description, - style: Theme.of(context).textTheme.bodySmall, + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + serverJob.name, + style: Theme.of(context).textTheme.bodyMedium, + ), + Text( + serverJob.description, + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), + const Spacer(), + Icon( + icon, + color: color, + ), + ], ), const SizedBox(height: 8), BrandLinearIndicator( value: serverJob.progress == null ? 0.0 : serverJob.progress! / 100.0, - color: Theme.of(context).colorScheme.secondary, + color: color, backgroundColor: Theme.of(context).colorScheme.surfaceVariant, height: 7.0, ), const SizedBox(height: 8), + if (statusString != null) + Text( + statusString, + style: Theme.of(context).textTheme.labelSmall?.copyWith( + color: Theme.of(context).colorScheme.onSurface, + ), + ), ], ), ), - ); + ), + ); + } } From e330878e6daf09edc60cf1179f1880e7a3c78820 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 23:12:09 +0300 Subject: [PATCH 106/732] Allow removing completed and failed server jobs --- assets/translations/ru.json | 3 +- .../graphql_maps/server_api/jobs_api.dart | 14 +- .../cubit/server_jobs/server_jobs_cubit.dart | 46 +++- .../cubit/server_jobs/server_jobs_state.dart | 18 +- lib/logic/models/json/server_job.dart | 1 + .../components/jobs_content/jobs_content.dart | 228 ++++++++++-------- 6 files changed, 194 insertions(+), 116 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index a8d3f0d5..6ceb70a4 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -482,7 +482,8 @@ "upgradeServer": "Обновить сервер", "rebootServer": "Перезагрузить сервер", "create_ssh_key": "Создать SSH ключ для {}", - "delete_ssh_key": "Удалить SSH ключ для {}" + "delete_ssh_key": "Удалить SSH ключ для {}", + "server_jobs": "Задачи на сервере" }, "validations": { "required": "Обязательное поле.", diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart index 28f362a9..8d731e3e 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -22,14 +22,24 @@ mixin JobsApi on ApiMap { return jobsList; } - Future removeApiJob(final String uid) async { + Future removeApiJob(final String uid) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$RemoveJob(jobId: uid); final mutation = Options$Mutation$RemoveJob(variables: variables); - await client.mutate$RemoveJob(mutation); + final response = await client.mutate$RemoveJob(mutation); + return GenericMutationResult( + success: response.parsedData?.removeJob.success ?? false, + code: response.parsedData?.removeJob.code ?? 0, + message: response.parsedData?.removeJob.message, + ); } catch (e) { print(e); + return GenericMutationResult( + success: false, + code: 0, + message: e.toString(), + ); } } } diff --git a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart index 46f04e5b..43b2b2d5 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart @@ -14,7 +14,7 @@ class ServerJobsCubit ServerJobsCubit(final ServerInstallationCubit serverInstallationCubit) : super( serverInstallationCubit, - const ServerJobsState(), + ServerJobsState(), ); Timer? timer; @@ -23,7 +23,7 @@ class ServerJobsCubit @override void clear() async { emit( - const ServerJobsState(), + ServerJobsState(), ); if (timer != null && timer!.isActive) { timer!.cancel(); @@ -40,7 +40,7 @@ class ServerJobsCubit serverJobList: jobs, ), ); - timer = Timer(const Duration(seconds: 10), () => reload(useTimer: true)); + timer = Timer(const Duration(seconds: 5), () => reload(useTimer: true)); } } @@ -72,6 +72,44 @@ class ServerJobsCubit return job; } + /// Get the job object and change its isHidden to true. + /// Emit the new state. + /// Call the api to remove the job. + /// If the api call fails, change the isHidden to false and emit the new state. + /// If the api call succeeds, remove the job from the list and emit the new state. + Future removeServerJob(final String uid) async { + final ServerJob? job = getServerJobByUid(uid); + if (job == null) { + return; + } + + job.isHidden = true; + emit( + ServerJobsState( + serverJobList: state.serverJobList, + ), + ); + + final result = await api.removeApiJob(uid); + if (!result.success) { + job.isHidden = false; + emit( + ServerJobsState( + serverJobList: state.serverJobList, + ), + ); + getIt().showSnackBar(result.message!); + return; + } + + state.serverJobList.remove(job); + emit( + ServerJobsState( + serverJobList: state.serverJobList, + ), + ); + } + Future reload({final bool useTimer = false}) async { final List jobs = await api.getServerJobs(); emit( @@ -80,7 +118,7 @@ class ServerJobsCubit ), ); if (useTimer) { - timer = Timer(const Duration(seconds: 10), () => reload(useTimer: true)); + timer = Timer(const Duration(seconds: 5), () => reload(useTimer: true)); } } } diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index bf7d0adb..25d8deab 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -1,22 +1,28 @@ part of 'server_jobs_cubit.dart'; class ServerJobsState extends ServerInstallationDependendState { - const ServerJobsState({ - this.serverJobList = const [], + ServerJobsState({ + final serverJobList = const [], this.migrationJobUid, - }); - final List serverJobList; + }) { + _serverJobList = serverJobList; + } + + late final List _serverJobList; final String? migrationJobUid; + List get serverJobList => + _serverJobList.where((final ServerJob job) => !job.isHidden).toList(); + @override - List get props => [migrationJobUid, ...serverJobList]; + List get props => [migrationJobUid, ..._serverJobList]; ServerJobsState copyWith({ final List? serverJobList, final String? migrationJobUid, }) => ServerJobsState( - serverJobList: serverJobList ?? this.serverJobList, + serverJobList: serverJobList ?? _serverJobList, migrationJobUid: migrationJobUid ?? this.migrationJobUid, ); } diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 156ebc25..67bbfca4 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -47,6 +47,7 @@ class ServerJob { final String? result; final String? statusText; final DateTime? finishedAt; + bool isHidden = false; } enum JobStatusEnum { diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index f7063230..58fffd74 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -6,6 +6,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; @@ -18,118 +19,139 @@ class JobsContent extends StatelessWidget { const JobsContent({final super.key}); @override - Widget build(final BuildContext context) => BlocBuilder( - builder: (final context, final state) { - late List widgets; - final ServerInstallationState installationState = - context.read().state; - if (state is JobsStateEmpty) { - widgets = [ - const SizedBox(height: 80), - Center(child: BrandText.body1('jobs.empty'.tr())), - ]; + Widget build(final BuildContext context) { + final List serverJobs = + context.watch().state.serverJobList; - if (installationState is ServerInstallationFinished) { - widgets = [ - ...widgets, - const SizedBox(height: 80), - BrandButton.rised( - onPressed: () => context.read().upgradeServer(), - text: 'jobs.upgradeServer'.tr(), - ), - const SizedBox(height: 10), - BrandButton.text( - onPressed: () { - final NavigationService nav = getIt(); - nav.showPopUpDialog( - BrandAlert( - title: 'jobs.rebootServer'.tr(), - contentText: 'modals.3'.tr(), - actions: [ - ActionButton( - text: 'basis.cancel'.tr(), - ), - ActionButton( - onPressed: () => - {context.read().rebootServer()}, - text: 'modals.9'.tr(), - ) - ], - ), - ); - }, - title: 'jobs.rebootServer'.tr(), - ), - ]; - } - } else if (state is JobsStateLoading) { + return BlocBuilder( + builder: (final context, final state) { + late List widgets; + final ServerInstallationState installationState = + context.read().state; + if (state is JobsStateEmpty) { + widgets = [ + const SizedBox(height: 80), + Center(child: BrandText.body1('jobs.empty'.tr())), + ]; + + if (installationState is ServerInstallationFinished) { widgets = [ + ...widgets, const SizedBox(height: 80), - BrandLoader.horizontal(), - ]; - } else if (state is JobsStateWithJobs) { - widgets = [ - ...state.clientJobList - .map( - (final j) => Row( - children: [ - Expanded( - child: BrandCards.small( - child: Text(j.title), - ), + BrandButton.rised( + onPressed: () => context.read().upgradeServer(), + text: 'jobs.upgradeServer'.tr(), + ), + const SizedBox(height: 10), + BrandButton.text( + onPressed: () { + final NavigationService nav = getIt(); + nav.showPopUpDialog( + BrandAlert( + title: 'jobs.rebootServer'.tr(), + contentText: 'modals.3'.tr(), + actions: [ + ActionButton( + text: 'basis.cancel'.tr(), ), - const SizedBox(width: 10), - ElevatedButton( - style: ElevatedButton.styleFrom( - primary: - Theme.of(context).colorScheme.errorContainer, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), + ActionButton( onPressed: () => - context.read().removeJob(j.id), - child: Text( - 'basis.remove'.tr(), - style: TextStyle( - color: Theme.of(context) - .colorScheme - .onErrorContainer, - ), - ), - ), + {context.read().rebootServer()}, + text: 'modals.9'.tr(), + ) ], ), - ) - .toList(), - const SizedBox(height: 20), - BrandButton.rised( - onPressed: () => context.read().applyAll(), - text: 'jobs.start'.tr(), + ); + }, + title: 'jobs.rebootServer'.tr(), ), ]; } - return ListView( - padding: paddingH15V0, - children: [ - const SizedBox(height: 15), - Center( - child: BrandText.h2( - 'jobs.title'.tr(), - ), - ), - const SizedBox(height: 20), - ...widgets, - const SizedBox(height: 8), - const Divider(), - const SizedBox(height: 8), - ...context.read().state.serverJobList.map( - (final job) => ServerJobCard( - serverJob: job, - ), + } else if (state is JobsStateLoading) { + widgets = [ + const SizedBox(height: 80), + BrandLoader.horizontal(), + ]; + } else if (state is JobsStateWithJobs) { + widgets = [ + ...state.clientJobList + .map( + (final j) => Row( + children: [ + Expanded( + child: BrandCards.small( + child: Text(j.title), + ), + ), + const SizedBox(width: 10), + ElevatedButton( + style: ElevatedButton.styleFrom( + primary: Theme.of(context).colorScheme.errorContainer, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + onPressed: () => + context.read().removeJob(j.id), + child: Text( + 'basis.remove'.tr(), + style: TextStyle( + color: + Theme.of(context).colorScheme.onErrorContainer, + ), + ), + ), + ], ), - ], - ); - }, - ); + ) + .toList(), + const SizedBox(height: 20), + BrandButton.rised( + onPressed: () => context.read().applyAll(), + text: 'jobs.start'.tr(), + ), + ]; + } + return ListView( + padding: paddingH15V0, + children: [ + const SizedBox(height: 15), + Center( + child: BrandText.h2( + 'jobs.title'.tr(), + ), + ), + const SizedBox(height: 20), + ...widgets, + const SizedBox(height: 8), + const Divider(height: 0), + const SizedBox(height: 8), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'jobs.server_jobs'.tr(), + style: Theme.of(context).textTheme.titleMedium, + ), + ), + ...serverJobs.map( + (final job) => Dismissible( + key: ValueKey(job.uid), + direction: job.status == JobStatusEnum.finished || + job.status == JobStatusEnum.error + ? DismissDirection.horizontal + : DismissDirection.none, + child: ServerJobCard( + serverJob: job, + ), + onDismissed: (final direction) { + context.read().removeServerJob(job.uid); + }, + ), + ), + const SizedBox(height: 24), + ], + ); + }, + ); + } } From a0b365f496ec99aa1464c98e05af38e2e922a241 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 23:12:25 +0300 Subject: [PATCH 107/732] Add missing translation string --- assets/translations/en.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 8abf8d39..9fb5d729 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -489,7 +489,8 @@ "upgradeServer": "Upgrade server", "rebootServer": "Reboot server", "create_ssh_key": "Create SSH key for {}", - "delete_ssh_key": "Delete SSH key for {}" + "delete_ssh_key": "Delete SSH key for {}", + "server_jobs": "Jobs on the server" }, "validations": { "required": "Required.", From 900e07f364b9407b4e2e9a133441f9c39f778215 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 18 Sep 2022 23:25:26 +0300 Subject: [PATCH 108/732] Implement user password reset --- assets/translations/ru.json | 3 +- .../cubit/client_jobs/client_jobs_cubit.dart | 3 + .../cubit/forms/user/user_form_cubit.dart | 53 ++++++++---- lib/logic/models/job.dart | 11 +++ lib/ui/pages/users/reset_password.dart | 84 +++++++++++++++++++ lib/ui/pages/users/user_details.dart | 12 ++- lib/ui/pages/users/users.dart | 1 + 7 files changed, 150 insertions(+), 17 deletions(-) create mode 100644 lib/ui/pages/users/reset_password.dart diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 6ceb70a4..4c92f22c 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -483,7 +483,8 @@ "rebootServer": "Перезагрузить сервер", "create_ssh_key": "Создать SSH ключ для {}", "delete_ssh_key": "Удалить SSH ключ для {}", - "server_jobs": "Задачи на сервере" + "server_jobs": "Задачи на сервере", + "resetUserPassword": "Сбросить пароль пользователя" }, "validations": { "required": "Обязательное поле.", diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index 7461a6df..49b856ff 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -121,6 +121,9 @@ class JobsCubit extends Cubit { if (job is DeleteSSHKeyJob) { await usersCubit.deleteSshKey(job.user, job.publicKey); } + if (job is ResetUserPasswordJob) { + await usersCubit.changeUserPassword(job.user, job.user.password!); + } } await api.pullConfigurationUpdate(); diff --git a/lib/logic/cubit/forms/user/user_form_cubit.dart b/lib/logic/cubit/forms/user/user_form_cubit.dart index d745b5f5..c60fef9e 100644 --- a/lib/logic/cubit/forms/user/user_form_cubit.dart +++ b/lib/logic/cubit/forms/user/user_form_cubit.dart @@ -11,28 +11,50 @@ class UserFormCubit extends FormCubit { UserFormCubit({ required this.jobsCubit, required final FieldCubitFactory fieldFactory, - final User? user, + final this.initialUser, }) { - final bool isEdit = user != null; + if (initialUser == null) { + login = fieldFactory.createUserLoginField(); + login.setValue(''); + password = fieldFactory.createUserPasswordField(); + password.setValue( + StringGenerators.userPassword(), + ); - login = fieldFactory.createUserLoginField(); - login.setValue(isEdit ? user.login : ''); - password = fieldFactory.createUserPasswordField(); - password.setValue( - isEdit ? (user.password ?? '') : StringGenerators.userPassword(), - ); + super.addFields([login, password]); + } else { + login = fieldFactory.createRequiredStringField(); + login.setValue(initialUser!.login); + password = fieldFactory.createUserPasswordField(); + password.setValue( + initialUser?.password ?? '', + ); - super.addFields([login, password]); + super.addFields([login, password]); + } } @override FutureOr onSubmit() { - final User user = User( - login: login.state.value, - type: UserType.normal, - password: password.state.value, - ); - jobsCubit.addJob(CreateUserJob(user: user)); + print('onSubmit'); + print('initialUser: $initialUser'); + print('login: ${login.state.value}'); + print('password: ${password.state.value}'); + if (initialUser == null) { + final User user = User( + login: login.state.value, + type: UserType.normal, + password: password.state.value, + ); + jobsCubit.addJob(CreateUserJob(user: user)); + } else { + final User user = User( + login: initialUser?.login ?? login.state.value, + type: initialUser?.type ?? UserType.normal, + password: password.state.value, + ); + jobsCubit.addJob(ResetUserPasswordJob(user: user)); + } } late FieldCubit login; @@ -43,4 +65,5 @@ class UserFormCubit extends FormCubit { } final JobsCubit jobsCubit; + final User? initialUser; } diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index 6ea31588..2d62a305 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -31,6 +31,17 @@ class CreateUserJob extends ClientJob { List get props => [id, title, user]; } +class ResetUserPasswordJob extends ClientJob { + ResetUserPasswordJob({ + required this.user, + }) : super(title: '${"jobs.resetUserPassword".tr()} ${user.login}'); + + final User user; + + @override + List get props => [id, title, user]; +} + class DeleteUserJob extends ClientJob { DeleteUserJob({ required this.user, diff --git a/lib/ui/pages/users/reset_password.dart b/lib/ui/pages/users/reset_password.dart new file mode 100644 index 00000000..841a9353 --- /dev/null +++ b/lib/ui/pages/users/reset_password.dart @@ -0,0 +1,84 @@ +part of 'users.dart'; + +class ResetPassword extends StatelessWidget { + const ResetPassword({ + required this.user, + final super.key, + }); + + final User user; + + @override + Widget build(final BuildContext context) => BrandBottomSheet( + child: BlocProvider( + create: (final BuildContext context) => UserFormCubit( + jobsCubit: context.read(), + fieldFactory: FieldCubitFactory(context), + initialUser: user, + ), + child: Builder( + builder: (final BuildContext context) { + final FormCubitState formCubitState = + context.watch().state; + + return BlocListener( + listener: + (final BuildContext context, final FormCubitState state) { + if (state.isSubmitted) { + Navigator.pop(context); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + BrandHeader( + title: 'users.reset_password'.tr(), + ), + const SizedBox(width: 14), + Padding( + padding: paddingH15V0, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + CubitFormTextField( + formFieldCubit: + context.read().password, + decoration: InputDecoration( + alignLabelWithHint: false, + labelText: 'basis.password'.tr(), + suffixIcon: Padding( + padding: const EdgeInsets.only(right: 8), + child: IconButton( + icon: Icon( + BrandIcons.refresh, + color: + Theme.of(context).colorScheme.secondary, + ), + onPressed: context + .read() + .genNewPassword, + ), + ), + ), + ), + const SizedBox(height: 30), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => + context.read().trySubmit(), + text: 'basis.apply'.tr(), + ), + const SizedBox(height: 30), + ], + ), + ), + ], + ), + ); + }, + ), + ), + ); +} diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 24f2457f..86a9e3d7 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -43,7 +43,17 @@ class UserDetails extends StatelessWidget { const SizedBox(height: 8), ListTile( iconColor: Theme.of(context).colorScheme.onBackground, - onTap: () => {}, + onTap: () => { + showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => Padding( + padding: MediaQuery.of(context).viewInsets, + child: ResetPassword(user: user), + ), + ), + }, leading: const Icon(Icons.lock_reset_outlined), title: Text( 'users.reset_password'.tr(), diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 7e255935..40443a9c 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -31,6 +31,7 @@ part 'new_user.dart'; part 'user.dart'; part 'user_details.dart'; part 'add_user_fab.dart'; +part 'reset_password.dart'; class UsersPage extends StatelessWidget { const UsersPage({final super.key}); From 2a4c691f1e8cfb892451b313424d291b8f168cc0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 19 Sep 2022 01:11:26 +0300 Subject: [PATCH 109/732] Pre-release testing bug fixes --- assets/translations/en.json | 5 +-- assets/translations/ru.json | 2 +- .../provider_volume_cubit.dart | 33 ++++++++++++++++--- .../provider_volume_state.dart | 7 ++-- .../server_volumes/server_volume_cubit.dart | 4 +-- .../jobs_content/server_job_card.dart | 28 ++++++++-------- .../data_to_binds_migration.dart | 18 ++++++++-- .../server_storage/extending_volume.dart | 11 +++++-- 8 files changed, 77 insertions(+), 31 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 9fb5d729..3c849eff 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -202,7 +202,7 @@ "extend_volume_button": "Extend volume", "extending_volume_title": "Extending volume", "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", - "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner.", + "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner. Server will be rebooted after resizing.", "extending_volume_error": "Couldn't initialize volume extending.", "size": "Size", "euro": "Euro", @@ -490,7 +490,8 @@ "rebootServer": "Reboot server", "create_ssh_key": "Create SSH key for {}", "delete_ssh_key": "Delete SSH key for {}", - "server_jobs": "Jobs on the server" + "server_jobs": "Jobs on the server", + "resetUserPassword": "Reset password of user" }, "validations": { "required": "Required.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 4c92f22c..ce2d6231 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -204,7 +204,7 @@ "extend_volume_button": "Расширить хранилище", "extending_volume_title": "Расширение хранилища", "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", - "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner.", + "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner. Сервер будет перезагружен во время процесса.", "extending_volume_error": "Не удалось начать расширение хранилища.", "size": "Размер", "euro": "Евро", diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 65c313b1..6a1c7d16 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -17,6 +17,8 @@ class ApiProviderVolumeCubit VolumeProviderApiFactory? providerApi; + final ServerApi serverApi = ServerApi(); + @override Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { @@ -34,23 +36,23 @@ class ApiProviderVolumeCubit providerApi!.getVolumeProvider().getPricePerGb(); Future refresh() async { - emit(const ApiProviderVolumeState([], LoadingStatus.refreshing)); + emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); _refetch(); } Future _refetch() async { if (providerApi == null) { - return emit(const ApiProviderVolumeState([], LoadingStatus.error)); + return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } final List volumes = await providerApi!.getVolumeProvider().getVolumes(); if (volumes.isEmpty) { - return emit(const ApiProviderVolumeState([], LoadingStatus.error)); + return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } - emit(ApiProviderVolumeState(volumes, LoadingStatus.success)); + emit(ApiProviderVolumeState(volumes, LoadingStatus.success, false)); } Future attachVolume(final DiskVolume volume) async { @@ -71,7 +73,12 @@ class ApiProviderVolumeCubit Future resizeVolume( final DiskVolume volume, final int newSizeGb, + final Function() callback, ) async { + getIt().showSnackBar( + 'Starting resize', + ); + emit(state.copyWith(isResizing: true)); final bool resized = await providerApi!.getVolumeProvider().resizeVolume( volume.providerVolume!.id, newSizeGb, @@ -81,13 +88,29 @@ class ApiProviderVolumeCubit getIt().showSnackBar( 'providers.storage.extending_volume_error'.tr(), ); + emit(state.copyWith(isResizing: false)); return false; } + getIt().showSnackBar( + 'Hetzner resized, waiting 10 seconds', + ); await Future.delayed(const Duration(seconds: 10)); await ServerApi().resizeVolume(volume.name); - refresh(); + getIt().showSnackBar( + 'Server api resized, waiting 20 seconds', + ); + + await Future.delayed(const Duration(seconds: 20)); + getIt().showSnackBar( + 'Restarting server', + ); + + await refresh(); + emit(state.copyWith(isResizing: false)); + await callback(); + await serverApi.reboot(); return true; } diff --git a/lib/logic/cubit/provider_volumes/provider_volume_state.dart b/lib/logic/cubit/provider_volumes/provider_volume_state.dart index 16a3f177..406eaaad 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_state.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_state.dart @@ -1,22 +1,25 @@ part of 'provider_volume_cubit.dart'; class ApiProviderVolumeState extends ServerInstallationDependendState { - const ApiProviderVolumeState(this._volumes, this.status); + const ApiProviderVolumeState(this._volumes, this.status, this.isResizing); const ApiProviderVolumeState.initial() - : this(const [], LoadingStatus.uninitialized); + : this(const [], LoadingStatus.uninitialized, false); final List _volumes; final LoadingStatus status; + final bool isResizing; List get volumes => _volumes; ApiProviderVolumeState copyWith({ final List? volumes, final LoadingStatus? status, + final bool? isResizing, }) => ApiProviderVolumeState( volumes ?? _volumes, status ?? this.status, + isResizing ?? this.isResizing, ); @override diff --git a/lib/logic/cubit/server_volumes/server_volume_cubit.dart b/lib/logic/cubit/server_volumes/server_volume_cubit.dart index ca6dbb6e..e48a809e 100644 --- a/lib/logic/cubit/server_volumes/server_volume_cubit.dart +++ b/lib/logic/cubit/server_volumes/server_volume_cubit.dart @@ -24,7 +24,7 @@ class ApiServerVolumeCubit @override Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { - _refetch(); + reload(); } } @@ -43,7 +43,7 @@ class ApiServerVolumeCubit return; } - Future _refetch() async { + Future reload() async { final volumes = await serverApi.getServerDiskVolumes(); final usesBinds = await serverApi.isUsingBinds(); var status = LoadingStatus.error; diff --git a/lib/ui/components/jobs_content/server_job_card.dart b/lib/ui/components/jobs_content/server_job_card.dart index 1dadb687..46e21166 100644 --- a/lib/ui/components/jobs_content/server_job_card.dart +++ b/lib/ui/components/jobs_content/server_job_card.dart @@ -46,21 +46,23 @@ class ServerJobCard extends StatelessWidget { children: [ Row( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - serverJob.name, - style: Theme.of(context).textTheme.bodyMedium, - ), - Text( - serverJob.description, - style: Theme.of(context).textTheme.bodySmall, - ), - ], + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + serverJob.name, + style: Theme.of(context).textTheme.bodyMedium, + ), + Text( + serverJob.description, + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), ), - const Spacer(), Icon( icon, color: color, diff --git a/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart b/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart index a88b70cb..c984dd5b 100644 --- a/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart @@ -3,13 +3,16 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; +import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/ui/components/storage_list_items/service_migration_list_item.dart'; -import 'package:selfprivacy/ui/pages/server_storage/binds_migration/migration_process_page.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; +import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class DataToBindsMigrationPage extends StatefulWidget { @@ -162,8 +165,17 @@ class _DataToBindsMigrationPageState extends State { title: 'providers.storage.start_migration_button'.tr(), onPressed: () { context.read().migrateToBinds(serviceToDisk); - Navigator.of(context).push( - materialRoute(const MigrationProcessPage()), + Navigator.of(context).pushAndRemoveUntil( + materialRoute(const RootPage()), + (final predicate) => false, + ); + showBrandBottomSheet( + context: context, + builder: (final BuildContext context) => + const BrandBottomSheet( + isExpended: true, + child: JobsContent(), + ), ); }, ), diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 38aed993..1c8980e2 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; @@ -26,7 +27,7 @@ class ExtendingVolumePage extends StatefulWidget { class _ExtendingVolumePageState extends State { @override void initState() { - minSize = widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(2); + minSize = widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(3); _currentSliderGbValue = minSize.gibibyte; super.initState(); } @@ -73,11 +74,14 @@ class _ExtendingVolumePageState extends State { (_euroPerGb * double.parse(_sizeController.text)) .toStringAsFixed(2); minSize = - widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(2); + widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(3); if (_currentSliderGbValue < 0) { _currentSliderGbValue = minSize.gibibyte; } + final isAlreadyResizing = + context.watch().state.isResizing; + return BrandHeroScreen( hasBackButton: true, heroTitle: 'providers.storage.extending_volume_title'.tr(), @@ -143,13 +147,14 @@ class _ExtendingVolumePageState extends State { context.read().resizeVolume( widget.diskVolumeToResize, _currentSliderGbValue.round(), + context.read().reload, ); Navigator.of(context).pushAndRemoveUntil( materialRoute(const RootPage()), (final predicate) => false, ); }, - disabled: _isError, + disabled: _isError || isAlreadyResizing, ), const SizedBox(height: 16), const Divider( From fe95f5e5d3e1cd8c01f5b48ea69085aa94438a7b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Sep 2022 02:13:25 +0300 Subject: [PATCH 110/732] Add props into provider job state --- lib/logic/cubit/provider_volumes/provider_volume_state.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/cubit/provider_volumes/provider_volume_state.dart b/lib/logic/cubit/provider_volumes/provider_volume_state.dart index 406eaaad..3858ef14 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_state.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_state.dart @@ -23,5 +23,5 @@ class ApiProviderVolumeState extends ServerInstallationDependendState { ); @override - List get props => [_volumes]; + List get props => [_volumes, status, isResizing]; } From d6d7a0dcb611c244c6141b7aa5837d659c18372b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Sep 2022 02:42:21 +0300 Subject: [PATCH 111/732] Implement rebuild server job for settings page --- .../server_api/server_actions_api.dart | 14 ++++------- .../cubit/client_jobs/client_jobs_cubit.dart | 4 ++++ lib/logic/models/job.dart | 7 ++++++ .../server_details/server_details_screen.dart | 2 ++ .../pages/server_details/server_settings.dart | 23 +++++++++++++++++++ 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart index 07ca101d..780f1d37 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart @@ -24,9 +24,7 @@ mixin ServerActionsApi on ApiMap { try { final GraphQLClient client = await getClient(); return await _commonBoolRequest( - () async { - await client.mutate$RebootSystem(); - }, + () async => client.mutate$RebootSystem(), ); } catch (e) { return false; @@ -37,9 +35,7 @@ mixin ServerActionsApi on ApiMap { try { final GraphQLClient client = await getClient(); return await _commonBoolRequest( - () async { - await client.mutate$PullRepositoryChanges(); - }, + () async => client.mutate$PullRepositoryChanges(), ); } catch (e) { return false; @@ -49,10 +45,8 @@ mixin ServerActionsApi on ApiMap { Future upgrade() async { try { final GraphQLClient client = await getClient(); - return await _commonBoolRequest( - () async { - await client.mutate$RunSystemUpgrade(); - }, + return _commonBoolRequest( + () async => client.mutate$RunSystemUpgrade(), ); } catch (e) { return false; diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index 49b856ff..4fa610cd 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -105,6 +105,7 @@ class JobsCubit extends Cubit { emit(JobsStateLoading()); bool hasServiceJobs = false; for (final ClientJob job in jobs) { + // TODO: Rewrite to polymorphism if (job is CreateUserJob) { await usersCubit.createUser(job.user); } @@ -124,6 +125,9 @@ class JobsCubit extends Cubit { if (job is ResetUserPasswordJob) { await usersCubit.changeUserPassword(job.user, job.user.password!); } + if (job is RebuildServerJob) { + await upgradeServer(); + } } await api.pullConfigurationUpdate(); diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index 2d62a305..1dc1bd91 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -20,6 +20,13 @@ class ClientJob extends Equatable { List get props => [id, title]; } +class RebuildServerJob extends ClientJob { + RebuildServerJob({ + required final super.title, + final super.id, + }); +} + class CreateUserJob extends ClientJob { CreateUserJob({ required this.user, diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 367d8de8..24675dad 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -3,11 +3,13 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; +import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index 9a35e74a..38c7133b 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -10,6 +10,7 @@ class _ServerSettings extends StatefulWidget { class _ServerSettingsState extends State<_ServerSettings> { bool? allowAutoUpgrade; bool? rebootAfterUpgrade; + bool? didSomethingChange; @override Widget build(final BuildContext context) { @@ -24,11 +25,18 @@ class _ServerSettingsState extends State<_ServerSettings> { rebootAfterUpgrade = serverDetailsState.autoUpgradeSettings.allowReboot; } + didSomethingChange ??= false; + return Column( children: [ SwitchListTile( value: allowAutoUpgrade ?? false, onChanged: (final switched) { + if (didSomethingChange == false) { + context.read().addJob( + RebuildServerJob(title: 'jobs.upgradeServer'.tr()), + ); + } context .read() .repository @@ -40,6 +48,7 @@ class _ServerSettingsState extends State<_ServerSettings> { ); setState(() { allowAutoUpgrade = switched; + didSomethingChange = true; }); }, title: Text('providers.server.settings.allow_autoupgrade'.tr()), @@ -51,6 +60,11 @@ class _ServerSettingsState extends State<_ServerSettings> { SwitchListTile( value: rebootAfterUpgrade ?? false, onChanged: (final switched) { + if (didSomethingChange == false) { + context.read().addJob( + RebuildServerJob(title: 'jobs.upgradeServer'.tr()), + ); + } context .read() .repository @@ -62,6 +76,7 @@ class _ServerSettingsState extends State<_ServerSettings> { ); setState(() { rebootAfterUpgrade = switched; + didSomethingChange = true; }); }, title: Text('providers.server.settings.reboot_after_upgrade'.tr()), @@ -76,6 +91,14 @@ class _ServerSettingsState extends State<_ServerSettings> { serverDetailsState.serverTimezone.toString(), ), onTap: () { + if (didSomethingChange == false) { + context.read().addJob( + RebuildServerJob(title: 'jobs.upgradeServer'.tr()), + ); + } + setState(() { + didSomethingChange = true; + }); Navigator.of(context).push( materialRoute( const SelectTimezone(), From 10891881ae3c8bb605635f3112455edf94365ef3 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 19 Sep 2022 03:21:08 +0300 Subject: [PATCH 112/732] Service migrations --- .../cubit/server_jobs/server_jobs_state.dart | 7 +++-- lib/logic/cubit/services/services_cubit.dart | 22 ++++++++++++++- lib/logic/cubit/services/services_state.dart | 19 ++++++++++++- .../components/jobs_content/jobs_content.dart | 13 ++++----- lib/ui/pages/more/more.dart | 5 ++-- ...migration.dart => services_migration.dart} | 27 ++++++++++++++----- lib/ui/pages/services/service_page.dart | 20 +++++++++++++- 7 files changed, 94 insertions(+), 19 deletions(-) rename lib/ui/pages/server_storage/binds_migration/{data_to_binds_migration.dart => services_migration.dart} (87%) diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index 25d8deab..cf9cb8e0 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -11,8 +11,11 @@ class ServerJobsState extends ServerInstallationDependendState { late final List _serverJobList; final String? migrationJobUid; - List get serverJobList => - _serverJobList.where((final ServerJob job) => !job.isHidden).toList(); + List get serverJobList { + final List list = _serverJobList; + list.sort((final a, final b) => b.createdAt.compareTo(a.createdAt)); + return list; + } @override List get props => [migrationJobUid, ..._serverJobList]; diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart index c423fd9f..4bb575a6 100644 --- a/lib/logic/cubit/services/services_cubit.dart +++ b/lib/logic/cubit/services/services_cubit.dart @@ -19,6 +19,7 @@ class ServicesCubit extends ServerInstallationDependendCubit { emit( ServicesState( services: services, + lockedServices: const [], ), ); timer = Timer(const Duration(seconds: 10), () => reload(useTimer: true)); @@ -28,7 +29,7 @@ class ServicesCubit extends ServerInstallationDependendCubit { Future reload({final bool useTimer = false}) async { final List services = await api.getAllServices(); emit( - ServicesState( + state.copyWith( services: services, ), ); @@ -38,7 +39,26 @@ class ServicesCubit extends ServerInstallationDependendCubit { } Future restart(final String serviceId) async { + emit(state.copyWith(lockedServices: [...state.lockedServices, serviceId])); await api.restartService(serviceId); + await Future.delayed(const Duration(seconds: 2)); + reload(); + await Future.delayed(const Duration(seconds: 10)); + emit( + state.copyWith( + lockedServices: state.lockedServices + .where((final element) => element != serviceId) + .toList(), + ), + ); + reload(); + } + + Future moveService( + final String serviceId, + final String destination, + ) async { + await api.moveService(serviceId, destination); } @override diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index 07b82e45..d5aa95eb 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -3,11 +3,18 @@ part of 'services_cubit.dart'; class ServicesState extends ServerInstallationDependendState { const ServicesState({ required this.services, + required this.lockedServices, }); - const ServicesState.empty() : this(services: const []); + const ServicesState.empty() + : this(services: const [], lockedServices: const []); final List services; + final List lockedServices; + + bool isServiceLocked(final String serviceId) => + lockedServices.contains(serviceId); + bool get isPasswordManagerEnable => services .firstWhere( (final service) => service.id == 'bitwarden', @@ -53,6 +60,7 @@ class ServicesState extends ServerInstallationDependendState { @override List get props => [ services, + lockedServices, ]; bool isEnableByType(final ServiceTypes type) { @@ -71,4 +79,13 @@ class ServicesState extends ServerInstallationDependendState { throw Exception('wrong state'); } } + + ServicesState copyWith({ + final List? services, + final List? lockedServices, + }) => + ServicesState( + services: services ?? this.services, + lockedServices: lockedServices ?? this.lockedServices, + ); } diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index 58fffd74..d43a194c 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -126,13 +126,14 @@ class JobsContent extends StatelessWidget { const SizedBox(height: 8), const Divider(height: 0), const SizedBox(height: 8), - Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - 'jobs.server_jobs'.tr(), - style: Theme.of(context).textTheme.titleMedium, + if (serverJobs.isNotEmpty) + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'jobs.server_jobs'.tr(), + style: Theme.of(context).textTheme.titleMedium, + ), ), - ), ...serverJobs.map( (final job) => Dismissible( key: ValueKey(job.uid), diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index eeedd4d8..2dcdd40d 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; -import 'package:selfprivacy/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart'; +import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; import 'package:selfprivacy/ui/pages/setup/initializing.dart'; import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; @@ -50,7 +50,7 @@ class MorePage extends StatelessWidget { _MoreMenuItem( title: 'providers.storage.start_migration_button'.tr(), iconData: Icons.drive_file_move_outline, - goTo: DataToBindsMigrationPage( + goTo: ServicesMigrationPage( diskStatus: context .watch() .state @@ -68,6 +68,7 @@ class MorePage extends StatelessWidget { service.id == 'nextcloud', ) .toList(), + isMigration: true, ), subtitle: 'not_ready_card.in_menu'.tr(), accent: true, diff --git a/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart similarity index 87% rename from lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart rename to lib/ui/pages/server_storage/binds_migration/services_migration.dart index c984dd5b..9783a479 100644 --- a/lib/ui/pages/server_storage/binds_migration/data_to_binds_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -1,6 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; @@ -15,22 +16,23 @@ import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; -class DataToBindsMigrationPage extends StatefulWidget { - const DataToBindsMigrationPage({ +class ServicesMigrationPage extends StatefulWidget { + const ServicesMigrationPage({ required this.services, required this.diskStatus, + required this.isMigration, final super.key, }); final DiskStatus diskStatus; final List services; + final bool isMigration; @override - State createState() => - _DataToBindsMigrationPageState(); + State createState() => _ServicesMigrationPageState(); } -class _DataToBindsMigrationPageState extends State { +class _ServicesMigrationPageState extends State { /// Service id to target migration disk name final Map serviceToDisk = {}; @@ -164,7 +166,20 @@ class _DataToBindsMigrationPageState extends State { FilledButton( title: 'providers.storage.start_migration_button'.tr(), onPressed: () { - context.read().migrateToBinds(serviceToDisk); + if (widget.isMigration) { + context.read().migrateToBinds( + serviceToDisk, + ); + } else { + for (final service in widget.services) { + if (serviceToDisk[service.id] != null) { + context.read().moveService( + service.id, + serviceToDisk[service.id]!, + ); + } + } + } Navigator.of(context).pushAndRemoveUntil( materialRoute(const RootPage()), (final predicate) => false, diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 82dde3dc..417f1bf2 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -9,6 +9,8 @@ import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:url_launcher/url_launcher.dart'; class ServicePage extends StatefulWidget { @@ -40,6 +42,9 @@ class _ServicePageState extends State { final bool serviceDisabled = service.status == ServiceStatus.inactive || service.status == ServiceStatus.off; + final bool serviceLocked = + context.watch().state.isServiceLocked(service.id); + return BrandHeroScreen( hasBackButton: true, children: [ @@ -90,6 +95,7 @@ class _ServicePageState extends State { 'services.service_page.restart'.tr(), style: Theme.of(context).textTheme.titleMedium, ), + enabled: !serviceDisabled && !serviceLocked, ), ListTile( iconColor: Theme.of(context).colorScheme.onBackground, @@ -108,11 +114,22 @@ class _ServicePageState extends State { : 'services.service_page.disable'.tr(), style: Theme.of(context).textTheme.titleMedium, ), + enabled: !serviceLocked, ), if (service.isMovable) ListTile( iconColor: Theme.of(context).colorScheme.onBackground, - onTap: () => {}, + // Open page ServicesMigrationPage + onTap: () => Navigator.of(context).push( + materialRoute( + ServicesMigrationPage( + services: [service], + diskStatus: + context.read().state.diskStatus, + isMigration: false, + ), + ), + ), leading: const Icon(Icons.drive_file_move_outlined), title: Text( 'services.service_page.move'.tr(), @@ -131,6 +148,7 @@ class _ServicePageState extends State { ), style: Theme.of(context).textTheme.bodyMedium, ), + enabled: !serviceDisabled && !serviceLocked, ), ], ); From 0425ea8ab8511ba45a1b7272e9d6bc53c8b11b35 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 19 Sep 2022 03:42:00 +0300 Subject: [PATCH 113/732] Add a button to remove all removable server jobs --- .../cubit/server_jobs/server_jobs_cubit.dart | 43 ++++++++----------- .../cubit/server_jobs/server_jobs_state.dart | 8 +++- .../components/jobs_content/jobs_content.dart | 23 ++++++++-- 3 files changed, 45 insertions(+), 29 deletions(-) diff --git a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart index 43b2b2d5..1e808956 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart @@ -72,42 +72,35 @@ class ServerJobsCubit return job; } - /// Get the job object and change its isHidden to true. - /// Emit the new state. - /// Call the api to remove the job. - /// If the api call fails, change the isHidden to false and emit the new state. - /// If the api call succeeds, remove the job from the list and emit the new state. Future removeServerJob(final String uid) async { - final ServerJob? job = getServerJobByUid(uid); - if (job == null) { - return; - } - - job.isHidden = true; - emit( - ServerJobsState( - serverJobList: state.serverJobList, - ), - ); - final result = await api.removeApiJob(uid); if (!result.success) { - job.isHidden = false; - emit( - ServerJobsState( - serverJobList: state.serverJobList, - ), - ); getIt().showSnackBar(result.message!); return; } - state.serverJobList.remove(job); emit( ServerJobsState( - serverJobList: state.serverJobList, + serverJobList: [ + for (final ServerJob job in state.serverJobList) + if (job.uid != uid) job + ], ), ); + print('removed job $uid'); + } + + Future removeAllFinishedJobs() async { + final List finishedJobs = state.serverJobList + .where( + (final ServerJob job) => + job.status == JobStatusEnum.finished || + job.status == JobStatusEnum.error, + ) + .toList(); + for (final ServerJob job in finishedJobs) { + await removeServerJob(job.uid); + } } Future reload({final bool useTimer = false}) async { diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index cf9cb8e0..2acc487c 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -17,8 +17,14 @@ class ServerJobsState extends ServerInstallationDependendState { return list; } + bool get hasRemovableJobs => serverJobList.any( + (final job) => + job.status == JobStatusEnum.finished || + job.status == JobStatusEnum.error, + ); + @override - List get props => [migrationJobUid, ..._serverJobList]; + List get props => [migrationJobUid, _serverJobList]; ServerJobsState copyWith({ final List? serverJobList, diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index d43a194c..877770dc 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -23,6 +23,9 @@ class JobsContent extends StatelessWidget { final List serverJobs = context.watch().state.serverJobList; + final bool hasRemovableJobs = + context.watch().state.hasRemovableJobs; + return BlocBuilder( builder: (final context, final state) { late List widgets; @@ -129,9 +132,23 @@ class JobsContent extends StatelessWidget { if (serverJobs.isNotEmpty) Padding( padding: const EdgeInsets.all(8.0), - child: Text( - 'jobs.server_jobs'.tr(), - style: Theme.of(context).textTheme.titleMedium, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'jobs.server_jobs'.tr(), + style: Theme.of(context).textTheme.titleMedium, + ), + IconButton( + onPressed: hasRemovableJobs + ? () => context + .read() + .removeAllFinishedJobs() + : null, + icon: const Icon(Icons.clear_all), + color: Theme.of(context).colorScheme.onBackground, + ), + ], ), ), ...serverJobs.map( From bb6d615d37554fae474903ab1fad71d0e50a93ea Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Sep 2022 03:48:59 +0300 Subject: [PATCH 114/732] Fix 'start migration button' subtitle --- lib/ui/pages/more/more.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 2dcdd40d..bc0468b0 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -70,7 +70,7 @@ class MorePage extends StatelessWidget { .toList(), isMigration: true, ), - subtitle: 'not_ready_card.in_menu'.tr(), + subtitle: 'providers.storage.data_migration_notice'.tr(), accent: true, ), if (!isReady) From 8d24e7f8a63897dd81314c4c5c4dbb8b2d35bdf3 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 19 Sep 2022 04:35:49 +0300 Subject: [PATCH 115/732] Bump version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7ea16fb3..372bd4a2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: selfprivacy description: selfprivacy.org publish_to: 'none' -version: 0.6.1+15 +version: 0.7.0+16 environment: sdk: '>=2.17.0 <3.0.0' From 96a7e9bf06c9c7b36701e2c18c02ad926270a22f Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 16:21:46 +0300 Subject: [PATCH 116/732] Better CI --- .drone.yml | 29 +++++++++++++++++++------ Dockerfile | 64 +++++++++++++++++++++++++++++++++--------------------- ci.py | 59 +++++++++++++++++++++++++++---------------------- 3 files changed, 94 insertions(+), 58 deletions(-) diff --git a/.drone.yml b/.drone.yml index 13ec2c42..2201e7df 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,9 +7,17 @@ steps: commands: - ln -s /var/lib/drone-runner-exec/.local $HOME/.local - - name: Build + - name: Run Tests commands: - - ./ci.py --run-ci-build + - ./ci.py --ci-run-tests + + - name: Build Linux Target + commands: + - ./ci.py --ci-build-linux + + - name: Build APK Target + commands: + - ./ci.py --ci-build-apk trigger: event: @@ -29,8 +37,9 @@ steps: - name: Prepare commands: - ln -s /var/lib/drone-runner-exec/.local $HOME/.local - - if podman volume exists src; then podman volume rm -f src; podman volume create src; else podman volume create src; fi - - git archive --format=tar HEAD | podman volume import src - + - if podman volume exists release; then podman volume rm -f release; podman volume create release; else podman volume create release; fi + - git config user.email "builder@selfprivacy.org" + - git config user.name "Builder" - name: Build Intermediate Linux Release Artifact (Binary) commands: @@ -80,6 +89,12 @@ steps: commands: - ./ci.py --package-linux-archive + - name: Push Artifacts to the Release Volume + commands: + - git add -v *.AppImage *.flatpak *.apk *.apk.idsig *.tar.zstd + - git commit -m Release + - git archive --format=tar HEAD | podman volume import release - + trigger: event: - tag @@ -97,18 +112,18 @@ steps: - name: Prepare commands: - ln -s /var/lib/drone-runner-exec/.local $HOME/.local - - podman unshare podman volume mount src + - podman unshare podman volume mount release - name: Create Release and Deploy Artifacts commands: - - podman unshare ./ci.py --deploy-gitea-release + - ./ci.py --deploy-gitea-release environment: GITEA_RELEASE_TOKEN: from_secret: GITEA_RELEASE_TOKEN - name: Deploy F-Droid Repo commands: - - podman unshare ./ci.py --deploy-fdroid-repo + - ./ci.py --deploy-fdroid-repo environment: SSH_PRIVATE_KEY: from_secret: SSH_PRIVATE_KEY diff --git a/Dockerfile b/Dockerfile index 7efdf1ed..ef439918 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,48 +1,62 @@ FROM ubuntu:22.04 -ENV PACKAGES "build-essential openjdk-11-jdk-headless clang cmake curl git jq libblkid1 libblkid-dev libc6 libc6-dev libc-bin libcrypt1 libdbus-1-3 libexpat1 libffi7 libgcc-s1 libgcrypt20 libgcrypt20-dev libglib2.0-0 libglib2.0-dev libglu1-mesa libgpg-error0 libgtk-3-0 libgtk-3-dev liblz4-1 liblz4-dev liblzma5 liblzma-dev libmount1 libpcre3 libselinux1 libsepol2 libstdc++-10-dev libstdc++6 libuuid1 ninja-build pkg-config rsync unzip xz-utils zlib1g unzip libsecret-1-dev libsecret-tools libsecret-1-0 libjsoncpp-dev fuse flatpak-builder binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync" -ENV ANDROID_SDK_TOOLS_VERSION "commandlinetools-linux-8512546_latest" -ENV ANDROID_SDK_TOOLS_URL "https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip" -ENV FLUTTER_VERSION "flutter_linux_3.3.1-stable" -ENV FLUTTER_URL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.3.1-stable.tar.xz" -ENV FREEDESKTOP_SDK_VERSION "22.08" +ARG PACKAGES="build-essential openjdk-11-jdk-headless clang cmake curl git jq libblkid1 \ + libblkid-dev libc6 libc6-dev libc-bin libcrypt1 libdbus-1-3 libexpat1 libffi7 \ + libgcc-s1 libgcrypt20 libgcrypt20-dev libglib2.0-0 libglib2.0-dev libglu1-mesa \ + libgpg-error0 libgtk-3-0 libgtk-3-dev liblz4-1 liblz4-dev liblzma5 liblzma-dev \ + libmount1 libpcre3 libselinux1 libsepol2 libstdc++-10-dev libstdc++6 libuuid1 \ + ninja-build pkg-config rsync unzip xz-utils zlib1g unzip libsecret-1-dev libsecret-tools \ + libsecret-1-0 libjsoncpp-dev fuse flatpak-builder binutils coreutils desktop-file-utils \ + fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools \ + strace util-linux zsync" +ARG ANDROID_SDK_TOOLS_VERSION="8512546" +ARG ANDROID_SDK_TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS_VERSION}_latest.zip" +ARG FLUTTER_VERSION="3.3.1" +ARG FLUTTER_URL="https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz" +ARG FREEDESKTOP_SDK_VERSION="22.08" # Update packages RUN apt-get update && apt-get upgrade -y && apt-get install -y $PACKAGES -# Add a non-privileged user -RUN useradd -d /var/lib/builder -m -r -s /bin/bash builder -USER builder -WORKDIR /var/lib/builder +WORKDIR /opt # Install Android SDK -ADD --chown=builder $ANDROID_SDK_TOOLS_URL . -RUN mkdir -p android-sdk/cmdline-tools && unzip $ANDROID_SDK_TOOLS_VERSION.zip \ - && rm $ANDROID_SDK_TOOLS_VERSION.zip && mv cmdline-tools android-sdk/cmdline-tools/latest +ADD $ANDROID_SDK_TOOLS_URL . +RUN mkdir -p android-sdk/cmdline-tools && unzip commandlinetools-linux-${ANDROID_SDK_TOOLS_VERSION}_latest.zip \ + && rm commandlinetools-linux-${ANDROID_SDK_TOOLS_VERSION}_latest.zip && mv cmdline-tools android-sdk/cmdline-tools/latest # Install Flutter -ADD --chown=builder $FLUTTER_URL . -RUN tar -vxf $FLUTTER_VERSION.tar.xz && rm $FLUTTER_VERSION.tar.xz +ADD $FLUTTER_URL . +RUN tar -vxf flutter_linux_${FLUTTER_VERSION}-stable.tar.xz && \ + rm flutter_linux_${FLUTTER_VERSION}-stable.tar.xz +# Flutter doesn't work without write permissions, so fuck it, fuck. +RUN chmod -R 777 /opt/flutter +RUN git config --system --add safe.directory /opt/flutter -ENV ANDROID_HOME "/var/lib/builder/android-sdk" -ENV ANDROID_SDK_ROOT "/var/lib/builder/android-sdk" -ENV PATH "$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:/var/lib/builder/flutter/bin:/var/lib/builder/.local/bin" +ENV ANDROID_HOME "/opt/android-sdk" +ENV ANDROID_SDK_ROOT "${ANDROID_HOME}" +ENV PATH "$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:/opt/flutter/bin" # Install needed Android SDK packages RUN yes | sdkmanager 'build-tools;30.0.3' 'platforms;android-29' 'platforms;android-30' 'platforms;android-31' +WORKDIR /tmp + # Prepare dependencies for offline build RUN git clone --depth=1 --single-branch https://git.selfprivacy.org/kherel/selfprivacy.org.app.git deps -WORKDIR /var/lib/builder/deps +WORKDIR /tmp/deps RUN flutter build linux RUN flutter build apk -WORKDIR /var/lib/builder +WORKDIR /tmp RUN rm -rf deps -# Install AppImage Builder -RUN pip3 install --user appimage-builder +# Install Python dependencies +RUN pip3 install appimage-builder bandit setuptools portalocker pytz pytest pytest-mock \ + pytest-datadir huey gevent mnemonic coverage pylint pydantic \ + typing-extensions psutil black fastapi uvicorn strawberry-graphql \ + python-multipart python-dateutil pygments poetry graphql-core # Install Flatpak dependencies -RUN flatpak --user remote-add flathub https://flathub.org/repo/flathub.flatpakrepo \ - && flatpak --user install -y org.freedesktop.Sdk/x86_64/$FREEDESKTOP_SDK_VERSION \ - org.freedesktop.Platform/x86_64/$FREEDESKTOP_SDK_VERSION +RUN flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo \ + && flatpak install -y org.freedesktop.Sdk/x86_64/${FREEDESKTOP_SDK_VERSION} \ + org.freedesktop.Platform/x86_64/${FREEDESKTOP_SDK_VERSION} diff --git a/ci.py b/ci.py index d8412580..b0b3a158 100755 --- a/ci.py +++ b/ci.py @@ -1,43 +1,39 @@ -#!/usr/bin/env python3 +\#!/usr/bin/env python3 import os import subprocess import yaml import argparse -CONTAINER_IMAGE = "localhost/flutter-build-env" +CONTAINER_IMAGE = "docker.io/alyasirko/flutter-build-env" HOST_HOME = "/var/lib/drone-runner-exec" -CONTAINER_HOME = "/var/lib/builder" +CONTAINER_HOME = "/tmp/builder" APP_NAME = "pro.kherel.selfprivacy" APP_VERSION_FULL = yaml.safe_load(open("pubspec.yaml", "r"))['version'] APP_SEMVER = APP_VERSION_FULL[:APP_VERSION_FULL.find("+")] APP_BUILD_ID = APP_VERSION_FULL[APP_VERSION_FULL.find("+"):][1::] -HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/src/_data" +HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/release/_data" # Environments def podman_offline(dir, *args): subprocess.run(["podman", "run", "--rm", "--network=none", f"--workdir={dir}", - "-v", f"src:{CONTAINER_HOME}/src:U", - "-v", f"{HOST_HOME}/fdroid:{CONTAINER_HOME}/fdroid:U", - "-v", f"{HOST_HOME}/fdroid-keystore:{CONTAINER_HOME}/fdroid/fdroid-keystore:U", - "-v", f"{HOST_HOME}/standalone-keystore:{CONTAINER_HOME}/fdroid/standalone-keystore:U", + "-v", os.getcwd() + f":{CONTAINER_HOME}/src", + "-v", f"{HOST_HOME}/fdroid:{CONTAINER_HOME}/fdroid", + "-v", f"{HOST_HOME}/fdroid-keystore:{CONTAINER_HOME}/fdroid/fdroid-keystore", + "-v", f"{HOST_HOME}/standalone-keystore:{CONTAINER_HOME}/fdroid/standalone-keystore", "--env", "FDROID_KEYSTORE_PASS=" + os.environ.get('FDROID_KEYSTORE_PASS'), "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get('STANDALONE_KEYSTORE_PASS'), + "--user", os.getuid() + ":" + os.getgid(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ]) def podman_online(dir, *args): subprocess.run(["podman", "run", "--rm", "--privileged", f"--workdir={dir}", - "-v", f"src:{CONTAINER_HOME}/src:U", - CONTAINER_IMAGE, "bash", "-c", ' '.join(args) - ]) - -def podman_ci(dir, *args): - subprocess.run(["podman", "run", "--rm", "--privileged", f"--workdir={dir}", - "-v", os.getcwd() + f":{CONTAINER_HOME}/src:U", + "-v", os.getcwd() + f":{CONTAINER_HOME}/src", + "--user", os.getuid() + ":" + os.getgid(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ]) @@ -52,11 +48,11 @@ def build_apk(): podman_offline(f"{CONTAINER_HOME}/src", "flutter build apk") def sign_apk_standalone(): - podman_offline(f"{CONTAINER_HOME}/fdroid", - "zipalign -f -v 4 ../src/build/app/outputs/flutter-apk/app-release.apk", + podman_offline(f"{CONTAINER_HOME}/src", + "zipalign -f -v 4 build/app/outputs/flutter-apk/app-release.apk", f"standalone_{APP_NAME}-{APP_SEMVER}.apk") podman_offline(f"{CONTAINER_HOME}/fdroid", - "apksigner sign --ks standalone-keystore --ks-key-alias standalone --ks-pass", + "apksigner sign --ks ../fdroid/standalone-keystore --ks-key-alias standalone --ks-pass", f"env:STANDALONE_KEYSTORE_PASS standalone_{APP_NAME}-{APP_SEMVER}.apk") def sign_apk_fdroid(): @@ -83,8 +79,8 @@ def deploy_gitea_release(): "--url", "https://git.selfprivacy.org"]) subprocess.run(["tea", "releases", "create", "--repo", os.environ.get('DRONE_REPO'), "--tag", os.environ.get('DRONE_SEMVER'), "--title", os.environ.get('DRONE_SEMVER'), - "--asset", f"{HOST_HOME}/fdroid/standalone_{APP_NAME}-{APP_SEMVER}.apk", - "--asset", f"{HOST_HOME}/fdroid/standalone_{APP_NAME}-{APP_SEMVER}.apk.idsig", + "--asset", f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk", + "--asset", f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk.idsig", "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage", "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage.zsync", "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.flatpak", @@ -96,9 +92,14 @@ def deploy_fdroid_repo(): scp -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -r {HOST_HOME}/fdroid/repo/* deployer@selfprivacy.org:/var/www/fdroid.selfprivacy.org """], shell=True) -def run_ci_build(): - podman_ci(f"{CONTAINER_HOME}/src", "flutter build linux --debug") - podman_ci(f"{CONTAINER_HOME}/src", "flutter build apk --debug") +def ci_build_linux(): + podman_online(f"{CONTAINER_HOME}/src", "flutter build linux --debug") + +def ci_build_apk(): + podman_online(f"{CONTAINER_HOME}/src", "flutter build apk --debug") + +def ci_run_tests(): + podman_online(f"{CONTAINER_HOME}/src", "flutter test") # Arguments @@ -114,7 +115,9 @@ if __name__ == "__main__": group.add_argument("--package-linux-archive", action="store_true") group.add_argument("--deploy-gitea-release", action="store_true", help="depends on $GITEA_RELEASE_TOKEN") group.add_argument("--deploy-fdroid-repo", action="store_true", help="depends on $SSH_PRIVATE_KEY") - group.add_argument("--run-ci-build", action="store_true") + group.add_argument("--ci-build-linux", action="store_true") + group.add_argument("--ci-build-apk", action="store_true") + group.add_argument("--ci-run-tests", action="store_true") args = parser.parse_args() if args.build_linux: @@ -135,5 +138,9 @@ elif args.deploy_gitea_release: deploy_gitea_release() elif args.deploy_fdroid_repo: deploy_fdroid_repo() -elif args.run_ci_build: - run_ci_build() +elif args.ci_build_linux: + ci_build_linux() +elif args.ci_build_apk: + ci_build_apk() +elif args.ci_run_tests: + ci_run_tests() From 6451dee4cdae47d4519eb399a9e9ccb648e0d0d6 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 16:22:58 +0300 Subject: [PATCH 117/732] Better CI --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index b0b3a158..b00562e9 100755 --- a/ci.py +++ b/ci.py @@ -1,4 +1,4 @@ -\#!/usr/bin/env python3 +#!/usr/bin/env python3 import os import subprocess From 672fcf7b76552388e5485004cf9753fc53c75c97 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 16:25:33 +0300 Subject: [PATCH 118/732] Better CI --- ci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.py b/ci.py index b00562e9..9723bd9d 100755 --- a/ci.py +++ b/ci.py @@ -26,14 +26,14 @@ def podman_offline(dir, *args): "-v", f"{HOST_HOME}/standalone-keystore:{CONTAINER_HOME}/fdroid/standalone-keystore", "--env", "FDROID_KEYSTORE_PASS=" + os.environ.get('FDROID_KEYSTORE_PASS'), "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get('STANDALONE_KEYSTORE_PASS'), - "--user", os.getuid() + ":" + os.getgid(), "--userns=keep-id", + "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ]) def podman_online(dir, *args): subprocess.run(["podman", "run", "--rm", "--privileged", f"--workdir={dir}", "-v", os.getcwd() + f":{CONTAINER_HOME}/src", - "--user", os.getuid() + ":" + os.getgid(), "--userns=keep-id", + "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ]) From 6d6233079a8f12f354d2da8f00c5ee4f661ce233 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 19:52:26 +0300 Subject: [PATCH 119/732] Better CI --- Dockerfile | 20 ++++++++------------ ci.py | 26 ++++++++++++++------------ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index ef439918..a95f5389 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,12 +26,13 @@ RUN mkdir -p android-sdk/cmdline-tools && unzip commandlinetools-linux-${ANDROID && rm commandlinetools-linux-${ANDROID_SDK_TOOLS_VERSION}_latest.zip && mv cmdline-tools android-sdk/cmdline-tools/latest # Install Flutter +ENV FLUTTER_HOME "/opt/flutter" ADD $FLUTTER_URL . RUN tar -vxf flutter_linux_${FLUTTER_VERSION}-stable.tar.xz && \ rm flutter_linux_${FLUTTER_VERSION}-stable.tar.xz # Flutter doesn't work without write permissions, so fuck it, fuck. -RUN chmod -R 777 /opt/flutter -RUN git config --system --add safe.directory /opt/flutter +RUN chmod -R 777 $FLUTTER_HOME +RUN git config --system --add safe.directory $FLUTTER_HOME ENV ANDROID_HOME "/opt/android-sdk" ENV ANDROID_SDK_ROOT "${ANDROID_HOME}" @@ -43,20 +44,15 @@ RUN yes | sdkmanager 'build-tools;30.0.3' 'platforms;android-29' 'platforms;andr WORKDIR /tmp # Prepare dependencies for offline build +ENV PUB_CACHE "/tmp/flutter_pub_cache" +ENV GRADLE_USER_HOME "/tmp/gradle" RUN git clone --depth=1 --single-branch https://git.selfprivacy.org/kherel/selfprivacy.org.app.git deps WORKDIR /tmp/deps RUN flutter build linux RUN flutter build apk WORKDIR /tmp RUN rm -rf deps +RUN chmod -R 777 $PUB_CACHE $GRADLE_USER_HOME -# Install Python dependencies -RUN pip3 install appimage-builder bandit setuptools portalocker pytz pytest pytest-mock \ - pytest-datadir huey gevent mnemonic coverage pylint pydantic \ - typing-extensions psutil black fastapi uvicorn strawberry-graphql \ - python-multipart python-dateutil pygments poetry graphql-core - -# Install Flatpak dependencies -RUN flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo \ - && flatpak install -y org.freedesktop.Sdk/x86_64/${FREEDESKTOP_SDK_VERSION} \ - org.freedesktop.Platform/x86_64/${FREEDESKTOP_SDK_VERSION} +# Install AppImage Builder +RUN pip3 install appimage-builder diff --git a/ci.py b/ci.py index 9723bd9d..7c394cf9 100755 --- a/ci.py +++ b/ci.py @@ -5,7 +5,7 @@ import subprocess import yaml import argparse -CONTAINER_IMAGE = "docker.io/alyasirko/flutter-build-env" +CONTAINER_IMAGE = "localhost/flutter-build-env" HOST_HOME = "/var/lib/drone-runner-exec" CONTAINER_HOME = "/tmp/builder" @@ -19,7 +19,7 @@ HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/rele # Environments def podman_offline(dir, *args): - subprocess.run(["podman", "run", "--rm", "--network=none", f"--workdir={dir}", + subprocess.run(["podman", "run", "--rm", "--network=none", "--cap-add=CHOWN", f"--workdir={dir}", "-v", os.getcwd() + f":{CONTAINER_HOME}/src", "-v", f"{HOST_HOME}/fdroid:{CONTAINER_HOME}/fdroid", "-v", f"{HOST_HOME}/fdroid-keystore:{CONTAINER_HOME}/fdroid/fdroid-keystore", @@ -31,7 +31,7 @@ def podman_offline(dir, *args): ]) def podman_online(dir, *args): - subprocess.run(["podman", "run", "--rm", "--privileged", f"--workdir={dir}", + subprocess.run(["podman", "run", "--rm", "--cap-add=CHOWN", f"--workdir={dir}", "-v", os.getcwd() + f":{CONTAINER_HOME}/src", "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) @@ -40,12 +40,13 @@ def podman_online(dir, *args): # Targets def build_linux(): - podman_offline(f"{CONTAINER_HOME}/src", "flutter pub get --offline") - podman_offline(f"{CONTAINER_HOME}/src", "flutter build linux") + podman_offline(f"{CONTAINER_HOME}/src", "flutter pub get --offline", + "&& flutter build linux") def build_apk(): - podman_offline(f"{CONTAINER_HOME}/src", "flutter pub get --offline") - podman_offline(f"{CONTAINER_HOME}/src", "flutter build apk") + podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle", + "&& flutter pub get --offline", + "&& flutter build apk") def sign_apk_standalone(): podman_offline(f"{CONTAINER_HOME}/src", @@ -68,8 +69,8 @@ def package_linux_appimage(): podman_online(f"{CONTAINER_HOME}/src", "appimage-builder --recipe appimage.yml") def package_linux_flatpak(): - podman_online(f"{CONTAINER_HOME}/src", "flatpak-builder --disable-rofiles-fuse --force-clean --repo=flatpak-repo flatpak-build flatpak.yml") - podman_online(f"{CONTAINER_HOME}/src", f"flatpak build-bundle flatpak-repo {APP_NAME}-{APP_SEMVER}.flatpak pro.kherel.selfprivacy") + subprocess.run(["flatpak-builder", "--force-clean", "--repo=flatpak-repo", "flatpak-build", "flatpak.yml"]) + subprocess.run(["flatpak", "build-bundle", "flatpak-repo", f"{APP_NAME}-{APP_SEMVER}.flatpak", "pro.kherel.selfprivacy"]) def package_linux_archive(): podman_online(f"{CONTAINER_HOME}/src", f"tar -C build/linux/x64/release/bundle -vacf {APP_NAME}-{APP_SEMVER}.tar.zstd .") @@ -96,7 +97,8 @@ def ci_build_linux(): podman_online(f"{CONTAINER_HOME}/src", "flutter build linux --debug") def ci_build_apk(): - podman_online(f"{CONTAINER_HOME}/src", "flutter build apk --debug") + podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle", + "&& flutter build apk --debug") def ci_run_tests(): podman_online(f"{CONTAINER_HOME}/src", "flutter test") @@ -106,8 +108,8 @@ def ci_run_tests(): if __name__ == "__main__": parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() - group.add_argument("--build-linux", action="store_true", help="depends on podman src volume") - group.add_argument("--build-apk", action="store_true", help="depends on podman src volume") + group.add_argument("--build-linux", action="store_true") + group.add_argument("--build-apk", action="store_true") group.add_argument("--sign-apk-standalone", action="store_true", help="depends on $STANDALONE_KEYSTORE_PASS") group.add_argument("--sign-apk-fdroid", action="store_true", help="depends on $FDROID_KEYSTORE_PASS") group.add_argument("--package-linux-appimage", action="store_true") From 2bcf2f314fe67ea2859e92e296e00e45ff9302a6 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 19:58:55 +0300 Subject: [PATCH 120/732] Better CI --- ci.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ci.py b/ci.py index 7c394cf9..a40b1e0f 100755 --- a/ci.py +++ b/ci.py @@ -28,14 +28,14 @@ def podman_offline(dir, *args): "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get('STANDALONE_KEYSTORE_PASS'), "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) - ]) + ], check=True) def podman_online(dir, *args): subprocess.run(["podman", "run", "--rm", "--cap-add=CHOWN", f"--workdir={dir}", "-v", os.getcwd() + f":{CONTAINER_HOME}/src", "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) - ]) + ], check=True) # Targets @@ -69,15 +69,15 @@ def package_linux_appimage(): podman_online(f"{CONTAINER_HOME}/src", "appimage-builder --recipe appimage.yml") def package_linux_flatpak(): - subprocess.run(["flatpak-builder", "--force-clean", "--repo=flatpak-repo", "flatpak-build", "flatpak.yml"]) - subprocess.run(["flatpak", "build-bundle", "flatpak-repo", f"{APP_NAME}-{APP_SEMVER}.flatpak", "pro.kherel.selfprivacy"]) + subprocess.run(["flatpak-builder", "--force-clean", "--repo=flatpak-repo", "flatpak-build", "flatpak.yml"], check=True) + subprocess.run(["flatpak", "build-bundle", "flatpak-repo", f"{APP_NAME}-{APP_SEMVER}.flatpak", "pro.kherel.selfprivacy"], check=True) def package_linux_archive(): podman_online(f"{CONTAINER_HOME}/src", f"tar -C build/linux/x64/release/bundle -vacf {APP_NAME}-{APP_SEMVER}.tar.zstd .") def deploy_gitea_release(): subprocess.run(["tea", "login", "add", "--token", os.environ.get('GITEA_RELEASE_TOKEN'), - "--url", "https://git.selfprivacy.org"]) + "--url", "https://git.selfprivacy.org"], check=True) subprocess.run(["tea", "releases", "create", "--repo", os.environ.get('DRONE_REPO'), "--tag", os.environ.get('DRONE_SEMVER'), "--title", os.environ.get('DRONE_SEMVER'), "--asset", f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk", @@ -85,13 +85,13 @@ def deploy_gitea_release(): "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage", "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage.zsync", "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.flatpak", - "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.tar.zstd"]) + "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.tar.zstd"], check=True) def deploy_fdroid_repo(): subprocess.run([f"""eval $(ssh-agent -s) && echo \"$SSH_PRIVATE_KEY\" | tr -d '\r' | ssh-add - && scp -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -r {HOST_HOME}/fdroid/repo/* deployer@selfprivacy.org:/var/www/fdroid.selfprivacy.org - """], shell=True) + """], shell=True, check=True) def ci_build_linux(): podman_online(f"{CONTAINER_HOME}/src", "flutter build linux --debug") From cd19ef9a44d9a5946beef8b7d5ed8a042f530651 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 21:08:00 +0300 Subject: [PATCH 121/732] Better CI --- Dockerfile | 2 +- ci.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a95f5389..021ecea4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ RUN flutter build linux RUN flutter build apk WORKDIR /tmp RUN rm -rf deps -RUN chmod -R 777 $PUB_CACHE $GRADLE_USER_HOME +RUN find $GRADLE_USER_HOME/daemon -exec chmod 777 {} \; # Install AppImage Builder RUN pip3 install appimage-builder diff --git a/ci.py b/ci.py index a40b1e0f..98209001 100755 --- a/ci.py +++ b/ci.py @@ -40,7 +40,8 @@ def podman_online(dir, *args): # Targets def build_linux(): - podman_offline(f"{CONTAINER_HOME}/src", "flutter pub get --offline", + podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/flutter_pub_cache", + "&& flutter pub get --offline", "&& flutter build linux") def build_apk(): @@ -94,7 +95,8 @@ def deploy_fdroid_repo(): """], shell=True, check=True) def ci_build_linux(): - podman_online(f"{CONTAINER_HOME}/src", "flutter build linux --debug") + podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/flutter_pub_cache", + "&& flutter build linux --debug") def ci_build_apk(): podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle", From 627d6df2fc52e96666e79f12f5f84f882ba1db42 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 21:12:02 +0300 Subject: [PATCH 122/732] Better CI --- ci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.py b/ci.py index 98209001..295ec85c 100755 --- a/ci.py +++ b/ci.py @@ -45,7 +45,7 @@ def build_linux(): "&& flutter build linux") def build_apk(): - podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle", + podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", "&& flutter pub get --offline", "&& flutter build apk") @@ -99,7 +99,7 @@ def ci_build_linux(): "&& flutter build linux --debug") def ci_build_apk(): - podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle", + podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", "&& flutter build apk --debug") def ci_run_tests(): From 3d761902e7e7cf88babe93f1aef16973e3fcb4fb Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 23:23:16 +0300 Subject: [PATCH 123/732] add desktop file --- pro.kherel.selfprivacy.desktop | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 pro.kherel.selfprivacy.desktop diff --git a/pro.kherel.selfprivacy.desktop b/pro.kherel.selfprivacy.desktop new file mode 100644 index 00000000..61a87f31 --- /dev/null +++ b/pro.kherel.selfprivacy.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Application +Name=SelfPrivacy +Icon=pro.kherel.selfprivacy +Exec=selfprivacy %U From 5a152ad595c45099faf57f13a7ff440d53183d6e Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 23:30:07 +0300 Subject: [PATCH 124/732] fix CI --- Dockerfile | 6 +++--- ci.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 021ecea4..aa305aa4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ RUN git config --system --add safe.directory $FLUTTER_HOME ENV ANDROID_HOME "/opt/android-sdk" ENV ANDROID_SDK_ROOT "${ANDROID_HOME}" -ENV PATH "$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:/opt/flutter/bin" +ENV PATH "$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/build-tools/30.0.3:/opt/flutter/bin" # Install needed Android SDK packages RUN yes | sdkmanager 'build-tools;30.0.3' 'platforms;android-29' 'platforms;android-30' 'platforms;android-31' @@ -54,5 +54,5 @@ WORKDIR /tmp RUN rm -rf deps RUN find $GRADLE_USER_HOME/daemon -exec chmod 777 {} \; -# Install AppImage Builder -RUN pip3 install appimage-builder +# Install AppImage Builder and F-Droid Server +RUN pip3 install appimage-builder fdroidserver diff --git a/ci.py b/ci.py index 295ec85c..a4ac9634 100755 --- a/ci.py +++ b/ci.py @@ -53,7 +53,7 @@ def sign_apk_standalone(): podman_offline(f"{CONTAINER_HOME}/src", "zipalign -f -v 4 build/app/outputs/flutter-apk/app-release.apk", f"standalone_{APP_NAME}-{APP_SEMVER}.apk") - podman_offline(f"{CONTAINER_HOME}/fdroid", + podman_offline(f"{CONTAINER_HOME}/src", "apksigner sign --ks ../fdroid/standalone-keystore --ks-key-alias standalone --ks-pass", f"env:STANDALONE_KEYSTORE_PASS standalone_{APP_NAME}-{APP_SEMVER}.apk") From 0023016a728fa68e059bd466fc425acd29fbcb37 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 14 Sep 2022 23:44:58 +0300 Subject: [PATCH 125/732] fix CI --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 2201e7df..4ac9db34 100644 --- a/.drone.yml +++ b/.drone.yml @@ -91,7 +91,7 @@ steps: - name: Push Artifacts to the Release Volume commands: - - git add -v *.AppImage *.flatpak *.apk *.apk.idsig *.tar.zstd + - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd - git commit -m Release - git archive --format=tar HEAD | podman volume import release - From 8c16016ac861626341eafd52f958a9c6a6560137 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 00:00:17 +0300 Subject: [PATCH 126/732] add sonarqube --- .drone.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.drone.yml b/.drone.yml index 4ac9db34..37c6c08d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,6 +10,11 @@ steps: - name: Run Tests commands: - ./ci.py --ci-run-tests + - flutter test --machine --coverage > tests.output + - sonar-scanner -Dsonar.projectKey=SelfPrivacy-Flutter-App -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" + environment: + SONARQUBE_TOKEN: + from_secret: SONARQUBE_TOKEN - name: Build Linux Target commands: From 8fc7c6f7bd8a7c575753fe638e99831efbfe907e Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 00:05:44 +0300 Subject: [PATCH 127/732] add sonarqube --- .drone.yml | 1 - ci.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 37c6c08d..d031c9c5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,6 @@ steps: - name: Run Tests commands: - ./ci.py --ci-run-tests - - flutter test --machine --coverage > tests.output - sonar-scanner -Dsonar.projectKey=SelfPrivacy-Flutter-App -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" environment: SONARQUBE_TOKEN: diff --git a/ci.py b/ci.py index a4ac9634..fe2de71d 100755 --- a/ci.py +++ b/ci.py @@ -103,7 +103,8 @@ def ci_build_apk(): "&& flutter build apk --debug") def ci_run_tests(): - podman_online(f"{CONTAINER_HOME}/src", "flutter test") + podman_online(f"{CONTAINER_HOME}/src", "flutter test", + "&& flutter test --machine --coverage > tests.output") # Arguments From e09ac5b2e1d4f7e4ca4000b2ff75574868cca00b Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 00:12:50 +0300 Subject: [PATCH 128/732] rename app --- ci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.py b/ci.py index fe2de71d..12c38b45 100755 --- a/ci.py +++ b/ci.py @@ -9,7 +9,7 @@ CONTAINER_IMAGE = "localhost/flutter-build-env" HOST_HOME = "/var/lib/drone-runner-exec" CONTAINER_HOME = "/tmp/builder" -APP_NAME = "pro.kherel.selfprivacy" +APP_NAME = "org.selfprivacy.app" APP_VERSION_FULL = yaml.safe_load(open("pubspec.yaml", "r"))['version'] APP_SEMVER = APP_VERSION_FULL[:APP_VERSION_FULL.find("+")] APP_BUILD_ID = APP_VERSION_FULL[APP_VERSION_FULL.find("+"):][1::] @@ -100,7 +100,7 @@ def ci_build_linux(): def ci_build_apk(): podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", - "&& flutter build apk --debug") + "&& flutter build apk --flavor nightly --debug") def ci_run_tests(): podman_online(f"{CONTAINER_HOME}/src", "flutter test", From 23b395550cbc40f52562bfab5bbb4c37d3d709db Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 00:18:21 +0300 Subject: [PATCH 129/732] rename app --- appimage.yml | 6 +++--- flatpak.yml | 10 +++++----- ....selfprivacy.desktop => org.selfprivacy.app.desktop | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename pro.kherel.selfprivacy.desktop => org.selfprivacy.app.desktop (71%) diff --git a/appimage.yml b/appimage.yml index 8e7a3b5c..fa15945b 100644 --- a/appimage.yml +++ b/appimage.yml @@ -3,13 +3,13 @@ version: 1 script: - rm -rf AppDir || true - cp -r build/linux/x64/release/bundle AppDir - - install -Dm644 assets/images/icon/logo.svg AppDir/usr/share/icons/hicolor/scalable/apps/pro.kherel.selfprivacy.svg + - install -Dm644 assets/images/icon/logo.svg AppDir/usr/share/icons/hicolor/scalable/apps/org.selfprivacy.app.svg AppDir: path: AppDir app_info: - id: pro.kherel.selfprivacy + id: org.selfprivacy.app name: SelfPrivacy - icon: pro.kherel.selfprivacy + icon: org.selfprivacy.app version: 0.6.0 exec: selfprivacy exec_args: $@ diff --git a/flatpak.yml b/flatpak.yml index 6808b84e..ba28150d 100644 --- a/flatpak.yml +++ b/flatpak.yml @@ -1,4 +1,4 @@ -app-id: pro.kherel.selfprivacy +app-id: org.selfprivacy.app runtime: org.freedesktop.Platform runtime-version: '22.08' sdk: org.freedesktop.Sdk @@ -9,7 +9,7 @@ finish-args: - "--socket=fallback-x11" - "--socket=wayland" - "--share=network" - - "--own-name=pro.kherel.selfprivacy" + - "--own-name=org.selfprivacy.app" modules: - name: selfprivacy buildsystem: simple @@ -17,15 +17,15 @@ modules: - cp -r * /app - mkdir /app/bin - ln -s /app/selfprivacy /app/bin/selfprivacy - - install -Dm644 logo.svg /app/share/icons/hicolor/scalable/apps/pro.kherel.selfprivacy.svg - - install -Dm644 pro.kherel.selfprivacy.desktop /app/share/applications/pro.kherel.selfprivacy.desktop + - install -Dm644 logo.svg /app/share/icons/hicolor/scalable/apps/org.selfprivacy.app.svg + - install -Dm644 org.selfprivacy.app.desktop /app/share/applications/org.selfprivacy.app.desktop sources: - type: dir path: build/linux/x64/release/bundle - type: file path: assets/images/icon/logo.svg - type: file - path: pro.kherel.selfprivacy.desktop + path: org.selfprivacy.app.desktop - name: libsecret buildsystem: meson config-opts: diff --git a/pro.kherel.selfprivacy.desktop b/org.selfprivacy.app.desktop similarity index 71% rename from pro.kherel.selfprivacy.desktop rename to org.selfprivacy.app.desktop index 61a87f31..952582ac 100644 --- a/pro.kherel.selfprivacy.desktop +++ b/org.selfprivacy.app.desktop @@ -1,5 +1,5 @@ [Desktop Entry] Type=Application Name=SelfPrivacy -Icon=pro.kherel.selfprivacy +Icon=org.selfprivacy.app Exec=selfprivacy %U From 77d36a3a6a71284d1847ede65ef57484795520ef Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 00:35:58 +0300 Subject: [PATCH 130/732] Revert "Rename to org.selfprivacy.app and add flavors." This reverts commit 0d280c6b4954d8b49ad46850293fded7ed52654c. --- android/app/build.gradle | 21 ++----------------- android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 2 +- .../kherel/selfprivacy}/MainActivity.kt | 2 +- android/app/src/profile/AndroidManifest.xml | 2 +- android/build.gradle | 13 ------------ linux/CMakeLists.txt | 2 +- 7 files changed, 7 insertions(+), 37 deletions(-) rename android/app/src/main/kotlin/{org/selfprivacy/app => pro/kherel/selfprivacy}/MainActivity.kt (75%) diff --git a/android/app/build.gradle b/android/app/build.gradle index 3811c5e7..0963724e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,9 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - namespace 'org.selfprivacy.app' - - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion sourceSets { @@ -50,7 +48,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "org.selfprivacy.app" + applicationId "pro.kherel.selfprivacy" minSdkVersion 21 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() @@ -64,21 +62,6 @@ android { signingConfig signingConfigs.debug } } - - flavorDimensions "default" - productFlavors { - fdroid { - applicationId "pro.kherel.selfprivacy" - } - production { - applicationIdSuffix "" - } - nightly { - applicationIdSuffix ".nightly" - versionCode project.getVersionCode() - versionName "nightly-" + project.getVersionCode() - } - } } flutter { diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index dddeb01f..27e1af1d 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="pro.kherel.selfprivacy"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 50f47475..33c2ba9a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="pro.kherel.selfprivacy"> diff --git a/android/build.gradle b/android/build.gradle index d78205d8..31e95773 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,18 +1,5 @@ buildscript { ext.kotlin_version = '1.6.10' - ext.getVersionCode = { -> - try { - def stdout = new ByteArrayOutputStream() - exec { - commandLine 'git', 'rev-list', '--first-parent', '--count', 'origin/master' - standardOutput = stdout - } - return Integer.parseInt(stdout.toString().trim()) - } - catch (ignored) { - return -1 - } - } repositories { google() jcenter() diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 94dd8d0b..cc332a28 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -7,7 +7,7 @@ project(runner LANGUAGES CXX) set(BINARY_NAME "selfprivacy") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "org.selfprivacy.app") +set(APPLICATION_ID "pro.kherel.selfprivacy") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. From 7dddedbfc5bd2c634847909514fdcb8d6054fa58 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 01:11:05 +0300 Subject: [PATCH 131/732] use flavors --- ci.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci.py b/ci.py index 12c38b45..49df3bc4 100755 --- a/ci.py +++ b/ci.py @@ -47,11 +47,11 @@ def build_linux(): def build_apk(): podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", "&& flutter pub get --offline", - "&& flutter build apk") + "&& flutter build apk --flavor production") def sign_apk_standalone(): podman_offline(f"{CONTAINER_HOME}/src", - "zipalign -f -v 4 build/app/outputs/flutter-apk/app-release.apk", + "zipalign -f -v 4 build/app/outputs/flutter-apk/app-production-release.apk", f"standalone_{APP_NAME}-{APP_SEMVER}.apk") podman_offline(f"{CONTAINER_HOME}/src", "apksigner sign --ks ../fdroid/standalone-keystore --ks-key-alias standalone --ks-pass", @@ -61,7 +61,7 @@ def sign_apk_fdroid(): podman_offline(f"{CONTAINER_HOME}/fdroid", f"rm -rf {CONTAINER_HOME}/fdroid/unsigned/*") podman_offline(f"{CONTAINER_HOME}/fdroid", f"test ! -f {CONTAINER_HOME}/fdroid/repo/{APP_NAME}_{APP_BUILD_ID}.apk", - "&& cp ../src/build/app/outputs/flutter-apk/app-release.apk", + "&& cp ../src/build/app/outputs/flutter-apk/app-production-release.apk", f"unsigned/{APP_NAME}_{APP_BUILD_ID}.apk || echo exist") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") From 688c418593fe5603162c456630726bf173a7bb03 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 02:33:02 +0300 Subject: [PATCH 132/732] fix flatpak building --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index 49df3bc4..41285194 100755 --- a/ci.py +++ b/ci.py @@ -71,7 +71,7 @@ def package_linux_appimage(): def package_linux_flatpak(): subprocess.run(["flatpak-builder", "--force-clean", "--repo=flatpak-repo", "flatpak-build", "flatpak.yml"], check=True) - subprocess.run(["flatpak", "build-bundle", "flatpak-repo", f"{APP_NAME}-{APP_SEMVER}.flatpak", "pro.kherel.selfprivacy"], check=True) + subprocess.run(["flatpak", "build-bundle", "flatpak-repo", f"{APP_NAME}-{APP_SEMVER}.flatpak", f"{APP_NAME}"], check=True) def package_linux_archive(): podman_online(f"{CONTAINER_HOME}/src", f"tar -C build/linux/x64/release/bundle -vacf {APP_NAME}-{APP_SEMVER}.tar.zstd .") From 7ad061ff70349dfb86805eb0946213cbe62fc0ec Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 03:19:49 +0300 Subject: [PATCH 133/732] use flavors in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa305aa4..054c00bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ ENV GRADLE_USER_HOME "/tmp/gradle" RUN git clone --depth=1 --single-branch https://git.selfprivacy.org/kherel/selfprivacy.org.app.git deps WORKDIR /tmp/deps RUN flutter build linux -RUN flutter build apk +RUN flutter build apk --flavor production WORKDIR /tmp RUN rm -rf deps RUN find $GRADLE_USER_HOME/daemon -exec chmod 777 {} \; From 1e0215b9fd3b1c81d858f7b97a95d8e86f59e246 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 04:21:33 +0300 Subject: [PATCH 134/732] test bundle packaging --- .drone.yml | 97 +++++++++++++++++++++++----------------- android/app/build.gradle | 19 ++++++-- ci.py | 14 ++++-- 3 files changed, 83 insertions(+), 47 deletions(-) diff --git a/.drone.yml b/.drone.yml index d031c9c5..8b392b5a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,6 +23,10 @@ steps: commands: - ./ci.py --ci-build-apk + - name: Build Bundle Target + commands: + - ./ci.py --ci-build-bundle + trigger: event: - push @@ -45,59 +49,70 @@ steps: - git config user.email "builder@selfprivacy.org" - git config user.name "Builder" - - name: Build Intermediate Linux Release Artifact (Binary) +# - name: Build Intermediate Linux Release Artifact (Binary) +# commands: +# - ./ci.py --build-linux +# environment: +# STANDALONE_KEYSTORE_PASS: +# from_secret: STANDALONE_KEYSTORE_PASS +# FDROID_KEYSTORE_PASS: +# from_secret: FDROID_KEYSTORE_PASS + +# - name: Build Intermediate Android Release Artifact (.APK) +# commands: +# - ./ci.py --build-apk +# environment: +# STANDALONE_KEYSTORE_PASS: +# from_secret: STANDALONE_KEYSTORE_PASS +# FDROID_KEYSTORE_PASS: +# from_secret: FDROID_KEYSTORE_PASS + + - name: Build and Sign Android Release Artifact (Bundle) commands: - - ./ci.py --build-linux + - ./ci.py --build-bundle environment: STANDALONE_KEYSTORE_PASS: from_secret: STANDALONE_KEYSTORE_PASS FDROID_KEYSTORE_PASS: from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_CONF: + from_secret: GOOGLE_KEYSTORE_CONF - - name: Build Intermediate Android Release Artifact (.APK) - commands: - - ./ci.py --build-apk - environment: - STANDALONE_KEYSTORE_PASS: - from_secret: STANDALONE_KEYSTORE_PASS - FDROID_KEYSTORE_PASS: - from_secret: FDROID_KEYSTORE_PASS +# - name: Sign Android Release Artifact (.APK) for Standalone Use +# commands: +# - ./ci.py --sign-apk-standalone +# environment: +# STANDALONE_KEYSTORE_PASS: +# from_secret: STANDALONE_KEYSTORE_PASS +# FDROID_KEYSTORE_PASS: +# from_secret: FDROID_KEYSTORE_PASS - - name: Sign Android Release Artifact (.APK) for Standalone Use - commands: - - ./ci.py --sign-apk-standalone - environment: - STANDALONE_KEYSTORE_PASS: - from_secret: STANDALONE_KEYSTORE_PASS - FDROID_KEYSTORE_PASS: - from_secret: FDROID_KEYSTORE_PASS +# - name: Sign Android Release Artifact (.APK) for F-Droid Repository +# commands: +# - ./ci.py --sign-apk-fdroid +# environment: +# STANDALONE_KEYSTORE_PASS: +# from_secret: STANDALONE_KEYSTORE_PASS +# FDROID_KEYSTORE_PASS: +# from_secret: FDROID_KEYSTORE_PASS - - name: Sign Android Release Artifact (.APK) for F-Droid Repository - commands: - - ./ci.py --sign-apk-fdroid - environment: - STANDALONE_KEYSTORE_PASS: - from_secret: STANDALONE_KEYSTORE_PASS - FDROID_KEYSTORE_PASS: - from_secret: FDROID_KEYSTORE_PASS +# - name: Package Linux AppImage Artifact +# commands: +# - ./ci.py --package-linux-appimage - - name: Package Linux AppImage Artifact - commands: - - ./ci.py --package-linux-appimage +# - name: Package Linux Flatpak Artifact +# commands: +# - ./ci.py --package-linux-flatpak - - name: Package Linux Flatpak Artifact - commands: - - ./ci.py --package-linux-flatpak +# - name: Package Linux Archive Artifact +# commands: +# - ./ci.py --package-linux-archive - - name: Package Linux Archive Artifact - commands: - - ./ci.py --package-linux-archive - - - name: Push Artifacts to the Release Volume - commands: - - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd - - git commit -m Release - - git archive --format=tar HEAD | podman volume import release - +# - name: Push Artifacts to the Release Volume +# commands: +# - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd +# - git commit -m Release +# - git archive --format=tar HEAD | podman volume import release - trigger: event: diff --git a/android/app/build.gradle b/android/app/build.gradle index 0963724e..d5a704a9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -21,6 +21,12 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file('key.properties') +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" @@ -55,11 +61,18 @@ android { versionName flutterVersionName } + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig signingConfigs.release } } } diff --git a/ci.py b/ci.py index 41285194..f2ef720b 100755 --- a/ci.py +++ b/ci.py @@ -22,10 +22,12 @@ def podman_offline(dir, *args): subprocess.run(["podman", "run", "--rm", "--network=none", "--cap-add=CHOWN", f"--workdir={dir}", "-v", os.getcwd() + f":{CONTAINER_HOME}/src", "-v", f"{HOST_HOME}/fdroid:{CONTAINER_HOME}/fdroid", - "-v", f"{HOST_HOME}/fdroid-keystore:{CONTAINER_HOME}/fdroid/fdroid-keystore", - "-v", f"{HOST_HOME}/standalone-keystore:{CONTAINER_HOME}/fdroid/standalone-keystore", + "-v", f"{HOST_HOME}/fdroid-keystore:{CONTAINER_HOME}/fdroid-keystore", + "-v", f"{HOST_HOME}/standalone-keystore:{CONTAINER_HOME}/standalone-keystore", + "-v", f"{HOST_HOME}/google-keystore:{CONTAINER_HOME}/google-keystore", "--env", "FDROID_KEYSTORE_PASS=" + os.environ.get('FDROID_KEYSTORE_PASS'), "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get('STANDALONE_KEYSTORE_PASS'), + "--env", "GOOGLE_KEYSTORE_CONF=" + os.environ.get('GOOGLE_KEYSTORE_CONF'), "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) @@ -48,13 +50,18 @@ def build_apk(): podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", "&& flutter pub get --offline", "&& flutter build apk --flavor production") +def build_bundle(): + podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", + "&& echo $GOOGLE_KEYSTORE_CONF > android/key.properties", + "&& flutter pub get --offline", + "&& flutter build appbundle --flavor production") def sign_apk_standalone(): podman_offline(f"{CONTAINER_HOME}/src", "zipalign -f -v 4 build/app/outputs/flutter-apk/app-production-release.apk", f"standalone_{APP_NAME}-{APP_SEMVER}.apk") podman_offline(f"{CONTAINER_HOME}/src", - "apksigner sign --ks ../fdroid/standalone-keystore --ks-key-alias standalone --ks-pass", + f"apksigner sign --ks {CONTAINER_HOME}/standalone-keystore --ks-key-alias standalone --ks-pass", f"env:STANDALONE_KEYSTORE_PASS standalone_{APP_NAME}-{APP_SEMVER}.apk") def sign_apk_fdroid(): @@ -113,6 +120,7 @@ if __name__ == "__main__": group = parser.add_mutually_exclusive_group() group.add_argument("--build-linux", action="store_true") group.add_argument("--build-apk", action="store_true") + group.add_argument("--build-bundle", action="store_true", help="depends on $GOOGLE_KEYSTORE_CONF") group.add_argument("--sign-apk-standalone", action="store_true", help="depends on $STANDALONE_KEYSTORE_PASS") group.add_argument("--sign-apk-fdroid", action="store_true", help="depends on $FDROID_KEYSTORE_PASS") group.add_argument("--package-linux-appimage", action="store_true") From c8a703ab3bb47d7bcaba597b6bf9b981836baed0 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 04:23:14 +0300 Subject: [PATCH 135/732] test bundle packaging --- ci.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci.py b/ci.py index f2ef720b..e4630db7 100755 --- a/ci.py +++ b/ci.py @@ -137,6 +137,8 @@ if args.build_linux: build_linux() elif args.build_apk: build_apk() +elif args.build_bundle: + build_bundle() elif args.sign_apk_standalone: sign_apk_standalone() elif args.sign_apk_fdroid: From 8c1a0a5dd22d61de2c7ebcc6289a71ee1aafc6e2 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 04:35:58 +0300 Subject: [PATCH 136/732] test bundle packaging --- .drone.yml | 4 ++-- android/key.properties | 4 ++++ ci.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 android/key.properties diff --git a/.drone.yml b/.drone.yml index 8b392b5a..e9267b93 100644 --- a/.drone.yml +++ b/.drone.yml @@ -75,8 +75,8 @@ steps: from_secret: STANDALONE_KEYSTORE_PASS FDROID_KEYSTORE_PASS: from_secret: FDROID_KEYSTORE_PASS - GOOGLE_KEYSTORE_CONF: - from_secret: GOOGLE_KEYSTORE_CONF + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS # - name: Sign Android Release Artifact (.APK) for Standalone Use # commands: diff --git a/android/key.properties b/android/key.properties new file mode 100644 index 00000000..e2385da2 --- /dev/null +++ b/android/key.properties @@ -0,0 +1,4 @@ +storePassword=changeme +keyPassword=changeme +keyAlias=google +storeFile=/tmp/src/test-store diff --git a/ci.py b/ci.py index e4630db7..2d07d9b5 100755 --- a/ci.py +++ b/ci.py @@ -27,7 +27,7 @@ def podman_offline(dir, *args): "-v", f"{HOST_HOME}/google-keystore:{CONTAINER_HOME}/google-keystore", "--env", "FDROID_KEYSTORE_PASS=" + os.environ.get('FDROID_KEYSTORE_PASS'), "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get('STANDALONE_KEYSTORE_PASS'), - "--env", "GOOGLE_KEYSTORE_CONF=" + os.environ.get('GOOGLE_KEYSTORE_CONF'), + "--env", "GOOGLE_KEYSTORE_PASS=" + os.environ.get('GOOGLE_KEYSTORE_PASS'), "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) @@ -52,7 +52,7 @@ def build_apk(): "&& flutter build apk --flavor production") def build_bundle(): podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", - "&& echo $GOOGLE_KEYSTORE_CONF > android/key.properties", + "&& sed -i s/changeme/$GOOGLE_KEYSTORE_PASS/ android/key.properties", "&& flutter pub get --offline", "&& flutter build appbundle --flavor production") From 4029947ffc5ff8f9c240f16558f80fa1dd4c3785 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 04:40:05 +0300 Subject: [PATCH 137/732] test bundle packaging --- android/key.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/key.properties b/android/key.properties index e2385da2..978e6d51 100644 --- a/android/key.properties +++ b/android/key.properties @@ -1,4 +1,4 @@ storePassword=changeme keyPassword=changeme keyAlias=google -storeFile=/tmp/src/test-store +storeFile=/tmp/builder/test-store From 7e6d3b2f01f03d02fef3de89b8ae14196a09d000 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 04:43:23 +0300 Subject: [PATCH 138/732] test bundle packaging --- android/key.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/key.properties b/android/key.properties index 978e6d51..a58f1ee3 100644 --- a/android/key.properties +++ b/android/key.properties @@ -1,4 +1,4 @@ storePassword=changeme keyPassword=changeme keyAlias=google -storeFile=/tmp/builder/test-store +storeFile=/tmp/builder/google-store From 6ba9d51e3cfdae2e56e61ac40c91f7d9aa1fd890 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 04:47:19 +0300 Subject: [PATCH 139/732] test bundle packaging --- android/key.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/key.properties b/android/key.properties index a58f1ee3..ede82195 100644 --- a/android/key.properties +++ b/android/key.properties @@ -1,4 +1,4 @@ storePassword=changeme keyPassword=changeme keyAlias=google -storeFile=/tmp/builder/google-store +storeFile=/tmp/builder/google-keystore From 4a9bc46a7d3b589fd3da5ec1f58502268d403754 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 05:24:54 +0300 Subject: [PATCH 140/732] test bundle packaging --- android/key.properties | 4 ---- ci.py | 14 ++++++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 android/key.properties diff --git a/android/key.properties b/android/key.properties deleted file mode 100644 index ede82195..00000000 --- a/android/key.properties +++ /dev/null @@ -1,4 +0,0 @@ -storePassword=changeme -keyPassword=changeme -keyAlias=google -storeFile=/tmp/builder/google-keystore diff --git a/ci.py b/ci.py index 2d07d9b5..08a168b2 100755 --- a/ci.py +++ b/ci.py @@ -25,9 +25,9 @@ def podman_offline(dir, *args): "-v", f"{HOST_HOME}/fdroid-keystore:{CONTAINER_HOME}/fdroid-keystore", "-v", f"{HOST_HOME}/standalone-keystore:{CONTAINER_HOME}/standalone-keystore", "-v", f"{HOST_HOME}/google-keystore:{CONTAINER_HOME}/google-keystore", - "--env", "FDROID_KEYSTORE_PASS=" + os.environ.get('FDROID_KEYSTORE_PASS'), - "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get('STANDALONE_KEYSTORE_PASS'), - "--env", "GOOGLE_KEYSTORE_PASS=" + os.environ.get('GOOGLE_KEYSTORE_PASS'), + "--env", "FDROID_KEYSTORE_PASS=" + os.environ.get("FDROID_KEYSTORE_PASS"), + "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get("STANDALONE_KEYSTORE_PASS"), + "--env", "GOOGLE_KEYSTORE_PASS=" + os.environ.get("GOOGLE_KEYSTORE_PASS"), "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) @@ -51,8 +51,14 @@ def build_apk(): "&& flutter pub get --offline", "&& flutter build apk --flavor production") def build_bundle(): + config = open("android/key.properties", "w") + config.write(f"""storePassword={os.environ.get("GOOGLE_KEYSTORE_PASS")} +keyPassword={os.environ.get("GOOGLE_KEYSTORE_PASS")} +keyAlias=google +storeFile={CONTAINER_HOME}/google-keystore +""") + config.close() podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", - "&& sed -i s/changeme/$GOOGLE_KEYSTORE_PASS/ android/key.properties", "&& flutter pub get --offline", "&& flutter build appbundle --flavor production") From 8ec743e9532a6aec018810f6fea5c3295a0fd3c7 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 05:39:40 +0300 Subject: [PATCH 141/732] appbundle signing doen --- .drone.yml | 100 +++++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/.drone.yml b/.drone.yml index e9267b93..524dc276 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,23 +49,27 @@ steps: - git config user.email "builder@selfprivacy.org" - git config user.name "Builder" -# - name: Build Intermediate Linux Release Artifact (Binary) -# commands: -# - ./ci.py --build-linux -# environment: -# STANDALONE_KEYSTORE_PASS: -# from_secret: STANDALONE_KEYSTORE_PASS -# FDROID_KEYSTORE_PASS: -# from_secret: FDROID_KEYSTORE_PASS + - name: Build Intermediate Linux Release Artifact (Binary) + commands: + - ./ci.py --build-linux + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS -# - name: Build Intermediate Android Release Artifact (.APK) -# commands: -# - ./ci.py --build-apk -# environment: -# STANDALONE_KEYSTORE_PASS: -# from_secret: STANDALONE_KEYSTORE_PASS -# FDROID_KEYSTORE_PASS: -# from_secret: FDROID_KEYSTORE_PASS + - name: Build Intermediate Android Release Artifact (.APK) + commands: + - ./ci.py --build-apk + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS - name: Build and Sign Android Release Artifact (Bundle) commands: @@ -78,41 +82,45 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS -# - name: Sign Android Release Artifact (.APK) for Standalone Use -# commands: -# - ./ci.py --sign-apk-standalone -# environment: -# STANDALONE_KEYSTORE_PASS: -# from_secret: STANDALONE_KEYSTORE_PASS -# FDROID_KEYSTORE_PASS: -# from_secret: FDROID_KEYSTORE_PASS + - name: Sign Android Release Artifact (.APK) for Standalone Use + commands: + - ./ci.py --sign-apk-standalone + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS -# - name: Sign Android Release Artifact (.APK) for F-Droid Repository -# commands: -# - ./ci.py --sign-apk-fdroid -# environment: -# STANDALONE_KEYSTORE_PASS: -# from_secret: STANDALONE_KEYSTORE_PASS -# FDROID_KEYSTORE_PASS: -# from_secret: FDROID_KEYSTORE_PASS + - name: Sign Android Release Artifact (.APK) for F-Droid Repository + commands: + - ./ci.py --sign-apk-fdroid + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS -# - name: Package Linux AppImage Artifact -# commands: -# - ./ci.py --package-linux-appimage + - name: Package Linux AppImage Artifact + commands: + - ./ci.py --package-linux-appimage -# - name: Package Linux Flatpak Artifact -# commands: -# - ./ci.py --package-linux-flatpak + - name: Package Linux Flatpak Artifact + commands: + - ./ci.py --package-linux-flatpak -# - name: Package Linux Archive Artifact -# commands: -# - ./ci.py --package-linux-archive + - name: Package Linux Archive Artifact + commands: + - ./ci.py --package-linux-archive -# - name: Push Artifacts to the Release Volume -# commands: -# - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd -# - git commit -m Release -# - git archive --format=tar HEAD | podman volume import release - + - name: Push Artifacts to the Release Volume + commands: + - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd + - git commit -m Release + - git archive --format=tar HEAD | podman volume import release - trigger: event: From 4c30ab35c63521d4a29c89de78c4ade02a974fc1 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 08:49:02 +0300 Subject: [PATCH 142/732] include bundle for deploying --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 524dc276..ad906788 100644 --- a/.drone.yml +++ b/.drone.yml @@ -118,7 +118,7 @@ steps: - name: Push Artifacts to the Release Volume commands: - - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd + - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.aab *.tar.zstd - git commit -m Release - git archive --format=tar HEAD | podman volume import release - From 12927596a09664d7432c049311b096094676790d Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 08:50:08 +0300 Subject: [PATCH 143/732] dont build test bundles --- .drone.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index ad906788..e7466329 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,10 +23,6 @@ steps: commands: - ./ci.py --ci-build-apk - - name: Build Bundle Target - commands: - - ./ci.py --ci-build-bundle - trigger: event: - push From c8913df84f84a913aedb2f4610425b70207b0a7d Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 18:34:08 +0300 Subject: [PATCH 144/732] add gpu acceleration to Flatkap --- flatpak.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/flatpak.yml b/flatpak.yml index ba28150d..6ab28b3d 100644 --- a/flatpak.yml +++ b/flatpak.yml @@ -10,6 +10,7 @@ finish-args: - "--socket=wayland" - "--share=network" - "--own-name=org.selfprivacy.app" + - "--device=dri" modules: - name: selfprivacy buildsystem: simple From e748d8de19765e246a92796e9f5007f49342304a Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 19:31:55 +0300 Subject: [PATCH 145/732] dont sign using gradle --- android/app/build.gradle | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index d5a704a9..9c40923c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -61,18 +61,18 @@ android { versionName flutterVersionName } - signingConfigs { - release { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword keystoreProperties['storePassword'] + flavorDimensions "default" + productFlavors { + fdroid { + applicationId "pro.kherel.selfprivacy" } - } - - buildTypes { - release { - signingConfig signingConfigs.release + production { + applicationIdSuffix "" + } + nightly { + applicationIdSuffix ".nightly" + versionCode project.getVersionCode() + versionName "nightly-" + project.getVersionCode() } } } From 591b29b7b76d49bea2ccd9641a338b64b3bbedb5 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 19:46:44 +0300 Subject: [PATCH 146/732] add bundle signing task --- .drone.yml | 13 ++++++++++++- ci.py | 15 +++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index e7466329..e89911be 100644 --- a/.drone.yml +++ b/.drone.yml @@ -67,7 +67,7 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS - - name: Build and Sign Android Release Artifact (Bundle) + - name: Build Intermediate Android Release Artifact (Bundle) commands: - ./ci.py --build-bundle environment: @@ -100,6 +100,17 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS + - name: Sign Android Release Artifact (Bundle) for Google Play + commands: + - ./ci.py --sign-bundle + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS + - name: Package Linux AppImage Artifact commands: - ./ci.py --package-linux-appimage diff --git a/ci.py b/ci.py index 08a168b2..0b3d94c1 100755 --- a/ci.py +++ b/ci.py @@ -51,13 +51,6 @@ def build_apk(): "&& flutter pub get --offline", "&& flutter build apk --flavor production") def build_bundle(): - config = open("android/key.properties", "w") - config.write(f"""storePassword={os.environ.get("GOOGLE_KEYSTORE_PASS")} -keyPassword={os.environ.get("GOOGLE_KEYSTORE_PASS")} -keyAlias=google -storeFile={CONTAINER_HOME}/google-keystore -""") - config.close() podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", "&& flutter pub get --offline", "&& flutter build appbundle --flavor production") @@ -79,6 +72,11 @@ def sign_apk_fdroid(): podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") +def sign_bundle(): + podman_offline(f"{CONTAINER_HOME}/src", + f"jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore {CONTAINER_HOME}/google-keystore -signedjar {APP_NAME}-{APP_SEMVER}.aab build/app/outputs/bundle/productionRelease/app-production-release.aab google", + f"env:STANDALONE_KEYSTORE_PASS standalone_{APP_NAME}-{APP_SEMVER}.apk") + def package_linux_appimage(): podman_online(f"{CONTAINER_HOME}/src", "appimage-builder --recipe appimage.yml") @@ -126,9 +124,10 @@ if __name__ == "__main__": group = parser.add_mutually_exclusive_group() group.add_argument("--build-linux", action="store_true") group.add_argument("--build-apk", action="store_true") - group.add_argument("--build-bundle", action="store_true", help="depends on $GOOGLE_KEYSTORE_CONF") + group.add_argument("--build-bundle", action="store_true") group.add_argument("--sign-apk-standalone", action="store_true", help="depends on $STANDALONE_KEYSTORE_PASS") group.add_argument("--sign-apk-fdroid", action="store_true", help="depends on $FDROID_KEYSTORE_PASS") + group.add_argument("--sign-bundle", action="store_true", help="depends on $GOOGLE_KEYSTORE_PASS") group.add_argument("--package-linux-appimage", action="store_true") group.add_argument("--package-linux-flatpak", action="store_true") group.add_argument("--package-linux-archive", action="store_true") From 0f31212e1c4fba1a011f3422f24e81e9da777d70 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 19:47:39 +0300 Subject: [PATCH 147/732] add bundle signing task --- ci.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci.py b/ci.py index 0b3d94c1..3ea2dbe7 100755 --- a/ci.py +++ b/ci.py @@ -148,6 +148,8 @@ elif args.sign_apk_standalone: sign_apk_standalone() elif args.sign_apk_fdroid: sign_apk_fdroid() +elif args.sign_bundle: + sign_sign_bundle() elif args.package_linux_appimage: package_linux_appimage() elif args.package_linux_flatpak: From 0a310c9de255202ba7fe5e915a23795ea6617530 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 23:50:42 +0300 Subject: [PATCH 148/732] sign bundles with jarsign --- ci.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci.py b/ci.py index 3ea2dbe7..ae106d98 100755 --- a/ci.py +++ b/ci.py @@ -74,8 +74,7 @@ def sign_apk_fdroid(): def sign_bundle(): podman_offline(f"{CONTAINER_HOME}/src", - f"jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore {CONTAINER_HOME}/google-keystore -signedjar {APP_NAME}-{APP_SEMVER}.aab build/app/outputs/bundle/productionRelease/app-production-release.aab google", - f"env:STANDALONE_KEYSTORE_PASS standalone_{APP_NAME}-{APP_SEMVER}.apk") + f"jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore {CONTAINER_HOME}/google-keystore -signedjar {APP_NAME}-{APP_SEMVER}.aab -storepass:env GOOGLE_KEYSTORE_PASS build/app/outputs/bundle/productionRelease/app-production-release.aab google", def package_linux_appimage(): podman_online(f"{CONTAINER_HOME}/src", "appimage-builder --recipe appimage.yml") @@ -149,7 +148,7 @@ elif args.sign_apk_standalone: elif args.sign_apk_fdroid: sign_apk_fdroid() elif args.sign_bundle: - sign_sign_bundle() + sign_bundle() elif args.package_linux_appimage: package_linux_appimage() elif args.package_linux_flatpak: From b85a6ba4c49e584579e2e4922fcb9e6c96576717 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 00:04:46 +0300 Subject: [PATCH 149/732] sign bundles with jarsign --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index ae106d98..86022bc9 100755 --- a/ci.py +++ b/ci.py @@ -74,7 +74,7 @@ def sign_apk_fdroid(): def sign_bundle(): podman_offline(f"{CONTAINER_HOME}/src", - f"jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore {CONTAINER_HOME}/google-keystore -signedjar {APP_NAME}-{APP_SEMVER}.aab -storepass:env GOOGLE_KEYSTORE_PASS build/app/outputs/bundle/productionRelease/app-production-release.aab google", + f"jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore {CONTAINER_HOME}/google-keystore -signedjar {APP_NAME}-{APP_SEMVER}.aab -storepass:env GOOGLE_KEYSTORE_PASS build/app/outputs/bundle/productionRelease/app-production-release.aab google") def package_linux_appimage(): podman_online(f"{CONTAINER_HOME}/src", "appimage-builder --recipe appimage.yml") From 869f8b69aad74884b5440e390ca27151d6cb60e6 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 02:32:02 +0300 Subject: [PATCH 150/732] add windows target --- .drone.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.drone.yml b/.drone.yml index e89911be..7d5cca93 100644 --- a/.drone.yml +++ b/.drone.yml @@ -171,3 +171,15 @@ node: depends_on: - Release + +--- + +kind: pipeline +type: exec +name: Windows + +steps: + - flutter build windows + +node: + server: windows From bb5d6106e7f33a4a73d2cca267c158b8b83642e0 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 02:33:08 +0300 Subject: [PATCH 151/732] add windows target --- .drone.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7d5cca93..f06ec04a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -179,7 +179,9 @@ type: exec name: Windows steps: - - flutter build windows + name: Build Windows Binary + commands: + - flutter build windows node: server: windows From c1168ab4feff72e211acf64bc4fe2f180d953886 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 02:33:44 +0300 Subject: [PATCH 152/732] add windows target --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index f06ec04a..11090946 100644 --- a/.drone.yml +++ b/.drone.yml @@ -179,9 +179,9 @@ type: exec name: Windows steps: - name: Build Windows Binary - commands: - - flutter build windows + - name: Build Windows Binary + commands: + - flutter build windows node: server: windows From 8862d5e4c2f133bbcbee40bfb49faef96156dde8 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 02:34:58 +0300 Subject: [PATCH 153/732] add windows target --- .drone.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 11090946..7f2db194 100644 --- a/.drone.yml +++ b/.drone.yml @@ -182,6 +182,3 @@ steps: - name: Build Windows Binary commands: - flutter build windows - -node: - server: windows From 370b85014db3d24dd33be9e091bf10f6f647d08c Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 02:41:44 +0300 Subject: [PATCH 154/732] add windows target --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index 7f2db194..11090946 100644 --- a/.drone.yml +++ b/.drone.yml @@ -182,3 +182,6 @@ steps: - name: Build Windows Binary commands: - flutter build windows + +node: + server: windows From ea1637dcefff5b6706adef40adb96578ab00c908 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 02:45:21 +0300 Subject: [PATCH 155/732] add windows target --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 11090946..a98e582c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -184,4 +184,4 @@ steps: - flutter build windows node: - server: windows + kind: windows From d09251180ab83526533162f970f44d114cc99bc5 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 02:50:02 +0300 Subject: [PATCH 156/732] add windows target --- .drone.yml | 68 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.drone.yml b/.drone.yml index a98e582c..777a7225 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,37 +1,37 @@ -kind: pipeline -type: exec -name: Continuous Integration - -steps: - - name: Prepare - commands: - - ln -s /var/lib/drone-runner-exec/.local $HOME/.local - - - name: Run Tests - commands: - - ./ci.py --ci-run-tests - - sonar-scanner -Dsonar.projectKey=SelfPrivacy-Flutter-App -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" - environment: - SONARQUBE_TOKEN: - from_secret: SONARQUBE_TOKEN - - - name: Build Linux Target - commands: - - ./ci.py --ci-build-linux - - - name: Build APK Target - commands: - - ./ci.py --ci-build-apk - -trigger: - event: - - push - - pull_request - -node: - server: builder - ---- +#kind: pipeline +#type: exec +#name: Continuous Integration +# +#steps: +# - name: Prepare +# commands: +# - ln -s /var/lib/drone-runner-exec/.local $HOME/.local +# +# - name: Run Tests +# commands: +# - ./ci.py --ci-run-tests +# - sonar-scanner -Dsonar.projectKey=SelfPrivacy-Flutter-App -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" +# environment: +# SONARQUBE_TOKEN: +# from_secret: SONARQUBE_TOKEN +# +# - name: Build Linux Target +# commands: +# - ./ci.py --ci-build-linux +# +# - name: Build APK Target +# commands: +# - ./ci.py --ci-build-apk +# +#trigger: +# event: +# - push +# - pull_request +# +#node: +# server: builder +# +#--- kind: pipeline type: exec From 595c758021c74865f596f4cd88397789b554495c Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 03:00:07 +0300 Subject: [PATCH 157/732] add windows target --- .drone.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 777a7225..814355fd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -178,10 +178,11 @@ kind: pipeline type: exec name: Windows +platform: + os: windows + arch: amd64 + steps: - name: Build Windows Binary commands: - flutter build windows - -node: - kind: windows From 3c37985db8307119039d67df835f23070f67229e Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 16 Sep 2022 03:11:06 +0300 Subject: [PATCH 158/732] add windows target --- .drone.yml | 68 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.drone.yml b/.drone.yml index 814355fd..12f4dd8c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,37 +1,37 @@ -#kind: pipeline -#type: exec -#name: Continuous Integration -# -#steps: -# - name: Prepare -# commands: -# - ln -s /var/lib/drone-runner-exec/.local $HOME/.local -# -# - name: Run Tests -# commands: -# - ./ci.py --ci-run-tests -# - sonar-scanner -Dsonar.projectKey=SelfPrivacy-Flutter-App -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" -# environment: -# SONARQUBE_TOKEN: -# from_secret: SONARQUBE_TOKEN -# -# - name: Build Linux Target -# commands: -# - ./ci.py --ci-build-linux -# -# - name: Build APK Target -# commands: -# - ./ci.py --ci-build-apk -# -#trigger: -# event: -# - push -# - pull_request -# -#node: -# server: builder -# -#--- +kind: pipeline +type: exec +name: Continuous Integration + +steps: + - name: Prepare + commands: + - ln -s /var/lib/drone-runner-exec/.local $HOME/.local + + - name: Run Tests + commands: + - ./ci.py --ci-run-tests + - sonar-scanner -Dsonar.projectKey=SelfPrivacy-Flutter-App -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" + environment: + SONARQUBE_TOKEN: + from_secret: SONARQUBE_TOKEN + + - name: Build Linux Target + commands: + - ./ci.py --ci-build-linux + + - name: Build APK Target + commands: + - ./ci.py --ci-build-apk + +trigger: + event: + - push + - pull_request + +node: + server: builder + +--- kind: pipeline type: exec From 2eab9a969dccd5defd21fa046c0a385df2ab7e76 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 08:59:25 +0300 Subject: [PATCH 159/732] add fdroid nightlies --- .drone.yml | 17 ++++++++++++++--- ci.py | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 12f4dd8c..78d028d4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,14 +15,25 @@ steps: SONARQUBE_TOKEN: from_secret: SONARQUBE_TOKEN - - name: Build Linux Target + - name: Build Nightly Linux Release Artifact (Binary) commands: - ./ci.py --ci-build-linux - - name: Build APK Target + - name: Build Nightly Release Artifact (.APK) commands: - ./ci.py --ci-build-apk + - name: Sign and Deploy Nightly Android Release Artifact (.APK) for F-Droid Repository + commands: + - ./ci.py --sign-apk-fdroid-nightly + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS + trigger: event: - push @@ -89,7 +100,7 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS - - name: Sign Android Release Artifact (.APK) for F-Droid Repository + - name: Sign and Deploy Android Release Artifact (.APK) for F-Droid Repository commands: - ./ci.py --sign-apk-fdroid environment: diff --git a/ci.py b/ci.py index 86022bc9..8d5455fe 100755 --- a/ci.py +++ b/ci.py @@ -10,9 +10,11 @@ HOST_HOME = "/var/lib/drone-runner-exec" CONTAINER_HOME = "/tmp/builder" APP_NAME = "org.selfprivacy.app" +APP_NAME_NIGHTLY = "org.selfprivacy.app.nightly" APP_VERSION_FULL = yaml.safe_load(open("pubspec.yaml", "r"))['version'] APP_SEMVER = APP_VERSION_FULL[:APP_VERSION_FULL.find("+")] APP_BUILD_ID = APP_VERSION_FULL[APP_VERSION_FULL.find("+"):][1::] +APP_BUILD_ID_NIGHTLY = subprocess.run(["git", "rev-list", "--first-parent", "--count", "HEAD"], check=True, stdout=subprocess.PIPE).stdout.decode() HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/release/_data" @@ -72,6 +74,15 @@ def sign_apk_fdroid(): podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") +def sign_apk_fdroid_nightly(): + podman_offline(f"{CONTAINER_HOME}/fdroid", f"rm -rf {CONTAINER_HOME}/fdroid/unsigned/*") + podman_offline(f"{CONTAINER_HOME}/fdroid", + f"test ! -f {CONTAINER_HOME}/fdroid/repo/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGHTLY}.apk", + "&& cp ../src/build/app/outputs/flutter-apk/app-nightly-release.apk", + f"unsigned/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGTLY}.apk || echo exist") + podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") + podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") + def sign_bundle(): podman_offline(f"{CONTAINER_HOME}/src", f"jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore {CONTAINER_HOME}/google-keystore -signedjar {APP_NAME}-{APP_SEMVER}.aab -storepass:env GOOGLE_KEYSTORE_PASS build/app/outputs/bundle/productionRelease/app-production-release.aab google") @@ -126,6 +137,7 @@ if __name__ == "__main__": group.add_argument("--build-bundle", action="store_true") group.add_argument("--sign-apk-standalone", action="store_true", help="depends on $STANDALONE_KEYSTORE_PASS") group.add_argument("--sign-apk-fdroid", action="store_true", help="depends on $FDROID_KEYSTORE_PASS") + group.add_argument("--sign-apk-fdroid-nightly", action="store_true", help="depends on $FDROID_KEYSTORE_PASS") group.add_argument("--sign-bundle", action="store_true", help="depends on $GOOGLE_KEYSTORE_PASS") group.add_argument("--package-linux-appimage", action="store_true") group.add_argument("--package-linux-flatpak", action="store_true") @@ -147,6 +159,8 @@ elif args.sign_apk_standalone: sign_apk_standalone() elif args.sign_apk_fdroid: sign_apk_fdroid() +elif args.sign_apk_fdroid_nightly: + sign_apk_fdroid_nightly() elif args.sign_bundle: sign_bundle() elif args.package_linux_appimage: From e3377cf0738e8252fe9303e0e1be1e60f4910aa4 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 09:04:56 +0300 Subject: [PATCH 160/732] add fdroid nightlies --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index 8d5455fe..6f82709f 100755 --- a/ci.py +++ b/ci.py @@ -78,7 +78,7 @@ def sign_apk_fdroid_nightly(): podman_offline(f"{CONTAINER_HOME}/fdroid", f"rm -rf {CONTAINER_HOME}/fdroid/unsigned/*") podman_offline(f"{CONTAINER_HOME}/fdroid", f"test ! -f {CONTAINER_HOME}/fdroid/repo/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGHTLY}.apk", - "&& cp ../src/build/app/outputs/flutter-apk/app-nightly-release.apk", + "&& cp ../src/build/app/outputs/flutter-apk/app-nightly-debug.apk", f"unsigned/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGTLY}.apk || echo exist") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") From c221c1cb7326360d176daf7a3d8d7c5a7265fcce Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 09:09:47 +0300 Subject: [PATCH 161/732] add fdroid nightlies --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index 6f82709f..48b8acf9 100755 --- a/ci.py +++ b/ci.py @@ -79,7 +79,7 @@ def sign_apk_fdroid_nightly(): podman_offline(f"{CONTAINER_HOME}/fdroid", f"test ! -f {CONTAINER_HOME}/fdroid/repo/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGHTLY}.apk", "&& cp ../src/build/app/outputs/flutter-apk/app-nightly-debug.apk", - f"unsigned/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGTLY}.apk || echo exist") + f"unsigned/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGHTLY}.apk || echo exist") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") From ccad11ee5e67f6ccd36fb0f016d41c493f3f485e Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 09:20:24 +0300 Subject: [PATCH 162/732] use HEAD in Android nightlies and fix some targets --- android/build.gradle | 13 +++++++++++++ ios/Runner.xcodeproj/project.pbxproj | 6 +++--- windows/runner/Runner.rc | 4 ++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 31e95773..bf7e09c6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,18 @@ buildscript { ext.kotlin_version = '1.6.10' + ext.getVersionCode = { -> + try { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-list', '--first-parent', '--count', 'HEAD' + standardOutput = stdout + } + return Integer.parseInt(stdout.toString().trim()) + } + catch (ignored) { + return -1 + } + } repositories { google() jcenter() diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index b22b290f..a47c4156 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -376,7 +376,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = pro.kherel.selfprivacy; + PRODUCT_BUNDLE_IDENTIFIER = org.selfprivacy.selfprivacy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -516,7 +516,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = pro.kherel.selfprivacy; + PRODUCT_BUNDLE_IDENTIFIER = org.selfprivacy.selfprivacy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -548,7 +548,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = pro.kherel.selfprivacy; + PRODUCT_BUNDLE_IDENTIFIER = org.selfprivacy.selfprivacy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index e2d13c33..5f63465c 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -89,11 +89,11 @@ BEGIN BEGIN BLOCK "040904e4" BEGIN - VALUE "CompanyName", "pro.kherel" "\0" + VALUE "CompanyName", "org.selfprivacy" "\0" VALUE "FileDescription", "selfprivacy" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" VALUE "InternalName", "selfprivacy" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 pro.kherel. All rights reserved." "\0" + VALUE "LegalCopyright", "Copyright (C) 2022 org.selfprivacy. All rights reserved." "\0" VALUE "OriginalFilename", "selfprivacy.exe" "\0" VALUE "ProductName", "selfprivacy" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" From 7127baaa139318688f75e82421a341b6e8776a47 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 09:24:47 +0300 Subject: [PATCH 163/732] fix fdroid nightlies --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index 48b8acf9..08d618a6 100755 --- a/ci.py +++ b/ci.py @@ -14,7 +14,7 @@ APP_NAME_NIGHTLY = "org.selfprivacy.app.nightly" APP_VERSION_FULL = yaml.safe_load(open("pubspec.yaml", "r"))['version'] APP_SEMVER = APP_VERSION_FULL[:APP_VERSION_FULL.find("+")] APP_BUILD_ID = APP_VERSION_FULL[APP_VERSION_FULL.find("+"):][1::] -APP_BUILD_ID_NIGHTLY = subprocess.run(["git", "rev-list", "--first-parent", "--count", "HEAD"], check=True, stdout=subprocess.PIPE).stdout.decode() +APP_BUILD_ID_NIGHTLY = subprocess.run(["git", "rev-list", "--first-parent", "--count", "HEAD"], check=True, stdout=subprocess.PIPE).stdout.decode().strip() HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/release/_data" From d63a6c3442596ac997e45e951df233e9578914ad Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 09:49:05 +0300 Subject: [PATCH 164/732] deploy nightlies --- .drone.yml | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.drone.yml b/.drone.yml index 78d028d4..376284a6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ kind: pipeline type: exec -name: Continuous Integration +name: Nightly steps: - name: Prepare @@ -23,7 +23,7 @@ steps: commands: - ./ci.py --ci-build-apk - - name: Sign and Deploy Nightly Android Release Artifact (.APK) for F-Droid Repository + - name: Sign and Commit Nightly Android Release Artifact (.APK) for F-Droid Repository commands: - ./ci.py --sign-apk-fdroid-nightly environment: @@ -34,10 +34,18 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS + - name: Deploy F-Droid Repo + commands: + - ./ci.py --deploy-fdroid-repo + environment: + SSH_PRIVATE_KEY: + from_secret: SSH_PRIVATE_KEY + trigger: event: - push - - pull_request + branch: + - master node: server: builder @@ -100,7 +108,7 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS - - name: Sign and Deploy Android Release Artifact (.APK) for F-Droid Repository + - name: Sign and Commit Android Release Artifact (.APK) for F-Droid Repository commands: - ./ci.py --sign-apk-fdroid environment: @@ -183,17 +191,17 @@ node: depends_on: - Release ---- - -kind: pipeline -type: exec -name: Windows - -platform: - os: windows - arch: amd64 - -steps: - - name: Build Windows Binary - commands: - - flutter build windows +#--- +# +#kind: pipeline +#type: exec +#name: Windows +# +#platform: +# os: windows +# arch: amd64 +# +#steps: +# - name: Build Windows Binary +# commands: +# - flutter build windows From 01a2e38d817a3149b2f77daa00f092322552779b Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 10:03:50 +0300 Subject: [PATCH 165/732] delete dead signing code --- android/app/build.gradle | 6 ------ 1 file changed, 6 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9c40923c..4d2afc72 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -21,12 +21,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -def keystoreProperties = new Properties() -def keystorePropertiesFile = rootProject.file('key.properties') -if (keystorePropertiesFile.exists()) { - keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) -} - apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" From e9f36f62699fb661296f043527b3ac8fae3a3db3 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 17 Sep 2022 10:10:19 +0300 Subject: [PATCH 166/732] wording --- .drone.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 376284a6..968373e6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -174,7 +174,7 @@ steps: GITEA_RELEASE_TOKEN: from_secret: GITEA_RELEASE_TOKEN - - name: Deploy F-Droid Repo + - name: Deploy F-Droid Repository commands: - ./ci.py --deploy-fdroid-repo environment: diff --git a/Dockerfile b/Dockerfile index 054c00bf..32bc427d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ ENV FLUTTER_HOME "/opt/flutter" ADD $FLUTTER_URL . RUN tar -vxf flutter_linux_${FLUTTER_VERSION}-stable.tar.xz && \ rm flutter_linux_${FLUTTER_VERSION}-stable.tar.xz -# Flutter doesn't work without write permissions, so fuck it, fuck. +# Flutter doesn't work without write permissions, so fuck it, fuck RUN chmod -R 777 $FLUTTER_HOME RUN git config --system --add safe.directory $FLUTTER_HOME From 09003f4ff5e2cceeb4548d1c5c412e75263fbadc Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 03:58:36 +0300 Subject: [PATCH 167/732] targets with correct project id --- ios/.gitignore | 2 + ios/Flutter/AppFrameworkInfo.plist | 4 +- ios/Flutter/Debug.xcconfig | 1 - ios/Flutter/Release.xcconfig | 1 - ios/Podfile | 41 -- ios/Podfile.lock | 64 -- ios/Runner.xcodeproj/project.pbxproj | 119 +--- .../xcshareddata/xcschemes/Runner.xcscheme | 8 +- .../contents.xcworkspacedata | 3 - .../Icon-App-1024x1024@1x.png | Bin 42150 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 829 -> 564 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 1058 -> 1283 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 1378 -> 1588 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 1007 -> 1025 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 1382 -> 1716 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 1721 -> 1920 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 1058 -> 1283 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 1611 -> 1895 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 2268 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 1703 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 3047 -> 3831 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 1611 -> 1888 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 2591 -> 3294 bytes .../Icon-App-83.5x83.5@2x.png | Bin 2840 -> 3612 bytes ios/Runner/Info.plist | 15 +- ios/Runner/ru.lproj/LaunchScreen.strings | 1 - ios/Runner/ru.lproj/Main.strings | 1 - macos/.gitignore | 7 + macos/Flutter/Flutter-Debug.xcconfig | 1 + macos/Flutter/Flutter-Release.xcconfig | 1 + macos/Flutter/GeneratedPluginRegistrant.swift | 30 + macos/Runner.xcodeproj/project.pbxproj | 572 ++++++++++++++++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 87 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + macos/Runner/AppDelegate.swift | 9 + .../AppIcon.appiconset/Contents.json | 68 +++ .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 102994 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 5680 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 520 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 14142 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1066 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 36406 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 2218 bytes macos/Runner/Base.lproj/MainMenu.xib | 343 +++++++++++ macos/Runner/Configs/AppInfo.xcconfig | 14 + macos/Runner/Configs/Debug.xcconfig | 2 + macos/Runner/Configs/Release.xcconfig | 2 + macos/Runner/Configs/Warnings.xcconfig | 13 + macos/Runner/DebugProfile.entitlements | 12 + macos/Runner/Info.plist | 32 + macos/Runner/MainFlutterWindow.swift | 15 + macos/Runner/Release.entitlements | 8 + windows/runner/CMakeLists.txt | 7 + windows/runner/Runner.rc | 10 +- windows/runner/runner.exe.manifest | 2 +- 57 files changed, 1274 insertions(+), 244 deletions(-) delete mode 100644 ios/Podfile delete mode 100644 ios/Podfile.lock delete mode 100644 ios/Runner/ru.lproj/LaunchScreen.strings delete mode 100644 ios/Runner/ru.lproj/Main.strings create mode 100644 macos/.gitignore create mode 100644 macos/Flutter/Flutter-Debug.xcconfig create mode 100644 macos/Flutter/Flutter-Release.xcconfig create mode 100644 macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 macos/Runner.xcodeproj/project.pbxproj create mode 100644 macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 macos/Runner/AppDelegate.swift create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 macos/Runner/Base.lproj/MainMenu.xib create mode 100644 macos/Runner/Configs/AppInfo.xcconfig create mode 100644 macos/Runner/Configs/Debug.xcconfig create mode 100644 macos/Runner/Configs/Release.xcconfig create mode 100644 macos/Runner/Configs/Warnings.xcconfig create mode 100644 macos/Runner/DebugProfile.entitlements create mode 100644 macos/Runner/Info.plist create mode 100644 macos/Runner/MainFlutterWindow.swift create mode 100644 macos/Runner/Release.entitlements diff --git a/ios/.gitignore b/ios/.gitignore index e96ef602..7a7f9873 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -1,3 +1,4 @@ +**/dgph *.mode1v3 *.mode2v3 *.moved-aside @@ -18,6 +19,7 @@ Flutter/App.framework Flutter/Flutter.framework Flutter/Flutter.podspec Flutter/Generated.xcconfig +Flutter/ephemeral/ Flutter/app.flx Flutter/app.zip Flutter/flutter_assets/ diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index f2872cf4..9625e105 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) + en CFBundleExecutable App CFBundleIdentifier @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index e8efba11..592ceee8 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1,2 +1 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 399e9340..592ceee8 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1,2 +1 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile deleted file mode 100644 index 1e8c3c90..00000000 --- a/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/ios/Podfile.lock b/ios/Podfile.lock deleted file mode 100644 index 5db2ddac..00000000 --- a/ios/Podfile.lock +++ /dev/null @@ -1,64 +0,0 @@ -PODS: - - Flutter (1.0.0) - - flutter_secure_storage (3.3.1): - - Flutter - - local_auth (0.0.1): - - Flutter - - package_info (0.0.1): - - Flutter - - path_provider (0.0.1): - - Flutter - - share_plus (0.0.1): - - Flutter - - shared_preferences (0.0.1): - - Flutter - - url_launcher (0.0.1): - - Flutter - - wakelock (0.0.1): - - Flutter - -DEPENDENCIES: - - Flutter (from `Flutter`) - - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - - local_auth (from `.symlinks/plugins/local_auth/ios`) - - package_info (from `.symlinks/plugins/package_info/ios`) - - path_provider (from `.symlinks/plugins/path_provider/ios`) - - share_plus (from `.symlinks/plugins/share_plus/ios`) - - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - - url_launcher (from `.symlinks/plugins/url_launcher/ios`) - - wakelock (from `.symlinks/plugins/wakelock/ios`) - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - flutter_secure_storage: - :path: ".symlinks/plugins/flutter_secure_storage/ios" - local_auth: - :path: ".symlinks/plugins/local_auth/ios" - package_info: - :path: ".symlinks/plugins/package_info/ios" - path_provider: - :path: ".symlinks/plugins/path_provider/ios" - share_plus: - :path: ".symlinks/plugins/share_plus/ios" - shared_preferences: - :path: ".symlinks/plugins/shared_preferences/ios" - url_launcher: - :path: ".symlinks/plugins/url_launcher/ios" - wakelock: - :path: ".symlinks/plugins/wakelock/ios" - -SPEC CHECKSUMS: - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a - flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec - local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd - package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 - path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c - share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 - shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d - url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef - wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f - -PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c - -COCOAPODS: 1.11.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a47c4156..c6d1ec07 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -13,7 +13,6 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - B724A8991C5C577148A932D7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DAE4FF490544D49BC2DD9A3 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -30,14 +29,9 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 02BB87F67990BDBF46B33A99 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 247FA89325766918005A3DE3 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Main.strings; sourceTree = ""; }; - 247FA89425766918005A3DE3 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/LaunchScreen.strings; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 4F50D46E1FAD96D4DE911FF3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 5DAE4FF490544D49BC2DD9A3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -48,7 +42,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F3A7AA4BF6A26F2649361520 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -56,21 +49,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B724A8991C5C577148A932D7 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 89F487B6EA8992414428CAB5 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 5DAE4FF490544D49BC2DD9A3 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -88,8 +72,6 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - A0CB544917625008B1ABA634 /* Pods */, - 89F487B6EA8992414428CAB5 /* Frameworks */, ); sourceTree = ""; }; @@ -116,16 +98,6 @@ path = Runner; sourceTree = ""; }; - A0CB544917625008B1ABA634 /* Pods */ = { - isa = PBXGroup; - children = ( - 02BB87F67990BDBF46B33A99 /* Pods-Runner.debug.xcconfig */, - F3A7AA4BF6A26F2649361520 /* Pods-Runner.release.xcconfig */, - 4F50D46E1FAD96D4DE911FF3 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -133,14 +105,12 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - EE51AAD2B783790EFCD497B1 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 3687B4F187EC56464925D9AB /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -173,7 +143,6 @@ knownRegions = ( en, Base, - ru, ); mainGroup = 97C146E51CF9000F007C117D; productRefGroup = 97C146EF1CF9000F007C117D /* Products */; @@ -200,23 +169,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3687B4F187EC56464925D9AB /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -245,28 +197,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - EE51AAD2B783790EFCD497B1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -286,7 +216,6 @@ isa = PBXVariantGroup; children = ( 97C146FB1CF9000F007C117D /* Base */, - 247FA89325766918005A3DE3 /* ru */, ); name = Main.storyboard; sourceTree = ""; @@ -295,7 +224,6 @@ isa = PBXVariantGroup; children = ( 97C147001CF9000F007C117D /* Base */, - 247FA89425766918005A3DE3 /* ru */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -307,7 +235,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -345,7 +272,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -360,27 +287,17 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 7; - DEVELOPMENT_TEAM = UVNTKR53DD; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); PRODUCT_BUNDLE_IDENTIFIER = org.selfprivacy.selfprivacy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; @@ -389,7 +306,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -433,7 +349,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -445,7 +361,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -483,7 +398,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -500,28 +415,18 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 7; - DEVELOPMENT_TEAM = UVNTKR53DD; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); PRODUCT_BUNDLE_IDENTIFIER = org.selfprivacy.selfprivacy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -532,27 +437,17 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 7; - DEVELOPMENT_TEAM = UVNTKR53DD; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); PRODUCT_BUNDLE_IDENTIFIER = org.selfprivacy.selfprivacy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6e..c87d15a3 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - - - diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index fb07346cc0e1d3359ff8ee08cb26300dac4d937f..dc9ada4725e9b0ddb1deab583e5b5102493aa332 100644 GIT binary patch literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7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U=<3QqJIZy?9}2hsM%-5U2leWF!I>1sLa zsT1e01N*!HBGtwKr_!+=ULJn#1pI&PoszA=fhj6IP030Zd}t+cpsyFluDk)-T`_eeoEcx{OBywB&>wV#t*eGBkoBnOq)KT>;6H*wT`uBwrib%hE}7)fMaoSO zm33>N=AM$J9%T;?2R)byW<=_HlWO~<^T-5iv;(YuXzRNvH+s*3;cr23f{U9;UIBr~ zilGt8K6rT|#*gI&JLn#B8|EHpQic-`+>5-CqNAp&i_R$XN(~Q+{NOJ9BRR0+5-MqD z<|oh||09a~1ZqB?1`K|sXi#neAfyU7EB!-xL9OLmeneH~yK4az%KvG~`xbej8bF6Z zgKw_;&p-?z01_7h-+C0klUo5n-b&@&U-=!-$OyvNe;4$VY5#KQUm5yW%Qn>EUpw@# zVf>y#1UT#euVKXYk+~fDEA8o9KW!{R@ch1ou@+p(%mj@w+r(uy6{)BH{nI0Yd`UGZ z1H``pb-k$2z(Ad~?v3X2@8hwBh(Idn^=VF&=W_o#ZkzenZk3l1_^~){eXQg+w_E=o DW__w5 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index c9e0c45262d18e416f32651719e0f73a3ea57af0..28c6bf03016f6c994b70f38d1b7346e5831b531f 100644 GIT binary patch delta 550 zcmV+>0@?k&2DAi_8Gi-<0051N9Sr~g00DDSM?wIu&K&6g00HhvL_t(I5v`QFOB_)Y z#?QI;j_a;jjf#Z$YJ7mH(xecJU?W)A`9CN~KrBV85C}GDQ=|;GDFPNjtWty!L{u=? zh>8yo%^GE+J9o~_IZFoiamQVQXP7%LzTbT3F@uf+9x&7cvVV%GdjTaC;zf>@mq<=3 z!c<%*UT)@yJ|0BK6~d4Jx-*KV`ZQ(@VyUPupum=XhInNG#Z_k-X|hK{B}~9IfiWx} zLD5QY6Vm)p0NrWymdkrHPN5Vgwd>5>4HI1=@PA+e^rq~CEj|n2X`??)0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Fld*;VUBRE9=86W-$r04Dt~!|Z^!NFS39+9a8b{v`(oGRO zbu*;w%k%s-JMW66=W{s6e0w75A2s{yV)2+M)*?4qw5+8vzFdE=bH?Ywrl$7K&tHGf zIq@y9)wkAtv%&w%AwL)jWj4&2HvNy6XuFcMQ?2`I?V6Ny=PUQBwBAp6yO?YCufA)+ zmHlswVng&ciQLSIvXD~E_!=7c$6=fEMAM-C2URqGeLw3Sw?o$F49}rI`|s5)Nh@2j zZ?Uk{nTLAI1e<@IY3SMoOTrXSf_^638m|MKf@a}~;{-p)8>`tSGgPcJ90YPe`>vbbQH zoKH`WlT%a1Dt1os<%`)ne{Zl#zH%|5xs|QyhtseB^);JJ3V3!+{Qp0>XJNzC1pQA6 zyXuX8{rgcMT{(yKZpf|AGk5kH=pKxGlBgwXqr^Oi;RJU_p!;O;yd|%tcrz~@?y-?& Yc-eJgnw#67Tc8rl)78&qol`;+0PUeU(f|Me diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 9e785db5d723352262d164648ae0232f56ac01da..4cde12118dda48d71e01fcb589a74d069c5d7cb5 100644 GIT binary patch delta 1014 zcmV*Z%cCe|Ky#N6OdYPD1DGfinGF##;07BPDy$fz({%k7zJV=01O#K z=|NTR39NyVgTVMzbvyw=V8BQ^20R3~6xvV{d46VD* zR9nhU01J#6NqMPrrB8cABapAFa= z`H+UGhkXUZV1GnwR1*lPyZ;*K(i~2gp|@bzp8}og7e*#%Enr|^CWdVV!-4*Y_7rFv zlww2Ze+>j*!Z!pQ?2l->4q#nqRu9`ELo6RMS5=br41c(0^;RmcE^tRgds9Z&8hKi= zcKAYL;9Lx6i;lps;xDq`;I4K{zDBEA0j=ca%(UaZ^JThn2CV|_Pl2;B96VFv)Rf2t z%PnxaEcWz-+|yxe=6OZ+TI0dnTP=HgLyBeJX=bZ{9ZiP$!~;)Hi_Rv<2T%y1?BKb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;);5Frg>WWzvtPB#ZEq?o=#O8vskEg4j%Q~loCIBB*fe-)y diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index 17a096ee3214955ab23626dbd91e0e70ada67cb2..d0ef06e7edb86cdfe0d15b4b0d98334a86163658 100644 GIT binary patch literal 1716 zcmds$`#;kQ7{|XelZftyR5~xW7?MLxS4^|Hw3&P7^y)@A9Fj{Xm1~_CIV^XZ%SLBn zA;!r`GqGHg=7>xrB{?psZQs88ZaedDoagm^KF{a*>G|dJWRSe^I$DNW008I^+;Kjt z>9p3GNR^I;v>5_`+91i(*G;u5|L+Bu6M=(afLjtkya#yZ175|z$pU~>2#^Z_pCZ7o z1c6UNcv2B3?; zX%qdxCXQpdKRz=#b*q0P%b&o)5ZrNZt7$fiETSK_VaY=mb4GK`#~0K#~9^ zcY!`#Af+4h?UMR-gMKOmpuYeN5P*RKF!(tb`)oe0j2BH1l?=>y#S5pMqkx6i{*=V9JF%>N8`ewGhRE(|WohnD59R^$_36{4>S zDFlPC5|k?;SPsDo87!B{6*7eqmMdU|QZ84>6)Kd9wNfh90=y=TFQay-0__>=<4pk& zYDjgIhL-jQ9o>z32K)BgAH+HxamL{ZL~ozu)Qqe@a`FpH=oQRA8=L-m-1dam(Ix2V z?du;LdMO+ooBelr^_y4{|44tmgH^2hSzPFd;U^!1p>6d|o)(-01z{i&Kj@)z-yfWQ)V#3Uo!_U}q3u`(fOs`_f^ueFii1xBNUB z6MecwJN$CqV&vhc+)b(p4NzGGEgwWNs z@*lUV6LaduZH)4_g!cE<2G6#+hJrWd5(|p1Z;YJ7ifVHv+n49btR}dq?HHDjl{m$T z!jLZcGkb&XS2OG~u%&R$(X+Z`CWec%QKt>NGYvd5g20)PU(dOn^7%@6kQb}C(%=vr z{?RP(z~C9DPnL{q^@pVw@|Vx~@3v!9dCaBtbh2EdtoNHm4kGxp>i#ct)7p|$Q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{S!$1ckC8g7(*4QiXZ+vi4d)^ka*Y5f|CcIrd!PoaW)7($r zTG=V&e^!2!&2PVu%ok!i}Qnh-6xh8x{@2^&z!k( zM#I6l@oo7Q2IbD~RIR56o7+1zSI)Puzi0P$&58&4lX?~}dIU^$H&W6!b5<$L?o>6@ z&^S?Ex@F^rgiKzg*D?ZTV$YfGCT1lCg$5cb@Eyw6EPKxM^~cX&9UPPG9op`PZAvY) z63gTe~DWM4fRth%) diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 622fae1d413c21a369ddfc84e394ca6800b1294d..dcdc2306c28505ebc0b6c3a359c4d252bf626b9f 100644 GIT binary patch delta 1916 zcmV-?2ZQ*z4S)}j8Gi-<0042w*=zs+2S-UnK~#9!?cG~!6jc}p@R>r@2Yv8@p?G^R zA|eDZ7{rR#1}sop6nca3fIb-?ED*6VwIFJZ!6Hy8w-yO8C@}~_05Gdr_$c4kiU&u$4j+xhLc-+x@XJ4X;S3;@U>VSc^? zQ-oQ8>A;-DT*34?AXhQJV-8~KF(sHg2eU|P;DUxQ_a|dEVEzDijZ2tj%oNrIBN{~& z>4Wk1F-%L`6DpV>Mpo}D4uPcWBCG2czh1jBlh{hu3!B5d1(snX=85|q1gQs{g(mmw zFhk?t-J03}-hU3m?2B8tH)4^yF(WhqGZlM3=9Ibs$%U1wWzcss*_c0=v_+^bfb`kB zFsI`d;ElwiU%frgRB%qBjn@!0U2zZehBn|{%uNIKBA7n=zE`nnwTP85{g;8AkYxA6 z8>#muXa!G>xH22D1I*SiD~7C?7Za+9y7j1SHiuSkK7ajvv#C@#-AyB-fbF?o#FaMR zJDRHO-oJwI(P;@j{Y`?E22zh%eMW-!PD-%va?p$yjUHg_5SW97D|{EkK-iW`L3pv- z4~1!@=&&EA9Pq)SV*$7tP|P@nrw{)Za}U8S%a)eF!V;W0J$@*|lp087uOFr#^24%U zq{wn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^kVU{|MY&nY21; H*xr8tT{pUL diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 93c986fb357038ae3401497794a08e25ddcd17a5..2ccbfd967d9697cd4b83225558af2911e9571c9b 100644 GIT binary patch delta 1274 zcmV@pi1MCNO0zH7s z{8#}P0)7Ba8DqYf&QgSne>X__O83t$NZM4&R0{XJq|x}oAU?tcfC@|eNz$04T}34& z8DJf78R&>*Zz`k$q{`#gfGHnx7nlH^G{y`jfER)1<_fNi<9aM%_zrm1C`yPkKma(+ ztQ;y*CR2bbBYz>zG*SVsfpkGU(q>uHZf3iogk_%#9E|5SWeHrmAo>P;ejX7mwq#*} zW25m^ZI+{(Z8fI?4jM_fffY0nok=+88^|*_DwcW>mR#e+X$F_KMdb6sRz!~7K zkyN0G(3XQ+;z3X%PZ4gh;n-%62U<*VUKNv(D&IDi_4_D!s#MVXp|-XhH;H z#&@_;oApJVd}}5O@b=X_gJboD^-fM@6|#V@sA%X)Rlkd}3MLH0dGXGG&-HX|aD~|M zC)W#H7=H?AbtdaV#dGpubj_O^J-SlWpVNv-5(;wR%mvE9`Qaqo>03b&##eNNf=m#B z9@^lsd8tJ;BvI86kNV zc~0CY(7V{s+h%cWG|y=gt|q`z$l<(@qU=i?9q#uz`G?PgDMK!VMGidHZt*N+1L0ZI zFkH=mFtywc6rJ}C_?)=m)18V!ZQ`*-j(D`gCFK|nt#{bk*%%zuQ7o7kvJgA^=(^7b zzkm5GZ;jxRn{Wup8IOUx8D4uh&(=Ox-7$a;U><*5L^!% zxRlw)vAbh;sdlR||&e}8_8%)c2Fwy=F& zH|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}Jb#viX>Oi;kBKp1x_fc0#UIbIeSJ^EkWFox zijdim{ojmn@#7EC*aY;fC0W*WN+DmQtE06pNK3SfZ^#@2K`6RgEuU_KwJTQ>E?Yar zc_9e#I$F8%>kuy-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6 za5o{S+T!!8CuNL-uT7{vicXZQ+=;+mXxlUJYHErRm~g~X#aj#c>#r4hci(UvraRx) z^$TYDz}-Zl-PiK-7Z(=d8)THdjgT_G#P4k4pA|A#E&!E!%LK{=1da;=P*)imfYAIW z;1M{I9EtoS(AVbyZA<$?$46BBC-S;5I{n5NJPM@dc5WS{Xv!)W?c$341D z;3yW`(nziVVGp{v;M|?t#H!p>s5qwsGB+OF&Q)Np#dB)J{L{dQz%fpg?{UVd5zZgb zlT@ww4;L?o9w}=H)=`BZb)u!pc2Z%TmWnXyvlaJJYZiK+Y#NGX!VbKt3QEoh)`+O5Tt2!9}N6Y3%>j?m@&NT6TO4EeQdU}ur)6?^^X4+QH3)R diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index bae4d5c1353af10f8b52fe6e8584950494a2ccee..c4df70d39da7941ef3f6dcb7f06a192d8dcb308d 100644 GIT binary patch delta 1884 zcmV-i2c!7Q4B!rs8Gi-<0076AQ7Zrd2Pa8HK~#9!?VNjT6h$1z_m0EFf5bmb1dTDK zp;kdKV1h(V(8Sc1M<37!RE>znAk{x4#zX@eOeE1j3~!+nB5IL z<xS}u?#DBMB>w^b($1Z)`9G?eP95EKi& z$eOy@K%h;ryrR3la%;>|o*>CgB(s>dDcNOXg}CK9SPmD?Uu$P4(=PGA0ShFasNfcIHTL?9WjB9#(2xSLC z`0%$#9DW9F;B4mbU{BlaYx!SjF!QSeF~(msQRxwboh5B_O$BWOQja)GboJz$&!?mgB&3$ytsA zvns&b3Cl5Hx#%p%faR*Q906u&fbXy$maV`n?S>A)vJIH!F-vxCrY+rq5_JA(GcOgu7(Ky4X3ATR9z8*%k&<5qYeV&4Y`~}XYmK(j{)!g8d2UgHXIINM!Rvn zKtEq~Foe0s!U{kux~F6Y7Sp+2f|*Cc${S{@oh8D0=XhB8Ec-w9CflfL+te4ium2cU zoPTCj_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raY;fH{%U|)+XkE z&x{q-Pft1PIcu^>0Q(w`sCqlqAAw6w$gqC2IXQ8&PM_DwUn$SdpZp>4F>hDOrgc3F z1C}oS!xFqBXbsoHLx+za$+X%sLFK&beGe|@hAC%^r(A3?xw1nc>8z*ItYnSpmY&YN z+)CHxs4TH;E1EeOEcL(J)9Zd#p^SLP+Yt4wctb8gh_-AM=Cr9XdnxPCeQ!Y#Y)`V;2g z`0#i_@%@=?%F**KhE1&(KW6B8OUi!N*5t2`8d($>K3DFWd*`17j~OGUSnT?{>U!sW zx31W9jB#hyMTgR#9TDs1J}k?7vn`H$+nfx1 z1XljC7G_V$EOg-$x^dboAW*@HXY%j z;(RBvzn^}xrEIU>yZ;mZh)m=T&N$9^^W&x$mvlStH`ue!)fLYcWm>T0aRZB$-klX+ z=I6>JPc9Gb-<4*zRYyi<+rkwg63v`KD{3xIKYrol;xo?`Y!{tX^t&TiGvRA!eDLY( zpw;?4^47<=XGgi2QQEN(e@{J$u1j~cZarUYTOXL>|3m1^z>VD|AJ3H zCLdb4@!$g2obc;SoS#0;jePZL-i5pwaqEOHEveeTxw6W;c+0{s)kWXl1hw~avKhuc z3cgtx_hG94D(%->O_uE5@S))J!DY{$Wt8N!S>LK#Vf~sZQsq{zRtD3+h@;w zkN0g4QknSt(8tVauGRv<3F7m3UtiOW-o;X=Y}gTe~ HDWM4fp1-43 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index cfb621084b0bd9a2d5b866aa2a679325642413c4..6a84f41e14e27f4b11f16f9ee39279ac98f8d5ac 100644 GIT binary patch literal 3294 zcmV<43?cK0P)1^@s67{VYS000c7NklQEG_j zup^)eW&WUIApqy$=APz8jE@awGp)!bsTjDbrJO`$x^ZR^dr;>)LW>{ zs70vpsD38v)19rI=GNk1b(0?Js9~rjsQsu*K;@SD40RB-3^gKU-MYC7G!Bw{fZsqp zih4iIi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kverTOw$Pj#lHrS3e!t7_%GGfhlsT@SVA|K?_>=hShS$CD8=4bpNb zNMAo{P+Q;AA@$z11SaXzk zxFwcqZEX#{Qf*kPL?HxoW2se}GqN%bEAbFI`kerTOO#Ue0j%xmULBP_h!ri8!g?ig z+f}^(Zs?$^8$7ZQGw}Vd@LX4N#c>AaTjgi#>ugWAGN=B3z*sl?c zeAG!0f=^s=ZXKxWPAf5H_If;pqsqGyD*rXkpsg!c-t86OW|#*u#s zRA-ExB5PpZT3r;u4+YxcjrHGR%snP-pBQp&1w1tgRiMk?qGoFTXnf_)u>?g%VvesT zw@S6p5ai>EJ?8C1-+Z*u7TrBh@TLCEoL_n#$Ys1&5I&GWFHkM(97jK%CasKkM>wEp z&AeGqJw55DqTAeR3|g)}6 diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index f9f55c2d..9f88055e 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -4,17 +4,14 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Selfprivacy CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 - CFBundleLocalizations - - ru - en - CFBundleName selfprivacy CFBundlePackageType @@ -24,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - $(CURRENT_PROJECT_VERSION) + $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS UILaunchStoryboardName @@ -34,6 +31,8 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad @@ -44,5 +43,9 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/ios/Runner/ru.lproj/LaunchScreen.strings b/ios/Runner/ru.lproj/LaunchScreen.strings deleted file mode 100644 index 8b137891..00000000 --- a/ios/Runner/ru.lproj/LaunchScreen.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ios/Runner/ru.lproj/Main.strings b/ios/Runner/ru.lproj/Main.strings deleted file mode 100644 index 8b137891..00000000 --- a/ios/Runner/ru.lproj/Main.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/macos/.gitignore b/macos/.gitignore new file mode 100644 index 00000000..746adbb6 --- /dev/null +++ b/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 00000000..c2efd0b6 --- /dev/null +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 00000000..c2efd0b6 --- /dev/null +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 00000000..349902c3 --- /dev/null +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,30 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import connectivity_plus_macos +import device_info_plus_macos +import dynamic_color +import flutter_secure_storage_macos +import package_info +import path_provider_macos +import share_plus_macos +import shared_preferences_macos +import url_launcher_macos +import wakelock_macos + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) + FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin")) + FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) +} diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..04d55ad6 --- /dev/null +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,572 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* selfprivacy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "selfprivacy.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* selfprivacy.app */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* selfprivacy.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..523b108f --- /dev/null +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift new file mode 100644 index 00000000..d53ef643 --- /dev/null +++ b/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..a2ec33f1 --- /dev/null +++ b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..82b6f9d9a33e198f5747104729e1fcef999772a5 GIT binary patch literal 102994 zcmeEugo5nb1G~3xi~y`}h6XHx5j$(L*3|5S2UfkG$|UCNI>}4f?MfqZ+HW-sRW5RKHEm z^unW*Xx{AH_X3Xdvb%C(Bh6POqg==@d9j=5*}oEny_IS;M3==J`P0R!eD6s~N<36C z*%-OGYqd0AdWClO!Z!}Y1@@RkfeiQ$Ib_ z&fk%T;K9h`{`cX3Hu#?({4WgtmkR!u3ICS~|NqH^fdNz>51-9)OF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LVfL+FL(u zh1Abu(oCSmgqQ2IrE;Zz2f2DAD%T4XO6tU&)2IB}vV3{^xpz1MYFEPy_09RP2QvmA zIqw<(UaCnCs!mFX$+3sjnV*(O5)y`jW!*wzF-l^K`Bxgap+0Ej z@c^nf{Ic`6I5#9bcE7fwiiP8JZ9dr3FsD~SBiW_`8{UgFt*{$@qj#E)90JYra>Zs3 z$sCTuzOye2GdTO;4@;wgJK@!ij-|c--insluCR}{#q=D6Xz#nL6;`rkc*UzLTR%Y{ zN2YK;Zcz4YY=+|(0_?E=#~3U@I1fIyRiBF zIeWj=id+b|L;kSMs>NMfeB^(={IdrC;NYJy_$L+olL`OdOqgH0OpSa?FTRhwb<|%A Pe7HEdAEg|=c=LY&YVNkY literal 0 HcmV?d00001 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000000000000000000000000000000000..13b35eba55c6dabc3aac36f33d859266c18fa0d0 GIT binary patch literal 5680 zcmaiYXH?Tqu=Xz`p-L#B_gI#0we$cm_HcmYFP$?wjD#BaCN4mzC5#`>w9y6=ThxrYZc0WPXprg zYjB`UsV}0=eUtY$(P6YW}npdd;%9pi?zS3k-nqCob zSX_AQEf|=wYT3r?f!*Yt)ar^;l3Sro{z(7deUBPd2~(SzZ-s@0r&~Km2S?8r##9-< z)2UOSVaHqq6}%sA9Ww;V2LG=PnNAh6mA2iWOuV7T_lRDR z&N8-eN=U)-T|;wo^Wv=34wtV0g}sAAe}`Ph@~!|<;z7*K8(qkX0}o=!(+N*UWrkEja*$_H6mhK1u{P!AC39} z|3+Z(mAOq#XRYS)TLoHv<)d%$$I@+x+2)V{@o~~J-!YUI-Q9%!Ldi4Op&Lw&B>jj* zwAgC#Y>gbIqv!d|J5f!$dbCXoq(l3GR(S>(rtZ~Z*agXMMKN!@mWT_vmCbSd3dUUm z4M&+gz?@^#RRGal%G3dDvj7C5QTb@9+!MG+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PQ=Cl literal 0 HcmV?d00001 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000000000000000000000000000000000..0a3f5fa40fb3d1e0710331a48de5d256da3f275d GIT binary patch literal 520 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#jR^;j87-Auq zoUlN^K{r-Q+XN;zI ze|?*NFmgt#V#GwrSWaz^2G&@SBmck6ZcIFMww~vE<1E?M2#KUn1CzsB6D2+0SuRV@ zV2kK5HvIGB{HX-hQzs0*AB%5$9RJ@a;)Ahq#p$GSP91^&hi#6sg*;a~dt}4AclK>h z_3MoPRQ{i;==;*1S-mY<(JFzhAxMI&<61&m$J0NDHdJ3tYx~j0%M-uN6Zl8~_0DOkGXc0001@sz3l12C6Xg{AT~( zm6w64BA|AX`Ve)YY-glyudNN>MAfkXz-T7`_`fEolM;0T0BA)(02-OaW z0*cW7Z~ec94o8&g0D$N>b!COu{=m}^%oXZ4?T8ZyPZuGGBPBA7pbQMoV5HYhiT?%! zcae~`(QAN4&}-=#2f5fkn!SWGWmSeCISBcS=1-U|MEoKq=k?_x3apK>9((R zuu$9X?^8?@(a{qMS%J8SJPq))v}Q-ZyDm6Gbie0m92=`YlwnQPQP1kGSm(N2UJ3P6 z^{p-u)SSCTW~c1rw;cM)-uL2{->wCn2{#%;AtCQ!m%AakVs1K#v@(*-6QavyY&v&*wO_rCJXJuq$c$7ZjsW+pJo-$L^@!7X04CvaOpPyfw|FKvu;e(&Iw>Tbg zL}#8e^?X%TReXTt>gsBByt0kSU20oQx*~P=4`&tcZ7N6t-6LiK{LxX*p6}9c<0Pu^ zLx1w_P4P2V>bX=`F%v$#{sUDdF|;rbI{p#ZW`00Bgh(eB(nOIhy8W9T>3aQ=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}WC&Nw-!{+Z7$2D}74QAcXTvip=M0%Tp_N zor=k`)t|ra^ySr-+(|R9mB(E=`MX#y(wSw)$!iymzB;^c*>%&^*7HxTnRga=soSZT zdDl+9s;r!v8hk6POtzBaig4pRp7eWF(<8gufvNHPu6xs-=e{;mnHzJyGKE+8L0j}; z@%8-e^UCL5HhMiR>sD3Rve&yVZ#{Q1*CO8c+qSr^Z#CN;)(X5>tGG5yUw3<+CfhaL z%bP;hZ?jvgJU67BWyiy74_)6r)_nSxttxn0`0?HE^5(uydHVgP+HE$V?Lv)Leti43 zWA|;f-RqX``95>)^P-fw!Vi{3KNsII-*5f){gdxqd%gVdB1sOBNe=nEW%;i~g_P8J w!5uhoe-Jcg1nPN%MiEAtgE$;km@@t6ukO)1^!cY^83Pb_y85}Sb4q9e0FIsP9{>OV literal 0 HcmV?d00001 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1632cfddf3d9dade342351e627a0a75609fb46 GIT binary patch literal 2218 zcmV;b2vzrqP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuE6iGxuRCodHTWf3-RTMruyW6Fu zQYeUM04eX6D5c0FCjKKPrco1(K`<0SL=crI{PC3-^hZU0kQie$gh-5!7z6SH6Q0J% zqot*`H1q{R5fHFYS}dje@;kG=v$L0(yY0?wY2%*c?A&{2?!D*x?m71{of2gv!$5|C z3>qG_BW}7K_yUcT3A5C6QD<+{aq?x;MAUyAiJn#Jv8_zZtQ{P zTRzbL3U9!qVuZzS$xKU10KiW~Bgdcv1-!uAhQxf3a7q+dU6lj?yoO4Lq4TUN4}h{N z*fIM=SS8|C2$(T>w$`t@3Tka!(r!7W`x z-isCVgQD^mG-MJ;XtJuK3V{Vy72GQ83KRWsHU?e*wrh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VYr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000..f96ad8ea --- /dev/null +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = selfprivacy + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = org.selfprivacy.selfprivacy + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2022 org.selfprivacy. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 00000000..36b0fd94 --- /dev/null +++ b/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 00000000..dff4f495 --- /dev/null +++ b/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 00000000..42bcbf47 --- /dev/null +++ b/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements new file mode 100644 index 00000000..dddb8a30 --- /dev/null +++ b/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist new file mode 100644 index 00000000..4789daa6 --- /dev/null +++ b/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 00000000..2722837e --- /dev/null +++ b/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController.init() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements new file mode 100644 index 00000000..852fa1a4 --- /dev/null +++ b/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt index b9e550fb..17411a8a 100644 --- a/windows/runner/CMakeLists.txt +++ b/windows/runner/CMakeLists.txt @@ -20,6 +20,13 @@ add_executable(${BINARY_NAME} WIN32 # that need different build settings. apply_standard_settings(${BINARY_NAME}) +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + # Disable Windows macros that collide with C++ standard library functions. target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 5f63465c..ed5ecffb 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -60,14 +60,14 @@ IDI_APP_ICON ICON "resources\\app_icon.ico" // Version // -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD #else -#define VERSION_AS_NUMBER 1,0,0 +#define VERSION_AS_NUMBER 1,0,0,0 #endif -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION #else #define VERSION_AS_STRING "1.0.0" #endif diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest index c977c4a4..a42ea768 100644 --- a/windows/runner/runner.exe.manifest +++ b/windows/runner/runner.exe.manifest @@ -7,7 +7,7 @@ - + From 8ad7d2d699f5c29ad677403d68304131a70346b4 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 06:49:59 +0300 Subject: [PATCH 168/732] create releases in python --- .drone.yml | 4 +++ ci.py | 73 ++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 66 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 968373e6..82c0e6e7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -64,6 +64,10 @@ steps: - git config user.email "builder@selfprivacy.org" - git config user.name "Builder" + - name: Create an Empty Release + commands: + - ./ci.py --gitea-create-release + - name: Build Intermediate Linux Release Artifact (Binary) commands: - ./ci.py --build-linux diff --git a/ci.py b/ci.py index 08d618a6..ac34eb8a 100755 --- a/ci.py +++ b/ci.py @@ -2,12 +2,14 @@ import os import subprocess +import requests import yaml import argparse CONTAINER_IMAGE = "localhost/flutter-build-env" HOST_HOME = "/var/lib/drone-runner-exec" CONTAINER_HOME = "/tmp/builder" +HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/release/_data" APP_NAME = "org.selfprivacy.app" APP_NAME_NIGHTLY = "org.selfprivacy.app.nightly" @@ -16,7 +18,10 @@ APP_SEMVER = APP_VERSION_FULL[:APP_VERSION_FULL.find("+")] APP_BUILD_ID = APP_VERSION_FULL[APP_VERSION_FULL.find("+"):][1::] APP_BUILD_ID_NIGHTLY = subprocess.run(["git", "rev-list", "--first-parent", "--count", "HEAD"], check=True, stdout=subprocess.PIPE).stdout.decode().strip() -HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/release/_data" +GITEA_HOST_URL = "https://git.selfprivacy.org" +GITEA_REPO_FULL = os.environ.get("DRONE_REPO") or "kherel/selfprivacy.org.app" +GITEA_REPO_OWNER = os.environ.get("DRONE_REPO_OWNER") or "kherel" +GITEA_REPO_NAME = os.environ.get("DRONE_REPO_NAME") or "selfprivacy.org.app" # Environments @@ -41,6 +46,50 @@ def podman_online(dir, *args): CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) +# Utilities + +def gitea_create_release(): + url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases" + token = os.environ.get("GITEA_RELEASE_TOKEN") + params = {"access_token": f"{token}"} + json = {"tag_name": f"{APP_SEMVER}", "name": f"{APP_SEMVER}", "prerelease": True} + + request = requests.post(url, params=params, json=json) + + try: + request.raise_for_status() + except requests.exceptions.HTTPError as error: + print(error) + return error + +def gitea_get_release_id(): + url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases/tags/{APP_SEMVER}" + + request = requests.get(url) + + try: + request.raise_for_status() + except requests.exceptions.HTTPError as error: + print(error) + return error + + return request.json()['id'] + +def gitea_upload_attachment(file): + id = gitea_get_release_id() + url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases/{id}/assets" + token = os.environ.get("GITEA_RELEASE_TOKEN") + params = {"access_token": f"{token}", "name": f"{file}"} + files = {"attachment": open(f"{file}", "br")} + + request = requests.post(url, params=params, files=files) + + try: + request.raise_for_status() + except requests.exceptions.HTTPError as error: + print(error) + return error + # Targets def build_linux(): @@ -98,16 +147,12 @@ def package_linux_archive(): podman_online(f"{CONTAINER_HOME}/src", f"tar -C build/linux/x64/release/bundle -vacf {APP_NAME}-{APP_SEMVER}.tar.zstd .") def deploy_gitea_release(): - subprocess.run(["tea", "login", "add", "--token", os.environ.get('GITEA_RELEASE_TOKEN'), - "--url", "https://git.selfprivacy.org"], check=True) - subprocess.run(["tea", "releases", "create", "--repo", os.environ.get('DRONE_REPO'), - "--tag", os.environ.get('DRONE_SEMVER'), "--title", os.environ.get('DRONE_SEMVER'), - "--asset", f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk", - "--asset", f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk.idsig", - "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage", - "--asset", f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage.zsync", - "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.flatpak", - "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.tar.zstd"], check=True) + gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk") + gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk.idsig") + gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage") + gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage.zsync") + gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.flatpak") + gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.tar.zstd") def deploy_fdroid_repo(): subprocess.run([f"""eval $(ssh-agent -s) && @@ -147,6 +192,8 @@ if __name__ == "__main__": group.add_argument("--ci-build-linux", action="store_true") group.add_argument("--ci-build-apk", action="store_true") group.add_argument("--ci-run-tests", action="store_true") + group.add_argument("--gitea-create-release", action="store_true") + group.add_argument("--gitea-upload-attachment", action="store") args = parser.parse_args() if args.build_linux: @@ -179,3 +226,7 @@ elif args.ci_build_apk: ci_build_apk() elif args.ci_run_tests: ci_run_tests() +elif args.gitea_create_release: + gitea_create_release() +elif args.gitea_upload_attachment: + gitea_upload_attachment(args.gitea_upload_attachment) From c1c7205eae1d86bb1d3f5009896a71cc7f87691b Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 07:11:27 +0300 Subject: [PATCH 169/732] create releases in python --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index 82c0e6e7..9e1bf3b7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -67,6 +67,9 @@ steps: - name: Create an Empty Release commands: - ./ci.py --gitea-create-release + environment: + GITEA_RELEASE_TOKEN: + from_secret: GITEA_RELEASE_TOKEN - name: Build Intermediate Linux Release Artifact (Binary) commands: From d4e82a18945288becf09fd567455b3ec0bc4adf6 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 07:26:03 +0300 Subject: [PATCH 170/732] bump appimage --- appimage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appimage.yml b/appimage.yml index fa15945b..48f9ca32 100644 --- a/appimage.yml +++ b/appimage.yml @@ -10,7 +10,7 @@ AppDir: id: org.selfprivacy.app name: SelfPrivacy icon: org.selfprivacy.app - version: 0.6.0 + version: 0.7.0 exec: selfprivacy exec_args: $@ apt: From 9fc3c4cb6745430227db302577da8680cb617486 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 07:30:09 +0300 Subject: [PATCH 171/732] fix attachments names --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index ac34eb8a..5fe92aed 100755 --- a/ci.py +++ b/ci.py @@ -79,7 +79,7 @@ def gitea_upload_attachment(file): id = gitea_get_release_id() url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases/{id}/assets" token = os.environ.get("GITEA_RELEASE_TOKEN") - params = {"access_token": f"{token}", "name": f"{file}"} + params = {"access_token": f"{token}", "name": f"{os.path.basename(file)}"} files = {"attachment": open(f"{file}", "br")} request = requests.post(url, params=params, files=files) From 38ff70d821b09e58c7e0951a143b1cf8c1a63e77 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 07:33:30 +0300 Subject: [PATCH 172/732] wording --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9e1bf3b7..d31e2c10 100644 --- a/.drone.yml +++ b/.drone.yml @@ -64,7 +64,7 @@ steps: - git config user.email "builder@selfprivacy.org" - git config user.name "Builder" - - name: Create an Empty Release + - name: Create an Empty Gitea Release commands: - ./ci.py --gitea-create-release environment: From f3a846f56a6e96fbc3cecf68a4aca7098ea1690f Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 08:11:07 +0300 Subject: [PATCH 173/732] ci fixes --- .drone.yml | 20 ++++++++++---------- ci.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index d31e2c10..0ee0a2e0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -93,16 +93,16 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS - - name: Build Intermediate Android Release Artifact (Bundle) - commands: - - ./ci.py --build-bundle - environment: - STANDALONE_KEYSTORE_PASS: - from_secret: STANDALONE_KEYSTORE_PASS - FDROID_KEYSTORE_PASS: - from_secret: FDROID_KEYSTORE_PASS - GOOGLE_KEYSTORE_PASS: - from_secret: GOOGLE_KEYSTORE_PASS +# - name: Build Intermediate Android Release Artifact (Bundle) +# commands: +# - ./ci.py --build-bundle +# environment: +# STANDALONE_KEYSTORE_PASS: +# from_secret: STANDALONE_KEYSTORE_PASS +# FDROID_KEYSTORE_PASS: +# from_secret: FDROID_KEYSTORE_PASS +# GOOGLE_KEYSTORE_PASS: +# from_secret: GOOGLE_KEYSTORE_PASS - name: Sign Android Release Artifact (.APK) for Standalone Use commands: diff --git a/ci.py b/ci.py index 5fe92aed..77f167cd 100755 --- a/ci.py +++ b/ci.py @@ -52,7 +52,7 @@ def gitea_create_release(): url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases" token = os.environ.get("GITEA_RELEASE_TOKEN") params = {"access_token": f"{token}"} - json = {"tag_name": f"{APP_SEMVER}", "name": f"{APP_SEMVER}", "prerelease": True} + json = {"tag_name": f"{os.environ.get('DRONE_SEMVER') or APP_SEMVER}", "name": f"{os.environ.get('DRONE_SEMVER' or APP_SEMVER)}", "prerelease": True} request = requests.post(url, params=params, json=json) From 9a972364f1c08e5b641b6ba01542640b14f703ae Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 08:16:57 +0300 Subject: [PATCH 174/732] dont build bundles --- .drone.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0ee0a2e0..e5db5da8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -126,16 +126,16 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS - - name: Sign Android Release Artifact (Bundle) for Google Play - commands: - - ./ci.py --sign-bundle - environment: - STANDALONE_KEYSTORE_PASS: - from_secret: STANDALONE_KEYSTORE_PASS - FDROID_KEYSTORE_PASS: - from_secret: FDROID_KEYSTORE_PASS - GOOGLE_KEYSTORE_PASS: - from_secret: GOOGLE_KEYSTORE_PASS +# - name: Sign Android Release Artifact (Bundle) for Google Play +# commands: +# - ./ci.py --sign-bundle +# environment: +# STANDALONE_KEYSTORE_PASS: +# from_secret: STANDALONE_KEYSTORE_PASS +# FDROID_KEYSTORE_PASS: +# from_secret: FDROID_KEYSTORE_PASS +# GOOGLE_KEYSTORE_PASS: +# from_secret: GOOGLE_KEYSTORE_PASS - name: Package Linux AppImage Artifact commands: From 48b29cc7720bfebee10457df352ca4f1650c2aa8 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 08:22:58 +0300 Subject: [PATCH 175/732] dont build bundles --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index e5db5da8..788c50bc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -151,7 +151,8 @@ steps: - name: Push Artifacts to the Release Volume commands: - - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.aab *.tar.zstd +# - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.aab *.tar.zstd + - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd - git commit -m Release - git archive --format=tar HEAD | podman volume import release - From fb3e084b4fcf7997b4bd20f99db64962f37dbe92 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 08:31:20 +0300 Subject: [PATCH 176/732] fix deployment --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index 77f167cd..767876b4 100755 --- a/ci.py +++ b/ci.py @@ -63,7 +63,7 @@ def gitea_create_release(): return error def gitea_get_release_id(): - url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases/tags/{APP_SEMVER}" + url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases/tags/{os.environ.get('DRONE_SEMVER') or APP_SEMVER}" request = requests.get(url) From 59d20f878966a6ff89ab61289ab521f96abc90a0 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 08:43:32 +0300 Subject: [PATCH 177/732] Revert "Revert "Rename to org.selfprivacy.app and add flavors."" This reverts commit 77d36a3a6a71284d1847ede65ef57484795520ef. --- android/app/build.gradle | 21 +++++++++++++++++-- android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 2 +- .../selfprivacy/app}/MainActivity.kt | 2 +- android/app/src/profile/AndroidManifest.xml | 2 +- linux/CMakeLists.txt | 2 +- 6 files changed, 24 insertions(+), 7 deletions(-) rename android/app/src/main/kotlin/{pro/kherel/selfprivacy => org/selfprivacy/app}/MainActivity.kt (75%) diff --git a/android/app/build.gradle b/android/app/build.gradle index 4d2afc72..c8a562ca 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,9 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + namespace 'org.selfprivacy.app' + + compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion sourceSets { @@ -48,7 +50,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "pro.kherel.selfprivacy" + applicationId "org.selfprivacy.app" minSdkVersion 21 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() @@ -69,6 +71,21 @@ android { versionName "nightly-" + project.getVersionCode() } } + + flavorDimensions "default" + productFlavors { + fdroid { + applicationId "pro.kherel.selfprivacy" + } + production { + applicationIdSuffix "" + } + nightly { + applicationIdSuffix ".nightly" + versionCode project.getVersionCode() + versionName "nightly-" + project.getVersionCode() + } + } } flutter { diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 27e1af1d..dddeb01f 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="org.selfprivacy.app"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 33c2ba9a..50f47475 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="org.selfprivacy.app"> diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index cc332a28..94dd8d0b 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -7,7 +7,7 @@ project(runner LANGUAGES CXX) set(BINARY_NAME "selfprivacy") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "pro.kherel.selfprivacy") +set(APPLICATION_ID "org.selfprivacy.app") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. From ad4fdd5374ef29af460dbfd72e38c80b83898c69 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 09:00:43 +0300 Subject: [PATCH 178/732] clean ci pipeline --- .drone.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.drone.yml b/.drone.yml index 788c50bc..90e48977 100644 --- a/.drone.yml +++ b/.drone.yml @@ -198,18 +198,3 @@ node: depends_on: - Release - -#--- -# -#kind: pipeline -#type: exec -#name: Windows -# -#platform: -# os: windows -# arch: amd64 -# -#steps: -# - name: Build Windows Binary -# commands: -# - flutter build windows From 2206f423fd939b1ab117af72d78be5997b2eab09 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 11:11:38 +0300 Subject: [PATCH 179/732] add release workflow --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..5bf66507 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +on: push + +jobs: + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + - run: flutter build windows + - uses: actions/upload-artifact@v3 + with: + name: windows + path: build/windows/runner/Release + + macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + - run: flutter build macos + - uses: actions/upload-artifact@v3 + with: + name: macos + path: build/macos/Build/Products/Release/selfprivacy.app + + deploy: + runs-on: ubuntu-latest + needs: + - windows + - macos + steps: + - uses: actions/download-artifact@v3 + with: + name: windows + path: windows + - uses: actions/download-artifact@v3 + with: + name: macos + path: selfprivacy.app + - run: pushd windows; zip -r ../selfprivacy-windows.zip .; popd + - run: zip -r selfprivacy-macos.zip selfprivacy.app + - run: ls -la From bb98a17b787d697183d31993bc47f03c57efe752 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 11:26:58 +0300 Subject: [PATCH 180/732] try to push to gitea --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bf66507..0c2620cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,4 +39,5 @@ jobs: path: selfprivacy.app - run: pushd windows; zip -r ../selfprivacy-windows.zip .; popd - run: zip -r selfprivacy-macos.zip selfprivacy.app - - run: ls -la + - run: ./ci.py --gitea-upload-attachment selfprivacy-windows.zip + - run: ./ci.py --gitea-upload-attachment selfprivacy-macos.zip From ad55b204cfa44a9597fced23e4f2e9cc822ac923 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 20 Sep 2022 12:42:20 +0300 Subject: [PATCH 181/732] Fix jobs screen failing to draw when no jobs --- lib/logic/cubit/server_jobs/server_jobs_state.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index 2acc487c..03b564c0 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -12,9 +12,13 @@ class ServerJobsState extends ServerInstallationDependendState { final String? migrationJobUid; List get serverJobList { - final List list = _serverJobList; - list.sort((final a, final b) => b.createdAt.compareTo(a.createdAt)); - return list; + try { + final List list = _serverJobList; + list.sort((final a, final b) => b.createdAt.compareTo(a.createdAt)); + return list; + } on UnsupportedError { + return _serverJobList; + } } bool get hasRemovableJobs => serverJobList.any( From e15026ae25f93d472fe5fd526df52117dce3d361 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 20 Sep 2022 12:44:05 +0300 Subject: [PATCH 182/732] Disable block error showing snack bar --- lib/config/bloc_observer.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/config/bloc_observer.dart b/lib/config/bloc_observer.dart index d8bf846a..9e2e8f43 100644 --- a/lib/config/bloc_observer.dart +++ b/lib/config/bloc_observer.dart @@ -1,6 +1,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; +// import 'package:selfprivacy/config/get_it_config.dart'; class SimpleBlocObserver extends BlocObserver { SimpleBlocObserver(); @@ -11,9 +11,9 @@ class SimpleBlocObserver extends BlocObserver { final Object error, final StackTrace stackTrace, ) { - getIt().showSnackBar( - 'Bloc error: ${error.toString()}', - ); + // getIt().showSnackBar( + // 'Bloc error: ${error.toString()}', + // ); super.onError(bloc, error, stackTrace); } } From ed0171c891fca9512c7cd97857fc7ed5c8f63536 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 14:45:21 +0300 Subject: [PATCH 183/732] hotfix --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c2620cd..84ee662b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,7 @@ jobs: - windows - macos steps: + - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 with: name: windows From cb49bc18cc0763c606fedc0b87df39acae51ab43 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 15:02:10 +0300 Subject: [PATCH 184/732] hotfix --- .github/workflows/release.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84ee662b..6759a82d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,8 @@ on: push +env: # Or as an environment variable + GITEA_RELEASE_TOKEN: ${{ secrets.GITEA_RELEASE_TOKEN }} + jobs: windows: runs-on: windows-latest @@ -33,12 +36,12 @@ jobs: - uses: actions/download-artifact@v3 with: name: windows - path: windows + path: windows-release - uses: actions/download-artifact@v3 with: name: macos - path: selfprivacy.app - - run: pushd windows; zip -r ../selfprivacy-windows.zip .; popd - - run: zip -r selfprivacy-macos.zip selfprivacy.app + path: macos-release/selfprivacy.app + - run: pushd windows-release; zip -r ../selfprivacy-windows.zip .; popd + - run: pushd macos-release; zip -r ../selfprivacy-macos.zip .; popd - run: ./ci.py --gitea-upload-attachment selfprivacy-windows.zip - run: ./ci.py --gitea-upload-attachment selfprivacy-macos.zip From 0c532639836579e6ca4d9d296ac81cf9e55630d8 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 02:19:45 +0300 Subject: [PATCH 185/732] try to bundle metadata for fdroid repo --- .drone.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 90e48977..8dd1e28c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,6 +6,7 @@ steps: - name: Prepare commands: - ln -s /var/lib/drone-runner-exec/.local $HOME/.local + - ln -s /var/lib/drone-runner-exec/fdroid $HOME/fdroid - name: Run Tests commands: @@ -25,6 +26,8 @@ steps: - name: Sign and Commit Nightly Android Release Artifact (.APK) for F-Droid Repository commands: + - rm -rf $HOME/fdroid/build/org.selfprivacy.app.nightly && mkdir $HOME/fdroid/build/org.selfprivacy.app.nightly + - git archive --format=tar HEAD | tar x -C $HOME/fdroid/build/org.selfprivacy.app.nightly - ./ci.py --sign-apk-fdroid-nightly environment: STANDALONE_KEYSTORE_PASS: @@ -34,7 +37,7 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS - - name: Deploy F-Droid Repo + - name: Deploy F-Droid Repository commands: - ./ci.py --deploy-fdroid-repo environment: @@ -44,8 +47,8 @@ steps: trigger: event: - push - branch: - - master +# branch: +# - master node: server: builder From 97c459054e0710ca2969c141eebe31ea8f0027ba Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 02:37:29 +0300 Subject: [PATCH 186/732] also do this for release builds --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index 8dd1e28c..c5ac16a4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -120,6 +120,8 @@ steps: - name: Sign and Commit Android Release Artifact (.APK) for F-Droid Repository commands: + - rm -rf $HOME/fdroid/build/org.selfprivacy.app && mkdir $HOME/fdroid/build/org.selfprivacy.app + - git archive --format=tar HEAD | tar x -C $HOME/fdroid/build/org.selfprivacy.app - ./ci.py --sign-apk-fdroid environment: STANDALONE_KEYSTORE_PASS: From 02b7f9fc29a86db86f4d786efd03514f22096054 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 02:39:52 +0300 Subject: [PATCH 187/732] build release nightly builds, not debug --- ci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.py b/ci.py index 767876b4..02a17004 100755 --- a/ci.py +++ b/ci.py @@ -127,7 +127,7 @@ def sign_apk_fdroid_nightly(): podman_offline(f"{CONTAINER_HOME}/fdroid", f"rm -rf {CONTAINER_HOME}/fdroid/unsigned/*") podman_offline(f"{CONTAINER_HOME}/fdroid", f"test ! -f {CONTAINER_HOME}/fdroid/repo/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGHTLY}.apk", - "&& cp ../src/build/app/outputs/flutter-apk/app-nightly-debug.apk", + "&& cp ../src/build/app/outputs/flutter-apk/app-nightly-release.apk", f"unsigned/{APP_NAME_NIGHTLY}_{APP_BUILD_ID_NIGHTLY}.apk || echo exist") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid publish") podman_offline(f"{CONTAINER_HOME}/fdroid", "fdroid update") @@ -166,7 +166,7 @@ def ci_build_linux(): def ci_build_apk(): podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", - "&& flutter build apk --flavor nightly --debug") + "&& flutter build apk --flavor nightly") def ci_run_tests(): podman_online(f"{CONTAINER_HOME}/src", "flutter test", From c6093493651c4c2dd3c58f7c37a72b5f0c7c63a0 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 02:52:14 +0300 Subject: [PATCH 188/732] add icon to fastlane --- fastlane/metadata/android/en-US/images/icon.png | Bin 0 -> 8284 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 fastlane/metadata/android/en-US/images/icon.png diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fee217d6b49efbef66fac02000f93eeedd48682a GIT binary patch literal 8284 zcmb7J2{e>#`+v}ik`O|KP(q@Vz3d^CkXWZWnTxd0jzns5uV3$*aG?Sa$fR%9-MmlKli2?t*raIm$GE&x*=#Y~p0}p8%6cVH?vnCL zxKvi5_$;C5Q%vpGlg3jLnG=2EZWI-soh4OCif7c_D4xCKJQcrTbex6yW`?u-Lc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S9YWpRiA literal 0 HcmV?d00001 From 2c5ab5c21c43796f18412fb076d4e7caaf63dae5 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 03:24:54 +0300 Subject: [PATCH 189/732] production use --- .drone.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index c5ac16a4..129e1070 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,8 +47,8 @@ steps: trigger: event: - push -# branch: -# - master + branch: + - master node: server: builder @@ -63,6 +63,7 @@ steps: - name: Prepare commands: - ln -s /var/lib/drone-runner-exec/.local $HOME/.local + - ln -s /var/lib/drone-runner-exec/fdroid $HOME/fdroid - if podman volume exists release; then podman volume rm -f release; podman volume create release; else podman volume create release; fi - git config user.email "builder@selfprivacy.org" - git config user.name "Builder" @@ -180,7 +181,7 @@ steps: - ln -s /var/lib/drone-runner-exec/.local $HOME/.local - podman unshare podman volume mount release - - name: Create Release and Deploy Artifacts + - name: Deploy Artifacts to Gitea commands: - ./ci.py --deploy-gitea-release environment: From e182a4ae03782bc13719724b56ba0c02f71886ce Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 03:26:42 +0300 Subject: [PATCH 190/732] too soon, oops --- .github/workflows/release.yml | 47 ----------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 6759a82d..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,47 +0,0 @@ -on: push - -env: # Or as an environment variable - GITEA_RELEASE_TOKEN: ${{ secrets.GITEA_RELEASE_TOKEN }} - -jobs: - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - uses: subosito/flutter-action@v2 - - run: flutter build windows - - uses: actions/upload-artifact@v3 - with: - name: windows - path: build/windows/runner/Release - - macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - uses: subosito/flutter-action@v2 - - run: flutter build macos - - uses: actions/upload-artifact@v3 - with: - name: macos - path: build/macos/Build/Products/Release/selfprivacy.app - - deploy: - runs-on: ubuntu-latest - needs: - - windows - - macos - steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 - with: - name: windows - path: windows-release - - uses: actions/download-artifact@v3 - with: - name: macos - path: macos-release/selfprivacy.app - - run: pushd windows-release; zip -r ../selfprivacy-windows.zip .; popd - - run: pushd macos-release; zip -r ../selfprivacy-macos.zip .; popd - - run: ./ci.py --gitea-upload-attachment selfprivacy-windows.zip - - run: ./ci.py --gitea-upload-attachment selfprivacy-macos.zip From f5921582b9a3889f304eef9a6a56512046b03524 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 04:03:28 +0300 Subject: [PATCH 191/732] try to use different meta for nightlies --- .../en-US/full_description.txt | 1 + .../en-US/images/icon.png | Bin 0 -> 12964 bytes .../en-US/short_description.txt | 1 + .../org.selfprivacy.app.nightly/en-US/title.txt | 1 + 4 files changed, 3 insertions(+) create mode 100644 metadata/org.selfprivacy.app.nightly/en-US/full_description.txt create mode 100644 metadata/org.selfprivacy.app.nightly/en-US/images/icon.png create mode 100644 metadata/org.selfprivacy.app.nightly/en-US/short_description.txt create mode 100644 metadata/org.selfprivacy.app.nightly/en-US/title.txt diff --git a/metadata/org.selfprivacy.app.nightly/en-US/full_description.txt b/metadata/org.selfprivacy.app.nightly/en-US/full_description.txt new file mode 100644 index 00000000..018c94ca --- /dev/null +++ b/metadata/org.selfprivacy.app.nightly/en-US/full_description.txt @@ -0,0 +1 @@ +Nightly builds of SelfPrivacy app. diff --git a/metadata/org.selfprivacy.app.nightly/en-US/images/icon.png b/metadata/org.selfprivacy.app.nightly/en-US/images/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..bceb02539a76812a809152a37cd55dce2e4c507a GIT binary patch literal 12964 zcmb`tXIN8P5Gc9<0Rw#Nd$_ zx=058?D`HJLlDtF_VV)Ds`B#euI?_j_Kr3X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eyW29Hk(uJM2H zxBtb3;DiJJmn%d71&H~C;Q4?3@c%UKsCYu}a^Uxfpp3Udq8GCd`yhph4Db?mO|V&g z@&_kqS+uI;R|v?U2bVo39Y(LTi9s`&n1==iA89?u{?%%c=9&u)MP3?K^|E1h1A~r^7-4NtL zBuO6D#~4=M1k=vEa26afWX-tr_k*L2#9Z`|V=p!B4Ip!&s=ef2 z=C{rgru!J5=Wkl^n!^W((XjigLh<7l Gum1;?=KLc7 literal 0 HcmV?d00001 diff --git a/metadata/org.selfprivacy.app.nightly/en-US/short_description.txt b/metadata/org.selfprivacy.app.nightly/en-US/short_description.txt new file mode 100644 index 00000000..18bbf5ab --- /dev/null +++ b/metadata/org.selfprivacy.app.nightly/en-US/short_description.txt @@ -0,0 +1 @@ +Self-hosted services without pain diff --git a/metadata/org.selfprivacy.app.nightly/en-US/title.txt b/metadata/org.selfprivacy.app.nightly/en-US/title.txt new file mode 100644 index 00000000..7eb10ccc --- /dev/null +++ b/metadata/org.selfprivacy.app.nightly/en-US/title.txt @@ -0,0 +1 @@ +SelfPrivacy (Nightly) From d9f1d8991a3e188ade909b092e42566b4eba8c78 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 04:04:08 +0300 Subject: [PATCH 192/732] trigger build --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 129e1070..709f52ea 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,8 +47,8 @@ steps: trigger: event: - push - branch: - - master +# branch: +# - master node: server: builder From 62a0b41e94fa6e778ece350162b3545c4bb98cc9 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 05:05:59 +0300 Subject: [PATCH 193/732] change icon and name for nightlies --- android/app/src/nightly/AndroidManifest.xml | 8 ++++++++ .../src/nightly/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../nightly/res/mipmap-hdpi/launcher_icon.png | Bin 0 -> 2066 bytes .../src/nightly/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../nightly/res/mipmap-mdpi/launcher_icon.png | Bin 0 -> 1546 bytes .../src/nightly/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../nightly/res/mipmap-xhdpi/launcher_icon.png | Bin 0 -> 2616 bytes .../nightly/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../nightly/res/mipmap-xxhdpi/launcher_icon.png | Bin 0 -> 3648 bytes .../nightly/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../nightly/res/mipmap-xxxhdpi/launcher_icon.png | Bin 0 -> 4766 bytes 11 files changed, 8 insertions(+) create mode 100644 android/app/src/nightly/AndroidManifest.xml create mode 100644 android/app/src/nightly/res/mipmap-hdpi/ic_launcher.png create mode 100644 android/app/src/nightly/res/mipmap-hdpi/launcher_icon.png create mode 100644 android/app/src/nightly/res/mipmap-mdpi/ic_launcher.png create mode 100644 android/app/src/nightly/res/mipmap-mdpi/launcher_icon.png create mode 100644 android/app/src/nightly/res/mipmap-xhdpi/ic_launcher.png create mode 100644 android/app/src/nightly/res/mipmap-xhdpi/launcher_icon.png create mode 100644 android/app/src/nightly/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 android/app/src/nightly/res/mipmap-xxhdpi/launcher_icon.png create mode 100644 android/app/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 android/app/src/nightly/res/mipmap-xxxhdpi/launcher_icon.png diff --git a/android/app/src/nightly/AndroidManifest.xml b/android/app/src/nightly/AndroidManifest.xml new file mode 100644 index 00000000..1a08196b --- /dev/null +++ b/android/app/src/nightly/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/app/src/nightly/res/mipmap-hdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/android/app/src/nightly/res/mipmap-hdpi/launcher_icon.png b/android/app/src/nightly/res/mipmap-hdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0f0b95e81f46410ad1020dd0d2acb07c559353bd GIT binary patch literal 2066 zcmV+t2<`WYP)EX>4Tx04R}tkv&MmKpe$iQ>7{u2aAX}WT;M7L`B3&t5Adrp;l+kRU=q1x1u#AwsK0iirg6M?L%lj$a~|Larhh zITlcc3fb|4|H1EW&D_Men-q)!?Ju_dF$4s5fqK=pzmILZeggQPfh(=)FV}$SPtvPR zEqny@Yy%h9O-00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4c7nw4c7reD4Tcy000McNliru<_Q)804PG5M412p1`kO@K~#9!?V8JP8&wp>zdP?4 zj~$O6iAnQl)8dvskbnwRg+(P6NK~qX#D*11B=#(jKow=h-@yiffCZ%+5U3zZY12}* zRU0KulQeG9I)23V*z=ytA`hB4cG8yCac0iWKJ&Qur*qHw&b>ph&Q6~`%}p^!>Hq`; z*oWTY`p-xUVyFV;TmPAnU}!Hu}z=5qjC@@#}M0f7=&TrS~Xa; zJXk@2pr)W^4xnf7Rd7-azUQ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9m literal 0 HcmV?d00001 diff --git a/android/app/src/nightly/res/mipmap-mdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@UEX>4Tx04R}tkv&MmKpe$iQ>7{u2aAX}WT;M7L`B3&t5Adrp;l+kRU=q1x1u#AwsK0iirg6M?L%lj$a~|Larhh zITlcc3fb|4|H1EW&D_Men-q)!?Ju_dF$4s5fqK=pzmILZeggQPfh(=)FV}$SPtvPR zEqny@Yy%h9O-00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4c7nw4c7reD4Tcy000McNliru<_Q)80Ssq?kqH0*1P4h(K~!ko?U_q&8&wp?|M%Xx zGvl#6@%UBSZHcXvC=v(>qKZnu0(PhpNG#aG2VujaELiddKw`lLsTC4P2!vRqQbZAr zP!LJurh>S|kJ@n@+v9n7E{mv6UDr)f{Fo6vJD+>UIzQiY&-tG*!9(`J$6s#?U>U(M zyH(y@qYrxoL?j@=gFr|EcuVqAP@ZFc6ke~)gJOQSwkrP z9OOuH?6cGl0FHy$HrbXqUIpsTKht{CffbAV-o2_g!>qMJRd- zTrboO;&$ImxAo@o^QpSf%t?Pi& z(V8Q@e)+O-yvcSTsF-NSWFUm{r{3>cok0&6KncJ#n~%(r>VRzO50T9L!PAx&zGXNp;mlEyrp9MLRs75j? z=|{CtZ1EzTUJIVn0|dah3a0Ag;+~%tsu$N{TwQ1@vFym~!Brhl_5ap4WYg)|6q2Kjum)^a=LOMI1tU@&X!rM#gLbfFYeX*CU9Z0NQ+MJ6(B!MXh?Z|&b*x6IHPHCo1E+N3 zt9{|QIsXG3Swt{;Tt>OdAVhpBBj{9GFkmauba)^ixIzizrN974vQ{FG%&(zXwig(H zQ2hKzD^nBsSYQCu_+nxNDt2}%cVHS~PB2+h9w(OxA$1`{!tVg2vT<$Pi~U3(QfQVI zcmT=j^?n2q%De&)9u1!gz;Sw4gop0|$nnDJU(sYfKGPIn>{MAm0N|C2mp&u}pPyfS zr>SR_V?jtA0^v2wcPIsb-)^jbL4Z#JeTjelW&I<~IO_zt3JI=g-m^0L4B-C^;0a;| wC2&E|9}#n{>h5O{_!K_+2mcAi3BeEl0!hAYw)<-7*Z=?k07*qoM6N<$f=ZIfSpWb4 literal 0 HcmV?d00001 diff --git a/android/app/src/nightly/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..09d4391482be68e9e4a07fab769b5de337d16eb1 GIT binary patch literal 721 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy!iOI#yLg7ec#$`gxH85~pclTsBt za}(23gHjVyDhp4h+5i=O3-AeX1=1l$e`s#|#^}+&7(N@w0CIr{$Oe+Uk^K-ZP~83C zcc@hG6rikF&NPT(23>y!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/android/app/src/nightly/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/nightly/res/mipmap-xhdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..207a9cde971411e3fa54b4ce6cdd32e8f6c0cc6c GIT binary patch literal 2616 zcmV-83di+{P)EX>4Tx04R}tkv&MmKpe$iQ>7{u2aAX}WT;M7L`B3&t5Adrp;l+kRU=q1x1u#AwsK0iirg6M?L%lj$a~|Larhh zITlcc3fb|4|H1EW&D_Men-q)!?Ju_dF$4s5fqK=pzmILZeggQPfh(=)FV}$SPtvPR zEqny@Yy%h9O-00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4c7nw4c7reD4Tcy000McNliru<_Q)80W4hXvB3ZU2sKGWK~#9!?VQPP99bR5zps|A z>aE({9lP60I>d<+$c9EFLX0?aK#9aiNFyW!oZvDCByJoyB8|jgb2R z{NPqUa znIWD7*RH~;Y{M}M0ApaDgQ~s&$0#B)bQvH5p8@SiR6@|kZb6XLohRM3U=`OO%0Wn~ z22~qIbmTe)F5H2lrTp{kvX0W~3>c*xK>Kx)0&Vml$I zV}NTGQPrOVjBx;MLy&_A4PNs9u5B$HI!+EHppD(~Vc8WOX7LpV&Me}FN0E-1L%Z;$&7z&7V1CQawrZZn)cIKE5E`4bfi#HH3+*! zmtz#bXnp@4Ok_ZIvmmRaw-gIFfL2^l_?%xMyJn$5@D4x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LiQydGA;6gW)~&Nt<7vX-**Y a$NvY2aREd)Yb@{p0000{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/android/app/src/nightly/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/nightly/res/mipmap-xxhdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..97f25aa816ec54bf19b2b8de804596cdadef320e GIT binary patch literal 3648 zcmV-G4!`kEX>4Tx04R}tkv&MmKpe$iQ>7{u2aAX}WT;M7L`B3&t5Adrp;l+kRU=q1x1u#AwsK0iirg6M?L%lj$a~|Larhh zITlcc3fb|4|H1EW&D_Men-q)!?Ju_dF$4s5fqK=pzmILZeggQPfh(=)FV}$SPtvPR zEqny@Yy%h9O-00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4c7nw4c7reD4Tcy000McNliru<_Q)80ue8%t`h(N3_VFiK~#9!?VU?(8`l+v|2t0( z$q^s2L_I0hj_o+k%SK{k*+tUEC{Q#3f(AuV6y3DwE?pD_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UjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/android/app/src/nightly/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/nightly/res/mipmap-xxxhdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fdad70abcb369f5363ad7ec59ac7d3e23a7c0f6b GIT binary patch literal 4766 zcmai2c{J3~-~P@pVGuF0gvL^hU8L;G*ru`%B3YXxYqlA(jcx2(k?bLjY%P*~C~6Rq z(%6Smc82WhZ~DFey#KuCJ@J?FXiKF|4l?tT-@Obpqf0#E<|*sr4WEa+wXKVv>Y z&n?D1nE(J3b5B>-?5eIV{Jx)$>pjm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tSf<8S2^i4`k~HR4;Sa-At6DAXKpaRZE!2tUtA z;@$~Q{d%rLilF?>3W`~gJ!Wi=kdMN|H}W(7lxyOes-rk;5f8?<;hkw9Uk0ZLJRAFB m`p;Dc$Kd(dW7-9^V+O;d{<&!1hFSX01#ng0M6U+v6!jlpvg7Xn literal 0 HcmV?d00001 From 280075c276a18b76d89c0f2c7b2533a5a5dd9638 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 05:15:00 +0300 Subject: [PATCH 194/732] production --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 709f52ea..129e1070 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,8 +47,8 @@ steps: trigger: event: - push -# branch: -# - master + branch: + - master node: server: builder From 737c86eeed44d593e5954538c2a612c1be22e285 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 22 Sep 2022 10:46:35 +0300 Subject: [PATCH 195/732] change icons for targets --- .../Icon-App-1024x1024@1x.png | Bin 10932 -> 17768 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 564 -> 852 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 1283 -> 1129 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 1588 -> 1356 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 1025 -> 973 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 1716 -> 1326 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 1920 -> 1711 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 1283 -> 1129 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 1895 -> 1646 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 2665 -> 2185 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 2665 -> 2185 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 3831 -> 3043 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 1888 -> 1604 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 3294 -> 2664 bytes .../Icon-App-83.5x83.5@2x.png | Bin 3612 -> 3131 bytes .../AppIcon.appiconset/app_icon_1024.png | Bin 102994 -> 17769 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 5680 -> 2262 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 520 -> 791 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 14142 -> 4198 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 1066 -> 967 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 36406 -> 8284 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 2218 -> 1423 bytes windows/runner/resources/app_icon.ico | Bin 33772 -> 9662 bytes 23 files changed, 0 insertions(+), 0 deletions(-) diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index dc9ada4725e9b0ddb1deab583e5b5102493aa332..07d90fa494eff0a0401084065c89e937877ce75f 100644 GIT binary patch literal 17768 zcmdVBcT`l_(l&lj6jThOk^}?>Q3MGpNr{4rh$P80K|}<}xyiI6f`Wi#$w2Mr^fD7}zr_&n;Y{#c@&$)SJSQ*wVEXgo-SvC2 z&nhh(`oGt7mQXaW2yRYJDVSeB?r?1RR@+$*n|C&LZLRkfFS)76KL61Cv4*6WZkeG| zCuoqDoO)xmA=5{y@siue_aapFMh)(+Px&8FE697U>{AAjHlf1W%>%d=Yc(nA-muiG zCERl%B+DZFCSrJOIm$~|}U!Jr$^?j!`+xxTVm3ctL&n(Po`6phqd*_|d1`{`K z^u@|hPdQ}Gdu!1Zp5fHb-*+_Z^}Iy4M56YF)j955gM+Vz!J8I_C=;r}LgP0pS51qK zlL$`x(%*ZIi5H3_8fcyh%@)S7{>quy=;*7NKK?mA-Iu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X?292)#=JVQDUMp-cOJPl`+yTHTD!AOit-zAD zptXYa!q%OVLa^mo25b7^Z>kE`3rqgr-G4i;Lw<+P(8khESW8aaBmxfY`WS#6j<92Q z-++&Y z$gbH4#2sT0cU0SdFs=*W*4hKGpuR1QGacHFy;`# zR&NJkbTNp}Ee5f08HmLzK%D(q3@lH;Tzx$?VT;&xJq-KyHV__o3dD)?KrE<6*iXV0 z8;6<{IKw@dyDwJ90H5^3h;|9?twz{UGr|>1Pzhdn6W(r0ifeZd=JI+AAz<~yL(QJk zAWW))+=`8mGj|J!70oF@d4B;WxB=jBM1bWWRBb&1!ie3BUzOdm}yC-xA%SY``k$rbfk;CHqifhU*jfGM@DkYCec zD9&E@F9*za0?~OQZiDE|Cf;;0 z`uZ%H=IeGyG^H0ruev{yIVARgwZUG)j7>F#3~dh+8DOtPByR=(VDhz2enf#EjcXCI z=NUPYr4@S)GhX!?s(0Eh(nGe!y$#$r1B$||I~`wPhUuCQEo;#Xb$EXk=6HgBBRd#c ziK|jN$e~{zV~|;*E@Ij-Z(+tI^B8RW51ptE!nMnPyZ`_I07*qoM6N<$f^B4s6aWAK diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd967d9697cd4b83225558af2911e9571c9b..4c55ddf10b72313ae6c36387b792c11ecd1fc5ef 100644 GIT binary patch delta 1109 zcmV-b1giUk3h4-tBYy#eX+uL$Nkc;*aB^>EX>4Tx04R}tkv&MmKpe$iTcs)$2a8B? z$WV2$AS&XhRVYG*P%E_RU~=gfG-*guTpR`0f`cE6RR+H=v8ti1AGGUEYl5(c!PL))6zNb6Ngz*Qi#uq#|*k4@gvt|m)|%S9QO0f zu#ry96Nia~LL19%%!-CeJVhK;RE_fe8J88#Tb$K$l{N3lUl_`1E6ZG`IfMiju>=tU zWK>Z?85Ux+YJa4dNYQ@W!yj?{BDrL8mB7fcfC^Mdjvx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2Lm9I{{?%y{Hgdzxli z7Fd?00Ed;L$qk&zI`y$@{Dn;5j(iW`=!aXNV*G=kjb8%Qi`UtJMSq7ZT$4qCb{TaXHjb$QA{y0EYy*+b1XI;6Ah-w13P)xT`>~eFoJC!>{2X zL(a_#upp3gaR1#5+L(Jmzp4TBnx{~WHedpJ1ch8JFk~Sw>F+gN+i+VD?gMXwcIhn8 zrz`>e>J^TI3E-MW>VM=sWZual)ns9B%8_$25BcpOz+KP;+J(1(UiAp*Q=dc!FQL}*R43bTaVm7wy#IrC-VD&k-4FWYMd;wg6!1z8a3SP;O>P#-$->_l zEAM2>hI~v3$Y(TlIdJE^0@|6AK_7#uc{~E1^f2gGJ^}i)rGJ>FDPRt4F~}m-WGQZK zw?8N6;NJH#XeW;Webf!0kG=!+v2#G5xX^L14Y#o*Tz9&z7NjOib92f(6aq==Ntoo74a!u6w~r!$mq|FDi7h6+6fTa4$$0Y>@Y*O}J#< z8ic&ucAQ^e_cw)#3uFTLcly|p7IMmPAXha6205mSA%EQja0eR?DV=N%;eS$2zHI*MpiObUuA|j7`m5?j`@^G6SO!-;(G1aCOu{sGli$ zGck~Eqx{gt?U$`9P3JRJO>}Ku- zRew#6AKb$jGi@lro`A;#P%m@cnyJP&(r%f}Zq^V3mIc=hnLfVXHRn=pj;2#4v8WiM zav|%So5|ksmkM-bV7H;F_%f>b72G`eFJ!d@wTC-#ALO^GRCtHl=K|Y}dX%fTm0A$N zzc4;N3AGsYM~OOND&T_#%8wZzWYfL@by`|620=mAU7(LZ-At!cdlWCvu@AK#bt~#< z9;~k^d5}}7VXmK@h?&@_rUHYJ9zD=M%4AFQ`}k8OC$9ssPq=LnkwKG P00000NkvXXu0mjfxFQ-t diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b8609df07bf62e5100a53a01510388bd2b22..53f5c3e5cba57aa9b1cb5ed7a52006ea054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7438K4#iLe?rh z2O~YGSgFUBH?og*6=r9rme=peP~ah`(8Zt7V)j5!V0KPFf_mebo3z95U8(up$-+EA^9dTRLq>Yl)YMBuch9%=e5B`Vnb>o zt03=kq;k2TgGe4|lGne&zJa~h(UGutjP_zr?a7~#b)@15XNA>Dj(m=gg2Q5V4-$)D|Q9}R#002ovPDHLkV1o7DH3k3x diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d39da7941ef3f6dcb7f06a192d8dcb308d..ee10e678dbfcb79efb1031e5dcea9e32f7940ed9 100644 GIT binary patch delta 1588 zcmV-42Fv;24#W(QBYy#eX+uL$Nkc;*aB^>EX>4Tx04R}tkv&MmKpe$iTcs)$2a8B? z$WV2$AS&XhRVYG*P%E_RU~=gfG-*guTpR`0f`cE6RR+H=v8ti1AGGUEYl5(c!PL))6zNb6Ngz*Qi#uq#|*k4@gvt|m)|%S9QO0f zu#ry96Nia~LL19%%!-CeJVhK;RE_fe8J88#Tb$K$l{N3lUl_`1E6ZG`IfMiju>=tU zWK>Z?85Ux+YJa4dNYQ@W!yj?{BDrL8mB7fcfC^MdjvxFFes^o;CnwybP#oxdvF(px zAh-)OYPS7-Y}<_!An*)aX)S-H4$OR#UTbO5BcN{^xVUa<@*Z%x0}MXtk|8-#fTlm6 z2j0)w3au97#v!67hGpzL*zcYk-a_xA6ZW`93$u5zX$pG5Zn z000JJOGiWi{{a60|De66lK=n!32;bRa{vGh*8l(w*8xH(n|J^K00(qQO+^Rh2^I$| zB?HlsVE_OGK}keGRCwC$+Fxu_RU8NK-?@Lv+O>tX`@`C~QkJqJ3~+2RCkDuTTOvk` zz@sthgMU*=FdCHycu*9giKqz={!5GxDlzlH#3(XjV#JLhFTl(;+?ec+cHP$Y_TIL) z_Z}bEre50a-Urz2`ujfKb8d3_Y0mlGbM7UOCv*fZ0)hJgvq&OI4WrqN>jNflGXp_1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r2`TVSUmKS_>V@3%0*S#!+L=3f@oF=4k9U9xv0p1;Fx&}V;X2J~h zcz^}G3|;s8JyEFR*LB*fPUm+?f+ofnBQ5uK%NrwA+RV_~h<6-mw_wU?NGRI!zNTh% z&>ty6x8&gW75gdW)?p->&%?{*brS|k@b|(>&<^nyO55Pi_q*eK)=J*Uunw2cw--p%E!VXuDa? ztZ$HPKJ6$Sh7!UrpxVBLFSnpZOw$(ftvg!Nk1LVfL+FL(u zh1Abu(oCSmgqQ2IrE;Zz2f2DAD%T4XO6tU&)2IB}vV3{^xpz1MYFEPy_09RP2QvmA zIqw<(UaCnCs!mFX$+3sjnV*(O5)y`jW!*wzF-l^K`Bxgap+0Ej z@c^nf{Ic`6I5#9bcE7fwiiP8JZ9dr3FsD~SBiW_`8{UgFt*{$@qj#E)90JYra>Zs3 z$sCTuzOye2GdTO;4@;wgJK@!ij-|c--insluCR}{#q=D6Xz#nL6;`rkc*UzLTR%Y{ zN2YK;Zcz4YY=+|(0_?E=#~3U@I1fIyRiBF zIeWj=id+b|L;kSMs>NMfeB^(={IdrC;NYJy_$L+olL`OdOqgH0OpSa?FTRhwb<|%A Pe7HEdAEg|=c=LY&YVNkY diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png index 13b35eba55c6dabc3aac36f33d859266c18fa0d0..321775704947f25f23fb09831b88bf855fb9bbc7 100644 GIT binary patch literal 2262 zcmb7FX*kpi7yr+Uv4)upTDZoNTqH}DK@2mtt~I-{lr5977N*clMloeCB(fWo?Tze9 zVnkD!QkrlXEtklaQ5Z6J`tW{yKfKR*&N;v5_dMr(Im?gg>}Vq{dPo!i0C788>}h@` z|8`+PejGGA`vL$!*YFsOvmFM5jE;>8#S=mRKrJ^p_oVG0T5c%7bx2ZOLIxf);_UYr zss8D{yPD-SXN|{;XJQv*PvC7&`^rICDHMg9?n1KX{N#P17Hbgto9A|KtWNC)oDPG3 zei~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%j9S#}ha zm0Nx09@jmOtP8Q+onN^BAgd8QI^(y!n;-APUpo5WVdmp8!`yKTlF>cqn>ag`4;o>i zl!M0G-(S*fm6VjYy}J}0nX7nJ$h`|b&KuW4d&W5IhbR;-)*9Y0(Jj|@j`$xoPQ=Cl diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png index 0a3f5fa40fb3d1e0710331a48de5d256da3f275d..182d83504b960209d9930ec5c5d3b823ed372b2d 100644 GIT binary patch delta 768 zcmV+b1ONPp1eXSoBYy#fX+uL$Nkc;*aB^>EX>4Tx04R}tkv&MmKpe$iQ^gM|4i*t{ z$WUFhAS&XhRVYG*P%E_RU~=gfG-*guTpR`0f`cE6RRxHXMHl)JM1K^cGP8_1NlL(XeBC3! z*Sjds@;~?I=uxv40|FxPEHg}-c!PL)(>6Ho6NgzrR*BDv$4t5)@gvt2kKZ`wT^4v| z*i0qoiNnNVzJ-+*W(89to+6H@nojvb+GCaT7H6$gVU2t87lyL>$}-n!4k3<3EJ1<@ z1r-!gf=zuDp?{NNAxZl&AOE21m&m1%s|ZGp1(cydcKzUg@Vi?pH#y-YgD8tdIRbjOfs5;=rtATiJHWt`A)B%*1!)So z9PoZd-;@FRZh`JKueZiNP9K02b(OdQ4i15lJY}!@ynnm1wYPuIH2V7ipYd|J_Zb(T z00006VoOIv0RI600RN!9r;`8x010qNS#tmY4c7nw4c7reD4Tcy000McNliru<_Q)9 zF*umAId}j70TW3?K~y-)V`N}pVEBKR;Wq;V0}BJmfawJj0|NsC10w??13BP70}~Si zg@9rM7=ImHJ^tfUV65@>c2B`+RqS41dPUF$XKx6r&fBQ^m@F@d3VpvPDf0d9;_b>( zhcAe~C&>VQo?j1EwjNYk+I&!1Oz6jhrrA2rv8lru_dkC#v;6%BG5`AyX6E02u&cvq zz>lBIG8+%czTo5h&HDKps{#YV?`tF(z`(%3V0oziR*;wL4_-BRC0pkj++Hb>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~wow?oj*1TKmx4j71>$hvtC$DLD zUrz0^tiP0792U&dxJxNv@r}Elsjn^aSLUu=9#mD{&9n8|ayIL$!H3s>%KEvbchBFW z%cd?VU83mGF#Dar9*s~w&AnmQRQIOvR+uWsuZ?+|a=TzApXO@q^(r%8=}iv#wCnFq z=K9}JbqU@k99Q%j-}NNk+qLCP)jXfmOO|)@?mHcnynd6({mJisP1_}u7k)|eYHXWK z63eQ)E$ufFi!3CWUY2gw%e>omCv}qEX66aH-k&35f9`Q@Us|NPetVqe8=dX*VxJdn ze`q7b=Dn(UA(2sf&g)cOmQFhNJ#<-aMELJZbA#@to>25@kbW<)&!X01 z%NMJt>1ST)tyX)h@?`DxhbgCHr>S4wv}WC&Nw-!{+Z7$2D}74QAcXTvip=M0%Tp_N zor=k`)t|ra^ySr-+(|R9mB(E=`MX#y(wSw)$!iymzB;^c*>%&^*7HxTnRga=soSZT zdDl+9s;r!v8hk6POtzBaig4pRp7eWF(<8gufvNHPu6xs-=e{;mnHzJyGKE+8L0j}; z@%8-e^UCL5HhMiR>sD3Rve&yVZ#{Q1*CO8c+qSr^Z#CN;)(X5>tGG5yUw3<+CfhaL z%bP;hZ?jvgJU67BWyiy74_)6r)_nSxttxn0`0?HE^5(uydHVgP+HE$V?Lv)Leti43 zWA|;f-RqX``95>)^P-fw!Vi{3KNsII-*5f){gdxqd%gVdB1sOBNe=nEW%;i~g_P8J w!5uhoe-Jcg1nPN%MiEAtgE$;km@@t6ukO)1^!cY^83Pb_y85}Sb4q9e0FIsP9{>OV diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png index 2f1632cfddf3d9dade342351e627a0a75609fb46..d60f26971bb8bfbaae5d9b53b9e8e085ee54bec4 100644 GIT binary patch delta 1405 zcmV-@1%mpj5swRyBYy#fX+uL$Nkc;*aB^>EX>4Tx04R}tkv&MmKpe$iQ^gM|4i*t{ z$WUFhAS&XhRVYG*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*OuvepcN(6Kn)m=*PK4I%T9~HOM)8+a`>dXyL z$mdN63+{@ot!nS0XE*Jkx~7Y6^lpnqH3zi2(X-qJAD}ioJ%5efer&7`l)>_->tVrZ zJHf7}ex3-E;6h6{S$!4H2gWGN~F(zYfI&I!<4C6Cj}86!!HVKso`!wlU}od~3= zLBi5c_EG(5M{~kuOY|sI5x`$yrcH9Pv#9jVMYMQQK1QD>Kqz`+<=I!K0Y6;MBrGf4 zOJ~kqN!6ZuyMKzdrww#G29;c2k7Pss?YK=Je|dmP%VM#v1II%QoLSKG-Ph@epI<&I zrZEo;mzznJpNvmr8m%6(C4e7>5#_iPSydcBWwii5)6QO12ymUPb`=Luxe`M%4`70h zLeu)GTpG!&M%#1X0kLzqMMp{xKt-O9mO@)C>h|{{UVp}ysK7G-B?0^Z8sOF7N$5Z# zfx$lo+fU-El%xc3Z8UTkm-)~N&i8X+w_gaG54vtARs}C~IkXDe-{d3=S_Q>kv*)6m z1XazTqw%=E5Xv7^@^^T7Q2wxr+Z2kVYrerj@E`hDauQ;_COrTE002ovPDHLkV1h4Z4uAjv diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico index c04e20caf6370ebb9253ad831cc31de4a9c965f6..1919b8cdc437b1381161fedea06caa9e080899e5 100644 GIT binary patch literal 9662 zcmZQzU<5(~0|p?ez_3Dux56C}* zF8{hYe&RWF_Xm3VXFLDyudBEFQ}j3(Z0=W?wBRwi+hKgs^+(?icK3toESP)IX~sK$ z|GT?6en zy4yi~^Q`>a$YBp+E4NO$flVzDV&MJ@x_Q*#Tcl;(<^qN_%nj`4-~KhpFTR6rwsk_{ zbzFXh>BU3S%>7Vz{&V&5c>f=w@};C7I|=pOz$O_==x3j9J>_gf{W-K3zb z!IqBb=6$H2ep4u6Q*3N5h|zGIccl47T)h l=l{(iRR8|eIQxF@184|8^_Ub8Vp#`BLl3lbZ zvPO!8k!2X>cg~Elr=IVxo~J*a`+9wR=A83c-k-DFd(XM&UI1VKCqM@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6g{{fxOO~wEK From 8696f575acffe277987becde3b67355558de24af Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 29 Sep 2022 12:08:04 +0300 Subject: [PATCH 196/732] fix metadata and add README --- README.md | 51 +++++++++++++++---- .../android/en-US/full_description.txt | 36 ++++++++----- 2 files changed, 63 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 35c31b44..2ec6711c 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,48 @@ # SelfPrivacy App -- [Official site](https://selfprivacy.org) -- [SelfPrivacy App (F-Droid)](https://f-droid.org/en/packages/pro.kherel.selfprivacy/) +SelfPrivacy — is a platform on your cloud hosting, that allows to deploy your own private services and control them using mobile application. -## Getting Started +To use this application, you'll be required to create accounts of different service providers. Please reffer to this manual: https://selfprivacy.org/en/second -This project is a starting point for a Flutter application. +Application will do the following things for you: -A few resources to get you started if this is your first Flutter project: +1. Create your personal server +2. Setup NixOS +3. Bring all services to the ready-to-use state. Services include: -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) +* E-mail, ready to use with DeltaChat +* NextCloud - your personal cloud storage +* Bitwarden — secure and private password manager +* Pleroma — your private fediverse space for blogging +* Jitsi — awesome Zoom alternative +* Gitea — your own Git server +* OpenConnect — Personal VPN server -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +**Project is currently in open beta state**. Feel free to try it. It would be much appreciated if you would provide us with some feedback. + +## Building + +Supported platforms are Android, Linux, and Windows. We are looking forward to support iOS and macOS builds. + +``` +flutter pub get + +# Build .APK for Android +flutter build --flavor production apk +# Build AAB bundle for Google Play +flutter build --flavor production aab +# Build Linux binaries +flutter build linux +# Build Windows binaries +flutter build windows + +# Package AppImage +appimage-builder --recipe appimage.yml +# Package Flatpak +flatpak-builder --force-clean --repo=flatpak-repo flatpak-build flatpak.yml +flatpak build-bundle flatpak-repo org.selfprivacy.app.flatpak org.selfprivacy.app +``` + +## Translations + +Translations are stored in `assets/translations/*.json` and can be edited on . diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index 32c7f449..f5ba9142 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -1,15 +1,23 @@ -SelfPrivacy - is a platform on your cloud hosting, that allows to deploy your own private services and control them using mobile application. -To use this application, you'll be required to create accounts of different service providers. Please reffer to this manual: https://selfprivacy.org/en/second.html -Application will do the following things for you: -1. Create your personal server -2. Setup NixOS -3. Bring all services to the ready-to-use state. Services include: -* E-mail, ready to use with DeltaChat -* NextCloud - your personal cloud storage -* Bitwarden - secure and private password manager -* Pleroma - your private fediverse space for blogging -* Jitsi — awesome Zoom alternative -* Gitea - your own Git server -* OpenConnect - Personal VPN server +

SelfPrivacy — is a platform on your cloud hosting, that allows to deploy your own private services and control them using mobile application.

-!!! Project is currently in open beta state. Feel free to try it. It would be much appreciated if you would provide us with some feedback. \ No newline at end of file +

To use this application, you'll be required to create accounts of different service providers. Please reffer to this manual: https://selfprivacy.org/en/second

+ +

Application will do the following things for you:

+ +
    +
  1. Create your personal server
  2. +
  3. Setup NixOS
  4. +
  5. Bring all services to the ready-to-use state. Services include:
  6. +
+ +
    +
  • E-mail, ready to use with DeltaChat
  • +
  • NextCloud — your personal cloud storage
  • +
  • Bitwarden — secure and private password manager
  • +
  • Pleroma — your private fediverse space for blogging
  • +
  • Jitsi — awesome Zoom alternative
  • +
  • Gitea — your own Git server
  • +
  • OpenConnect — Personal VPN server
  • +
+ +

Project is currently in open beta state. Feel free to try it. It would be much appreciated if you would provide us with some feedback.

From d36c8e987d2d7f957b5074e34ce6a40a8d80cdfb Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 4 Oct 2022 02:32:35 +0300 Subject: [PATCH 197/732] Completely refactor language asset files --- assets/translations/en.json | 518 +++++++---------- assets/translations/ru.json | 532 ++++++++---------- lib/logic/common_enum/common_enum.dart | 40 +- lib/logic/cubit/backups/backups_cubit.dart | 5 +- .../cubit/client_jobs/client_jobs_cubit.dart | 16 +- .../cubit/dns_records/dns_records_cubit.dart | 27 +- .../provider_volume_cubit.dart | 2 +- .../server_installation_repository.dart | 16 +- lib/logic/models/disk_size.dart | 6 +- lib/logic/models/job.dart | 8 +- .../components/jobs_content/jobs_content.dart | 10 +- .../not_ready_card/not_ready_card.dart | 6 +- .../server_storage_list_item.dart | 4 +- .../pages/backup_details/backup_details.dart | 32 +- lib/ui/pages/dns_details/dns_details.dart | 22 +- .../info.dart => about_application.dart} | 13 +- .../more/{about/about.dart => about_us.dart} | 6 +- .../pages/more/app_settings/app_setting.dart | 28 +- lib/ui/pages/more/{console => }/console.dart | 16 +- lib/ui/pages/more/more.dart | 28 +- lib/ui/pages/providers/providers.dart | 16 +- lib/ui/pages/server_details/charts/chart.dart | 14 +- .../server_details/charts/network_charts.dart | 2 +- .../server_details/server_details_screen.dart | 8 +- .../pages/server_details/server_settings.dart | 16 +- lib/ui/pages/server_details/text_details.dart | 17 +- .../server_details/time_zone/time_zone.dart | 2 +- .../migration_process_page.dart | 4 +- .../binds_migration/services_migration.dart | 6 +- .../server_storage/extending_volume.dart | 17 +- .../pages/server_storage/server_storage.dart | 6 +- lib/ui/pages/server_storage/storage_card.dart | 6 +- lib/ui/pages/services/service_page.dart | 12 +- lib/ui/pages/services/services.dart | 4 +- lib/ui/pages/setup/initializing.dart | 44 +- .../recovering/recover_by_new_device_key.dart | 2 +- .../recovering/recover_by_old_token.dart | 2 +- .../recovering/recover_by_recovery_key.dart | 2 +- .../recovery_confirm_cloudflare.dart | 2 +- .../recovery_hentzner_connected.dart | 2 +- .../setup/recovering/recovery_routing.dart | 2 +- lib/ui/pages/users/user_details.dart | 6 +- 42 files changed, 682 insertions(+), 845 deletions(-) rename lib/ui/pages/more/{info/info.dart => about_application.dart} (83%) rename lib/ui/pages/more/{about/about.dart => about_us.dart} (85%) rename lib/ui/pages/more/{console => }/console.dart (89%) diff --git a/assets/translations/en.json b/assets/translations/en.json index 3c849eff..bee29120 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -2,9 +2,10 @@ "test": "en-test", "locale": "en", "basis": { - "_comment": "Basic interface elements", "providers": "Providers", + "providers_title": "Your Data Center", "services": "Services", + "services_title": "Your personal, private and independent services.", "users": "Users", "more": "More", "next": "Next", @@ -29,41 +30,38 @@ "wait": "Wait", "remove": "Remove", "apply": "Apply", - "done": "Done" + "done": "Done", + "continue": "Continue" }, - "more": { - "_comment": "'More' tab", + "more_page": { "configuration_wizard": "Setup wizard", "about_project": "About us", - "about_app": "About application", + "about_application": "About", "onboarding": "Onboarding", "create_ssh_key": "Create SSH key", - "generate_key": "Generate key", - "generate_key_text": "You can generate ssh key", "console": "Console", - "remove": "Remove", - "enable": "Enable", - "ok": "ok", - "continue": "Continue", - "ssh_key_exist_text": "You have generated ssh key", - "yes_delete": "Yes, delete my SSH key", - "share": "Share", - "copy_buffer": "Copy to buffer", - "copied_ssh": "SSH copied to clipboard", - "delete_ssh_text": "Delete SSH key?", - "about_app_page": { - "application_version_text": "Application version v.{}", - "api_version_text": "Server API version v.{}" - }, - "settings": { - "title": "Application settings", - "1": "Dark Theme", - "2": "Change your the app theme", - "3": "Reset app config", - "4": "Reset api keys and root user", - "5": "Delete Server", - "6": "This removes the Server. It will be no longer accessible" - } + "application_settings": "Application settings" + }, + "console_page": { + "title": "Console", + "waiting": "Waiting for initialization..." + }, + "about_us_page": { + "title": "About us" + }, + "about_application_page": { + "title": "About", + "application_version_text": "Application version v.{}", + "api_version_text": "Server API version v.{}" + }, + "application_settings": { + "title": "Application settings", + "dark_theme_title": "Dark theme", + "dark_theme_description": "Switch your application theme", + "reset_config_title": "Reset application config", + "reset_config_description": "Reset api keys and root user", + "delete_server_title": "Delete server", + "delete_server_description": "This removes your server. It will be no longer accessible" }, "ssh": { "title": "SSH keys", @@ -73,248 +71,170 @@ "subtitle_with_keys": "{} keys", "subtitle_without_keys": "No keys", "no_key_name": "Unnamed key", - "root": { - "title": "These are superuser keys", - "subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server." - }, + "root_title": "These are superuser keys", + "root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.", "input_label": "Public ED25519 or RSA key" }, "onboarding": { - "_comment": "Onboarding pages", "page1_title": "Digital independence, available to all of us", "page1_text": "Mail, VPN, Messenger, social network and much more on your private server, under your control.", "page2_title": "SelfPrivacy — it's not a cloud, but your personal datacenter", "page2_text": "SelfPrivacy works only with your provider accounts: Hetzner, Cloudflare, Backblaze. If you do not own those, we'll help you to create them" }, - "providers": { - "_comment": "'Providers' tab", - "page_title": "Your Data Center", - "server": { - "card_title": "Server", - "status": "Status — Good", - "bottom_sheet": { - "1": "It's a virtual computer, where all your services live.", - "2": "General information", - "3": "Location" - }, - "chart": { - "month": "Month", - "day": "Day", - "hour": "Hour", - "cpu_title": "CPU Usage", - "network_title": "Network Usage", - "in": "In", - "out": "Out" - }, - "resource_usage": "Resource usage", - "settings": { - "allow_autoupgrade": "Allow auto-upgrade", - "allow_autoupgrade_hint": "Allow automatic packages upgrades on server", - "reboot_after_upgrade": "Reboot after upgrade", - "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", - "server_timezone": "Server timezone", - "select_timezone": "Select timezone" - }, - "info": { - "server_id": "Server ID", - "status": "Status", - "cpu": "CPU", - "ram": "Memory", - "disk": "Disk local", - "monthly_cost": "Monthly cost", - "location": "Location", - "core_count": { - "one": "{} core", - "other": "{} cores" - } - } - }, - "domain": { - "card_title": "Domain", - "status": "Status — Good", - "bottom_sheet": { - "1": "It's your personal internet address that will point to the server and other services of yours." - }, - "screen_title": "Domain and DNS", - "states": { - "ok": "Records are OK", - "error": "Problems found", - "error_subtitle": "Tap here to fix them", - "refreshing": "Refreshing status...", - "uninitialized": "Data is not retrieved yet" - }, - "record_description": { - "root": "Root domain", - "api": "SelfPrivacy API", - "cloud": "File cloud", - "git": "Git server", - "meet": "Video conference", - "social": "Social network", - "password": "Password manager", - "vpn": "VPN", - "mx": "MX record", - "dmarc": "DMARC record", - "spf": "SPF record", - "dkim": "DKIM key" - }, - "cards": { - "services": { - "title": "Services", - "subtitle": "Type “A” records required for each service." - }, - "email": { - "title": "Email", - "subtitle": "Records necessary for secure email exchange." - } - } - }, - "backup": { - "card_title": "Backup", - "status": "Status — Good", - "bottom_sheet": { - "1": "Will save your day in case of incident: hackers attack, server deletion, etc.", - "2": "3Gb/10Gb, last backup was yesterday {}" - }, - "reuploadKey": "Force reupload key", - "reuploadedKey": "Key reuploaded", - "initialize": "Initialize", - "waitingForRebuild": "You will be able to create your first backup in a few minutes.", - "restore": "Restore from backup", - "no_backups": "There are no backups yet", - "create_new": "Create a new backup", - "creating": "Creating a new backup: {}%", - "restoring": "Restoring from backup", - "error_pending": "Server returned error, check it below", - "restore_alert": "You are about to restore from backup created on {}. All current data will be lost. Are you sure?", - "refresh": "Refresh status", - "refetchBackups": "Refetch backup list", - "refetchingList": "In a few minutes list will be updated" - }, - "storage": { - "card_title": "Server Storage", - "status_ok": "Disk usage is OK", - "status_error": "Low disk space", - "disk_usage": "{} used", - "disk_total": "{} total · {}", - "gb": "{} GB", - "mb": "{} MB", - "kb": "{} KB", - "extend_volume_button": "Extend volume", - "extending_volume_title": "Extending volume", - "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", - "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner. Server will be rebooted after resizing.", - "extending_volume_error": "Couldn't initialize volume extending.", - "size": "Size", - "euro": "Euro", - "data_migration_title": "Data migration", - "data_migration_notice": "During migration all services will be turned off.", - "start_migration_button": "Start migration", - "migration_process": "Migrating...", - "migration_done": "Finish" + "resource_chart": { + "month": "Month", + "day": "Day", + "hour": "Hour", + "cpu_title": "CPU Usage", + "network_title": "Network Usage", + "in": "In", + "out": "Out" + }, + "server": { + "card_title": "Server", + "description": "All your services live here", + "general_information": "General information", + "resource_usage": "Resource usage", + "allow_autoupgrade": "Allow auto-upgrade", + "allow_autoupgrade_hint": "Allow automatic packages upgrades on server", + "reboot_after_upgrade": "Reboot after upgrade", + "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", + "server_timezone": "Server timezone", + "select_timezone": "Select timezone", + "server_id": "Server ID", + "status": "Status", + "cpu": "CPU", + "ram": "Memory", + "disk": "Disk local", + "monthly_cost": "Monthly cost", + "location": "Location", + "core_count": { + "one": "{} core", + "other": "{} cores" } }, + "record": { + "root": "Root domain", + "api": "SelfPrivacy API", + "cloud": "File cloud", + "git": "Git server", + "meet": "Video conference", + "social": "Social network", + "password": "Password manager", + "vpn": "VPN", + "mx": "MX record", + "dmarc": "DMARC record", + "spf": "SPF record", + "dkim": "DKIM key" + }, + "domain": { + "card_title": "Domain", + "screen_title": "Domain and DNS", + "ok": "Records are OK", + "error": "Problems found", + "error_subtitle": "Tap here to fix them", + "refreshing": "Refreshing status...", + "uninitialized": "Data is not retrieved yet", + "services_title": "Services", + "services_subtitle": "Type “A” records required for each service.", + "email_title": "Email", + "email_subtitle": "Records necessary for secure email exchange." + }, + "backup": { + "card_title": "Backup", + "description": "Will save your day in case of incident: hackers attack, server deletion, etc.", + "reupload_key": "Force reupload key", + "reuploaded_key": "Key reuploaded", + "initialize": "Initialize", + "waiting_for_rebuild": "You will be able to create your first backup in a few minutes.", + "restore": "Restore from backup", + "no_backups": "There are no backups yet", + "create_new": "Create a new backup", + "creating": "Creating a new backup: {}%", + "restoring": "Restoring from backup", + "error_pending": "Server returned error, check it below", + "restore_alert": "You are about to restore from backup created on {}. All current data will be lost. Are you sure?", + "refresh": "Refresh status", + "refetch_backups": "Refetch backup list", + "refetching_list": "In a few minutes list will be updated" + }, + "storage": { + "card_title": "Server Storage", + "status_ok": "Disk usage is OK", + "status_error": "Low disk space", + "disk_usage": "{} used", + "disk_total": "{} total · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "extend_volume_button": "Extend volume", + "extending_volume_title": "Extending volume", + "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", + "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner. Server will be rebooted after resizing.", + "extending_volume_error": "Couldn't initialize volume extending.", + "size": "Size", + "euro": "Euro", + "data_migration_title": "Data migration", + "data_migration_notice": "During migration all services will be turned off.", + "start_migration_button": "Start migration", + "migration_process": "Migrating...", + "migration_done": "Finish" + }, "not_ready_card": { - "_comment": "Card shown when user skips initial setup", - "1": "Please finish application setup using ", - "2": "@:more.configuration_wizard", - "3": " for further work", + "begin": "Please finish application setup using ", + "insertion": "@:more.configuration_wizard", + "end": " for further work", "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." }, - "services": { - "_comment": "Services", - "title": "Your personal, private and independent services.", - "service_page": { - "open_in_browser": "Open in browser", - "restart": "Restart service", - "disable": "Disable service", - "enable": "Enable service", - "move": "Move to another volume", - "uses": "Uses {usage} on {volume}" - }, - "mail": { - "title": "E-Mail", - "subtitle": "E-Mail for company and family.", - "login_info": "Use username and password from users tab. IMAP port is 143 with STARTTLS, SMTP port is 587 with STARTTLS.", - "bottom_sheet": { - "1": "To connect to the mailserver, please use {} domain alongside with username and password, that you created. Also feel free to invite", - "2": "new users" - } - }, - "messenger": { - "title": "Messenger", - "subtitle": "Telegram or Signal not so private as Delta.Chat that uses your private server.", - "login_info": "Use the same username and password as for e-mail.", - "bottom_sheet": { - "1": "For connection, please use {} domain and credentials that you created." - } - }, - "password_manager": { - "title": "Password Manager", - "subtitle": "Base of your security. Bitwarden will help you to create, store and move passwords between devices, as well as input them, when requested using autocompletion.", - "login_info": "You will have to create an account on the website.", - "bottom_sheet": { - "1": "You can connect to the service and create a user via this link:" - } - }, - "video": { - "title": "Videomeet", - "subtitle": "Zoom and Google Meet are good, but Jitsi Meet is a worth alternative that also gives you confidence that you're not being listened.", - "login_info": "No account needed.", - "bottom_sheet": { - "1": "Using Jitsi as simple as just visiting this link:" - } - }, - "cloud": { - "title": "Cloud Storage", - "subtitle": "Do not allow cloud services to read your data by using NextCloud.", - "login_info": "Login is admin, password is the same as with your main user. Create new accounts in Nextcloud interface.", - "bottom_sheet": { - "1": "You can connect and create a new user here:" - } - }, - "social_network": { - "title": "Social Network", - "subtitle": "It's hard to believe, but it became possible to create your own social network, with your own rules and target audience.", - "login_info": "You will have to create an account on the website.", - "bottom_sheet": { - "1": "You can connect and create new social user here:" - } - }, - "git": { - "title": "Git Server", - "subtitle": "Private alternative to the Github, that belongs to you, but not a Microsoft.", - "login_info": "You will have to create an account on the website. First user will become an admin.", - "bottom_sheet": { - "1": "You can connect and create a new user here:" - } - }, - "vpn": { - "title": "VPN Server", - "subtitle": "Private VPN server", - "bottom_sheet": { - "1": "Openconnect VPN Server. Engine for secure and scalable VPN infrastructure" - } - }, - "page": { - "up_and_running": "Up and running", - "resource_usage": "Resource usage", - "disk_used": "{} of disk space used", - "users": "Users", - "controlled_by": "Controlled by {}", - "apps": "Apps", - "settings": "Settings and maintenance" - } + "service_page": { + "open_in_browser": "Open in browser", + "restart": "Restart service", + "disable": "Disable service", + "enable": "Enable service", + "move": "Move to another volume", + "uses": "Uses {usage} on {volume}" + }, + "mail": { + "title": "E-Mail", + "subtitle": "E-Mail for company and family.", + "login_info": "Use username and password from users tab. IMAP port is 143 with STARTTLS, SMTP port is 587 with STARTTLS." + }, + "password_manager": { + "title": "Password Manager", + "subtitle": "Base of your security. Bitwarden will help you to create, store and move passwords between devices, as well as input them, when requested using autocompletion.", + "login_info": "You will have to create an account on the website." + }, + "video": { + "title": "Videomeet", + "subtitle": "Zoom and Google Meet are good, but Jitsi Meet is a worth alternative that also gives you confidence that you're not being listened.", + "login_info": "No account needed." + }, + "cloud": { + "title": "Cloud Storage", + "subtitle": "Do not allow cloud services to read your data by using NextCloud.", + "login_info": "Login is admin, password is the same as with your main user. Create new accounts in Nextcloud interface." + }, + "social_network": { + "title": "Social Network", + "subtitle": "It's hard to believe, but it became possible to create your own social network, with your own rules and target audience.", + "login_info": "You will have to create an account on the website." + }, + "git": { + "title": "Git Server", + "subtitle": "Private alternative to the Github, that belongs to you, but not a Microsoft.", + "login_info": "You will have to create an account on the website. First user will become an admin." + }, + "vpn": { + "title": "VPN Server", + "subtitle": "Private VPN server" }, "users": { - "_comment": "'Users' tab", "add_new_user": "Add a first user", "new_user": "New user", "delete_user": "Delete user", "not_ready": "Please connect server, domain and DNS in the Providers tab, to be able to add a first user", "nobody_here": "Nobody here", "login": "Login", - "onboarding": "Onboarding", - "console": "Console", "new_user_info_note": "New user will automatically be granted an access to all of the services", "delete_confirm_question": "Are you sure?", "reset_password": "Reset password", @@ -327,38 +247,34 @@ "could_not_delete_user": "Couldn't delete user", "could_not_add_ssh_key": "Couldn't add SSH key", "email_login": "Email login", - "no_sso_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." + "no_ssh_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." }, "initializing": { - "_comment": "initializing page", - "1": "Connect a server", - "2": "A place where your data and SelfPrivacy services will reside:", + "connect_to_server": "Connect a server", + "place_where_data": "A place where your data and SelfPrivacy services will reside:", "how": "How to obtain API token", "hetzner_bad_key_error": "Hetzner API key is invalid", "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", - "3": "Connect CloudFlare", - "4": "To manage your domain's DNS", - "5": "CloudFlare API Token", - "6": "Connect Backblaze storage", - "7": "No connected domains at the moment", - "8": "Loading domains list", - "9": "Found more than one domain. For your own security, please be asked to delete unnecessary domains", - "10": "Save domain", + "connect_cloudflare": "Connect CloudFlare", + "manage_domain_dns": "To manage your domain's DNS", + "cloudflare_api_token": "CloudFlare API Token", + "connect_backblaze_storage": "Connect Backblaze storage", + "no_connected_domains": "No connected domains at the moment", + "loading_domain_list": "Loading domain list", + "found_more_domains": "Found more than one domain. For your own security, please be asked to delete unnecessary domains", + "save_domain": "Save domain", "final": "Final step", - "11": "Create server", + "create_server": "Create server", "what": "What does it mean?", - "13": "Server rebooted. Waiting for the last verification...", - "14": "Server started. It will be validated and rebooted now...", - "15": "Server created. DNS checks and server boot in progress...", - "16": "Until the next check: ", - "17": "Check", - "18": "How to obtain Hetzner API Token:'", - "19": "1 Go via this link ", - "20": "\n", - "21": "One more restart to apply your security certificates.", - "22": "Create master account", - "23": "Enter a nickname and strong password", + "server_rebooted": "Server rebooted. Waiting for the last verification...", + "server_started": "Server started. It will be validated and rebooted now...", + "server_created": "Server created. DNS checks and server boot in progress...", + "until_the_next_check": "Until the next check: ", + "check": "Check", + "one_more_restart": "One more restart to apply your security certificates.", + "create_master_account": "Create master account", + "enter_nickname_and_password": "Enter a nickname and strong password", "finish": "Everything is initialized", "checks": "Checks have been completed \n{} out of {}" }, @@ -451,19 +367,16 @@ "generation_error": "Couldn't generate a recovery key. {}" }, "modals": { - "_comment": "messages in modals", - "1": "Server with such name, already exist.", - "1_1": "Unexpected error during placement from the provider side.", - "2": "Destroy server and create a new one?", - "2_2": "Try again?", - "3": "Are you sure?", - "4": "Purge all authentication keys?", - "5": "Yes, purge all my tokens", - "6": "Delete the server and volume?", - "7": "Yes", - "8": "Remove task", - "9": "Reboot", - "10": "You cannot use this API for domains with such TLD.", + "already_exists": "Such server already exists.", + "unexpected_error": "Unexpected error during placement from the provider side.", + "destroy_server": "Destroy the server and create a new one?", + "try_again": "Try again?", + "are_you_sure": "Are you sure?", + "purge_all_keys": "Purge all authentication keys?", + "purge_all_keys_confirm": "Yes, purge all my tokens", + "delete_server_volume": "Delete the server and volume?", + "reboot": "Reboot", + "you_cant_use_this_api": "You cannot use this API for domains with such TLD.", "yes": "Yes", "no": "No" }, @@ -471,27 +384,26 @@ "sec": "{} sec" }, "jobs": { - "_comment": "Jobs list", "title": "Jobs list", "start": "Start", "empty": "No jobs", - "createUser": "Create user", - "deleteUser": "Delete user", - "serviceTurnOff": "Turn off", - "serviceTurnOn": "Turn on", - "jobAdded": "Job added", - "runJobs": "Run jobs", - "rebootSuccess": "Server is rebooting", - "rebootFailed": "Couldn't reboot the server. Check the app logs.", - "configPullFailed": "Failed to pull configuration upgrade. Started software upgrade anyways.", - "upgradeSuccess": "Server upgrade started", - "upgradeFailed": "Failed to upgrade server", - "upgradeServer": "Upgrade server", - "rebootServer": "Reboot server", + "create_user": "Create user", + "delete_user": "Delete user", + "service_turn_off": "Turn off", + "service_turn_on": "Turn on", + "job_added": "Job added", + "run_jobs": "Run jobs", + "reboot_success": "Server is rebooting", + "reboot_failed": "Couldn't reboot the server. Check the app logs.", + "config_pull_failed": "Failed to pull configuration upgrade. Started software upgrade anyways.", + "upgrade_success": "Server upgrade started", + "upgrade_failed": "Failed to upgrade server", + "upgrade_server": "Upgrade server", + "reboot_server": "Reboot server", "create_ssh_key": "Create SSH key for {}", "delete_ssh_key": "Delete SSH key for {}", "server_jobs": "Jobs on the server", - "resetUserPassword": "Reset password of user" + "reset_user_password": "Reset password of user" }, "validations": { "required": "Required.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index ce2d6231..8b33890b 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -2,9 +2,10 @@ "test": "ru-test", "locale": "ru", "basis": { - "_comment": "базовые элементы интерфейса", "providers": "Провайдеры", + "providers_title": "Ваш Дата Центр", "services": "Сервисы", + "services_title": "Ваши личные, приватные и независимые сервисы.", "users": "Пользователи", "more": "Ещё", "next": "Далее", @@ -29,41 +30,38 @@ "wait": "Загрузка", "remove": "Удалить", "apply": "Подать", - "done": "Готово" + "done": "Готово", + "continue": "Продолжить" }, - "more": { - "_comment": "вкладка ещё", + "more_page": { "configuration_wizard": "Мастер Подключения", "about_project": "О проекте SelfPrivacy", - "about_app": "О приложении", + "about_application": "О приложении", "onboarding": "Приветствие", "console": "Консоль", "create_ssh_key": "Создать ssh ключ", - "generate_key": "Сгенерировать ключ", - "generate_key_text": "Вы сможете сгенерировать ключ", - "remove": "Отключить", - "enable": "Включить", - "ok": "ok", - "continue": "Продолжить", - "ssh_key_exist_text": "У Вас уже есть сгенерированный ssh ключ", - "yes_delete": "Да, удалить", - "share": "Поделиться", - "copy_buffer": "Копировать в буфер", - "copied_ssh": "SSH ключ cкопирован в буфер", - "delete_ssh_text": "Удалить SSH ключ?", - "about_app_page": { - "application_version_text": "Версия приложения v.{}", - "api_version_text": "Версия API сервера v.{}" - }, - "settings": { - "title": "Настройки приложения", - "1": "Тёмная тема", - "2": "Сменить цветовую тему.", - "3": "Сброс настроек", - "4": "Сбросить API ключи а также root пользвателя.", - "5": "Удалить сервер", - "6": "Действие приведет к удалению сервера. После этого он будет недоступен." - } + "application_settings": "Настройки приложения" + }, + "console_page": { + "title": "Консоль", + "waiting": "Ждём инициализации..." + }, + "about_us_page": { + "title": "О проекте SelfPrivacy" + }, + "about_application_page": { + "title": "О приложении", + "application_version_text": "Версия приложения v.{}", + "api_version_text": "Версия API сервера v.{}" + }, + "application_settings": { + "title": "Настройки приложения", + "dark_theme_title": "Тёмная тема", + "dark_theme_description": "Сменить цветовую тему.", + "reset_config_title": "Сброс настроек", + "reset_config_description": "Сбросить API ключи а также root пользвателя.", + "delete_server_title": "Удалить сервер", + "delete_server_description": "Действие приведет к удалению сервера. После этого он будет недоступен." }, "ssh": { "title": "SSH ключи", @@ -73,285 +71,213 @@ "subtitle_with_keys": "Ключей: {}", "subtitle_without_keys": "Ключей нет", "no_key_name": "Безымянный ключ", - "root": { - "title": "Это ключи суперпользователя", - "subtitle": "Владельцы указанных здесь ключей получают полный доступ к данным и настройкам сервера. Добавляйте исключительно свои ключи." - }, + "root_title": "Это ключи суперпользователя", + "root_subtitle": "Владельцы указанных здесь ключей получают полный доступ к данным и настройкам сервера. Добавляйте исключительно свои ключи.", "input_label": "Публичный ED25519 или RSA ключ" }, "onboarding": { - "_comment": "страницы онбординга", "page1_title": "Цифровая независимость доступна каждому", "page1_text": "Почта, VPN, Мессенджер, социальная сеть и многое другое на Вашем личном сервере, под Вашим полным контролем.", "page2_title": "SelfPrivacy — это не облако, а Ваш личный дата-центр", "page2_text": "SelfPrivacy работает только с вашими сервис-провайдерами: Hetzner, Cloudflare, Backblaze. Если у Вас нет учётных записей, мы поможем их создать." }, - "providers": { - "_comment": "вкладка провайдеры", - "page_title": "Ваш Дата-центр", - "server": { - "card_title": "Сервер", - "status": "Статус — в норме", - "bottom_sheet": { - "1": "Это виртуальный компьютер на котором работают все Ваши сервисы.", - "2": "Общая информация", - "3": "Размещение" - }, - "chart": { - "month": "Месяц", - "day": "День", - "hour": "Час", - "cpu_title": "Использование процессора", - "network_title": "Использование сети", - "in": "Получено", - "out": "Отправлено" - }, - "settings": { - "allow_autoupgrade": "Разрешить авто-обноления", - "allow_autoupgrade_hint": "Разрешить автоматичесую установку обновлений на сервер", - "reboot_after_upgrade": "Перезагружать после обновлений", - "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", - "server_timezone": "Часовой пояс сервера", - "select_timezone": "Выберите часовой пояс" - }, - "info": { - "server_id": "ID сервера", - "status": "Статус", - "cpu": "Процессор", - "ram": "Операивная память", - "disk": "Диск", - "monthly_cost": "Ежемесячная стоимость", - "location": "Размещение", - "core_count": { - "one": "{} ядро", - "two": "{} ядра", - "few": "{} ядра", - "many": "{} ядер", - "other": "{} ядер" - } - } - }, - "domain": { - "card_title": "Домен", - "status": "Статус — в норме", - "bottom_sheet": { - "1": "Это ваш личный адрес в интернете, который будет указывать на сервер и другие ваши сервисы." - }, - "screen_title": "Домен и DNS", - "states": { - "ok": "Записи в норме", - "error": "Обнаружены проблемы", - "error_subtitle": "Нажмите здесь, чтобы исправить", - "refreshing": "Обновление данных...", - "uninitialized": "Данные ещё не получены" - }, - "record_description": { - "root": "Корневой домен", - "api": "SelfPrivacy API", - "cloud": "Файловое облако", - "git": "Git сервер", - "meet": "Видеоконференции", - "social": "Социальная сеть", - "password": "Менеджер паролей", - "vpn": "VPN", - "mx": "MX запись", - "dmarc": "DMARC запись", - "spf": "SPF запись", - "dkim": "DKIM ключ" - }, - "cards": { - "services": { - "title": "Сервисы", - "subtitle": "Записи типа “A” необходимые для работы сервисов." - }, - "email": { - "title": "Электронная почта", - "subtitle": "Записи необходимые для безопасного обмена электронной почтой." - } - } - }, - "backup": { - "card_title": "Резервное копирование", - "status": "Статус — в норме", - "bottom_sheet": { - "1": "Выручит Вас в любой ситуации: хакерская атака, удаление сервера и т.д.", - "2": "Использовано 3Gb из бесплатых 10Gb. Последнее копирование была сделано вчера в {}." - }, - "reuploadKey": "Принудительно обновить ключ", - "reuploadedKey": "Ключ на сервере обновлён", - "initialize": "Настроить", - "waitingForRebuild": "Через несколько минут можно будет создать первую копию.", - "restore": "Восстановить из копии", - "no_backups": "Резервных копий пока нет", - "create_new": "Создать новую копию", - "creating": "Создание копии: {}%", - "restoring": "Восстановление из копии", - "error_pending": "Сервер вернул ошибку: проверьте её ниже.", - "restore_alert": "Вы собираетесь восстановить из копии созданной {}. Все текущие данные будут потеряны. Вы уверены?", - "refresh": "Обновить статус", - "refetchBackups": "Обновить список копий", - "refetchingList": "Через несколько минут список будет обновлён" - }, - "storage": { - "card_title": "Хранилище", - "status_ok": "Проблем на диске не обнаружено", - "status_error": "Заканчивается место на диске", - "disk_usage": "{} использовано", - "disk_total": "{} всего · {}", - "gb": "{} GB", - "mb": "{} MB", - "kb": "{} KB", - "extend_volume_button": "Расширить хранилище", - "extending_volume_title": "Расширение хранилища", - "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", - "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner. Сервер будет перезагружен во время процесса.", - "extending_volume_error": "Не удалось начать расширение хранилища.", - "size": "Размер", - "euro": "Евро", - "data_migration_title": "Миграция данных", - "data_migration_notice": "На время миграции данных все сервисы будут выключены.", - "start_migration_button": "Начать миграцию", - "migration_process": "Мигрируем...", - "migration_done": "Завершить" + "resource_chart": { + "month": "Месяц", + "day": "День", + "hour": "Час", + "cpu_title": "Использование процессора", + "network_title": "Использование сети", + "in": "Получено", + "out": "Отправлено" + }, + "server": { + "card_title": "Сервер", + "description": "Это виртуальный компьютер на котором работают все Ваши сервисы.", + "general_information": "Общая информация", + "resource_usage": "Потребление ресурсов", + "allow_autoupgrade": "Разрешить авто-обноления", + "allow_autoupgrade_hint": "Разрешить автоматичесую установку обновлений на сервер", + "reboot_after_upgrade": "Перезагружать после обновлений", + "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", + "server_timezone": "Часовой пояс сервера", + "select_timezone": "Выберите часовой пояс", + "server_id": "ID сервера", + "status": "Статус", + "cpu": "Процессор", + "ram": "Оперативная память", + "disk": "Диск", + "monthly_cost": "Ежемесячная стоимость", + "location": "Размещение", + "core_count": { + "one": "{} ядро", + "two": "{} ядра", + "few": "{} ядра", + "many": "{} ядер", + "other": "{} ядер" } }, + "record": { + "root": "Корневой домен", + "api": "SelfPrivacy API", + "cloud": "Файловое облако", + "git": "Git сервер", + "meet": "Видеоконференции", + "social": "Социальная сеть", + "password": "Менеджер паролей", + "vpn": "VPN", + "mx": "MX запись", + "dmarc": "DMARC запись", + "spf": "SPF запись", + "dkim": "DKIM ключ" + }, + "domain": { + "card_title": "Домен", + "screen_title": "Домен и DNS", + "ok": "Записи в норме", + "error": "Обнаружены проблемы", + "error_subtitle": "Нажмите здесь, чтобы исправить", + "refreshing": "Обновление данных...", + "uninitialized": "Данные ещё не получены", + "services_title": "Сервисы", + "services_subtitle": "Записи типа “A” необходимые для работы сервисов.", + "email_title": "Электронная почта", + "email_subtitle": "Записи необходимые для безопасного обмена электронной почтой." + }, + "backup": { + "card_title": "Резервное копирование", + "description": "Выручит Вас в любой ситуации: хакерская атака, удаление сервера и т.д.", + "reupload_key": "Принудительно обновить ключ", + "reuploaded_key": "Ключ на сервере обновлён", + "initialize": "Настроить", + "waiting_for_rebuild": "Через несколько минут можно будет создать первую копию.", + "restore": "Восстановить из копии", + "no_backups": "Резервных копий пока нет", + "create_new": "Создать новую копию", + "creating": "Создание копии: {}%", + "restoring": "Восстановление из копии", + "error_pending": "Сервер вернул ошибку: проверьте её ниже.", + "restore_alert": "Вы собираетесь восстановить из копии созданной {}. Все текущие данные будут потеряны. Вы уверены?", + "refresh": "Обновить статус", + "refetch_backups": "Обновить список копий", + "refetching_list": "Через несколько минут список будет обновлён" + }, + "storage": { + "card_title": "Хранилище", + "status_ok": "Проблем на диске не обнаружено", + "status_error": "Заканчивается место на диске", + "disk_usage": "{} использовано", + "disk_total": "{} всего · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "extend_volume_button": "Расширить хранилище", + "extending_volume_title": "Расширение хранилища", + "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", + "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner. Сервер будет перезагружен во время процесса.", + "extending_volume_error": "Не удалось начать расширение хранилища.", + "size": "Размер", + "euro": "Евро", + "data_migration_title": "Миграция данных", + "data_migration_notice": "На время миграции данных все сервисы будут выключены.", + "start_migration_button": "Начать миграцию", + "migration_process": "Мигрируем...", + "migration_done": "Завершить" + }, "not_ready_card": { - "_comment": "Карточка показывающая когда человек скипнул настройку, на карте текст из 3 блоков, средний содержит ссыку на мастер подключения", - "1": "Завершите настройку приложения используя ", - "2": "@:more.configuration_wizard", - "3": " для продолжения работы", + "begin": "Завершите настройку приложения используя ", + "insertion": "@:more.configuration_wizard", + "end": " для продолжения работы", "in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения." }, - "services": { - "_comment": "Вкладка сервисы", - "title": "Ваши личные, приватные и независимые сервисы:", - "service_page": { - "open_in_browser": "Открыть в браузере", - "restart": "Перезапустить сервис", - "disable": "Выключить сервис", - "enable": "Включить сервис", - "move": "Переместить на другой диск", - "uses": "Использует {usage} на {volume}" - }, - "mail": { - "title": "Почта", - "subtitle": "Электронная почта для семьи или компании.", - "login_info": "Используйте логин и пароль из вкладки пользователей. IMAP порт: 143, STARTTLS. SMTP порт: 587, STARTTLS.", - "bottom_sheet": { - "1": "Для подключения почтового ящика используйте {} и профиль, который Вы создали. Так же приглашайте", - "2": "новых пользователей." - } - }, - "messenger": { - "title": "Мессенджер", - "subtitle": "Telegram и Signal не так приватны, как Delta.Chat — он использует Ваш личный сервер.", - "login_info": "Используйте те же логин и пароль, что и для почты.", - "bottom_sheet": { - "1": "Для подключения используйте {} и логин пароль, который Вы создали." - } - }, - "password_manager": { - "title": "Менеджер паролей", - "subtitle": "Это фундамент Вашей безопасности. Создавать, хранить, копировать пароли между устройствами и вбивать их в формы поможет Bitwarden.", - "login_info": "Аккаунт нужно создать на сайте.", - "bottom_sheet": { - "1": "Подключиться к серверу и создать пользователя можно по адресу:." - } - }, - "video": { - "title": "Видеоконференция", - "subtitle": "Jitsi meet — отличный аналог Zoom и Google meet который помимо удобства ещё и гарантирует Вам защищённые высококачественные видеоконференции.", - "login_info": "Аккаунт не требуется.", - "bottom_sheet": { - "1": "Для использования просто перейдите по ссылке:." - } - }, - "cloud": { - "title": "Файловое облако", - "subtitle": "Не позволяйте облачным сервисам просматривать ваши данные. Используйте NextCloud — надёжный дом для всех Ваших данных.", - "login_info": "Логин администратора: admin, пароль такой же как у основного пользователя. Создавайте новых пользователей в интерфейсе администратора NextCloud.", - "bottom_sheet": { - "1": "Подключиться к серверу и создать пользователя можно по адресу:." - } - }, - "social_network": { - "title": "Социальная сеть", - "subtitle": "Сложно поверить, но стало возможным создать свою собственную социальную сеть, со своими правилами и аудиторией.", - "login_info": "Аккаунт нужно создать на сайте.", - "bottom_sheet": { - "1": "Подключиться к серверу и создать пользователя можно по адресу:." - } - }, - "git": { - "title": "Git-сервер", - "subtitle": "Приватная альтернатива Github, которая принадлежит вам, а не Microsoft.", - "login_info": "Аккаунт нужно создать на сайте. Первый зарегистрированный пользователь становится администратором.", - "bottom_sheet": { - "1": "Подключиться к серверу и создать пользователя можно по адресу:." - } - }, - "vpn": { - "title": "VPN сервер", - "subtitle": "Закрытый VPN сервер", - "bottom_sheet": { - "1": "Создать подключиться к VPN-серверу. Движок для безопасной и масштабируемой инфраструктуры VPN" - } - }, - "page": { - "up_and_running": "Запущен и работает", - "resource_usage": "Потребление ресурсов", - "disk_used": "{} использовано места на диске", - "users": "Пользователи", - "controlled_by": "Контролируется {}", - "apps": "Приложения", - "settings": "Настройки" - } + "service_page": { + "open_in_browser": "Открыть в браузере", + "restart": "Перезапустить сервис", + "disable": "Выключить сервис", + "enable": "Включить сервис", + "move": "Переместить на другой диск", + "uses": "Использует {usage} на {volume}" + }, + "mail": { + "title": "Почта", + "subtitle": "Электронная почта для семьи или компании.", + "login_info": "Используйте логин и пароль из вкладки пользователей. IMAP порт: 143, STARTTLS. SMTP порт: 587, STARTTLS." + }, + "password_manager": { + "title": "Менеджер паролей", + "subtitle": "Это фундамент Вашей безопасности. Создавать, хранить, копировать пароли между устройствами и вбивать их в формы поможет Bitwarden.", + "login_info": "Аккаунт нужно создать на сайте." + }, + "video": { + "title": "Видеоконференция", + "subtitle": "Jitsi meet — отличный аналог Zoom и Google meet который помимо удобства ещё и гарантирует Вам защищённые высококачественные видеоконференции.", + "login_info": "Аккаунт не требуется." + }, + "cloud": { + "title": "Файловое облако", + "subtitle": "Не позволяйте облачным сервисам просматривать ваши данные. Используйте NextCloud — надёжный дом для всех Ваших данных.", + "login_info": "Логин администратора: admin, пароль такой же как у основного пользователя. Создавайте новых пользователей в интерфейсе администратора NextCloud." + }, + "social_network": { + "title": "Социальная сеть", + "subtitle": "Сложно поверить, но стало возможным создать свою собственную социальную сеть, со своими правилами и аудиторией.", + "login_info": "Аккаунт нужно создать на сайте." + }, + "git": { + "title": "Git-сервер", + "subtitle": "Приватная альтернатива Github, которая принадлежит вам, а не Microsoft.", + "login_info": "Аккаунт нужно создать на сайте. Первый зарегистрированный пользователь становится администратором." + }, + "vpn": { + "title": "VPN сервер", + "subtitle": "Закрытый VPN сервер" }, "users": { - "_comment": "'Users' tab", "add_new_user": "Добавьте первого пользователя.", "new_user": "Новый пользователь", + "delete_user": "Удалить пользователя", "not_ready": "Подключите сервер, домен и DNS в разделе Провайдеры чтобы добавить первого пользователя", "nobody_here": "Здесь будут отображаться пользователи.", "login": "Логин", - "onboarding": "Приветствие", - "console": "Консоль разработчика", "new_user_info_note": "Новый пользователь автоматически получит доступ ко всем сервисам.", "delete_confirm_question": "Вы действительно хотите удалить учетную запись?", "reset_password": "Сбросить пароль", "account": "Учетная запись", - "send_registration_data": "Поделиться реквизитами" + "send_registration_data": "Поделиться реквизитами", + "could_not_fetch_users": "Не удалось получить пользователей", + "could_not_fetch_description": "Проверьте интернет соединение и попробуйте снова", + "refresh_users": "Обновить список пользователей", + "could_not_create_user": "Не удалось создать пользователя", + "could_not_delete_user": "Не удалось стереть пользователя", + "could_not_add_ssh_key": "Не удалось создать SSH ключить", + "email_login": "Авторизация по Email", + "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." }, "initializing": { - "_comment": "initializing page", - "1": "Подключите сервер", - "2": "Здесь будут жить наши данные и SelfPrivacy-сервисы", + "connect_to_server": "Подключите сервер", + "place_where_data": "Здесь будут жить наши данные и SelfPrivacy-сервисы", "how": "Как получить API Token", "hetzner_bad_key_error": "Hetzner API ключ неверен", "cloudflare_bad_key_error": "Cloudflare API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", - "3": "Подключите CloudFlare", - "4": "Для управления DNS вашего домена", - "5": "CloudFlare API Token", - "6": "Подключите облачное хранилище Backblaze", - "7": "На данный момент подлюченных доменов нет", - "8": "Загружаем список доменов", - "9": "Найдено больше одного домена, для вашей безопастности, просим Вам удалить не нужные домены", - "10": "Сохранить домен", + "connect_cloudflare": "Подключите CloudFlare", + "manage_domain_dns": "Для управления DNS вашего домена", + "cloudflare_api_token": "CloudFlare API Token", + "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", + "no_connected_domains": "На данный момент подлюченных доменов нет", + "loading_domain_list": "Загружаем список доменов", + "found_more_domains": "Найдено больше одного домена, для вашей безопастности, просим Вам удалить не нужные домены", + "save_domain": "Сохранить домен", "final": "Последний шаг", - "11": "Создать сервер", + "create_server": "Создать сервер", "what": "Что это значит?", - "13": "Сервер презагружен, ждем последнюю проверку.", - "14": "Cервер запущен, сейчас он будет проверен и перезагружен.", - "15": "Cервер создан, идет проверка ДНС адресов и запуск сервера.", - "16": "До следующей проверки: ", - "17": "Проверка", - "18": "Как получить Hetzner API Token:'", - "19": "1 Переходим по ссылке ", - "20": "\n2 Заходим в созданный нами проект. Если такового нет - значит создаём.\n3 Наводим мышкой на боковую панель. Она должна раскрыться, показав нам пункты меню. Нас интересует последний — Security (с иконкой ключика).\n4 Далее, в верхней части интерфейса видим примерно такой список: SSH Keys, API Tokens, Certificates, Members. Нам нужен API Tokens. Переходим по нему.\n5 В правой части интерфейса, нас будет ожидать кнопка Generate API token. Если же Вы используете мобильную версию сайта - в нижнем правом углу Вы увидите красный плюсик. Нажимаем на эту кнопку.\n6 В поле Description даём нашему токену название (это может быть любое название, которое Вам нравиться, сути оно не меняет.", - "21": "Сейчас будет дополнительная перезагрузка для активации сертификатов безопастности", - "22": "Создайте главную учетную запись", - "23": "Введите никнейм и сложный пароль", + "server_rebooted": "Сервер презагружен, ждем последнюю проверку.", + "server_started": "Cервер запущен, сейчас он будет проверен и перезагружен.", + "server_created": "Cервер создан, идет проверка ДНС адресов и запуск сервера.", + "until_the_next_check": "До следующей проверки: ", + "check": "Проверка", + "one_more_restart": "Сейчас будет дополнительная перезагрузка для активации сертификатов безопастности", + "create_master_account": "Создайте главную учетную запись", + "enter_nickname_and_password": "Введите никнейм и сложный пароль", "finish": "Всё инициализировано.", "checks": "Проверок выполнено: \n{} / {}" }, @@ -444,19 +370,16 @@ "generation_error": "Не удалось сгенерировать ключ. {}" }, "modals": { - "_comment": "messages in modals", - "1": "Сервер с таким именем уже существует.", - "1.1": "Непредвиденная ошибка при создании со стороны провайдера.", - "2": "Уничтожить сервер и создать новый?", - "2.2": "Попробовать ещё раз?", - "3": "Подтвердите", - "4": "Сбросить все ключи?", - "5": "Да, сбросить", - "6": "Удалить сервер и диск?", - "7": "Да, удалить", - "8": "Удалить задачу", - "9": "Перезагрузить", - "10": "API не поддерживает домены с таким TLD.", + "already_exists": "Такой сервер уже существует.", + "unexpected_error": "Непредвиденная ошибка со стороны провайдера.", + "destroy_server": "Уничтожить сервер и создать новый?", + "try_again": "Попробовать ещё раз?", + "are_you_sure": "Вы уверены?", + "purge_all_keys": "Стереть все ключи авторизации?", + "purge_all_keys_confirm": "Да, стереть все ключи!", + "delete_server_volume": "Удалить сервер и хранилище?", + "reboot": "Перезагрузить", + "you_cant_use_this_api": "Нельзя использовать этот API для доменом с подобным TLD.", "yes": "Да", "no": "Нет" }, @@ -464,27 +387,26 @@ "sec": "{} сек" }, "jobs": { - "_comment": "Jobs list", "title": "Задачи", "start": "Начать выполенение", "empty": "Пусто.", - "createUser": "Создать пользователя", - "deleteUser": "Удалить пользователя", - "serviceTurnOff": "Остановить", - "serviceTurnOn": "Запустить", - "jobAdded": "Задача добавленна", - "runJobs": "Запустите задачи", - "rebootSuccess": "Сервер перезагружается", - "rebootFailed": "Не удалось перезагрузить сервер, проверьте логи", - "configPullFailed": "Не удалось обновить конфигурацию сервера. Обновление ПО запущено.", - "upgradeSuccess": "Запущено обновление сервера", - "upgradeFailed": "Обновить сервер не вышло", - "upgradeServer": "Обновить сервер", - "rebootServer": "Перезагрузить сервер", + "create_user": "Создать пользователя", + "delete_user": "Удалить пользователя", + "service_turn_off": "Остановить", + "service_turn_on": "Запустить", + "job_added": "Задача добавленна", + "run_jobs": "Запустите задачи", + "reboot_success": "Сервер перезагружается", + "reboot_failed": "Не удалось перезагрузить сервер, проверьте логи", + "config_pull_failed": "Не удалось обновить конфигурацию сервера. Обновление ПО запущено.", + "upgrade_success": "Запущено обновление сервера", + "upgrade_failed": "Обновить сервер не вышло", + "upgrade_server": "Обновить сервер", + "reboot_server": "Перезагрузить сервер", "create_ssh_key": "Создать SSH ключ для {}", "delete_ssh_key": "Удалить SSH ключ для {}", "server_jobs": "Задачи на сервере", - "resetUserPassword": "Сбросить пароль пользователя" + "reset_user_password": "Сбросить пароль пользователя" }, "validations": { "required": "Обязательное поле.", diff --git a/lib/logic/common_enum/common_enum.dart b/lib/logic/common_enum/common_enum.dart index 77c2fa82..b1d0b730 100644 --- a/lib/logic/common_enum/common_enum.dart +++ b/lib/logic/common_enum/common_enum.dart @@ -51,55 +51,55 @@ extension ServiceTypesExt on ServiceTypes { String get title { switch (this) { case ServiceTypes.mailserver: - return 'services.mail.title'.tr(); + return 'mail.title'.tr(); case ServiceTypes.bitwarden: - return 'services.password_manager.title'.tr(); + return 'password_manager.title'.tr(); case ServiceTypes.jitsi: - return 'services.video.title'.tr(); + return 'video.title'.tr(); case ServiceTypes.nextcloud: - return 'services.cloud.title'.tr(); + return 'cloud.title'.tr(); case ServiceTypes.pleroma: - return 'services.social_network.title'.tr(); + return 'social_network.title'.tr(); case ServiceTypes.gitea: - return 'services.git.title'.tr(); + return 'git.title'.tr(); case ServiceTypes.ocserv: - return 'services.vpn.title'.tr(); + return 'vpn.title'.tr(); } } String get subtitle { switch (this) { case ServiceTypes.mailserver: - return 'services.mail.subtitle'.tr(); + return 'mail.subtitle'.tr(); case ServiceTypes.bitwarden: - return 'services.password_manager.subtitle'.tr(); + return 'password_manager.subtitle'.tr(); case ServiceTypes.jitsi: - return 'services.video.subtitle'.tr(); + return 'video.subtitle'.tr(); case ServiceTypes.nextcloud: - return 'services.cloud.subtitle'.tr(); + return 'cloud.subtitle'.tr(); case ServiceTypes.pleroma: - return 'services.social_network.subtitle'.tr(); + return 'social_network.subtitle'.tr(); case ServiceTypes.gitea: - return 'services.git.subtitle'.tr(); + return 'git.subtitle'.tr(); case ServiceTypes.ocserv: - return 'services.vpn.subtitle'.tr(); + return 'vpn.subtitle'.tr(); } } String get loginInfo { switch (this) { case ServiceTypes.mailserver: - return 'services.mail.login_info'.tr(); + return 'mail.login_info'.tr(); case ServiceTypes.bitwarden: - return 'services.password_manager.login_info'.tr(); + return 'password_manager.login_info'.tr(); case ServiceTypes.jitsi: - return 'services.video.login_info'.tr(); + return 'video.login_info'.tr(); case ServiceTypes.nextcloud: - return 'services.cloud.login_info'.tr(); + return 'cloud.login_info'.tr(); case ServiceTypes.pleroma: - return 'services.social_network.login_info'.tr(); + return 'social_network.login_info'.tr(); case ServiceTypes.gitea: - return 'services.git.login_info'.tr(); + return 'git.login_info'.tr(); case ServiceTypes.ocserv: return ''; } diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index bb89bb49..084a2b47 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -135,7 +135,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { } else { await api.uploadBackblazeConfig(bucket); emit(state.copyWith(isInitialized: true, preventActions: false)); - getIt().showSnackBar('providers.backup.reuploadedKey'); + getIt().showSnackBar('backup.reuploaded_key'); } } @@ -173,8 +173,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future forceUpdateBackups() async { emit(state.copyWith(preventActions: true)); await api.forceBackupListReload(); - getIt() - .showSnackBar('providers.backup.refetchingList'.tr()); + getIt().showSnackBar('backup.refetching_list'.tr()); emit(state.copyWith(preventActions: false)); } diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index 4fa610cd..a6d23a23 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -30,7 +30,7 @@ class JobsCubit extends Cubit { newJobsList.addAll(jobsState.clientJobList); } newJobsList.add(job); - getIt().showSnackBar('jobs.jobAdded'.tr()); + getIt().showSnackBar('jobs.job_added'.tr()); emit(JobsStateWithJobs(newJobsList)); } @@ -53,7 +53,7 @@ class JobsCubit extends Cubit { removeJob(removingJob.id); } else { newJobsList.add(job); - getIt().showSnackBar('jobs.jobAdded'.tr()); + getIt().showSnackBar('jobs.job_added'.tr()); emit(JobsStateWithJobs(newJobsList)); } } @@ -67,7 +67,7 @@ class JobsCubit extends Cubit { newJobsList.any((final el) => el is CreateSSHKeyJob); if (!isExistInJobList) { newJobsList.add(job); - getIt().showSnackBar('jobs.jobAdded'.tr()); + getIt().showSnackBar('jobs.job_added'.tr()); emit(JobsStateWithJobs(newJobsList)); } } @@ -76,9 +76,9 @@ class JobsCubit extends Cubit { emit(JobsStateLoading()); final bool isSuccessful = await api.reboot(); if (isSuccessful) { - getIt().showSnackBar('jobs.rebootSuccess'.tr()); + getIt().showSnackBar('jobs.reboot_success'.tr()); } else { - getIt().showSnackBar('jobs.rebootFailed'.tr()); + getIt().showSnackBar('jobs.reboot_failed'.tr()); } emit(JobsStateEmpty()); } @@ -89,12 +89,12 @@ class JobsCubit extends Cubit { final bool isSuccessful = await api.upgrade(); if (isSuccessful) { if (!isPullSuccessful) { - getIt().showSnackBar('jobs.configPullFailed'.tr()); + getIt().showSnackBar('jobs.config_pull_failed'.tr()); } else { - getIt().showSnackBar('jobs.upgradeSuccess'.tr()); + getIt().showSnackBar('jobs.upgrade_success'.tr()); } } else { - getIt().showSnackBar('jobs.upgradeFailed'.tr()); + getIt().showSnackBar('jobs.upgrade_failed'.tr()); } emit(JobsStateEmpty()); } diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 93ff3db8..b6d503aa 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -51,8 +51,7 @@ class DnsRecordsCubit _getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey); final List foundRecords = []; for (final DesiredDnsRecord record in desiredRecords) { - if (record.description == - 'providers.domain.record_description.dkim') { + if (record.description == 'record.dkim') { final DnsRecord foundRecord = records.firstWhere( (final r) => r.name == record.name && r.type == record.type, orElse: () => DnsRecord( @@ -146,61 +145,61 @@ class DnsRecordsCubit DesiredDnsRecord( name: domainName, content: ipAddress, - description: 'providers.domain.record_description.root', + description: 'record.root', ), DesiredDnsRecord( name: 'api.$domainName', content: ipAddress, - description: 'providers.domain.record_description.api', + description: 'record.api', ), DesiredDnsRecord( name: 'cloud.$domainName', content: ipAddress, - description: 'providers.domain.record_description.cloud', + description: 'record.cloud', ), DesiredDnsRecord( name: 'git.$domainName', content: ipAddress, - description: 'providers.domain.record_description.git', + description: 'record.git', ), DesiredDnsRecord( name: 'meet.$domainName', content: ipAddress, - description: 'providers.domain.record_description.meet', + description: 'record.meet', ), DesiredDnsRecord( name: 'social.$domainName', content: ipAddress, - description: 'providers.domain.record_description.social', + description: 'record.social', ), DesiredDnsRecord( name: 'password.$domainName', content: ipAddress, - description: 'providers.domain.record_description.password', + description: 'record.password', ), DesiredDnsRecord( name: 'vpn.$domainName', content: ipAddress, - description: 'providers.domain.record_description.vpn', + description: 'record.vpn', ), DesiredDnsRecord( name: domainName, content: domainName, - description: 'providers.domain.record_description.mx', + description: 'record.mx', type: 'MX', category: DnsRecordsCategory.email, ), DesiredDnsRecord( name: '_dmarc.$domainName', content: 'v=DMARC1; p=none', - description: 'providers.domain.record_description.dmarc', + description: 'record.dmarc', type: 'TXT', category: DnsRecordsCategory.email, ), DesiredDnsRecord( name: domainName, content: 'v=spf1 a mx ip4:$ipAddress -all', - description: 'providers.domain.record_description.spf', + description: 'record.spf', type: 'TXT', category: DnsRecordsCategory.email, ), @@ -208,7 +207,7 @@ class DnsRecordsCubit DesiredDnsRecord( name: 'selector._domainkey.$domainName', content: dkimPublicKey, - description: 'providers.domain.record_description.dkim', + description: 'record.dkim', type: 'TXT', category: DnsRecordsCategory.email, ), diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 6a1c7d16..b0500452 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -86,7 +86,7 @@ class ApiProviderVolumeCubit if (!resized) { getIt().showSnackBar( - 'providers.storage.extending_volume_error'.tr(), + 'storage.extending_volume_error'.tr(), ); emit(state.copyWith(isResizing: false)); return false; diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 76089229..c941b9d1 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -250,8 +250,8 @@ class ServerInstallationRepository { final NavigationService nav = getIt.get(); nav.showPopUpDialog( BrandAlert( - title: 'modals.1'.tr(), - contentText: 'modals.2'.tr(), + title: 'modals.already_exists'.tr(), + contentText: 'modals.destroy_server'.tr(), actions: [ ActionButton( text: 'basis.delete'.tr(), @@ -291,11 +291,11 @@ class ServerInstallationRepository { final NavigationService nav = getIt.get(); nav.showPopUpDialog( BrandAlert( - title: 'modals.1_1'.tr(), - contentText: 'modals.2_2'.tr(), + title: 'modals.unexpected_error'.tr(), + contentText: 'modals.try_again'.tr(), actions: [ ActionButton( - text: 'modals.7'.tr(), + text: 'modals.yes'.tr(), isRed: true, onPressed: () async { ServerHostingDetails? serverDetails; @@ -353,9 +353,9 @@ class ServerInstallationRepository { nav.showPopUpDialog( BrandAlert( title: e.response!.data['errors'][0]['code'] == 1038 - ? 'modals.10'.tr() - : 'providers.domain.states.error'.tr(), - contentText: 'modals.6'.tr(), + ? 'modals.you_cant_use_this_api'.tr() + : 'domain.states.error'.tr(), + contentText: 'modals.delete_server_volume'.tr(), actions: [ ActionButton( text: 'basis.delete'.tr(), diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index 9fe18b7d..44c6bc35 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -28,11 +28,11 @@ class DiskSize { if (byte < 1024) { return '${byte.toStringAsFixed(0)} ${tr('bytes')}'; } else if (byte < 1024 * 1024) { - return 'providers.storage.kb'.tr(args: [kibibyte.toStringAsFixed(1)]); + return 'storage.kb'.tr(args: [kibibyte.toStringAsFixed(1)]); } else if (byte < 1024 * 1024 * 1024) { - return 'providers.storage.mb'.tr(args: [mebibyte.toStringAsFixed(1)]); + return 'storage.mb'.tr(args: [mebibyte.toStringAsFixed(1)]); } else { - return 'providers.storage.gb'.tr(args: [gibibyte.toStringAsFixed(1)]); + return 'storage.gb'.tr(args: [gibibyte.toStringAsFixed(1)]); } } } diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index 1dc1bd91..c3748daa 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -30,7 +30,7 @@ class RebuildServerJob extends ClientJob { class CreateUserJob extends ClientJob { CreateUserJob({ required this.user, - }) : super(title: '${"jobs.createUser".tr()} ${user.login}'); + }) : super(title: '${"jobs.create_user".tr()} ${user.login}'); final User user; @@ -41,7 +41,7 @@ class CreateUserJob extends ClientJob { class ResetUserPasswordJob extends ClientJob { ResetUserPasswordJob({ required this.user, - }) : super(title: '${"jobs.resetUserPassword".tr()} ${user.login}'); + }) : super(title: '${"jobs.reset_user_password".tr()} ${user.login}'); final User user; @@ -52,7 +52,7 @@ class ResetUserPasswordJob extends ClientJob { class DeleteUserJob extends ClientJob { DeleteUserJob({ required this.user, - }) : super(title: '${"jobs.deleteUser".tr()} ${user.login}'); + }) : super(title: '${"jobs.delete_user".tr()} ${user.login}'); final User user; @@ -78,7 +78,7 @@ class ServiceToggleJob extends ToggleJob { required this.needToTurnOn, }) : super( title: - '${needToTurnOn ? "jobs.serviceTurnOn".tr() : "jobs.serviceTurnOff".tr()} ${type.title}', + '${needToTurnOn ? "jobs.service_turn_on".tr() : "jobs.service_turn_off".tr()} ${type.title}', ); final bool needToTurnOn; diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index 877770dc..c49ceccf 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -43,7 +43,7 @@ class JobsContent extends StatelessWidget { const SizedBox(height: 80), BrandButton.rised( onPressed: () => context.read().upgradeServer(), - text: 'jobs.upgradeServer'.tr(), + text: 'jobs.upgrade_server'.tr(), ), const SizedBox(height: 10), BrandButton.text( @@ -51,8 +51,8 @@ class JobsContent extends StatelessWidget { final NavigationService nav = getIt(); nav.showPopUpDialog( BrandAlert( - title: 'jobs.rebootServer'.tr(), - contentText: 'modals.3'.tr(), + title: 'jobs.reboot_server'.tr(), + contentText: 'modals.are_you_sure'.tr(), actions: [ ActionButton( text: 'basis.cancel'.tr(), @@ -60,13 +60,13 @@ class JobsContent extends StatelessWidget { ActionButton( onPressed: () => {context.read().rebootServer()}, - text: 'modals.9'.tr(), + text: 'modals.reboot'.tr(), ) ], ), ); }, - title: 'jobs.rebootServer'.tr(), + title: 'jobs.reboot_server'.tr(), ), ]; } diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index 49947c1b..faa23381 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -19,7 +19,7 @@ class NotReadyCard extends StatelessWidget { text: TextSpan( children: [ TextSpan( - text: 'not_ready_card.1'.tr(), + text: 'not_ready_card.begin'.tr(), style: const TextStyle(color: BrandColors.white), ), WidgetSpan( @@ -32,7 +32,7 @@ class NotReadyCard extends StatelessWidget { ), ), child: Text( - 'not_ready_card.2'.tr(), + 'not_ready_card.insertion'.tr(), style: body1Style.copyWith( color: Colors.white, fontWeight: FontWeight.bold, @@ -44,7 +44,7 @@ class NotReadyCard extends StatelessWidget { ), ), TextSpan( - text: 'not_ready_card.3'.tr(), + text: 'not_ready_card.end'.tr(), style: const TextStyle(color: BrandColors.white), ), ], diff --git a/lib/ui/components/storage_list_items/server_storage_list_item.dart b/lib/ui/components/storage_list_items/server_storage_list_item.dart index 1cc07572..8c675685 100644 --- a/lib/ui/components/storage_list_items/server_storage_list_item.dart +++ b/lib/ui/components/storage_list_items/server_storage_list_item.dart @@ -17,12 +17,12 @@ class ServerStorageListItem extends StatelessWidget { @override Widget build(final BuildContext context) => ConsumptionListItem( - title: 'providers.storage.disk_usage'.tr( + title: 'storage.disk_usage'.tr( args: [ volume.sizeUsed.toString(), ], ), - subtitle: 'providers.storage.disk_total'.tr( + subtitle: 'storage.disk_total'.tr( args: [ volume.sizeTotal.toString(), volume.displayName, diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index b3635d3f..8936f59e 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -46,8 +46,8 @@ class _BackupDetailsState extends State return BrandHeroScreen( heroIcon: BrandIcons.save, - heroTitle: 'providers.backup.card_title'.tr(), - heroSubtitle: 'providers.backup.bottom_sheet.1'.tr(), + heroTitle: 'backup.card_title'.tr(), + heroSubtitle: 'backup.description'.tr(), children: [ if (isReady && !isBackupInitialized) BrandButton.rised( @@ -56,10 +56,10 @@ class _BackupDetailsState extends State : () async { await context.read().createBucket(); }, - text: 'providers.backup.initialize'.tr(), + text: 'backup.initialize'.tr(), ), if (backupStatus == BackupStatusEnum.initializing) - BrandText.body1('providers.backup.waitingForRebuild'.tr()), + BrandText.body1('backup.waiting_for_rebuild'.tr()), if (backupStatus != BackupStatusEnum.initializing && backupStatus != BackupStatusEnum.noKey) OutlinedCard( @@ -77,14 +77,14 @@ class _BackupDetailsState extends State Icons.add_circle_outline_rounded, ), title: Text( - 'providers.backup.create_new'.tr(), + 'backup.create_new'.tr(), style: Theme.of(context).textTheme.headline6, ), ), if (backupStatus == BackupStatusEnum.backingUp) ListTile( title: Text( - 'providers.backup.creating'.tr( + 'backup.creating'.tr( args: [(backupProgress * 100).round().toString()], ), style: Theme.of(context).textTheme.headline6, @@ -97,7 +97,7 @@ class _BackupDetailsState extends State if (backupStatus == BackupStatusEnum.restoring) ListTile( title: Text( - 'providers.backup.restoring'.tr( + 'backup.restoring'.tr( args: [(backupProgress * 100).round().toString()], ), style: Theme.of(context).textTheme.headline6, @@ -113,7 +113,7 @@ class _BackupDetailsState extends State color: Theme.of(context).colorScheme.error, ), title: Text( - 'providers.backup.error_pending'.tr(), + 'backup.error_pending'.tr(), style: Theme.of(context).textTheme.headline6, ), ), @@ -135,7 +135,7 @@ class _BackupDetailsState extends State Icons.refresh, ), title: Text( - 'providers.backup.restore'.tr(), + 'backup.restore'.tr(), style: Theme.of(context).textTheme.headline6, ), ), @@ -147,7 +147,7 @@ class _BackupDetailsState extends State leading: const Icon( Icons.error_outline, ), - title: Text('providers.backup.no_backups'.tr()), + title: Text('backup.no_backups'.tr()), ), if (backups.isNotEmpty) Column( @@ -161,10 +161,8 @@ class _BackupDetailsState extends State getIt(); nav.showPopUpDialog( BrandAlert( - title: - 'providers.backup.restoring'.tr(), - contentText: - 'providers.backup.restore_alert'.tr( + title: 'backup.restoring'.tr(), + contentText: 'backup.restore_alert'.tr( args: [backup.time.toString()], ), actions: [ @@ -200,7 +198,7 @@ class _BackupDetailsState extends State children: [ ListTile( title: Text( - 'providers.backup.refresh'.tr(), + 'backup.refresh'.tr(), ), onTap: refreshing ? null @@ -215,7 +213,7 @@ class _BackupDetailsState extends State ), ListTile( title: Text( - 'providers.backup.refetchBackups'.tr(), + 'backup.refetch_backups'.tr(), ), onTap: preventActions ? null @@ -230,7 +228,7 @@ class _BackupDetailsState extends State ), ListTile( title: Text( - 'providers.backup.reuploadKey'.tr(), + 'backup.reupload_key'.tr(), ), onTap: preventActions ? null diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 5a3d0dfd..5a93a53e 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -28,7 +28,7 @@ class _DnsDetailsPageState extends State { bool isError = false; switch (dnsState) { case DnsRecordsStatus.uninitialized: - description = 'providers.domain.states.uninitialized'.tr(); + description = 'domain.states.uninitialized'.tr(); icon = const Icon( Icons.refresh, size: 24.0, @@ -36,7 +36,7 @@ class _DnsDetailsPageState extends State { isError = false; break; case DnsRecordsStatus.refreshing: - description = 'providers.domain.states.refreshing'.tr(); + description = 'domain.states.refreshing'.tr(); icon = const Icon( Icons.refresh, size: 24.0, @@ -44,7 +44,7 @@ class _DnsDetailsPageState extends State { isError = false; break; case DnsRecordsStatus.good: - description = 'providers.domain.states.ok'.tr(); + description = 'domain.states.ok'.tr(); icon = const Icon( Icons.check_circle_outline, size: 24.0, @@ -52,8 +52,8 @@ class _DnsDetailsPageState extends State { isError = false; break; case DnsRecordsStatus.error: - description = 'providers.domain.states.error'.tr(); - subtitle = 'providers.domain.states.error_subtitle'.tr(); + description = 'domain.states.error'.tr(); + subtitle = 'domain.states.error_subtitle'.tr(); icon = const Icon( Icons.error_outline, size: 24.0, @@ -93,7 +93,7 @@ class _DnsDetailsPageState extends State { hasBackButton: true, headerTitle: '', heroIcon: BrandIcons.globe, - heroTitle: 'providers.domain.screen_title'.tr(), + heroTitle: 'domain.screen_title'.tr(), heroSubtitle: 'not_ready_card.in_menu'.tr(), children: const [], ); @@ -107,7 +107,7 @@ class _DnsDetailsPageState extends State { hasBackButton: true, heroSubtitle: domain, heroIcon: BrandIcons.globe, - heroTitle: 'providers.domain.screen_title'.tr(), + heroTitle: 'domain.screen_title'.tr(), children: [ _getStateCard(dnsCubit.dnsState, () { context.read().fix(); @@ -115,13 +115,13 @@ class _DnsDetailsPageState extends State { const SizedBox(height: 16.0), ListTile( title: Text( - 'providers.domain.cards.services.title'.tr(), + 'domain.services_title'.tr(), style: Theme.of(context).textTheme.headlineSmall!.copyWith( color: Theme.of(context).colorScheme.secondary, ), ), subtitle: Text( - 'providers.domain.cards.services.subtitle'.tr(), + 'domain.services_subtitle'.tr(), style: Theme.of(context).textTheme.labelMedium, ), ), @@ -160,13 +160,13 @@ class _DnsDetailsPageState extends State { const SizedBox(height: 16.0), ListTile( title: Text( - 'providers.domain.cards.email.title'.tr(), + 'domain.email_title'.tr(), style: Theme.of(context).textTheme.headlineSmall!.copyWith( color: Theme.of(context).colorScheme.secondary, ), ), subtitle: Text( - 'providers.domain.cards.email.subtitle'.tr(), + 'domain.email_subtitle'.tr(), style: Theme.of(context).textTheme.labelMedium, ), ), diff --git a/lib/ui/pages/more/info/info.dart b/lib/ui/pages/more/about_application.dart similarity index 83% rename from lib/ui/pages/more/info/info.dart rename to lib/ui/pages/more/about_application.dart index 8d2526d6..664dce3e 100644 --- a/lib/ui/pages/more/info/info.dart +++ b/lib/ui/pages/more/about_application.dart @@ -6,16 +6,17 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:package_info/package_info.dart'; import 'package:easy_localization/easy_localization.dart'; -class InfoPage extends StatelessWidget { - const InfoPage({final super.key}); +class AboutApplicationPage extends StatelessWidget { + const AboutApplicationPage({final super.key}); @override Widget build(final BuildContext context) => SafeArea( child: Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(52), - child: - BrandHeader(title: 'more.about_app'.tr(), hasBackButton: true), + child: BrandHeader( + title: 'about_application_page.title'.tr(), + hasBackButton: true), ), body: ListView( padding: paddingH15V0, @@ -24,14 +25,14 @@ class InfoPage extends StatelessWidget { FutureBuilder( future: _packageVersion(), builder: (final context, final snapshot) => BrandText.body1( - 'more.about_app_page.application_version_text' + 'about_application_page.application_version_text' .tr(args: [snapshot.data.toString()]), ), ), FutureBuilder( future: _apiVersion(), builder: (final context, final snapshot) => BrandText.body1( - 'more.about_app_page.api_version_text' + 'about_application_page.api_version_text' .tr(args: [snapshot.data.toString()]), ), ), diff --git a/lib/ui/pages/more/about/about.dart b/lib/ui/pages/more/about_us.dart similarity index 85% rename from lib/ui/pages/more/about/about.dart rename to lib/ui/pages/more/about_us.dart index 15a7db13..4061c2bb 100644 --- a/lib/ui/pages/more/about/about.dart +++ b/lib/ui/pages/more/about_us.dart @@ -4,8 +4,8 @@ import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; -class AboutPage extends StatelessWidget { - const AboutPage({final super.key}); +class AboutUsPage extends StatelessWidget { + const AboutUsPage({final super.key}); @override Widget build(final BuildContext context) => SafeArea( @@ -13,7 +13,7 @@ class AboutPage extends StatelessWidget { appBar: PreferredSize( preferredSize: const Size.fromHeight(52), child: BrandHeader( - title: 'more.about_project'.tr(), + title: 'about_us_page.title'.tr(), hasBackButton: true, ), ), diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart index 47e2e1a8..abbfd0ee 100644 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ b/lib/ui/pages/more/app_settings/app_setting.dart @@ -30,7 +30,7 @@ class _AppSettingsPageState extends State { appBar: PreferredSize( preferredSize: const Size.fromHeight(52), child: BrandHeader( - title: 'more.settings.title'.tr(), + title: 'application_settings.title'.tr(), hasBackButton: true, ), ), @@ -46,8 +46,9 @@ class _AppSettingsPageState extends State { children: [ Flexible( child: _TextColumn( - title: 'more.settings.1'.tr(), - value: 'more.settings.2'.tr(), + title: 'application_settings.dark_theme_title'.tr(), + value: + 'application_settings.dark_theme_description'.tr(), hasWarning: false, ), ), @@ -70,8 +71,9 @@ class _AppSettingsPageState extends State { children: [ Flexible( child: _TextColumn( - title: 'more.settings.3'.tr(), - value: 'more.settings.4'.tr(), + title: 'application_settings.reset_config_title'.tr(), + value: 'application_settings.reset_config_description' + .tr(), hasWarning: false, ), ), @@ -91,11 +93,11 @@ class _AppSettingsPageState extends State { showDialog( context: context, builder: (final _) => BrandAlert( - title: 'modals.3'.tr(), - contentText: 'modals.4'.tr(), + title: 'modals.are_you_sure'.tr(), + contentText: 'modals.purge_all_keys'.tr(), actions: [ ActionButton( - text: 'modals.5'.tr(), + text: 'modals.purge_all_keys_confirm'.tr(), isRed: true, onPressed: () { context @@ -135,8 +137,8 @@ class _AppSettingsPageState extends State { children: [ Flexible( child: _TextColumn( - title: 'more.settings.5'.tr(), - value: 'more.settings.6'.tr(), + title: 'application_settings.delete_server_title'.tr(), + value: 'application_settings.delete_server_description'.tr(), hasWarning: false, ), ), @@ -151,11 +153,11 @@ class _AppSettingsPageState extends State { showDialog( context: context, builder: (final _) => BrandAlert( - title: 'modals.3'.tr(), - contentText: 'modals.6'.tr(), + title: 'modals.are_you_sure'.tr(), + contentText: 'modals.delete_server_volume'.tr(), actions: [ ActionButton( - text: 'modals.7'.tr(), + text: 'modals.yes'.tr(), isRed: true, onPressed: () async { showDialog( diff --git a/lib/ui/pages/more/console/console.dart b/lib/ui/pages/more/console.dart similarity index 89% rename from lib/ui/pages/more/console/console.dart rename to lib/ui/pages/more/console.dart index e3951013..81c387f1 100644 --- a/lib/ui/pages/more/console/console.dart +++ b/lib/ui/pages/more/console.dart @@ -1,5 +1,6 @@ import 'dart:collection'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/get_it_config.dart'; @@ -35,8 +36,11 @@ class _ConsoleState extends State { appBar: PreferredSize( preferredSize: const Size.fromHeight(53), child: Column( - children: const [ - BrandHeader(title: 'Console', hasBackButton: true) + children: [ + BrandHeader( + title: 'console_page.title'.tr(), + hasBackButton: true, + ), ], ), ), @@ -90,12 +94,12 @@ class _ConsoleState extends State { return Column( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.min, - children: const [ - Text('Waiting for initialisation'), - SizedBox( + children: [ + Text('console_page.waiting'.tr()), + const SizedBox( height: 16, ), - CircularProgressIndicator(), + const CircularProgressIndicator(), ], ); } diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index bc0468b0..5d487717 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -17,10 +17,10 @@ import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/ui/pages/users/users.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; -import 'package:selfprivacy/ui/pages/more/about/about.dart'; +import 'package:selfprivacy/ui/pages/more/about_us.dart'; import 'package:selfprivacy/ui/pages/more/app_settings/app_setting.dart'; -import 'package:selfprivacy/ui/pages/more/console/console.dart'; -import 'package:selfprivacy/ui/pages/more/info/info.dart'; +import 'package:selfprivacy/ui/pages/more/console.dart'; +import 'package:selfprivacy/ui/pages/more/about_application.dart'; class MorePage extends StatelessWidget { const MorePage({final super.key}); @@ -48,7 +48,7 @@ class MorePage extends StatelessWidget { children: [ if (isReady && usesBinds != null && !usesBinds) _MoreMenuItem( - title: 'providers.storage.start_migration_button'.tr(), + title: 'storage.start_migration_button'.tr(), iconData: Icons.drive_file_move_outline, goTo: ServicesMigrationPage( diskStatus: context @@ -70,12 +70,12 @@ class MorePage extends StatelessWidget { .toList(), isMigration: true, ), - subtitle: 'providers.storage.data_migration_notice'.tr(), + subtitle: 'storage.data_migration_notice'.tr(), accent: true, ), if (!isReady) _MoreMenuItem( - title: 'more.configuration_wizard'.tr(), + title: 'more_page.configuration_wizard'.tr(), iconData: Icons.change_history_outlined, goTo: const InitializingPage(), subtitle: 'not_ready_card.in_menu'.tr(), @@ -83,7 +83,7 @@ class MorePage extends StatelessWidget { ), if (isReady) _MoreMenuItem( - title: 'more.create_ssh_key'.tr(), + title: 'more_page.create_ssh_key'.tr(), iconData: Ionicons.key_outline, goTo: const UserDetails( login: 'root', @@ -102,28 +102,28 @@ class MorePage extends StatelessWidget { title: 'devices.main_screen.header'.tr(), ), _MoreMenuItem( - title: 'more.settings.title'.tr(), + title: 'more_page.application_settings'.tr(), iconData: Icons.settings_outlined, goTo: const AppSettingsPage(), ), _MoreMenuItem( - title: 'more.about_project'.tr(), + title: 'more_page.about_project'.tr(), iconData: BrandIcons.engineer, - goTo: const AboutPage(), + goTo: const AboutUsPage(), ), _MoreMenuItem( - title: 'more.about_app'.tr(), + title: 'more_page.about_application'.tr(), iconData: BrandIcons.fire, - goTo: const InfoPage(), + goTo: const AboutApplicationPage(), ), if (!isReady) _MoreMenuItem( - title: 'more.onboarding'.tr(), + title: 'more_page.onboarding'.tr(), iconData: BrandIcons.start, goTo: const OnboardingPage(nextPage: RootPage()), ), _MoreMenuItem( - title: 'more.console'.tr(), + title: 'more_page.console'.tr(), iconData: BrandIcons.terminal, goTo: const Console(), ), diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 8b06751b..988b609a 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -64,7 +64,7 @@ class _ProvidersPageState extends State { appBar: PreferredSize( preferredSize: const Size.fromHeight(52), child: BrandHeader( - title: 'providers.page_title'.tr(), + title: 'basis.providers_title'.tr(), ), ), body: ListView( @@ -77,10 +77,10 @@ class _ProvidersPageState extends State { _Card( state: getServerStatus(), icon: BrandIcons.server, - title: 'providers.server.card_title'.tr(), + title: 'server.card_title'.tr(), subtitle: diskStatus.isDiskOkay - ? 'providers.storage.status_ok'.tr() - : 'providers.storage.status_error'.tr(), + ? 'storage.status_ok'.tr() + : 'storage.status_error'.tr(), onTap: () => Navigator.of(context) .push(materialRoute(const ServerDetailsScreen())), ), @@ -88,7 +88,7 @@ class _ProvidersPageState extends State { _Card( state: getDnsStatus(), icon: BrandIcons.globe, - title: 'providers.domain.screen_title'.tr(), + title: 'domain.screen_title'.tr(), subtitle: appConfig.isDomainSelected ? appConfig.serverDomain!.domainName : '', @@ -106,10 +106,8 @@ class _ProvidersPageState extends State { ? StateType.stable : StateType.uninitialized, icon: BrandIcons.save, - title: 'providers.backup.card_title'.tr(), - subtitle: isBackupInitialized - ? 'providers.backup.card_subtitle'.tr() - : '', + title: 'backup.card_title'.tr(), + subtitle: isBackupInitialized ? 'backup.card_subtitle'.tr() : '', onTap: () => Navigator.of(context) .push(materialRoute(const BackupDetails())), ), diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index 60dfc092..3a3eb5a7 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -17,7 +17,7 @@ class _Chart extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'providers.server.chart.cpu_title'.tr(), + 'resource_chart.cpu_title'.tr(), style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Theme.of(context).colorScheme.onSurfaceVariant, ), @@ -50,7 +50,7 @@ class _Chart extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - 'providers.server.chart.network_title'.tr(), + 'resource_chart.network_title'.tr(), style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Theme.of(context).colorScheme.onSurfaceVariant, @@ -59,12 +59,12 @@ class _Chart extends StatelessWidget { const Spacer(), Legend( color: Theme.of(context).colorScheme.primary, - text: 'providers.server.chart.in'.tr(), + text: 'resource_chart.in'.tr(), ), const SizedBox(width: 5), Legend( color: Theme.of(context).colorScheme.tertiary, - text: 'providers.server.chart.out'.tr(), + text: 'resource_chart.out'.tr(), ), ], ), @@ -111,9 +111,9 @@ class _Chart extends StatelessWidget { } }, titles: [ - 'providers.server.chart.month'.tr(), - 'providers.server.chart.day'.tr(), - 'providers.server.chart.hour'.tr() + 'resource_chart.month'.tr(), + 'resource_chart.day'.tr(), + 'resource_chart.hour'.tr() ], ), const SizedBox(height: 8), diff --git a/lib/ui/pages/server_details/charts/network_charts.dart b/lib/ui/pages/server_details/charts/network_charts.dart index 7487fd32..43a092f2 100644 --- a/lib/ui/pages/server_details/charts/network_charts.dart +++ b/lib/ui/pages/server_details/charts/network_charts.dart @@ -51,7 +51,7 @@ class NetworkChart extends StatelessWidget { res.add( LineTooltipItem( - '${timeShown ? '' : DateFormat('HH:mm dd.MM.yyyy').format(date)} ${spot.barIndex == 0 ? 'providers.server.chart.in'.tr() : 'providers.server.chart.out'.tr()} ${DiskSize(byte: value.toInt()).toString()}', + '${timeShown ? '' : DateFormat('HH:mm dd.MM.yyyy').format(date)} ${spot.barIndex == 0 ? 'resource_chart.in'.tr() : 'resource_chart.out'.tr()} ${DiskSize(byte: value.toInt()).toString()}', TextStyle( color: Theme.of(context).colorScheme.onSurface, fontWeight: FontWeight.bold, diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 24675dad..d1eada36 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -70,7 +70,7 @@ class _ServerDetailsScreenState extends State if (!isReady) { return BrandHeroScreen( heroIcon: BrandIcons.server, - heroTitle: 'providers.server.card_title'.tr(), + heroTitle: 'server.card_title'.tr(), heroSubtitle: 'not_ready_card.in_menu'.tr(), children: const [], ); @@ -80,8 +80,8 @@ class _ServerDetailsScreenState extends State create: (final context) => context.read()..check(), child: BrandHeroScreen( heroIcon: BrandIcons.server, - heroTitle: 'providers.server.card_title'.tr(), - heroSubtitle: 'providers.server.bottom_sheet.1'.tr(), + heroTitle: 'server.card_title'.tr(), + heroSubtitle: 'server.description'.tr(), children: [ StorageCard( diskStatus: context.watch().state.diskStatus, @@ -90,7 +90,7 @@ class _ServerDetailsScreenState extends State const _ServerSettings(), const Divider(height: 32), Text( - 'providers.server.resource_usage'.tr(), + 'server.resource_usage'.tr(), style: Theme.of(context).textTheme.titleLarge, ), const SizedBox(height: 8), diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index 38c7133b..f669dce0 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -34,7 +34,7 @@ class _ServerSettingsState extends State<_ServerSettings> { onChanged: (final switched) { if (didSomethingChange == false) { context.read().addJob( - RebuildServerJob(title: 'jobs.upgradeServer'.tr()), + RebuildServerJob(title: 'jobs.upgrade_server'.tr()), ); } context @@ -51,9 +51,9 @@ class _ServerSettingsState extends State<_ServerSettings> { didSomethingChange = true; }); }, - title: Text('providers.server.settings.allow_autoupgrade'.tr()), + title: Text('server.allow_autoupgrade'.tr()), subtitle: Text( - 'providers.server.settings.allow_autoupgrade_hint'.tr(), + 'server.allow_autoupgrade_hint'.tr(), ), activeColor: Theme.of(context).colorScheme.primary, ), @@ -62,7 +62,7 @@ class _ServerSettingsState extends State<_ServerSettings> { onChanged: (final switched) { if (didSomethingChange == false) { context.read().addJob( - RebuildServerJob(title: 'jobs.upgradeServer'.tr()), + RebuildServerJob(title: 'jobs.upgrade_server'.tr()), ); } context @@ -79,21 +79,21 @@ class _ServerSettingsState extends State<_ServerSettings> { didSomethingChange = true; }); }, - title: Text('providers.server.settings.reboot_after_upgrade'.tr()), + title: Text('server.reboot_after_upgrade'.tr()), subtitle: Text( - 'providers.server.settings.reboot_after_upgrade_hint'.tr(), + 'server.reboot_after_upgrade_hint'.tr(), ), activeColor: Theme.of(context).colorScheme.primary, ), ListTile( - title: Text('providers.server.settings.server_timezone'.tr()), + title: Text('server.server_timezone'.tr()), subtitle: Text( serverDetailsState.serverTimezone.toString(), ), onTap: () { if (didSomethingChange == false) { context.read().addJob( - RebuildServerJob(title: 'jobs.upgradeServer'.tr()), + RebuildServerJob(title: 'jobs.upgrade_server'.tr()), ); } setState(() { diff --git a/lib/ui/pages/server_details/text_details.dart b/lib/ui/pages/server_details/text_details.dart index f512e917..e9b3c0f7 100644 --- a/lib/ui/pages/server_details/text_details.dart +++ b/lib/ui/pages/server_details/text_details.dart @@ -18,7 +18,7 @@ class _TextDetails extends StatelessWidget { Padding( padding: const EdgeInsets.all(16.0), child: Text( - 'providers.server.bottom_sheet.2'.tr(), + 'server.general_information'.tr(), style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Theme.of(context).colorScheme.onSurfaceVariant, ), @@ -27,34 +27,33 @@ class _TextDetails extends StatelessWidget { ListTileOnSurfaceVariant( leadingIcon: Icons.numbers_outlined, title: data.id.toString(), - subtitle: 'providers.server.info.server_id'.tr(), + subtitle: 'server.server_id'.tr(), ), ListTileOnSurfaceVariant( leadingIcon: Icons.mode_standby_outlined, title: data.status.toString().split('.')[1].capitalize(), - subtitle: 'providers.server.info.status'.tr(), + subtitle: 'server.status'.tr(), ), ListTileOnSurfaceVariant( leadingIcon: Icons.memory_outlined, - title: 'providers.server.info.core_count' - .plural(data.serverType.cores), - subtitle: 'providers.server.info.cpu'.tr(), + title: 'server.core_count'.plural(data.serverType.cores), + subtitle: 'server.cpu'.tr(), ), ListTileOnSurfaceVariant( leadingIcon: Icons.memory_outlined, title: '${data.serverType.memory.toString()} GB', - subtitle: 'providers.server.info.ram'.tr(), + subtitle: 'server.ram'.tr(), ), ListTileOnSurfaceVariant( leadingIcon: Icons.euro_outlined, title: data.serverType.prices[1].monthly.toStringAsFixed(2), - subtitle: 'providers.server.info.monthly_cost'.tr(), + subtitle: 'server.monthly_cost'.tr(), ), // Server location ListTileOnSurfaceVariant( leadingIcon: Icons.location_on_outlined, title: '${data.location.city}, ${data.location.country}', - subtitle: 'providers.server.info.location'.tr(), + subtitle: 'server.location'.tr(), ), ], ), diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index fa652a58..1711a59b 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -50,7 +50,7 @@ class _SelectTimezoneState extends State { appBar: PreferredSize( preferredSize: const Size.fromHeight(52), child: BrandHeader( - title: 'providers.server.settings.select_timezone'.tr(), + title: 'server.select_timezone'.tr(), hasBackButton: true, ), ), diff --git a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index a63748c6..cfe3fcb5 100644 --- a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -53,7 +53,7 @@ class _MigrationProcessPageState extends State { if (job.finishedAt != null) const SizedBox(height: 16), if (job.finishedAt != null) FilledButton( - title: 'providers.storage.migration_done'.tr(), + title: 'storage.migration_done'.tr(), onPressed: () { Navigator.of(context).pushAndRemoveUntil( materialRoute(const RootPage()), @@ -65,7 +65,7 @@ class _MigrationProcessPageState extends State { } return BrandHeroScreen( hasBackButton: false, - heroTitle: 'providers.storage.migration_process'.tr(), + heroTitle: 'storage.migration_process'.tr(), heroSubtitle: subtitle, children: [ BrandLinearIndicator( diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index 9783a479..750bbf80 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -100,7 +100,7 @@ class _ServicesMigrationPageState extends State { child: Column( children: [ BrandHeader( - title: 'providers.storage.data_migration_title'.tr(), + title: 'storage.data_migration_title'.tr(), hasBackButton: true, ), Padding( @@ -158,13 +158,13 @@ class _ServicesMigrationPageState extends State { Padding( padding: const EdgeInsets.all(8.0), child: InfoBox( - text: 'providers.storage.data_migration_notice'.tr(), + text: 'storage.data_migration_notice'.tr(), isWarning: true, ), ), const SizedBox(height: 16), FilledButton( - title: 'providers.storage.start_migration_button'.tr(), + title: 'storage.start_migration_button'.tr(), onPressed: () { if (widget.isMigration) { context.read().migrateToBinds( diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 1c8980e2..e465c2b2 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -57,9 +57,8 @@ class _ExtendingVolumePageState extends State { if (!snapshot.hasData) { return BrandHeroScreen( hasBackButton: true, - heroTitle: 'providers.storage.extending_volume_title'.tr(), - heroSubtitle: - 'providers.storage.extending_volume_description'.tr(), + heroTitle: 'storage.extending_volume_title'.tr(), + heroSubtitle: 'storage.extending_volume_description'.tr(), children: const [ SizedBox(height: 16), Center( @@ -84,8 +83,8 @@ class _ExtendingVolumePageState extends State { return BrandHeroScreen( hasBackButton: true, - heroTitle: 'providers.storage.extending_volume_title'.tr(), - heroSubtitle: 'providers.storage.extending_volume_description'.tr(), + heroTitle: 'storage.extending_volume_title'.tr(), + heroSubtitle: 'storage.extending_volume_description'.tr(), children: [ const SizedBox(height: 16), Row( @@ -104,7 +103,7 @@ class _ExtendingVolumePageState extends State { decoration: InputDecoration( border: const OutlineInputBorder(), errorText: _isError ? ' ' : null, - labelText: 'providers.storage.size'.tr(), + labelText: 'storage.size'.tr(), ), ), ), @@ -120,7 +119,7 @@ class _ExtendingVolumePageState extends State { decoration: InputDecoration( border: const OutlineInputBorder(), errorText: _isError ? ' ' : null, - labelText: 'providers.storage.euro'.tr(), + labelText: 'storage.euro'.tr(), ), ), ), @@ -140,7 +139,7 @@ class _ExtendingVolumePageState extends State { ), const SizedBox(height: 16), FilledButton( - title: 'providers.storage.extend_volume_button.title'.tr(), + title: 'storage.extend_volume_button.title'.tr(), onPressed: _isError ? null : () { @@ -169,7 +168,7 @@ class _ExtendingVolumePageState extends State { ), ), const SizedBox(height: 16), - Text('providers.storage.extending_volume_price_info'.tr()), + Text('storage.extending_volume_price_info'.tr()), const SizedBox(height: 16), ], ); diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 9a83789a..16b027ac 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -32,14 +32,14 @@ class _ServerStoragePageState extends State { if (!isReady) { return BrandHeroScreen( hasBackButton: true, - heroTitle: 'providers.storage.card_title'.tr(), + heroTitle: 'storage.card_title'.tr(), children: const [], ); } return BrandHeroScreen( hasBackButton: true, - heroTitle: 'providers.storage.card_title'.tr(), + heroTitle: 'storage.card_title'.tr(), children: [ // ...sections, ...widget.diskStatus.diskVolumes @@ -101,7 +101,7 @@ class ServerStorageSection extends StatelessWidget { if (volume.isResizable) ...[ const SizedBox(height: 16), BrandOutlinedButton( - title: 'providers.storage.extend_volume_button.title'.tr(), + title: 'storage.extend_volume_button.title'.tr(), onPressed: () => Navigator.of(context).push( materialRoute( ExtendingVolumePage( diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index 33b742a2..a18e4f86 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -65,14 +65,14 @@ class StorageCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'providers.storage.card_title'.tr(), + 'storage.card_title'.tr(), style: Theme.of(context).textTheme.titleLarge, ), if (state != StateType.uninitialized) Text( diskStatus.isDiskOkay - ? 'providers.storage.status_ok'.tr() - : 'providers.storage.status_error'.tr(), + ? 'storage.status_ok'.tr() + : 'storage.status_error'.tr(), style: Theme.of(context).textTheme.bodyLarge, ), ], diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 417f1bf2..f592aceb 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -74,7 +74,7 @@ class _ServicePageState extends State { onTap: () => _launchURL(service.url), leading: const Icon(Icons.open_in_browser), title: Text( - 'services.service_page.open_in_browser'.tr(), + 'service_page.open_in_browser'.tr(), style: Theme.of(context).textTheme.titleMedium, ), subtitle: Text( @@ -92,7 +92,7 @@ class _ServicePageState extends State { }, leading: const Icon(Icons.restart_alt_outlined), title: Text( - 'services.service_page.restart'.tr(), + 'service_page.restart'.tr(), style: Theme.of(context).textTheme.titleMedium, ), enabled: !serviceDisabled && !serviceLocked, @@ -110,8 +110,8 @@ class _ServicePageState extends State { leading: const Icon(Icons.power_settings_new), title: Text( serviceDisabled - ? 'services.service_page.enable'.tr() - : 'services.service_page.disable'.tr(), + ? 'service_page.enable'.tr() + : 'service_page.disable'.tr(), style: Theme.of(context).textTheme.titleMedium, ), enabled: !serviceLocked, @@ -132,11 +132,11 @@ class _ServicePageState extends State { ), leading: const Icon(Icons.drive_file_move_outlined), title: Text( - 'services.service_page.move'.tr(), + 'service_page.move'.tr(), style: Theme.of(context).textTheme.titleMedium, ), subtitle: Text( - 'services.service_page.uses'.tr( + 'service_page.uses'.tr( namedArgs: { 'usage': service.storageUsage.used.toString(), 'volume': context diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index d638866a..4909af13 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -67,7 +67,7 @@ class _ServicesPageState extends State { child: ListView( padding: paddingH15V0, children: [ - BrandText.body1('services.title'.tr()), + BrandText.body1('basis.services_title'.tr()), const SizedBox(height: 24), if (!isReady) ...[const NotReadyCard(), const SizedBox(height: 24)], ...ServiceTypes.values @@ -218,7 +218,7 @@ class _Card extends StatelessWidget { sigmaY: 2, ), child: BrandText.h2( - 'jobs.runJobs'.tr(), + 'jobs.run_jobs'.tr(), textAlign: TextAlign.center, ), ), diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 1764b576..ff4c0748 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -154,9 +154,9 @@ class InitializingPage extends StatelessWidget { width: 150, ), const SizedBox(height: 10), - BrandText.h2('initializing.1'.tr()), + BrandText.h2('initializing.connect_to_server'.tr()), const SizedBox(height: 10), - BrandText.body2('initializing.2'.tr()), + BrandText.body2('initializing.place_where_data'.tr()), const Spacer(), CubitFormTextField( formFieldCubit: context.read().apiKey, @@ -211,16 +211,16 @@ class InitializingPage extends StatelessWidget { width: 150, ), const SizedBox(height: 10), - BrandText.h2('initializing.3'.tr()), + BrandText.h2('initializing.connect_cloudflare'.tr()), const SizedBox(height: 10), - BrandText.body2('initializing.4'.tr()), + BrandText.body2('initializing.manage_domain_dns'.tr()), const Spacer(), CubitFormTextField( formFieldCubit: context.read().apiKey, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), decoration: InputDecoration( - hintText: 'initializing.5'.tr(), + hintText: 'initializing.cloudflare_api_token'.tr(), ), ), const Spacer(), @@ -260,7 +260,7 @@ class InitializingPage extends StatelessWidget { height: 50, ), const SizedBox(height: 10), - BrandText.h2('initializing.6'.tr()), + BrandText.h2('initializing.connect_backblaze_storage'.tr()), const SizedBox(height: 10), const Spacer(), CubitFormTextField( @@ -321,16 +321,17 @@ class InitializingPage extends StatelessWidget { const SizedBox(height: 30), BrandText.h2('basis.domain'.tr()), const SizedBox(height: 10), - if (state is Empty) BrandText.body2('initializing.7'.tr()), + if (state is Empty) + BrandText.body2('initializing.no_connected_domains'.tr()), if (state is Loading) BrandText.body2( state.type == LoadingTypes.loadingDomain - ? 'initializing.8'.tr() + ? 'initializing.loading_domain_list'.tr() : 'basis.saving'.tr(), ), if (state is MoreThenOne) BrandText.body2( - 'initializing.9'.tr(), + 'initializing.found_more_domains'.tr(), ), if (state is Loaded) ...[ const SizedBox(height: 10), @@ -387,7 +388,7 @@ class InitializingPage extends StatelessWidget { BrandButton.rised( onPressed: () => context.read().saveDomain(), - text: 'initializing.10'.tr(), + text: 'initializing.save_domain'.tr(), ), ], const SizedBox( @@ -411,9 +412,10 @@ class InitializingPage extends StatelessWidget { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - BrandText.h2('initializing.22'.tr()), + BrandText.h2('initializing.create_master_account'.tr()), const SizedBox(height: 10), - BrandText.body2('initializing.23'.tr()), + BrandText.body2( + 'initializing.enter_nickname_and_password'.tr()), const Spacer(), CubitFormTextField( formFieldCubit: context.read().userName, @@ -477,12 +479,14 @@ class InitializingPage extends StatelessWidget { const Spacer(flex: 2), BrandText.h2('initializing.final'.tr()), const SizedBox(height: 10), - BrandText.body2('initializing.11'.tr()), + BrandText.body2('initializing.create_server'.tr()), const Spacer(), BrandButton.rised( onPressed: isLoading ? null : appConfigCubit.createServerAndSetDnsRecords, - text: isLoading ? 'basis.loading'.tr() : 'initializing.11'.tr(), + text: isLoading + ? 'basis.loading'.tr() + : 'initializing.create_server'.tr(), ), ], ), @@ -498,16 +502,16 @@ class InitializingPage extends StatelessWidget { late int doneCount; late String? text; if (state.isServerResetedSecondTime) { - text = 'initializing.13'.tr(); + text = 'initializing.server_rebooted'.tr(); doneCount = 3; } else if (state.isServerResetedFirstTime) { - text = 'initializing.21'.tr(); + text = 'initializing.one_more_restart'.tr(); doneCount = 2; } else if (state.isServerStarted) { - text = 'initializing.14'.tr(); + text = 'initializing.server_started'.tr(); doneCount = 1; } else if (state.isServerCreated) { - text = 'initializing.15'.tr(); + text = 'initializing.server_created'.tr(); doneCount = 0; } return Builder( @@ -542,14 +546,14 @@ class InitializingPage extends StatelessWidget { if (!state.isLoading) Row( children: [ - BrandText.body2('initializing.16'.tr()), + BrandText.body2('initializing.until_the_next_check'.tr()), BrandTimer( startDateTime: state.timerStart!, duration: state.duration!, ) ], ), - if (state.isLoading) BrandText.body2('initializing.17'.tr()), + if (state.isLoading) BrandText.body2('initializing.check'.tr()), ], ), ); diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index a9f37b19..e32cac5d 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -73,7 +73,7 @@ class RecoverByNewDeviceKeyInput extends StatelessWidget { ), const SizedBox(height: 16), FilledButton( - title: 'more.continue'.tr(), + title: 'basis.continue'.tr(), onPressed: formCubitState.isSubmitting ? null : () => diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index e3507a0e..10a6c279 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -83,7 +83,7 @@ class RecoverByOldToken extends StatelessWidget { ), const SizedBox(height: 16), FilledButton( - title: 'more.continue'.tr(), + title: 'basis.continue'.tr(), onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index f729524e..e17a9436 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -44,7 +44,7 @@ class RecoverByRecoveryKey extends StatelessWidget { ), const SizedBox(height: 16), FilledButton( - title: 'more.continue'.tr(), + title: 'basis.continue'.tr(), onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index b7891bc1..46db75b7 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -38,7 +38,7 @@ class RecoveryConfirmCloudflare extends StatelessWidget { formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), - labelText: 'initializing.5'.tr(), + labelText: 'initializing.cloudflare_api_token'.tr(), ), ), const SizedBox(height: 16), diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart index 5ee461a7..84be9808 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart @@ -45,7 +45,7 @@ class RecoveryHetznerConnected extends StatelessWidget { ), const SizedBox(height: 16), FilledButton( - title: 'more.continue'.tr(), + title: 'basis.continue'.tr(), onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 3c375ef0..028b8618 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -127,7 +127,7 @@ class SelectDomainToRecover extends StatelessWidget { ), const SizedBox(height: 16), FilledButton( - title: 'more.continue'.tr(), + title: 'basis.continue'.tr(), onPressed: formCubitState.isSubmitting ? null : () => diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 86a9e3d7..e3cfc21f 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -25,8 +25,8 @@ class UserDetails extends StatelessWidget { if (user.type == UserType.root) { return BrandHeroScreen( hasBackButton: true, - heroTitle: 'ssh.root.title'.tr(), - heroSubtitle: 'ssh.root.subtitle'.tr(), + heroTitle: 'ssh.root_title'.tr(), + heroSubtitle: 'ssh.root_subtitle'.tr(), children: [ _SshKeysCard(user: user), ], @@ -64,7 +64,7 @@ class UserDetails extends StatelessWidget { Padding( padding: const EdgeInsets.all(16.0), child: InfoBox( - text: 'users.no_sso_notice'.tr(), + text: 'users.no_ssh_notice'.tr(), isWarning: true, ), ), From c1cba41b7bae94acb3bb3a8c52aa9de8410b1f1d Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Oct 2022 11:05:26 +0300 Subject: [PATCH 198/732] fix(i18l): Un-hardcode service status descriptions --- assets/translations/en.json | 11 ++++++- lib/ui/pages/services/service_page.dart | 42 ++++++++++++------------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index bee29120..1af2fa0a 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -192,7 +192,16 @@ "disable": "Disable service", "enable": "Enable service", "move": "Move to another volume", - "uses": "Uses {usage} on {volume}" + "uses": "Uses {usage} on {volume}", + "status": { + "active": "Up and running", + "inactive": "Stopped", + "failed": "Failed to start", + "off": "Disabled", + "activating": "Activating", + "deactivating": "Deactivating", + "reloading": "Restarting" + } }, "mail": { "title": "E-Mail", diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index f592aceb..ad398072 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -188,79 +188,79 @@ class ServiceStatusCard extends StatelessWidget { Widget build(final BuildContext context) { switch (status) { case ServiceStatus.active: - return const FilledCard( + return FilledCard( child: ListTile( - leading: Icon( + leading: const Icon( Icons.check_circle_outline, size: 24, ), - title: Text('Up and running'), + title: Text('service_page.status.active'.tr()), ), ); case ServiceStatus.inactive: - return const FilledCard( + return FilledCard( tertiary: true, child: ListTile( - leading: Icon( + leading: const Icon( Icons.stop_circle_outlined, size: 24, ), - title: Text('Stopped'), + title: Text('service_page.status.inactive'.tr()), ), ); case ServiceStatus.failed: - return const FilledCard( + return FilledCard( error: true, child: ListTile( - leading: Icon( + leading: const Icon( Icons.error_outline, size: 24, ), - title: Text('Failed to start'), + title: Text('service_page.status.failed'.tr()), ), ); case ServiceStatus.off: - return const FilledCard( + return FilledCard( tertiary: true, child: ListTile( - leading: Icon( + leading: const Icon( Icons.power_settings_new, size: 24, ), - title: Text('Disabled'), + title: Text('service_page.status.off'.tr()), ), ); case ServiceStatus.activating: - return const FilledCard( + return FilledCard( tertiary: true, child: ListTile( - leading: Icon( + leading: const Icon( Icons.restart_alt_outlined, size: 24, ), - title: Text('Activating'), + title: Text('service_page.status.activating'.tr()), ), ); case ServiceStatus.deactivating: - return const FilledCard( + return FilledCard( tertiary: true, child: ListTile( - leading: Icon( + leading: const Icon( Icons.restart_alt_outlined, size: 24, ), - title: Text('Deactivating'), + title: Text('service_page.status.deactivating'.tr()), ), ); case ServiceStatus.reloading: - return const FilledCard( + return FilledCard( tertiary: true, child: ListTile( - leading: Icon( + leading: const Icon( Icons.restart_alt_outlined, size: 24, ), - title: Text('Restarting'), + title: Text('service_page.status.reloading'.tr()), ), ); } From 9644ade367c632133a2713cecfe965de915969d7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Oct 2022 11:26:18 +0300 Subject: [PATCH 199/732] fix(i18l): Use fallback English translations when localized one not available --- lib/config/localization.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/config/localization.dart b/lib/config/localization.dart index b8356950..5e5ffc38 100644 --- a/lib/config/localization.dart +++ b/lib/config/localization.dart @@ -13,6 +13,7 @@ class Localization extends StatelessWidget { supportedLocales: const [Locale('ru'), Locale('en')], path: 'assets/translations', fallbackLocale: const Locale('en'), + useFallbackTranslations: true, saveLocale: false, useOnlyLangCode: true, child: child!, From 129eb76a04463976d45ae61f90685069f9a005fd Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Oct 2022 13:34:56 +0300 Subject: [PATCH 200/732] feat: MD3 app bars Fixed #123 spent @2h --- lib/theming/factory/app_theme_factory.dart | 5 - .../components/brand_header/brand_header.dart | 28 ++-- .../brand_hero_screen/brand_hero_screen.dart | 122 +++++++++------ lib/ui/pages/dns_details/dns_details.dart | 1 - lib/ui/pages/more/about_application.dart | 5 +- .../server_details/server_details_screen.dart | 1 - .../server_details/time_zone/time_zone.dart | 143 +++++++++--------- lib/ui/pages/services/service_page.dart | 25 +-- lib/ui/pages/setup/initializing.dart | 3 +- 9 files changed, 170 insertions(+), 163 deletions(-) diff --git a/lib/theming/factory/app_theme_factory.dart b/lib/theming/factory/app_theme_factory.dart index c44be7a3..65bb1648 100644 --- a/lib/theming/factory/app_theme_factory.dart +++ b/lib/theming/factory/app_theme_factory.dart @@ -66,11 +66,6 @@ abstract class AppThemeFactory { typography: appTypography, useMaterial3: true, scaffoldBackgroundColor: colorScheme.background, - appBarTheme: AppBarTheme( - elevation: 0, - backgroundColor: colorScheme.primary, - foregroundColor: colorScheme.onPrimary, - ), ); return materialThemeData; diff --git a/lib/ui/components/brand_header/brand_header.dart b/lib/ui/components/brand_header/brand_header.dart index 7366298b..fa643710 100644 --- a/lib/ui/components/brand_header/brand_header.dart +++ b/lib/ui/components/brand_header/brand_header.dart @@ -1,6 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; class BrandHeader extends StatelessWidget { const BrandHeader({ @@ -15,25 +13,17 @@ class BrandHeader extends StatelessWidget { final VoidCallback? onBackButtonPressed; @override - Widget build(final BuildContext context) => Container( - height: 52, - alignment: Alignment.centerLeft, - padding: EdgeInsets.only( - left: hasBackButton ? 1 : 15, + Widget build(final BuildContext context) => AppBar( + title: Padding( + padding: const EdgeInsets.only(top: 4.0), + child: Text(title), ), - child: Row( - children: [ - if (hasBackButton) ...[ - IconButton( - icon: const Icon(BrandIcons.arrowLeft), + leading: hasBackButton + ? IconButton( + icon: const Icon(Icons.arrow_back), onPressed: onBackButtonPressed ?? () => Navigator.of(context).pop(), - ), - const SizedBox(width: 10), - ], - BrandText.h4(title), - const Spacer(), - ], - ), + ) + : null, ); } diff --git a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart index cdccc8d2..b36cb2d9 100644 --- a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart +++ b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart @@ -1,74 +1,102 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; class BrandHeroScreen extends StatelessWidget { const BrandHeroScreen({ required this.children, final super.key, - this.headerTitle = '', this.hasBackButton = true, this.hasFlashButton = true, this.heroIcon, - this.heroTitle, + this.heroIconWidget, + this.heroTitle = '', this.heroSubtitle, this.onBackButtonPressed, }); final List children; - final String headerTitle; final bool hasBackButton; final bool hasFlashButton; final IconData? heroIcon; - final String? heroTitle; + final Widget? heroIconWidget; + final String heroTitle; final String? heroSubtitle; final VoidCallback? onBackButtonPressed; @override - Widget build(final BuildContext context) => SafeArea( - child: Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52.0), - child: BrandHeader( - title: headerTitle, - hasBackButton: hasBackButton, - onBackButtonPressed: onBackButtonPressed, + Widget build(final BuildContext context) { + final Widget heroIconWidget = this.heroIconWidget ?? + Icon( + heroIcon ?? Icons.help, + size: 48.0, + color: Theme.of(context).colorScheme.onBackground, + ); + final bool hasHeroIcon = heroIcon != null || this.heroIconWidget != null; + const EdgeInsetsGeometry heroTitlePadding = EdgeInsets.only( + bottom: 12.0, + top: 16.0, + ); + + return Scaffold( + floatingActionButton: hasFlashButton ? const BrandFab() : null, + body: CustomScrollView( + slivers: [ + SliverAppBar( + expandedHeight: hasHeroIcon ? 160.0 : 96.0, + pinned: true, + stretch: true, + leading: hasBackButton + ? IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: onBackButtonPressed ?? + () => Navigator.of(context).pop(), + ) + : null, + flexibleSpace: FlexibleSpaceBar( + title: Text( + heroTitle, + style: Theme.of(context).textTheme.titleLarge?.copyWith( + color: Theme.of(context).colorScheme.onSurface, + ), + ), + expandedTitleScale: 1.2, + centerTitle: true, + collapseMode: CollapseMode.pin, + titlePadding: heroTitlePadding, + background: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (hasHeroIcon) heroIconWidget, + ], + ), ), ), - floatingActionButton: hasFlashButton ? const BrandFab() : null, - body: ListView( - padding: const EdgeInsets.all(16.0), - children: [ - if (heroIcon != null) - Container( - alignment: Alignment.bottomLeft, - child: Icon( - heroIcon, - size: 48.0, + if (heroSubtitle != null) + SliverPadding( + padding: const EdgeInsets.symmetric( + horizontal: 16.0, + vertical: 4.0, + ), + sliver: SliverList( + delegate: SliverChildListDelegate([ + Text( + heroSubtitle!, + style: Theme.of(context).textTheme.bodyMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + textAlign: hasHeroIcon ? TextAlign.center : TextAlign.start, ), - ), - const SizedBox(height: 8.0), - if (heroTitle != null) - Text( - heroTitle!, - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - textAlign: TextAlign.start, - ), - const SizedBox(height: 8.0), - if (heroSubtitle != null) - Text( - heroSubtitle!, - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - textAlign: TextAlign.start, - ), - const SizedBox(height: 16.0), - ...children, - ], + ]), + ), + ), + SliverPadding( + padding: const EdgeInsets.all(16.0), + sliver: SliverList( + delegate: SliverChildListDelegate(children), + ), ), - ), - ); + ], + ), + ); + } } diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 5a93a53e..3308a068 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -91,7 +91,6 @@ class _DnsDetailsPageState extends State { if (!isReady) { return BrandHeroScreen( hasBackButton: true, - headerTitle: '', heroIcon: BrandIcons.globe, heroTitle: 'domain.screen_title'.tr(), heroSubtitle: 'not_ready_card.in_menu'.tr(), diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 664dce3e..9b545678 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -15,8 +15,9 @@ class AboutApplicationPage extends StatelessWidget { appBar: PreferredSize( preferredSize: const Size.fromHeight(52), child: BrandHeader( - title: 'about_application_page.title'.tr(), - hasBackButton: true), + title: 'about_application_page.title'.tr(), + hasBackButton: true, + ), ), body: ListView( padding: paddingH15V0, diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index d1eada36..0b4ac005 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -12,7 +12,6 @@ import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index 1711a59b..6a7349c9 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -47,82 +47,87 @@ class _SelectTimezoneState extends State { @override Widget build(final BuildContext context) => Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: BrandHeader( - title: 'server.select_timezone'.tr(), - hasBackButton: true, + appBar: AppBar( + title: Padding( + padding: const EdgeInsets.only(top: 4.0), + child: Text('server.select_timezone'.tr()), + ), + leading: IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: () => Navigator.of(context).pop(), ), ), - body: ListView( - controller: controller, - children: locations - .asMap() - .map((final key, final value) { - final duration = - Duration(milliseconds: value.currentTimeZone.offset); - final area = value.currentTimeZone.abbreviation - .replaceAll(RegExp(r'[\d+()-]'), ''); + body: SafeArea( + child: ListView( + controller: controller, + children: locations + .asMap() + .map((final key, final value) { + final duration = + Duration(milliseconds: value.currentTimeZone.offset); + final area = value.currentTimeZone.abbreviation + .replaceAll(RegExp(r'[\d+()-]'), ''); - String timezoneName = value.name; - if (context.locale.toString() == 'ru') { - timezoneName = russian[value.name] ?? - () { - final arr = value.name.split('/')..removeAt(0); - return arr.join('/'); - }(); - } + String timezoneName = value.name; + if (context.locale.toString() == 'ru') { + timezoneName = russian[value.name] ?? + () { + final arr = value.name.split('/')..removeAt(0); + return arr.join('/'); + }(); + } - return MapEntry( - key, - Container( - height: 75, - padding: const EdgeInsets.symmetric(horizontal: 20), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: BrandColors.dividerColor, + return MapEntry( + key, + Container( + height: 75, + padding: const EdgeInsets.symmetric(horizontal: 20), + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide( + color: BrandColors.dividerColor, + ), + ), + ), + child: InkWell( + onTap: () { + context + .read() + .repository + .setTimezone( + timezoneName, + ); + Navigator.of(context).pop(); + }, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + BrandText.body1( + timezoneName, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + BrandText.small( + 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', + style: const TextStyle( + fontSize: 13, + ), + ), + ], + ), ), ), ), - child: InkWell( - onTap: () { - context - .read() - .repository - .setTimezone( - timezoneName, - ); - Navigator.of(context).pop(); - }, - child: Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - BrandText.body1( - timezoneName, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - ), - ), - BrandText.small( - 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', - style: const TextStyle( - fontSize: 13, - ), - ), - ], - ), - ), - ), - ), - ); - }) - .values - .toList(), + ); + }) + .values + .toList(), + ), ), ); } diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index ad398072..f4685802 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -47,25 +47,14 @@ class _ServicePageState extends State { return BrandHeroScreen( hasBackButton: true, + heroIconWidget: SvgPicture.string( + service.svgIcon, + width: 48.0, + height: 48.0, + color: Theme.of(context).colorScheme.onBackground, + ), + heroTitle: service.displayName, children: [ - Container( - alignment: Alignment.center, - child: SvgPicture.string( - service.svgIcon, - width: 48.0, - height: 48.0, - color: Theme.of(context).colorScheme.onBackground, - ), - ), - const SizedBox(height: 16), - Text( - service.displayName, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - const SizedBox(height: 16), ServiceStatusCard(status: service.status), const SizedBox(height: 16), if (service.url != null) diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index ff4c0748..102c5a9b 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -415,7 +415,8 @@ class InitializingPage extends StatelessWidget { BrandText.h2('initializing.create_master_account'.tr()), const SizedBox(height: 10), BrandText.body2( - 'initializing.enter_nickname_and_password'.tr()), + 'initializing.enter_nickname_and_password'.tr(), + ), const Spacer(), CubitFormTextField( formFieldCubit: context.read().userName, From 53e8ae5ce8379626d6381f9cea5890da0b0929f5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Oct 2022 10:40:27 +0000 Subject: [PATCH 201/732] Translated using Weblate (English) Currently translated at 100.0% (351 of 351 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/en/ --- assets/translations/en.json | 844 ++++++++++++++++++------------------ 1 file changed, 422 insertions(+), 422 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 1af2fa0a..8e6093f1 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -1,427 +1,427 @@ { - "test": "en-test", - "locale": "en", - "basis": { - "providers": "Providers", - "providers_title": "Your Data Center", - "services": "Services", - "services_title": "Your personal, private and independent services.", - "users": "Users", - "more": "More", - "next": "Next", - "got_it": "Got it", - "settings": "Settings", - "password": "Password", - "create": "Add new", - "confirmation": "Confirmation", - "cancel": "Cancel", - "delete": "Delete", - "close": "Close", - "connect": "Connect", - "domain": "Domain", - "saving": "Saving..", - "nickname": "Nickname", - "loading": "Loading...", - "later": "Skip to setup later", - "connect_to_existing": "Connect to an existing server", - "reset": "Reset", - "details": "Details", - "no_data": "No data", - "wait": "Wait", - "remove": "Remove", - "apply": "Apply", - "done": "Done", - "continue": "Continue" - }, - "more_page": { - "configuration_wizard": "Setup wizard", - "about_project": "About us", - "about_application": "About", - "onboarding": "Onboarding", - "create_ssh_key": "Create SSH key", - "console": "Console", - "application_settings": "Application settings" - }, - "console_page": { - "title": "Console", - "waiting": "Waiting for initialization..." - }, - "about_us_page": { - "title": "About us" - }, - "about_application_page": { - "title": "About", - "application_version_text": "Application version v.{}", - "api_version_text": "Server API version v.{}" - }, - "application_settings": { - "title": "Application settings", - "dark_theme_title": "Dark theme", - "dark_theme_description": "Switch your application theme", - "reset_config_title": "Reset application config", - "reset_config_description": "Reset api keys and root user", - "delete_server_title": "Delete server", - "delete_server_description": "This removes your server. It will be no longer accessible" - }, - "ssh": { - "title": "SSH keys", - "create": "Create SSH key", - "delete": "Delete SSH key", - "delete_confirm_question": "Are you sure you want to delete SSH key?", - "subtitle_with_keys": "{} keys", - "subtitle_without_keys": "No keys", - "no_key_name": "Unnamed key", - "root_title": "These are superuser keys", - "root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.", - "input_label": "Public ED25519 or RSA key" - }, - "onboarding": { - "page1_title": "Digital independence, available to all of us", - "page1_text": "Mail, VPN, Messenger, social network and much more on your private server, under your control.", - "page2_title": "SelfPrivacy — it's not a cloud, but your personal datacenter", - "page2_text": "SelfPrivacy works only with your provider accounts: Hetzner, Cloudflare, Backblaze. If you do not own those, we'll help you to create them" - }, - "resource_chart": { - "month": "Month", - "day": "Day", - "hour": "Hour", - "cpu_title": "CPU Usage", - "network_title": "Network Usage", - "in": "In", - "out": "Out" - }, - "server": { - "card_title": "Server", - "description": "All your services live here", - "general_information": "General information", - "resource_usage": "Resource usage", - "allow_autoupgrade": "Allow auto-upgrade", - "allow_autoupgrade_hint": "Allow automatic packages upgrades on server", - "reboot_after_upgrade": "Reboot after upgrade", - "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", - "server_timezone": "Server timezone", - "select_timezone": "Select timezone", - "server_id": "Server ID", - "status": "Status", - "cpu": "CPU", - "ram": "Memory", - "disk": "Disk local", - "monthly_cost": "Monthly cost", - "location": "Location", - "core_count": { - "one": "{} core", - "other": "{} cores" - } - }, - "record": { - "root": "Root domain", - "api": "SelfPrivacy API", - "cloud": "File cloud", - "git": "Git server", - "meet": "Video conference", - "social": "Social network", - "password": "Password manager", - "vpn": "VPN", - "mx": "MX record", - "dmarc": "DMARC record", - "spf": "SPF record", - "dkim": "DKIM key" - }, - "domain": { - "card_title": "Domain", - "screen_title": "Domain and DNS", - "ok": "Records are OK", - "error": "Problems found", - "error_subtitle": "Tap here to fix them", - "refreshing": "Refreshing status...", - "uninitialized": "Data is not retrieved yet", - "services_title": "Services", - "services_subtitle": "Type “A” records required for each service.", - "email_title": "Email", - "email_subtitle": "Records necessary for secure email exchange." - }, - "backup": { - "card_title": "Backup", - "description": "Will save your day in case of incident: hackers attack, server deletion, etc.", - "reupload_key": "Force reupload key", - "reuploaded_key": "Key reuploaded", - "initialize": "Initialize", - "waiting_for_rebuild": "You will be able to create your first backup in a few minutes.", - "restore": "Restore from backup", - "no_backups": "There are no backups yet", - "create_new": "Create a new backup", - "creating": "Creating a new backup: {}%", - "restoring": "Restoring from backup", - "error_pending": "Server returned error, check it below", - "restore_alert": "You are about to restore from backup created on {}. All current data will be lost. Are you sure?", - "refresh": "Refresh status", - "refetch_backups": "Refetch backup list", - "refetching_list": "In a few minutes list will be updated" - }, - "storage": { - "card_title": "Server Storage", - "status_ok": "Disk usage is OK", - "status_error": "Low disk space", - "disk_usage": "{} used", - "disk_total": "{} total · {}", - "gb": "{} GB", - "mb": "{} MB", - "kb": "{} KB", - "extend_volume_button": "Extend volume", - "extending_volume_title": "Extending volume", - "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", - "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner. Server will be rebooted after resizing.", - "extending_volume_error": "Couldn't initialize volume extending.", - "size": "Size", - "euro": "Euro", - "data_migration_title": "Data migration", - "data_migration_notice": "During migration all services will be turned off.", - "start_migration_button": "Start migration", - "migration_process": "Migrating...", - "migration_done": "Finish" - }, - "not_ready_card": { - "begin": "Please finish application setup using ", - "insertion": "@:more.configuration_wizard", - "end": " for further work", - "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." - }, - "service_page": { - "open_in_browser": "Open in browser", - "restart": "Restart service", - "disable": "Disable service", - "enable": "Enable service", - "move": "Move to another volume", - "uses": "Uses {usage} on {volume}", - "status": { - "active": "Up and running", - "inactive": "Stopped", - "failed": "Failed to start", - "off": "Disabled", - "activating": "Activating", - "deactivating": "Deactivating", - "reloading": "Restarting" - } - }, - "mail": { - "title": "E-Mail", - "subtitle": "E-Mail for company and family.", - "login_info": "Use username and password from users tab. IMAP port is 143 with STARTTLS, SMTP port is 587 with STARTTLS." - }, - "password_manager": { - "title": "Password Manager", - "subtitle": "Base of your security. Bitwarden will help you to create, store and move passwords between devices, as well as input them, when requested using autocompletion.", - "login_info": "You will have to create an account on the website." - }, - "video": { - "title": "Videomeet", - "subtitle": "Zoom and Google Meet are good, but Jitsi Meet is a worth alternative that also gives you confidence that you're not being listened.", - "login_info": "No account needed." - }, - "cloud": { - "title": "Cloud Storage", - "subtitle": "Do not allow cloud services to read your data by using NextCloud.", - "login_info": "Login is admin, password is the same as with your main user. Create new accounts in Nextcloud interface." - }, - "social_network": { - "title": "Social Network", - "subtitle": "It's hard to believe, but it became possible to create your own social network, with your own rules and target audience.", - "login_info": "You will have to create an account on the website." - }, - "git": { - "title": "Git Server", - "subtitle": "Private alternative to the Github, that belongs to you, but not a Microsoft.", - "login_info": "You will have to create an account on the website. First user will become an admin." - }, - "vpn": { - "title": "VPN Server", - "subtitle": "Private VPN server" - }, - "users": { - "add_new_user": "Add a first user", - "new_user": "New user", - "delete_user": "Delete user", - "not_ready": "Please connect server, domain and DNS in the Providers tab, to be able to add a first user", - "nobody_here": "Nobody here", - "login": "Login", - "new_user_info_note": "New user will automatically be granted an access to all of the services", - "delete_confirm_question": "Are you sure?", - "reset_password": "Reset password", - "account": "Account", - "send_registration_data": "Share login credentials", - "could_not_fetch_users": "Couldn't fetch users list", - "could_not_fetch_description": "Please check your internet connection and try again", - "refresh_users": "Refresh users list", - "could_not_create_user": "Couldn't create user", - "could_not_delete_user": "Couldn't delete user", - "could_not_add_ssh_key": "Couldn't add SSH key", - "email_login": "Email login", - "no_ssh_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." - }, - "initializing": { - "connect_to_server": "Connect a server", - "place_where_data": "A place where your data and SelfPrivacy services will reside:", - "how": "How to obtain API token", - "hetzner_bad_key_error": "Hetzner API key is invalid", - "cloudflare_bad_key_error": "Cloudflare API key is invalid", - "backblaze_bad_key_error": "Backblaze storage information is invalid", - "connect_cloudflare": "Connect CloudFlare", - "manage_domain_dns": "To manage your domain's DNS", - "cloudflare_api_token": "CloudFlare API Token", - "connect_backblaze_storage": "Connect Backblaze storage", - "no_connected_domains": "No connected domains at the moment", - "loading_domain_list": "Loading domain list", - "found_more_domains": "Found more than one domain. For your own security, please be asked to delete unnecessary domains", - "save_domain": "Save domain", - "final": "Final step", - "create_server": "Create server", - "what": "What does it mean?", - "server_rebooted": "Server rebooted. Waiting for the last verification...", - "server_started": "Server started. It will be validated and rebooted now...", - "server_created": "Server created. DNS checks and server boot in progress...", - "until_the_next_check": "Until the next check: ", - "check": "Check", - "one_more_restart": "One more restart to apply your security certificates.", - "create_master_account": "Create master account", - "enter_nickname_and_password": "Enter a nickname and strong password", - "finish": "Everything is initialized", - "checks": "Checks have been completed \n{} out of {}" - }, - "recovering": { - "recovery_main_header": "Connect to an existing server", - "domain_recovery_description": "Enter a server domain you want to get access for:", - "domain_recover_placeholder": "Your domain", - "domain_recover_error": "Server with such domain was not found", - "method_select_description": "Select a recovery method:", - "method_select_other_device": "I have access on another device", - "method_select_recovery_key": "I have a recovery key", - "method_select_nothing": "I don't have any of that", - "method_device_description": "Open the application on another device, then go to the devices page. Press \"Add device\" to receive your token.", - "method_device_button": "I have received my token", - "method_device_input_description": "Enter your authorization token", - "method_device_input_placeholder": "Token", - "method_recovery_input_description": "Enter your recovery key", - "fallback_select_description": "What exactly do you have? Pick the first available option:", - "fallback_select_token_copy": "Copy of auth token from other version of the application.", - "fallback_select_root_ssh": "Root SSH access to the server.", - "fallback_select_provider_console": "Access to the server console of my prodiver.", - "authorization_failed": "Couldn't log in with this key", - "fallback_select_provider_console_hint": "For example: Hetzner.", - "hetzner_connected": "Connect to Hetzner", - "hetzner_connected_description": "Communication established. Enter Hetzner token with access to {}:", - "hetzner_connected_placeholder": "Hetzner token", - "confirm_server": "Confirm server", - "confirm_server_description": "Found your server! Confirm it is correct.", - "confirm_server_accept": "Yes! That's it", - "confirm_server_decline": "Choose a different server", - "choose_server": "Choose your server", - "choose_server_description": "We couldn't figure out which server your are trying to connect to.", - "no_servers": "There is no available servers on your account.", - "domain_not_available_on_token": "Selected domain is not available on this token.", - "modal_confirmation_title": "Is it really your server?", - "modal_confirmation_description": "If you connect to a wrong server you may lose all your data.", - "modal_confirmation_dns_valid": "Reverse DNS is valid", - "modal_confirmation_dns_invalid": "Reverse DNS points to another domain", - "modal_confirmation_ip_valid": "IP is the same as in DNS record", - "modal_confirmation_ip_invalid": "IP is not the same as in DNS record", - "confirm_cloudflare": "Connect to CloudFlare", - "confirm_cloudflare_description": "Enter a Cloudflare token with access to {}:", - "confirm_backblaze": "Connect to Backblaze", - "confirm_backblaze_description": "Enter a Backblaze token with access to backup storage:" - }, - "devices": { - "main_screen": { - "header": "Devices", - "description": "These devices have full access to the server via SelfPrivacy app.", - "this_device": "This device", - "other_devices": "Other devices", - "authorize_new_device": "Authorize new device", - "access_granted_on" : "Access granted on {}", - "tip": "Press on the device to revoke access." + "test": "en-test", + "locale": "en", + "basis": { + "providers": "Providers", + "providers_title": "Your Data Center", + "services": "Services", + "services_title": "Your personal, private and independent services.", + "users": "Users", + "more": "More", + "next": "Next", + "got_it": "Got it", + "settings": "Settings", + "password": "Password", + "create": "Add new", + "confirmation": "Confirmation", + "cancel": "Cancel", + "delete": "Delete", + "close": "Close", + "connect": "Connect", + "domain": "Domain", + "saving": "Saving…", + "nickname": "Nickname", + "loading": "Loading…", + "later": "Skip to setup later", + "connect_to_existing": "Connect to an existing server", + "reset": "Reset", + "details": "Details", + "no_data": "No data", + "wait": "Wait", + "remove": "Remove", + "apply": "Apply", + "done": "Done", + "continue": "Continue" }, - "add_new_device_screen": { - "header": "Authorizing new device", - "description": "Enter the key on the device you want to authorize:", - "please_wait": "Please wait", - "tip": "The key is valid for 10 minutes.", - "expired": "The key has expired.", - "get_new_key": "Get new key" + "more_page": { + "configuration_wizard": "Setup wizard", + "about_project": "About us", + "about_application": "About", + "onboarding": "Onboarding", + "create_ssh_key": "Superuser SSH keys", + "console": "Console", + "application_settings": "Application settings" }, - "revoke_device_alert": { - "header": "Revoke access?", - "description": "The device {} will no longer have access to the server.", - "yes": "Revoke", - "no": "Cancel" + "console_page": { + "title": "Console", + "waiting": "Waiting for initialization…" + }, + "about_us_page": { + "title": "About us" + }, + "about_application_page": { + "title": "About", + "application_version_text": "Application version v.{}", + "api_version_text": "Server API version v.{}" + }, + "application_settings": { + "title": "Application settings", + "dark_theme_title": "Dark theme", + "dark_theme_description": "Switch your application theme", + "reset_config_title": "Reset application config", + "reset_config_description": "Reset api keys and root user", + "delete_server_title": "Delete server", + "delete_server_description": "This removes your server. It will be no longer accessible." + }, + "ssh": { + "title": "SSH keys", + "create": "Create SSH key", + "delete": "Delete SSH key", + "delete_confirm_question": "Are you sure you want to delete SSH key?", + "subtitle_with_keys": "{} keys", + "subtitle_without_keys": "No keys", + "no_key_name": "Unnamed key", + "root_title": "These are superuser keys", + "root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.", + "input_label": "Public ED25519 or RSA key" + }, + "onboarding": { + "page1_title": "Digital independence, available to all of us", + "page1_text": "Mail, VPN, Messenger, social network and much more on your private server, under your control.", + "page2_title": "SelfPrivacy — it's not a cloud, but your personal datacenter", + "page2_text": "SelfPrivacy works only with your provider accounts: Hetzner, Cloudflare, Backblaze. If you do not own those, we'll help you to create them." + }, + "resource_chart": { + "month": "Month", + "day": "Day", + "hour": "Hour", + "cpu_title": "CPU Usage", + "network_title": "Network Usage", + "in": "In", + "out": "Out" + }, + "server": { + "card_title": "Server", + "description": "All your services live here", + "general_information": "General information", + "resource_usage": "Resource usage", + "allow_autoupgrade": "Allow auto-upgrade", + "allow_autoupgrade_hint": "Allow automatic packages upgrades on server", + "reboot_after_upgrade": "Reboot after upgrade", + "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", + "server_timezone": "Server timezone", + "select_timezone": "Select timezone", + "server_id": "Server ID", + "status": "Status", + "cpu": "CPU", + "ram": "Memory", + "disk": "Disk local", + "monthly_cost": "Monthly cost", + "location": "Location", + "core_count": { + "one": "{} core", + "other": "{} cores" + } + }, + "record": { + "root": "Root domain", + "api": "SelfPrivacy API", + "cloud": "File cloud", + "git": "Git server", + "meet": "Video conference", + "social": "Social network", + "password": "Password manager", + "vpn": "VPN", + "mx": "MX record", + "dmarc": "DMARC record", + "spf": "SPF record", + "dkim": "DKIM key" + }, + "domain": { + "card_title": "Domain", + "screen_title": "Domain and DNS", + "ok": "Records are OK", + "error": "Problems found", + "error_subtitle": "Tap here to fix them", + "refreshing": "Refreshing status…", + "uninitialized": "Data is not retrieved yet", + "services_title": "Services", + "services_subtitle": "Type “A” records required for each service.", + "email_title": "Email", + "email_subtitle": "Records necessary for secure email exchange." + }, + "backup": { + "card_title": "Backup", + "description": "Will save your day in case of incident: hackers attack, server deletion, etc.", + "reupload_key": "Force reupload key", + "reuploaded_key": "Key reuploaded", + "initialize": "Initialize", + "waiting_for_rebuild": "You will be able to create your first backup in a few minutes.", + "restore": "Restore from backup", + "no_backups": "There are no backups yet", + "create_new": "Create a new backup", + "creating": "Creating a new backup: {}%", + "restoring": "Restoring from backup", + "error_pending": "Server returned error, check it below", + "restore_alert": "You are about to restore from backup created on {}. All current data will be lost. Are you sure?", + "refresh": "Refresh status", + "refetch_backups": "Refetch backup list", + "refetching_list": "In a few minutes list will be updated" + }, + "storage": { + "card_title": "Server Storage", + "status_ok": "Disk usage is OK", + "status_error": "Low disk space", + "disk_usage": "{} used", + "disk_total": "{} total · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "extend_volume_button": "Extend volume", + "extending_volume_title": "Extending volume", + "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", + "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner. Server will be rebooted after resizing.", + "extending_volume_error": "Couldn't initialize volume extending.", + "size": "Size", + "euro": "Euro", + "data_migration_title": "Data migration", + "data_migration_notice": "During migration all services will be turned off.", + "start_migration_button": "Start migration", + "migration_process": "Migrating…", + "migration_done": "Finish" + }, + "not_ready_card": { + "begin": "Please finish application setup using ", + "insertion": "@:more.configuration_wizard", + "end": " for further work", + "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." + }, + "service_page": { + "open_in_browser": "Open in browser", + "restart": "Restart service", + "disable": "Disable service", + "enable": "Enable service", + "move": "Move to another volume", + "uses": "Uses {usage} on {volume}", + "status": { + "active": "Up and running", + "inactive": "Stopped", + "failed": "Failed to start", + "off": "Disabled", + "activating": "Activating", + "deactivating": "Deactivating", + "reloading": "Restarting" + } + }, + "mail": { + "title": "E-Mail", + "subtitle": "E-Mail for company and family.", + "login_info": "Use username and password from users tab. IMAP port is 143 with STARTTLS, SMTP port is 587 with STARTTLS." + }, + "password_manager": { + "title": "Password Manager", + "subtitle": "Base of your security. Bitwarden will help you to create, store and move passwords between devices, as well as input them, when requested using autocompletion.", + "login_info": "You will have to create an account on the website." + }, + "video": { + "title": "Videomeet", + "subtitle": "Zoom and Google Meet are good, but Jitsi Meet is a worth alternative that also gives you confidence that you're not being listened.", + "login_info": "No account needed." + }, + "cloud": { + "title": "Cloud Storage", + "subtitle": "Do not allow cloud services to read your data by using NextCloud.", + "login_info": "Login is admin, password is the same as with your main user. Create new accounts in Nextcloud interface." + }, + "social_network": { + "title": "Social Network", + "subtitle": "It's hard to believe, but it became possible to create your own social network, with your own rules and target audience.", + "login_info": "You will have to create an account on the website." + }, + "git": { + "title": "Git Server", + "subtitle": "Private alternative to the Github, that belongs to you, but not a Microsoft.", + "login_info": "You will have to create an account on the website. First user will become an admin." + }, + "vpn": { + "title": "VPN Server", + "subtitle": "Private VPN server" + }, + "users": { + "add_new_user": "Add a first user", + "new_user": "New user", + "delete_user": "Delete user", + "not_ready": "Please connect server, domain and DNS in the Providers tab, to be able to add a first user", + "nobody_here": "Nobody here", + "login": "Login", + "new_user_info_note": "New user will automatically be granted an access to all of the services", + "delete_confirm_question": "Are you sure?", + "reset_password": "Reset password", + "account": "Account", + "send_registration_data": "Share login credentials", + "could_not_fetch_users": "Couldn't fetch users list", + "could_not_fetch_description": "Please check your internet connection and try again", + "refresh_users": "Refresh users list", + "could_not_create_user": "Couldn't create user", + "could_not_delete_user": "Couldn't delete user", + "could_not_add_ssh_key": "Couldn't add SSH key", + "email_login": "Email login", + "no_ssh_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." + }, + "initializing": { + "connect_to_server": "Connect a server", + "place_where_data": "A place where your data and SelfPrivacy services will reside:", + "how": "How to obtain API token", + "hetzner_bad_key_error": "Hetzner API key is invalid", + "cloudflare_bad_key_error": "Cloudflare API key is invalid", + "backblaze_bad_key_error": "Backblaze storage information is invalid", + "connect_cloudflare": "Connect CloudFlare", + "manage_domain_dns": "To manage your domain's DNS", + "cloudflare_api_token": "CloudFlare API Token", + "connect_backblaze_storage": "Connect Backblaze storage", + "no_connected_domains": "No connected domains at the moment", + "loading_domain_list": "Loading domain list", + "found_more_domains": "Found more than one domain. For your own security, please be asked to delete unnecessary domains", + "save_domain": "Save domain", + "final": "Final step", + "create_server": "Create server", + "what": "What does it mean?", + "server_rebooted": "Server rebooted. Waiting for the last verification…", + "server_started": "Server started. It will be validated and rebooted now…", + "server_created": "Server created. DNS checks and server boot in progress…", + "until_the_next_check": "Until the next check: ", + "check": "Check", + "one_more_restart": "One more restart to apply your security certificates.", + "create_master_account": "Create master account", + "enter_nickname_and_password": "Enter a nickname and strong password", + "finish": "Everything is initialized", + "checks": "Checks have been completed \n{} out of {}" + }, + "recovering": { + "recovery_main_header": "Connect to an existing server", + "domain_recovery_description": "Enter a server domain you want to get access for:", + "domain_recover_placeholder": "Your domain", + "domain_recover_error": "Server with such domain was not found", + "method_select_description": "Select a recovery method:", + "method_select_other_device": "I have access on another device", + "method_select_recovery_key": "I have a recovery key", + "method_select_nothing": "I don't have any of that", + "method_device_description": "Open the application on another device, then go to the devices page. Press \"Add device\" to receive your token.", + "method_device_button": "I have received my token", + "method_device_input_description": "Enter your authorization token", + "method_device_input_placeholder": "Token", + "method_recovery_input_description": "Enter your recovery key", + "fallback_select_description": "What exactly do you have? Pick the first available option:", + "fallback_select_token_copy": "Copy of auth token from other version of the application.", + "fallback_select_root_ssh": "Root SSH access to the server.", + "fallback_select_provider_console": "Access to the server console of my prodiver.", + "authorization_failed": "Couldn't log in with this key", + "fallback_select_provider_console_hint": "For example: Hetzner.", + "hetzner_connected": "Connect to Hetzner", + "hetzner_connected_description": "Communication established. Enter Hetzner token with access to {}:", + "hetzner_connected_placeholder": "Hetzner token", + "confirm_server": "Confirm server", + "confirm_server_description": "Found your server! Confirm it is the right one:", + "confirm_server_accept": "Yes! That's it", + "confirm_server_decline": "Choose a different server", + "choose_server": "Choose your server", + "choose_server_description": "We couldn't figure out which server your are trying to connect to.", + "no_servers": "There is no available servers on your account.", + "domain_not_available_on_token": "Selected domain is not available on this token.", + "modal_confirmation_title": "Is it really your server?", + "modal_confirmation_description": "If you connect to a wrong server you may lose all your data.", + "modal_confirmation_dns_valid": "Reverse DNS is valid", + "modal_confirmation_dns_invalid": "Reverse DNS points to another domain", + "modal_confirmation_ip_valid": "IP is the same as in DNS record", + "modal_confirmation_ip_invalid": "IP is not the same as in DNS record", + "confirm_cloudflare": "Connect to CloudFlare", + "confirm_cloudflare_description": "Enter a Cloudflare token with access to {}:", + "confirm_backblaze": "Connect to Backblaze", + "confirm_backblaze_description": "Enter a Backblaze token with access to backup storage:" + }, + "devices": { + "main_screen": { + "header": "Devices", + "description": "These devices have full access to the server via SelfPrivacy app.", + "this_device": "This device", + "other_devices": "Other devices", + "authorize_new_device": "Authorize new device", + "access_granted_on": "Access granted on {}", + "tip": "Press on the device to revoke access." + }, + "add_new_device_screen": { + "header": "Authorizing new device", + "description": "Enter the key on the device you want to authorize:", + "please_wait": "Please wait", + "tip": "The key is valid for 10 minutes.", + "expired": "The key has expired.", + "get_new_key": "Get new key" + }, + "revoke_device_alert": { + "header": "Revoke access?", + "description": "The device {} will no longer have access to the server.", + "yes": "Revoke", + "no": "Cancel" + } + }, + "recovery_key": { + "key_connection_error": "Couldn't connect to the server.", + "key_synchronizing": "Synchronizing…", + "key_main_header": "Recovery key", + "key_main_description": "Is needed for SelfPrivacy authorization when all your other authorized devices aren't available.", + "key_amount_toggle": "Limit by number of uses", + "key_amount_field_title": "Max number of uses", + "key_duedate_toggle": "Limit by time", + "key_duedate_field_title": "Due date of expiration", + "key_receive_button": "Receive key", + "key_valid": "Your key is valid", + "key_invalid": "Your key is no longer valid", + "key_valid_until": "Valid until {}", + "key_valid_for": "Valid for {} uses", + "key_creation_date": "Created on {}", + "key_replace_button": "Generate new key", + "key_receiving_description": "Write down this key and put to a safe place. It is used to restore full access to your server:", + "key_receiving_info": "The key will never ever be shown again, but you will be able to replace it with another one.", + "key_receiving_done": "Done!", + "generation_error": "Couldn't generate a recovery key. {}" + }, + "modals": { + "already_exists": "Such server already exists.", + "unexpected_error": "Unexpected error during placement from the provider side.", + "destroy_server": "Destroy the server and create a new one?", + "try_again": "Try again?", + "are_you_sure": "Are you sure?", + "purge_all_keys": "Purge all authentication keys?", + "purge_all_keys_confirm": "Yes, purge all my tokens", + "delete_server_volume": "Delete the server and volume?", + "reboot": "Reboot", + "you_cant_use_this_api": "You cannot use this API for domains with such TLD.", + "yes": "Yes", + "no": "No" + }, + "timer": { + "sec": "{} sec" + }, + "jobs": { + "title": "Jobs list", + "start": "Start", + "empty": "No jobs", + "create_user": "Create user", + "delete_user": "Delete user", + "service_turn_off": "Turn off", + "service_turn_on": "Turn on", + "job_added": "Job added", + "run_jobs": "Run jobs", + "reboot_success": "Server is rebooting", + "reboot_failed": "Couldn't reboot the server. Check the app logs.", + "config_pull_failed": "Failed to pull configuration upgrade. Started software upgrade anyways.", + "upgrade_success": "Server upgrade started", + "upgrade_failed": "Failed to upgrade server", + "upgrade_server": "Upgrade server", + "reboot_server": "Reboot server", + "create_ssh_key": "Create SSH key for {}", + "delete_ssh_key": "Delete SSH key for {}", + "server_jobs": "Jobs on the server", + "reset_user_password": "Reset password of user" + }, + "validations": { + "required": "Required.", + "invalid_format": "Invalid format.", + "root_name": "User name cannot be 'root'.", + "key_format": "Invalid key format.", + "length_not_equal": "Length is []. Should be {}.", + "length_longer": "Length is []. Should be shorter than or equal to {}.", + "user_already_exist": "This user already exists.", + "key_already_exists": "This key already exists." } - }, - "recovery_key": { - "key_connection_error": "Couldn't connect to the server.", - "key_synchronizing": "Synchronizing...", - "key_main_header": "Recovery key", - "key_main_description": "Is needed for SelfPrivacy authorization when all your other authorized devices aren't available.", - "key_amount_toggle": "Limit by number of uses", - "key_amount_field_title": "Max number of uses", - "key_duedate_toggle": "Limit by time", - "key_duedate_field_title": "Due date of expiration", - "key_receive_button": "Receive key", - "key_valid": "Your key is valid", - "key_invalid": "Your key is no longer valid", - "key_valid_until": "Valid until {}", - "key_valid_for": "Valid for {} uses", - "key_creation_date": "Created on {}", - "key_replace_button": "Generate new key", - "key_receiving_description": "Write down this key and put to a safe place. It is used to restore full access to your server:", - "key_receiving_info": "The key will never ever be shown again, but you will be able to replace it with another one.", - "key_receiving_done": "Done!", - "generation_error": "Couldn't generate a recovery key. {}" - }, - "modals": { - "already_exists": "Such server already exists.", - "unexpected_error": "Unexpected error during placement from the provider side.", - "destroy_server": "Destroy the server and create a new one?", - "try_again": "Try again?", - "are_you_sure": "Are you sure?", - "purge_all_keys": "Purge all authentication keys?", - "purge_all_keys_confirm": "Yes, purge all my tokens", - "delete_server_volume": "Delete the server and volume?", - "reboot": "Reboot", - "you_cant_use_this_api": "You cannot use this API for domains with such TLD.", - "yes": "Yes", - "no": "No" - }, - "timer": { - "sec": "{} sec" - }, - "jobs": { - "title": "Jobs list", - "start": "Start", - "empty": "No jobs", - "create_user": "Create user", - "delete_user": "Delete user", - "service_turn_off": "Turn off", - "service_turn_on": "Turn on", - "job_added": "Job added", - "run_jobs": "Run jobs", - "reboot_success": "Server is rebooting", - "reboot_failed": "Couldn't reboot the server. Check the app logs.", - "config_pull_failed": "Failed to pull configuration upgrade. Started software upgrade anyways.", - "upgrade_success": "Server upgrade started", - "upgrade_failed": "Failed to upgrade server", - "upgrade_server": "Upgrade server", - "reboot_server": "Reboot server", - "create_ssh_key": "Create SSH key for {}", - "delete_ssh_key": "Delete SSH key for {}", - "server_jobs": "Jobs on the server", - "reset_user_password": "Reset password of user" - }, - "validations": { - "required": "Required.", - "invalid_format": "Invalid format.", - "root_name": "User name cannot be 'root'.", - "key_format": "Invalid key format.", - "length_not_equal": "Length is []. Should be {}.", - "length_longer": "Length is []. Should be shorter than or equal to {}.", - "user_already_exist": "This user already exists.", - "key_already_exists": "This key already exists." - } } From 8aaf62ca5cef27790bf9c0b835fbda7e9226e7a6 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Oct 2022 10:43:44 +0000 Subject: [PATCH 202/732] Translated using Weblate (Russian) Currently translated at 100.0% (351 of 351 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 842 ++++++++++++++++++------------------ 1 file changed, 426 insertions(+), 416 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 8b33890b..0224f103 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -1,421 +1,431 @@ { - "test": "ru-test", - "locale": "ru", - "basis": { - "providers": "Провайдеры", - "providers_title": "Ваш Дата Центр", - "services": "Сервисы", - "services_title": "Ваши личные, приватные и независимые сервисы.", - "users": "Пользователи", - "more": "Ещё", - "next": "Далее", - "got_it": "Понял", - "settings": "Настройки", - "password": "Пароль", - "create": "Создать", - "confirmation": "Подтверждение", - "cancel": "Отменить", - "delete": "Удалить", - "close": "Закрыть", - "connect": "Подключить", - "domain": "Домен", - "saving": "Сохранение…", - "nickname": "Никнейм", - "loading": "Загрузка", - "later": "Пропустить и настроить потом", - "connect_to_existing": "Подключиться к существующему серверу", - "reset": "Сбросить", - "details": "Детальная информация", - "no_data": "Нет данных", - "wait": "Загрузка", - "remove": "Удалить", - "apply": "Подать", - "done": "Готово", - "continue": "Продолжить" - }, - "more_page": { - "configuration_wizard": "Мастер Подключения", - "about_project": "О проекте SelfPrivacy", - "about_application": "О приложении", - "onboarding": "Приветствие", - "console": "Консоль", - "create_ssh_key": "Создать ssh ключ", - "application_settings": "Настройки приложения" - }, - "console_page": { - "title": "Консоль", - "waiting": "Ждём инициализации..." - }, - "about_us_page": { - "title": "О проекте SelfPrivacy" - }, - "about_application_page": { - "title": "О приложении", - "application_version_text": "Версия приложения v.{}", - "api_version_text": "Версия API сервера v.{}" - }, - "application_settings": { - "title": "Настройки приложения", - "dark_theme_title": "Тёмная тема", - "dark_theme_description": "Сменить цветовую тему.", - "reset_config_title": "Сброс настроек", - "reset_config_description": "Сбросить API ключи а также root пользвателя.", - "delete_server_title": "Удалить сервер", - "delete_server_description": "Действие приведет к удалению сервера. После этого он будет недоступен." - }, - "ssh": { - "title": "SSH ключи", - "create": "Добавить SSH ключ", - "delete": "Удалить SSH ключ", - "delete_confirm_question": "Вы уверены что хотите удалить следующий ключ?", - "subtitle_with_keys": "Ключей: {}", - "subtitle_without_keys": "Ключей нет", - "no_key_name": "Безымянный ключ", - "root_title": "Это ключи суперпользователя", - "root_subtitle": "Владельцы указанных здесь ключей получают полный доступ к данным и настройкам сервера. Добавляйте исключительно свои ключи.", - "input_label": "Публичный ED25519 или RSA ключ" - }, - "onboarding": { - "page1_title": "Цифровая независимость доступна каждому", - "page1_text": "Почта, VPN, Мессенджер, социальная сеть и многое другое на Вашем личном сервере, под Вашим полным контролем.", - "page2_title": "SelfPrivacy — это не облако, а Ваш личный дата-центр", - "page2_text": "SelfPrivacy работает только с вашими сервис-провайдерами: Hetzner, Cloudflare, Backblaze. Если у Вас нет учётных записей, мы поможем их создать." - }, - "resource_chart": { - "month": "Месяц", - "day": "День", - "hour": "Час", - "cpu_title": "Использование процессора", - "network_title": "Использование сети", - "in": "Получено", - "out": "Отправлено" - }, - "server": { - "card_title": "Сервер", - "description": "Это виртуальный компьютер на котором работают все Ваши сервисы.", - "general_information": "Общая информация", - "resource_usage": "Потребление ресурсов", - "allow_autoupgrade": "Разрешить авто-обноления", - "allow_autoupgrade_hint": "Разрешить автоматичесую установку обновлений на сервер", - "reboot_after_upgrade": "Перезагружать после обновлений", - "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", - "server_timezone": "Часовой пояс сервера", - "select_timezone": "Выберите часовой пояс", - "server_id": "ID сервера", - "status": "Статус", - "cpu": "Процессор", - "ram": "Оперативная память", - "disk": "Диск", - "monthly_cost": "Ежемесячная стоимость", - "location": "Размещение", - "core_count": { - "one": "{} ядро", - "two": "{} ядра", - "few": "{} ядра", - "many": "{} ядер", - "other": "{} ядер" - } - }, - "record": { - "root": "Корневой домен", - "api": "SelfPrivacy API", - "cloud": "Файловое облако", - "git": "Git сервер", - "meet": "Видеоконференции", - "social": "Социальная сеть", - "password": "Менеджер паролей", - "vpn": "VPN", - "mx": "MX запись", - "dmarc": "DMARC запись", - "spf": "SPF запись", - "dkim": "DKIM ключ" - }, - "domain": { - "card_title": "Домен", - "screen_title": "Домен и DNS", - "ok": "Записи в норме", - "error": "Обнаружены проблемы", - "error_subtitle": "Нажмите здесь, чтобы исправить", - "refreshing": "Обновление данных...", - "uninitialized": "Данные ещё не получены", - "services_title": "Сервисы", - "services_subtitle": "Записи типа “A” необходимые для работы сервисов.", - "email_title": "Электронная почта", - "email_subtitle": "Записи необходимые для безопасного обмена электронной почтой." - }, - "backup": { - "card_title": "Резервное копирование", - "description": "Выручит Вас в любой ситуации: хакерская атака, удаление сервера и т.д.", - "reupload_key": "Принудительно обновить ключ", - "reuploaded_key": "Ключ на сервере обновлён", - "initialize": "Настроить", - "waiting_for_rebuild": "Через несколько минут можно будет создать первую копию.", - "restore": "Восстановить из копии", - "no_backups": "Резервных копий пока нет", - "create_new": "Создать новую копию", - "creating": "Создание копии: {}%", - "restoring": "Восстановление из копии", - "error_pending": "Сервер вернул ошибку: проверьте её ниже.", - "restore_alert": "Вы собираетесь восстановить из копии созданной {}. Все текущие данные будут потеряны. Вы уверены?", - "refresh": "Обновить статус", - "refetch_backups": "Обновить список копий", - "refetching_list": "Через несколько минут список будет обновлён" - }, - "storage": { - "card_title": "Хранилище", - "status_ok": "Проблем на диске не обнаружено", - "status_error": "Заканчивается место на диске", - "disk_usage": "{} использовано", - "disk_total": "{} всего · {}", - "gb": "{} GB", - "mb": "{} MB", - "kb": "{} KB", - "extend_volume_button": "Расширить хранилище", - "extending_volume_title": "Расширение хранилища", - "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", - "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner. Сервер будет перезагружен во время процесса.", - "extending_volume_error": "Не удалось начать расширение хранилища.", - "size": "Размер", - "euro": "Евро", - "data_migration_title": "Миграция данных", - "data_migration_notice": "На время миграции данных все сервисы будут выключены.", - "start_migration_button": "Начать миграцию", - "migration_process": "Мигрируем...", - "migration_done": "Завершить" - }, - "not_ready_card": { - "begin": "Завершите настройку приложения используя ", - "insertion": "@:more.configuration_wizard", - "end": " для продолжения работы", - "in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения." - }, - "service_page": { - "open_in_browser": "Открыть в браузере", - "restart": "Перезапустить сервис", - "disable": "Выключить сервис", - "enable": "Включить сервис", - "move": "Переместить на другой диск", - "uses": "Использует {usage} на {volume}" - }, - "mail": { - "title": "Почта", - "subtitle": "Электронная почта для семьи или компании.", - "login_info": "Используйте логин и пароль из вкладки пользователей. IMAP порт: 143, STARTTLS. SMTP порт: 587, STARTTLS." - }, - "password_manager": { - "title": "Менеджер паролей", - "subtitle": "Это фундамент Вашей безопасности. Создавать, хранить, копировать пароли между устройствами и вбивать их в формы поможет Bitwarden.", - "login_info": "Аккаунт нужно создать на сайте." - }, - "video": { - "title": "Видеоконференция", - "subtitle": "Jitsi meet — отличный аналог Zoom и Google meet который помимо удобства ещё и гарантирует Вам защищённые высококачественные видеоконференции.", - "login_info": "Аккаунт не требуется." - }, - "cloud": { - "title": "Файловое облако", - "subtitle": "Не позволяйте облачным сервисам просматривать ваши данные. Используйте NextCloud — надёжный дом для всех Ваших данных.", - "login_info": "Логин администратора: admin, пароль такой же как у основного пользователя. Создавайте новых пользователей в интерфейсе администратора NextCloud." - }, - "social_network": { - "title": "Социальная сеть", - "subtitle": "Сложно поверить, но стало возможным создать свою собственную социальную сеть, со своими правилами и аудиторией.", - "login_info": "Аккаунт нужно создать на сайте." - }, - "git": { - "title": "Git-сервер", - "subtitle": "Приватная альтернатива Github, которая принадлежит вам, а не Microsoft.", - "login_info": "Аккаунт нужно создать на сайте. Первый зарегистрированный пользователь становится администратором." - }, - "vpn": { - "title": "VPN сервер", - "subtitle": "Закрытый VPN сервер" - }, - "users": { - "add_new_user": "Добавьте первого пользователя.", - "new_user": "Новый пользователь", - "delete_user": "Удалить пользователя", - "not_ready": "Подключите сервер, домен и DNS в разделе Провайдеры чтобы добавить первого пользователя", - "nobody_here": "Здесь будут отображаться пользователи.", - "login": "Логин", - "new_user_info_note": "Новый пользователь автоматически получит доступ ко всем сервисам.", - "delete_confirm_question": "Вы действительно хотите удалить учетную запись?", - "reset_password": "Сбросить пароль", - "account": "Учетная запись", - "send_registration_data": "Поделиться реквизитами", - "could_not_fetch_users": "Не удалось получить пользователей", - "could_not_fetch_description": "Проверьте интернет соединение и попробуйте снова", - "refresh_users": "Обновить список пользователей", - "could_not_create_user": "Не удалось создать пользователя", - "could_not_delete_user": "Не удалось стереть пользователя", - "could_not_add_ssh_key": "Не удалось создать SSH ключить", - "email_login": "Авторизация по Email", - "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." - }, - "initializing": { - "connect_to_server": "Подключите сервер", - "place_where_data": "Здесь будут жить наши данные и SelfPrivacy-сервисы", - "how": "Как получить API Token", - "hetzner_bad_key_error": "Hetzner API ключ неверен", - "cloudflare_bad_key_error": "Cloudflare API ключ неверен", - "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", - "connect_cloudflare": "Подключите CloudFlare", - "manage_domain_dns": "Для управления DNS вашего домена", - "cloudflare_api_token": "CloudFlare API Token", - "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", - "no_connected_domains": "На данный момент подлюченных доменов нет", - "loading_domain_list": "Загружаем список доменов", - "found_more_domains": "Найдено больше одного домена, для вашей безопастности, просим Вам удалить не нужные домены", - "save_domain": "Сохранить домен", - "final": "Последний шаг", - "create_server": "Создать сервер", - "what": "Что это значит?", - "server_rebooted": "Сервер презагружен, ждем последнюю проверку.", - "server_started": "Cервер запущен, сейчас он будет проверен и перезагружен.", - "server_created": "Cервер создан, идет проверка ДНС адресов и запуск сервера.", - "until_the_next_check": "До следующей проверки: ", - "check": "Проверка", - "one_more_restart": "Сейчас будет дополнительная перезагрузка для активации сертификатов безопастности", - "create_master_account": "Создайте главную учетную запись", - "enter_nickname_and_password": "Введите никнейм и сложный пароль", - "finish": "Всё инициализировано.", - "checks": "Проверок выполнено: \n{} / {}" - }, - "recovering": { - "recovery_main_header": "Подключиться к существующему серверу", - "domain_recovery_description": "Введите домен, по которому вы хотите получить доступ к серверу:", - "domain_recover_placeholder": "Домен", - "domain_recover_error": "Не удалось найти сервер с таким доменом", - "method_select_description": "Выберите способ входа:", - "method_select_other_device": "У меня есть доступ на другом устройстве", - "method_select_recovery_key": "У меня есть ключ восстановления", - "method_select_nothing": "У меня ничего из этого нет", - "method_device_description": "Откройте приложение на другом устройстве и откройте экран управления устройствами. Нажмите \"Добавить устройство\" чтобы получить токен для авторизации.", - "method_device_button": "Я получил токен", - "method_device_input_description": "Введите ваш токен авторизации", - "method_device_input_placeholder": "Токен", - "method_recovery_input_description": "Введите ваш токен восстановления", - "fallback_select_description": "Что у вас из этого есть? Выберите первое, что подходит:", - "fallback_select_token_copy": "Копия токена авторизации из другой версии приложения.", - "fallback_select_root_ssh": "Root доступ к серверу по SSH.", - "fallback_select_provider_console": "Доступ к консоли хостинга.", - "authorization_failed": "Не удалось войти с этим ключом", - "fallback_select_provider_console_hint": "Например, Hetzner.", - "hetzner_connected": "Подключение к Hetzner", - "hetzner_connected_description": "Связь с сервером установлена. Введите токен Hetzner с доступом к {}:", - "hetzner_connected_placeholder": "Hetzner токен", - "confirm_server": "Подтвердите сервер", - "confirm_server_description": "Нашли сервер! Подтвердите, что это он:", - "confirm_server_accept": "Да, это он", - "confirm_server_decline": "Выбрать другой сервер", - "choose_server": "Выберите сервер", - "choose_server_description": "Не удалось определить, с каким сервером вы устанавливаете связь.", - "no_servers": "На вашем аккаунте нет доступных серверов.", - "domain_not_available_on_token": "Введённый токен не имеет доступа к нужному домену.", - "modal_confirmation_title": "Это действительно ваш сервер?", - "modal_confirmation_description": "Подключение к неправильному серверу может привести к деструктивным последствиям.", - "modal_confirmation_dns_valid": "Обратный DNS корректен", - "modal_confirmation_dns_invalid": "Обратный DNS указывает на другой домен", - "modal_confirmation_ip_valid": "IP совпадает с указанным в DNS записи", - "modal_confirmation_ip_invalid": "IP не совпадает с указанным в DNS записи", - "confirm_cloudflare": "Подключение к Cloudflare", - "confirm_cloudflare_description": "Введите токен Cloudflare, который имеет права на {}:", - "confirm_backblze": "Подключение к Backblaze", - "confirm_backblaze_description": "Введите токен Backblaze, который имеет права на хранилище резервных копий:" - }, - "devices": { - "main_screen": { - "header": "Устройства", - "description": "Эти устройства имеют полный доступ к управлению сервером через приложение SelfPrivacy.", - "this_device": "Это устройство", - "other_devices": "Другие устройства", - "authorize_new_device": "Авторизовать новое устройство", - "access_granted_on" : "Доступ выдан {}", - "tip": "Нажмите на устройство, чтобы отозвать доступ." + "test": "ru-test", + "locale": "ru", + "basis": { + "providers": "Провайдеры", + "providers_title": "Ваш Дата Центр", + "services": "Сервисы", + "services_title": "Ваши личные, приватные и независимые сервисы.", + "users": "Пользователи", + "more": "Ещё", + "next": "Далее", + "got_it": "Понял", + "settings": "Настройки", + "password": "Пароль", + "create": "Создать", + "confirmation": "Подтверждение", + "cancel": "Отменить", + "delete": "Удалить", + "close": "Закрыть", + "connect": "Подключить", + "domain": "Домен", + "saving": "Сохранение…", + "nickname": "Никнейм", + "loading": "Загрузка…", + "later": "Пропустить и настроить потом", + "connect_to_existing": "Подключиться к существующему серверу", + "reset": "Сбросить", + "details": "Детальная информация", + "no_data": "Нет данных", + "wait": "Загрузка", + "remove": "Удалить", + "apply": "Применить", + "done": "Готово", + "continue": "Продолжить" }, - "add_new_device_screen": { - "header": "Авторизация нового устройства", - "description": "Введите этот ключ на новом устройстве:", - "please_wait": "Пожалуйста, подождите", - "tip": "Ключ действителен 10 минут.", - "expired": "Срок действия ключа истёк.", - "get_new_key": "Получить новый ключ" + "more_page": { + "configuration_wizard": "Мастер настройки", + "about_project": "О проекте SelfPrivacy", + "about_application": "О приложении", + "onboarding": "Приветствие", + "console": "Консоль", + "create_ssh_key": "SSH ключи администратора", + "application_settings": "Настройки приложения" }, - "revoke_device_alert": { - "header": "Отозвать доступ?", - "description": "Устройство {} больше не сможет управлять сервером.", - "yes": "Отозвать", - "no": "Отмена" + "console_page": { + "title": "Консоль", + "waiting": "Ждём инициализации…" + }, + "about_us_page": { + "title": "О проекте SelfPrivacy" + }, + "about_application_page": { + "title": "О приложении", + "application_version_text": "Версия приложения v.{}", + "api_version_text": "Версия API сервера v.{}" + }, + "application_settings": { + "title": "Настройки приложения", + "dark_theme_title": "Тёмная тема", + "dark_theme_description": "Сменить цветовую тему", + "reset_config_title": "Сброс настроек", + "reset_config_description": "Сбросить API ключи, а также root пользователя", + "delete_server_title": "Удалить сервер", + "delete_server_description": "Действие приведёт к удалению сервера. После этого он будет недоступен." + }, + "ssh": { + "title": "SSH ключи", + "create": "Добавить SSH ключ", + "delete": "Удалить SSH ключ", + "delete_confirm_question": "Вы уверены, что хотите удалить следующий ключ?", + "subtitle_with_keys": "Ключей: {}", + "subtitle_without_keys": "Ключей нет", + "no_key_name": "Безымянный ключ", + "root_title": "Это ключи суперпользователя", + "root_subtitle": "Владельцы указанных здесь ключей получают полный доступ к данным и настройкам сервера. Добавляйте исключительно свои ключи.", + "input_label": "Публичный ED25519 или RSA ключ" + }, + "onboarding": { + "page1_title": "Цифровая независимость доступна каждому", + "page1_text": "Почта, VPN, Мессенджер, социальная сеть и многое другое на Вашем личном сервере, под Вашим полным контролем.", + "page2_title": "SelfPrivacy — это не облако, а Ваш личный дата-центр", + "page2_text": "SelfPrivacy работает только с вашими сервис-провайдерами: Hetzner, Cloudflare, Backblaze. Если у Вас нет учётных записей, мы поможем их создать." + }, + "resource_chart": { + "month": "Месяц", + "day": "День", + "hour": "Час", + "cpu_title": "Использование процессора", + "network_title": "Использование сети", + "in": "Получено", + "out": "Отправлено" + }, + "server": { + "card_title": "Сервер", + "description": "Это виртуальный компьютер на котором работают все ваши сервисы", + "general_information": "Общая информация", + "resource_usage": "Потребление ресурсов", + "allow_autoupgrade": "Разрешить авто-обновления", + "allow_autoupgrade_hint": "Разрешить автоматическую установку обновлений на сервер", + "reboot_after_upgrade": "Перезагружать после обновлений", + "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", + "server_timezone": "Часовой пояс сервера", + "select_timezone": "Выберите часовой пояс", + "server_id": "ID сервера", + "status": "Статус", + "cpu": "Процессор", + "ram": "Оперативная память", + "disk": "Диск", + "monthly_cost": "Ежемесячная стоимость", + "location": "Размещение", + "core_count": { + "one": "{} ядро", + "two": "{} ядра", + "few": "{} ядра", + "many": "{} ядер", + "other": "{} ядер" + } + }, + "record": { + "root": "Корневой домен", + "api": "SelfPrivacy API", + "cloud": "Файловое облако", + "git": "Git сервер", + "meet": "Видеоконференции", + "social": "Социальная сеть", + "password": "Менеджер паролей", + "vpn": "VPN", + "mx": "MX запись", + "dmarc": "DMARC запись", + "spf": "SPF запись", + "dkim": "DKIM ключ" + }, + "domain": { + "card_title": "Домен", + "screen_title": "Домен и DNS", + "ok": "Записи в норме", + "error": "Обнаружены проблемы", + "error_subtitle": "Нажмите здесь, чтобы исправить", + "refreshing": "Обновление данных…", + "uninitialized": "Данные ещё не получены", + "services_title": "Сервисы", + "services_subtitle": "Записи типа “A” необходимые для работы сервисов.", + "email_title": "Электронная почта", + "email_subtitle": "Записи необходимые для безопасного обмена электронной почтой." + }, + "backup": { + "card_title": "Резервное копирование", + "description": "Выручит Вас в любой ситуации: хакерская атака, удаление сервера и т.д.", + "reupload_key": "Принудительно обновить ключ", + "reuploaded_key": "Ключ на сервере обновлён", + "initialize": "Настроить", + "waiting_for_rebuild": "Через несколько минут можно будет создать первую копию.", + "restore": "Восстановить из копии", + "no_backups": "Резервных копий пока нет", + "create_new": "Создать новую копию", + "creating": "Создание копии: {}%", + "restoring": "Восстановление из копии", + "error_pending": "Сервер вернул ошибку: проверьте её ниже", + "restore_alert": "Вы собираетесь восстановить из копии созданной {}. Все текущие данные будут потеряны. Вы уверены?", + "refresh": "Обновить статус", + "refetch_backups": "Обновить список копий", + "refetching_list": "Через несколько минут список будет обновлён" + }, + "storage": { + "card_title": "Хранилище", + "status_ok": "Проблем на диске не обнаружено", + "status_error": "Заканчивается место на диске", + "disk_usage": "{} использовано", + "disk_total": "{} всего · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "extend_volume_button": "Расширить хранилище", + "extending_volume_title": "Расширение хранилища", + "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", + "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner. Сервер будет перезагружен во время процесса.", + "extending_volume_error": "Не удалось начать расширение хранилища.", + "size": "Размер", + "euro": "Евро", + "data_migration_title": "Миграция данных", + "data_migration_notice": "На время миграции данных все сервисы будут выключены.", + "start_migration_button": "Начать миграцию", + "migration_process": "Мигрируем…", + "migration_done": "Завершить" + }, + "not_ready_card": { + "begin": "Завершите настройку приложения используя ", + "insertion": "@:more.configuration_wizard", + "end": " для продолжения работы", + "in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения." + }, + "service_page": { + "open_in_browser": "Открыть в браузере", + "restart": "Перезапустить сервис", + "disable": "Выключить сервис", + "enable": "Включить сервис", + "move": "Переместить на другой диск", + "uses": "Использует {usage} на {volume}", + "status": { + "active": "Включено и работает", + "inactive": "Остановлено", + "failed": "Не удалось запустить", + "off": "Отключено", + "activating": "Включается", + "deactivating": "Выключается", + "reloading": "Перезапускается" + } + }, + "mail": { + "title": "Почта", + "subtitle": "Электронная почта для семьи или компании.", + "login_info": "Используйте логин и пароль из вкладки пользователей. IMAP порт: 143, STARTTLS. SMTP порт: 587, STARTTLS." + }, + "password_manager": { + "title": "Менеджер паролей", + "subtitle": "Это фундамент Вашей безопасности. Создавать, хранить, копировать пароли между устройствами и вбивать их в формы поможет Bitwarden.", + "login_info": "Аккаунт нужно создать на сайте." + }, + "video": { + "title": "Видеоконференция", + "subtitle": "Jitsi meet — отличный аналог Zoom и Google meet который помимо удобства ещё и гарантирует Вам защищённые высококачественные видеоконференции.", + "login_info": "Аккаунт не требуется." + }, + "cloud": { + "title": "Файловое облако", + "subtitle": "Не позволяйте облачным сервисам просматривать ваши данные. Используйте NextCloud — надёжный дом для всех Ваших данных.", + "login_info": "Логин администратора: admin, пароль такой же как у основного пользователя. Создавайте новых пользователей в интерфейсе администратора NextCloud." + }, + "social_network": { + "title": "Социальная сеть", + "subtitle": "Сложно поверить, но стало возможным создать свою собственную социальную сеть, со своими правилами и аудиторией.", + "login_info": "Аккаунт нужно создать на сайте." + }, + "git": { + "title": "Git-сервер", + "subtitle": "Приватная альтернатива Github, которая принадлежит вам, а не Microsoft.", + "login_info": "Аккаунт нужно создать на сайте. Первый зарегистрированный пользователь становится администратором." + }, + "vpn": { + "title": "VPN сервер", + "subtitle": "Закрытый VPN сервер" + }, + "users": { + "add_new_user": "Добавьте первого пользователя", + "new_user": "Новый пользователь", + "delete_user": "Удалить пользователя", + "not_ready": "Подключите сервер, домен и DNS в разделе Провайдеры чтобы добавить первого пользователя", + "nobody_here": "Здесь будут отображаться пользователи", + "login": "Логин", + "new_user_info_note": "Новый пользователь автоматически получит доступ ко всем сервисам", + "delete_confirm_question": "Вы действительно хотите удалить учетную запись?", + "reset_password": "Сбросить пароль", + "account": "Учетная запись", + "send_registration_data": "Поделиться реквизитами", + "could_not_fetch_users": "Не удалось получить пользователей", + "could_not_fetch_description": "Проверьте интернет соединение и попробуйте снова", + "refresh_users": "Обновить список пользователей", + "could_not_create_user": "Не удалось создать пользователя", + "could_not_delete_user": "Не удалось стереть пользователя", + "could_not_add_ssh_key": "Не удалось создать SSH ключить", + "email_login": "Авторизация по Email", + "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." + }, + "initializing": { + "connect_to_server": "Подключите сервер", + "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", + "how": "Как получить API Token", + "hetzner_bad_key_error": "Hetzner API ключ неверен", + "cloudflare_bad_key_error": "Cloudflare API ключ неверен", + "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", + "connect_cloudflare": "Подключите CloudFlare", + "manage_domain_dns": "Для управления DNS вашего домена", + "cloudflare_api_token": "CloudFlare API ключ", + "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", + "no_connected_domains": "На данный момент подлюченных доменов нет", + "loading_domain_list": "Загружаем список доменов", + "found_more_domains": "Найдено больше одного домена, для вашей безопастности, просим Вам удалить не нужные домены", + "save_domain": "Сохранить домен", + "final": "Последний шаг", + "create_server": "Создать сервер", + "what": "Что это значит?", + "server_rebooted": "Сервер перезагружен, ждём последнюю проверку…", + "server_started": "Сервер запущен. Сейчас он будет проверен и перезагружен…", + "server_created": "Сервер создан. Идёт проверка DNS адресов и запуск сервера…", + "until_the_next_check": "До следующей проверки: ", + "check": "Проверка", + "one_more_restart": "Сейчас будет дополнительная перезагрузка для активации сертификатов безопасности.", + "create_master_account": "Создайте главную учетную запись", + "enter_nickname_and_password": "Введите никнейм и сложный пароль", + "finish": "Всё инициализировано", + "checks": "Проверок выполнено: \n{} / {}" + }, + "recovering": { + "recovery_main_header": "Подключиться к существующему серверу", + "domain_recovery_description": "Введите домен, по которому вы хотите получить доступ к серверу:", + "domain_recover_placeholder": "Домен", + "domain_recover_error": "Не удалось найти сервер с таким доменом", + "method_select_description": "Выберите способ входа:", + "method_select_other_device": "У меня есть доступ на другом устройстве", + "method_select_recovery_key": "У меня есть ключ восстановления", + "method_select_nothing": "У меня ничего из этого нет", + "method_device_description": "Откройте приложение на другом устройстве и откройте экран управления устройствами. Нажмите \"Добавить устройство\" чтобы получить токен для авторизации.", + "method_device_button": "Я получил токен", + "method_device_input_description": "Введите ваш токен авторизации", + "method_device_input_placeholder": "Токен", + "method_recovery_input_description": "Введите ваш токен восстановления", + "fallback_select_description": "Что у вас из этого есть? Выберите первое, что подходит:", + "fallback_select_token_copy": "Копия токена авторизации из другой версии приложения.", + "fallback_select_root_ssh": "Root доступ к серверу по SSH.", + "fallback_select_provider_console": "Доступ к консоли хостинга.", + "authorization_failed": "Не удалось войти с этим ключом", + "fallback_select_provider_console_hint": "Например, Hetzner.", + "hetzner_connected": "Подключение к Hetzner", + "hetzner_connected_description": "Связь с сервером установлена. Введите токен Hetzner с доступом к {}:", + "hetzner_connected_placeholder": "Hetzner токен", + "confirm_server": "Подтвердите сервер", + "confirm_server_description": "Нашли сервер! Подтвердите, что это он:", + "confirm_server_accept": "Да, это он", + "confirm_server_decline": "Выбрать другой сервер", + "choose_server": "Выберите сервер", + "choose_server_description": "Не удалось определить, с каким сервером вы устанавливаете связь.", + "no_servers": "На вашем аккаунте нет доступных серверов.", + "domain_not_available_on_token": "Введённый токен не имеет доступа к нужному домену.", + "modal_confirmation_title": "Это действительно ваш сервер?", + "modal_confirmation_description": "Подключение к неправильному серверу может привести к деструктивным последствиям.", + "modal_confirmation_dns_valid": "Обратный DNS корректен", + "modal_confirmation_dns_invalid": "Обратный DNS указывает на другой домен", + "modal_confirmation_ip_valid": "IP совпадает с указанным в DNS записи", + "modal_confirmation_ip_invalid": "IP не совпадает с указанным в DNS записи", + "confirm_cloudflare": "Подключение к Cloudflare", + "confirm_cloudflare_description": "Введите токен Cloudflare, который имеет права на {}:", + "confirm_backblze": "Подключение к Backblaze", + "confirm_backblaze_description": "Введите токен Backblaze, который имеет права на хранилище резервных копий:", + "confirm_backblaze": "Подключение к Backblaze" + }, + "devices": { + "main_screen": { + "header": "Устройства", + "description": "Эти устройства имеют полный доступ к управлению сервером через приложение SelfPrivacy.", + "this_device": "Это устройство", + "other_devices": "Другие устройства", + "authorize_new_device": "Авторизовать новое устройство", + "access_granted_on": "Доступ выдан {}", + "tip": "Нажмите на устройство, чтобы отозвать доступ." + }, + "add_new_device_screen": { + "header": "Авторизация нового устройства", + "description": "Введите этот ключ на новом устройстве:", + "please_wait": "Пожалуйста, подождите", + "tip": "Ключ действителен 10 минут.", + "expired": "Срок действия ключа истёк.", + "get_new_key": "Получить новый ключ" + }, + "revoke_device_alert": { + "header": "Отозвать доступ?", + "description": "Устройство {} больше не сможет управлять сервером.", + "yes": "Отозвать", + "no": "Отмена" + } + }, + "recovery_key": { + "key_connection_error": "Не удалось соединиться с сервером.", + "key_synchronizing": "Синхронизация…", + "key_main_header": "Ключ восстановления", + "key_main_description": "Требуется для авторизации SelfPrivacy, когда авторизованные устройства недоступны.", + "key_amount_toggle": "Ограничить использования", + "key_amount_field_title": "Макс. кол-во использований", + "key_duedate_toggle": "Ограничить срок использования", + "key_duedate_field_title": "Дата окончания срока", + "key_receive_button": "Получить ключ", + "key_valid": "Ваш ключ действителен", + "key_invalid": "Ваш ключ больше не действителен", + "key_valid_until": "Действителен до {}", + "key_valid_for": "Можно использовать ещё {} раз", + "key_creation_date": "Создан {}", + "key_replace_button": "Сгенерировать новый ключ", + "key_receiving_description": "Запишите этот ключ в безопасном месте. Он предоставляет полный доступ к вашему серверу:", + "key_receiving_info": "Этот ключ больше не будет показан, но вы сможете заменить его новым.", + "key_receiving_done": "Готово!", + "generation_error": "Не удалось сгенерировать ключ. {}" + }, + "modals": { + "already_exists": "Такой сервер уже существует.", + "unexpected_error": "Непредвиденная ошибка со стороны провайдера.", + "destroy_server": "Уничтожить сервер и создать новый?", + "try_again": "Попробовать ещё раз?", + "are_you_sure": "Вы уверены?", + "purge_all_keys": "Стереть все ключи авторизации?", + "purge_all_keys_confirm": "Да, стереть все ключи", + "delete_server_volume": "Удалить сервер и хранилище?", + "reboot": "Перезагрузить", + "you_cant_use_this_api": "Нельзя использовать этот API для доменом с подобным TLD.", + "yes": "Да", + "no": "Нет" + }, + "timer": { + "sec": "{} сек" + }, + "jobs": { + "title": "Задачи", + "start": "Начать выполенение", + "empty": "Задач нет", + "create_user": "Создать пользователя", + "delete_user": "Удалить пользователя", + "service_turn_off": "Остановить", + "service_turn_on": "Запустить", + "job_added": "Задача добавленна", + "run_jobs": "Запустите задачи", + "reboot_success": "Сервер перезагружается", + "reboot_failed": "Не удалось перезагрузить сервер, проверьте логи.", + "config_pull_failed": "Не удалось обновить конфигурацию сервера. Обновление ПО запущено.", + "upgrade_success": "Запущено обновление сервера", + "upgrade_failed": "Обновить сервер не вышло", + "upgrade_server": "Обновить сервер", + "reboot_server": "Перезагрузить сервер", + "create_ssh_key": "Создать SSH ключ для {}", + "delete_ssh_key": "Удалить SSH ключ для {}", + "server_jobs": "Задачи на сервере", + "reset_user_password": "Сбросить пароль пользователя" + }, + "validations": { + "required": "Обязательное поле.", + "invalid_format": "Неверный формат.", + "root_name": "Имя пользователя не может быть 'root'.", + "key_format": "Неверный формат.", + "length_not_equal": "Длина строки []. Должно быть равно {}.", + "length_longer": "Длина строки []. Должно быть меньше либо равно {}.", + "user_already_exist": "Имя уже используется.", + "key_already_exists": "Этот ключ уже добавлен." } - }, - "recovery_key": { - "key_connection_error": "Не удалось соединиться с сервером", - "key_synchronizing": "Синхронизация...", - "key_main_header": "Ключ восстановления", - "key_main_description": "Требуется для авторизации SelfPrivacy, когда авторизованные устройства недоступны.", - "key_amount_toggle": "Ограничить использования", - "key_amount_field_title": "Макс. кол-во использований", - "key_duedate_toggle": "Ограничить срок использования", - "key_duedate_field_title": "Дата окончания срока", - "key_receive_button": "Получить ключ", - "key_valid": "Ваш ключ действителен", - "key_invalid": "Ваш ключ больше не действителен", - "key_valid_until": "Действителен до {}", - "key_valid_for": "Можно использовать ещё {} раз", - "key_creation_date": "Создан {}", - "key_replace_button": "Сгенерировать новый ключ", - "key_receiving_description": "Запишите этот ключ в безопасном месте. Он предоставляет полный доступ к вашему серверу:", - "key_receiving_info": "Этот ключ больше не будет показан, но вы сможете заменить его новым.", - "key_receiving_done": "Готово!", - "generation_error": "Не удалось сгенерировать ключ. {}" - }, - "modals": { - "already_exists": "Такой сервер уже существует.", - "unexpected_error": "Непредвиденная ошибка со стороны провайдера.", - "destroy_server": "Уничтожить сервер и создать новый?", - "try_again": "Попробовать ещё раз?", - "are_you_sure": "Вы уверены?", - "purge_all_keys": "Стереть все ключи авторизации?", - "purge_all_keys_confirm": "Да, стереть все ключи!", - "delete_server_volume": "Удалить сервер и хранилище?", - "reboot": "Перезагрузить", - "you_cant_use_this_api": "Нельзя использовать этот API для доменом с подобным TLD.", - "yes": "Да", - "no": "Нет" - }, - "timer": { - "sec": "{} сек" - }, - "jobs": { - "title": "Задачи", - "start": "Начать выполенение", - "empty": "Пусто.", - "create_user": "Создать пользователя", - "delete_user": "Удалить пользователя", - "service_turn_off": "Остановить", - "service_turn_on": "Запустить", - "job_added": "Задача добавленна", - "run_jobs": "Запустите задачи", - "reboot_success": "Сервер перезагружается", - "reboot_failed": "Не удалось перезагрузить сервер, проверьте логи", - "config_pull_failed": "Не удалось обновить конфигурацию сервера. Обновление ПО запущено.", - "upgrade_success": "Запущено обновление сервера", - "upgrade_failed": "Обновить сервер не вышло", - "upgrade_server": "Обновить сервер", - "reboot_server": "Перезагрузить сервер", - "create_ssh_key": "Создать SSH ключ для {}", - "delete_ssh_key": "Удалить SSH ключ для {}", - "server_jobs": "Задачи на сервере", - "reset_user_password": "Сбросить пароль пользователя" - }, - "validations": { - "required": "Обязательное поле.", - "invalid_format": "Неверный формат.", - "root_name": "Имя пользователя не может быть 'root'.", - "key_format": "Неверный формат.", - "length_not_equal": "Длина строки []. Должно быть равно {}.", - "length_longer": "Длина строки []. Должно быть меньше либо равно {}.", - "user_already_exist": "Имя уже используется.", - "key_already_exists": "Этот ключ уже добавлен." - } } From d8c572661916b61f60df4a32b90d3275d94338ee Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Oct 2022 16:45:39 +0300 Subject: [PATCH 203/732] chore(i18l): Add all plurals to en locale Also add translation status to README --- README.md | 2 ++ assets/translations/en.json | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 2ec6711c..cce3b61f 100644 --- a/README.md +++ b/README.md @@ -45,4 +45,6 @@ flatpak build-bundle flatpak-repo org.selfprivacy.app.flatpak org.selfprivacy.ap ## Translations +[![Translation status](http://weblate.selfprivacy.org/widgets/selfprivacy/-/selfprivacy-app/multi-auto.svg)](http://weblate.selfprivacy.org/engage/selfprivacy/) + Translations are stored in `assets/translations/*.json` and can be edited on . diff --git a/assets/translations/en.json b/assets/translations/en.json index 8e6093f1..c54bd5f6 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -110,6 +110,9 @@ "location": "Location", "core_count": { "one": "{} core", + "two": "{} cores", + "few": "{} cores", + "many": "{} cores", "other": "{} cores" } }, From 699e2f676fab176673ffaceb315673d0d3e3a1b1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 4 Oct 2022 21:58:25 +0300 Subject: [PATCH 204/732] refactor(service): Get rid of legacy common enums --- lib/logic/api_maps/rest_maps/server.dart | 42 ++----- lib/logic/common_enum/common_enum.dart | 112 ------------------ .../cubit/client_jobs/client_jobs_cubit.dart | 6 +- .../server_installation_repository.dart | 3 +- lib/logic/cubit/services/services_cubit.dart | 1 - lib/logic/cubit/services/services_state.dart | 14 +-- lib/logic/models/job.dart | 11 +- lib/logic/models/service.dart | 20 ++++ .../icon_status_mask/icon_status_mask.dart | 6 +- lib/ui/pages/providers/providers.dart | 4 +- lib/ui/pages/server_storage/storage_card.dart | 2 +- lib/ui/pages/services/service_page.dart | 24 +--- lib/ui/pages/services/services.dart | 62 ++++++---- 13 files changed, 89 insertions(+), 218 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index f7e78eba..1cef3dfc 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -13,6 +13,7 @@ import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; +import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ApiResponse { @@ -380,13 +381,13 @@ class ServerApi extends ApiMap { } Future switchService( - final ServiceTypes type, + final Service service, final bool needToTurnOn, ) async { final Dio client = await getClient(); try { client.post( - '/services/${type.url}/${needToTurnOn ? 'enable' : 'disable'}', + '/services/${service.id}/${needToTurnOn ? 'enable' : 'disable'}', ); } on DioError catch (e) { print(e.message); @@ -395,7 +396,7 @@ class ServerApi extends ApiMap { } } - Future> servicesPowerCheck() async { + Future> servicesPowerCheck() async { Response response; final Dio client = await getClient(); @@ -409,11 +410,11 @@ class ServerApi extends ApiMap { } return { - ServiceTypes.bitwarden: response.data['bitwarden'] == 0, - ServiceTypes.gitea: response.data['gitea'] == 0, - ServiceTypes.nextcloud: response.data['nextcloud'] == 0, - ServiceTypes.ocserv: response.data['ocserv'] == 0, - ServiceTypes.pleroma: response.data['pleroma'] == 0, + 'bitwarden': response.data['bitwarden'] == 0, + 'gitea': response.data['gitea'] == 0, + 'nextcloud': response.data['nextcloud'] == 0, + 'ocserv': response.data['ocserv'] == 0, + 'pleroma': response.data['pleroma'] == 0, }; } @@ -867,28 +868,3 @@ class ServerApi extends ApiMap { return ApiResponse(statusCode: code, data: null); } } - -extension UrlServerExt on ServiceTypes { - String get url { - switch (this) { - // case ServiceTypes.mail: - // return ''; // cannot be switch off - // case ServiceTypes.messenger: - // return ''; // external service - // case ServiceTypes.video: - // return ''; // jitsi meet not working - case ServiceTypes.bitwarden: - return 'bitwarden'; - case ServiceTypes.nextcloud: - return 'nextcloud'; - case ServiceTypes.pleroma: - return 'pleroma'; - case ServiceTypes.gitea: - return 'gitea'; - case ServiceTypes.ocserv: - return 'ocserv'; - default: - throw Exception('wrong state'); - } - } -} diff --git a/lib/logic/common_enum/common_enum.dart b/lib/logic/common_enum/common_enum.dart index b1d0b730..69686978 100644 --- a/lib/logic/common_enum/common_enum.dart +++ b/lib/logic/common_enum/common_enum.dart @@ -1,7 +1,3 @@ -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; - enum LoadingStatus { uninitialized, refreshing, @@ -36,111 +32,3 @@ enum Period { } } } - -enum ServiceTypes { - mailserver, - bitwarden, - jitsi, - nextcloud, - pleroma, - gitea, - ocserv, -} - -extension ServiceTypesExt on ServiceTypes { - String get title { - switch (this) { - case ServiceTypes.mailserver: - return 'mail.title'.tr(); - case ServiceTypes.bitwarden: - return 'password_manager.title'.tr(); - case ServiceTypes.jitsi: - return 'video.title'.tr(); - case ServiceTypes.nextcloud: - return 'cloud.title'.tr(); - case ServiceTypes.pleroma: - return 'social_network.title'.tr(); - case ServiceTypes.gitea: - return 'git.title'.tr(); - case ServiceTypes.ocserv: - return 'vpn.title'.tr(); - } - } - - String get subtitle { - switch (this) { - case ServiceTypes.mailserver: - return 'mail.subtitle'.tr(); - case ServiceTypes.bitwarden: - return 'password_manager.subtitle'.tr(); - case ServiceTypes.jitsi: - return 'video.subtitle'.tr(); - case ServiceTypes.nextcloud: - return 'cloud.subtitle'.tr(); - case ServiceTypes.pleroma: - return 'social_network.subtitle'.tr(); - case ServiceTypes.gitea: - return 'git.subtitle'.tr(); - case ServiceTypes.ocserv: - return 'vpn.subtitle'.tr(); - } - } - - String get loginInfo { - switch (this) { - case ServiceTypes.mailserver: - return 'mail.login_info'.tr(); - case ServiceTypes.bitwarden: - return 'password_manager.login_info'.tr(); - case ServiceTypes.jitsi: - return 'video.login_info'.tr(); - case ServiceTypes.nextcloud: - return 'cloud.login_info'.tr(); - case ServiceTypes.pleroma: - return 'social_network.login_info'.tr(); - case ServiceTypes.gitea: - return 'git.login_info'.tr(); - case ServiceTypes.ocserv: - return ''; - } - } - - String get subdomain { - switch (this) { - case ServiceTypes.bitwarden: - return 'password'; - case ServiceTypes.jitsi: - return 'meet'; - case ServiceTypes.nextcloud: - return 'cloud'; - case ServiceTypes.pleroma: - return 'social'; - case ServiceTypes.gitea: - return 'git'; - case ServiceTypes.ocserv: - default: - return ''; - } - } - - IconData get icon { - switch (this) { - case ServiceTypes.mailserver: - return BrandIcons.envelope; - case ServiceTypes.bitwarden: - return BrandIcons.key; - case ServiceTypes.jitsi: - return BrandIcons.webcam; - case ServiceTypes.nextcloud: - return BrandIcons.upload; - case ServiceTypes.pleroma: - return BrandIcons.social; - case ServiceTypes.gitea: - return BrandIcons.git; - case ServiceTypes.ocserv: - return Icons.vpn_lock_outlined; - } - } - - String get txt => toString().split('.')[1]; -} diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index a6d23a23..ca3733fd 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -45,10 +45,10 @@ class JobsCubit extends Cubit { newJobsList.addAll((state as JobsStateWithJobs).clientJobList); } final bool needToRemoveJob = newJobsList - .any((final el) => el is ServiceToggleJob && el.type == job.type); + .any((final el) => el is ServiceToggleJob && el.id == job.id); if (needToRemoveJob) { final ClientJob removingJob = newJobsList.firstWhere( - (final el) => el is ServiceToggleJob && el.type == job.type, + (final el) => el is ServiceToggleJob && el.id == job.id, ); removeJob(removingJob.id); } else { @@ -114,7 +114,7 @@ class JobsCubit extends Cubit { } if (job is ServiceToggleJob) { hasServiceJobs = true; - await api.switchService(job.type.name, job.needToTurnOn); + await api.switchService(job.service.id, job.needToTurnOn); } if (job is CreateSSHKeyJob) { await usersCubit.addSshKey(job.user, job.publicKey); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index c941b9d1..a83e9deb 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -15,7 +15,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_ import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -571,7 +570,7 @@ class ServerInstallationRepository { ); final String serverIp = await getServerIpFromDomain(serverDomain); if (recoveryCapabilities == ServerRecoveryCapabilities.legacy) { - final Map apiResponse = + final Map apiResponse = await serverApi.servicesPowerCheck(); if (apiResponse.isNotEmpty) { return ServerHostingDetails( diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart index 4bb575a6..13d3e84d 100644 --- a/lib/logic/cubit/services/services_cubit.dart +++ b/lib/logic/cubit/services/services_cubit.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index d5aa95eb..2d99880a 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -63,17 +63,17 @@ class ServicesState extends ServerInstallationDependendState { lockedServices, ]; - bool isEnableByType(final ServiceTypes type) { - switch (type) { - case ServiceTypes.bitwarden: + bool isEnableByType(final Service service) { + switch (service.id) { + case 'bitwarden': return isPasswordManagerEnable; - case ServiceTypes.nextcloud: + case 'nextcloud': return isCloudEnable; - case ServiceTypes.pleroma: + case 'pleroma': return isSocialNetworkEnable; - case ServiceTypes.gitea: + case 'gitea': return isGitEnable; - case ServiceTypes.ocserv: + case 'ocserv': return isVpnEnable; default: throw Exception('wrong state'); diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index c3748daa..7938dae7 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/utils/password_generator.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -62,23 +63,23 @@ class DeleteUserJob extends ClientJob { class ToggleJob extends ClientJob { ToggleJob({ - required this.type, + required final this.service, required final super.title, }); - final ServiceTypes type; + final Service service; @override - List get props => [...super.props, type]; + List get props => [...super.props, service]; } class ServiceToggleJob extends ToggleJob { ServiceToggleJob({ - required final super.type, + required super.service, required this.needToTurnOn, }) : super( title: - '${needToTurnOn ? "jobs.service_turn_on".tr() : "jobs.service_turn_off".tr()} ${type.title}', + '${needToTurnOn ? "jobs.service_turn_on".tr() : "jobs.service_turn_off".tr()} ${service.displayName}', ); final bool needToTurnOn; diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 33475588..04c5c6d3 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -1,5 +1,6 @@ import 'dart:convert'; +import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; @@ -20,6 +21,25 @@ class Service { this.url, }); + /// TODO Turn loginInfo into dynamic data, not static! + String get loginInfo { + switch (id) { + case 'mailserver': + return 'mail.login_info'.tr(); + case 'bitwarden': + return 'password_manager.login_info'.tr(); + case 'jitsi': + return 'video.login_info'.tr(); + case 'nextcloud': + return 'cloud.login_info'.tr(); + case 'pleroma': + return 'social_network.login_info'.tr(); + case 'gitea': + return 'git.login_info'.tr(); + } + return ''; + } + Service.fromGraphQL(final Query$AllServices$services$allServices service) : this( id: service.id, diff --git a/lib/ui/components/icon_status_mask/icon_status_mask.dart b/lib/ui/components/icon_status_mask/icon_status_mask.dart index cda75049..8c7a2379 100644 --- a/lib/ui/components/icon_status_mask/icon_status_mask.dart +++ b/lib/ui/components/icon_status_mask/icon_status_mask.dart @@ -4,11 +4,11 @@ import 'package:selfprivacy/logic/models/state_types.dart'; class IconStatusMask extends StatelessWidget { const IconStatusMask({ - required this.child, + required this.icon, required this.status, final super.key, }); - final Icon child; + final Widget icon; final StateType status; @@ -42,7 +42,7 @@ class IconStatusMask extends StatelessWidget { colors: colors, tileMode: TileMode.mirror, ).createShader(bounds), - child: child, + child: icon, ); } } diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 988b609a..0de06295 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -148,12 +148,12 @@ class _Card extends StatelessWidget { children: [ IconStatusMask( status: state, - child: Icon(icon, size: 30, color: Colors.white), + icon: Icon(icon, size: 30, color: Colors.white), ), if (state != StateType.uninitialized) IconStatusMask( status: state, - child: Icon( + icon: Icon( state == StateType.stable ? Icons.check_circle_outline : state == StateType.warning diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index a18e4f86..33a23b9b 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -80,7 +80,7 @@ class StorageCard extends StatelessWidget { if (state != StateType.uninitialized) IconStatusMask( status: state, - child: Icon( + icon: Icon( diskStatus.isDiskOkay ? Icons.check_circle_outline : Icons.error_outline, diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index f4685802..6cd49f28 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -91,7 +91,7 @@ class _ServicePageState extends State { onTap: () => { context.read().createOrRemoveServiceToggleJob( ServiceToggleJob( - type: _idToLegacyType(service.id), + service: service, needToTurnOn: serviceDisabled, ), ), @@ -142,28 +142,6 @@ class _ServicePageState extends State { ], ); } - -// TODO: Get rid as soon as possible - ServiceTypes _idToLegacyType(final String serviceId) { - switch (serviceId) { - case 'mailserver': - return ServiceTypes.mailserver; - case 'jitsi': - return ServiceTypes.jitsi; - case 'bitwarden': - return ServiceTypes.bitwarden; - case 'nextcloud': - return ServiceTypes.nextcloud; - case 'pleroma': - return ServiceTypes.pleroma; - case 'gitea': - return ServiceTypes.gitea; - case 'ocserv': - return ServiceTypes.ocserv; - default: - throw Exception('wrong state'); - } - } } class ServiceStatusCard extends StatelessWidget { diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 4909af13..22fd3c91 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -1,12 +1,14 @@ import 'dart:ui'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; +import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; @@ -21,11 +23,11 @@ import 'package:selfprivacy/utils/ui_helpers.dart'; import 'package:url_launcher/url_launcher.dart'; const switchableServices = [ - ServiceTypes.bitwarden, - ServiceTypes.nextcloud, - ServiceTypes.pleroma, - ServiceTypes.gitea, - ServiceTypes.ocserv, + 'bitwarden', + 'nextcloud', + 'pleroma', + 'gitea', + 'ocserv', ]; class ServicesPage extends StatefulWidget { @@ -70,13 +72,16 @@ class _ServicesPageState extends State { BrandText.body1('basis.services_title'.tr()), const SizedBox(height: 24), if (!isReady) ...[const NotReadyCard(), const SizedBox(height: 24)], - ...ServiceTypes.values + ...context + .read() + .state + .services .map( - (final t) => Padding( + (final service) => Padding( padding: const EdgeInsets.only( bottom: 30, ), - child: _Card(serviceType: t), + child: _Card(service: service), ), ) .toList() @@ -88,9 +93,9 @@ class _ServicesPageState extends State { } class _Card extends StatelessWidget { - const _Card({required this.serviceType}); + const _Card({required this.service}); - final ServiceTypes serviceType; + final Service service; @override Widget build(final BuildContext context) { final isReady = context.watch().state @@ -100,16 +105,16 @@ class _Card extends StatelessWidget { final jobsCubit = context.watch(); final jobState = jobsCubit.state; - final switchableService = switchableServices.contains(serviceType); + final switchableService = switchableServices.contains(service.id); final hasSwitchJob = switchableService && jobState is JobsStateWithJobs && jobState.clientJobList.any( - (final el) => el is ServiceToggleJob && el.type == serviceType, + (final el) => el is ServiceToggleJob && el.id == service.id, ); final isSwitchOn = isReady && - (!switchableServices.contains(serviceType) || - serviceState.isEnableByType(serviceType)); + (!switchableServices.contains(service.id) || + serviceState.isEnableByType(service)); final config = context.watch().state; final domainName = UiHelpers.getDomainName(config); @@ -117,7 +122,7 @@ class _Card extends StatelessWidget { return GestureDetector( onTap: isReady ? () => Navigator.of(context) - .push(materialRoute(ServicePage(serviceId: serviceType.name))) + .push(materialRoute(ServicePage(serviceId: service.id))) : null, child: BrandCards.big( child: Column( @@ -128,7 +133,12 @@ class _Card extends StatelessWidget { IconStatusMask( status: isSwitchOn ? StateType.stable : StateType.uninitialized, - child: Icon(serviceType.icon, size: 30, color: Colors.white), + icon: SvgPicture.string( + service.svgIcon, + width: 30.0, + height: 30.0, + color: Theme.of(context).colorScheme.onBackground, + ), ), if (isReady && switchableService) ...[ const Spacer(), @@ -138,11 +148,11 @@ class _Card extends StatelessWidget { if (hasSwitchJob) { isActive = (jobState.clientJobList.firstWhere( (final el) => - el is ServiceToggleJob && el.type == serviceType, + el is ServiceToggleJob && el.id == service.id, ) as ServiceToggleJob) .needToTurnOn; } else { - isActive = serviceState.isEnableByType(serviceType); + isActive = serviceState.isEnableByType(service); } return BrandSwitch( @@ -150,7 +160,7 @@ class _Card extends StatelessWidget { onChanged: (final value) => jobsCubit.createOrRemoveServiceToggleJob( ServiceToggleJob( - type: serviceType, + service: service, needToTurnOn: value, ), ), @@ -167,17 +177,17 @@ class _Card extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 10), - BrandText.h2(serviceType.title), + BrandText.h2(service.displayName), const SizedBox(height: 10), - if (serviceType.subdomain != '') + if (service.url != '' && service.url != null) Column( children: [ GestureDetector( onTap: () => _launchURL( - 'https://${serviceType.subdomain}.$domainName', + 'https://${service.url}', ), child: Text( - '${serviceType.subdomain}.$domainName', + '${service.url}', style: TextStyle( color: Theme.of(context).colorScheme.secondary, @@ -188,7 +198,7 @@ class _Card extends StatelessWidget { const SizedBox(height: 10), ], ), - if (serviceType == ServiceTypes.mailserver) + if (service.id == 'mailserver') Column( children: [ Text( @@ -201,9 +211,9 @@ class _Card extends StatelessWidget { const SizedBox(height: 10), ], ), - BrandText.body2(serviceType.loginInfo), + BrandText.body2(service.loginInfo), const SizedBox(height: 10), - BrandText.body2(serviceType.subtitle), + BrandText.body2(service.description), const SizedBox(height: 10), ], ), From 1d48f2887dc6688d99581e9c5b2006c2dd4793b7 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 5 Oct 2022 12:15:58 +0000 Subject: [PATCH 205/732] fix(i18l): Fix broken strings for configuration wizard --- assets/translations/en.json | 2 +- assets/translations/ru.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index c54bd5f6..069e0c74 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -185,7 +185,7 @@ }, "not_ready_card": { "begin": "Please finish application setup using ", - "insertion": "@:more.configuration_wizard", + "insertion": "Setup Wizard", "end": " for further work", "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." }, diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 0224f103..d29ae6dc 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -185,7 +185,7 @@ }, "not_ready_card": { "begin": "Завершите настройку приложения используя ", - "insertion": "@:more.configuration_wizard", + "insertion": "Мастер Настройки", "end": " для продолжения работы", "in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения." }, From 2fc20f43c3402b5f40d6cb65e87809a0fb8c74df Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 6 Oct 2022 10:38:29 +0300 Subject: [PATCH 206/732] fix(ui): New app bar now properly supports long titles --- .../brand_hero_screen/brand_hero_screen.dart | 111 ++++++++++++------ lib/ui/helpers/widget_size.dart | 45 +++++++ 2 files changed, 123 insertions(+), 33 deletions(-) create mode 100644 lib/ui/helpers/widget_size.dart diff --git a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart index b36cb2d9..5eb07858 100644 --- a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart +++ b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; +import 'package:selfprivacy/ui/helpers/widget_size.dart'; class BrandHeroScreen extends StatelessWidget { const BrandHeroScreen({ @@ -32,44 +33,17 @@ class BrandHeroScreen extends StatelessWidget { color: Theme.of(context).colorScheme.onBackground, ); final bool hasHeroIcon = heroIcon != null || this.heroIconWidget != null; - const EdgeInsetsGeometry heroTitlePadding = EdgeInsets.only( - bottom: 12.0, - top: 16.0, - ); return Scaffold( floatingActionButton: hasFlashButton ? const BrandFab() : null, body: CustomScrollView( slivers: [ - SliverAppBar( - expandedHeight: hasHeroIcon ? 160.0 : 96.0, - pinned: true, - stretch: true, - leading: hasBackButton - ? IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: onBackButtonPressed ?? - () => Navigator.of(context).pop(), - ) - : null, - flexibleSpace: FlexibleSpaceBar( - title: Text( - heroTitle, - style: Theme.of(context).textTheme.titleLarge?.copyWith( - color: Theme.of(context).colorScheme.onSurface, - ), - ), - expandedTitleScale: 1.2, - centerTitle: true, - collapseMode: CollapseMode.pin, - titlePadding: heroTitlePadding, - background: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (hasHeroIcon) heroIconWidget, - ], - ), - ), + HeroSliverAppBar( + heroTitle: heroTitle, + hasHeroIcon: hasHeroIcon, + hasBackButton: hasBackButton, + onBackButtonPressed: onBackButtonPressed, + heroIconWidget: heroIconWidget, ), if (heroSubtitle != null) SliverPadding( @@ -100,3 +74,74 @@ class BrandHeroScreen extends StatelessWidget { ); } } + +class HeroSliverAppBar extends StatefulWidget { + const HeroSliverAppBar({ + required this.heroTitle, + required this.hasHeroIcon, + required this.hasBackButton, + required this.onBackButtonPressed, + required this.heroIconWidget, + final super.key, + }); + + final String heroTitle; + final bool hasHeroIcon; + final bool hasBackButton; + final VoidCallback? onBackButtonPressed; + final Widget heroIconWidget; + + @override + State createState() => _HeroSliverAppBarState(); +} + +class _HeroSliverAppBarState extends State { + Size _size = Size.zero; + @override + Widget build(final BuildContext context) => SliverAppBar( + expandedHeight: + widget.hasHeroIcon ? 148.0 + _size.height : 72.0 + _size.height, + primary: true, + pinned: true, + stretch: true, + leading: widget.hasBackButton + ? IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: widget.onBackButtonPressed ?? + () => Navigator.of(context).pop(), + ) + : null, + flexibleSpace: FlexibleSpaceBar( + title: LayoutBuilder( + builder: (final context, final constraints) => SizedBox( + width: constraints.maxWidth - 72.0, + child: WidgetSize( + onChange: (final Size size) => setState(() => _size = size), + child: Text( + widget.heroTitle, + style: Theme.of(context).textTheme.titleLarge?.copyWith( + color: Theme.of(context).colorScheme.onSurface, + ), + overflow: TextOverflow.fade, + textAlign: TextAlign.center, + ), + ), + ), + ), + expandedTitleScale: 1.2, + centerTitle: true, + collapseMode: CollapseMode.pin, + titlePadding: const EdgeInsets.only( + bottom: 12.0, + top: 16.0, + ), + background: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + const SizedBox(height: 72.0), + if (widget.hasHeroIcon) widget.heroIconWidget, + ], + ), + ), + ); +} diff --git a/lib/ui/helpers/widget_size.dart b/lib/ui/helpers/widget_size.dart new file mode 100644 index 00000000..11fa7b4f --- /dev/null +++ b/lib/ui/helpers/widget_size.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; + +class WidgetSize extends StatefulWidget { + const WidgetSize({ + required this.onChange, + required this.child, + final super.key, + }); + final Widget child; + final Function onChange; + + @override + State createState() => _WidgetSizeState(); +} + +class _WidgetSizeState extends State { + @override + Widget build(final BuildContext context) { + SchedulerBinding.instance.addPostFrameCallback(postFrameCallback); + return Container( + key: widgetKey, + child: widget.child, + ); + } + + var widgetKey = GlobalKey(); + Size? oldSize; + + void postFrameCallback(_) { + final context = widgetKey.currentContext; + if (context == null) { + return; + } + ; + + final newSize = context.size; + if (oldSize == newSize) { + return; + } + + oldSize = newSize; + widget.onChange(newSize); + } +} From d0be867aa6731d60dae5b37d0e3253f22a32f4b0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 6 Oct 2022 19:15:25 +0000 Subject: [PATCH 207/732] refactor(job): Make jobs execution polymorphic instead of relied on plain switch --- .../cubit/client_jobs/client_jobs_cubit.dart | 30 +++---------- lib/logic/models/job.dart | 44 +++++++++++++++++-- 2 files changed, 47 insertions(+), 27 deletions(-) diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index ca3733fd..6f0c8d1a 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -23,6 +23,8 @@ class JobsCubit extends Cubit { final UsersCubit usersCubit; final ServicesCubit servicesCubit; + bool hasServiceJobs = false; + void addJob(final ClientJob job) { final List newJobsList = []; if (state is JobsStateWithJobs) { @@ -103,31 +105,9 @@ class JobsCubit extends Cubit { if (state is JobsStateWithJobs) { final List jobs = (state as JobsStateWithJobs).clientJobList; emit(JobsStateLoading()); - bool hasServiceJobs = false; + for (final ClientJob job in jobs) { - // TODO: Rewrite to polymorphism - if (job is CreateUserJob) { - await usersCubit.createUser(job.user); - } - if (job is DeleteUserJob) { - await usersCubit.deleteUser(job.user); - } - if (job is ServiceToggleJob) { - hasServiceJobs = true; - await api.switchService(job.service.id, job.needToTurnOn); - } - if (job is CreateSSHKeyJob) { - await usersCubit.addSshKey(job.user, job.publicKey); - } - if (job is DeleteSSHKeyJob) { - await usersCubit.deleteSshKey(job.user, job.publicKey); - } - if (job is ResetUserPasswordJob) { - await usersCubit.changeUserPassword(job.user, job.user.password!); - } - if (job is RebuildServerJob) { - await upgradeServer(); - } + job.execute(this); } await api.pullConfigurationUpdate(); @@ -137,6 +117,8 @@ class JobsCubit extends Cubit { await servicesCubit.load(); } + hasServiceJobs = false; + emit(JobsStateEmpty()); } } diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index 7938dae7..1470c483 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -1,14 +1,14 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/utils/password_generator.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @immutable -class ClientJob extends Equatable { +abstract class ClientJob extends Equatable { ClientJob({ required this.title, final String? id, @@ -17,6 +17,8 @@ class ClientJob extends Equatable { final String title; final String id; + void execute(final JobsCubit cubit); + @override List get props => [id, title]; } @@ -26,6 +28,11 @@ class RebuildServerJob extends ClientJob { required final super.title, final super.id, }); + + @override + void execute(final JobsCubit cubit) async { + await cubit.upgradeServer(); + } } class CreateUserJob extends ClientJob { @@ -35,6 +42,11 @@ class CreateUserJob extends ClientJob { final User user; + @override + void execute(final JobsCubit cubit) async { + await cubit.usersCubit.createUser(user); + } + @override List get props => [id, title, user]; } @@ -46,6 +58,11 @@ class ResetUserPasswordJob extends ClientJob { final User user; + @override + void execute(final JobsCubit cubit) async { + await cubit.usersCubit.changeUserPassword(user, user.password!); + } + @override List get props => [id, title, user]; } @@ -57,11 +74,16 @@ class DeleteUserJob extends ClientJob { final User user; + @override + void execute(final JobsCubit cubit) async { + await cubit.usersCubit.deleteUser(user); + } + @override List get props => [id, title, user]; } -class ToggleJob extends ClientJob { +abstract class ToggleJob extends ClientJob { ToggleJob({ required final this.service, required final super.title, @@ -82,6 +104,12 @@ class ServiceToggleJob extends ToggleJob { '${needToTurnOn ? "jobs.service_turn_on".tr() : "jobs.service_turn_off".tr()} ${service.displayName}', ); + @override + void execute(final JobsCubit cubit) async { + cubit.hasServiceJobs = true; + await cubit.api.switchService(service.id, needToTurnOn); + } + final bool needToTurnOn; } @@ -94,6 +122,11 @@ class CreateSSHKeyJob extends ClientJob { final User user; final String publicKey; + @override + void execute(final JobsCubit cubit) async { + await cubit.usersCubit.addSshKey(user, publicKey); + } + @override List get props => [id, title, user, publicKey]; } @@ -107,6 +140,11 @@ class DeleteSSHKeyJob extends ClientJob { final User user; final String publicKey; + @override + void execute(final JobsCubit cubit) async { + await cubit.usersCubit.deleteSshKey(user, publicKey); + } + @override List get props => [id, title, user, publicKey]; } From 26466bb8d5dc7c2671937a2e5457a577d0f0b8b4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 6 Oct 2022 19:45:25 +0000 Subject: [PATCH 208/732] refactor(job): Force services to always reload after jobs execution --- lib/logic/cubit/client_jobs/client_jobs_cubit.dart | 9 +-------- lib/logic/models/job.dart | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index 6f0c8d1a..dacdcc29 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -23,8 +23,6 @@ class JobsCubit extends Cubit { final UsersCubit usersCubit; final ServicesCubit servicesCubit; - bool hasServiceJobs = false; - void addJob(final ClientJob job) { final List newJobsList = []; if (state is JobsStateWithJobs) { @@ -112,12 +110,7 @@ class JobsCubit extends Cubit { await api.pullConfigurationUpdate(); await api.apply(); - - if (hasServiceJobs) { - await servicesCubit.load(); - } - - hasServiceJobs = false; + await servicesCubit.load(); emit(JobsStateEmpty()); } diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index 1470c483..13abdb72 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -106,7 +106,6 @@ class ServiceToggleJob extends ToggleJob { @override void execute(final JobsCubit cubit) async { - cubit.hasServiceJobs = true; await cubit.api.switchService(service.id, needToTurnOn); } From db2f5c1342e2f9c7e7e56707d04b37a69e592674 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 7 Oct 2022 16:36:17 +0000 Subject: [PATCH 209/732] fix(job): Fix server settings toogles not creating upgrade server job --- .../cubit/client_jobs/client_jobs_cubit.dart | 41 +++++++++++-------- .../pages/server_details/server_settings.dart | 32 ++++----------- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index dacdcc29..d3330d7a 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -24,14 +24,10 @@ class JobsCubit extends Cubit { final ServicesCubit servicesCubit; void addJob(final ClientJob job) { - final List newJobsList = []; - if (state is JobsStateWithJobs) { - final JobsStateWithJobs jobsState = state as JobsStateWithJobs; - newJobsList.addAll(jobsState.clientJobList); - } - newJobsList.add(job); - getIt().showSnackBar('jobs.job_added'.tr()); - emit(JobsStateWithJobs(newJobsList)); + _updateJobsState([ + ...currentJobList, + ...[job] + ]); } void removeJob(final String id) { @@ -58,17 +54,28 @@ class JobsCubit extends Cubit { } } - void createShhJobIfNotExist(final CreateSSHKeyJob job) { - final List newJobsList = []; + List get currentJobList { + final List jobs = []; if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).clientJobList); + jobs.addAll((state as JobsStateWithJobs).clientJobList); } - final bool isExistInJobList = - newJobsList.any((final el) => el is CreateSSHKeyJob); - if (!isExistInJobList) { - newJobsList.add(job); - getIt().showSnackBar('jobs.job_added'.tr()); - emit(JobsStateWithJobs(newJobsList)); + + return jobs; + } + + void _updateJobsState(final List newJobs) { + getIt().showSnackBar('jobs.job_added'.tr()); + emit(JobsStateWithJobs(newJobs)); + } + + void addUniqueJob(final J job) { + final List jobs = currentJobList; + final bool exists = jobs.any((final el) => el is J); + if (!exists) { + _updateJobsState([ + ...jobs, + ...[job] + ]); } } diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index f669dce0..ffeed77f 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -10,7 +10,6 @@ class _ServerSettings extends StatefulWidget { class _ServerSettingsState extends State<_ServerSettings> { bool? allowAutoUpgrade; bool? rebootAfterUpgrade; - bool? didSomethingChange; @override Widget build(final BuildContext context) { @@ -25,18 +24,14 @@ class _ServerSettingsState extends State<_ServerSettings> { rebootAfterUpgrade = serverDetailsState.autoUpgradeSettings.allowReboot; } - didSomethingChange ??= false; - return Column( children: [ SwitchListTile( value: allowAutoUpgrade ?? false, onChanged: (final switched) { - if (didSomethingChange == false) { - context.read().addJob( - RebuildServerJob(title: 'jobs.upgrade_server'.tr()), - ); - } + context.read().addUniqueJob( + RebuildServerJob(title: 'jobs.upgrade_server'.tr()), + ); context .read() .repository @@ -48,7 +43,6 @@ class _ServerSettingsState extends State<_ServerSettings> { ); setState(() { allowAutoUpgrade = switched; - didSomethingChange = true; }); }, title: Text('server.allow_autoupgrade'.tr()), @@ -60,11 +54,9 @@ class _ServerSettingsState extends State<_ServerSettings> { SwitchListTile( value: rebootAfterUpgrade ?? false, onChanged: (final switched) { - if (didSomethingChange == false) { - context.read().addJob( - RebuildServerJob(title: 'jobs.upgrade_server'.tr()), - ); - } + context.read().addUniqueJob( + RebuildServerJob(title: 'jobs.upgrade_server'.tr()), + ); context .read() .repository @@ -76,7 +68,6 @@ class _ServerSettingsState extends State<_ServerSettings> { ); setState(() { rebootAfterUpgrade = switched; - didSomethingChange = true; }); }, title: Text('server.reboot_after_upgrade'.tr()), @@ -91,14 +82,9 @@ class _ServerSettingsState extends State<_ServerSettings> { serverDetailsState.serverTimezone.toString(), ), onTap: () { - if (didSomethingChange == false) { - context.read().addJob( - RebuildServerJob(title: 'jobs.upgrade_server'.tr()), - ); - } - setState(() { - didSomethingChange = true; - }); + context.read().addUniqueJob( + RebuildServerJob(title: 'jobs.upgrade_server'.tr()), + ); Navigator.of(context).push( materialRoute( const SelectTimezone(), From 7bad11967a5c102fd7b558d598d9fa56cb9ad907 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 7 Oct 2022 17:50:18 +0000 Subject: [PATCH 210/732] refactor(job): Implement polymorphic predicate for job accessibility Now every job type can impement canAddTo function to make JobsCubit know whether it can be applied or not --- .../cubit/client_jobs/client_jobs_cubit.dart | 41 +++------------ lib/logic/models/job.dart | 51 ++++++++++++------- .../pages/server_details/server_settings.dart | 6 +-- lib/ui/pages/services/service_page.dart | 2 +- lib/ui/pages/services/services.dart | 3 +- 5 files changed, 46 insertions(+), 57 deletions(-) diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index d3330d7a..e9378bed 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -24,10 +24,13 @@ class JobsCubit extends Cubit { final ServicesCubit servicesCubit; void addJob(final ClientJob job) { - _updateJobsState([ - ...currentJobList, - ...[job] - ]); + final jobs = currentJobList; + if (job.canAddTo(jobs)) { + _updateJobsState([ + ...jobs, + ...[job], + ]); + } } void removeJob(final String id) { @@ -35,25 +38,6 @@ class JobsCubit extends Cubit { emit(newState); } - void createOrRemoveServiceToggleJob(final ToggleJob job) { - final List newJobsList = []; - if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).clientJobList); - } - final bool needToRemoveJob = newJobsList - .any((final el) => el is ServiceToggleJob && el.id == job.id); - if (needToRemoveJob) { - final ClientJob removingJob = newJobsList.firstWhere( - (final el) => el is ServiceToggleJob && el.id == job.id, - ); - removeJob(removingJob.id); - } else { - newJobsList.add(job); - getIt().showSnackBar('jobs.job_added'.tr()); - emit(JobsStateWithJobs(newJobsList)); - } - } - List get currentJobList { final List jobs = []; if (state is JobsStateWithJobs) { @@ -68,17 +52,6 @@ class JobsCubit extends Cubit { emit(JobsStateWithJobs(newJobs)); } - void addUniqueJob(final J job) { - final List jobs = currentJobList; - final bool exists = jobs.any((final el) => el is J); - if (!exists) { - _updateJobsState([ - ...jobs, - ...[job] - ]); - } - } - Future rebootServer() async { emit(JobsStateLoading()); final bool isSuccessful = await api.reboot(); diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index 13abdb72..cf55be9e 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -17,6 +17,7 @@ abstract class ClientJob extends Equatable { final String title; final String id; + bool canAddTo(final List jobs) => true; void execute(final JobsCubit cubit); @override @@ -25,10 +26,14 @@ abstract class ClientJob extends Equatable { class RebuildServerJob extends ClientJob { RebuildServerJob({ - required final super.title, - final super.id, + required super.title, + super.id, }); + @override + bool canAddTo(final List jobs) => + super.canAddTo(jobs) && !jobs.any((final job) => job is RebuildServerJob); + @override void execute(final JobsCubit cubit) async { await cubit.upgradeServer(); @@ -74,6 +79,12 @@ class DeleteUserJob extends ClientJob { final User user; + @override + bool canAddTo(final List jobs) => + super.canAddTo(jobs) && + !jobs.any( + (final job) => job is DeleteUserJob && job.user.login == user.login); + @override void execute(final JobsCubit cubit) async { await cubit.usersCubit.deleteUser(user); @@ -83,33 +94,31 @@ class DeleteUserJob extends ClientJob { List get props => [id, title, user]; } -abstract class ToggleJob extends ClientJob { - ToggleJob({ - required final this.service, - required final super.title, - }); - - final Service service; - - @override - List get props => [...super.props, service]; -} - -class ServiceToggleJob extends ToggleJob { +class ServiceToggleJob extends ClientJob { ServiceToggleJob({ - required super.service, + required this.service, required this.needToTurnOn, }) : super( title: '${needToTurnOn ? "jobs.service_turn_on".tr() : "jobs.service_turn_off".tr()} ${service.displayName}', ); + final bool needToTurnOn; + final Service service; + + @override + bool canAddTo(final List jobs) => + super.canAddTo(jobs) && + !jobs.any((final job) => + job is ServiceToggleJob && job.service.id == service.id); + @override void execute(final JobsCubit cubit) async { await cubit.api.switchService(service.id, needToTurnOn); } - final bool needToTurnOn; + @override + List get props => [...super.props, service]; } class CreateSSHKeyJob extends ClientJob { @@ -139,6 +148,14 @@ class DeleteSSHKeyJob extends ClientJob { final User user; final String publicKey; + @override + bool canAddTo(final List jobs) => + super.canAddTo(jobs) && + !jobs.any((final job) => + job is DeleteSSHKeyJob && + job.publicKey == publicKey && + job.user.login == user.login); + @override void execute(final JobsCubit cubit) async { await cubit.usersCubit.deleteSshKey(user, publicKey); diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index ffeed77f..a9facd5d 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -29,7 +29,7 @@ class _ServerSettingsState extends State<_ServerSettings> { SwitchListTile( value: allowAutoUpgrade ?? false, onChanged: (final switched) { - context.read().addUniqueJob( + context.read().addJob( RebuildServerJob(title: 'jobs.upgrade_server'.tr()), ); context @@ -54,7 +54,7 @@ class _ServerSettingsState extends State<_ServerSettings> { SwitchListTile( value: rebootAfterUpgrade ?? false, onChanged: (final switched) { - context.read().addUniqueJob( + context.read().addJob( RebuildServerJob(title: 'jobs.upgrade_server'.tr()), ); context @@ -82,7 +82,7 @@ class _ServerSettingsState extends State<_ServerSettings> { serverDetailsState.serverTimezone.toString(), ), onTap: () { - context.read().addUniqueJob( + context.read().addJob( RebuildServerJob(title: 'jobs.upgrade_server'.tr()), ); Navigator.of(context).push( diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 6cd49f28..35741016 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -89,7 +89,7 @@ class _ServicePageState extends State { ListTile( iconColor: Theme.of(context).colorScheme.onBackground, onTap: () => { - context.read().createOrRemoveServiceToggleJob( + context.read().addJob( ServiceToggleJob( service: service, needToTurnOn: serviceDisabled, diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 22fd3c91..89a7348a 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -157,8 +157,7 @@ class _Card extends StatelessWidget { return BrandSwitch( value: isActive, - onChanged: (final value) => - jobsCubit.createOrRemoveServiceToggleJob( + onChanged: (final value) => jobsCubit.addJob( ServiceToggleJob( service: service, needToTurnOn: value, From 0b5f8b6920532205ebf4d2a0361dd9d6b581e2e7 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 8 Oct 2022 16:17:58 +0000 Subject: [PATCH 211/732] fix(job): Remove unnecessary cascade validation calls --- lib/logic/models/job.dart | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index cf55be9e..076e0d16 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -32,7 +32,7 @@ class RebuildServerJob extends ClientJob { @override bool canAddTo(final List jobs) => - super.canAddTo(jobs) && !jobs.any((final job) => job is RebuildServerJob); + !jobs.any((final job) => job is RebuildServerJob); @override void execute(final JobsCubit cubit) async { @@ -80,10 +80,9 @@ class DeleteUserJob extends ClientJob { final User user; @override - bool canAddTo(final List jobs) => - super.canAddTo(jobs) && - !jobs.any( - (final job) => job is DeleteUserJob && job.user.login == user.login); + bool canAddTo(final List jobs) => !jobs.any( + (final job) => job is DeleteUserJob && job.user.login == user.login, + ); @override void execute(final JobsCubit cubit) async { @@ -107,10 +106,9 @@ class ServiceToggleJob extends ClientJob { final Service service; @override - bool canAddTo(final List jobs) => - super.canAddTo(jobs) && - !jobs.any((final job) => - job is ServiceToggleJob && job.service.id == service.id); + bool canAddTo(final List jobs) => !jobs.any( + (final job) => job is ServiceToggleJob && job.service.id == service.id, + ); @override void execute(final JobsCubit cubit) async { @@ -149,12 +147,12 @@ class DeleteSSHKeyJob extends ClientJob { final String publicKey; @override - bool canAddTo(final List jobs) => - super.canAddTo(jobs) && - !jobs.any((final job) => - job is DeleteSSHKeyJob && - job.publicKey == publicKey && - job.user.login == user.login); + bool canAddTo(final List jobs) => !jobs.any( + (final job) => + job is DeleteSSHKeyJob && + job.publicKey == publicKey && + job.user.login == user.login, + ); @override void execute(final JobsCubit cubit) async { From c4f3b7641448b2f6d6cc78a0806046534da2aa72 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 8 Oct 2022 16:14:20 +0000 Subject: [PATCH 212/732] fix(validations): Make validations and errors text more specific --- assets/translations/en.json | 17 +++++++++-------- assets/translations/ru.json | 17 +++++++++-------- .../forms/factories/field_cubit_factory.dart | 4 ++-- .../initializing/dns_provider_form_cubit.dart | 2 +- .../setup/initializing/provider_form_cubit.dart | 2 +- lib/logic/cubit/forms/user/ssh_form_cubit.dart | 4 ++-- lib/ui/pages/users/new_user.dart | 8 ++++++++ 7 files changed, 32 insertions(+), 22 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 069e0c74..b77371aa 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -258,6 +258,7 @@ "could_not_create_user": "Couldn't create user", "could_not_delete_user": "Couldn't delete user", "could_not_add_ssh_key": "Couldn't add SSH key", + "username_rule": "Must contain only lowercase latin letters, digits and underscores, should not start with a digit", "email_login": "Email login", "no_ssh_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." }, @@ -418,13 +419,13 @@ "reset_user_password": "Reset password of user" }, "validations": { - "required": "Required.", - "invalid_format": "Invalid format.", - "root_name": "User name cannot be 'root'.", - "key_format": "Invalid key format.", - "length_not_equal": "Length is []. Should be {}.", - "length_longer": "Length is []. Should be shorter than or equal to {}.", - "user_already_exist": "This user already exists.", - "key_already_exists": "This key already exists." + "required": "Required", + "already_exist": "Already exists", + "invalid_format": "Invalid format", + "invalid_format_password": "Must not contain empty characters", + "invalid_format_ssh": "Must follow the SSH key format", + "root_name": "Cannot be 'root'", + "length_not_equal": "Length is [], should be {}", + "length_longer": "Length is [], should be shorter than or equal to {}" } } diff --git a/assets/translations/ru.json b/assets/translations/ru.json index d29ae6dc..11194ea0 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -258,6 +258,7 @@ "could_not_create_user": "Не удалось создать пользователя", "could_not_delete_user": "Не удалось стереть пользователя", "could_not_add_ssh_key": "Не удалось создать SSH ключить", + "username_rule": "Может содержать только маленькие латинские буквы, цифры, подчёркивания, не может начинаться с цифр", "email_login": "Авторизация по Email", "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." }, @@ -419,13 +420,13 @@ "reset_user_password": "Сбросить пароль пользователя" }, "validations": { - "required": "Обязательное поле.", - "invalid_format": "Неверный формат.", - "root_name": "Имя пользователя не может быть 'root'.", - "key_format": "Неверный формат.", - "length_not_equal": "Длина строки []. Должно быть равно {}.", - "length_longer": "Длина строки []. Должно быть меньше либо равно {}.", - "user_already_exist": "Имя уже используется.", - "key_already_exists": "Этот ключ уже добавлен." + "required": "Обязательное поле", + "already_exist": "Уже существует", + "invalid_format": "Неверный формат", + "invalid_format_password": "Должен не содержать пустые символы", + "invalid_format_ssh": "Должен следовать формату SSH ключей", + "root_name": "Имя пользователя не может быть 'root'", + "length_not_equal": "Длина строки [], должно быть равно {}", + "length_longer": "Длина строки [], должно быть меньше либо равно {}" } } diff --git a/lib/logic/cubit/forms/factories/field_cubit_factory.dart b/lib/logic/cubit/forms/factories/field_cubit_factory.dart index 62067cea..724dfb4c 100644 --- a/lib/logic/cubit/forms/factories/field_cubit_factory.dart +++ b/lib/logic/cubit/forms/factories/field_cubit_factory.dart @@ -28,7 +28,7 @@ class FieldCubitFactory { ValidationModel( (final String login) => context.read().state.isLoginRegistered(login), - 'validations.user_already_exist'.tr(), + 'validations.already_exist'.tr(), ), RequiredStringValidation('validations.required'.tr()), LengthStringLongerValidation(userMaxLength), @@ -52,7 +52,7 @@ class FieldCubitFactory { RequiredStringValidation('validations.required'.tr()), ValidationModel( passwordForbiddenRegExp.hasMatch, - 'validations.invalid_format'.tr(), + 'validations.invalid_format_password'.tr(), ), ], ); diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index d27d7053..c2348a69 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -14,7 +14,7 @@ class DnsProviderFormCubit extends FormCubit { RequiredStringValidation('validations.required'.tr()), ValidationModel( regExp.hasMatch, - 'validations.key_format'.tr(), + 'validations.invalid_format'.tr(), ), LengthStringNotEqualValidation(40) ], diff --git a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart index 9f3b5d58..44f40b57 100644 --- a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart @@ -15,7 +15,7 @@ class ProviderFormCubit extends FormCubit { RequiredStringValidation('validations.required'.tr()), ValidationModel( regExp.hasMatch, - 'validations.key_format'.tr(), + 'validations.invalid_format'.tr(), ), LengthStringNotEqualValidation(64) ], diff --git a/lib/logic/cubit/forms/user/ssh_form_cubit.dart b/lib/logic/cubit/forms/user/ssh_form_cubit.dart index ba992af0..9ed389d2 100644 --- a/lib/logic/cubit/forms/user/ssh_form_cubit.dart +++ b/lib/logic/cubit/forms/user/ssh_form_cubit.dart @@ -21,7 +21,7 @@ class SshFormCubit extends FormCubit { ValidationModel( (final String newKey) => user.sshKeys.any((final String key) => key == newKey), - 'validations.key_already_exists'.tr(), + 'validations.already_exists'.tr(), ), RequiredStringValidation('validations.required'.tr()), ValidationModel( @@ -30,7 +30,7 @@ class SshFormCubit extends FormCubit { print(keyRegExp.hasMatch(s)); return !keyRegExp.hasMatch(s); }, - 'validations.invalid_format'.tr(), + 'validations.invalid_format_ssh'.tr(), ), ], ); diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 38ec74b7..c0f3496c 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -55,6 +55,14 @@ class NewUser extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ + if (context.read().state.isErrorShown) + Text( + 'users.username_rule'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + const SizedBox(width: 14), IntrinsicHeight( child: CubitFormTextField( formFieldCubit: context.read().login, From f4e588c435c2989084f7550a55255d31a46b8662 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 8 Oct 2022 19:22:08 +0000 Subject: [PATCH 213/732] fix(user): Replace cubit context read with state variable on login page --- lib/ui/pages/setup/initializing.dart | 8 ++++++++ lib/ui/pages/users/new_user.dart | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 102c5a9b..00640df6 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -418,6 +418,14 @@ class InitializingPage extends StatelessWidget { 'initializing.enter_nickname_and_password'.tr(), ), const Spacer(), + if (formCubitState.isErrorShown) + Text( + 'users.username_rule'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + const SizedBox(height: 10), CubitFormTextField( formFieldCubit: context.read().userName, textAlign: TextAlign.center, diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index c0f3496c..69215dda 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -55,7 +55,7 @@ class NewUser extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - if (context.read().state.isErrorShown) + if (formCubitState.isErrorShown) Text( 'users.username_rule'.tr(), style: TextStyle( From a305e0b53f70d7ab371395531c307097197d0a77 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 8 Oct 2022 19:28:07 +0000 Subject: [PATCH 214/732] fix(assets): Change naming to conventional and consistent 'username' --- assets/translations/en.json | 6 +++--- assets/translations/ru.json | 6 +++--- lib/ui/pages/setup/initializing.dart | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index b77371aa..a0ce11e6 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -20,7 +20,7 @@ "connect": "Connect", "domain": "Domain", "saving": "Saving…", - "nickname": "Nickname", + "username": "Username", "loading": "Loading…", "later": "Skip to setup later", "connect_to_existing": "Connect to an existing server", @@ -258,7 +258,7 @@ "could_not_create_user": "Couldn't create user", "could_not_delete_user": "Couldn't delete user", "could_not_add_ssh_key": "Couldn't add SSH key", - "username_rule": "Must contain only lowercase latin letters, digits and underscores, should not start with a digit", + "username_rule": "Username must contain only lowercase latin letters, digits and underscores, should not start with a digit", "email_login": "Email login", "no_ssh_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." }, @@ -287,7 +287,7 @@ "check": "Check", "one_more_restart": "One more restart to apply your security certificates.", "create_master_account": "Create master account", - "enter_nickname_and_password": "Enter a nickname and strong password", + "enter_username_and_password": "Enter username and strong password", "finish": "Everything is initialized", "checks": "Checks have been completed \n{} out of {}" }, diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 11194ea0..04b832da 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -20,7 +20,7 @@ "connect": "Подключить", "domain": "Домен", "saving": "Сохранение…", - "nickname": "Никнейм", + "username": "Имя пользователя", "loading": "Загрузка…", "later": "Пропустить и настроить потом", "connect_to_existing": "Подключиться к существующему серверу", @@ -258,7 +258,7 @@ "could_not_create_user": "Не удалось создать пользователя", "could_not_delete_user": "Не удалось стереть пользователя", "could_not_add_ssh_key": "Не удалось создать SSH ключить", - "username_rule": "Может содержать только маленькие латинские буквы, цифры, подчёркивания, не может начинаться с цифр", + "username_rule": "Имя может содержать только маленькие латинские буквы, цифры, подчёркивания, не может начинаться с цифр", "email_login": "Авторизация по Email", "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." }, @@ -287,7 +287,7 @@ "check": "Проверка", "one_more_restart": "Сейчас будет дополнительная перезагрузка для активации сертификатов безопасности.", "create_master_account": "Создайте главную учетную запись", - "enter_nickname_and_password": "Введите никнейм и сложный пароль", + "enter_username_and_password": "Введите имя пользователя и сложный пароль", "finish": "Всё инициализировано", "checks": "Проверок выполнено: \n{} / {}" }, diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 00640df6..02af3a59 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -415,23 +415,23 @@ class InitializingPage extends StatelessWidget { BrandText.h2('initializing.create_master_account'.tr()), const SizedBox(height: 10), BrandText.body2( - 'initializing.enter_nickname_and_password'.tr(), + 'initializing.enter_username_and_password'.tr(), ), const Spacer(), if (formCubitState.isErrorShown) - Text( - 'users.username_rule'.tr(), - style: TextStyle( - color: Theme.of(context).colorScheme.error, - ), - ), - const SizedBox(height: 10), + Text( + 'users.username_rule'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + const SizedBox(height: 10), CubitFormTextField( formFieldCubit: context.read().userName, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), decoration: InputDecoration( - hintText: 'basis.nickname'.tr(), + hintText: 'basis.username'.tr(), ), ), const SizedBox(height: 10), From ee160042f85b102ef0eee668f33a5b77bc7931cc Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 11 Oct 2022 16:43:12 +0000 Subject: [PATCH 215/732] feat(digital-ocean): Add Digital Ocean logo asset --- assets/images/logos/digital_ocean.png | Bin 0 -> 36947 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 assets/images/logos/digital_ocean.png diff --git a/assets/images/logos/digital_ocean.png b/assets/images/logos/digital_ocean.png new file mode 100644 index 0000000000000000000000000000000000000000..04f5efd557c386f828a6aa90cc44119bd88b92d7 GIT binary patch literal 36947 zcmeFZ^;;X!)&`p3?(Xic!L4X*_FnJ%u9ZktWm!}tA|wC+fGRKdNgV)yGJtG1BEUhOyOfq&AulkN5=s&P zKz%&&t0^qxJ%zcPx)K23MF#)`ga81~kdFe60037G0N}&~01!+E0Pr2Nf2#>YzJN3P zEc*%Y@t;S2XIV02Pk{U<2~Cfc^EU%qL!C^z2)~aNAvaq%c>$c_ugQgWD@j&b=tvfB zKR;6=AZo;mz{XSr4*{q8d*%hS_J3HQvj9cVgZ=VDdwV-bNJft;IyBM6iQsP>1K=iv z(*taq#F0Wd$af*uj*t=p#$79}g6da%dBAgvotxBzWBRZXzW3Z|m6l z&yGy_X7Lool82`&R{1ciMr#cqsW|wfeXTt!(#VKX7`FfYGIVgK$wvsQ>Z^i0(*-mjguK-z^HS{NVuq_>Bi5{WG2#QF_K-(dhz6;NgP5b$t0ilHI-gltsJW zDl#u&GZ+I-`|n8hJ`j21w`3~XRfY1&`8P=aFoo@50-p2ewEw-D7T{H@m!$)AAe)f% zSoQN37F9b0wYErj0mkrT1%|J_FgKazJ7!sGd1Ny8TC&0HdSny#_OJct>UDKu0mw!fQsVNw0XD(&yVJgLo>sbj^@UhSg|JGO#ag@J7Mh} z>@3Mxb02L771agS#`F5!+v{hvY%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 17 00:00:00 2001 From: NaiJi Date: Tue, 11 Oct 2022 20:11:13 +0000 Subject: [PATCH 216/732] feat(digital-ocean): Implement provider picker pages --- assets/translations/en.json | 3 +- assets/translations/ru.json | 2 +- .../rest_maps/api_factory_creator.dart | 5 + .../digital_ocean/digital_ocean.dart | 559 ++++++++++++++++++ .../digital_ocean/digital_ocean_factory.dart | 26 + .../server_providers/hetzner/hetzner.dart | 2 +- .../initializing/provider_form_cubit.dart | 4 +- .../server_installation_cubit.dart | 18 +- .../server_installation_repository.dart | 22 +- .../server_installation_state.dart | 2 +- lib/logic/get_it/api_config.dart | 12 +- lib/logic/models/hive/server_details.dart | 2 + lib/main.dart | 2 +- .../not_ready_card/not_ready_card.dart | 2 +- lib/ui/pages/more/more.dart | 2 +- .../{ => initializing}/initializing.dart | 49 +- .../setup/initializing/provider_picker.dart | 209 +++++++ .../setup/recovering/recovery_routing.dart | 2 +- 18 files changed, 843 insertions(+), 80 deletions(-) create mode 100644 lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart create mode 100644 lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart rename lib/ui/pages/setup/{ => initializing}/initializing.dart (92%) create mode 100644 lib/ui/pages/setup/initializing/provider_picker.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index a0ce11e6..bf8e4e2c 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -264,9 +264,10 @@ }, "initializing": { "connect_to_server": "Connect a server", + "select_provider": "Select your provider", "place_where_data": "A place where your data and SelfPrivacy services will reside:", "how": "How to obtain API token", - "hetzner_bad_key_error": "Hetzner API key is invalid", + "provider_bad_key_error": "Provider API key is invalid", "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", "connect_cloudflare": "Connect CloudFlare", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 04b832da..604edf35 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -266,7 +266,7 @@ "connect_to_server": "Подключите сервер", "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", "how": "Как получить API Token", - "hetzner_bad_key_error": "Hetzner API ключ неверен", + "provider_bad_key_error": "API ключ провайдера неверен", "cloudflare_bad_key_error": "Cloudflare API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", "connect_cloudflare": "Подключите CloudFlare", diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 18b4ea33..a144c647 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -17,6 +18,8 @@ class ApiFactoryCreator { switch (provider) { case ServerProvider.hetzner: return HetznerApiFactory(); + case ServerProvider.digitalOcean: + return DigitalOceanApiFactory(); case ServerProvider.unknown: throw UnknownApiProviderException('Unknown server provider'); } @@ -41,6 +44,8 @@ class VolumeApiFactoryCreator { switch (provider) { case ServerProvider.hetzner: return HetznerApiFactory(); + case ServerProvider.digitalOcean: + return DigitalOceanApiFactory(); case ServerProvider.unknown: throw UnknownApiProviderException('Unknown volume provider'); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart new file mode 100644 index 00000000..159b68d8 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -0,0 +1,559 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/utils/password_generator.dart'; + +class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { + DigitalOceanApi( + {final this.hasLogger = false, final this.isWithToken = true}); + @override + bool hasLogger; + @override + bool isWithToken; + + @override + BaseOptions get options { + final BaseOptions options = BaseOptions(baseUrl: rootAddress); + if (isWithToken) { + final String? token = getIt().serverProviderKey; + assert(token != null); + options.headers = {'Authorization': 'Bearer $token'}; + } + + if (validateStatus != null) { + options.validateStatus = validateStatus!; + } + + return options; + } + + @override + String rootAddress = 'https://api.digitalocean.com/v2'; + + @override + Future isApiTokenValid(final String token) async { + bool isValid = false; + Response? response; + final Dio client = await getClient(); + try { + response = await client.get( + '/servers', + options: Options( + headers: {'Authorization': 'Bearer $token'}, + ), + ); + } catch (e) { + print(e); + isValid = false; + } finally { + close(client); + } + + if (response != null) { + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + } + + return isValid; + } + + @override + RegExp getApiTokenValidation() => + RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + + @override + Future getPricePerGb() async { + double? price; + + final Response dbGetResponse; + final Dio client = await getClient(); + try { + dbGetResponse = await client.get('/pricing'); + + final volume = dbGetResponse.data['pricing']['volume']; + final volumePrice = volume['price_per_gb_month']['gross']; + price = double.parse(volumePrice); + } catch (e) { + print(e); + } finally { + client.close(); + } + + return price; + } + + @override + Future createVolume() async { + ServerVolume? volume; + + final Response dbCreateResponse; + final Dio client = await getClient(); + try { + dbCreateResponse = await client.post( + '/volumes', + data: { + 'size': 10, + 'name': StringGenerators.dbStorageName(), + 'labels': {'labelkey': 'value'}, + 'location': 'fsn1', + 'automount': false, + 'format': 'ext4' + }, + ); + final dbId = dbCreateResponse.data['volume']['id']; + final dbSize = dbCreateResponse.data['volume']['size']; + final dbServer = dbCreateResponse.data['volume']['server']; + final dbName = dbCreateResponse.data['volume']['name']; + final dbDevice = dbCreateResponse.data['volume']['linux_device']; + volume = ServerVolume( + id: dbId, + name: dbName, + sizeByte: dbSize, + serverId: dbServer, + linuxDevice: dbDevice, + ); + } catch (e) { + print(e); + } finally { + client.close(); + } + + return volume; + } + + @override + Future> getVolumes({final String? status}) async { + final List volumes = []; + + final Response dbGetResponse; + final Dio client = await getClient(); + try { + dbGetResponse = await client.get( + '/volumes', + queryParameters: { + 'status': status, + }, + ); + final List rawVolumes = dbGetResponse.data['volumes']; + for (final rawVolume in rawVolumes) { + final int dbId = rawVolume['id']; + final int dbSize = rawVolume['size'] * 1024 * 1024 * 1024; + final dbServer = rawVolume['server']; + final String dbName = rawVolume['name']; + final dbDevice = rawVolume['linux_device']; + final volume = ServerVolume( + id: dbId, + name: dbName, + sizeByte: dbSize, + serverId: dbServer, + linuxDevice: dbDevice, + ); + volumes.add(volume); + } + } catch (e) { + print(e); + } finally { + client.close(); + } + + return volumes; + } + + @override + Future getVolume(final int id) async { + ServerVolume? volume; + + final Response dbGetResponse; + final Dio client = await getClient(); + try { + dbGetResponse = await client.get('/volumes/$id'); + final int dbId = dbGetResponse.data['volume']['id']; + final int dbSize = dbGetResponse.data['volume']['size']; + final int dbServer = dbGetResponse.data['volume']['server']; + final String dbName = dbGetResponse.data['volume']['name']; + final dbDevice = dbGetResponse.data['volume']['linux_device']; + volume = ServerVolume( + id: dbId, + name: dbName, + sizeByte: dbSize, + serverId: dbServer, + linuxDevice: dbDevice, + ); + } catch (e) { + print(e); + } finally { + client.close(); + } + + return volume; + } + + @override + Future deleteVolume(final int id) async { + final Dio client = await getClient(); + try { + await client.delete('/volumes/$id'); + } catch (e) { + print(e); + } finally { + client.close(); + } + } + + @override + Future attachVolume(final int volumeId, final int serverId) async { + bool success = false; + + final Response dbPostResponse; + final Dio client = await getClient(); + try { + dbPostResponse = await client.post( + '/volumes/$volumeId/actions/attach', + data: { + 'automount': true, + 'server': serverId, + }, + ); + success = dbPostResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return success; + } + + @override + Future detachVolume(final int volumeId) async { + bool success = false; + + final Response dbPostResponse; + final Dio client = await getClient(); + try { + dbPostResponse = await client.post('/volumes/$volumeId/actions/detach'); + success = dbPostResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return success; + } + + @override + Future resizeVolume(final int volumeId, final int sizeGb) async { + bool success = false; + + final Response dbPostResponse; + final Dio client = await getClient(); + try { + dbPostResponse = await client.post( + '/volumes/$volumeId/actions/resize', + data: { + 'size': sizeGb, + }, + ); + success = dbPostResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return success; + } + + @override + Future createServer({ + required final String dnsApiToken, + required final User rootUser, + required final String domainName, + }) async { + ServerHostingDetails? details; + + final ServerVolume? newVolume = await createVolume(); + if (newVolume == null) { + return details; + } + + details = await createServerWithVolume( + dnsApiToken: dnsApiToken, + rootUser: rootUser, + domainName: domainName, + dataBase: newVolume, + ); + + return details; + } + + Future createServerWithVolume({ + required final String dnsApiToken, + required final User rootUser, + required final String domainName, + required final ServerVolume dataBase, + }) async { + final Dio client = await getClient(); + + final String dbPassword = StringGenerators.dbPassword(); + final int dbId = dataBase.id; + + final String apiToken = StringGenerators.apiToken(); + + final String hostname = getHostnameFromDomain(domainName); + + final String base64Password = + base64.encode(utf8.encode(rootUser.password ?? 'PASS')); + + print('hostname: $hostname'); + + /// add ssh key when you need it: e.g. "ssh_keys":["kherel"] + /// check the branch name, it could be "development" or "master". + /// + final String userdataString = + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + print(userdataString); + + final Map data = { + 'name': hostname, + 'server_type': 'cx11', + 'start_after_create': false, + 'image': 'ubuntu-20.04', + 'volumes': [dbId], + 'networks': [], + 'user_data': userdataString, + 'labels': {}, + 'automount': true, + 'location': 'fsn1' + }; + print('Decoded data: $data'); + + ServerHostingDetails? serverDetails; + DioError? hetznerError; + bool success = false; + + try { + final Response serverCreateResponse = await client.post( + '/servers', + data: data, + ); + print(serverCreateResponse.data); + serverDetails = ServerHostingDetails( + id: serverCreateResponse.data['server']['id'], + ip4: serverCreateResponse.data['server']['public_net']['ipv4']['ip'], + createTime: DateTime.now(), + volume: dataBase, + apiToken: apiToken, + provider: ServerProvider.hetzner, + ); + success = true; + } on DioError catch (e) { + print(e); + hetznerError = e; + } catch (e) { + print(e); + } finally { + client.close(); + } + + if (!success) { + await Future.delayed(const Duration(seconds: 10)); + await deleteVolume(dbId); + } + + if (hetznerError != null) { + throw hetznerError; + } + + return serverDetails; + } + + static String getHostnameFromDomain(final String domain) { + // Replace all non-alphanumeric characters with an underscore + String hostname = + domain.split('.')[0].replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); + if (hostname.endsWith('-')) { + hostname = hostname.substring(0, hostname.length - 1); + } + if (hostname.startsWith('-')) { + hostname = hostname.substring(1); + } + if (hostname.isEmpty) { + hostname = 'selfprivacy-server'; + } + + return hostname; + } + + @override + Future deleteServer({ + required final String domainName, + }) async { + final Dio client = await getClient(); + + final String hostname = getHostnameFromDomain(domainName); + + final Response serversReponse = await client.get('/servers'); + final List servers = serversReponse.data['servers']; + final Map server = servers.firstWhere((final el) => el['name'] == hostname); + final List volumes = server['volumes']; + final List laterFutures = []; + + for (final volumeId in volumes) { + await client.post('/volumes/$volumeId/actions/detach'); + } + await Future.delayed(const Duration(seconds: 10)); + + for (final volumeId in volumes) { + laterFutures.add(client.delete('/volumes/$volumeId')); + } + laterFutures.add(client.delete('/servers/${server['id']}')); + + await Future.wait(laterFutures); + close(client); + } + + @override + Future restart() async { + final ServerHostingDetails server = getIt().serverDetails!; + + final Dio client = await getClient(); + try { + await client.post('/servers/${server.id}/actions/reset'); + } catch (e) { + print(e); + } finally { + close(client); + } + + return server.copyWith(startTime: DateTime.now()); + } + + @override + Future powerOn() async { + final ServerHostingDetails server = getIt().serverDetails!; + + final Dio client = await getClient(); + try { + await client.post('/servers/${server.id}/actions/poweron'); + } catch (e) { + print(e); + } finally { + close(client); + } + + return server.copyWith(startTime: DateTime.now()); + } + + Future> getMetrics( + final DateTime start, + final DateTime end, + final String type, + ) async { + final ServerHostingDetails? hetznerServer = + getIt().serverDetails; + + Map metrics = {}; + final Dio client = await getClient(); + try { + final Map queryParameters = { + 'start': start.toUtc().toIso8601String(), + 'end': end.toUtc().toIso8601String(), + 'type': type + }; + final Response res = await client.get( + '/servers/${hetznerServer!.id}/metrics', + queryParameters: queryParameters, + ); + metrics = res.data; + } catch (e) { + print(e); + } finally { + close(client); + } + + return metrics; + } + + Future getInfo() async { + final ServerHostingDetails? hetznerServer = + getIt().serverDetails; + final Dio client = await getClient(); + final Response response = await client.get('/servers/${hetznerServer!.id}'); + close(client); + + return HetznerServerInfo.fromJson(response.data!['server']); + } + + @override + Future> getServers() async { + List servers = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get('/servers'); + servers = response.data!['servers'] + .map( + (final e) => HetznerServerInfo.fromJson(e), + ) + .toList() + .where( + (final server) => server.publicNet.ipv4 != null, + ) + .map( + (final server) => ServerBasicInfo( + id: server.id, + name: server.name, + ip: server.publicNet.ipv4.ip, + reverseDns: server.publicNet.ipv4.reverseDns, + created: server.created, + volumeId: server.volumes.isNotEmpty ? server.volumes[0] : 0, + ), + ) + .toList(); + } catch (e) { + print(e); + } finally { + close(client); + } + + print(servers); + return servers; + } + + @override + Future createReverseDns({ + required final ServerHostingDetails serverDetails, + required final ServerDomain domain, + }) async { + final Dio client = await getClient(); + try { + await client.post( + '/servers/${serverDetails.id}/actions/change_dns_ptr', + data: { + 'ip': serverDetails.ip4, + 'dns_ptr': domain.domainName, + }, + ); + } catch (e) { + print(e); + } finally { + close(client); + } + } +} diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart new file mode 100644 index 00000000..565f7c84 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart @@ -0,0 +1,26 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; + +class DigitalOceanApiFactory extends ServerProviderApiFactory + with VolumeProviderApiFactory { + @override + ServerProviderApi getServerProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }) => + DigitalOceanApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + ); + + @override + VolumeProviderApi getVolumeProvider({ + final ProviderApiSettings settings = const ProviderApiSettings(), + }) => + DigitalOceanApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + ); +} diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 8340676d..f26646ce 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -23,7 +23,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); if (isWithToken) { - final String? token = getIt().hetznerKey; + final String? token = getIt().serverProviderKey; assert(token != null); options.headers = {'Authorization': 'Bearer $token'}; } diff --git a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart index 44f40b57..727daea8 100644 --- a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart @@ -26,7 +26,7 @@ class ProviderFormCubit extends FormCubit { @override FutureOr onSubmit() async { - serverInstallationCubit.setHetznerKey(apiKey.state.value); + serverInstallationCubit.setServerProviderKey(apiKey.state.value); } final ServerInstallationCubit serverInstallationCubit; @@ -45,7 +45,7 @@ class ProviderFormCubit extends FormCubit { } if (!isKeyValid) { - apiKey.setError('initializing.hetzner_bad_key_error'.tr()); + apiKey.setError('initializing.provider_bad_key_error'.tr()); return false; } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 9cb68359..b32fe79a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; @@ -51,6 +52,13 @@ class ServerInstallationCubit extends Cubit { } } + void setServerProviderType(final ServerProvider providerType) { + repository.serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory( + providerType, + ); + } + RegExp getServerProviderApiTokenValidation() => repository.serverProviderApiFactory! .getServerProvider() @@ -78,13 +86,13 @@ class ServerInstallationCubit extends Cubit { ) .isApiTokenValid(providerToken); - void setHetznerKey(final String hetznerKey) async { - await repository.saveHetznerKey(hetznerKey); + void setServerProviderKey(final String serverProviderKey) async { + await repository.saveServerProviderKey(serverProviderKey); if (state is ServerInstallationRecovery) { emit( (state as ServerInstallationRecovery).copyWith( - providerApiToken: hetznerKey, + providerApiToken: serverProviderKey, currentStep: RecoveryStep.serverSelection, ), ); @@ -93,7 +101,7 @@ class ServerInstallationCubit extends Cubit { emit( (state as ServerInstallationNotFinished).copyWith( - providerApiToken: hetznerKey, + providerApiToken: serverProviderKey, ), ); } @@ -427,7 +435,7 @@ class ServerInstallationCubit extends Cubit { emit( dataState.copyWith( serverDetails: serverDetails, - currentStep: RecoveryStep.hetznerToken, + currentStep: RecoveryStep.serverProviderToken, ), ); } on ServerAuthorizationException { diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index a83e9deb..39593b1f 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -39,17 +39,14 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); - ServerProviderApiFactory? serverProviderApiFactory = - ApiFactoryCreator.createServerProviderApiFactory( - ServerProvider.hetzner, // TODO: HARDCODE FOR NOW!!! - ); // TODO: Remove when provider selection is implemented. + ServerProviderApiFactory? serverProviderApiFactory; DnsProviderApiFactory? dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! ); Future load() async { - final String? providerApiToken = getIt().hetznerKey; + final String? providerApiToken = getIt().serverProviderKey; final String? cloudflareToken = getIt().cloudFlareKey; final ServerDomain? serverDomain = getIt().serverDomain; final BackblazeCredential? backblazeCredential = @@ -124,13 +121,13 @@ class ServerInstallationRepository { } RecoveryStep _getCurrentRecoveryStep( - final String? hetznerToken, + final String? serverProviderToken, final String? cloudflareToken, final ServerDomain serverDomain, final ServerHostingDetails? serverDetails, ) { if (serverDetails != null) { - if (hetznerToken != null) { + if (serverProviderToken != null) { if (serverDetails.provider != ServerProvider.unknown) { if (serverDomain.provider != DnsProvider.unknown) { return RecoveryStep.backblazeToken; @@ -139,7 +136,7 @@ class ServerInstallationRepository { } return RecoveryStep.serverSelection; } - return RecoveryStep.hetznerToken; + return RecoveryStep.serverProviderToken; } return RecoveryStep.selecting; } @@ -150,7 +147,7 @@ class ServerInstallationRepository { } Future startServer( - final ServerHostingDetails hetznerServer, + final ServerHostingDetails server, ) async { ServerHostingDetails serverDetails; @@ -670,12 +667,11 @@ class ServerInstallationRepository { getIt().init(); } - Future saveHetznerKey(final String key) async { - print('saved'); - await getIt().storeHetznerKey(key); + Future saveServerProviderKey(final String key) async { + await getIt().storeServerProviderKey(key); } - Future deleteHetznerKey() async { + Future deleteServerProviderKey() async { await box.delete(BNames.hetznerKey); getIt().init(); } diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index bb04c07d..82eda971 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -238,7 +238,7 @@ enum RecoveryStep { recoveryKey, newDeviceKey, oldToken, - hetznerToken, + serverProviderToken, serverSelection, cloudflareToken, backblazeToken, diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index ec2feb55..6a81141f 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -9,22 +9,22 @@ class ApiConfigModel { final Box _box = Hive.box(BNames.serverInstallationBox); ServerHostingDetails? get serverDetails => _serverDetails; - String? get hetznerKey => _hetznerKey; + String? get serverProviderKey => _serverProviderKey; String? get cloudFlareKey => _cloudFlareKey; BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; - String? _hetznerKey; + String? _serverProviderKey; String? _cloudFlareKey; ServerHostingDetails? _serverDetails; BackblazeCredential? _backblazeCredential; ServerDomain? _serverDomain; BackblazeBucket? _backblazeBucket; - Future storeHetznerKey(final String value) async { + Future storeServerProviderKey(final String value) async { await _box.put(BNames.hetznerKey, value); - _hetznerKey = value; + _serverProviderKey = value; } Future storeCloudFlareKey(final String value) async { @@ -53,7 +53,7 @@ class ApiConfigModel { } void clear() { - _hetznerKey = null; + _serverProviderKey = null; _cloudFlareKey = null; _backblazeCredential = null; _serverDomain = null; @@ -62,7 +62,7 @@ class ApiConfigModel { } void init() { - _hetznerKey = _box.get(BNames.hetznerKey); + _serverProviderKey = _box.get(BNames.hetznerKey); _cloudFlareKey = _box.get(BNames.cloudFlareKey); _backblazeCredential = _box.get(BNames.backblazeCredential); _serverDomain = _box.get(BNames.serverDomain); diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index 3791c664..27e9829a 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -78,4 +78,6 @@ enum ServerProvider { unknown, @HiveField(1) hetzner, + @HiveField(2) + digitalOcean, } diff --git a/lib/main.dart b/lib/main.dart index f2c36392..8b521f8a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,7 +5,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/theming/factory/app_theme_factory.dart'; -import 'package:selfprivacy/ui/pages/setup/initializing.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:wakelock/wakelock.dart'; diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index faa23381..fededcaf 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/text_themes.dart'; -import 'package:selfprivacy/ui/pages/setup/initializing.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 5d487717..309746c5 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -11,7 +11,7 @@ import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; -import 'package:selfprivacy/ui/pages/setup/initializing.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/ui/pages/users/users.dart'; diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart similarity index 92% rename from lib/ui/pages/setup/initializing.dart rename to lib/ui/pages/setup/initializing/initializing.dart index 02af3a59..2904cfb8 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -17,6 +17,7 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -139,52 +140,8 @@ class InitializingPage extends StatelessWidget { } Widget _stepHetzner(final ServerInstallationCubit serverInstallationCubit) => - BlocProvider( - create: (final context) => ProviderFormCubit( - serverInstallationCubit, - ), - child: Builder( - builder: (final context) { - final formCubitState = context.watch().state; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/logos/hetzner.png', - width: 150, - ), - const SizedBox(height: 10), - BrandText.h2('initializing.connect_to_server'.tr()), - const SizedBox(height: 10), - BrandText.body2('initializing.place_where_data'.tr()), - const Spacer(), - CubitFormTextField( - formFieldCubit: context.read().apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: const InputDecoration( - hintText: 'Hetzner API Token', - ), - ), - const Spacer(), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - const SizedBox(height: 10), - BrandButton.text( - onPressed: () => _showModal( - context, - const _HowTo(fileName: 'how_hetzner'), - ), - title: 'initializing.how'.tr(), - ), - ], - ); - }, - ), + ProviderPicker( + serverInstallationCubit: serverInstallationCubit, ); void _showModal(final BuildContext context, final Widget widget) { diff --git a/lib/ui/pages/setup/initializing/provider_picker.dart b/lib/ui/pages/setup/initializing/provider_picker.dart new file mode 100644 index 00000000..c3cada82 --- /dev/null +++ b/lib/ui/pages/setup/initializing/provider_picker.dart @@ -0,0 +1,209 @@ +import 'package:cubit_form/cubit_form.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; + +class ProviderPicker extends StatefulWidget { + const ProviderPicker({ + required this.serverInstallationCubit, + super.key, + }); + + final ServerInstallationCubit serverInstallationCubit; + + @override + State createState() => _ProviderPickerState(); +} + +class _ProviderPickerState extends State { + ServerProvider selectedProvider = ServerProvider.unknown; + + void setProvider(final ServerProvider provider) { + setState(() { + selectedProvider = provider; + }); + } + + @override + Widget build(final BuildContext context) { + switch (selectedProvider) { + case ServerProvider.unknown: + return ProviderSelectionPage( + callback: setProvider, + ); + + case ServerProvider.hetzner: + return ProviderInputDataPage( + serverInstallationCubit: widget.serverInstallationCubit, + providerInfo: ProviderPageInfo( + providerType: ServerProvider.hetzner, + pathToHow: 'hetzner_how', + image: Image.asset( + 'assets/images/logos/hetzner.png', + width: 150, + ), + ), + ); + + case ServerProvider.digitalOcean: + return ProviderInputDataPage( + serverInstallationCubit: widget.serverInstallationCubit, + providerInfo: ProviderPageInfo( + providerType: ServerProvider.digitalOcean, + pathToHow: 'hetzner_how', + image: Image.asset( + 'assets/images/logos/digital_ocean.png', + width: 150, + ), + ), + ); + } + } +} + +class ProviderPageInfo { + const ProviderPageInfo({ + required this.providerType, + required this.pathToHow, + required this.image, + }); + + final String pathToHow; + final Image image; + final ServerProvider providerType; +} + +class ProviderInputDataPage extends StatelessWidget { + const ProviderInputDataPage({ + required this.providerInfo, + required this.serverInstallationCubit, + super.key, + }); + + final ProviderPageInfo providerInfo; + final ServerInstallationCubit serverInstallationCubit; + + @override + Widget build(final BuildContext context) => BlocProvider( + create: (final context) => ProviderFormCubit( + serverInstallationCubit, + ), + child: Builder( + builder: (final context) { + final formCubitState = context.watch().state; + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + providerInfo.image, + const SizedBox(height: 10), + Text( + 'initializing.connect_to_server'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const Spacer(), + CubitFormTextField( + formFieldCubit: context.read().apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'Provider API Token', + ), + ), + const Spacer(), + FilledButton( + title: 'basis.connect'.tr(), + onPressed: () => formCubitState.isSubmitting + ? null + : () => context.read().trySubmit(), + ), + const SizedBox(height: 10), + OutlinedButton( + child: Text('initializing.how'.tr()), + onPressed: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => BrandBottomSheet( + isExpended: true, + child: Padding( + padding: paddingH15V0, + child: ListView( + padding: const EdgeInsets.symmetric(vertical: 16), + children: [ + BrandMarkdown( + fileName: providerInfo.pathToHow, + ), + ], + ), + ), + ), + ), + ), + ], + ); + }, + ), + ); +} + +class ProviderSelectionPage extends StatelessWidget { + const ProviderSelectionPage({ + required this.callback, + super.key, + }); + + final Function callback; + + @override + Widget build(final BuildContext context) => Column( + children: [ + Text( + 'initializing.select_provider'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 10), + Text( + 'initializing.place_where_data'.tr(), + ), + const SizedBox(height: 10), + ConstrainedBox( + constraints: const BoxConstraints( + maxWidth: 320, + ), + child: Row( + children: [ + InkWell( + onTap: () { + context.read().setServerProviderType(ServerProvider.hetzner); + callback(ServerProvider.hetzner); + }, + child: Image.asset( + 'assets/images/logos/hetzner.png', + width: 150, + ), + ), + const SizedBox( + width: 20, + ), + InkWell( + onTap: () { + context.read().setServerProviderType(ServerProvider.digitalOcean); + callback(ServerProvider.digitalOcean); + }, + child: Image.asset( + 'assets/images/logos/digital_ocean.png', + width: 150, + ), + ), + ], + ), + ), + ], + ); +} diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 028b8618..4442d2be 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -47,7 +47,7 @@ class RecoveryRouting extends StatelessWidget { case RecoveryStep.oldToken: currentPage = const RecoverByOldToken(); break; - case RecoveryStep.hetznerToken: + case RecoveryStep.serverProviderToken: currentPage = const RecoveryHetznerConnected(); break; case RecoveryStep.serverSelection: From 79e9334aca6fb1e7198c2987a99758bf80ebf757 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 12 Oct 2022 01:42:45 +0000 Subject: [PATCH 217/732] feat(pricing): Replace raw double with simple type Price --- .../digital_ocean/digital_ocean.dart | 38 ++++++------------- .../server_providers/hetzner/hetzner.dart | 10 ++++- .../server_providers/server_provider.dart | 4 +- .../server_providers/volume_provider.dart | 3 +- .../provider_volume_cubit.dart | 3 +- lib/logic/models/price.dart | 9 +++++ .../server_storage/extending_volume.dart | 3 +- .../setup/initializing/provider_picker.dart | 8 +++- 8 files changed, 44 insertions(+), 34 deletions(-) create mode 100644 lib/logic/models/price.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 159b68d8..16c87750 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -9,12 +9,15 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { - DigitalOceanApi( - {final this.hasLogger = false, final this.isWithToken = true}); + DigitalOceanApi({ + this.hasLogger = false, + this.isWithToken = true, + }); @override bool hasLogger; @override @@ -46,7 +49,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { response = await client.get( - '/servers', + '/account', options: Options( headers: {'Authorization': 'Bearer $token'}, ), @@ -71,30 +74,13 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return isValid; } + /// Hardcoded on their documentation and there is no pricing API at all + /// Probably we should scrap the doc page manually @override - RegExp getApiTokenValidation() => - RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); - - @override - Future getPricePerGb() async { - double? price; - - final Response dbGetResponse; - final Dio client = await getClient(); - try { - dbGetResponse = await client.get('/pricing'); - - final volume = dbGetResponse.data['pricing']['volume']; - final volumePrice = volume['price_per_gb_month']['gross']; - price = double.parse(volumePrice); - } catch (e) { - print(e); - } finally { - client.close(); - } - - return price; - } + Future getPricePerGb() async => Price( + value: 0.10, + currency: 'USD', + ); @override Future createVolume() async { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index f26646ce..3b8ff016 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -9,6 +9,7 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; @@ -75,7 +76,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); @override - Future getPricePerGb() async { + Future getPricePerGb() async { double? price; final Response dbGetResponse; @@ -92,7 +93,12 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { client.close(); } - return price; + return price == null + ? null + : Price( + value: price, + currency: 'EUR', + ); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 010ebd75..c2bfd533 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -22,5 +22,7 @@ abstract class ServerProviderApi extends ApiMap { }); Future isApiTokenValid(final String token); - RegExp getApiTokenValidation(); + RegExp getApiTokenValidation() => RegExp( + r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]', + ); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart index bdff72f2..d6feae2c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/price.dart'; mixin VolumeProviderApi on ApiMap { Future createVolume(); @@ -9,5 +10,5 @@ mixin VolumeProviderApi on ApiMap { Future detachVolume(final int volumeId); Future resizeVolume(final int volumeId, final int sizeGb); Future deleteVolume(final int id); - Future getPricePerGb(); + Future getPricePerGb(); } diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index b0500452..f6a2e7a6 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -7,6 +7,7 @@ import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; +import 'package:selfprivacy/logic/models/price.dart'; part 'provider_volume_state.dart'; @@ -32,7 +33,7 @@ class ApiProviderVolumeCubit } } - Future getPricePerGb() async => + Future getPricePerGb() async => providerApi!.getVolumeProvider().getPricePerGb(); Future refresh() async { diff --git a/lib/logic/models/price.dart b/lib/logic/models/price.dart new file mode 100644 index 00000000..1da2677d --- /dev/null +++ b/lib/logic/models/price.dart @@ -0,0 +1,9 @@ +class Price { + Price({ + required this.value, + required this.currency, + }); + + double value; + String currency; +} diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index e465c2b2..8558c526 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -4,6 +4,7 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; @@ -67,7 +68,7 @@ class _ExtendingVolumePageState extends State { ], ); } - _euroPerGb = snapshot.data as double; + _euroPerGb = (snapshot.data as Price).value; _sizeController.text = _currentSliderGbValue.truncate().toString(); _priceController.text = (_euroPerGb * double.parse(_sizeController.text)) diff --git a/lib/ui/pages/setup/initializing/provider_picker.dart b/lib/ui/pages/setup/initializing/provider_picker.dart index c3cada82..6681a07b 100644 --- a/lib/ui/pages/setup/initializing/provider_picker.dart +++ b/lib/ui/pages/setup/initializing/provider_picker.dart @@ -180,7 +180,9 @@ class ProviderSelectionPage extends StatelessWidget { children: [ InkWell( onTap: () { - context.read().setServerProviderType(ServerProvider.hetzner); + context + .read() + .setServerProviderType(ServerProvider.hetzner); callback(ServerProvider.hetzner); }, child: Image.asset( @@ -193,7 +195,9 @@ class ProviderSelectionPage extends StatelessWidget { ), InkWell( onTap: () { - context.read().setServerProviderType(ServerProvider.digitalOcean); + context + .read() + .setServerProviderType(ServerProvider.digitalOcean); callback(ServerProvider.digitalOcean); }, child: Image.asset( From f40ed08b027512977d086d074f7f83c26886dc5d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 12 Oct 2022 04:55:30 +0000 Subject: [PATCH 218/732] feat(volume): Implement volume endpoints for Digital Ocean volumeId type in VolumeApiProvider interfaces is now replaced with String from int to support Digital Ocean's UUID notation --- .../digital_ocean/digital_ocean.dart | 132 ++++++++++-------- .../server_providers/hetzner/hetzner.dart | 23 ++- .../server_providers/volume_provider.dart | 10 +- lib/logic/models/hive/server_details.dart | 3 + 4 files changed, 89 insertions(+), 79 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 16c87750..f24f49ca 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -23,6 +23,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @override bool isWithToken; + final String region = 'fra1'; + @override BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); @@ -92,25 +94,22 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { dbCreateResponse = await client.post( '/volumes', data: { - 'size': 10, + 'size_gigabytes': 10, 'name': StringGenerators.dbStorageName(), 'labels': {'labelkey': 'value'}, - 'location': 'fsn1', - 'automount': false, - 'format': 'ext4' + 'region': region, + 'filesystem_type': 'ext4', }, ); final dbId = dbCreateResponse.data['volume']['id']; - final dbSize = dbCreateResponse.data['volume']['size']; - final dbServer = dbCreateResponse.data['volume']['server']; + final dbSize = dbCreateResponse.data['volume']['size_gigabytes']; final dbName = dbCreateResponse.data['volume']['name']; - final dbDevice = dbCreateResponse.data['volume']['linux_device']; volume = ServerVolume( id: dbId, name: dbName, sizeByte: dbSize, - serverId: dbServer, - linuxDevice: dbDevice, + serverId: null, + linuxDevice: null, ); } catch (e) { print(e); @@ -135,18 +134,19 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { }, ); final List rawVolumes = dbGetResponse.data['volumes']; + int id = 0; for (final rawVolume in rawVolumes) { - final int dbId = rawVolume['id']; - final int dbSize = rawVolume['size'] * 1024 * 1024 * 1024; - final dbServer = rawVolume['server']; + final dbId = rawVolume['id']; + final int dbSize = rawVolume['size_gigabytes'] * 1024 * 1024 * 1024; + final dbDropletIds = rawVolume['droplet_ids']; final String dbName = rawVolume['name']; - final dbDevice = rawVolume['linux_device']; final volume = ServerVolume( - id: dbId, + id: id++, name: dbName, sizeByte: dbSize, - serverId: dbServer, - linuxDevice: dbDevice, + serverId: dbDropletIds.isNotEmpty ? dbDropletIds[0] : null, + linuxDevice: null, + uuid: dbId, ); volumes.add(volume); } @@ -160,39 +160,29 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future getVolume(final int id) async { - ServerVolume? volume; - final Response dbGetResponse; - final Dio client = await getClient(); - try { - dbGetResponse = await client.get('/volumes/$id'); - final int dbId = dbGetResponse.data['volume']['id']; - final int dbSize = dbGetResponse.data['volume']['size']; - final int dbServer = dbGetResponse.data['volume']['server']; - final String dbName = dbGetResponse.data['volume']['name']; - final dbDevice = dbGetResponse.data['volume']['linux_device']; - volume = ServerVolume( - id: dbId, - name: dbName, - sizeByte: dbSize, - serverId: dbServer, - linuxDevice: dbDevice, - ); - } catch (e) { - print(e); - } finally { - client.close(); + /// volumeId is storage's UUID for Digital Ocean + Future getVolume(final String volumeId) async { + ServerVolume? neededVolume; + + final List volumes = await getVolumes(); + + for (final volume in volumes) { + if (volume.uuid == volumeId) { + neededVolume = volume; + } } - return volume; + return neededVolume; } @override - Future deleteVolume(final int id) async { + + /// volumeId is storage's UUID for Digital Ocean + Future deleteVolume(final String volumeId) async { final Dio client = await getClient(); try { - await client.delete('/volumes/$id'); + await client.delete('/volumes/$volumeId'); } catch (e) { print(e); } finally { @@ -201,20 +191,30 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future attachVolume(final int volumeId, final int serverId) async { + + /// volumeId is storage's UUID for Digital Ocean + Future attachVolume(final String volumeId, final int serverId) async { bool success = false; + final ServerVolume? volumeToAttach = await getVolume(volumeId); + if (volumeToAttach == null) { + return success; + } + final Response dbPostResponse; final Dio client = await getClient(); try { dbPostResponse = await client.post( - '/volumes/$volumeId/actions/attach', + '/volumes/actions', data: { - 'automount': true, - 'server': serverId, + 'type': 'attach', + 'volume_name': volumeToAttach.name, + 'region': region, + 'droplet_id': serverId, }, ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + dbPostResponse.data['action']['status'].toString() == 'completed'; } catch (e) { print(e); } finally { @@ -225,14 +225,29 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future detachVolume(final int volumeId) async { + + /// volumeId is storage's UUID for Digital Ocean + Future detachVolume(final String volumeId) async { bool success = false; + final ServerVolume? volumeToAttach = await getVolume(volumeId); + if (volumeToAttach == null) { + return success; + } + final Response dbPostResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post('/volumes/$volumeId/actions/detach'); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + dbPostResponse = await client.post( + '/volumes/actions', + data: { + 'type': 'detach', + 'droplet_id': volumeToAttach.serverId, + 'region': region, + }, + ); + success = + dbPostResponse.data['action']['status'].toString() == 'completed'; } catch (e) { print(e); } finally { @@ -243,19 +258,24 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future resizeVolume(final int volumeId, final int sizeGb) async { + + /// volumeId is storage's UUID for Digital Ocean + Future resizeVolume(final String volumeId, final int sizeGb) async { bool success = false; final Response dbPostResponse; final Dio client = await getClient(); try { dbPostResponse = await client.post( - '/volumes/$volumeId/actions/resize', + '/volumes/actions', data: { - 'size': sizeGb, + 'type': 'resize', + 'size_gigabytes': sizeGb, + 'region': region, }, ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + dbPostResponse.data['action']['status'].toString() == 'completed'; } catch (e) { print(e); } finally { @@ -300,17 +320,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final int dbId = dataBase.id; final String apiToken = StringGenerators.apiToken(); - final String hostname = getHostnameFromDomain(domainName); final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); - print('hostname: $hostname'); - - /// add ssh key when you need it: e.g. "ssh_keys":["kherel"] - /// check the branch name, it could be "development" or "master". - /// final String userdataString = "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 3b8ff016..dceb5a47 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -179,13 +179,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future getVolume(final int id) async { + Future getVolume(final String volumeId) async { ServerVolume? volume; final Response dbGetResponse; final Dio client = await getClient(); try { - dbGetResponse = await client.get('/volumes/$id'); + dbGetResponse = await client.get('/volumes/$volumeId'); final int dbId = dbGetResponse.data['volume']['id']; final int dbSize = dbGetResponse.data['volume']['size']; final int dbServer = dbGetResponse.data['volume']['server']; @@ -208,10 +208,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future deleteVolume(final int id) async { + Future deleteVolume(final String volumeId) async { final Dio client = await getClient(); try { - await client.delete('/volumes/$id'); + await client.delete('/volumes/$volumeId'); } catch (e) { print(e); } finally { @@ -220,7 +220,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future attachVolume(final int volumeId, final int serverId) async { + Future attachVolume(final String volumeId, final int serverId) async { bool success = false; final Response dbPostResponse; @@ -244,7 +244,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future detachVolume(final int volumeId) async { + Future detachVolume(final String volumeId) async { bool success = false; final Response dbPostResponse; @@ -262,7 +262,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future resizeVolume(final int volumeId, final int sizeGb) async { + Future resizeVolume(final String volumeId, final int sizeGb) async { bool success = false; final Response dbPostResponse; @@ -319,20 +319,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final int dbId = dataBase.id; final String apiToken = StringGenerators.apiToken(); - final String hostname = getHostnameFromDomain(domainName); final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); - print('hostname: $hostname'); - - /// add ssh key when you need it: e.g. "ssh_keys":["kherel"] - /// check the branch name, it could be "development" or "master". - /// final String userdataString = "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; - print(userdataString); final Map data = { 'name': hostname, @@ -378,7 +371,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { if (!success) { await Future.delayed(const Duration(seconds: 10)); - await deleteVolume(dbId); + await deleteVolume(dbId.toString()); } if (hetznerError != null) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart index d6feae2c..52458217 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart @@ -5,10 +5,10 @@ import 'package:selfprivacy/logic/models/price.dart'; mixin VolumeProviderApi on ApiMap { Future createVolume(); Future> getVolumes({final String? status}); - Future getVolume(final int id); - Future attachVolume(final int volumeId, final int serverId); - Future detachVolume(final int volumeId); - Future resizeVolume(final int volumeId, final int sizeGb); - Future deleteVolume(final int id); + Future getVolume(final String volumeId); + Future attachVolume(final String volumeId, final int serverId); + Future detachVolume(final String volumeId); + Future resizeVolume(final String volumeId, final int sizeGb); + Future deleteVolume(final String volumeId); Future getPricePerGb(); } diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index 27e9829a..faaf37b4 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -58,6 +58,7 @@ class ServerVolume { required this.sizeByte, required this.serverId, required this.linuxDevice, + this.uuid, }); @HiveField(1) @@ -70,6 +71,8 @@ class ServerVolume { int? serverId; @HiveField(5, defaultValue: null) String? linuxDevice; + @HiveField(6, defaultValue: null) + String? uuid; } @HiveType(typeId: 101) From 2f599546413f663ba5c58a497444be38dfcff026 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 13 Oct 2022 21:15:42 +0000 Subject: [PATCH 219/732] feat(region): Remove hardcode for region of server installation --- .../cloudflare/cloudflare_factory.dart | 1 + .../dns_provider_api_settings.dart | 10 ++++++++ .../dns_providers/dns_provider_factory.dart | 13 ++--------- .../rest_maps/provider_api_settings.dart | 5 +++- .../digital_ocean/digital_ocean.dart | 8 ++++--- .../digital_ocean/digital_ocean_factory.dart | 8 ++++--- .../server_providers/hetzner/hetzner.dart | 8 ++++--- .../hetzner/hetzner_factory.dart | 8 ++++--- .../server_provider_api_settings.dart | 11 +++++++++ .../server_provider_factory.dart | 6 ++--- .../hetzner_metrics_repository.dart | 2 +- .../provider_volume_cubit.dart | 23 ++++++++++--------- .../server_detailed_info_repository.dart | 2 +- .../server_installation_cubit.dart | 6 +++-- .../server_installation_repository.dart | 16 +++++++------ 15 files changed, 78 insertions(+), 49 deletions(-) create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart create mode 100644 lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart index 9266471b..ccb58e6a 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; class CloudflareApiFactory extends DnsProviderApiFactory { diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart new file mode 100644 index 00000000..6b737df5 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart @@ -0,0 +1,10 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; + +class DnsProviderApiSettings extends ProviderApiSettings { + const DnsProviderApiSettings({ + super.hasLogger = false, + super.isWithToken = true, + this.customToken, + }); + final String? customToken; +} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart index 01f59e98..fb573135 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart @@ -1,17 +1,8 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; - -class DnsProviderApiSettings extends ProviderApiSettings { - const DnsProviderApiSettings({ - final super.hasLogger = false, - final super.isWithToken = true, - final this.customToken, - }); - final String? customToken; -} +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; abstract class DnsProviderApiFactory { DnsProviderApi getDnsProvider({ - final DnsProviderApiSettings settings = const DnsProviderApiSettings(), + final DnsProviderApiSettings settings, }); } diff --git a/lib/logic/api_maps/rest_maps/provider_api_settings.dart b/lib/logic/api_maps/rest_maps/provider_api_settings.dart index 4350fbe7..9e601d2a 100644 --- a/lib/logic/api_maps/rest_maps/provider_api_settings.dart +++ b/lib/logic/api_maps/rest_maps/provider_api_settings.dart @@ -1,5 +1,8 @@ class ProviderApiSettings { - const ProviderApiSettings({this.hasLogger = false, this.isWithToken = true}); + const ProviderApiSettings({ + this.hasLogger = false, + this.isWithToken = true, + }); final bool hasLogger; final bool isWithToken; } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index f24f49ca..2354e5ab 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -15,6 +15,7 @@ import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { DigitalOceanApi({ + required this.region, this.hasLogger = false, this.isWithToken = true, }); @@ -23,7 +24,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @override bool isWithToken; - final String region = 'fra1'; + final String region; @override BaseOptions get options { @@ -318,6 +319,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String dbPassword = StringGenerators.dbPassword(); final int dbId = dataBase.id; + final String? dbUuid = dataBase.uuid; final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); @@ -334,7 +336,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'server_type': 'cx11', 'start_after_create': false, 'image': 'ubuntu-20.04', - 'volumes': [dbId], + 'volumes': dbUuid == null ? [dbId] : [dbUuid], 'networks': [], 'user_data': userdataString, 'labels': {}, @@ -373,7 +375,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { if (!success) { await Future.delayed(const Duration(seconds: 10)); - await deleteVolume(dbId); + await deleteVolume(dbUuid ?? dbId.toString()); } if (hetznerError != null) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart index 565f7c84..7508e04e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart @@ -1,6 +1,6 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; @@ -8,18 +8,20 @@ class DigitalOceanApiFactory extends ServerProviderApiFactory with VolumeProviderApiFactory { @override ServerProviderApi getServerProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), + required final ServerProviderApiSettings settings, }) => DigitalOceanApi( + region: settings.region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); @override VolumeProviderApi getVolumeProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), + required final ServerProviderApiSettings settings, }) => DigitalOceanApi( + region: settings.region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index dceb5a47..fe577c03 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -14,12 +14,14 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { - HetznerApi({final this.hasLogger = false, final this.isWithToken = true}); + HetznerApi({required this.region, this.hasLogger = false, this.isWithToken = true,}); @override bool hasLogger; @override bool isWithToken; + final String region; + @override BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); @@ -114,7 +116,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'size': 10, 'name': StringGenerators.dbStorageName(), 'labels': {'labelkey': 'value'}, - 'location': 'fsn1', + 'location': region, 'automount': false, 'format': 'ext4' }, @@ -337,7 +339,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'user_data': userdataString, 'labels': {}, 'automount': true, - 'location': 'fsn1' + 'location': region, }; print('Decoded data: $data'); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart index 60f61d1b..f303966b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart @@ -1,6 +1,6 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; @@ -8,18 +8,20 @@ class HetznerApiFactory extends ServerProviderApiFactory with VolumeProviderApiFactory { @override ServerProviderApi getServerProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), + required final ServerProviderApiSettings settings, }) => HetznerApi( + region: settings.region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); @override VolumeProviderApi getVolumeProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), + required final ServerProviderApiSettings settings, }) => HetznerApi( + region: settings.region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart new file mode 100644 index 00000000..b1513bf6 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart @@ -0,0 +1,11 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; + +class ServerProviderApiSettings extends ProviderApiSettings { + const ServerProviderApiSettings({ + required this.region, + super.hasLogger = false, + super.isWithToken = true, + }); + + final String region; +} diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart index 10f4c40f..4fad8797 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart @@ -1,15 +1,15 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; abstract class ServerProviderApiFactory { ServerProviderApi getServerProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), + required final ServerProviderApiSettings settings, }); } mixin VolumeProviderApiFactory { VolumeProviderApi getVolumeProvider({ - final ProviderApiSettings settings = const ProviderApiSettings(), + required final ServerProviderApiSettings settings, }); } diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart index 134c955e..5b363406 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart @@ -26,7 +26,7 @@ class HetznerMetricsRepository { break; } - final HetznerApi api = HetznerApi(hasLogger: false); + final HetznerApi api = HetznerApi(hasLogger: false, region: 'fra1',); final List> results = await Future.wait([ api.getMetrics(start, end, 'cpu'), diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index f6a2e7a6..1eb47bf3 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; @@ -34,7 +35,7 @@ class ApiProviderVolumeCubit } Future getPricePerGb() async => - providerApi!.getVolumeProvider().getPricePerGb(); + providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).getPricePerGb(); Future refresh() async { emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); @@ -47,7 +48,7 @@ class ApiProviderVolumeCubit } final List volumes = - await providerApi!.getVolumeProvider().getVolumes(); + await providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).getVolumes(); if (volumes.isEmpty) { return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); @@ -59,15 +60,15 @@ class ApiProviderVolumeCubit Future attachVolume(final DiskVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; await providerApi! - .getVolumeProvider() - .attachVolume(volume.providerVolume!.id, server.id); + .getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) + .attachVolume(volume.providerVolume!.id.toString(), server.id); refresh(); } Future detachVolume(final DiskVolume volume) async { await providerApi! - .getVolumeProvider() - .detachVolume(volume.providerVolume!.id); + .getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) + .detachVolume(volume.providerVolume!.id.toString()); refresh(); } @@ -80,8 +81,8 @@ class ApiProviderVolumeCubit 'Starting resize', ); emit(state.copyWith(isResizing: true)); - final bool resized = await providerApi!.getVolumeProvider().resizeVolume( - volume.providerVolume!.id, + final bool resized = await providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).resizeVolume( + volume.providerVolume!.id.toString(), newSizeGb, ); @@ -117,7 +118,7 @@ class ApiProviderVolumeCubit Future createVolume() async { final ServerVolume? volume = - await providerApi!.getVolumeProvider().createVolume(); + await providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).createVolume(); final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); @@ -130,8 +131,8 @@ class ApiProviderVolumeCubit Future deleteVolume(final DiskVolume volume) async { await providerApi! - .getVolumeProvider() - .deleteVolume(volume.providerVolume!.id); + .getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) + .deleteVolume(volume.providerVolume!.id.toString()); refresh(); } diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index dada896b..d4149f61 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ServerDetailsRepository { - HetznerApi hetzner = HetznerApi(); + HetznerApi hetzner = HetznerApi(region: 'fra1'); ServerApi server = ServerApi(); Future load() async { diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index b32fe79a..8e121044 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -5,8 +5,10 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -61,7 +63,7 @@ class ServerInstallationCubit extends Cubit { RegExp getServerProviderApiTokenValidation() => repository.serverProviderApiFactory! - .getServerProvider() + .getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) .getApiTokenValidation(); RegExp getDnsProviderApiTokenValidation() => repository.dnsProviderApiFactory! @@ -73,7 +75,7 @@ class ServerInstallationCubit extends Cubit { ) async => repository.serverProviderApiFactory! .getServerProvider( - settings: const ProviderApiSettings(isWithToken: false), + settings: const ServerProviderApiSettings(region: 'fra1', isWithToken: false), ) .isApiTokenValid(providerToken); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 39593b1f..10306c61 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -11,9 +11,11 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; @@ -151,7 +153,7 @@ class ServerInstallationRepository { ) async { ServerHostingDetails serverDetails; - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); serverDetails = await api.powerOn(); return serverDetails; @@ -227,7 +229,7 @@ class ServerInstallationRepository { required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); try { final ServerHostingDetails? serverDetails = await api.createServer( dnsApiToken: cloudFlareKey, @@ -332,7 +334,7 @@ class ServerInstallationRepository { final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); final ServerProviderApi serverApi = - serverProviderApiFactory!.getServerProvider(); + serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, @@ -404,12 +406,12 @@ class ServerInstallationRepository { } Future restart() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); return api.restart(); } Future powerOn() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); return api.powerOn(); } @@ -652,7 +654,7 @@ class ServerInstallationRepository { } Future> getServersOnProviderAccount() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); return api.getServers(); } @@ -730,7 +732,7 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); From e032bd8a7880eb5e8292be55ff2fffdb391705f4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 13 Oct 2022 23:13:56 +0000 Subject: [PATCH 220/732] feat(region): Implement endpoints for listing available provider regions --- .../digital_ocean/digital_ocean.dart | 64 +++++++++++++++++++ .../server_providers/hetzner/hetzner.dart | 53 ++++++++++++++- .../server_providers/server_provider.dart | 2 + .../hetzner_metrics_repository.dart | 5 +- .../provider_volume_cubit.dart | 53 ++++++++++++--- .../server_installation_cubit.dart | 9 ++- .../server_installation_repository.dart | 42 ++++++++++-- .../models/server_provider_location.dart | 13 ++++ 8 files changed, 220 insertions(+), 21 deletions(-) create mode 100644 lib/logic/models/server_provider_location.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 2354e5ab..798fc54b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @@ -538,6 +539,69 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return servers; } + String? getEmojiFlag(final String query) { + String? emoji; + + switch (query.toLowerCase().substring(0, 2)) { + case 'fra': + emoji = '🇩🇪'; + break; + + case 'ams': + emoji = '🇳🇱'; + break; + + case 'sgp': + emoji = '🇸🇬'; + break; + + case 'lon': + emoji = '🇬🇧'; + break; + + case 'tor': + emoji = '🇨🇦'; + break; + + case 'blr': + emoji = '🇮🇳'; + break; + + case 'nyc': + case 'sfo': + emoji = '🇺🇸'; + break; + } + + return emoji; + } + + @override + Future> getAvailableLocations() async { + List locations = []; + + final Dio client = await getClient(); + try { + final Response response = await client.post( + '/locations', + ); + + locations = response.data!['locations'].map( + (final location) => ServerProviderLocation( + title: location['slug'], + description: location['name'], + flag: getEmojiFlag(location['slug']), + ), + ); + } catch (e) { + print(e); + } finally { + close(client); + } + + return locations; + } + @override Future createReverseDns({ required final ServerHostingDetails serverDetails, diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index fe577c03..2c0b70db 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -11,10 +11,15 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { - HetznerApi({required this.region, this.hasLogger = false, this.isWithToken = true,}); + HetznerApi({ + required this.region, + this.hasLogger = false, + this.isWithToken = true, + }); @override bool hasLogger; @override @@ -536,6 +541,52 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return servers; } + String? getEmojiFlag(final String query) { + String? emoji; + + switch (query.toLowerCase()) { + case 'de': + emoji = '🇩🇪'; + break; + + case 'fi': + emoji = '🇫🇮'; + break; + + case 'us': + emoji = '🇺🇸'; + break; + } + + return emoji; + } + + @override + Future> getAvailableLocations() async { + List locations = []; + + final Dio client = await getClient(); + try { + final Response response = await client.post( + '/locations', + ); + + locations = response.data!['locations'].map( + (final location) => ServerProviderLocation( + title: location['city'], + description: location['description'], + flag: getEmojiFlag(location['country']), + ), + ); + } catch (e) { + print(e); + } finally { + close(client); + } + + return locations; + } + @override Future createReverseDns({ required final ServerHostingDetails serverDetails, diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index c2bfd533..d4b61721 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -3,9 +3,11 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; abstract class ServerProviderApi extends ApiMap { Future> getServers(); + Future> getAvailableLocations(); Future restart(); Future powerOn(); diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart index 5b363406..18137fdc 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart @@ -26,7 +26,10 @@ class HetznerMetricsRepository { break; } - final HetznerApi api = HetznerApi(hasLogger: false, region: 'fra1',); + final HetznerApi api = HetznerApi( + hasLogger: false, + region: 'fra1', + ); final List> results = await Future.wait([ api.getMetrics(start, end, 'cpu'), diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 1eb47bf3..95b0d362 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -34,8 +34,13 @@ class ApiProviderVolumeCubit } } - Future getPricePerGb() async => - providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).getPricePerGb(); + Future getPricePerGb() async => providerApi! + .getVolumeProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) + .getPricePerGb(); Future refresh() async { emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); @@ -47,8 +52,13 @@ class ApiProviderVolumeCubit return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } - final List volumes = - await providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).getVolumes(); + final List volumes = await providerApi! + .getVolumeProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) + .getVolumes(); if (volumes.isEmpty) { return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); @@ -60,14 +70,22 @@ class ApiProviderVolumeCubit Future attachVolume(final DiskVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; await providerApi! - .getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) + .getVolumeProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) .attachVolume(volume.providerVolume!.id.toString(), server.id); refresh(); } Future detachVolume(final DiskVolume volume) async { await providerApi! - .getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) + .getVolumeProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) .detachVolume(volume.providerVolume!.id.toString()); refresh(); } @@ -81,7 +99,13 @@ class ApiProviderVolumeCubit 'Starting resize', ); emit(state.copyWith(isResizing: true)); - final bool resized = await providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).resizeVolume( + final bool resized = await providerApi! + .getVolumeProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) + .resizeVolume( volume.providerVolume!.id.toString(), newSizeGb, ); @@ -117,8 +141,13 @@ class ApiProviderVolumeCubit } Future createVolume() async { - final ServerVolume? volume = - await providerApi!.getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),).createVolume(); + final ServerVolume? volume = await providerApi! + .getVolumeProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) + .createVolume(); final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); @@ -131,7 +160,11 @@ class ApiProviderVolumeCubit Future deleteVolume(final DiskVolume volume) async { await providerApi! - .getVolumeProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) + .getVolumeProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) .deleteVolume(volume.providerVolume!.id.toString()); refresh(); } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 8e121044..99dd1d82 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -63,7 +63,11 @@ class ServerInstallationCubit extends Cubit { RegExp getServerProviderApiTokenValidation() => repository.serverProviderApiFactory! - .getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),) + .getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ) .getApiTokenValidation(); RegExp getDnsProviderApiTokenValidation() => repository.dnsProviderApiFactory! @@ -75,7 +79,8 @@ class ServerInstallationCubit extends Cubit { ) async => repository.serverProviderApiFactory! .getServerProvider( - settings: const ServerProviderApiSettings(region: 'fra1', isWithToken: false), + settings: const ServerProviderApiSettings( + region: 'fra1', isWithToken: false), ) .isApiTokenValid(providerToken); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 10306c61..4fe10b1f 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -153,7 +153,11 @@ class ServerInstallationRepository { ) async { ServerHostingDetails serverDetails; - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ); serverDetails = await api.powerOn(); return serverDetails; @@ -229,7 +233,11 @@ class ServerInstallationRepository { required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ); try { final ServerHostingDetails? serverDetails = await api.createServer( dnsApiToken: cloudFlareKey, @@ -334,7 +342,11 @@ class ServerInstallationRepository { final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); final ServerProviderApi serverApi = - serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); + serverProviderApiFactory!.getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ); await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, @@ -406,12 +418,20 @@ class ServerInstallationRepository { } Future restart() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ); return api.restart(); } Future powerOn() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ); return api.powerOn(); } @@ -654,7 +674,11 @@ class ServerInstallationRepository { } Future> getServersOnProviderAccount() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ); return api.getServers(); } @@ -732,7 +756,11 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(settings: const ServerProviderApiSettings(region: 'fra1',),); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( + settings: const ServerProviderApiSettings( + region: 'fra1', + ), + ); final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); diff --git a/lib/logic/models/server_provider_location.dart b/lib/logic/models/server_provider_location.dart new file mode 100644 index 00000000..dea063a4 --- /dev/null +++ b/lib/logic/models/server_provider_location.dart @@ -0,0 +1,13 @@ +class ServerProviderLocation { + ServerProviderLocation({ + required this.title, + this.description, + this.flag, + }); + + final String title; + final String? description; + + /// as emoji + final String? flag; +} From b30e3723228cf14ba1fdafdb1485e3dafa2fe003 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 14 Oct 2022 19:00:44 +0000 Subject: [PATCH 221/732] feat(region): Implement endpoints for listing available types by region --- .../digital_ocean/digital_ocean.dart | 45 ++++++++++++++++++- .../server_providers/hetzner/hetzner.dart | 45 ++++++++++++++++++- .../server_providers/server_provider.dart | 4 ++ .../models/server_provider_location.dart | 2 + lib/logic/models/server_type.dart | 19 ++++++++ 5 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 lib/logic/models/server_type.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 798fc54b..67811f26 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -5,6 +5,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -12,6 +13,7 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @@ -582,7 +584,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { - final Response response = await client.post( + final Response response = await client.get( '/locations', ); @@ -591,6 +593,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { title: location['slug'], description: location['name'], flag: getEmojiFlag(location['slug']), + identifier: location['slug'], ), ); } catch (e) { @@ -602,6 +605,46 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return locations; } + @override + Future> getServerTypesByLocation({ + required final ServerProviderLocation location, + }) async { + final List types = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get( + '/sizes', + ); + final rawSizes = response.data!['sizes']; + for (final rawSize in rawSizes) { + for (final rawRegion in rawSize['regions']) { + if (rawRegion.toString() == location.identifier) { + types.add( + ServerType( + title: rawSize['description'], + identifier: rawSize['slug'], + ram: rawSize['memory'], + cores: rawSize['vcpus'], + disk: DiskSize(byte: rawSize['disk'] * 1024 * 1024 * 1024), + price: Price( + value: rawSize['price_monthly'], + currency: 'USD', + ), + ), + ); + } + } + } + } catch (e) { + print(e); + } finally { + close(client); + } + + return types; + } + @override Future createReverseDns({ required final ServerHostingDetails serverDetails, diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 2c0b70db..8e31521e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -5,6 +5,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -12,6 +13,7 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { @@ -567,7 +569,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { - final Response response = await client.post( + final Response response = await client.get( '/locations', ); @@ -576,6 +578,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { title: location['city'], description: location['description'], flag: getEmojiFlag(location['country']), + identifier: location['name'], ), ); } catch (e) { @@ -587,6 +590,46 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return locations; } + @override + Future> getServerTypesByLocation({ + required final ServerProviderLocation location, + }) async { + final List types = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get( + '/server_types', + ); + final rawTypes = response.data!['server_types']; + for (final rawType in rawTypes) { + for (final rawPrice in rawType['prices']) { + if (rawPrice['location'].toString() == location.identifier) { + types.add( + ServerType( + title: rawType['description'], + identifier: rawType['name'], + ram: rawType['memory'], + cores: rawType['cores'], + disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), + price: Price( + value: rawPrice['price_monthly']['gross'], + currency: 'EUR', + ), + ), + ); + } + } + } + } catch (e) { + print(e); + } finally { + close(client); + } + + return types; + } + @override Future createReverseDns({ required final ServerHostingDetails serverDetails, diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index d4b61721..ffc1d2d9 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -4,10 +4,14 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; abstract class ServerProviderApi extends ApiMap { Future> getServers(); Future> getAvailableLocations(); + Future> getServerTypesByLocation({ + required final ServerProviderLocation location, + }); Future restart(); Future powerOn(); diff --git a/lib/logic/models/server_provider_location.dart b/lib/logic/models/server_provider_location.dart index dea063a4..f76c226f 100644 --- a/lib/logic/models/server_provider_location.dart +++ b/lib/logic/models/server_provider_location.dart @@ -1,11 +1,13 @@ class ServerProviderLocation { ServerProviderLocation({ required this.title, + required this.identifier, this.description, this.flag, }); final String title; + final String identifier; final String? description; /// as emoji diff --git a/lib/logic/models/server_type.dart b/lib/logic/models/server_type.dart new file mode 100644 index 00000000..8fb5df98 --- /dev/null +++ b/lib/logic/models/server_type.dart @@ -0,0 +1,19 @@ +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/price.dart'; + +class ServerType { + ServerType({ + required this.title, + required this.identifier, + required this.ram, + required this.cores, + required this.disk, + required this.price, + }); + final String title; + final String identifier; + final double ram; + final DiskSize disk; + final int cores; + final Price price; +} From fe820ef5bed4edea51fa896681cd0c61b991c9fc Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 15 Oct 2022 19:49:31 +0000 Subject: [PATCH 222/732] feat(initializing): Implement location selection step for initializing page --- .../server_installation_cubit.dart | 15 +++ .../server_installation_state.dart | 73 ++++++----- .../setup/initializing/initializing.dart | 18 ++- ...icker.dart => server_provider_picker.dart} | 8 +- .../initializing/server_type_picker.dart | 118 ++++++++++++++++++ 5 files changed, 194 insertions(+), 38 deletions(-) rename lib/ui/pages/setup/initializing/{provider_picker.dart => server_provider_picker.dart} (96%) create mode 100644 lib/ui/pages/setup/initializing/server_type_picker.dart diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 99dd1d82..84410468 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -16,6 +16,8 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_repository.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; export 'package:provider/provider.dart'; @@ -93,6 +95,19 @@ class ServerInstallationCubit extends Cubit { ) .isApiTokenValid(providerToken); + Future> fetchAvailableLocations() async { + if (repository.serverProviderApiFactory == null) { + return []; + } + + return repository.serverProviderApiFactory! + .getServerProvider( + settings: const ServerProviderApiSettings(region: 'fra1'), + ) + .getAvailableLocations(); + } + + void setServerProviderKey(final String serverProviderKey) async { await repository.saveServerProviderKey(serverProviderKey); diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 82eda971..1a130baf 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -3,6 +3,7 @@ part of '../server_installation/server_installation_cubit.dart'; abstract class ServerInstallationState extends Equatable { const ServerInstallationState({ required this.providerApiToken, + required this.serverType, required this.cloudFlareKey, required this.backblazeCredential, required this.serverDomain, @@ -31,11 +32,13 @@ abstract class ServerInstallationState extends Equatable { final ServerDomain? serverDomain; final User? rootUser; final ServerHostingDetails? serverDetails; + final ServerType? serverType; final bool isServerStarted; final bool isServerResetedFirstTime; final bool isServerResetedSecondTime; - bool get isServerProviderFilled => providerApiToken != null; + bool get isServerProviderApiKeyFilled => providerApiToken != null; + bool get isServerTypeFilled => serverType != null; bool get isDnsProviderFilled => cloudFlareKey != null; bool get isBackupsProviderFilled => backblazeCredential != null; bool get isDomainSelected => serverDomain != null; @@ -58,7 +61,8 @@ abstract class ServerInstallationState extends Equatable { List get _fulfilementList { final List res = [ - isServerProviderFilled, + isServerProviderApiKeyFilled, + isServerTypeFilled, isDnsProviderFilled, isBackupsProviderFilled, isDomainSelected, @@ -76,11 +80,12 @@ abstract class ServerInstallationState extends Equatable { class TimerState extends ServerInstallationNotFinished { TimerState({ required this.dataState, - required final super.isLoading, + required super.isLoading, this.timerStart, this.duration, }) : super( providerApiToken: dataState.providerApiToken, + serverType: dataState.serverType, cloudFlareKey: dataState.cloudFlareKey, backblazeCredential: dataState.backblazeCredential, serverDomain: dataState.serverDomain, @@ -119,17 +124,18 @@ enum ServerSetupProgress { class ServerInstallationNotFinished extends ServerInstallationState { const ServerInstallationNotFinished({ - required final super.isServerStarted, - required final super.isServerResetedFirstTime, - required final super.isServerResetedSecondTime, - required final this.isLoading, + required super.isServerStarted, + required super.isServerResetedFirstTime, + required super.isServerResetedSecondTime, + required this.isLoading, required this.dnsMatches, - final super.providerApiToken, - final super.cloudFlareKey, - final super.backblazeCredential, - final super.serverDomain, - final super.rootUser, - final super.serverDetails, + super.providerApiToken, + super.serverType, + super.cloudFlareKey, + super.backblazeCredential, + super.serverDomain, + super.rootUser, + super.serverDetails, }); final bool isLoading; final Map? dnsMatches; @@ -137,6 +143,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { @override List get props => [ providerApiToken, + serverType, cloudFlareKey, backblazeCredential, serverDomain, @@ -150,6 +157,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationNotFinished copyWith({ final String? providerApiToken, + final ServerType? serverType, final String? cloudFlareKey, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, @@ -163,6 +171,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { }) => ServerInstallationNotFinished( providerApiToken: providerApiToken ?? this.providerApiToken, + serverType: serverType ?? this.serverType, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, @@ -179,6 +188,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, + serverType: serverType!, cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, @@ -209,20 +219,22 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ - required final String super.providerApiToken, - required final String super.cloudFlareKey, - required final BackblazeCredential super.backblazeCredential, - required final ServerDomain super.serverDomain, - required final User super.rootUser, - required final ServerHostingDetails super.serverDetails, - required final super.isServerStarted, - required final super.isServerResetedFirstTime, - required final super.isServerResetedSecondTime, + required String super.providerApiToken, + required ServerType super.serverType, + required String super.cloudFlareKey, + required BackblazeCredential super.backblazeCredential, + required ServerDomain super.serverDomain, + required User super.rootUser, + required ServerHostingDetails super.serverDetails, + required super.isServerStarted, + required super.isServerResetedFirstTime, + required super.isServerResetedSecondTime, }); @override List get props => [ providerApiToken, + serverType, cloudFlareKey, backblazeCredential, serverDomain, @@ -260,12 +272,13 @@ class ServerInstallationRecovery extends ServerInstallationState { const ServerInstallationRecovery({ required this.currentStep, required this.recoveryCapabilities, - final super.providerApiToken, - final super.cloudFlareKey, - final super.backblazeCredential, - final super.serverDomain, - final super.rootUser, - final super.serverDetails, + super.providerApiToken, + super.serverType, + super.cloudFlareKey, + super.backblazeCredential, + super.serverDomain, + super.rootUser, + super.serverDetails, }) : super( isServerStarted: true, isServerResetedFirstTime: true, @@ -277,6 +290,7 @@ class ServerInstallationRecovery extends ServerInstallationState { @override List get props => [ providerApiToken, + serverType, cloudFlareKey, backblazeCredential, serverDomain, @@ -289,6 +303,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationRecovery copyWith({ final String? providerApiToken, + final ServerType? serverType, final String? cloudFlareKey, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, @@ -299,6 +314,7 @@ class ServerInstallationRecovery extends ServerInstallationState { }) => ServerInstallationRecovery( providerApiToken: providerApiToken ?? this.providerApiToken, + serverType: serverType ?? this.serverType, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, @@ -310,6 +326,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, + serverType: serverType!, cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 2904cfb8..a211588b 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -7,7 +7,6 @@ import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; @@ -17,13 +16,14 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; -import 'package:selfprivacy/ui/pages/setup/initializing/provider_picker.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/server_provider_picker.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/server_type_picker.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class InitializingPage extends StatelessWidget { const InitializingPage({ - final super.key, + super.key, }); @override @@ -36,7 +36,8 @@ class InitializingPage extends StatelessWidget { Widget? actualInitializingPage; if (cubit.state is! ServerInstallationFinished) { actualInitializingPage = [ - () => _stepHetzner(cubit), + () => _stepServerProviderToken(cubit), + () => _stepServerType(cubit), () => _stepCloudflare(cubit), () => _stepBackblaze(cubit), () => _stepDomain(cubit), @@ -139,11 +140,16 @@ class InitializingPage extends StatelessWidget { } } - Widget _stepHetzner(final ServerInstallationCubit serverInstallationCubit) => - ProviderPicker( + Widget _stepServerProviderToken(final ServerInstallationCubit serverInstallationCubit) => + ServerProviderPicker( serverInstallationCubit: serverInstallationCubit, ); + Widget _stepServerType(final ServerInstallationCubit serverInstallationCubit) => + ServerTypePicker( + serverInstallationCubit: serverInstallationCubit, + ); + void _showModal(final BuildContext context, final Widget widget) { showModalBottomSheet( context: context, diff --git a/lib/ui/pages/setup/initializing/provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart similarity index 96% rename from lib/ui/pages/setup/initializing/provider_picker.dart rename to lib/ui/pages/setup/initializing/server_provider_picker.dart index 6681a07b..ee0ab36a 100644 --- a/lib/ui/pages/setup/initializing/provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -9,8 +9,8 @@ import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet. import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; -class ProviderPicker extends StatefulWidget { - const ProviderPicker({ +class ServerProviderPicker extends StatefulWidget { + const ServerProviderPicker({ required this.serverInstallationCubit, super.key, }); @@ -18,10 +18,10 @@ class ProviderPicker extends StatefulWidget { final ServerInstallationCubit serverInstallationCubit; @override - State createState() => _ProviderPickerState(); + State createState() => _ServerProviderPickerState(); } -class _ProviderPickerState extends State { +class _ServerProviderPickerState extends State { ServerProvider selectedProvider = ServerProvider.unknown; void setProvider(final ServerProvider provider) { diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart new file mode 100644 index 00000000..3dd7d3c9 --- /dev/null +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -0,0 +1,118 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; + +class ServerTypePicker extends StatefulWidget { + const ServerTypePicker({ + required this.serverInstallationCubit, + super.key, + }); + + final ServerInstallationCubit serverInstallationCubit; + + @override + State createState() => _ServerTypePickerState(); +} + +class _ServerTypePickerState extends State { + ServerProviderLocation? serverProviderLocation; + + void setServerProviderLocation(final ServerProviderLocation location) { + setState(() { + serverProviderLocation = location; + }); + } + + @override + Widget build(final BuildContext context) { + + } +} + +class SelectLocationPage extends StatelessWidget { + const SelectLocationPage({ + required this.serverInstallationCubit, + super.key, + }); + + final ServerInstallationCubit serverInstallationCubit; + + @override + Widget build(final BuildContext context) => FutureBuilder( + future: serverInstallationCubit.repository.serverProviderApiFactory, + builder: ( + final BuildContext context, + final AsyncSnapshot snapshot, + ) { + if (snapshot.hasData) { + return _KeyDisplay( + newDeviceKey: snapshot.data.toString(), + ); + } else { + return const Center(child: CircularProgressIndicator()); + } + }, + ), +} + +class ProviderSelectionPage extends StatelessWidget { + const ProviderSelectionPage({ + required this.callback, + super.key, + }); + + final Function callback; + + @override + Widget build(final BuildContext context) => Column( + children: [ + Text( + 'initializing.select_provider'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 10), + Text( + 'initializing.place_where_data'.tr(), + ), + const SizedBox(height: 10), + ConstrainedBox( + constraints: const BoxConstraints( + maxWidth: 320, + ), + child: Row( + children: [ + InkWell( + onTap: () { + context + .read() + .setServerProviderType(ServerProvider.hetzner); + callback(ServerProvider.hetzner); + }, + child: Image.asset( + 'assets/images/logos/hetzner.png', + width: 150, + ), + ), + const SizedBox( + width: 20, + ), + InkWell( + onTap: () { + context + .read() + .setServerProviderType(ServerProvider.digitalOcean); + callback(ServerProvider.digitalOcean); + }, + child: Image.asset( + 'assets/images/logos/digital_ocean.png', + width: 150, + ), + ), + ], + ), + ), + ], + ); +} From 72760e7980142664b9bdde34eb95f44f7002d946 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 15 Oct 2022 21:51:37 +0000 Subject: [PATCH 223/732] feat(initializing): Implement server type selection for initialization page --- assets/translations/en.json | 2 + assets/translations/ru.json | 2 + lib/config/hive_config.dart | 3 + .../server_installation_cubit.dart | 39 +++- .../server_installation_repository.dart | 6 + .../server_installation_state.dart | 34 +-- lib/logic/get_it/api_config.dart | 7 + lib/logic/models/disk_size.dart | 2 +- .../setup/initializing/initializing.dart | 12 +- .../initializing/server_type_picker.dart | 197 +++++++++++------- 10 files changed, 203 insertions(+), 101 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index bf8e4e2c..d2c75572 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -268,6 +268,8 @@ "place_where_data": "A place where your data and SelfPrivacy services will reside:", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", + "no_locations_found": "No available locations found. Make sure your account is accessible.", + "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", "connect_cloudflare": "Connect CloudFlare", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 604edf35..98f3ff23 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -267,6 +267,8 @@ "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", "how": "Как получить API Token", "provider_bad_key_error": "API ключ провайдера неверен", + "no_locations_found": "Не найдено локаций. Убедитесь, что ваш аккаунт доступен.", + "no_server_types_found": "Не удалось получить список серверов. Убедитесь, что ваш аккаунт доступен и попытайтесь сменить локацию сервера.", "cloudflare_bad_key_error": "Cloudflare API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", "connect_cloudflare": "Подключите CloudFlare", diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 29ab0519..b8cc287c 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -90,6 +90,9 @@ class BNames { /// A String field of [serverInstallationBox] box. static String cloudFlareKey = 'cloudFlareKey'; + /// A String field of [serverTypeIdentifier] box. + static String serverTypeIdentifier = 'serverTypeIdentifier'; + /// A [User] field of [serverInstallationBox] box. static String rootUser = 'rootUser'; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 84410468..4f4da2e1 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -6,8 +6,6 @@ import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -82,7 +80,9 @@ class ServerInstallationCubit extends Cubit { repository.serverProviderApiFactory! .getServerProvider( settings: const ServerProviderApiSettings( - region: 'fra1', isWithToken: false), + region: 'fra1', + isWithToken: false, + ), ) .isApiTokenValid(providerToken); @@ -101,12 +101,25 @@ class ServerInstallationCubit extends Cubit { } return repository.serverProviderApiFactory! - .getServerProvider( - settings: const ServerProviderApiSettings(region: 'fra1'), - ) - .getAvailableLocations(); + .getServerProvider( + settings: const ServerProviderApiSettings(region: 'fra1'), + ) + .getAvailableLocations(); + } + + Future> fetchAvailableTypesByLocation( + final ServerProviderLocation location, + ) async { + if (repository.serverProviderApiFactory == null) { + return []; + } + + return repository.serverProviderApiFactory! + .getServerProvider( + settings: const ServerProviderApiSettings(region: 'fra1'), + ) + .getServerTypesByLocation(location: location); } - void setServerProviderKey(final String serverProviderKey) async { await repository.saveServerProviderKey(serverProviderKey); @@ -128,6 +141,16 @@ class ServerInstallationCubit extends Cubit { ); } + void setServerType(final String serverTypeId) async { + await repository.saveServerType(serverTypeId); + + emit( + (state as ServerInstallationNotFinished).copyWith( + serverTypeIdentificator: serverTypeId, + ), + ); + } + void setCloudflareKey(final String cloudFlareKey) async { if (state is ServerInstallationRecovery) { setAndValidateCloudflareToken(cloudFlareKey); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 4fe10b1f..404e60d1 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -50,6 +50,7 @@ class ServerInstallationRepository { Future load() async { final String? providerApiToken = getIt().serverProviderKey; final String? cloudflareToken = getIt().cloudFlareKey; + final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; @@ -73,6 +74,7 @@ class ServerInstallationRepository { if (box.get(BNames.hasFinalChecked, defaultValue: false)) { return ServerInstallationFinished( providerApiToken: providerApiToken!, + serverTypeIdentificator: serverTypeIdentificator!, cloudFlareKey: cloudflareToken!, serverDomain: serverDomain!, backblazeCredential: backblazeCredential!, @@ -697,6 +699,10 @@ class ServerInstallationRepository { await getIt().storeServerProviderKey(key); } + Future saveServerType(final String serverType) async { + await getIt().storeServerTypeIdentifier(serverType); + } + Future deleteServerProviderKey() async { await box.delete(BNames.hetznerKey); getIt().init(); diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 1a130baf..40a21d5d 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -3,7 +3,7 @@ part of '../server_installation/server_installation_cubit.dart'; abstract class ServerInstallationState extends Equatable { const ServerInstallationState({ required this.providerApiToken, - required this.serverType, + required this.serverTypeIdentificator, required this.cloudFlareKey, required this.backblazeCredential, required this.serverDomain, @@ -17,6 +17,7 @@ abstract class ServerInstallationState extends Equatable { @override List get props => [ providerApiToken, + serverTypeIdentificator, cloudFlareKey, backblazeCredential, serverDomain, @@ -28,17 +29,17 @@ abstract class ServerInstallationState extends Equatable { final String? providerApiToken; final String? cloudFlareKey; + final String? serverTypeIdentificator; final BackblazeCredential? backblazeCredential; final ServerDomain? serverDomain; final User? rootUser; final ServerHostingDetails? serverDetails; - final ServerType? serverType; final bool isServerStarted; final bool isServerResetedFirstTime; final bool isServerResetedSecondTime; bool get isServerProviderApiKeyFilled => providerApiToken != null; - bool get isServerTypeFilled => serverType != null; + bool get isServerTypeFilled => serverTypeIdentificator != null; bool get isDnsProviderFilled => cloudFlareKey != null; bool get isBackupsProviderFilled => backblazeCredential != null; bool get isDomainSelected => serverDomain != null; @@ -85,7 +86,7 @@ class TimerState extends ServerInstallationNotFinished { this.duration, }) : super( providerApiToken: dataState.providerApiToken, - serverType: dataState.serverType, + serverTypeIdentificator: dataState.serverTypeIdentificator, cloudFlareKey: dataState.cloudFlareKey, backblazeCredential: dataState.backblazeCredential, serverDomain: dataState.serverDomain, @@ -130,7 +131,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { required this.isLoading, required this.dnsMatches, super.providerApiToken, - super.serverType, + super.serverTypeIdentificator, super.cloudFlareKey, super.backblazeCredential, super.serverDomain, @@ -143,7 +144,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { @override List get props => [ providerApiToken, - serverType, + serverTypeIdentificator, cloudFlareKey, backblazeCredential, serverDomain, @@ -157,7 +158,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationNotFinished copyWith({ final String? providerApiToken, - final ServerType? serverType, + final String? serverTypeIdentificator, final String? cloudFlareKey, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, @@ -171,7 +172,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { }) => ServerInstallationNotFinished( providerApiToken: providerApiToken ?? this.providerApiToken, - serverType: serverType ?? this.serverType, + serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, @@ -188,7 +189,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, - serverType: serverType!, + serverTypeIdentificator: serverTypeIdentificator!, cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, @@ -204,6 +205,7 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { const ServerInstallationEmpty() : super( providerApiToken: null, + serverTypeIdentificator: null, cloudFlareKey: null, backblazeCredential: null, serverDomain: null, @@ -220,7 +222,7 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ required String super.providerApiToken, - required ServerType super.serverType, + required String super.serverTypeIdentificator, required String super.cloudFlareKey, required BackblazeCredential super.backblazeCredential, required ServerDomain super.serverDomain, @@ -234,7 +236,7 @@ class ServerInstallationFinished extends ServerInstallationState { @override List get props => [ providerApiToken, - serverType, + serverTypeIdentificator, cloudFlareKey, backblazeCredential, serverDomain, @@ -273,7 +275,7 @@ class ServerInstallationRecovery extends ServerInstallationState { required this.currentStep, required this.recoveryCapabilities, super.providerApiToken, - super.serverType, + super.serverTypeIdentificator, super.cloudFlareKey, super.backblazeCredential, super.serverDomain, @@ -290,7 +292,7 @@ class ServerInstallationRecovery extends ServerInstallationState { @override List get props => [ providerApiToken, - serverType, + serverTypeIdentificator, cloudFlareKey, backblazeCredential, serverDomain, @@ -303,7 +305,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationRecovery copyWith({ final String? providerApiToken, - final ServerType? serverType, + final String? serverTypeIdentificator, final String? cloudFlareKey, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, @@ -314,7 +316,7 @@ class ServerInstallationRecovery extends ServerInstallationState { }) => ServerInstallationRecovery( providerApiToken: providerApiToken ?? this.providerApiToken, - serverType: serverType ?? this.serverType, + serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, @@ -326,7 +328,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, - serverType: serverType!, + serverTypeIdentificator: serverTypeIdentificator!, cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 6a81141f..387d7e7f 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -10,6 +10,7 @@ class ApiConfigModel { ServerHostingDetails? get serverDetails => _serverDetails; String? get serverProviderKey => _serverProviderKey; + String? get serverType => _serverType; String? get cloudFlareKey => _cloudFlareKey; BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; @@ -17,6 +18,7 @@ class ApiConfigModel { String? _serverProviderKey; String? _cloudFlareKey; + String? _serverType; ServerHostingDetails? _serverDetails; BackblazeCredential? _backblazeCredential; ServerDomain? _serverDomain; @@ -32,6 +34,11 @@ class ApiConfigModel { _cloudFlareKey = value; } + Future storeServerTypeIdentifier(final String typeIdentifier) async { + await _box.put(BNames.serverTypeIdentifier, typeIdentifier); + _serverType = typeIdentifier; + } + Future storeBackblazeCredential(final BackblazeCredential value) async { await _box.put(BNames.backblazeCredential, value); _backblazeCredential = value; diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index 44c6bc35..f7283689 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; class DiskSize { - const DiskSize({final this.byte = 0}); + const DiskSize({this.byte = 0}); DiskSize.fromKibibyte(final double kibibyte) : this(byte: (kibibyte * 1024).round()); diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index a211588b..029a30e4 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -140,15 +140,17 @@ class InitializingPage extends StatelessWidget { } } - Widget _stepServerProviderToken(final ServerInstallationCubit serverInstallationCubit) => + Widget _stepServerProviderToken( + final ServerInstallationCubit serverInstallationCubit) => ServerProviderPicker( serverInstallationCubit: serverInstallationCubit, ); - Widget _stepServerType(final ServerInstallationCubit serverInstallationCubit) => - ServerTypePicker( - serverInstallationCubit: serverInstallationCubit, - ); + Widget _stepServerType( + final ServerInstallationCubit serverInstallationCubit) => + ServerTypePicker( + serverInstallationCubit: serverInstallationCubit, + ); void _showModal(final BuildContext context, final Widget widget) { showModalBottomSheet( diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 3dd7d3c9..2536aab9 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -1,8 +1,9 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; class ServerTypePicker extends StatefulWidget { const ServerTypePicker({ @@ -18,6 +19,7 @@ class ServerTypePicker extends StatefulWidget { class _ServerTypePickerState extends State { ServerProviderLocation? serverProviderLocation; + ServerType? serverType; void setServerProviderLocation(final ServerProviderLocation location) { setState(() { @@ -27,92 +29,145 @@ class _ServerTypePickerState extends State { @override Widget build(final BuildContext context) { - + if (serverProviderLocation == null) { + return SelectLocationPage( + serverInstallationCubit: widget.serverInstallationCubit, + callback: setServerProviderLocation, + ); + } + + return SelectTypePage( + location: serverProviderLocation!, + serverInstallationCubit: widget.serverInstallationCubit, + ); } } class SelectLocationPage extends StatelessWidget { const SelectLocationPage({ required this.serverInstallationCubit, - super.key, - }); - - final ServerInstallationCubit serverInstallationCubit; - - @override - Widget build(final BuildContext context) => FutureBuilder( - future: serverInstallationCubit.repository.serverProviderApiFactory, - builder: ( - final BuildContext context, - final AsyncSnapshot snapshot, - ) { - if (snapshot.hasData) { - return _KeyDisplay( - newDeviceKey: snapshot.data.toString(), - ); - } else { - return const Center(child: CircularProgressIndicator()); - } - }, - ), -} - -class ProviderSelectionPage extends StatelessWidget { - const ProviderSelectionPage({ required this.callback, super.key, }); final Function callback; + final ServerInstallationCubit serverInstallationCubit; @override - Widget build(final BuildContext context) => Column( - children: [ - Text( - 'initializing.select_provider'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - const SizedBox(height: 10), - Text( - 'initializing.place_where_data'.tr(), - ), - const SizedBox(height: 10), - ConstrainedBox( - constraints: const BoxConstraints( - maxWidth: 320, - ), - child: Row( + Widget build(final BuildContext context) => FutureBuilder( + future: serverInstallationCubit.fetchAvailableLocations(), + builder: ( + final BuildContext context, + final AsyncSnapshot snapshot, + ) { + if (snapshot.hasData) { + if ((snapshot.data as List).isEmpty) { + return Text('initializing.no_locations_found'.tr()); + } + return ListView( + padding: paddingH15V0, children: [ - InkWell( - onTap: () { - context - .read() - .setServerProviderType(ServerProvider.hetzner); - callback(ServerProvider.hetzner); - }, - child: Image.asset( - 'assets/images/logos/hetzner.png', - width: 150, - ), - ), - const SizedBox( - width: 20, - ), - InkWell( - onTap: () { - context - .read() - .setServerProviderType(ServerProvider.digitalOcean); - callback(ServerProvider.digitalOcean); - }, - child: Image.asset( - 'assets/images/logos/digital_ocean.png', - width: 150, + ...(snapshot.data! as List).map( + (final location) => InkWell( + onTap: () { + callback(location); + }, + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + if (location.flag != null) Text(location.flag!), + const SizedBox(height: 8), + Text(location.title), + const SizedBox(height: 8), + if (location.description != null) + Text(location.description!), + ], + ), + ], + ), + ), + ), ), ), + const SizedBox(height: 24), ], - ), - ), - ], + ); + } else { + return const Center(child: CircularProgressIndicator()); + } + }, + ); +} + +class SelectTypePage extends StatelessWidget { + const SelectTypePage({ + required this.location, + required this.serverInstallationCubit, + super.key, + }); + + final ServerProviderLocation location; + final ServerInstallationCubit serverInstallationCubit; + + @override + Widget build(final BuildContext context) => FutureBuilder( + future: serverInstallationCubit.fetchAvailableTypesByLocation(location), + builder: ( + final BuildContext context, + final AsyncSnapshot snapshot, + ) { + if (snapshot.hasData) { + if ((snapshot.data as List).isEmpty) { + return Text('initializing.no_server_types_found'.tr()); + } + return ListView( + padding: paddingH15V0, + children: [ + ...(snapshot.data! as List).map( + (final type) => InkWell( + onTap: () { + serverInstallationCubit.setServerType(type.identifier); + }, + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(type.title), + const SizedBox(height: 8), + Text('cores: $type.cores'), + const SizedBox(height: 8), + Text('ram: $type.ram'), + const SizedBox(height: 8), + Text('disk: $type.disk.gibibyte'), + const SizedBox(height: 8), + Text('price: $type.price.value $type.price.currency'), + ], + ), + ], + ), + ), + ), + ), + ), + const SizedBox(height: 24), + ], + ); + } else { + return const Center(child: CircularProgressIndicator()); + } + }, ); } From 8a93af2b06ab5d0d8584e4cb962cbe2bb0e63ff1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 16 Oct 2022 00:51:10 +0000 Subject: [PATCH 224/732] fix(region): Move region settings for provider api to factory --- lib/config/hive_config.dart | 3 + .../rest_maps/api_factory_creator.dart | 13 ++-- .../rest_maps/api_factory_settings.dart | 20 ++++++ .../digital_ocean/digital_ocean.dart | 3 +- .../digital_ocean/digital_ocean_factory.dart | 6 +- .../server_providers/hetzner/hetzner.dart | 33 ++++----- .../hetzner/hetzner_factory.dart | 14 ++-- .../server_provider_api_settings.dart | 4 +- .../server_provider_factory.dart | 4 +- .../cubit/dns_records/dns_records_cubit.dart | 6 +- .../hetzner_metrics_repository.dart | 4 +- .../provider_volume_cubit.dart | 60 +++++------------ .../server_detailed_info_repository.dart | 6 +- .../server_installation_cubit.dart | 34 +++++----- .../server_installation_repository.dart | 67 ++++++++----------- .../server_installation_state.dart | 6 +- lib/logic/get_it/api_config.dart | 11 +++ lib/logic/models/server_type.dart | 3 + .../initializing/server_type_picker.dart | 5 +- 19 files changed, 161 insertions(+), 141 deletions(-) create mode 100644 lib/logic/api_maps/rest_maps/api_factory_settings.dart diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index b8cc287c..7d8e59aa 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -87,6 +87,9 @@ class BNames { /// A String field of [serverInstallationBox] box. static String hetznerKey = 'hetznerKey'; + /// A String field of [serverLocation] box. + static String serverLocation = 'serverLocation'; + /// A String field of [serverInstallationBox] box. static String cloudFlareKey = 'cloudFlareKey'; diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index a144c647..0dbe1e90 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -1,3 +1,4 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart'; @@ -13,9 +14,9 @@ class UnknownApiProviderException implements Exception { class ApiFactoryCreator { static ServerProviderApiFactory createServerProviderApiFactory( - final ServerProvider provider, + final ServerProviderApiFactorySettings settings, ) { - switch (provider) { + switch (settings.provider) { case ServerProvider.hetzner: return HetznerApiFactory(); case ServerProvider.digitalOcean: @@ -26,9 +27,9 @@ class ApiFactoryCreator { } static DnsProviderApiFactory createDnsProviderApiFactory( - final DnsProvider provider, + final DnsProviderApiFactorySettings settings, ) { - switch (provider) { + switch (settings.provider) { case DnsProvider.cloudflare: return CloudflareApiFactory(); case DnsProvider.unknown: @@ -39,9 +40,9 @@ class ApiFactoryCreator { class VolumeApiFactoryCreator { static VolumeProviderApiFactory createVolumeProviderApiFactory( - final ServerProvider provider, + final ServerProviderApiFactorySettings settings, ) { - switch (provider) { + switch (settings.provider) { case ServerProvider.hetzner: return HetznerApiFactory(); case ServerProvider.digitalOcean: diff --git a/lib/logic/api_maps/rest_maps/api_factory_settings.dart b/lib/logic/api_maps/rest_maps/api_factory_settings.dart new file mode 100644 index 00000000..438b92d5 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/api_factory_settings.dart @@ -0,0 +1,20 @@ +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; + +class ServerProviderApiFactorySettings { + ServerProviderApiFactorySettings({ + required this.provider, + this.location, + }); + + final ServerProvider provider; + final String? location; +} + +class DnsProviderApiFactorySettings { + DnsProviderApiFactorySettings({ + required this.provider, + }); + + final DnsProvider provider; +} diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 67811f26..fb44a4dd 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -27,7 +27,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @override bool isWithToken; - final String region; + final String? region; @override BaseOptions get options { @@ -631,6 +631,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { value: rawSize['price_monthly'], currency: 'USD', ), + location: location, ), ); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart index 7508e04e..6864c7ab 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart @@ -8,7 +8,8 @@ class DigitalOceanApiFactory extends ServerProviderApiFactory with VolumeProviderApiFactory { @override ServerProviderApi getServerProvider({ - required final ServerProviderApiSettings settings, + final ServerProviderApiSettings settings = + const ServerProviderApiSettings(), }) => DigitalOceanApi( region: settings.region, @@ -18,7 +19,8 @@ class DigitalOceanApiFactory extends ServerProviderApiFactory @override VolumeProviderApi getVolumeProvider({ - required final ServerProviderApiSettings settings, + final ServerProviderApiSettings settings = + const ServerProviderApiSettings(), }) => DigitalOceanApi( region: settings.region, diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 8e31521e..0d8e0ab0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -18,7 +18,7 @@ import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { HetznerApi({ - required this.region, + this.region, this.hasLogger = false, this.isWithToken = true, }); @@ -27,7 +27,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { @override bool isWithToken; - final String region; + final String? region; @override BaseOptions get options { @@ -336,25 +336,25 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String userdataString = "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; - final Map data = { - 'name': hostname, - 'server_type': 'cx11', - 'start_after_create': false, - 'image': 'ubuntu-20.04', - 'volumes': [dbId], - 'networks': [], - 'user_data': userdataString, - 'labels': {}, - 'automount': true, - 'location': region, - }; - print('Decoded data: $data'); - ServerHostingDetails? serverDetails; DioError? hetznerError; bool success = false; try { + final Map data = { + 'name': hostname, + 'server_type': 'cx11', + 'start_after_create': false, + 'image': 'ubuntu-20.04', + 'volumes': [dbId], + 'networks': [], + 'user_data': userdataString, + 'labels': {}, + 'automount': true, + 'location': region!, + }; + print('Decoded data: $data'); + final Response serverCreateResponse = await client.post( '/servers', data: data, @@ -616,6 +616,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { value: rawPrice['price_monthly']['gross'], currency: 'EUR', ), + location: location, ), ); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart index f303966b..5f8fcab5 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart @@ -6,22 +6,28 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_pro class HetznerApiFactory extends ServerProviderApiFactory with VolumeProviderApiFactory { + HetznerApiFactory({this.region}); + + final String? region; + @override ServerProviderApi getServerProvider({ - required final ServerProviderApiSettings settings, + final ServerProviderApiSettings settings = + const ServerProviderApiSettings(), }) => HetznerApi( - region: settings.region, + region: settings.region ?? region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); @override VolumeProviderApi getVolumeProvider({ - required final ServerProviderApiSettings settings, + final ServerProviderApiSettings settings = + const ServerProviderApiSettings(), }) => HetznerApi( - region: settings.region, + region: settings.region ?? region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart index b1513bf6..3931b45b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart @@ -2,10 +2,10 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart' class ServerProviderApiSettings extends ProviderApiSettings { const ServerProviderApiSettings({ - required this.region, + this.region, super.hasLogger = false, super.isWithToken = true, }); - final String region; + final String? region; } diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart index 4fad8797..dbbb8035 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart @@ -4,12 +4,12 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_pro abstract class ServerProviderApiFactory { ServerProviderApi getServerProvider({ - required final ServerProviderApiSettings settings, + final ServerProviderApiSettings settings, }); } mixin VolumeProviderApiFactory { VolumeProviderApi getVolumeProvider({ - required final ServerProviderApiSettings settings, + final ServerProviderApiSettings settings, }); } diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index b6d503aa..f1c41351 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,5 +1,6 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; @@ -20,8 +21,9 @@ class DnsRecordsCubit DnsProviderApiFactory? dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( - DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! - ); // TODO: Remove when provider selection is implemented. + DnsProviderApiFactorySettings(provider: DnsProvider.cloudflare), + ); // TODO: HARDCODE FOR NOW!!! + // TODO: Remove when provider selection is implemented. final ServerApi api = ServerApi(); diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart index 18137fdc..bc1d8e42 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart @@ -1,3 +1,4 @@ +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; @@ -27,8 +28,9 @@ class HetznerMetricsRepository { } final HetznerApi api = HetznerApi( + /// TODO: Hetzner hardcode (???) hasLogger: false, - region: 'fra1', + region: getIt().serverLocation, ); final List> results = await Future.wait([ diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 95b0d362..66f21d7b 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; @@ -25,22 +26,21 @@ class ApiProviderVolumeCubit Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { final serverDetails = getIt().serverDetails; + final serverLocation = getIt().serverLocation; providerApi = serverDetails == null ? null : VolumeApiFactoryCreator.createVolumeProviderApiFactory( - getIt().serverDetails!.provider, + ServerProviderApiFactorySettings( + location: serverLocation, + provider: getIt().serverDetails!.provider, + ), ); _refetch(); } } - Future getPricePerGb() async => providerApi! - .getVolumeProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) - .getPricePerGb(); + Future getPricePerGb() async => + providerApi!.getVolumeProvider().getPricePerGb(); Future refresh() async { emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); @@ -52,13 +52,8 @@ class ApiProviderVolumeCubit return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } - final List volumes = await providerApi! - .getVolumeProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) - .getVolumes(); + final List volumes = + await providerApi!.getVolumeProvider().getVolumes(); if (volumes.isEmpty) { return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); @@ -70,22 +65,14 @@ class ApiProviderVolumeCubit Future attachVolume(final DiskVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; await providerApi! - .getVolumeProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) + .getVolumeProvider() .attachVolume(volume.providerVolume!.id.toString(), server.id); refresh(); } Future detachVolume(final DiskVolume volume) async { await providerApi! - .getVolumeProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) + .getVolumeProvider() .detachVolume(volume.providerVolume!.id.toString()); refresh(); } @@ -99,13 +86,7 @@ class ApiProviderVolumeCubit 'Starting resize', ); emit(state.copyWith(isResizing: true)); - final bool resized = await providerApi! - .getVolumeProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) - .resizeVolume( + final bool resized = await providerApi!.getVolumeProvider().resizeVolume( volume.providerVolume!.id.toString(), newSizeGb, ); @@ -141,13 +122,8 @@ class ApiProviderVolumeCubit } Future createVolume() async { - final ServerVolume? volume = await providerApi! - .getVolumeProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) - .createVolume(); + final ServerVolume? volume = + await providerApi!.getVolumeProvider().createVolume(); final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); @@ -160,11 +136,7 @@ class ApiProviderVolumeCubit Future deleteVolume(final DiskVolume volume) async { await providerApi! - .getVolumeProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) + .getVolumeProvider() .deleteVolume(volume.providerVolume!.id.toString()); refresh(); } diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index d4149f61..bfa3991f 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,3 +1,4 @@ +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; @@ -5,7 +6,10 @@ import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ServerDetailsRepository { - HetznerApi hetzner = HetznerApi(region: 'fra1'); + HetznerApi hetzner = HetznerApi( + /// TODO: Hetzner hardcode (???) + region: getIt().serverLocation, + ); ServerApi server = ServerApi(); Future load() async { diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 4f4da2e1..360ec2e5 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -5,6 +5,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; @@ -57,17 +58,15 @@ class ServerInstallationCubit extends Cubit { void setServerProviderType(final ServerProvider providerType) { repository.serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( - providerType, + ServerProviderApiFactorySettings( + provider: providerType, + ), ); } RegExp getServerProviderApiTokenValidation() => repository.serverProviderApiFactory! - .getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ) + .getServerProvider() .getApiTokenValidation(); RegExp getDnsProviderApiTokenValidation() => repository.dnsProviderApiFactory! @@ -80,7 +79,6 @@ class ServerInstallationCubit extends Cubit { repository.serverProviderApiFactory! .getServerProvider( settings: const ServerProviderApiSettings( - region: 'fra1', isWithToken: false, ), ) @@ -101,9 +99,7 @@ class ServerInstallationCubit extends Cubit { } return repository.serverProviderApiFactory! - .getServerProvider( - settings: const ServerProviderApiSettings(region: 'fra1'), - ) + .getServerProvider() .getAvailableLocations(); } @@ -115,9 +111,7 @@ class ServerInstallationCubit extends Cubit { } return repository.serverProviderApiFactory! - .getServerProvider( - settings: const ServerProviderApiSettings(region: 'fra1'), - ) + .getServerProvider() .getServerTypesByLocation(location: location); } @@ -141,12 +135,20 @@ class ServerInstallationCubit extends Cubit { ); } - void setServerType(final String serverTypeId) async { - await repository.saveServerType(serverTypeId); + void setServerType(final ServerType serverType) async { + await repository.saveServerType(serverType); + + repository.serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory( + ServerProviderApiFactorySettings( + provider: getIt().serverDetails!.provider, + location: serverType.location.identifier, + ), + ); emit( (state as ServerInstallationNotFinished).copyWith( - serverTypeIdentificator: serverTypeId, + serverTypeIdentificator: serverType.identifier, ), ); } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 404e60d1..7296d3a3 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -10,6 +10,7 @@ import 'package:pub_semver/pub_semver.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; @@ -25,6 +26,7 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; @@ -44,11 +46,14 @@ class ServerInstallationRepository { ServerProviderApiFactory? serverProviderApiFactory; DnsProviderApiFactory? dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( - DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! + DnsProviderApiFactorySettings( + provider: DnsProvider.cloudflare, + ), // TODO: HARDCODE FOR NOW!!! ); Future load() async { final String? providerApiToken = getIt().serverProviderKey; + final String? location = getIt().serverLocation; final String? cloudflareToken = getIt().cloudFlareKey; final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; @@ -61,13 +66,18 @@ class ServerInstallationRepository { serverDetails.provider != ServerProvider.unknown) { serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( - serverDetails.provider, + ServerProviderApiFactorySettings( + provider: serverDetails.provider, + location: location, + ), ); } if (serverDomain != null && serverDomain.provider != DnsProvider.unknown) { dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( - serverDomain.provider, + DnsProviderApiFactorySettings( + provider: serverDomain.provider, + ), ); } @@ -155,11 +165,7 @@ class ServerInstallationRepository { ) async { ServerHostingDetails serverDetails; - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); serverDetails = await api.powerOn(); return serverDetails; @@ -235,11 +241,7 @@ class ServerInstallationRepository { required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); try { final ServerHostingDetails? serverDetails = await api.createServer( dnsApiToken: cloudFlareKey, @@ -344,11 +346,7 @@ class ServerInstallationRepository { final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); final ServerProviderApi serverApi = - serverProviderApiFactory!.getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ); + serverProviderApiFactory!.getServerProvider(); await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, @@ -420,20 +418,12 @@ class ServerInstallationRepository { } Future restart() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); return api.restart(); } Future powerOn() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); return api.powerOn(); } @@ -676,11 +666,7 @@ class ServerInstallationRepository { } Future> getServersOnProviderAccount() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); return api.getServers(); } @@ -699,8 +685,13 @@ class ServerInstallationRepository { await getIt().storeServerProviderKey(key); } - Future saveServerType(final String serverType) async { - await getIt().storeServerTypeIdentifier(serverType); + Future saveServerType(final ServerType serverType) async { + await getIt().storeServerTypeIdentifier( + serverType.identifier, + ); + await getIt().storeServerLocation( + serverType.location.identifier, + ); } Future deleteServerProviderKey() async { @@ -762,11 +753,7 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider( - settings: const ServerProviderApiSettings( - region: 'fra1', - ), - ); + final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 40a21d5d..9e5684a6 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -172,7 +172,8 @@ class ServerInstallationNotFinished extends ServerInstallationState { }) => ServerInstallationNotFinished( providerApiToken: providerApiToken ?? this.providerApiToken, - serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, + serverTypeIdentificator: + serverTypeIdentificator ?? this.serverTypeIdentificator, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, @@ -316,7 +317,8 @@ class ServerInstallationRecovery extends ServerInstallationState { }) => ServerInstallationRecovery( providerApiToken: providerApiToken ?? this.providerApiToken, - serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, + serverTypeIdentificator: + serverTypeIdentificator ?? this.serverTypeIdentificator, cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 387d7e7f..302a37b1 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -10,6 +10,7 @@ class ApiConfigModel { ServerHostingDetails? get serverDetails => _serverDetails; String? get serverProviderKey => _serverProviderKey; + String? get serverLocation => _serverLocation; String? get serverType => _serverType; String? get cloudFlareKey => _cloudFlareKey; BackblazeCredential? get backblazeCredential => _backblazeCredential; @@ -17,6 +18,7 @@ class ApiConfigModel { BackblazeBucket? get backblazeBucket => _backblazeBucket; String? _serverProviderKey; + String? _serverLocation; String? _cloudFlareKey; String? _serverType; ServerHostingDetails? _serverDetails; @@ -39,6 +41,11 @@ class ApiConfigModel { _serverType = typeIdentifier; } + Future storeServerLocation(final String serverLocation) async { + await _box.put(BNames.serverLocation, serverLocation); + _serverLocation = serverLocation; + } + Future storeBackblazeCredential(final BackblazeCredential value) async { await _box.put(BNames.backblazeCredential, value); _backblazeCredential = value; @@ -61,19 +68,23 @@ class ApiConfigModel { void clear() { _serverProviderKey = null; + _serverLocation = null; _cloudFlareKey = null; _backblazeCredential = null; _serverDomain = null; _serverDetails = null; _backblazeBucket = null; + _serverType = null; } void init() { _serverProviderKey = _box.get(BNames.hetznerKey); + _serverLocation = _box.get(BNames.serverLocation); _cloudFlareKey = _box.get(BNames.cloudFlareKey); _backblazeCredential = _box.get(BNames.backblazeCredential); _serverDomain = _box.get(BNames.serverDomain); _serverDetails = _box.get(BNames.serverDetails); _backblazeBucket = _box.get(BNames.backblazeBucket); + _serverType = _box.get(BNames.serverTypeIdentifier); } } diff --git a/lib/logic/models/server_type.dart b/lib/logic/models/server_type.dart index 8fb5df98..4e7b8d92 100644 --- a/lib/logic/models/server_type.dart +++ b/lib/logic/models/server_type.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/price.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; class ServerType { ServerType({ @@ -9,6 +10,7 @@ class ServerType { required this.cores, required this.disk, required this.price, + required this.location, }); final String title; final String identifier; @@ -16,4 +18,5 @@ class ServerType { final DiskSize disk; final int cores; final Price price; + final ServerProviderLocation location; } diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 2536aab9..a913f240 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -133,7 +133,7 @@ class SelectTypePage extends StatelessWidget { ...(snapshot.data! as List).map( (final type) => InkWell( onTap: () { - serverInstallationCubit.setServerType(type.identifier); + serverInstallationCubit.setServerType(type); }, child: Card( child: Padding( @@ -153,7 +153,8 @@ class SelectTypePage extends StatelessWidget { const SizedBox(height: 8), Text('disk: $type.disk.gibibyte'), const SizedBox(height: 8), - Text('price: $type.price.value $type.price.currency'), + Text( + 'price: $type.price.value $type.price.currency'), ], ), ], From f5a75e6eb5bef34e7b2ebb81d147123700669229 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 16 Oct 2022 01:15:48 +0000 Subject: [PATCH 225/732] feat(initializing): Implement additional server type field for server installation --- .../server_providers/digital_ocean/digital_ocean.dart | 5 ++++- .../api_maps/rest_maps/server_providers/hetzner/hetzner.dart | 5 ++++- .../api_maps/rest_maps/server_providers/server_provider.dart | 1 + .../server_installation/server_installation_repository.dart | 4 +++- lib/ui/pages/setup/initializing/server_type_picker.dart | 3 ++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index fb44a4dd..dafda8c4 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -294,6 +294,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final String dnsApiToken, required final User rootUser, required final String domainName, + required final String serverType, }) async { ServerHostingDetails? details; @@ -307,6 +308,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { rootUser: rootUser, domainName: domainName, dataBase: newVolume, + serverType: serverType, ); return details; @@ -317,6 +319,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final ServerVolume dataBase, + required final String serverType, }) async { final Dio client = await getClient(); @@ -336,7 +339,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Map data = { 'name': hostname, - 'server_type': 'cx11', + 'server_type': serverType, 'start_after_create': false, 'image': 'ubuntu-20.04', 'volumes': dbUuid == null ? [dbId] : [dbUuid], diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 0d8e0ab0..5980f9cb 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -298,6 +298,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String dnsApiToken, required final User rootUser, required final String domainName, + required final String serverType, }) async { ServerHostingDetails? details; @@ -311,6 +312,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { rootUser: rootUser, domainName: domainName, dataBase: newVolume, + serverType: serverType, ); return details; @@ -321,6 +323,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final ServerVolume dataBase, + required final String serverType, }) async { final Dio client = await getClient(); @@ -343,7 +346,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { try { final Map data = { 'name': hostname, - 'server_type': 'cx11', + 'server_type': serverType, 'start_after_create': false, 'image': 'ubuntu-20.04', 'volumes': [dbId], diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index ffc1d2d9..cd28b46f 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -21,6 +21,7 @@ abstract class ServerProviderApi extends ApiMap { required final String dnsApiToken, required final User rootUser, required final String domainName, + required final String serverType, }); Future createReverseDns({ required final ServerHostingDetails serverDetails, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 7296d3a3..5b33ef28 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -16,7 +16,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; @@ -247,6 +246,7 @@ class ServerInstallationRepository { dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, + serverType: getIt().serverType!, ); if (serverDetails == null) { @@ -277,6 +277,7 @@ class ServerInstallationRepository { dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, + serverType: getIt().serverType!, ); } catch (e) { print(e); @@ -314,6 +315,7 @@ class ServerInstallationRepository { dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, + serverType: getIt().serverType!, ); } catch (e) { print(e); diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index a913f240..7a56ac2e 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -154,7 +154,8 @@ class SelectTypePage extends StatelessWidget { Text('disk: $type.disk.gibibyte'), const SizedBox(height: 8), Text( - 'price: $type.price.value $type.price.currency'), + 'price: $type.price.value $type.price.currency', + ), ], ), ], From d19531232c24beeb35b9898704633cf81b7160c0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 17 Oct 2022 17:42:23 +0000 Subject: [PATCH 226/732] feat(digital-ocean): Implement endpoints for server creation and deletion --- .../digital_ocean/digital_ocean.dart | 136 +++++++----------- .../server_providers/hetzner/hetzner.dart | 1 - .../server_installation_cubit.dart | 2 +- lib/logic/models/server_basic_info.dart | 4 - 4 files changed, 51 insertions(+), 92 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index dafda8c4..125fe3bd 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -95,6 +95,9 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Response dbCreateResponse; final Dio client = await getClient(); try { + final List volumes = await getVolumes(); + await Future.delayed(const Duration(seconds: 6)); + dbCreateResponse = await client.post( '/volumes', data: { @@ -109,11 +112,12 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final dbSize = dbCreateResponse.data['volume']['size_gigabytes']; final dbName = dbCreateResponse.data['volume']['name']; volume = ServerVolume( - id: dbId, + id: volumes.length, name: dbName, sizeByte: dbSize, serverId: null, linuxDevice: null, + uuid: dbId, ); } catch (e) { print(e); @@ -296,36 +300,9 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final String domainName, required final String serverType, }) async { - ServerHostingDetails? details; - - final ServerVolume? newVolume = await createVolume(); - if (newVolume == null) { - return details; - } - - details = await createServerWithVolume( - dnsApiToken: dnsApiToken, - rootUser: rootUser, - domainName: domainName, - dataBase: newVolume, - serverType: serverType, - ); - - return details; - } - - Future createServerWithVolume({ - required final String dnsApiToken, - required final User rootUser, - required final String domainName, - required final ServerVolume dataBase, - required final String serverType, - }) async { - final Dio client = await getClient(); + ServerHostingDetails? serverDetails; final String dbPassword = StringGenerators.dbPassword(); - final int dbId = dataBase.id; - final String? dbUuid = dataBase.uuid; final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); @@ -334,58 +311,44 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=digital-ocean NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); - final Map data = { - 'name': hostname, - 'server_type': serverType, - 'start_after_create': false, - 'image': 'ubuntu-20.04', - 'volumes': dbUuid == null ? [dbId] : [dbUuid], - 'networks': [], - 'user_data': userdataString, - 'labels': {}, - 'automount': true, - 'location': 'fsn1' - }; - print('Decoded data: $data'); - - ServerHostingDetails? serverDetails; - DioError? hetznerError; - bool success = false; - + final Dio client = await getClient(); try { + final Map data = { + 'name': hostname, + 'size': serverType, + 'image': 'ubuntu-20-04-x64', + 'user_data': userdataString, + 'region': region!, + }; + print('Decoded data: $data'); + final Response serverCreateResponse = await client.post( - '/servers', + '/droplets', data: data, ); - print(serverCreateResponse.data); - serverDetails = ServerHostingDetails( - id: serverCreateResponse.data['server']['id'], - ip4: serverCreateResponse.data['server']['public_net']['ipv4']['ip'], - createTime: DateTime.now(), - volume: dataBase, - apiToken: apiToken, - provider: ServerProvider.hetzner, - ); - success = true; - } on DioError catch (e) { - print(e); - hetznerError = e; + + final int serverId = serverCreateResponse.data['server']['id']; + final ServerVolume? newVolume = await createVolume(); + final bool attachedVolume = + await attachVolume(newVolume!.uuid!, serverId); + + if (attachedVolume) { + serverDetails = ServerHostingDetails( + id: serverId, + ip4: serverCreateResponse.data['droplet']['networks']['v4'][0], + createTime: DateTime.now(), + volume: newVolume, + apiToken: apiToken, + provider: ServerProvider.digitalOcean, + ); + } } catch (e) { print(e); } finally { - client.close(); - } - - if (!success) { - await Future.delayed(const Duration(seconds: 10)); - await deleteVolume(dbUuid ?? dbId.toString()); - } - - if (hetznerError != null) { - throw hetznerError; + close(client); } return serverDetails; @@ -416,24 +379,26 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String hostname = getHostnameFromDomain(domainName); - final Response serversReponse = await client.get('/servers'); - final List servers = serversReponse.data['servers']; - final Map server = servers.firstWhere((final el) => el['name'] == hostname); - final List volumes = server['volumes']; + final ServerBasicInfo serverToRemove = (await getServers()).firstWhere( + (final el) => el.name == hostname, + ); + final ServerVolume volumeToRemove = (await getVolumes()).firstWhere( + (final el) => el.serverId == serverToRemove.id, + ); final List laterFutures = []; - for (final volumeId in volumes) { - await client.post('/volumes/$volumeId/actions/detach'); - } + await detachVolume(volumeToRemove.uuid!); await Future.delayed(const Duration(seconds: 10)); - for (final volumeId in volumes) { - laterFutures.add(client.delete('/volumes/$volumeId')); + try { + laterFutures.add(deleteVolume(volumeToRemove.uuid!)); + laterFutures.add(client.delete('/droplets/$serverToRemove.id')); + await Future.wait(laterFutures); + } catch (e) { + print(e); + } finally { + close(client); } - laterFutures.add(client.delete('/servers/${server['id']}')); - - await Future.wait(laterFutures); - close(client); } @override @@ -530,7 +495,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ip: server.publicNet.ipv4.ip, reverseDns: server.publicNet.ipv4.reverseDns, created: server.created, - volumeId: server.volumes.isNotEmpty ? server.volumes[0] : 0, ), ) .toList(); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 5980f9cb..ba94dc53 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -532,7 +532,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ip: server.publicNet.ipv4.ip, reverseDns: server.publicNet.ipv4.reverseDns, created: server.created, - volumeId: server.volumes.isNotEmpty ? server.volumes[0] : 0, ), ) .toList(); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 360ec2e5..499ff49a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -588,7 +588,7 @@ class ServerInstallationCubit extends Cubit { id: server.id, createTime: server.created, volume: ServerVolume( - id: server.volumeId, + id: 0, name: 'recovered_volume', sizeByte: 0, serverId: server.id, diff --git a/lib/logic/models/server_basic_info.dart b/lib/logic/models/server_basic_info.dart index 8670dc8c..b20803b0 100644 --- a/lib/logic/models/server_basic_info.dart +++ b/lib/logic/models/server_basic_info.dart @@ -5,14 +5,12 @@ class ServerBasicInfo { required this.reverseDns, required this.ip, required this.created, - required this.volumeId, }); final int id; final String name; final String reverseDns; final String ip; final DateTime created; - final int volumeId; } class ServerBasicInfoWithValidators extends ServerBasicInfo { @@ -26,7 +24,6 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { reverseDns: serverBasicInfo.reverseDns, ip: serverBasicInfo.ip, created: serverBasicInfo.created, - volumeId: serverBasicInfo.volumeId, isIpValid: isIpValid, isReverseDnsValid: isReverseDnsValid, ); @@ -37,7 +34,6 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { required final super.reverseDns, required final super.ip, required final super.created, - required final super.volumeId, required this.isIpValid, required this.isReverseDnsValid, }); From e4ed69d1510473c462c9af55705e6ebf8e4f76fd Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 17 Oct 2022 23:58:29 +0000 Subject: [PATCH 227/732] refactor(volume): Make volume interfaces work through volume entities, not IDs --- .../digital_ocean/digital_ocean.dart | 82 ++++++------------- .../server_providers/hetzner/hetzner.dart | 18 ++-- .../server_providers/volume_provider.dart | 9 +- .../provider_volume_cubit.dart | 8 +- 4 files changed, 40 insertions(+), 77 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 125fe3bd..fb3b71e2 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -167,16 +167,13 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return volumes; } - @override - - /// volumeId is storage's UUID for Digital Ocean - Future getVolume(final String volumeId) async { + Future getVolume(final String volumeUuid) async { ServerVolume? neededVolume; final List volumes = await getVolumes(); for (final volume in volumes) { - if (volume.uuid == volumeId) { + if (volume.uuid == volumeUuid) { neededVolume = volume; } } @@ -185,12 +182,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - - /// volumeId is storage's UUID for Digital Ocean - Future deleteVolume(final String volumeId) async { + Future deleteVolume(final ServerVolume volume) async { final Dio client = await getClient(); try { - await client.delete('/volumes/$volumeId'); + await client.delete('/volumes/$volume.uuid'); } catch (e) { print(e); } finally { @@ -199,12 +194,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - - /// volumeId is storage's UUID for Digital Ocean - Future attachVolume(final String volumeId, final int serverId) async { + Future attachVolume(final ServerVolume volume, final int serverId) async { bool success = false; - final ServerVolume? volumeToAttach = await getVolume(volumeId); + final ServerVolume? volumeToAttach = await getVolume(volume.uuid!); if (volumeToAttach == null) { return success; } @@ -233,12 +226,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - - /// volumeId is storage's UUID for Digital Ocean - Future detachVolume(final String volumeId) async { + Future detachVolume(final ServerVolume volume) async { bool success = false; - final ServerVolume? volumeToAttach = await getVolume(volumeId); + final ServerVolume? volumeToAttach = await getVolume(volume.uuid!); if (volumeToAttach == null) { return success; } @@ -266,9 +257,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - - /// volumeId is storage's UUID for Digital Ocean - Future resizeVolume(final String volumeId, final int sizeGb) async { + Future resizeVolume(final ServerVolume volume, final int sizeGb) async { bool success = false; final Response dbPostResponse; @@ -303,21 +292,19 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ServerHostingDetails? serverDetails; final String dbPassword = StringGenerators.dbPassword(); - final String apiToken = StringGenerators.apiToken(); - final String hostname = getHostnameFromDomain(domainName); final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=digital-ocean NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=digital-ocean NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$domainName bash 2>&1 | tee /tmp/infect.log"; print(userdataString); final Dio client = await getClient(); try { final Map data = { - 'name': hostname, + 'name': domainName, 'size': serverType, 'image': 'ubuntu-20-04-x64', 'user_data': userdataString, @@ -333,7 +320,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final int serverId = serverCreateResponse.data['server']['id']; final ServerVolume? newVolume = await createVolume(); final bool attachedVolume = - await attachVolume(newVolume!.uuid!, serverId); + await attachVolume(newVolume!, serverId); if (attachedVolume) { serverDetails = ServerHostingDetails( @@ -354,44 +341,25 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return serverDetails; } - static String getHostnameFromDomain(final String domain) { - // Replace all non-alphanumeric characters with an underscore - String hostname = - domain.split('.')[0].replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); - if (hostname.endsWith('-')) { - hostname = hostname.substring(0, hostname.length - 1); - } - if (hostname.startsWith('-')) { - hostname = hostname.substring(1); - } - if (hostname.isEmpty) { - hostname = 'selfprivacy-server'; - } - - return hostname; - } - @override Future deleteServer({ required final String domainName, }) async { final Dio client = await getClient(); - final String hostname = getHostnameFromDomain(domainName); - final ServerBasicInfo serverToRemove = (await getServers()).firstWhere( - (final el) => el.name == hostname, + (final el) => el.name == domainName, ); final ServerVolume volumeToRemove = (await getVolumes()).firstWhere( (final el) => el.serverId == serverToRemove.id, ); final List laterFutures = []; - await detachVolume(volumeToRemove.uuid!); + await detachVolume(volumeToRemove); await Future.delayed(const Duration(seconds: 10)); try { - laterFutures.add(deleteVolume(volumeToRemove.uuid!)); + laterFutures.add(deleteVolume(volumeToRemove)); laterFutures.add(client.delete('/droplets/$serverToRemove.id')); await Future.wait(laterFutures); } catch (e) { @@ -479,22 +447,18 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { - final Response response = await client.get('/servers'); - servers = response.data!['servers'] - .map( - (final e) => HetznerServerInfo.fromJson(e), - ) - .toList() + final Response response = await client.get('/droplets'); + servers = response.data!['droplets'] .where( - (final server) => server.publicNet.ipv4 != null, + (final server) => server['networks']['v4'].isNotEmpty, ) .map( (final server) => ServerBasicInfo( - id: server.id, - name: server.name, - ip: server.publicNet.ipv4.ip, - reverseDns: server.publicNet.ipv4.reverseDns, - created: server.created, + id: server['id'], + reverseDns: server['name'], + created: DateTime.now(), + ip: server['networks']['v4'][0], + name: server['name'], ), ) .toList(); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index ba94dc53..8373adb7 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -217,10 +217,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future deleteVolume(final String volumeId) async { + Future deleteVolume(final ServerVolume volume) async { final Dio client = await getClient(); try { - await client.delete('/volumes/$volumeId'); + await client.delete('/volumes/$volume.id'); } catch (e) { print(e); } finally { @@ -229,14 +229,14 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future attachVolume(final String volumeId, final int serverId) async { + Future attachVolume(final ServerVolume volume, final int serverId) async { bool success = false; final Response dbPostResponse; final Dio client = await getClient(); try { dbPostResponse = await client.post( - '/volumes/$volumeId/actions/attach', + '/volumes/$volume.id/actions/attach', data: { 'automount': true, 'server': serverId, @@ -253,13 +253,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future detachVolume(final String volumeId) async { + Future detachVolume(final ServerVolume volume) async { bool success = false; final Response dbPostResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post('/volumes/$volumeId/actions/detach'); + dbPostResponse = await client.post('/volumes/$volume.id/actions/detach'); success = dbPostResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); @@ -271,14 +271,14 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future resizeVolume(final String volumeId, final int sizeGb) async { + Future resizeVolume(final ServerVolume volume, final int sizeGb) async { bool success = false; final Response dbPostResponse; final Dio client = await getClient(); try { dbPostResponse = await client.post( - '/volumes/$volumeId/actions/resize', + '/volumes/$volume.id/actions/resize', data: { 'size': sizeGb, }, @@ -383,7 +383,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { if (!success) { await Future.delayed(const Duration(seconds: 10)); - await deleteVolume(dbId.toString()); + await deleteVolume(dataBase); } if (hetznerError != null) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart index 52458217..da196406 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart @@ -5,10 +5,9 @@ import 'package:selfprivacy/logic/models/price.dart'; mixin VolumeProviderApi on ApiMap { Future createVolume(); Future> getVolumes({final String? status}); - Future getVolume(final String volumeId); - Future attachVolume(final String volumeId, final int serverId); - Future detachVolume(final String volumeId); - Future resizeVolume(final String volumeId, final int sizeGb); - Future deleteVolume(final String volumeId); + Future attachVolume(final ServerVolume volume, final int serverId); + Future detachVolume(final ServerVolume volume); + Future resizeVolume(final ServerVolume volume, final int sizeGb); + Future deleteVolume(final ServerVolume volume); Future getPricePerGb(); } diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 66f21d7b..bf8595ea 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -66,14 +66,14 @@ class ApiProviderVolumeCubit final ServerHostingDetails server = getIt().serverDetails!; await providerApi! .getVolumeProvider() - .attachVolume(volume.providerVolume!.id.toString(), server.id); + .attachVolume(volume.providerVolume!, server.id); refresh(); } Future detachVolume(final DiskVolume volume) async { await providerApi! .getVolumeProvider() - .detachVolume(volume.providerVolume!.id.toString()); + .detachVolume(volume.providerVolume!); refresh(); } @@ -87,7 +87,7 @@ class ApiProviderVolumeCubit ); emit(state.copyWith(isResizing: true)); final bool resized = await providerApi!.getVolumeProvider().resizeVolume( - volume.providerVolume!.id.toString(), + volume.providerVolume!, newSizeGb, ); @@ -137,7 +137,7 @@ class ApiProviderVolumeCubit Future deleteVolume(final DiskVolume volume) async { await providerApi! .getVolumeProvider() - .deleteVolume(volume.providerVolume!.id.toString()); + .deleteVolume(volume.providerVolume!); refresh(); } From bb846b08c14ab9f77a3a098dea5c07470ba54c56 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 18 Oct 2022 00:48:41 +0000 Subject: [PATCH 228/732] feat(digital-ocean): Implement system endpoints for digital ocean --- .../digital_ocean/digital_ocean.dart | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index fb3b71e2..f3df6e54 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -197,11 +197,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { Future attachVolume(final ServerVolume volume, final int serverId) async { bool success = false; - final ServerVolume? volumeToAttach = await getVolume(volume.uuid!); - if (volumeToAttach == null) { - return success; - } - final Response dbPostResponse; final Dio client = await getClient(); try { @@ -209,7 +204,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/volumes/actions', data: { 'type': 'attach', - 'volume_name': volumeToAttach.name, + 'volume_name': volume.name, 'region': region, 'droplet_id': serverId, }, @@ -229,11 +224,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { Future detachVolume(final ServerVolume volume) async { bool success = false; - final ServerVolume? volumeToAttach = await getVolume(volume.uuid!); - if (volumeToAttach == null) { - return success; - } - final Response dbPostResponse; final Dio client = await getClient(); try { @@ -241,7 +231,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/volumes/actions', data: { 'type': 'detach', - 'droplet_id': volumeToAttach.serverId, + 'volume_name': volume.name, + 'droplet_id': volume.serverId, 'region': region, }, ); @@ -267,6 +258,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/volumes/actions', data: { 'type': 'resize', + 'volume_name': volume.name, 'size_gigabytes': sizeGb, 'region': region, }, @@ -375,7 +367,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { - await client.post('/servers/${server.id}/actions/reset'); + await client.post('/droplets/${server.id}/actions', + data: { + 'type': 'reboot', + },); } catch (e) { print(e); } finally { @@ -391,7 +386,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { - await client.post('/servers/${server.id}/actions/poweron'); + await client.post('/droplets/${server.id}/actions', + data: { + 'type': 'power_on', + }, + ); } catch (e) { print(e); } finally { @@ -582,19 +581,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final ServerHostingDetails serverDetails, required final ServerDomain domain, }) async { - final Dio client = await getClient(); - try { - await client.post( - '/servers/${serverDetails.id}/actions/change_dns_ptr', - data: { - 'ip': serverDetails.ip4, - 'dns_ptr': domain.domainName, - }, - ); - } catch (e) { - print(e); - } finally { - close(client); - } + /// TODO remove from provider interface } } From ea85ce606434d9842f6e1c02101548f055275916 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 18 Oct 2022 05:38:26 +0000 Subject: [PATCH 229/732] refactor: Apply formatting --- .../digital_ocean/digital_ocean.dart | 25 +++++++++++-------- .../server_providers/hetzner/hetzner.dart | 3 ++- .../initializing/provider_form_cubit.dart | 6 ----- .../provider_volume_cubit.dart | 8 ++---- .../setup/initializing/initializing.dart | 10 ++++---- .../initializing/server_provider_picker.dart | 9 +------ 6 files changed, 24 insertions(+), 37 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index f3df6e54..4bc13ae7 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -194,7 +194,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future attachVolume(final ServerVolume volume, final int serverId) async { + Future attachVolume( + final ServerVolume volume, final int serverId) async { bool success = false; final Response dbPostResponse; @@ -311,8 +312,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final int serverId = serverCreateResponse.data['server']['id']; final ServerVolume? newVolume = await createVolume(); - final bool attachedVolume = - await attachVolume(newVolume!, serverId); + final bool attachedVolume = await attachVolume(newVolume!, serverId); if (attachedVolume) { serverDetails = ServerHostingDetails( @@ -367,10 +367,12 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { - await client.post('/droplets/${server.id}/actions', - data: { - 'type': 'reboot', - },); + await client.post( + '/droplets/${server.id}/actions', + data: { + 'type': 'reboot', + }, + ); } catch (e) { print(e); } finally { @@ -386,10 +388,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { - await client.post('/droplets/${server.id}/actions', - data: { - 'type': 'power_on', - }, + await client.post( + '/droplets/${server.id}/actions', + data: { + 'type': 'power_on', + }, ); } catch (e) { print(e); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 8373adb7..7edb4cf1 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -229,7 +229,8 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future attachVolume(final ServerVolume volume, final int serverId) async { + Future attachVolume( + final ServerVolume volume, final int serverId) async { bool success = false; final Response dbPostResponse; diff --git a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart index 727daea8..7405073e 100644 --- a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart @@ -7,16 +7,10 @@ import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class ProviderFormCubit extends FormCubit { ProviderFormCubit(this.serverInstallationCubit) { - final RegExp regExp = - serverInstallationCubit.getServerProviderApiTokenValidation(); apiKey = FieldCubit( initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - ValidationModel( - regExp.hasMatch, - 'validations.invalid_format'.tr(), - ), LengthStringNotEqualValidation(64) ], ); diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index bf8595ea..b92a51c5 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -71,9 +71,7 @@ class ApiProviderVolumeCubit } Future detachVolume(final DiskVolume volume) async { - await providerApi! - .getVolumeProvider() - .detachVolume(volume.providerVolume!); + await providerApi!.getVolumeProvider().detachVolume(volume.providerVolume!); refresh(); } @@ -135,9 +133,7 @@ class ApiProviderVolumeCubit } Future deleteVolume(final DiskVolume volume) async { - await providerApi! - .getVolumeProvider() - .deleteVolume(volume.providerVolume!); + await providerApi!.getVolumeProvider().deleteVolume(volume.providerVolume!); refresh(); } diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 029a30e4..eb6f05a5 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -141,13 +141,13 @@ class InitializingPage extends StatelessWidget { } Widget _stepServerProviderToken( - final ServerInstallationCubit serverInstallationCubit) => - ServerProviderPicker( - serverInstallationCubit: serverInstallationCubit, - ); + final ServerInstallationCubit serverInstallationCubit, + ) => + const ServerProviderPicker(); Widget _stepServerType( - final ServerInstallationCubit serverInstallationCubit) => + final ServerInstallationCubit serverInstallationCubit, + ) => ServerTypePicker( serverInstallationCubit: serverInstallationCubit, ); diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index ee0ab36a..c8b8e828 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -11,12 +11,9 @@ import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class ServerProviderPicker extends StatefulWidget { const ServerProviderPicker({ - required this.serverInstallationCubit, super.key, }); - final ServerInstallationCubit serverInstallationCubit; - @override State createState() => _ServerProviderPickerState(); } @@ -40,7 +37,6 @@ class _ServerProviderPickerState extends State { case ServerProvider.hetzner: return ProviderInputDataPage( - serverInstallationCubit: widget.serverInstallationCubit, providerInfo: ProviderPageInfo( providerType: ServerProvider.hetzner, pathToHow: 'hetzner_how', @@ -53,7 +49,6 @@ class _ServerProviderPickerState extends State { case ServerProvider.digitalOcean: return ProviderInputDataPage( - serverInstallationCubit: widget.serverInstallationCubit, providerInfo: ProviderPageInfo( providerType: ServerProvider.digitalOcean, pathToHow: 'hetzner_how', @@ -82,17 +77,15 @@ class ProviderPageInfo { class ProviderInputDataPage extends StatelessWidget { const ProviderInputDataPage({ required this.providerInfo, - required this.serverInstallationCubit, super.key, }); final ProviderPageInfo providerInfo; - final ServerInstallationCubit serverInstallationCubit; @override Widget build(final BuildContext context) => BlocProvider( create: (final context) => ProviderFormCubit( - serverInstallationCubit, + context.watch(), ), child: Builder( builder: (final context) { From 556df5aadcac8de455aaf362a9b8fd64c70db5c2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 19 Oct 2022 17:46:16 +0400 Subject: [PATCH 230/732] fix(assets): Remove string hardcode from domain setup page --- assets/translations/en.json | 5 +++-- assets/translations/ru.json | 5 +++-- lib/ui/pages/setup/initializing.dart | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index a0ce11e6..032bd0da 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -141,7 +141,8 @@ "services_title": "Services", "services_subtitle": "Type “A” records required for each service.", "email_title": "Email", - "email_subtitle": "Records necessary for secure email exchange." + "email_subtitle": "Records necessary for secure email exchange.", + "update_list": "Update list" }, "backup": { "card_title": "Backup", @@ -428,4 +429,4 @@ "length_not_equal": "Length is [], should be {}", "length_longer": "Length is [], should be shorter than or equal to {}" } -} +} \ No newline at end of file diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 04b832da..7b60e4e9 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -141,7 +141,8 @@ "services_title": "Сервисы", "services_subtitle": "Записи типа “A” необходимые для работы сервисов.", "email_title": "Электронная почта", - "email_subtitle": "Записи необходимые для безопасного обмена электронной почтой." + "email_subtitle": "Записи необходимые для безопасного обмена электронной почтой.", + "update_list": "Обновить список" }, "backup": { "card_title": "Резервное копирование", @@ -429,4 +430,4 @@ "length_not_equal": "Длина строки [], должно быть равно {}", "length_longer": "Длина строки [], должно быть меньше либо равно {}" } -} +} \ No newline at end of file diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 02af3a59..c8e070c0 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -378,7 +378,7 @@ class InitializingPage extends StatelessWidget { color: Colors.white, ), const SizedBox(width: 10), - BrandText.buttonTitleText('Обновить cписок'), + BrandText.buttonTitleText('domain.update_list'.tr()), ], ), ), From b40ab171979ee594f6e48ce5766c8453e1beb114 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 19 Oct 2022 18:43:01 +0400 Subject: [PATCH 231/732] fix(initializing): Move bloc provider from provider picker to initialization page --- .../setup/initializing/initializing.dart | 23 +++- .../initializing/server_provider_picker.dart | 120 +++++++++--------- 2 files changed, 80 insertions(+), 63 deletions(-) diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index eb6f05a5..a4a96435 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -2,6 +2,7 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; @@ -143,13 +144,29 @@ class InitializingPage extends StatelessWidget { Widget _stepServerProviderToken( final ServerInstallationCubit serverInstallationCubit, ) => - const ServerProviderPicker(); + BlocProvider( + create: (final context) => ProviderFormCubit(serverInstallationCubit), + child: Builder( + builder: (final context) { + final providerCubit = context.watch(); + return ServerProviderPicker( + formCubit: providerCubit, + serverInstallationCubit: serverInstallationCubit, + ); + }, + ), + ); Widget _stepServerType( final ServerInstallationCubit serverInstallationCubit, ) => - ServerTypePicker( - serverInstallationCubit: serverInstallationCubit, + BlocProvider( + create: (final context) => ProviderFormCubit(serverInstallationCubit), + child: Builder( + builder: (final context) => ServerTypePicker( + serverInstallationCubit: serverInstallationCubit, + ), + ), ); void _showModal(final BuildContext context, final Widget widget) { diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index c8b8e828..3984b856 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -11,9 +11,14 @@ import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class ServerProviderPicker extends StatefulWidget { const ServerProviderPicker({ + required this.formCubit, + required this.serverInstallationCubit, super.key, }); + final ProviderFormCubit formCubit; + final ServerInstallationCubit serverInstallationCubit; + @override State createState() => _ServerProviderPickerState(); } @@ -32,11 +37,13 @@ class _ServerProviderPickerState extends State { switch (selectedProvider) { case ServerProvider.unknown: return ProviderSelectionPage( + serverInstallationCubit: widget.serverInstallationCubit, callback: setProvider, ); case ServerProvider.hetzner: return ProviderInputDataPage( + providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( providerType: ServerProvider.hetzner, pathToHow: 'hetzner_how', @@ -49,6 +56,7 @@ class _ServerProviderPickerState extends State { case ServerProvider.digitalOcean: return ProviderInputDataPage( + providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( providerType: ServerProvider.digitalOcean, pathToHow: 'hetzner_how', @@ -77,81 +85,75 @@ class ProviderPageInfo { class ProviderInputDataPage extends StatelessWidget { const ProviderInputDataPage({ required this.providerInfo, + required this.providerCubit, super.key, }); final ProviderPageInfo providerInfo; + final ProviderFormCubit providerCubit; @override - Widget build(final BuildContext context) => BlocProvider( - create: (final context) => ProviderFormCubit( - context.watch(), - ), - child: Builder( - builder: (final context) { - final formCubitState = context.watch().state; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - providerInfo.image, - const SizedBox(height: 10), - Text( - 'initializing.connect_to_server'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - const Spacer(), - CubitFormTextField( - formFieldCubit: context.read().apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: const InputDecoration( - hintText: 'Provider API Token', - ), - ), - const Spacer(), - FilledButton( - title: 'basis.connect'.tr(), - onPressed: () => formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), - ), - const SizedBox(height: 10), - OutlinedButton( - child: Text('initializing.how'.tr()), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => BrandBottomSheet( - isExpended: true, - child: Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: [ - BrandMarkdown( - fileName: providerInfo.pathToHow, - ), - ], - ), + Widget build(final BuildContext context) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + providerInfo.image, + const SizedBox(height: 10), + Text( + 'initializing.connect_to_server'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const Spacer(), + CubitFormTextField( + formFieldCubit: providerCubit.apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'Provider API Token', + ), + ), + const Spacer(), + FilledButton( + title: 'basis.connect'.tr(), + onPressed: () => providerCubit.state.isSubmitting + ? null + : () => providerCubit.trySubmit(), + ), + const SizedBox(height: 10), + OutlinedButton( + child: Text('initializing.how'.tr()), + onPressed: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => BrandBottomSheet( + isExpended: true, + child: Padding( + padding: paddingH15V0, + child: ListView( + padding: const EdgeInsets.symmetric(vertical: 16), + children: [ + BrandMarkdown( + fileName: providerInfo.pathToHow, ), - ), + ], ), ), - ], - ); - }, - ), + ), + ), + ), + ], ); } class ProviderSelectionPage extends StatelessWidget { const ProviderSelectionPage({ required this.callback, + required this.serverInstallationCubit, super.key, }); final Function callback; + final ServerInstallationCubit serverInstallationCubit; @override Widget build(final BuildContext context) => Column( @@ -173,8 +175,7 @@ class ProviderSelectionPage extends StatelessWidget { children: [ InkWell( onTap: () { - context - .read() + serverInstallationCubit .setServerProviderType(ServerProvider.hetzner); callback(ServerProvider.hetzner); }, @@ -188,8 +189,7 @@ class ProviderSelectionPage extends StatelessWidget { ), InkWell( onTap: () { - context - .read() + serverInstallationCubit .setServerProviderType(ServerProvider.digitalOcean); callback(ServerProvider.digitalOcean); }, From cb1fe6eafde0945b6d618f2ababb54e26f44a93c Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 20 Oct 2022 18:36:15 +0400 Subject: [PATCH 232/732] fix(initializing): Make provider and server type picking work --- lib/config/hive_config.dart | 3 + .../rest_maps/api_factory_creator.dart | 4 +- .../digital_ocean/digital_ocean_factory.dart | 8 +- .../server_providers/hetzner/hetzner.dart | 79 ++++++++++--------- .../server_installation_cubit.dart | 6 +- .../server_installation_repository.dart | 4 + lib/logic/get_it/api_config.dart | 7 ++ .../setup/initializing/initializing.dart | 3 +- .../initializing/server_provider_picker.dart | 4 +- .../initializing/server_type_picker.dart | 8 +- 10 files changed, 74 insertions(+), 52 deletions(-) diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 7d8e59aa..93bce6ee 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -87,6 +87,9 @@ class BNames { /// A String field of [serverInstallationBox] box. static String hetznerKey = 'hetznerKey'; + /// A String field of [serverInstallationBox] box. + static String serverProvider = 'serverProvider'; + /// A String field of [serverLocation] box. static String serverLocation = 'serverLocation'; diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 0dbe1e90..25518f3c 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -18,9 +18,9 @@ class ApiFactoryCreator { ) { switch (settings.provider) { case ServerProvider.hetzner: - return HetznerApiFactory(); + return HetznerApiFactory(region: settings.location); case ServerProvider.digitalOcean: - return DigitalOceanApiFactory(); + return DigitalOceanApiFactory(region: settings.location); case ServerProvider.unknown: throw UnknownApiProviderException('Unknown server provider'); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart index 6864c7ab..73a1e647 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart @@ -6,13 +6,17 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_pro class DigitalOceanApiFactory extends ServerProviderApiFactory with VolumeProviderApiFactory { + DigitalOceanApiFactory({this.region}); + + final String? region; + @override ServerProviderApi getServerProvider({ final ServerProviderApiSettings settings = const ServerProviderApiSettings(), }) => DigitalOceanApi( - region: settings.region, + region: settings.region ?? region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); @@ -23,7 +27,7 @@ class DigitalOceanApiFactory extends ServerProviderApiFactory const ServerProviderApiSettings(), }) => DigitalOceanApi( - region: settings.region, + region: settings.region ?? region, hasLogger: settings.hasLogger, isWithToken: settings.isWithToken, ); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 7edb4cf1..c5360a2d 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -187,8 +187,9 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return volumes; } - @override - Future getVolume(final String volumeId) async { + Future getVolume( + final String volumeId, + ) async { ServerVolume? volume; final Response dbGetResponse; @@ -230,7 +231,9 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { @override Future attachVolume( - final ServerVolume volume, final int serverId) async { + final ServerVolume volume, + final int serverId, + ) async { bool success = false; final Response dbPostResponse; @@ -576,14 +579,16 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { '/locations', ); - locations = response.data!['locations'].map( - (final location) => ServerProviderLocation( - title: location['city'], - description: location['description'], - flag: getEmojiFlag(location['country']), - identifier: location['name'], - ), - ); + locations = response.data!['locations'] + .map( + (final location) => ServerProviderLocation( + title: location['city'], + description: location['description'], + flag: getEmojiFlag(location['country']), + identifier: location['name'], + ), + ) + .toList(); } catch (e) { print(e); } finally { @@ -600,36 +605,36 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final List types = []; final Dio client = await getClient(); - try { - final Response response = await client.get( - '/server_types', - ); - final rawTypes = response.data!['server_types']; - for (final rawType in rawTypes) { - for (final rawPrice in rawType['prices']) { - if (rawPrice['location'].toString() == location.identifier) { - types.add( - ServerType( - title: rawType['description'], - identifier: rawType['name'], - ram: rawType['memory'], - cores: rawType['cores'], - disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), - price: Price( - value: rawPrice['price_monthly']['gross'], - currency: 'EUR', - ), - location: location, + //try { + final Response response = await client.get( + '/server_types', + ); + final rawTypes = response.data!['server_types']; + for (final rawType in rawTypes) { + for (final rawPrice in rawType['prices']) { + if (rawPrice['location'].toString() == location.identifier) { + types.add( + ServerType( + title: rawType['description'], + identifier: rawType['name'], + ram: rawType['memory'], + cores: rawType['cores'], + disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), + price: Price( + value: double.parse(rawPrice['price_monthly']['gross']), + currency: 'EUR', ), - ); - } + location: location, + ), + ); } } - } catch (e) { - print(e); - } finally { - close(client); } + //} catch (e) { + //print(e); + //} finally { + close(client); + //} return types; } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 499ff49a..e298d7ad 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -55,7 +55,8 @@ class ServerInstallationCubit extends Cubit { } } - void setServerProviderType(final ServerProvider providerType) { + void setServerProviderType(final ServerProvider providerType) async { + await repository.saveServerProviderType(providerType); repository.serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( ServerProviderApiFactorySettings( @@ -117,7 +118,6 @@ class ServerInstallationCubit extends Cubit { void setServerProviderKey(final String serverProviderKey) async { await repository.saveServerProviderKey(serverProviderKey); - if (state is ServerInstallationRecovery) { emit( (state as ServerInstallationRecovery).copyWith( @@ -141,7 +141,7 @@ class ServerInstallationCubit extends Cubit { repository.serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( ServerProviderApiFactorySettings( - provider: getIt().serverDetails!.provider, + provider: getIt().serverProvider!, location: serverType.location.identifier, ), ); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 5b33ef28..f6120cbb 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -683,6 +683,10 @@ class ServerInstallationRepository { getIt().init(); } + Future saveServerProviderType(final ServerProvider type) async { + await getIt().storeServerProviderType(type); + } + Future saveServerProviderKey(final String key) async { await getIt().storeServerProviderKey(key); } diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 302a37b1..4f64af8f 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -13,6 +13,7 @@ class ApiConfigModel { String? get serverLocation => _serverLocation; String? get serverType => _serverType; String? get cloudFlareKey => _cloudFlareKey; + ServerProvider? get serverProvider => _serverProvider; BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; @@ -21,11 +22,17 @@ class ApiConfigModel { String? _serverLocation; String? _cloudFlareKey; String? _serverType; + ServerProvider? _serverProvider; ServerHostingDetails? _serverDetails; BackblazeCredential? _backblazeCredential; ServerDomain? _serverDomain; BackblazeBucket? _backblazeBucket; + Future storeServerProviderType(final ServerProvider value) async { + await _box.put(BNames.serverProvider, value); + _serverProvider = value; + } + Future storeServerProviderKey(final String value) async { await _box.put(BNames.hetznerKey, value); _serverProviderKey = value; diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index b5c7851c..217bfc86 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -72,7 +72,8 @@ class InitializingPage extends StatelessWidget { ) : ProgressBar( steps: const [ - 'Hetzner', + 'Hosting', + 'Server Type', 'CloudFlare', 'Backblaze', 'Domain', diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 3984b856..4934d1e3 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -114,9 +114,7 @@ class ProviderInputDataPage extends StatelessWidget { const Spacer(), FilledButton( title: 'basis.connect'.tr(), - onPressed: () => providerCubit.state.isSubmitting - ? null - : () => providerCubit.trySubmit(), + onPressed: () => providerCubit.trySubmit(), ), const SizedBox(height: 10), OutlinedButton( diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 7a56ac2e..ce21b5aa 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -147,14 +147,14 @@ class SelectTypePage extends StatelessWidget { children: [ Text(type.title), const SizedBox(height: 8), - Text('cores: $type.cores'), + Text('cores: $type.cores.toString()'), const SizedBox(height: 8), - Text('ram: $type.ram'), + Text('ram: $type.ram.toString()'), const SizedBox(height: 8), - Text('disk: $type.disk.gibibyte'), + Text('disk: $type.disk.gibibyte.toString()'), const SizedBox(height: 8), Text( - 'price: $type.price.value $type.price.currency', + 'price: $type.price.value.toString() $type.price.currency', ), ], ), From e36a94ded5dfce30a09995564b6f615adb03a01a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 6 Oct 2022 14:46:29 +0000 Subject: [PATCH 233/732] feat(timezone): Implement search bar for 'Select Timezone' page --- assets/translations/en.json | 1 + assets/translations/ru.json | 1 + .../server_details/server_details_screen.dart | 1 + .../server_details/time_zone/time_zone.dart | 188 +++++++++++------- .../server_storage/extending_volume.dart | 7 + 5 files changed, 123 insertions(+), 75 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 032bd0da..6920d6c2 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -101,6 +101,7 @@ "reboot_after_upgrade_hint": "Reboot without prompt after applying changes on server", "server_timezone": "Server timezone", "select_timezone": "Select timezone", + "timezone_search_bar": "Timezone name or time shift value", "server_id": "Server ID", "status": "Status", "cpu": "CPU", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 7b60e4e9..9d9b47e4 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -101,6 +101,7 @@ "reboot_after_upgrade_hint": "Автоматически перезагружать сервер после применения обновлений", "server_timezone": "Часовой пояс сервера", "select_timezone": "Выберите часовой пояс", + "timezone_search_bar": "Имя часового пояса или значение временного сдвига", "server_id": "ID сервера", "status": "Статус", "cpu": "Процессор", diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 0b4ac005..d1eada36 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -12,6 +12,7 @@ import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index 6a7349c9..2073d305 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -14,11 +14,20 @@ class SelectTimezone extends StatefulWidget { } class _SelectTimezoneState extends State { - final ScrollController controller = ScrollController(); + final ScrollController scrollController = ScrollController(); + final TextEditingController searchController = TextEditingController(); + + String? timezoneFilterValue; @override void initState() { WidgetsBinding.instance.addPostFrameCallback(_afterLayout); + searchController.addListener(() { + setState(() { + timezoneFilterValue = + searchController.text.isNotEmpty ? searchController.text : null; + }); + }); super.initState(); } @@ -31,7 +40,7 @@ class _SelectTimezoneState extends State { print(t); if (index >= 0) { - controller.animateTo( + scrollController.animateTo( 60.0 * index, duration: const Duration(milliseconds: 300), curve: Curves.easeIn, @@ -41,93 +50,122 @@ class _SelectTimezoneState extends State { @override void dispose() { - controller.dispose(); + scrollController.dispose(); + searchController.dispose(); super.dispose(); } @override Widget build(final BuildContext context) => Scaffold( - appBar: AppBar( - title: Padding( - padding: const EdgeInsets.only(top: 4.0), - child: Text('server.select_timezone'.tr()), - ), - leading: IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: () => Navigator.of(context).pop(), + appBar: PreferredSize( + preferredSize: const Size.fromHeight(156), + child: Column( + children: [ + BrandHeader( + title: 'server.select_timezone'.tr(), + ), + Row( + children: [ + const SizedBox(width: 16), + SizedBox( + height: 52, + child: TextField( + readOnly: false, + textAlign: TextAlign.start, + textInputAction: TextInputAction.next, + enabled: true, + controller: searchController, + decoration: InputDecoration( + border: const OutlineInputBorder(), + errorText: null, + labelText: 'server.timezone_search_bar'.tr(), + ), + ), + ), + const SizedBox(width: 16), + const Icon(Icons.search_outlined), + const SizedBox(width: 16), + ], + ), + ], ), ), body: SafeArea( child: ListView( - controller: controller, + controller: scrollController, children: locations + .where( + (final Location location) => timezoneFilterValue == null + ? true + : location.name + .toLowerCase() + .contains(timezoneFilterValue!) || + Duration( + milliseconds: location.currentTimeZone.offset, + ) + .toDayHourMinuteFormat() + .contains(timezoneFilterValue!), + ) + .toList() .asMap() - .map((final key, final value) { - final duration = - Duration(milliseconds: value.currentTimeZone.offset); - final area = value.currentTimeZone.abbreviation - .replaceAll(RegExp(r'[\d+()-]'), ''); - - String timezoneName = value.name; - if (context.locale.toString() == 'ru') { - timezoneName = russian[value.name] ?? - () { - final arr = value.name.split('/')..removeAt(0); - return arr.join('/'); - }(); - } - - return MapEntry( - key, - Container( - height: 75, - padding: const EdgeInsets.symmetric(horizontal: 20), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: BrandColors.dividerColor, - ), - ), - ), - child: InkWell( - onTap: () { - context - .read() - .repository - .setTimezone( - timezoneName, - ); - Navigator.of(context).pop(); - }, - child: Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - BrandText.body1( - timezoneName, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - ), - ), - BrandText.small( - 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', - style: const TextStyle( - fontSize: 13, - ), - ), - ], - ), - ), - ), - ), - ); - }) + .map( + (final key, final value) => locationToListTile(key, value), + ) .values .toList(), ), ), ); + + MapEntry locationToListTile( + final int key, final Location location) { + final duration = Duration(milliseconds: location.currentTimeZone.offset); + final area = location.currentTimeZone.abbreviation + .replaceAll(RegExp(r'[\d+()-]'), ''); + + return MapEntry( + key, + Container( + height: 75, + padding: const EdgeInsets.symmetric(horizontal: 20), + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide( + color: BrandColors.dividerColor, + ), + ), + ), + child: InkWell( + onTap: () { + context.read().repository.setTimezone( + location.name, + ); + Navigator.of(context).pop(); + }, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + BrandText.body1( + location.name, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + BrandText.small( + 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', + style: const TextStyle( + fontSize: 13, + ), + ), + ], + ), + ), + ), + ), + ); + } } diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index e465c2b2..fd4491f7 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -32,6 +32,13 @@ class _ExtendingVolumePageState extends State { super.initState(); } + @override + void dispose() { + _sizeController.dispose(); + _priceController.dispose(); + super.dispose(); + } + bool _isError = false; late double _currentSliderGbValue; From e7bb1dc16ee5ffbc6f05d2203f26b37be562e2f0 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 20 Oct 2022 22:23:55 +0300 Subject: [PATCH 234/732] feat(timezone): Design the search bar for 'Select Timezone' page --- .../server_details/server_details_screen.dart | 7 +-- .../server_details/time_zone/time_zone.dart | 59 +++++++++---------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index d1eada36..894c9a28 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -12,23 +12,20 @@ import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; +import 'package:selfprivacy/ui/pages/server_details/charts/cpu_chart.dart'; +import 'package:selfprivacy/ui/pages/server_details/charts/network_charts.dart'; import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; -import 'package:selfprivacy/ui/pages/server_details/time_zone/lang.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:timezone/timezone.dart'; -import 'package:selfprivacy/ui/pages/server_details/charts/cpu_chart.dart'; -import 'package:selfprivacy/ui/pages/server_details/charts/network_charts.dart'; - part 'charts/chart.dart'; part 'server_settings.dart'; part 'text_details.dart'; diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index 2073d305..28407d7d 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -18,6 +18,7 @@ class _SelectTimezoneState extends State { final TextEditingController searchController = TextEditingController(); String? timezoneFilterValue; + bool isSearching = false; @override void initState() { @@ -57,38 +58,36 @@ class _SelectTimezoneState extends State { @override Widget build(final BuildContext context) => Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(156), - child: Column( - children: [ - BrandHeader( - title: 'server.select_timezone'.tr(), - ), - Row( - children: [ - const SizedBox(width: 16), - SizedBox( - height: 52, - child: TextField( - readOnly: false, - textAlign: TextAlign.start, - textInputAction: TextInputAction.next, - enabled: true, - controller: searchController, - decoration: InputDecoration( - border: const OutlineInputBorder(), - errorText: null, - labelText: 'server.timezone_search_bar'.tr(), - ), - ), + appBar: AppBar( + title: isSearching + ? TextField( + readOnly: false, + textAlign: TextAlign.start, + textInputAction: TextInputAction.next, + enabled: true, + controller: searchController, + decoration: InputDecoration( + errorText: null, + hintText: 'server.timezone_search_bar'.tr(), ), - const SizedBox(width: 16), - const Icon(Icons.search_outlined), - const SizedBox(width: 16), - ], - ), - ], + ) + : Padding( + padding: const EdgeInsets.only(top: 4.0), + child: Text('server.select_timezone'.tr()), + ), + leading: IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: isSearching + ? () => setState(() => isSearching = false) + : () => Navigator.of(context).pop(), ), + actions: [ + if (!isSearching) + IconButton( + icon: const Icon(Icons.search), + onPressed: () => setState(() => isSearching = true), + ), + ], ), body: SafeArea( child: ListView( From 7223b0e6144cce76440353169690c4eecbcffe51 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Oct 2022 06:38:49 +0400 Subject: [PATCH 235/732] fix(initialization): Add missing setup progress step --- .../cubit/server_installation/server_installation_state.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 9e5684a6..18742303 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -112,7 +112,8 @@ class TimerState extends ServerInstallationNotFinished { enum ServerSetupProgress { nothingYet, - hetznerFilled, + serverProviderFilled, + servertTypeFilled, cloudFlareFilled, backblazeFilled, domainFilled, From e956a2c9a1f2733bba9e4f1e6d9c32fcd919de19 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Oct 2022 06:54:55 +0400 Subject: [PATCH 236/732] fix(assets): Fix broken string for bytes on disk size --- assets/translations/en.json | 1 + assets/translations/ru.json | 1 + lib/logic/models/disk_size.dart | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 032bd0da..4a36b391 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -171,6 +171,7 @@ "gb": "{} GB", "mb": "{} MB", "kb": "{} KB", + "bytes": "Bytes", "extend_volume_button": "Extend volume", "extending_volume_title": "Extending volume", "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 7b60e4e9..fa8737ab 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -171,6 +171,7 @@ "gb": "{} GB", "mb": "{} MB", "kb": "{} KB", + "bytes": "байт", "extend_volume_button": "Расширить хранилище", "extending_volume_title": "Расширение хранилища", "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index 44c6bc35..c6f55873 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -26,7 +26,7 @@ class DiskSize { @override String toString() { if (byte < 1024) { - return '${byte.toStringAsFixed(0)} ${tr('bytes')}'; + return '${byte.toStringAsFixed(0)} ${tr('storage.bytes')}'; } else if (byte < 1024 * 1024) { return 'storage.kb'.tr(args: [kibibyte.toStringAsFixed(1)]); } else if (byte < 1024 * 1024 * 1024) { From df9ec28d027908efe7b4560f5b5f1da52ed49ff0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Oct 2022 08:33:47 +0400 Subject: [PATCH 237/732] fix(initializing): Adjust server location and type list cards --- .../initializing/server_type_picker.dart | 57 ++++++++++--------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index ce21b5aa..a6757571 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -78,18 +78,12 @@ class SelectLocationPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - if (location.flag != null) Text(location.flag!), - const SizedBox(height: 8), - Text(location.title), - const SizedBox(height: 8), - if (location.description != null) - Text(location.description!), - ], - ), + if (location.flag != null) Text(location.flag!), + const SizedBox(height: 8), + Text(location.title), + const SizedBox(height: 8), + if (location.description != null) + Text(location.description!), ], ), ), @@ -141,22 +135,29 @@ class SelectTypePage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(type.title), - const SizedBox(height: 8), - Text('cores: $type.cores.toString()'), - const SizedBox(height: 8), - Text('ram: $type.ram.toString()'), - const SizedBox(height: 8), - Text('disk: $type.disk.gibibyte.toString()'), - const SizedBox(height: 8), - Text( - 'price: $type.price.value.toString() $type.price.currency', - ), - ], + Text( + type.title, + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 8), + Text( + 'cores: ${type.cores.toString()}', + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 8), + Text( + 'ram: ${type.ram.toString()}', + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 8), + Text( + 'disk: ${type.disk.gibibyte.toString()}', + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 8), + Text( + 'price: ${type.price.value.toString()} ${type.price.currency}', + style: Theme.of(context).textTheme.bodySmall, ), ], ), From b574659dc35ea7ffd8ff6d4c64955e20628dfac7 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Oct 2022 08:34:36 +0400 Subject: [PATCH 238/732] fix(initializing): Implement store and load of server provider from BNames --- .../server_installation/server_installation_cubit.dart | 1 + .../server_installation_repository.dart | 9 ++++++--- lib/logic/get_it/api_config.dart | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index e298d7ad..824713ef 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -118,6 +118,7 @@ class ServerInstallationCubit extends Cubit { void setServerProviderKey(final String serverProviderKey) async { await repository.saveServerProviderKey(serverProviderKey); + if (state is ServerInstallationRecovery) { emit( (state as ServerInstallationRecovery).copyWith( diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index f6120cbb..8de56f93 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -56,17 +56,20 @@ class ServerInstallationRepository { final String? cloudflareToken = getIt().cloudFlareKey; final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; + final ServerProvider? serverProvider = + getIt().serverProvider; final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; final ServerHostingDetails? serverDetails = getIt().serverDetails; - if (serverDetails != null && - serverDetails.provider != ServerProvider.unknown) { + if (serverProvider != null || + (serverDetails != null && + serverDetails.provider != ServerProvider.unknown)) { serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( ServerProviderApiFactorySettings( - provider: serverDetails.provider, + provider: serverProvider ?? serverDetails!.provider, location: location, ), ); diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 4f64af8f..434c9b32 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -82,6 +82,7 @@ class ApiConfigModel { _serverDetails = null; _backblazeBucket = null; _serverType = null; + _serverProvider = null; } void init() { @@ -93,5 +94,6 @@ class ApiConfigModel { _serverDetails = _box.get(BNames.serverDetails); _backblazeBucket = _box.get(BNames.backblazeBucket); _serverType = _box.get(BNames.serverTypeIdentifier); + _serverProvider = _box.get(BNames.serverProvider); } } From daf50e8c921ce8bc4cba97f5c5a9895547f06b01 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 23 Oct 2022 05:13:27 +0400 Subject: [PATCH 239/732] refactor(server-api): Replace Rest API interface with Graphql endpoints everywhere they are used With no implementations yet --- .../graphql_maps/server_api/server.dart | 67 +++++++++++++++++-- lib/logic/cubit/backups/backups_cubit.dart | 2 +- lib/logic/cubit/devices/devices_cubit.dart | 2 +- .../cubit/dns_records/dns_records_cubit.dart | 2 +- .../recovery_domain_form_cubit.dart | 2 +- .../recovery_key/recovery_key_cubit.dart | 2 +- .../server_installation_repository.dart | 2 +- 7 files changed, 69 insertions(+), 10 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 0e20fb02..3f903168 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -8,8 +8,12 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.g import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; +import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; +import 'package:selfprivacy/logic/models/json/backup.dart'; +import 'package:selfprivacy/logic/models/json/device_token.dart'; +import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/logic/models/service.dart'; @@ -35,20 +39,34 @@ class GenericMutationResult { class GenericJobMutationReturn extends GenericMutationResult { GenericJobMutationReturn({ - required final super.success, - required final super.code, - final super.message, + required super.success, + required super.code, + super.message, this.job, }); final ServerJob? job; } +class ApiResponse { + ApiResponse({ + required this.statusCode, + required this.data, + this.errorMessage, + }); + final int statusCode; + final String? errorMessage; + final D data; + + bool get isSuccess => statusCode >= 200 && statusCode < 300; +} + class ServerApi extends ApiMap with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi { ServerApi({ this.hasLogger = false, this.isWithToken = true, this.customToken = '', + this.overrideDomain, }); @override @@ -58,7 +76,9 @@ class ServerApi extends ApiMap @override String customToken; @override - String? get rootAddress => getIt().serverDomain?.domainName; + String? get rootAddress => + overrideDomain ?? getIt().serverDomain?.domainName; + String? overrideDomain; Future getApiVersion() async { QueryResult response; @@ -193,4 +213,43 @@ class ServerApi extends ApiMap return settings; } + + Future> getRecoveryTokenStatus() async {} + + Future> generateRecoveryToken( + final DateTime? expirationDate, + final int? numberOfUses, + ) async {} + + Future getDkim() async {} + + Future>> getApiTokens() async {} + + Future> deleteApiToken(final String name) async {} + + Future> createDeviceToken() async {} + + Future getBackupStatus() async {} + + Future> getBackups() async {} + + Future uploadBackblazeConfig(final BackblazeBucket bucket) async {} + + Future forceBackupListReload() async {} + + Future startBackup() async {} + + Future restoreBackup(final String backupId) async {} + + Future isHttpServerWorking() async {} + + Future> authorizeDevice(final DeviceToken token) async {} + + Future> useRecoveryToken(final DeviceToken token) async {} + + Future> servicesPowerCheck() async {} + + Future>> getUsersList({ + required final bool withMainUser, + }) async {} } diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 084a2b47..5f72f2e2 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index 6aa71400..1ab4ff11 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index b6d503aa..29d19d81 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; part 'dns_records_state.dart'; diff --git a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart index 400fdff4..dbfc7259 100644 --- a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index 9692ca4b..d20bb3c5 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index a83e9deb..93763ffd 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; From 19b45ac14230682d89b853983c0d17a2d1d847e5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 24 Oct 2022 13:47:47 +0400 Subject: [PATCH 240/732] fix(server-api): Adapt ApiResponse structure to GraphQL format --- .../graphql_maps/server_api/server.dart | 78 +++++++++++++++++-- lib/logic/cubit/devices/devices_cubit.dart | 10 +-- .../recovery_key/recovery_key_cubit.dart | 6 +- .../server_installation_repository.dart | 14 ++-- .../models/json/recovery_token_status.dart | 11 +++ 5 files changed, 96 insertions(+), 23 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 3f903168..686e3e29 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -49,15 +49,13 @@ class GenericJobMutationReturn extends GenericMutationResult { class ApiResponse { ApiResponse({ - required this.statusCode, + required this.success, required this.data, - this.errorMessage, + this.message, }); - final int statusCode; - final String? errorMessage; + final bool success; + final String? message; final D data; - - bool get isSuccess => statusCode >= 200 && statusCode < 300; } class ServerApi extends ApiMap @@ -214,12 +212,76 @@ class ServerApi extends ApiMap return settings; } - Future> getRecoveryTokenStatus() async {} + Future> getRecoveryTokenStatus() async { + RecoveryKeyStatus? key; + QueryResult response; + String? error; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$RecoveryKey(); + if (response.hasException) { + print(response.exception.toString()); + error = response.exception.toString(); + } + key = RecoveryKeyStatus.fromGraphQL(response.parsedData!.api.recoveryKey); + } catch (e) { + print(e); + } + + return ApiResponse( + success: error == null, + data: key, + message: error, + ); + } Future> generateRecoveryToken( final DateTime? expirationDate, final int? numberOfUses, - ) async {} + ) async { + ApiResponse key; + QueryResult response; + + try { + final GraphQLClient client = await getClient(); + + final input = Input$RecoveryKeyLimitsInput( + expirationDate: expirationDate, + uses: numberOfUses, + ); + final variables = Variables$Mutation$GetNewRecoveryApiKey( + limits: input, + ); + final mutation = Options$Mutation$GetNewRecoveryApiKey( + variables: variables, + ); + response = await client.mutate$GetNewRecoveryApiKey( + mutation, + ); + if (response.hasException) { + print(response.exception.toString()); + key = ApiResponse( + success: false, + data: '', + message: response.exception.toString(), + ); + } + key = ApiResponse( + success: true, + data: response.parsedData!.getNewRecoveryApiKey.key!, + ); + } catch (e) { + print(e); + key = ApiResponse( + success: false, + data: '', + message: e.toString(), + ); + } + + return key; + } Future getDkim() async {} diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index 1ab4ff11..3c552c23 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -36,7 +36,7 @@ class ApiDevicesCubit Future?> _getApiTokens() async { final ApiResponse> response = await api.getApiTokens(); - if (response.isSuccess) { + if (response.success) { return response.data; } else { return null; @@ -45,7 +45,7 @@ class ApiDevicesCubit Future deleteDevice(final ApiToken device) async { final ApiResponse response = await api.deleteApiToken(device.name); - if (response.isSuccess) { + if (response.success) { emit( ApiDevicesState( state.devices.where((final d) => d.name != device.name).toList(), @@ -54,17 +54,17 @@ class ApiDevicesCubit ); } else { getIt() - .showSnackBar(response.errorMessage ?? 'Error deleting device'); + .showSnackBar(response.message ?? 'Error deleting device'); } } Future getNewDeviceKey() async { final ApiResponse response = await api.createDeviceToken(); - if (response.isSuccess) { + if (response.success) { return response.data; } else { getIt().showSnackBar( - response.errorMessage ?? 'Error getting new device key', + response.message ?? 'Error getting new device key', ); return null; } diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index d20bb3c5..90f5330d 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -34,7 +34,7 @@ class RecoveryKeyCubit Future _getRecoveryKeyStatus() async { final ApiResponse response = await api.getRecoveryTokenStatus(); - if (response.isSuccess) { + if (response.success) { return response.data; } else { return null; @@ -59,11 +59,11 @@ class RecoveryKeyCubit }) async { final ApiResponse response = await api.generateRecoveryToken(expirationDate, numberOfUses); - if (response.isSuccess) { + if (response.success) { refresh(); return response.data; } else { - throw GenerationError(response.errorMessage ?? 'Unknown error'); + throw GenerationError(response.message ?? 'Unknown error'); } } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 93763ffd..2c08dda1 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -498,7 +498,7 @@ class ServerInstallationRepository { DeviceToken(device: await getDeviceName(), token: newDeviceKey), ); - if (apiResponse.isSuccess) { + if (apiResponse.success) { return ServerHostingDetails( apiToken: apiResponse.data, volume: ServerVolume( @@ -517,7 +517,7 @@ class ServerInstallationRepository { } throw ServerAuthorizationException( - apiResponse.errorMessage ?? apiResponse.data, + apiResponse.message ?? apiResponse.data, ); } @@ -535,7 +535,7 @@ class ServerInstallationRepository { DeviceToken(device: await getDeviceName(), token: recoveryKey), ); - if (apiResponse.isSuccess) { + if (apiResponse.success) { return ServerHostingDetails( apiToken: apiResponse.data, volume: ServerVolume( @@ -554,7 +554,7 @@ class ServerInstallationRepository { } throw ServerAuthorizationException( - apiResponse.errorMessage ?? apiResponse.data, + apiResponse.message ?? apiResponse.data, ); } @@ -600,7 +600,7 @@ class ServerInstallationRepository { DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), ); - if (apiResponse.isSuccess) { + if (apiResponse.success) { return ServerHostingDetails( apiToken: apiResponse.data, volume: ServerVolume( @@ -619,7 +619,7 @@ class ServerInstallationRepository { } throw ServerAuthorizationException( - apiResponse.errorMessage ?? apiResponse.data, + apiResponse.message ?? apiResponse.data, ); } @@ -636,7 +636,7 @@ class ServerInstallationRepository { final String? serverApiVersion = await serverApi.getApiVersion(); final ApiResponse> users = await serverApi.getUsersList(withMainUser: true); - if (serverApiVersion == null || !users.isSuccess) { + if (serverApiVersion == null || !users.success) { return fallbackUser; } try { diff --git a/lib/logic/models/json/recovery_token_status.dart b/lib/logic/models/json/recovery_token_status.dart index 6e59b57d..b56ae4e6 100644 --- a/lib/logic/models/json/recovery_token_status.dart +++ b/lib/logic/models/json/recovery_token_status.dart @@ -1,5 +1,6 @@ import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; part 'recovery_token_status.g.dart'; @@ -15,6 +16,16 @@ class RecoveryKeyStatus extends Equatable { this.usesLeft, }); + RecoveryKeyStatus.fromGraphQL( + final Query$RecoveryKey$api$recoveryKey recoveryKey, + ) : this( + exists: recoveryKey.exists, + date: recoveryKey.creationDate, + expiration: recoveryKey.expirationDate, + usesLeft: recoveryKey.usesLeft, + valid: recoveryKey.valid, + ); + final bool exists; final DateTime? date; final DateTime? expiration; From 1b94e14727a8a2dd89e5e476c3561c9c045b6597 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 24 Oct 2022 15:39:53 +0400 Subject: [PATCH 241/732] feat(server-api): Migrate all server endpoints to GraphQL --- .../graphql_maps/server_api/server.dart | 279 +++++- lib/logic/api_maps/rest_maps/server.dart | 870 ------------------ .../server_installation_repository.dart | 15 +- lib/logic/models/json/api_token.dart | 9 + 4 files changed, 256 insertions(+), 917 deletions(-) delete mode 100644 lib/logic/api_maps/rest_maps/server.dart diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 686e3e29..78e352c4 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -112,25 +112,6 @@ class ServerApi extends ApiMap return usesBinds; } - Future> getApiTokens() async { - QueryResult response; - List tokens = []; - - try { - final GraphQLClient client = await getClient(); - response = await client.query$GetApiTokens(); - if (response.hasException) { - print(response.exception.toString()); - } - tokens = response.data!['api']['devices'] - .map((final e) => ApiToken.fromJson(e)) - .toList(); - } catch (e) { - print(e); - } - return tokens; - } - Future switchService(final String uid, final bool needTurnOn) async { try { final GraphQLClient client = await getClient(); @@ -283,17 +264,253 @@ class ServerApi extends ApiMap return key; } - Future getDkim() async {} + Future getDkim() async { + String? dkim; + QueryResult response; - Future>> getApiTokens() async {} + try { + final GraphQLClient client = await getClient(); + response = await client.query$DomainInfo(); + if (response.hasException) { + print(response.exception.toString()); + } + dkim = response.parsedData!.system.domainInfo.requiredDnsRecords + .firstWhere( + ( + final Query$DomainInfo$system$domainInfo$requiredDnsRecords + dnsRecord, + ) => + dnsRecord.name == 'selector._domainkey' && + dnsRecord.recordType == 'TXT', + ) + .content; + } catch (e) { + print(e); + } - Future> deleteApiToken(final String name) async {} + return dkim; + } - Future> createDeviceToken() async {} + Future>> getApiTokens() async { + ApiResponse> tokens; + QueryResult response; - Future getBackupStatus() async {} + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetApiTokens(); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + tokens = ApiResponse>( + success: false, + data: [], + message: message, + ); + } + final List parsed = response.parsedData!.api.devices + .map( + ( + final Query$GetApiTokens$api$devices device, + ) => + ApiToken.fromGraphQL(device), + ) + .toList(); + tokens = ApiResponse>( + success: true, + data: parsed, + ); + } catch (e) { + print(e); + tokens = ApiResponse>( + success: false, + data: [], + message: e.toString(), + ); + } - Future> getBackups() async {} + return tokens; + } + + Future> deleteApiToken(final String name) async { + ApiResponse returnable; + QueryResult response; + + try { + final GraphQLClient client = await getClient(); + + final variables = Variables$Mutation$DeleteDeviceApiToken( + device: name, + ); + final mutation = Options$Mutation$DeleteDeviceApiToken( + variables: variables, + ); + response = await client.mutate$DeleteDeviceApiToken( + mutation, + ); + if (response.hasException) { + print(response.exception.toString()); + returnable = ApiResponse( + success: false, + data: null, + message: response.exception.toString(), + ); + } + returnable = ApiResponse( + success: true, + data: null, + ); + } catch (e) { + print(e); + returnable = ApiResponse( + success: false, + data: null, + message: e.toString(), + ); + } + + return returnable; + } + + Future> createDeviceToken() async { + ApiResponse token; + QueryResult response; + + try { + final GraphQLClient client = await getClient(); + + final mutation = Options$Mutation$GetNewDeviceApiKey(); + response = await client.mutate$GetNewDeviceApiKey( + mutation, + ); + if (response.hasException) { + print(response.exception.toString()); + token = ApiResponse( + success: false, + data: '', + message: response.exception.toString(), + ); + } + token = ApiResponse( + success: true, + data: response.parsedData!.getNewDeviceApiKey.key!, + ); + } catch (e) { + print(e); + token = ApiResponse( + success: false, + data: '', + message: e.toString(), + ); + } + + return token; + } + + Future isHttpServerWorking() async => (await getApiVersion()) != null; + + Future> authorizeDevice( + final DeviceToken deviceToken, + ) async { + ApiResponse token; + QueryResult response; + + try { + final GraphQLClient client = await getClient(); + + final input = Input$UseNewDeviceKeyInput( + deviceName: deviceToken.device, + key: deviceToken.token, + ); + + final variables = Variables$Mutation$AuthorizeWithNewDeviceApiKey( + input: input, + ); + final mutation = Options$Mutation$AuthorizeWithNewDeviceApiKey( + variables: variables, + ); + response = await client.mutate$AuthorizeWithNewDeviceApiKey( + mutation, + ); + if (response.hasException) { + print(response.exception.toString()); + token = ApiResponse( + success: false, + data: '', + message: response.exception.toString(), + ); + } + token = ApiResponse( + success: true, + data: response.parsedData!.authorizeWithNewDeviceApiKey.token!, + ); + } catch (e) { + print(e); + token = ApiResponse( + success: false, + data: '', + message: e.toString(), + ); + } + + return token; + } + + Future> useRecoveryToken( + final DeviceToken deviceToken, + ) async { + ApiResponse token; + QueryResult response; + + try { + final GraphQLClient client = await getClient(); + + final input = Input$UseRecoveryKeyInput( + deviceName: deviceToken.device, + key: deviceToken.token, + ); + + final variables = Variables$Mutation$UseRecoveryApiKey( + input: input, + ); + final mutation = Options$Mutation$UseRecoveryApiKey( + variables: variables, + ); + response = await client.mutate$UseRecoveryApiKey( + mutation, + ); + if (response.hasException) { + print(response.exception.toString()); + token = ApiResponse( + success: false, + data: '', + message: response.exception.toString(), + ); + } + token = ApiResponse( + success: true, + data: response.parsedData!.useRecoveryApiKey.token!, + ); + } catch (e) { + print(e); + token = ApiResponse( + success: false, + data: '', + message: e.toString(), + ); + } + + return token; + } + + /// TODO: backups're not implemented on server side + + Future getBackupStatus() async => BackupStatus( + progress: 0.0, + status: BackupStatusEnum.error, + errorMessage: null, + ); + + Future> getBackups() async => []; Future uploadBackblazeConfig(final BackblazeBucket bucket) async {} @@ -302,16 +519,4 @@ class ServerApi extends ApiMap Future startBackup() async {} Future restoreBackup(final String backupId) async {} - - Future isHttpServerWorking() async {} - - Future> authorizeDevice(final DeviceToken token) async {} - - Future> useRecoveryToken(final DeviceToken token) async {} - - Future> servicesPowerCheck() async {} - - Future>> getUsersList({ - required final bool withMainUser, - }) async {} } diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart deleted file mode 100644 index 1cef3dfc..00000000 --- a/lib/logic/api_maps/rest_maps/server.dart +++ /dev/null @@ -1,870 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/json/api_token.dart'; -import 'package:selfprivacy/logic/models/json/backup.dart'; -import 'package:selfprivacy/logic/models/json/device_token.dart'; -import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; -import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/logic/models/timezone_settings.dart'; - -class ApiResponse { - ApiResponse({ - required this.statusCode, - required this.data, - this.errorMessage, - }); - final int statusCode; - final String? errorMessage; - final D data; - - bool get isSuccess => statusCode >= 200 && statusCode < 300; -} - -class ServerApi extends ApiMap { - ServerApi({ - this.hasLogger = false, - this.isWithToken = true, - this.overrideDomain, - this.customToken, - }); - @override - bool hasLogger; - @override - bool isWithToken; - String? overrideDomain; - String? customToken; - - @override - BaseOptions get options { - BaseOptions options = BaseOptions( - connectTimeout: 10000, - receiveTimeout: 10000, - ); - - if (isWithToken) { - final ServerDomain? serverDomain = getIt().serverDomain; - final String domainName = serverDomain!.domainName; - final String? apiToken = getIt().serverDetails?.apiToken; - - options = BaseOptions( - baseUrl: 'https://api.$domainName', - connectTimeout: 10000, - receiveTimeout: 10000, - headers: { - 'Authorization': 'Bearer $apiToken', - }, - ); - } - - if (overrideDomain != null) { - options = BaseOptions( - baseUrl: 'https://api.$overrideDomain', - connectTimeout: 10000, - receiveTimeout: 10000, - headers: customToken != null - ? {'Authorization': 'Bearer $customToken'} - : null, - ); - } - - return options; - } - - Future getApiVersion() async { - Response response; - - final Dio client = await getClient(); - String? apiVersion; - - try { - response = await client.get('/api/version'); - apiVersion = response.data['version']; - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - return apiVersion; - } - - Future isHttpServerWorking() async { - bool res = false; - Response response; - - final Dio client = await getClient(); - try { - response = await client.get('/services/status'); - res = response.statusCode == HttpStatus.ok; - } catch (e) { - print(e); - } finally { - close(client); - } - return res; - } - - Future> createUser(final User user) async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.post( - '/users', - data: { - 'username': user.login, - 'password': user.password, - }, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.error.toString(), - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: User( - login: user.login, - type: UserType.normal, - password: user.password, - isFoundOnServer: false, - ), - ); - } finally { - close(client); - } - - bool isFoundOnServer = false; - int code = 0; - - final bool isUserCreated = (response.statusCode != null) && - (response.statusCode == HttpStatus.created); - - if (isUserCreated) { - isFoundOnServer = true; - code = response.statusCode!; - } else { - isFoundOnServer = false; - code = HttpStatus.notAcceptable; - } - - return ApiResponse( - statusCode: code, - data: User( - login: user.login, - type: UserType.normal, - password: user.password, - isFoundOnServer: isFoundOnServer, - ), - ); - } - - Future>> getUsersList({ - final withMainUser = false, - }) async { - final List res = []; - Response response; - - final Dio client = await getClient(); - try { - response = await client.get( - '/users', - queryParameters: withMainUser ? {'withMainUser': 'true'} : null, - ); - for (final user in response.data) { - res.add(user.toString()); - } - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: [], - ); - } catch (e) { - print(e); - return ApiResponse( - errorMessage: e.toString(), - statusCode: HttpStatus.internalServerError, - data: [], - ); - } finally { - close(client); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: res, - ); - } - - Future> addUserSshKey( - final User user, - final String sshKey, - ) async { - late Response response; - - final Dio client = await getClient(); - try { - response = await client.post( - '/services/ssh/keys/${user.login}', - data: { - 'public_key': sshKey, - }, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: null, - ); - } finally { - close(client); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: null, - ); - } - - Future> addRootSshKey(final String ssh) async { - late Response response; - - final Dio client = await getClient(); - try { - response = await client.put( - '/services/ssh/key/send', - data: {'public_key': ssh}, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: null, - ); - } finally { - close(client); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: null, - ); - } - - Future>> getUserSshKeys(final User user) async { - List res; - Response response; - - final Dio client = await getClient(); - try { - response = await client.get('/services/ssh/keys/${user.login}'); - res = (response.data as List) - .map((final e) => e as String) - .toList(); - } on DioError catch (e) { - print(e.message); - return ApiResponse>( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: [], - ); - } catch (e) { - return ApiResponse>( - errorMessage: e.toString(), - statusCode: HttpStatus.internalServerError, - data: [], - ); - } finally { - close(client); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse>( - statusCode: code, - data: res, - errorMessage: response.data is List - ? null - : response.data?.containsKey('error') ?? false - ? response.data['error'] - : null, - ); - } - - Future> deleteUserSshKey( - final User user, - final String sshKey, - ) async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.delete( - '/services/ssh/keys/${user.login}', - data: {'public_key': sshKey}, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: null, - ); - } finally { - close(client); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: null, - errorMessage: response.data?.containsKey('error') ?? false - ? response.data['error'] - : null, - ); - } - - Future deleteUser(final User user) async { - bool res = false; - Response response; - - final Dio client = await getClient(); - try { - response = await client.delete('/users/${user.login}'); - res = response.statusCode == HttpStatus.ok || - response.statusCode == HttpStatus.notFound; - } on DioError catch (e) { - print(e.message); - res = false; - } finally { - close(client); - } - return res; - } - - @override - String get rootAddress => - throw UnimplementedError('not used in with implementation'); - - Future apply() async { - bool res = false; - Response response; - - final Dio client = await getClient(); - try { - response = await client.get('/system/configuration/apply'); - res = response.statusCode == HttpStatus.ok; - } on DioError catch (e) { - print(e.message); - res = false; - } finally { - close(client); - } - return res; - } - - Future switchService( - final Service service, - final bool needToTurnOn, - ) async { - final Dio client = await getClient(); - try { - client.post( - '/services/${service.id}/${needToTurnOn ? 'enable' : 'disable'}', - ); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - } - - Future> servicesPowerCheck() async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.get('/services/status'); - } on DioError catch (e) { - print(e.message); - return {}; - } finally { - close(client); - } - - return { - 'bitwarden': response.data['bitwarden'] == 0, - 'gitea': response.data['gitea'] == 0, - 'nextcloud': response.data['nextcloud'] == 0, - 'ocserv': response.data['ocserv'] == 0, - 'pleroma': response.data['pleroma'] == 0, - }; - } - - Future uploadBackblazeConfig(final BackblazeBucket bucket) async { - final Dio client = await getClient(); - try { - client.put( - '/services/restic/backblaze/config', - data: { - 'accountId': bucket.applicationKeyId, - 'accountKey': bucket.applicationKey, - 'bucket': bucket.bucketName, - }, - ); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - } - - Future startBackup() async { - final Dio client = await getClient(); - try { - client.put('/services/restic/backup/create'); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - } - - Future> getBackups() async { - Response response; - List backups = []; - - final Dio client = await getClient(); - try { - response = await client.get('/services/restic/backup/list'); - backups = - response.data.map((final e) => Backup.fromJson(e)).toList(); - } on DioError catch (e) { - print(e.message); - } catch (e) { - print(e); - } finally { - close(client); - } - return backups; - } - - Future getBackupStatus() async { - Response response; - BackupStatus status = BackupStatus( - status: BackupStatusEnum.error, - errorMessage: 'Network error', - progress: 0, - ); - - final Dio client = await getClient(); - try { - response = await client.get('/services/restic/backup/status'); - status = BackupStatus.fromJson(response.data); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - return status; - } - - Future forceBackupListReload() async { - final Dio client = await getClient(); - try { - client.get('/services/restic/backup/reload'); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - } - - Future restoreBackup(final String backupId) async { - final Dio client = await getClient(); - try { - client.put( - '/services/restic/backup/restore', - data: {'backupId': backupId}, - ); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - } - - Future pullConfigurationUpdate() async { - Response response; - bool result = false; - - final Dio client = await getClient(); - try { - response = await client.get('/system/configuration/pull'); - result = (response.statusCode != null) - ? (response.statusCode == HttpStatus.ok) - : false; - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - return result; - } - - Future reboot() async { - Response response; - bool result = false; - - final Dio client = await getClient(); - try { - response = await client.get('/system/reboot'); - result = (response.statusCode != null) - ? (response.statusCode == HttpStatus.ok) - : false; - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - return result; - } - - Future upgrade() async { - Response response; - bool result = false; - - final Dio client = await getClient(); - try { - response = await client.get('/system/configuration/upgrade'); - result = (response.statusCode != null) - ? (response.statusCode == HttpStatus.ok) - : false; - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - return result; - } - - Future getServerTimezone() async { - TimeZoneSettings settings = TimeZoneSettings(); - final Dio client = await getClient(); - try { - final Response response = await client.get( - '/system/configuration/timezone', - ); - settings = TimeZoneSettings.fromString(response.data); - } catch (e) { - print(e); - } finally { - close(client); - } - - return settings; - } - - Future updateServerTimezone(final TimeZoneSettings settings) async { - final Dio client = await getClient(); - try { - await client.put( - '/system/configuration/timezone', - data: settings.toString(), - ); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - } - - Future getDkim() async { - Response response; - String? dkim; - final Dio client = await getClient(); - try { - response = await client.get('/services/mailserver/dkim'); - final Codec base64toString = utf8.fuse(base64); - dkim = base64toString - .decode(response.data) - .split('(')[1] - .split(')')[0] - .replaceAll('"', ''); - } on DioError catch (e) { - print(e.message); - } finally { - close(client); - } - - return dkim; - } - - Future> getRecoveryTokenStatus() async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.get('/auth/recovery_token'); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: const RecoveryKeyStatus(exists: false, valid: false), - ); - } finally { - close(client); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: response.data != null - ? RecoveryKeyStatus.fromJson(response.data) - : null, - ); - } - - Future> generateRecoveryToken( - final DateTime? expiration, - final int? uses, - ) async { - Response response; - - final Dio client = await getClient(); - final Map data = {}; - if (expiration != null) { - data['expiration'] = '${expiration.toIso8601String()}Z'; - print(data['expiration']); - } - if (uses != null) { - data['uses'] = uses; - } - try { - response = await client.post( - '/auth/recovery_token', - data: data, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: '', - ); - } finally { - close(client); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: response.data != null ? response.data['token'] : '', - ); - } - - Future> useRecoveryToken(final DeviceToken token) async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.post( - '/auth/recovery_token/use', - data: { - 'token': token.token, - 'device': token.device, - }, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: '', - ); - } finally { - client.close(); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: response.data != null ? response.data['token'] : '', - ); - } - - Future> authorizeDevice(final DeviceToken token) async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.post( - '/auth/new_device/authorize', - data: { - 'token': token.token, - 'device': token.device, - }, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: '', - ); - } finally { - client.close(); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse(statusCode: code, data: response.data['token'] ?? ''); - } - - Future> createDeviceToken() async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.post('/auth/new_device'); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: '', - ); - } finally { - client.close(); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: response.data != null ? response.data['token'] : '', - ); - } - - Future> deleteDeviceToken() async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.delete('/auth/new_device'); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: '', - ); - } finally { - client.close(); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse(statusCode: code, data: response.data ?? ''); - } - - Future>> getApiTokens() async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.get('/auth/tokens'); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: [], - ); - } finally { - client.close(); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: (response.data != null) - ? response.data - .map((final e) => ApiToken.fromJson(e)) - .toList() - : [], - ); - } - - Future> refreshCurrentApiToken() async { - Response response; - - final Dio client = await getClient(); - try { - response = await client.post('/auth/tokens'); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: '', - ); - } finally { - client.close(); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - - return ApiResponse( - statusCode: code, - data: response.data != null ? response.data['token'] : '', - ); - } - - Future> deleteApiToken(final String device) async { - Response response; - final Dio client = await getClient(); - try { - response = await client.delete( - '/auth/tokens', - data: { - 'token_name': device, - }, - ); - } on DioError catch (e) { - print(e.message); - return ApiResponse( - errorMessage: e.message, - statusCode: e.response?.statusCode ?? HttpStatus.internalServerError, - data: null, - ); - } finally { - client.close(); - } - - final int code = response.statusCode ?? HttpStatus.internalServerError; - return ApiResponse(statusCode: code, data: null); - } -} diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 2c08dda1..fdbb32e1 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -570,9 +570,7 @@ class ServerInstallationRepository { ); final String serverIp = await getServerIpFromDomain(serverDomain); if (recoveryCapabilities == ServerRecoveryCapabilities.legacy) { - final Map apiResponse = - await serverApi.servicesPowerCheck(); - if (apiResponse.isNotEmpty) { + if (await serverApi.isHttpServerWorking()) { return ServerHostingDetails( apiToken: apiToken, volume: ServerVolume( @@ -634,9 +632,8 @@ class ServerInstallationRepository { ); final String? serverApiVersion = await serverApi.getApiVersion(); - final ApiResponse> users = - await serverApi.getUsersList(withMainUser: true); - if (serverApiVersion == null || !users.success) { + final users = await serverApi.getAllUsers(); + if (serverApiVersion == null || users.isEmpty) { return fallbackUser; } try { @@ -644,10 +641,8 @@ class ServerInstallationRepository { if (!VersionConstraint.parse('>=1.2.5').allows(parsedVersion)) { return fallbackUser; } - return User( - isFoundOnServer: true, - login: users.data[0], - type: UserType.primary, + return users.firstWhere( + (final User user) => user.type == UserType.primary, ); } on FormatException { return fallbackUser; diff --git a/lib/logic/models/json/api_token.dart b/lib/logic/models/json/api_token.dart index 980d5132..f53f7f02 100644 --- a/lib/logic/models/json/api_token.dart +++ b/lib/logic/models/json/api_token.dart @@ -1,4 +1,5 @@ import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; part 'api_token.g.dart'; @@ -12,6 +13,14 @@ class ApiToken { required this.isCaller, }); + ApiToken.fromGraphQL( + final Query$GetApiTokens$api$devices device, + ) : this( + name: device.name, + date: device.creationDate, + isCaller: device.isCaller, + ); + final String name; final DateTime date; @JsonKey(name: 'is_caller') From 20e4d9565bb2860c4dcd8508264cc7abdf7d3289 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 24 Oct 2022 16:19:39 +0400 Subject: [PATCH 242/732] fix(assets): Fix broken strings for network domain elements --- .../server_installation_repository.dart | 2 +- lib/ui/pages/dns_details/dns_details.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index a83e9deb..e81190b0 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -353,7 +353,7 @@ class ServerInstallationRepository { BrandAlert( title: e.response!.data['errors'][0]['code'] == 1038 ? 'modals.you_cant_use_this_api'.tr() - : 'domain.states.error'.tr(), + : 'domain.error'.tr(), contentText: 'modals.delete_server_volume'.tr(), actions: [ ActionButton( diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 3308a068..a1d6c29c 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -28,7 +28,7 @@ class _DnsDetailsPageState extends State { bool isError = false; switch (dnsState) { case DnsRecordsStatus.uninitialized: - description = 'domain.states.uninitialized'.tr(); + description = 'domain.uninitialized'.tr(); icon = const Icon( Icons.refresh, size: 24.0, @@ -36,7 +36,7 @@ class _DnsDetailsPageState extends State { isError = false; break; case DnsRecordsStatus.refreshing: - description = 'domain.states.refreshing'.tr(); + description = 'domain.refreshing'.tr(); icon = const Icon( Icons.refresh, size: 24.0, @@ -44,7 +44,7 @@ class _DnsDetailsPageState extends State { isError = false; break; case DnsRecordsStatus.good: - description = 'domain.states.ok'.tr(); + description = 'domain.ok'.tr(); icon = const Icon( Icons.check_circle_outline, size: 24.0, @@ -52,8 +52,8 @@ class _DnsDetailsPageState extends State { isError = false; break; case DnsRecordsStatus.error: - description = 'domain.states.error'.tr(); - subtitle = 'domain.states.error_subtitle'.tr(); + description = 'domain.error'.tr(); + subtitle = 'domain.error_subtitle'.tr(); icon = const Icon( Icons.error_outline, size: 24.0, From a69b096d6f9a2037c052e295afd04630255d7d03 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 26 Oct 2022 20:07:35 +0400 Subject: [PATCH 243/732] fix(digital-ocean): Change /locations to /regions and fix tokens validation --- .../digital_ocean/digital_ocean.dart | 15 ++++++++++++--- .../server_providers/hetzner/hetzner.dart | 7 +++++-- .../server_providers/server_provider.dart | 13 ++++++++++--- .../setup/initializing/provider_form_cubit.dart | 4 +++- .../server_installation_cubit.dart | 3 ++- 5 files changed, 32 insertions(+), 10 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 4bc13ae7..a878b958 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -195,7 +195,9 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @override Future attachVolume( - final ServerVolume volume, final int serverId) async { + final ServerVolume volume, + final int serverId, + ) async { bool success = false; final Response dbPostResponse; @@ -518,10 +520,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { final Response response = await client.get( - '/locations', + '/regions', ); - locations = response.data!['locations'].map( + locations = response.data!['regions'].map( (final location) => ServerProviderLocation( title: location['slug'], description: location['name'], @@ -586,4 +588,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { }) async { /// TODO remove from provider interface } + + @override + ProviderApiTokenValidation getApiTokenValidation() => + ProviderApiTokenValidation( + regexp: RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'), + length: 71, + ); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index c5360a2d..70094eb6 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -81,8 +81,11 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - RegExp getApiTokenValidation() => - RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + ProviderApiTokenValidation getApiTokenValidation() => + ProviderApiTokenValidation( + regexp: RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'), + length: 64, + ); @override Future getPricePerGb() async { diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index cd28b46f..7d42c0ab 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -6,6 +6,15 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +class ProviderApiTokenValidation { + ProviderApiTokenValidation({ + required this.length, + required this.regexp, + }); + final int length; + final RegExp regexp; +} + abstract class ServerProviderApi extends ApiMap { Future> getServers(); Future> getAvailableLocations(); @@ -29,7 +38,5 @@ abstract class ServerProviderApi extends ApiMap { }); Future isApiTokenValid(final String token); - RegExp getApiTokenValidation() => RegExp( - r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]', - ); + ProviderApiTokenValidation getApiTokenValidation(); } diff --git a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart index 7405073e..a99ebea9 100644 --- a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart @@ -7,11 +7,13 @@ import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class ProviderFormCubit extends FormCubit { ProviderFormCubit(this.serverInstallationCubit) { + //final int tokenLength = + // serverInstallationCubit.serverProviderApiTokenValidation().length; apiKey = FieldCubit( initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - LengthStringNotEqualValidation(64) + //LengthStringNotEqualValidation(tokenLength), ], ); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 824713ef..6ff73893 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -7,6 +7,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -65,7 +66,7 @@ class ServerInstallationCubit extends Cubit { ); } - RegExp getServerProviderApiTokenValidation() => + ProviderApiTokenValidation serverProviderApiTokenValidation() => repository.serverProviderApiFactory! .getServerProvider() .getApiTokenValidation(); From aa3dee585bad7916f0a48dc13211479f2573ed45 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 26 Oct 2022 20:26:09 +0400 Subject: [PATCH 244/732] chore(dart): Fix warnings that appeared at Dart 2.18 SDK --- lib/config/bloc_config.dart | 2 +- lib/config/bloc_observer.dart | 12 ----- lib/config/localization.dart | 2 +- .../graphql_maps/server_api/server.dart | 6 +-- .../graphql_maps/server_api/users_api.dart | 6 +-- .../graphql_maps/server_api/volume_api.dart | 6 +-- .../dns_providers/dns_provider_factory.dart | 6 +-- lib/logic/api_maps/rest_maps/server.dart | 1 - .../server_providers/hetzner/hetzner.dart | 2 +- .../cubit/forms/user/user_form_cubit.dart | 2 +- .../server_installation_state.dart | 52 +++++++++---------- lib/logic/models/disk_size.dart | 2 +- lib/logic/models/json/server_job.dart | 10 ++-- lib/logic/models/server_basic_info.dart | 12 ++--- lib/logic/models/service.dart | 43 ++++++++------- lib/main.dart | 2 +- .../action_button/action_button.dart | 2 +- .../components/brand_alert/brand_alert.dart | 4 +- .../brand_bottom_sheet.dart | 2 +- .../components/brand_button/brand_button.dart | 2 +- .../brand_button/filled_button.dart | 10 ++-- .../brand_button/outlined_button.dart | 2 +- .../brand_button/segmented_buttons.dart | 2 +- .../components/brand_cards/filled_card.dart | 2 +- .../components/brand_cards/outlined_card.dart | 2 +- .../components/brand_header/brand_header.dart | 2 +- .../brand_hero_screen/brand_hero_screen.dart | 4 +- .../brand_linear_indicator.dart | 2 +- .../components/brand_loader/brand_loader.dart | 2 +- lib/ui/components/brand_md/brand_md.dart | 2 +- .../components/brand_radio/brand_radio.dart | 2 +- .../components/brand_switch/brand_switch.dart | 2 +- .../brand_tab_bar/brand_tab_bar.dart | 2 +- lib/ui/components/brand_text/brand_text.dart | 2 +- .../components/brand_timer/brand_timer.dart | 2 +- lib/ui/components/error/error.dart | 2 +- .../icon_status_mask/icon_status_mask.dart | 2 +- lib/ui/components/info_box/info_box.dart | 2 +- .../components/jobs_content/jobs_content.dart | 5 +- .../jobs_content/server_job_card.dart | 4 +- .../list_tile_on_surface_variant.dart | 2 +- .../not_ready_card/not_ready_card.dart | 2 +- .../pre_styled_buttons/flash_fab.dart | 2 +- .../components/progress_bar/progress_bar.dart | 2 +- .../server_storage_list_item.dart | 8 +-- .../service_migration_list_item.dart | 4 +- ...service_storage_consumption_list_item.dart | 2 +- .../components/switch_block/switch_bloc.dart | 2 +- lib/ui/helpers/widget_size.dart | 5 +- .../pages/backup_details/backup_details.dart | 2 +- lib/ui/pages/devices/devices.dart | 2 +- lib/ui/pages/devices/new_device.dart | 2 +- lib/ui/pages/dns_details/dns_details.dart | 2 +- lib/ui/pages/more/about_application.dart | 2 +- lib/ui/pages/more/about_us.dart | 2 +- .../pages/more/app_settings/app_setting.dart | 6 +-- lib/ui/pages/more/console.dart | 2 +- lib/ui/pages/more/more.dart | 2 +- lib/ui/pages/onboarding/onboarding.dart | 2 +- lib/ui/pages/providers/providers.dart | 12 ++--- lib/ui/pages/recovery_key/recovery_key.dart | 10 ++-- .../recovery_key/recovery_key_receiving.dart | 2 +- lib/ui/pages/root_route.dart | 2 +- lib/ui/pages/server_details/charts/chart.dart | 2 +- .../server_details/charts/cpu_chart.dart | 2 +- .../server_details/charts/network_charts.dart | 2 +- .../server_details/server_details_screen.dart | 2 +- .../server_details/time_zone/time_zone.dart | 6 ++- .../migration_process_page.dart | 4 +- .../binds_migration/services_migration.dart | 2 +- .../server_storage/extending_volume.dart | 2 +- .../pages/server_storage/server_storage.dart | 9 ++-- lib/ui/pages/server_storage/storage_card.dart | 4 +- lib/ui/pages/services/service_page.dart | 5 +- lib/ui/pages/services/services.dart | 3 +- lib/ui/pages/setup/initializing.dart | 4 +- .../recovering/recover_by_new_device_key.dart | 4 +- .../recovering/recover_by_old_token.dart | 4 +- .../recovering/recover_by_recovery_key.dart | 2 +- .../recovery_confirm_backblaze.dart | 2 +- .../recovery_confirm_cloudflare.dart | 2 +- .../recovering/recovery_confirm_server.dart | 4 +- .../recovery_hentzner_connected.dart | 2 +- .../recovering/recovery_method_select.dart | 4 +- .../setup/recovering/recovery_routing.dart | 4 +- lib/ui/pages/users/add_user_fab.dart | 2 +- lib/ui/pages/users/new_user.dart | 2 +- lib/ui/pages/users/reset_password.dart | 2 +- lib/ui/pages/users/user_details.dart | 4 +- lib/ui/pages/users/users.dart | 2 +- 90 files changed, 191 insertions(+), 206 deletions(-) diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index b88b21d7..6c870f9e 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -16,7 +16,7 @@ import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; class BlocAndProviderConfig extends StatelessWidget { - const BlocAndProviderConfig({final super.key, this.child}); + const BlocAndProviderConfig({super.key, this.child}); final Widget? child; diff --git a/lib/config/bloc_observer.dart b/lib/config/bloc_observer.dart index 9e2e8f43..3cb9e1c0 100644 --- a/lib/config/bloc_observer.dart +++ b/lib/config/bloc_observer.dart @@ -4,16 +4,4 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class SimpleBlocObserver extends BlocObserver { SimpleBlocObserver(); - - @override - void onError( - final BlocBase bloc, - final Object error, - final StackTrace stackTrace, - ) { - // getIt().showSnackBar( - // 'Bloc error: ${error.toString()}', - // ); - super.onError(bloc, error, stackTrace); - } } diff --git a/lib/config/localization.dart b/lib/config/localization.dart index 5e5ffc38..297928ed 100644 --- a/lib/config/localization.dart +++ b/lib/config/localization.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class Localization extends StatelessWidget { const Localization({ - final super.key, + super.key, this.child, }); diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 0e20fb02..5fdf495a 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -35,9 +35,9 @@ class GenericMutationResult { class GenericJobMutationReturn extends GenericMutationResult { GenericJobMutationReturn({ - required final super.success, - required final super.code, - final super.message, + required super.success, + required super.code, + super.message, this.job, }); final ServerJob? job; diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index be7d4fb0..07da1083 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -2,9 +2,9 @@ part of 'server.dart'; class UserMutationResult extends GenericMutationResult { UserMutationResult({ - required final super.success, - required final super.code, - final super.message, + required super.success, + required super.code, + super.message, this.user, }); diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index 4865a565..160a78ca 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -2,9 +2,9 @@ part of 'server.dart'; class MigrateToBindsMutationReturn extends GenericMutationResult { MigrateToBindsMutationReturn({ - required final super.success, - required final super.code, - final super.message, + required super.success, + required super.code, + super.message, this.jobUid, }); final String? jobUid; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart index 01f59e98..a425ab93 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart @@ -3,9 +3,9 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart' class DnsProviderApiSettings extends ProviderApiSettings { const DnsProviderApiSettings({ - final super.hasLogger = false, - final super.isWithToken = true, - final this.customToken, + super.hasLogger = false, + super.isWithToken = true, + this.customToken, }); final String? customToken; } diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 1cef3dfc..67c88e05 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 8340676d..37ecc0f0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -13,7 +13,7 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { - HetznerApi({final this.hasLogger = false, final this.isWithToken = true}); + HetznerApi({this.hasLogger = false, this.isWithToken = true}); @override bool hasLogger; @override diff --git a/lib/logic/cubit/forms/user/user_form_cubit.dart b/lib/logic/cubit/forms/user/user_form_cubit.dart index c60fef9e..c3712382 100644 --- a/lib/logic/cubit/forms/user/user_form_cubit.dart +++ b/lib/logic/cubit/forms/user/user_form_cubit.dart @@ -11,7 +11,7 @@ class UserFormCubit extends FormCubit { UserFormCubit({ required this.jobsCubit, required final FieldCubitFactory fieldFactory, - final this.initialUser, + this.initialUser, }) { if (initialUser == null) { login = fieldFactory.createUserLoginField(); diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index bb04c07d..11c66ffe 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -76,7 +76,7 @@ abstract class ServerInstallationState extends Equatable { class TimerState extends ServerInstallationNotFinished { TimerState({ required this.dataState, - required final super.isLoading, + required super.isLoading, this.timerStart, this.duration, }) : super( @@ -119,17 +119,17 @@ enum ServerSetupProgress { class ServerInstallationNotFinished extends ServerInstallationState { const ServerInstallationNotFinished({ - required final super.isServerStarted, - required final super.isServerResetedFirstTime, - required final super.isServerResetedSecondTime, - required final this.isLoading, + required super.isServerStarted, + required super.isServerResetedFirstTime, + required super.isServerResetedSecondTime, + required this.isLoading, required this.dnsMatches, - final super.providerApiToken, - final super.cloudFlareKey, - final super.backblazeCredential, - final super.serverDomain, - final super.rootUser, - final super.serverDetails, + super.providerApiToken, + super.cloudFlareKey, + super.backblazeCredential, + super.serverDomain, + super.rootUser, + super.serverDetails, }); final bool isLoading; final Map? dnsMatches; @@ -209,15 +209,15 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ - required final String super.providerApiToken, - required final String super.cloudFlareKey, - required final BackblazeCredential super.backblazeCredential, - required final ServerDomain super.serverDomain, - required final User super.rootUser, - required final ServerHostingDetails super.serverDetails, - required final super.isServerStarted, - required final super.isServerResetedFirstTime, - required final super.isServerResetedSecondTime, + required String super.providerApiToken, + required String super.cloudFlareKey, + required BackblazeCredential super.backblazeCredential, + required ServerDomain super.serverDomain, + required User super.rootUser, + required ServerHostingDetails super.serverDetails, + required super.isServerStarted, + required super.isServerResetedFirstTime, + required super.isServerResetedSecondTime, }); @override @@ -260,12 +260,12 @@ class ServerInstallationRecovery extends ServerInstallationState { const ServerInstallationRecovery({ required this.currentStep, required this.recoveryCapabilities, - final super.providerApiToken, - final super.cloudFlareKey, - final super.backblazeCredential, - final super.serverDomain, - final super.rootUser, - final super.serverDetails, + super.providerApiToken, + super.cloudFlareKey, + super.backblazeCredential, + super.serverDomain, + super.rootUser, + super.serverDetails, }) : super( isServerStarted: true, isServerResetedFirstTime: true, diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index c6f55873..6d335683 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; class DiskSize { - const DiskSize({final this.byte = 0}); + const DiskSize({this.byte = 0}); DiskSize.fromKibibyte(final double kibibyte) : this(byte: (kibibyte * 1024).round()); diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 67bbfca4..2c448e81 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -14,11 +14,11 @@ class ServerJob { required this.uid, required this.updatedAt, required this.createdAt, - final this.error, - final this.progress, - final this.result, - final this.statusText, - final this.finishedAt, + this.error, + this.progress, + this.result, + this.statusText, + this.finishedAt, }); ServerJob.fromGraphQL(final Query$GetApiJobs$jobs$getJobs serverJob) diff --git a/lib/logic/models/server_basic_info.dart b/lib/logic/models/server_basic_info.dart index 8670dc8c..c7d44ff8 100644 --- a/lib/logic/models/server_basic_info.dart +++ b/lib/logic/models/server_basic_info.dart @@ -32,12 +32,12 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { ); ServerBasicInfoWithValidators({ - required final super.id, - required final super.name, - required final super.reverseDns, - required final super.ip, - required final super.created, - required final super.volumeId, + required super.id, + required super.name, + required super.reverseDns, + required super.ip, + required super.created, + required super.volumeId, required this.isIpValid, required this.isReverseDnsValid, }); diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 04c5c6d3..79bd8f7e 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -7,6 +7,27 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; class Service { + Service.fromGraphQL(final Query$AllServices$services$allServices service) + : this( + id: service.id, + displayName: service.displayName, + description: service.description, + isEnabled: service.isEnabled, + isRequired: service.isRequired, + isMovable: service.isMovable, + status: ServiceStatus.fromGraphQL(service.status), + storageUsage: ServiceStorageUsage( + used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), + volume: service.storageUsage.volume?.name, + ), + // Decode the base64 encoded svg icon to text. + svgIcon: utf8.decode(base64.decode(service.svgIcon)), + dnsRecords: service.dnsRecords + ?.map((final record) => DnsRecord.fromGraphQL(record)) + .toList() ?? + [], + url: service.url, + ); Service({ required this.id, required this.displayName, @@ -40,28 +61,6 @@ class Service { return ''; } - Service.fromGraphQL(final Query$AllServices$services$allServices service) - : this( - id: service.id, - displayName: service.displayName, - description: service.description, - isEnabled: service.isEnabled, - isRequired: service.isRequired, - isMovable: service.isMovable, - status: ServiceStatus.fromGraphQL(service.status), - storageUsage: ServiceStorageUsage( - used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), - volume: service.storageUsage.volume?.name, - ), - // Decode the base64 encoded svg icon to text. - svgIcon: utf8.decode(base64.decode(service.svgIcon)), - dnsRecords: service.dnsRecords - ?.map((final record) => DnsRecord.fromGraphQL(record)) - .toList() ?? - [], - url: service.url, - ); - static Service empty = Service( id: 'empty', displayName: '', diff --git a/lib/main.dart b/lib/main.dart index f2c36392..ee771474 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,7 +60,7 @@ class MyApp extends StatelessWidget { const MyApp({ required this.lightThemeData, required this.darkThemeData, - final super.key, + super.key, }); final ThemeData lightThemeData; diff --git a/lib/ui/components/action_button/action_button.dart b/lib/ui/components/action_button/action_button.dart index 6572794b..4073393f 100644 --- a/lib/ui/components/action_button/action_button.dart +++ b/lib/ui/components/action_button/action_button.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class ActionButton extends StatelessWidget { const ActionButton({ - final super.key, + super.key, this.text, this.onPressed, this.isRed = false, diff --git a/lib/ui/components/brand_alert/brand_alert.dart b/lib/ui/components/brand_alert/brand_alert.dart index 0d673ded..352b091c 100644 --- a/lib/ui/components/brand_alert/brand_alert.dart +++ b/lib/ui/components/brand_alert/brand_alert.dart @@ -2,10 +2,10 @@ import 'package:flutter/material.dart'; class BrandAlert extends AlertDialog { BrandAlert({ - final super.key, + super.key, final String? title, final String? contentText, - final super.actions, + super.actions, }) : super( title: title != null ? Text(title) : null, content: title != null ? Text(contentText!) : null, diff --git a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart index de322b05..0f60ed09 100644 --- a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart +++ b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart @@ -4,7 +4,7 @@ import 'package:selfprivacy/config/brand_colors.dart'; class BrandBottomSheet extends StatelessWidget { const BrandBottomSheet({ required this.child, - final super.key, + super.key, this.isExpended = false, }); diff --git a/lib/ui/components/brand_button/brand_button.dart b/lib/ui/components/brand_button/brand_button.dart index 8951b70f..c56fad37 100644 --- a/lib/ui/components/brand_button/brand_button.dart +++ b/lib/ui/components/brand_button/brand_button.dart @@ -56,7 +56,7 @@ class BrandButton { class IconTextButton extends StatelessWidget { const IconTextButton({ - final super.key, + super.key, this.onPressed, this.title, this.icon, diff --git a/lib/ui/components/brand_button/filled_button.dart b/lib/ui/components/brand_button/filled_button.dart index b3888f3c..93f8e467 100644 --- a/lib/ui/components/brand_button/filled_button.dart +++ b/lib/ui/components/brand_button/filled_button.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class FilledButton extends StatelessWidget { const FilledButton({ - final super.key, + super.key, this.onPressed, this.title, this.child, @@ -17,13 +17,13 @@ class FilledButton extends StatelessWidget { @override Widget build(final BuildContext context) { final ButtonStyle enabledStyle = ElevatedButton.styleFrom( - onPrimary: Theme.of(context).colorScheme.onPrimary, - primary: Theme.of(context).colorScheme.primary, + foregroundColor: Theme.of(context).colorScheme.onPrimary, + backgroundColor: Theme.of(context).colorScheme.primary, ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)); final ButtonStyle disabledStyle = ElevatedButton.styleFrom( - onPrimary: Theme.of(context).colorScheme.onSurface.withAlpha(30), - primary: Theme.of(context).colorScheme.onSurface.withAlpha(98), + foregroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(30), + backgroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(98), ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)); return ConstrainedBox( diff --git a/lib/ui/components/brand_button/outlined_button.dart b/lib/ui/components/brand_button/outlined_button.dart index 6284943a..260de23a 100644 --- a/lib/ui/components/brand_button/outlined_button.dart +++ b/lib/ui/components/brand_button/outlined_button.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class BrandOutlinedButton extends StatelessWidget { const BrandOutlinedButton({ - final super.key, + super.key, this.onPressed, this.title, this.child, diff --git a/lib/ui/components/brand_button/segmented_buttons.dart b/lib/ui/components/brand_button/segmented_buttons.dart index e3ce50cd..7632dc20 100644 --- a/lib/ui/components/brand_button/segmented_buttons.dart +++ b/lib/ui/components/brand_button/segmented_buttons.dart @@ -5,7 +5,7 @@ class SegmentedButtons extends StatelessWidget { required this.isSelected, required this.onPressed, required this.titles, - final super.key, + super.key, }); final List isSelected; diff --git a/lib/ui/components/brand_cards/filled_card.dart b/lib/ui/components/brand_cards/filled_card.dart index 02d46604..497f3c77 100644 --- a/lib/ui/components/brand_cards/filled_card.dart +++ b/lib/ui/components/brand_cards/filled_card.dart @@ -7,7 +7,7 @@ class FilledCard extends StatelessWidget { this.tertiary = false, this.error = false, this.clipped = true, - final super.key, + super.key, }); final Widget child; diff --git a/lib/ui/components/brand_cards/outlined_card.dart b/lib/ui/components/brand_cards/outlined_card.dart index dc959dc2..91f13b44 100644 --- a/lib/ui/components/brand_cards/outlined_card.dart +++ b/lib/ui/components/brand_cards/outlined_card.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class OutlinedCard extends StatelessWidget { const OutlinedCard({ required this.child, - final super.key, + super.key, }); final Widget child; diff --git a/lib/ui/components/brand_header/brand_header.dart b/lib/ui/components/brand_header/brand_header.dart index fa643710..abdabc6f 100644 --- a/lib/ui/components/brand_header/brand_header.dart +++ b/lib/ui/components/brand_header/brand_header.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class BrandHeader extends StatelessWidget { const BrandHeader({ - final super.key, + super.key, this.title = '', this.hasBackButton = false, this.onBackButtonPressed, diff --git a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart index 5eb07858..68f5d772 100644 --- a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart +++ b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/ui/helpers/widget_size.dart'; class BrandHeroScreen extends StatelessWidget { const BrandHeroScreen({ required this.children, - final super.key, + super.key, this.hasBackButton = true, this.hasFlashButton = true, this.heroIcon, @@ -82,7 +82,7 @@ class HeroSliverAppBar extends StatefulWidget { required this.hasBackButton, required this.onBackButtonPressed, required this.heroIconWidget, - final super.key, + super.key, }); final String heroTitle; diff --git a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart index 50104aa0..335387f5 100644 --- a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart +++ b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart @@ -6,7 +6,7 @@ class BrandLinearIndicator extends StatelessWidget { required this.color, required this.backgroundColor, required this.height, - final super.key, + super.key, }); final double value; diff --git a/lib/ui/components/brand_loader/brand_loader.dart b/lib/ui/components/brand_loader/brand_loader.dart index 59f1f177..63c7cccd 100644 --- a/lib/ui/components/brand_loader/brand_loader.dart +++ b/lib/ui/components/brand_loader/brand_loader.dart @@ -6,7 +6,7 @@ class BrandLoader { } class HorizontalLoader extends StatelessWidget { - const HorizontalLoader({final super.key}); + const HorizontalLoader({super.key}); @override Widget build(final BuildContext context) => Column( diff --git a/lib/ui/components/brand_md/brand_md.dart b/lib/ui/components/brand_md/brand_md.dart index 249895a9..457bb5c3 100644 --- a/lib/ui/components/brand_md/brand_md.dart +++ b/lib/ui/components/brand_md/brand_md.dart @@ -9,7 +9,7 @@ import 'package:url_launcher/url_launcher_string.dart'; class BrandMarkdown extends StatefulWidget { const BrandMarkdown({ required this.fileName, - final super.key, + super.key, }); final String fileName; diff --git a/lib/ui/components/brand_radio/brand_radio.dart b/lib/ui/components/brand_radio/brand_radio.dart index 2dc8fc00..494c3e81 100644 --- a/lib/ui/components/brand_radio/brand_radio.dart +++ b/lib/ui/components/brand_radio/brand_radio.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/config/brand_colors.dart'; class BrandRadio extends StatelessWidget { const BrandRadio({ required this.isChecked, - final super.key, + super.key, }); final bool isChecked; diff --git a/lib/ui/components/brand_switch/brand_switch.dart b/lib/ui/components/brand_switch/brand_switch.dart index 89396acc..4ded47dd 100644 --- a/lib/ui/components/brand_switch/brand_switch.dart +++ b/lib/ui/components/brand_switch/brand_switch.dart @@ -4,7 +4,7 @@ class BrandSwitch extends StatelessWidget { const BrandSwitch({ required this.onChanged, required this.value, - final super.key, + super.key, }); final ValueChanged onChanged; diff --git a/lib/ui/components/brand_tab_bar/brand_tab_bar.dart b/lib/ui/components/brand_tab_bar/brand_tab_bar.dart index 194c0ac1..8362bedb 100644 --- a/lib/ui/components/brand_tab_bar/brand_tab_bar.dart +++ b/lib/ui/components/brand_tab_bar/brand_tab_bar.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; class BrandTabBar extends StatefulWidget { - const BrandTabBar({final super.key, this.controller}); + const BrandTabBar({super.key, this.controller}); final TabController? controller; @override diff --git a/lib/ui/components/brand_text/brand_text.dart b/lib/ui/components/brand_text/brand_text.dart index 00e9d736..15307577 100644 --- a/lib/ui/components/brand_text/brand_text.dart +++ b/lib/ui/components/brand_text/brand_text.dart @@ -147,7 +147,7 @@ class BrandText extends StatelessWidget { const BrandText( this.text, { required this.type, - final super.key, + super.key, this.style, this.overflow, this.softWrap, diff --git a/lib/ui/components/brand_timer/brand_timer.dart b/lib/ui/components/brand_timer/brand_timer.dart index 5d76d57d..3ccf9a63 100644 --- a/lib/ui/components/brand_timer/brand_timer.dart +++ b/lib/ui/components/brand_timer/brand_timer.dart @@ -9,7 +9,7 @@ class BrandTimer extends StatefulWidget { const BrandTimer({ required this.startDateTime, required this.duration, - final super.key, + super.key, }); final DateTime startDateTime; diff --git a/lib/ui/components/error/error.dart b/lib/ui/components/error/error.dart index d12af1a3..402ce512 100644 --- a/lib/ui/components/error/error.dart +++ b/lib/ui/components/error/error.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; class BrandError extends StatelessWidget { - const BrandError({final super.key, this.error, this.stackTrace}); + const BrandError({super.key, this.error, this.stackTrace}); final Object? error; final StackTrace? stackTrace; diff --git a/lib/ui/components/icon_status_mask/icon_status_mask.dart b/lib/ui/components/icon_status_mask/icon_status_mask.dart index 8c7a2379..54d02aaf 100644 --- a/lib/ui/components/icon_status_mask/icon_status_mask.dart +++ b/lib/ui/components/icon_status_mask/icon_status_mask.dart @@ -6,7 +6,7 @@ class IconStatusMask extends StatelessWidget { const IconStatusMask({ required this.icon, required this.status, - final super.key, + super.key, }); final Widget icon; diff --git a/lib/ui/components/info_box/info_box.dart b/lib/ui/components/info_box/info_box.dart index 816053e3..c2e67def 100644 --- a/lib/ui/components/info_box/info_box.dart +++ b/lib/ui/components/info_box/info_box.dart @@ -4,7 +4,7 @@ class InfoBox extends StatelessWidget { const InfoBox({ required this.text, this.isWarning = false, - final super.key, + super.key, }); final String text; diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index c49ceccf..25fb3612 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -16,7 +16,7 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; class JobsContent extends StatelessWidget { - const JobsContent({final super.key}); + const JobsContent({super.key}); @override Widget build(final BuildContext context) { @@ -89,7 +89,8 @@ class JobsContent extends StatelessWidget { const SizedBox(width: 10), ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).colorScheme.errorContainer, + backgroundColor: + Theme.of(context).colorScheme.errorContainer, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), ), diff --git a/lib/ui/components/jobs_content/server_job_card.dart b/lib/ui/components/jobs_content/server_job_card.dart index 46e21166..a772e3c6 100644 --- a/lib/ui/components/jobs_content/server_job_card.dart +++ b/lib/ui/components/jobs_content/server_job_card.dart @@ -4,8 +4,8 @@ import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_in class ServerJobCard extends StatelessWidget { const ServerJobCard({ - required final this.serverJob, - final super.key, + required this.serverJob, + super.key, }); final ServerJob serverJob; diff --git a/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart b/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart index c31315bd..3d8d7a84 100644 --- a/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart +++ b/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart @@ -7,7 +7,7 @@ class ListTileOnSurfaceVariant extends StatelessWidget { this.leadingIcon, this.onTap, this.disableSubtitleOverflow = false, - final super.key, + super.key, }); final String title; diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index faa23381..1faf586c 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; class NotReadyCard extends StatelessWidget { - const NotReadyCard({final super.key}); + const NotReadyCard({super.key}); @override Widget build(final BuildContext context) => Container( diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/components/pre_styled_buttons/flash_fab.dart index b97f3bd6..f0087b9f 100644 --- a/lib/ui/components/pre_styled_buttons/flash_fab.dart +++ b/lib/ui/components/pre_styled_buttons/flash_fab.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; class BrandFab extends StatefulWidget { - const BrandFab({final super.key}); + const BrandFab({super.key}); @override State createState() => _BrandFabState(); diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index 9b851ce7..eae4161d 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -8,7 +8,7 @@ class ProgressBar extends StatefulWidget { const ProgressBar({ required this.steps, required this.activeIndex, - final super.key, + super.key, }); final int activeIndex; diff --git a/lib/ui/components/storage_list_items/server_storage_list_item.dart b/lib/ui/components/storage_list_items/server_storage_list_item.dart index 8c675685..52164d78 100644 --- a/lib/ui/components/storage_list_items/server_storage_list_item.dart +++ b/lib/ui/components/storage_list_items/server_storage_list_item.dart @@ -6,9 +6,9 @@ import 'package:selfprivacy/logic/models/disk_status.dart'; class ServerStorageListItem extends StatelessWidget { const ServerStorageListItem({ required this.volume, - final this.showIcon = true, - final this.dense = false, - final super.key, + this.showIcon = true, + this.dense = false, + super.key, }); final DiskVolume volume; @@ -52,7 +52,7 @@ class ConsumptionListItem extends StatelessWidget { this.rightSideText, this.icon, this.dense = false, - final super.key, + super.key, }); final String title; diff --git a/lib/ui/components/storage_list_items/service_migration_list_item.dart b/lib/ui/components/storage_list_items/service_migration_list_item.dart index 847d2cf6..8eee284c 100644 --- a/lib/ui/components/storage_list_items/service_migration_list_item.dart +++ b/lib/ui/components/storage_list_items/service_migration_list_item.dart @@ -9,7 +9,7 @@ class ServiceMigrationListItem extends StatelessWidget { required this.diskStatus, required this.selectedVolume, required this.onChange, - final super.key, + super.key, }); final Service service; @@ -54,7 +54,7 @@ class ServiceMigrationListItem extends StatelessWidget { class ServiceConsumptionTitle extends StatelessWidget { const ServiceConsumptionTitle({ required this.service, - final super.key, + super.key, }); final Service service; diff --git a/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart b/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart index 30216709..ffdb4e34 100644 --- a/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart +++ b/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart @@ -8,7 +8,7 @@ class ServiceStorageConsumptionListItem extends StatelessWidget { required this.storageConsumptionText, required this.color, required this.icon, - final super.key, + super.key, }); final String title; diff --git a/lib/ui/components/switch_block/switch_bloc.dart b/lib/ui/components/switch_block/switch_bloc.dart index cce3b742..85ac2c68 100644 --- a/lib/ui/components/switch_block/switch_bloc.dart +++ b/lib/ui/components/switch_block/switch_bloc.dart @@ -8,7 +8,7 @@ class SwitcherBlock extends StatelessWidget { required this.child, required this.isActive, required this.onChange, - final super.key, + super.key, }); final Widget child; diff --git a/lib/ui/helpers/widget_size.dart b/lib/ui/helpers/widget_size.dart index 11fa7b4f..2b9eb962 100644 --- a/lib/ui/helpers/widget_size.dart +++ b/lib/ui/helpers/widget_size.dart @@ -5,7 +5,7 @@ class WidgetSize extends StatefulWidget { const WidgetSize({ required this.onChange, required this.child, - final super.key, + super.key, }); final Widget child; final Function onChange; @@ -27,12 +27,11 @@ class _WidgetSizeState extends State { var widgetKey = GlobalKey(); Size? oldSize; - void postFrameCallback(_) { + void postFrameCallback(final _) { final context = widgetKey.currentContext; if (context == null) { return; } - ; final newSize = context.size; if (oldSize == newSize) { diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 8936f59e..e982a3d4 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -16,7 +16,7 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; GlobalKey navigatorKey = GlobalKey(); class BackupDetails extends StatefulWidget { - const BackupDetails({final super.key}); + const BackupDetails({super.key}); @override State createState() => _BackupDetailsState(); diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index bc608339..31010fd4 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -11,7 +11,7 @@ import 'package:selfprivacy/ui/pages/devices/new_device.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class DevicesScreen extends StatefulWidget { - const DevicesScreen({final super.key}); + const DevicesScreen({super.key}); @override State createState() => _DevicesScreenState(); diff --git a/lib/ui/pages/devices/new_device.dart b/lib/ui/pages/devices/new_device.dart index e8173db0..d85ac145 100644 --- a/lib/ui/pages/devices/new_device.dart +++ b/lib/ui/pages/devices/new_device.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class NewDeviceScreen extends StatelessWidget { - const NewDeviceScreen({final super.key}); + const NewDeviceScreen({super.key}); @override Widget build(final BuildContext context) => BrandHeroScreen( diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index a1d6c29c..8bf264d6 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; class DnsDetailsPage extends StatefulWidget { - const DnsDetailsPage({final super.key}); + const DnsDetailsPage({super.key}); @override State createState() => _DnsDetailsPageState(); diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 9b545678..697e7811 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -7,7 +7,7 @@ import 'package:package_info/package_info.dart'; import 'package:easy_localization/easy_localization.dart'; class AboutApplicationPage extends StatelessWidget { - const AboutApplicationPage({final super.key}); + const AboutApplicationPage({super.key}); @override Widget build(final BuildContext context) => SafeArea( diff --git a/lib/ui/pages/more/about_us.dart b/lib/ui/pages/more/about_us.dart index 4061c2bb..1a1279d7 100644 --- a/lib/ui/pages/more/about_us.dart +++ b/lib/ui/pages/more/about_us.dart @@ -5,7 +5,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class AboutUsPage extends StatelessWidget { - const AboutUsPage({final super.key}); + const AboutUsPage({super.key}); @override Widget build(final BuildContext context) => SafeArea( diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart index abbfd0ee..4287e985 100644 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ b/lib/ui/pages/more/app_settings/app_setting.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:easy_localization/easy_localization.dart'; class AppSettingsPage extends StatefulWidget { - const AppSettingsPage({final super.key}); + const AppSettingsPage({super.key}); @override State createState() => _AppSettingsPageState(); @@ -80,7 +80,7 @@ class _AppSettingsPageState extends State { const SizedBox(width: 5), ElevatedButton( style: ElevatedButton.styleFrom( - primary: BrandColors.red1, + backgroundColor: BrandColors.red1, ), child: Text( 'basis.reset'.tr(), @@ -145,7 +145,7 @@ class _AppSettingsPageState extends State { const SizedBox(width: 5), ElevatedButton( style: ElevatedButton.styleFrom( - primary: BrandColors.red1, + backgroundColor: BrandColors.red1, ), onPressed: isDisabled ? null diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index 81c387f1..6ad31ea5 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; class Console extends StatefulWidget { - const Console({final super.key}); + const Console({super.key}); @override State createState() => _ConsoleState(); diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 5d487717..2e75ad26 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -23,7 +23,7 @@ import 'package:selfprivacy/ui/pages/more/console.dart'; import 'package:selfprivacy/ui/pages/more/about_application.dart'; class MorePage extends StatelessWidget { - const MorePage({final super.key}); + const MorePage({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index dc5c8763..36478a1c 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; class OnboardingPage extends StatefulWidget { - const OnboardingPage({required this.nextPage, final super.key}); + const OnboardingPage({required this.nextPage, super.key}); final Widget nextPage; @override diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 0de06295..ee01085e 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -18,7 +18,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; GlobalKey navigatorKey = GlobalKey(); class ProvidersPage extends StatefulWidget { - const ProvidersPage({final super.key}); + const ProvidersPage({super.key}); @override State createState() => _ProvidersPageState(); @@ -119,11 +119,11 @@ class _ProvidersPageState extends State { class _Card extends StatelessWidget { const _Card({ - required final this.state, - required final this.icon, - required final this.title, - required final this.subtitle, - final this.onTap, + required this.state, + required this.icon, + required this.title, + required this.subtitle, + this.onTap, }); final Function()? onTap; diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index 2254879d..0330a5a0 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -14,7 +14,7 @@ import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class RecoveryKey extends StatefulWidget { - const RecoveryKey({final super.key}); + const RecoveryKey({super.key}); @override State createState() => _RecoveryKeyState(); @@ -61,7 +61,7 @@ class _RecoveryKeyState extends State { } class RecoveryKeyContent extends StatefulWidget { - const RecoveryKeyContent({final super.key}); + const RecoveryKeyContent({super.key}); @override State createState() => _RecoveryKeyContentState(); @@ -107,7 +107,7 @@ class _RecoveryKeyContentState extends State { } class RecoveryKeyStatusCard extends StatelessWidget { - const RecoveryKeyStatusCard({required this.isValid, final super.key}); + const RecoveryKeyStatusCard({required this.isValid, super.key}); final bool isValid; @@ -144,7 +144,7 @@ class RecoveryKeyStatusCard extends StatelessWidget { } class RecoveryKeyInformation extends StatelessWidget { - const RecoveryKeyInformation({required this.state, final super.key}); + const RecoveryKeyInformation({required this.state, super.key}); final RecoveryKeyState state; @@ -201,7 +201,7 @@ class RecoveryKeyInformation extends StatelessWidget { } class RecoveryKeyConfiguration extends StatefulWidget { - const RecoveryKeyConfiguration({final super.key}); + const RecoveryKeyConfiguration({super.key}); @override State createState() => _RecoveryKeyConfigurationState(); diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index 60169e5a..22e07119 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/info_box/info_box.dart'; class RecoveryKeyReceiving extends StatelessWidget { - const RecoveryKeyReceiving({required this.recoveryKey, final super.key}); + const RecoveryKeyReceiving({required this.recoveryKey, super.key}); final String recoveryKey; diff --git a/lib/ui/pages/root_route.dart b/lib/ui/pages/root_route.dart index d68e4a0e..9b62dae0 100644 --- a/lib/ui/pages/root_route.dart +++ b/lib/ui/pages/root_route.dart @@ -9,7 +9,7 @@ import 'package:selfprivacy/ui/pages/users/users.dart'; import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; class RootPage extends StatefulWidget { - const RootPage({final super.key}); + const RootPage({super.key}); @override State createState() => _RootPageState(); diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index 3a3eb5a7..fb46eb71 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -164,7 +164,7 @@ class Legend extends StatelessWidget { const Legend({ required this.color, required this.text, - final super.key, + super.key, }); final String text; diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart index 14e30dcc..9b437b16 100644 --- a/lib/ui/pages/server_details/charts/cpu_chart.dart +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -10,7 +10,7 @@ class CpuChart extends StatelessWidget { required this.data, required this.period, required this.start, - final super.key, + super.key, }); final List data; diff --git a/lib/ui/pages/server_details/charts/network_charts.dart b/lib/ui/pages/server_details/charts/network_charts.dart index 43a092f2..c71ae7b1 100644 --- a/lib/ui/pages/server_details/charts/network_charts.dart +++ b/lib/ui/pages/server_details/charts/network_charts.dart @@ -13,7 +13,7 @@ class NetworkChart extends StatelessWidget { required this.listData, required this.period, required this.start, - final super.key, + super.key, }); final List> listData; diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 894c9a28..e0d82b6d 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -34,7 +34,7 @@ part 'time_zone/time_zone.dart'; var navigatorKey = GlobalKey(); class ServerDetailsScreen extends StatefulWidget { - const ServerDetailsScreen({final super.key}); + const ServerDetailsScreen({super.key}); @override State createState() => _ServerDetailsScreenState(); diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index 28407d7d..a93b8f23 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -7,7 +7,7 @@ final List locations = timeZoneDatabase.locations.values.toList() ); class SelectTimezone extends StatefulWidget { - const SelectTimezone({final super.key}); + const SelectTimezone({super.key}); @override State createState() => _SelectTimezoneState(); @@ -117,7 +117,9 @@ class _SelectTimezoneState extends State { ); MapEntry locationToListTile( - final int key, final Location location) { + final int key, + final Location location, + ) { final duration = Duration(milliseconds: location.currentTimeZone.offset); final area = location.currentTimeZone.abbreviation .replaceAll(RegExp(r'[\d+()-]'), ''); diff --git a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index cfe3fcb5..704e4846 100644 --- a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -9,9 +9,7 @@ import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class MigrationProcessPage extends StatefulWidget { - const MigrationProcessPage({ - final super.key, - }); + const MigrationProcessPage({super.key}); @override State createState() => _MigrationProcessPageState(); diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index 750bbf80..ff36a2b9 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -21,7 +21,7 @@ class ServicesMigrationPage extends StatefulWidget { required this.services, required this.diskStatus, required this.isMigration, - final super.key, + super.key, }); final DiskStatus diskStatus; diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index fd4491f7..d9889336 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -14,7 +14,7 @@ class ExtendingVolumePage extends StatefulWidget { const ExtendingVolumePage({ required this.diskVolumeToResize, required this.diskStatus, - final super.key, + super.key, }); final DiskVolume diskVolumeToResize; diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 16b027ac..2a5206e2 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -12,7 +12,10 @@ import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ServerStoragePage extends StatefulWidget { - const ServerStoragePage({required this.diskStatus, final super.key}); + const ServerStoragePage({ + required this.diskStatus, + super.key, + }); final DiskStatus diskStatus; @@ -75,7 +78,7 @@ class ServerStorageSection extends StatelessWidget { required this.volume, required this.diskStatus, required this.services, - final super.key, + super.key, }); final DiskVolume volume; @@ -120,7 +123,7 @@ class ServerConsumptionListTile extends StatelessWidget { const ServerConsumptionListTile({ required this.service, required this.volume, - final super.key, + super.key, }); final Service service; diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index 33a23b9b..ae0c2369 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -10,8 +10,8 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; class StorageCard extends StatelessWidget { const StorageCard({ - required final this.diskStatus, - final super.key, + required this.diskStatus, + super.key, }); final DiskStatus diskStatus; diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 35741016..d923a5b0 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -1,7 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; @@ -14,7 +13,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:url_launcher/url_launcher.dart'; class ServicePage extends StatefulWidget { - const ServicePage({required this.serviceId, final super.key}); + const ServicePage({required this.serviceId, super.key}); final String serviceId; @@ -147,7 +146,7 @@ class _ServicePageState extends State { class ServiceStatusCard extends StatelessWidget { const ServiceStatusCard({ required this.status, - final super.key, + super.key, }); final ServiceStatus status; diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 89a7348a..c4226250 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -3,7 +3,6 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; @@ -31,7 +30,7 @@ const switchableServices = [ ]; class ServicesPage extends StatefulWidget { - const ServicesPage({final super.key}); + const ServicesPage({super.key}); @override State createState() => _ServicesPageState(); diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index c8e070c0..c65d17ae 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -21,9 +21,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class InitializingPage extends StatelessWidget { - const InitializingPage({ - final super.key, - }); + const InitializingPage({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index e32cac5d..a3f366ad 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -9,7 +9,7 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; class RecoverByNewDeviceKeyInstruction extends StatelessWidget { - const RecoverByNewDeviceKeyInstruction({final super.key}); + const RecoverByNewDeviceKeyInstruction({super.key}); @override Widget build(final BuildContext context) => BrandHeroScreen( @@ -30,7 +30,7 @@ class RecoverByNewDeviceKeyInstruction extends StatelessWidget { } class RecoverByNewDeviceKeyInput extends StatelessWidget { - const RecoverByNewDeviceKeyInput({final super.key}); + const RecoverByNewDeviceKeyInput({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index 10a6c279..667f6cce 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -12,7 +12,7 @@ class RecoverByOldTokenInstruction extends StatelessWidget { @override const RecoverByOldTokenInstruction({ required this.instructionFilename, - final super.key, + super.key, }); @override @@ -49,7 +49,7 @@ class RecoverByOldTokenInstruction extends StatelessWidget { } class RecoverByOldToken extends StatelessWidget { - const RecoverByOldToken({final super.key}); + const RecoverByOldToken({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index e17a9436..45152e30 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class RecoverByRecoveryKey extends StatelessWidget { - const RecoverByRecoveryKey({final super.key}); + const RecoverByRecoveryKey({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index cbd40ff0..0b7e7a9e 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmBackblaze extends StatelessWidget { - const RecoveryConfirmBackblaze({final super.key}); + const RecoveryConfirmBackblaze({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index 46db75b7..4b766e56 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmCloudflare extends StatelessWidget { - const RecoveryConfirmCloudflare({final super.key}); + const RecoveryConfirmCloudflare({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index d8510650..430e0894 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class RecoveryConfirmServer extends StatefulWidget { - const RecoveryConfirmServer({final super.key}); + const RecoveryConfirmServer({super.key}); @override State createState() => _RecoveryConfirmServerState(); @@ -265,7 +265,7 @@ class IsValidStringDisplay extends StatelessWidget { required this.isValid, required this.textIfValid, required this.textIfInvalid, - final super.key, + super.key, }); final bool isValid; diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart index 84be9808..76951395 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart @@ -11,7 +11,7 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryHetznerConnected extends StatelessWidget { - const RecoveryHetznerConnected({final super.key}); + const RecoveryHetznerConnected({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index d34b896d..68129d57 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -9,7 +9,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart' import 'package:selfprivacy/utils/route_transitions/basic.dart'; class RecoveryMethodSelect extends StatelessWidget { - const RecoveryMethodSelect({final super.key}); + const RecoveryMethodSelect({super.key}); @override Widget build(final BuildContext context) => BrandHeroScreen( @@ -56,7 +56,7 @@ class RecoveryMethodSelect extends StatelessWidget { } class RecoveryFallbackMethodSelect extends StatelessWidget { - const RecoveryFallbackMethodSelect({final super.key}); + const RecoveryFallbackMethodSelect({super.key}); @override Widget build(final BuildContext context) => diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 028b8618..c2b777fc 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -18,7 +18,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recovery_method_select.dar import 'package:selfprivacy/utils/route_transitions/basic.dart'; class RecoveryRouting extends StatelessWidget { - const RecoveryRouting({final super.key}); + const RecoveryRouting({super.key}); @override Widget build(final BuildContext context) { @@ -77,7 +77,7 @@ class RecoveryRouting extends StatelessWidget { } class SelectDomainToRecover extends StatelessWidget { - const SelectDomainToRecover({final super.key}); + const SelectDomainToRecover({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/users/add_user_fab.dart b/lib/ui/pages/users/add_user_fab.dart index a78f056d..7e87e51d 100644 --- a/lib/ui/pages/users/add_user_fab.dart +++ b/lib/ui/pages/users/add_user_fab.dart @@ -1,7 +1,7 @@ part of 'users.dart'; class AddUserFab extends StatelessWidget { - const AddUserFab({final super.key}); + const AddUserFab({super.key}); @override Widget build(final BuildContext context) => FloatingActionButton.small( diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 69215dda..7c393296 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -1,7 +1,7 @@ part of 'users.dart'; class NewUser extends StatelessWidget { - const NewUser({final super.key}); + const NewUser({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/users/reset_password.dart b/lib/ui/pages/users/reset_password.dart index 841a9353..87f95902 100644 --- a/lib/ui/pages/users/reset_password.dart +++ b/lib/ui/pages/users/reset_password.dart @@ -3,7 +3,7 @@ part of 'users.dart'; class ResetPassword extends StatelessWidget { const ResetPassword({ required this.user, - final super.key, + super.key, }); final User user; diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index e3cfc21f..3ae5b86d 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -3,7 +3,7 @@ part of 'users.dart'; class UserDetails extends StatelessWidget { const UserDetails({ required this.login, - final super.key, + super.key, }); final String login; @@ -249,7 +249,7 @@ class _SshKeysCard extends StatelessWidget { } class NewSshKey extends StatelessWidget { - const NewSshKey(this.user, {final super.key}); + const NewSshKey(this.user, {super.key}); final User user; @override diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 40443a9c..caf6d441 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -34,7 +34,7 @@ part 'add_user_fab.dart'; part 'reset_password.dart'; class UsersPage extends StatelessWidget { - const UsersPage({final super.key}); + const UsersPage({super.key}); @override Widget build(final BuildContext context) { From 1845bea36131e9ecb478b0d557a7ebc4bd5695e9 Mon Sep 17 00:00:00 2001 From: inexcode Date: Wed, 26 Oct 2022 19:53:25 +0300 Subject: [PATCH 245/732] chore(server-api): Deprecate ApiResponse ApiResponse is a wrapper for REST API responses, which is removed. Our code, however, depends on this interface. This dependency must be removed. --- lib/logic/api_maps/graphql_maps/server_api/server.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 78e352c4..842d278a 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -47,6 +47,8 @@ class GenericJobMutationReturn extends GenericMutationResult { final ServerJob? job; } +@Deprecated( + 'Extend GenericMutationResult for mutations, return data for queries') class ApiResponse { ApiResponse({ required this.success, From 88bcdcff39328ba9b1a2a5804172d8e28c6a5b1b Mon Sep 17 00:00:00 2001 From: inexcode Date: Wed, 26 Oct 2022 20:24:00 +0300 Subject: [PATCH 246/732] chore(server-api): Deprecate getDkim Server API now aware of all required DNS records. More general approach to handle DNS records is required in the future. --- lib/logic/api_maps/graphql_maps/server_api/server.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 842d278a..31ee89fe 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -48,7 +48,8 @@ class GenericJobMutationReturn extends GenericMutationResult { } @Deprecated( - 'Extend GenericMutationResult for mutations, return data for queries') + 'Extend GenericMutationResult for mutations, return data for queries', +) class ApiResponse { ApiResponse({ required this.success, @@ -266,6 +267,9 @@ class ServerApi extends ApiMap return key; } + @Deprecated( + 'Server now aware of all required DNS records. More general approach has to be implemented', + ) Future getDkim() async { String? dkim; QueryResult response; From 7c61d9a787f648bf1764ed01cd3cbfb0b3f9fb70 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 27 Oct 2022 15:58:57 +0400 Subject: [PATCH 247/732] chore: Generate build runner models --- .../api_maps/graphql_maps/schema/disk_volumes.graphql.dart | 1 + lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart | 2 +- .../api_maps/graphql_maps/schema/server_settings.graphql.dart | 2 +- lib/logic/api_maps/graphql_maps/schema/services.graphql.dart | 1 - lib/logic/api_maps/graphql_maps/schema/users.graphql.dart | 2 +- lib/logic/models/json/server_job.g.dart | 3 ++- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index b7d6acac..2464c561 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -4,6 +4,7 @@ import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; part 'disk_volumes.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 7e99910c..c31a3487 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,10 +1,10 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; part 'server_api.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 538b58cf..c0a70151 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; part 'server_settings.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 49dbc91f..411186ad 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index a132155a..18a15aa9 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; part 'users.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart index 54719f80..5328547b 100644 --- a/lib/logic/models/json/server_job.g.dart +++ b/lib/logic/models/json/server_job.g.dart @@ -20,7 +20,7 @@ ServerJob _$ServerJobFromJson(Map json) => ServerJob( finishedAt: json['finishedAt'] == null ? null : DateTime.parse(json['finishedAt'] as String), - ); + )..isHidden = json['isHidden'] as bool; Map _$ServerJobToJson(ServerJob instance) => { 'name': instance.name, @@ -34,6 +34,7 @@ Map _$ServerJobToJson(ServerJob instance) => { 'result': instance.result, 'statusText': instance.statusText, 'finishedAt': instance.finishedAt?.toIso8601String(), + 'isHidden': instance.isHidden, }; const _$JobStatusEnumEnumMap = { From cb94248df050d16883470ef10c760d9cc06dc847 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 27 Oct 2022 17:08:59 +0400 Subject: [PATCH 248/732] fix: Generate hive build runner model for server details --- lib/logic/models/hive/server_details.g.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/logic/models/hive/server_details.g.dart b/lib/logic/models/hive/server_details.g.dart index 29716607..6fad2e92 100644 --- a/lib/logic/models/hive/server_details.g.dart +++ b/lib/logic/models/hive/server_details.g.dart @@ -76,13 +76,14 @@ class ServerVolumeAdapter extends TypeAdapter { sizeByte: fields[3] == null ? 10737418240 : fields[3] as int, serverId: fields[4] as int?, linuxDevice: fields[5] as String?, + uuid: fields[6] as String?, ); } @override void write(BinaryWriter writer, ServerVolume obj) { writer - ..writeByte(5) + ..writeByte(6) ..writeByte(1) ..write(obj.id) ..writeByte(2) @@ -92,7 +93,9 @@ class ServerVolumeAdapter extends TypeAdapter { ..writeByte(4) ..write(obj.serverId) ..writeByte(5) - ..write(obj.linuxDevice); + ..write(obj.linuxDevice) + ..writeByte(6) + ..write(obj.uuid); } @override @@ -117,6 +120,8 @@ class ServerProviderAdapter extends TypeAdapter { return ServerProvider.unknown; case 1: return ServerProvider.hetzner; + case 2: + return ServerProvider.digitalOcean; default: return ServerProvider.unknown; } @@ -131,6 +136,9 @@ class ServerProviderAdapter extends TypeAdapter { case ServerProvider.hetzner: writer.writeByte(1); break; + case ServerProvider.digitalOcean: + writer.writeByte(2); + break; } } From 0dc0ba215a10263931606ba20c8fe68f4aa94100 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 27 Oct 2022 20:01:22 +0400 Subject: [PATCH 249/732] fix(digital-ocean): Adjust droplet data preparations according to API notation --- .../digital_ocean/digital_ocean.dart | 104 ++++++++++++------ .../server_providers/hetzner/hetzner.dart | 52 ++++----- lib/utils/password_generator.dart | 2 +- 3 files changed, 99 insertions(+), 59 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index a878b958..ee574988 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -102,7 +102,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/volumes', data: { 'size_gigabytes': 10, - 'name': StringGenerators.dbStorageName(), + 'name': 'volume${StringGenerators.dbStorageName()}', 'labels': {'labelkey': 'value'}, 'region': region, 'filesystem_type': 'ext4', @@ -212,12 +212,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'droplet_id': serverId, }, ); - success = - dbPostResponse.data['action']['status'].toString() == 'completed'; + success = dbPostResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { - client.close(); + close(client); } return success; @@ -277,6 +276,23 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return success; } + static String getHostnameFromDomain(final String domain) { + // Replace all non-alphanumeric characters with an underscore + String hostname = + domain.split('.')[0].replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); + if (hostname.endsWith('-')) { + hostname = hostname.substring(0, hostname.length - 1); + } + if (hostname.startsWith('-')) { + hostname = hostname.substring(1); + } + if (hostname.isEmpty) { + hostname = 'selfprivacy-server'; + } + + return hostname; + } + @override Future createServer({ required final String dnsApiToken, @@ -292,14 +308,16 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); + final String formattedHostname = getHostnameFromDomain(domainName); + final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=digital-ocean NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$domainName bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=digital-ocean NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); final Dio client = await getClient(); try { final Map data = { - 'name': domainName, + 'name': formattedHostname, 'size': serverType, 'image': 'ubuntu-20-04-x64', 'user_data': userdataString, @@ -312,14 +330,28 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { data: data, ); - final int serverId = serverCreateResponse.data['server']['id']; + final int serverId = serverCreateResponse.data['droplet']['id']; final ServerVolume? newVolume = await createVolume(); final bool attachedVolume = await attachVolume(newVolume!, serverId); - if (attachedVolume) { + String? ipv4; + int attempts = 0; + while (attempts < 5 && ipv4 == null) { + await Future.delayed(const Duration(seconds: 20)); + final List servers = await getServers(); + for (final server in servers) { + if (server.name == formattedHostname && server.ip != '0.0.0.0') { + ipv4 = server.ip; + break; + } + } + ++attempts; + } + + if (attachedVolume && ipv4 != null) { serverDetails = ServerHostingDetails( id: serverId, - ip4: serverCreateResponse.data['droplet']['networks']['v4'][0], + ip4: ipv4, createTime: DateTime.now(), volume: newVolume, apiToken: apiToken, @@ -452,20 +484,26 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { final Response response = await client.get('/droplets'); - servers = response.data!['droplets'] - .where( - (final server) => server['networks']['v4'].isNotEmpty, - ) - .map( - (final server) => ServerBasicInfo( - id: server['id'], - reverseDns: server['name'], - created: DateTime.now(), - ip: server['networks']['v4'][0], - name: server['name'], - ), - ) - .toList(); + servers = response.data!['droplets'].map( + (final server) { + String ipv4 = '0.0.0.0'; + if (server['networks']['v4'].isNotEmpty) { + for (final v4 in server['networks']['v4']) { + if (v4['type'].toString() == 'public') { + ipv4 = v4['ip_address'].toString(); + } + } + } + + return ServerBasicInfo( + id: server['id'], + reverseDns: server['name'], + created: DateTime.now(), + ip: ipv4, + name: server['name'], + ); + }, + ).toList(); } catch (e) { print(e); } finally { @@ -523,14 +561,16 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/regions', ); - locations = response.data!['regions'].map( - (final location) => ServerProviderLocation( - title: location['slug'], - description: location['name'], - flag: getEmojiFlag(location['slug']), - identifier: location['slug'], - ), - ); + locations = response.data!['regions'] + .map( + (final location) => ServerProviderLocation( + title: location['slug'], + description: location['name'], + flag: getEmojiFlag(location['slug']), + identifier: location['slug'], + ), + ) + .toList(); } catch (e) { print(e); } finally { @@ -559,7 +599,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ServerType( title: rawSize['description'], identifier: rawSize['slug'], - ram: rawSize['memory'], + ram: rawSize['memory'].toDouble(), cores: rawSize['vcpus'], disk: DiskSize(byte: rawSize['disk'] * 1024 * 1024 * 1024), price: Price( diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 70094eb6..7a26de87 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -608,36 +608,36 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final List types = []; final Dio client = await getClient(); - //try { - final Response response = await client.get( - '/server_types', - ); - final rawTypes = response.data!['server_types']; - for (final rawType in rawTypes) { - for (final rawPrice in rawType['prices']) { - if (rawPrice['location'].toString() == location.identifier) { - types.add( - ServerType( - title: rawType['description'], - identifier: rawType['name'], - ram: rawType['memory'], - cores: rawType['cores'], - disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), - price: Price( - value: double.parse(rawPrice['price_monthly']['gross']), - currency: 'EUR', + try { + final Response response = await client.get( + '/server_types', + ); + final rawTypes = response.data!['server_types']; + for (final rawType in rawTypes) { + for (final rawPrice in rawType['prices']) { + if (rawPrice['location'].toString() == location.identifier) { + types.add( + ServerType( + title: rawType['description'], + identifier: rawType['name'], + ram: rawType['memory'], + cores: rawType['cores'], + disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), + price: Price( + value: double.parse(rawPrice['price_monthly']['gross']), + currency: 'EUR', + ), + location: location, ), - location: location, - ), - ); + ); + } } } + } catch (e) { + print(e); + } finally { + close(client); } - //} catch (e) { - //print(e); - //} finally { - close(client); - //} return types; } diff --git a/lib/utils/password_generator.dart b/lib/utils/password_generator.dart index 5acf3888..c8a6cdf0 100644 --- a/lib/utils/password_generator.dart +++ b/lib/utils/password_generator.dart @@ -104,7 +104,7 @@ class StringGenerators { static StringGeneratorFunction dbStorageName = () => getRandomString( 6, hasLowercaseLetters: true, - hasUppercaseLetters: true, + hasUppercaseLetters: false, hasNumbers: true, ); From 68811efc1e53630db014bbe2a079991ee36b8339 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 28 Oct 2022 12:17:08 +0400 Subject: [PATCH 250/732] refactor(server-api): Generalize and unify api response objects - Separate response success from business logic operation success - Remove ApiResponse, replace with GenericResult - Make GenericMutationResult inherit GenericResult - Add generic error message for when a response couldn't be sent or received --- assets/translations/en.json | 3 +- assets/translations/ru.json | 3 +- .../graphql_maps/server_api/jobs_api.dart | 6 +- .../graphql_maps/server_api/server.dart | 107 ++++++++---------- .../graphql_maps/server_api/services_api.dart | 44 ++++--- .../graphql_maps/server_api/users_api.dart | 59 +++++----- .../graphql_maps/server_api/volume_api.dart | 24 ++-- lib/logic/cubit/devices/devices_cubit.dart | 6 +- .../recovery_key/recovery_key_cubit.dart | 4 +- .../server_installation_repository.dart | 26 ++--- .../cubit/server_jobs/server_jobs_cubit.dart | 14 ++- lib/logic/cubit/services/services_cubit.dart | 14 ++- lib/logic/cubit/users/users_cubit.dart | 35 +++--- 13 files changed, 182 insertions(+), 163 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index c74e33e8..ddb5c541 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -419,7 +419,8 @@ "create_ssh_key": "Create SSH key for {}", "delete_ssh_key": "Delete SSH key for {}", "server_jobs": "Jobs on the server", - "reset_user_password": "Reset password of user" + "reset_user_password": "Reset password of user", + "generic_error": "Couldn't connect to the server!" }, "validations": { "required": "Required", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 704e5991..d2e298c2 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -420,7 +420,8 @@ "create_ssh_key": "Создать SSH ключ для {}", "delete_ssh_key": "Удалить SSH ключ для {}", "server_jobs": "Задачи на сервере", - "reset_user_password": "Сбросить пароль пользователя" + "reset_user_password": "Сбросить пароль пользователя", + "generic_error": "Не удалось подключиться к серверу!" }, "validations": { "required": "Обязательное поле", diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart index 8d731e3e..67e8bcb3 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -22,20 +22,22 @@ mixin JobsApi on ApiMap { return jobsList; } - Future removeApiJob(final String uid) async { + Future> removeApiJob(final String uid) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$RemoveJob(jobId: uid); final mutation = Options$Mutation$RemoveJob(variables: variables); final response = await client.mutate$RemoveJob(mutation); return GenericMutationResult( - success: response.parsedData?.removeJob.success ?? false, + data: response.parsedData?.removeJob.success ?? false, + success: true, code: response.parsedData?.removeJob.code ?? 0, message: response.parsedData?.removeJob.message, ); } catch (e) { print(e); return GenericMutationResult( + data: false, success: false, code: 0, message: e.toString(), diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 31ee89fe..82aa24be 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -26,39 +26,28 @@ part 'services_api.dart'; part 'users_api.dart'; part 'volume_api.dart'; -class GenericMutationResult { - GenericMutationResult({ - required this.success, - required this.code, - this.message, - }); - final bool success; - final int code; - final String? message; -} - -class GenericJobMutationReturn extends GenericMutationResult { - GenericJobMutationReturn({ - required super.success, - required super.code, - super.message, - this.job, - }); - final ServerJob? job; -} - -@Deprecated( - 'Extend GenericMutationResult for mutations, return data for queries', -) -class ApiResponse { - ApiResponse({ +class GenericResult { + GenericResult({ required this.success, required this.data, this.message, }); + + /// Whether was a response successfully received, + /// doesn't represent success of the request if `data` is `bool` final bool success; final String? message; - final D data; + final T data; +} + +class GenericMutationResult extends GenericResult { + GenericMutationResult({ + required super.success, + required this.code, + required super.data, + super.message, + }); + final int code; } class ServerApi extends ApiMap @@ -196,7 +185,7 @@ class ServerApi extends ApiMap return settings; } - Future> getRecoveryTokenStatus() async { + Future> getRecoveryTokenStatus() async { RecoveryKeyStatus? key; QueryResult response; String? error; @@ -213,18 +202,18 @@ class ServerApi extends ApiMap print(e); } - return ApiResponse( + return GenericResult( success: error == null, data: key, message: error, ); } - Future> generateRecoveryToken( + Future> generateRecoveryToken( final DateTime? expirationDate, final int? numberOfUses, ) async { - ApiResponse key; + GenericResult key; QueryResult response; try { @@ -245,19 +234,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - key = ApiResponse( + key = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - key = ApiResponse( + key = GenericResult( success: true, data: response.parsedData!.getNewRecoveryApiKey.key!, ); } catch (e) { print(e); - key = ApiResponse( + key = GenericResult( success: false, data: '', message: e.toString(), @@ -297,8 +286,8 @@ class ServerApi extends ApiMap return dkim; } - Future>> getApiTokens() async { - ApiResponse> tokens; + Future>> getApiTokens() async { + GenericResult> tokens; QueryResult response; try { @@ -307,7 +296,7 @@ class ServerApi extends ApiMap if (response.hasException) { final message = response.exception.toString(); print(message); - tokens = ApiResponse>( + tokens = GenericResult>( success: false, data: [], message: message, @@ -321,13 +310,13 @@ class ServerApi extends ApiMap ApiToken.fromGraphQL(device), ) .toList(); - tokens = ApiResponse>( + tokens = GenericResult>( success: true, data: parsed, ); } catch (e) { print(e); - tokens = ApiResponse>( + tokens = GenericResult>( success: false, data: [], message: e.toString(), @@ -337,8 +326,8 @@ class ServerApi extends ApiMap return tokens; } - Future> deleteApiToken(final String name) async { - ApiResponse returnable; + Future> deleteApiToken(final String name) async { + GenericResult returnable; QueryResult response; try { @@ -355,19 +344,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - returnable = ApiResponse( + returnable = GenericResult( success: false, data: null, message: response.exception.toString(), ); } - returnable = ApiResponse( + returnable = GenericResult( success: true, data: null, ); } catch (e) { print(e); - returnable = ApiResponse( + returnable = GenericResult( success: false, data: null, message: e.toString(), @@ -377,8 +366,8 @@ class ServerApi extends ApiMap return returnable; } - Future> createDeviceToken() async { - ApiResponse token; + Future> createDeviceToken() async { + GenericResult token; QueryResult response; try { @@ -390,19 +379,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = ApiResponse( + token = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = ApiResponse( + token = GenericResult( success: true, data: response.parsedData!.getNewDeviceApiKey.key!, ); } catch (e) { print(e); - token = ApiResponse( + token = GenericResult( success: false, data: '', message: e.toString(), @@ -414,10 +403,10 @@ class ServerApi extends ApiMap Future isHttpServerWorking() async => (await getApiVersion()) != null; - Future> authorizeDevice( + Future> authorizeDevice( final DeviceToken deviceToken, ) async { - ApiResponse token; + GenericResult token; QueryResult response; try { @@ -439,19 +428,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = ApiResponse( + token = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = ApiResponse( + token = GenericResult( success: true, data: response.parsedData!.authorizeWithNewDeviceApiKey.token!, ); } catch (e) { print(e); - token = ApiResponse( + token = GenericResult( success: false, data: '', message: e.toString(), @@ -461,10 +450,10 @@ class ServerApi extends ApiMap return token; } - Future> useRecoveryToken( + Future> useRecoveryToken( final DeviceToken deviceToken, ) async { - ApiResponse token; + GenericResult token; QueryResult response; try { @@ -486,19 +475,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = ApiResponse( + token = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = ApiResponse( + token = GenericResult( success: true, data: response.parsedData!.useRecoveryApiKey.token!, ); } catch (e) { print(e); - token = ApiResponse( + token = GenericResult( success: false, data: '', message: e.toString(), diff --git a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart index 62a55e15..2ef0e2ca 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart @@ -20,20 +20,24 @@ mixin ServicesApi on ApiMap { return services; } - Future enableService(final String serviceId) async { + Future> enableService( + final String serviceId, + ) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$EnableService(serviceId: serviceId); final mutation = Options$Mutation$EnableService(variables: variables); final response = await client.mutate$EnableService(mutation); return GenericMutationResult( - success: response.parsedData?.enableService.success ?? false, + data: response.parsedData?.enableService.success ?? false, + success: true, code: response.parsedData?.enableService.code ?? 0, message: response.parsedData?.enableService.message, ); } catch (e) { print(e); return GenericMutationResult( + data: false, success: false, code: 0, message: e.toString(), @@ -41,13 +45,16 @@ mixin ServicesApi on ApiMap { } } - Future disableService(final String serviceId) async { + Future> disableService( + final String serviceId, + ) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$DisableService(serviceId: serviceId); final mutation = Options$Mutation$DisableService(variables: variables); final response = await client.mutate$DisableService(mutation); return GenericMutationResult( + data: null, success: response.parsedData?.disableService.success ?? false, code: response.parsedData?.disableService.code ?? 0, message: response.parsedData?.disableService.message, @@ -55,6 +62,7 @@ mixin ServicesApi on ApiMap { } catch (e) { print(e); return GenericMutationResult( + data: null, success: false, code: 0, message: e.toString(), @@ -62,20 +70,24 @@ mixin ServicesApi on ApiMap { } } - Future stopService(final String serviceId) async { + Future> stopService( + final String serviceId, + ) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$StopService(serviceId: serviceId); final mutation = Options$Mutation$StopService(variables: variables); final response = await client.mutate$StopService(mutation); return GenericMutationResult( - success: response.parsedData?.stopService.success ?? false, + data: response.parsedData?.stopService.success ?? false, + success: true, code: response.parsedData?.stopService.code ?? 0, message: response.parsedData?.stopService.message, ); } catch (e) { print(e); return GenericMutationResult( + data: false, success: false, code: 0, message: e.toString(), @@ -90,6 +102,7 @@ mixin ServicesApi on ApiMap { final mutation = Options$Mutation$StartService(variables: variables); final response = await client.mutate$StartService(mutation); return GenericMutationResult( + data: null, success: response.parsedData?.startService.success ?? false, code: response.parsedData?.startService.code ?? 0, message: response.parsedData?.startService.message, @@ -97,6 +110,7 @@ mixin ServicesApi on ApiMap { } catch (e) { print(e); return GenericMutationResult( + data: null, success: false, code: 0, message: e.toString(), @@ -104,20 +118,24 @@ mixin ServicesApi on ApiMap { } } - Future restartService(final String serviceId) async { + Future> restartService( + final String serviceId, + ) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$RestartService(serviceId: serviceId); final mutation = Options$Mutation$RestartService(variables: variables); final response = await client.mutate$RestartService(mutation); return GenericMutationResult( - success: response.parsedData?.restartService.success ?? false, + data: response.parsedData?.restartService.success ?? false, + success: true, code: response.parsedData?.restartService.code ?? 0, message: response.parsedData?.restartService.message, ); } catch (e) { print(e); return GenericMutationResult( + data: false, success: false, code: 0, message: e.toString(), @@ -125,7 +143,7 @@ mixin ServicesApi on ApiMap { } } - Future moveService( + Future> moveService( final String serviceId, final String destination, ) async { @@ -140,19 +158,19 @@ mixin ServicesApi on ApiMap { final mutation = Options$Mutation$MoveService(variables: variables); final response = await client.mutate$MoveService(mutation); final jobJson = response.parsedData?.moveService.job?.toJson(); - return GenericJobMutationReturn( - success: response.parsedData?.moveService.success ?? false, + return GenericMutationResult( + success: true, code: response.parsedData?.moveService.code ?? 0, message: response.parsedData?.moveService.message, - job: jobJson != null ? ServerJob.fromJson(jobJson) : null, + data: jobJson != null ? ServerJob.fromJson(jobJson) : null, ); } catch (e) { print(e); - return GenericJobMutationReturn( + return GenericMutationResult( success: false, code: 0, message: e.toString(), - job: null, + data: null, ); } } diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index 07da1083..bb46bfef 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -1,16 +1,5 @@ part of 'server.dart'; -class UserMutationResult extends GenericMutationResult { - UserMutationResult({ - required super.success, - required super.code, - super.message, - this.user, - }); - - final User? user; -} - mixin UsersApi on ApiMap { Future> getAllUsers() async { QueryResult response; @@ -56,7 +45,7 @@ mixin UsersApi on ApiMap { return user; } - Future createUser( + Future> createUser( final String username, final String password, ) async { @@ -67,25 +56,26 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$CreateUser(variables: variables); final response = await client.mutate$CreateUser(mutation); - return UserMutationResult( - success: response.parsedData?.createUser.success ?? false, + return GenericMutationResult( + success: true, code: response.parsedData?.createUser.code ?? 500, message: response.parsedData?.createUser.message, - user: response.parsedData?.createUser.user != null + data: response.parsedData?.createUser.user != null ? User.fromGraphQL(response.parsedData!.createUser.user!) : null, ); } catch (e) { print(e); - return UserMutationResult( + return GenericMutationResult( success: false, code: 0, message: e.toString(), + data: null, ); } } - Future deleteUser( + Future> deleteUser( final String username, ) async { try { @@ -94,13 +84,15 @@ mixin UsersApi on ApiMap { final mutation = Options$Mutation$DeleteUser(variables: variables); final response = await client.mutate$DeleteUser(mutation); return GenericMutationResult( - success: response.parsedData?.deleteUser.success ?? false, + data: response.parsedData?.deleteUser.success ?? false, + success: true, code: response.parsedData?.deleteUser.code ?? 500, message: response.parsedData?.deleteUser.message, ); } catch (e) { print(e); return GenericMutationResult( + data: false, success: false, code: 500, message: e.toString(), @@ -108,7 +100,7 @@ mixin UsersApi on ApiMap { } } - Future updateUser( + Future> updateUser( final String username, final String password, ) async { @@ -119,17 +111,18 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$UpdateUser(variables: variables); final response = await client.mutate$UpdateUser(mutation); - return UserMutationResult( - success: response.parsedData?.updateUser.success ?? false, + return GenericMutationResult( + success: true, code: response.parsedData?.updateUser.code ?? 500, message: response.parsedData?.updateUser.message, - user: response.parsedData?.updateUser.user != null + data: response.parsedData?.updateUser.user != null ? User.fromGraphQL(response.parsedData!.updateUser.user!) : null, ); } catch (e) { print(e); - return UserMutationResult( + return GenericMutationResult( + data: null, success: false, code: 0, message: e.toString(), @@ -137,7 +130,7 @@ mixin UsersApi on ApiMap { } } - Future addSshKey( + Future> addSshKey( final String username, final String sshKey, ) async { @@ -151,17 +144,18 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$AddSshKey(variables: variables); final response = await client.mutate$AddSshKey(mutation); - return UserMutationResult( - success: response.parsedData?.addSshKey.success ?? false, + return GenericMutationResult( + success: true, code: response.parsedData?.addSshKey.code ?? 500, message: response.parsedData?.addSshKey.message, - user: response.parsedData?.addSshKey.user != null + data: response.parsedData?.addSshKey.user != null ? User.fromGraphQL(response.parsedData!.addSshKey.user!) : null, ); } catch (e) { print(e); - return UserMutationResult( + return GenericMutationResult( + data: null, success: false, code: 0, message: e.toString(), @@ -169,7 +163,7 @@ mixin UsersApi on ApiMap { } } - Future removeSshKey( + Future> removeSshKey( final String username, final String sshKey, ) async { @@ -183,17 +177,18 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$RemoveSshKey(variables: variables); final response = await client.mutate$RemoveSshKey(mutation); - return UserMutationResult( + return GenericMutationResult( success: response.parsedData?.removeSshKey.success ?? false, code: response.parsedData?.removeSshKey.code ?? 500, message: response.parsedData?.removeSshKey.message, - user: response.parsedData?.removeSshKey.user != null + data: response.parsedData?.removeSshKey.user != null ? User.fromGraphQL(response.parsedData!.removeSshKey.user!) : null, ); } catch (e) { print(e); - return UserMutationResult( + return GenericMutationResult( + data: null, success: false, code: 0, message: e.toString(), diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index 160a78ca..70119f28 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -1,15 +1,5 @@ part of 'server.dart'; -class MigrateToBindsMutationReturn extends GenericMutationResult { - MigrateToBindsMutationReturn({ - required super.success, - required super.code, - super.message, - this.jobUid, - }); - final String? jobUid; -} - mixin VolumeApi on ApiMap { Future> getServerDiskVolumes() async { QueryResult response; @@ -67,10 +57,10 @@ mixin VolumeApi on ApiMap { } } - Future migrateToBinds( + Future> migrateToBinds( final Map serviceToDisk, ) async { - MigrateToBindsMutationReturn? mutation; + GenericMutationResult? mutation; try { final GraphQLClient client = await getClient(); @@ -88,19 +78,19 @@ mixin VolumeApi on ApiMap { await client.mutate$MigrateToBinds( migrateMutation, ); - mutation = mutation = MigrateToBindsMutationReturn( - success: result.parsedData!.migrateToBinds.success, + mutation = mutation = GenericMutationResult( + success: true, code: result.parsedData!.migrateToBinds.code, message: result.parsedData!.migrateToBinds.message, - jobUid: result.parsedData!.migrateToBinds.job?.uid, + data: result.parsedData!.migrateToBinds.job?.uid, ); } catch (e) { print(e); - mutation = MigrateToBindsMutationReturn( + mutation = GenericMutationResult( success: false, code: 0, message: e.toString(), - jobUid: null, + data: null, ); } diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index 3c552c23..065113f1 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -35,7 +35,7 @@ class ApiDevicesCubit } Future?> _getApiTokens() async { - final ApiResponse> response = await api.getApiTokens(); + final GenericResult> response = await api.getApiTokens(); if (response.success) { return response.data; } else { @@ -44,7 +44,7 @@ class ApiDevicesCubit } Future deleteDevice(final ApiToken device) async { - final ApiResponse response = await api.deleteApiToken(device.name); + final GenericResult response = await api.deleteApiToken(device.name); if (response.success) { emit( ApiDevicesState( @@ -59,7 +59,7 @@ class ApiDevicesCubit } Future getNewDeviceKey() async { - final ApiResponse response = await api.createDeviceToken(); + final GenericResult response = await api.createDeviceToken(); if (response.success) { return response.data; } else { diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index 90f5330d..875d419a 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -32,7 +32,7 @@ class RecoveryKeyCubit } Future _getRecoveryKeyStatus() async { - final ApiResponse response = + final GenericResult response = await api.getRecoveryTokenStatus(); if (response.success) { return response.data; @@ -57,7 +57,7 @@ class RecoveryKeyCubit final DateTime? expirationDate, final int? numberOfUses, }) async { - final ApiResponse response = + final GenericResult response = await api.generateRecoveryToken(expirationDate, numberOfUses); if (response.success) { refresh(); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index e8a69988..4bd500fd 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -494,13 +494,13 @@ class ServerInstallationRepository { overrideDomain: serverDomain.domainName, ); final String serverIp = await getServerIpFromDomain(serverDomain); - final ApiResponse apiResponse = await serverApi.authorizeDevice( + final GenericResult result = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: newDeviceKey), ); - if (apiResponse.success) { + if (result.success) { return ServerHostingDetails( - apiToken: apiResponse.data, + apiToken: result.data, volume: ServerVolume( id: 0, name: '', @@ -517,7 +517,7 @@ class ServerInstallationRepository { } throw ServerAuthorizationException( - apiResponse.message ?? apiResponse.data, + result.message ?? result.data, ); } @@ -531,13 +531,13 @@ class ServerInstallationRepository { overrideDomain: serverDomain.domainName, ); final String serverIp = await getServerIpFromDomain(serverDomain); - final ApiResponse apiResponse = await serverApi.useRecoveryToken( + final GenericResult result = await serverApi.useRecoveryToken( DeviceToken(device: await getDeviceName(), token: recoveryKey), ); - if (apiResponse.success) { + if (result.success) { return ServerHostingDetails( - apiToken: apiResponse.data, + apiToken: result.data, volume: ServerVolume( id: 0, name: '', @@ -554,7 +554,7 @@ class ServerInstallationRepository { } throw ServerAuthorizationException( - apiResponse.message ?? apiResponse.data, + result.message ?? result.data, ); } @@ -592,15 +592,15 @@ class ServerInstallationRepository { ); } } - final ApiResponse deviceAuthKey = + final GenericResult deviceAuthKey = await serverApi.createDeviceToken(); - final ApiResponse apiResponse = await serverApi.authorizeDevice( + final GenericResult result = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), ); - if (apiResponse.success) { + if (result.success) { return ServerHostingDetails( - apiToken: apiResponse.data, + apiToken: result.data, volume: ServerVolume( id: 0, name: '', @@ -617,7 +617,7 @@ class ServerInstallationRepository { } throw ServerAuthorizationException( - apiResponse.message ?? apiResponse.data, + result.message ?? result.data, ); } diff --git a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart index 1e808956..fc102115 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; @@ -46,14 +47,14 @@ class ServerJobsCubit Future migrateToBinds(final Map serviceToDisk) async { final result = await api.migrateToBinds(serviceToDisk); - if (!result.success || result.jobUid == null) { + if (result.data == null) { getIt().showSnackBar(result.message!); return; } emit( ServerJobsState( - migrationJobUid: result.jobUid, + migrationJobUid: result.data, ), ); } @@ -75,7 +76,13 @@ class ServerJobsCubit Future removeServerJob(final String uid) async { final result = await api.removeApiJob(uid); if (!result.success) { - getIt().showSnackBar(result.message!); + getIt().showSnackBar('jobs.generic_error'.tr()); + return; + } + + if (!result.data) { + getIt() + .showSnackBar(result.message ?? 'jobs.generic_error'.tr()); return; } @@ -87,7 +94,6 @@ class ServerJobsCubit ], ), ); - print('removed job $uid'); } Future removeAllFinishedJobs() async { diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart index 13d3e84d..f76c15a7 100644 --- a/lib/logic/cubit/services/services_cubit.dart +++ b/lib/logic/cubit/services/services_cubit.dart @@ -1,5 +1,7 @@ import 'dart:async'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; @@ -39,7 +41,17 @@ class ServicesCubit extends ServerInstallationDependendCubit { Future restart(final String serviceId) async { emit(state.copyWith(lockedServices: [...state.lockedServices, serviceId])); - await api.restartService(serviceId); + final result = await api.restartService(serviceId); + if (!result.success) { + getIt().showSnackBar('jobs.generic_error'.tr()); + return; + } + if (!result.data) { + getIt() + .showSnackBar(result.message ?? 'jobs.generic_error'.tr()); + return; + } + await Future.delayed(const Duration(seconds: 2)); reload(); await Future.delayed(const Duration(seconds: 10)); diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 87abcffd..f31580fb 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -78,17 +78,16 @@ class UsersCubit extends ServerInstallationDependendCubit { return; } // If API returned error, do nothing - final UserMutationResult result = + final GenericMutationResult result = await api.createUser(user.login, password); - final User? createdUser = result.user; - if (!result.success || createdUser == null) { + if (result.data == null) { getIt() .showSnackBar(result.message ?? 'users.could_not_create_user'.tr()); return; } final List loadedUsers = List.from(state.users); - loadedUsers.add(createdUser); + loadedUsers.add(result.data!); await box.clear(); await box.addAll(loadedUsers); emit(state.copyWith(users: loadedUsers)); @@ -103,14 +102,20 @@ class UsersCubit extends ServerInstallationDependendCubit { } final List loadedUsers = List.from(state.users); final GenericMutationResult result = await api.deleteUser(user.login); - if (result.success) { + if (result.success && result.data) { loadedUsers.removeWhere((final User u) => u.login == user.login); await box.clear(); await box.addAll(loadedUsers); emit(state.copyWith(users: loadedUsers)); - } else { + } + + if (!result.success) { + getIt().showSnackBar('jobs.generic_error'.tr()); + } + + if (!result.data) { getIt() - .showSnackBar(result.message ?? 'users.could_not_delete_user'.tr()); + .showSnackBar(result.message ?? 'jobs.generic_error'.tr()); } } @@ -123,9 +128,9 @@ class UsersCubit extends ServerInstallationDependendCubit { .showSnackBar('users.could_not_change_password'.tr()); return; } - final UserMutationResult result = + final GenericMutationResult result = await api.updateUser(user.login, newPassword); - if (!result.success) { + if (result.data == null) { getIt().showSnackBar( result.message ?? 'users.could_not_change_password'.tr(), ); @@ -133,10 +138,10 @@ class UsersCubit extends ServerInstallationDependendCubit { } Future addSshKey(final User user, final String publicKey) async { - final UserMutationResult result = + final GenericMutationResult result = await api.addSshKey(user.login, publicKey); - if (result.success) { - final User updatedUser = result.user!; + if (result.data != null) { + final User updatedUser = result.data!; final int index = state.users.indexWhere((final User u) => u.login == user.login); await box.putAt(index, updatedUser); @@ -152,10 +157,10 @@ class UsersCubit extends ServerInstallationDependendCubit { } Future deleteSshKey(final User user, final String publicKey) async { - final UserMutationResult result = + final GenericMutationResult result = await api.removeSshKey(user.login, publicKey); - if (result.success) { - final User updatedUser = result.user!; + if (result.data != null) { + final User updatedUser = result.data!; final int index = state.users.indexWhere((final User u) => u.login == user.login); await box.putAt(index, updatedUser); From 57d82d0f7abf08232c5466e92a7347f22758d2b9 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 29 Oct 2022 12:03:43 +0400 Subject: [PATCH 251/732] refactor(server-api): Move provider name from hardcode string to a polymorphic variable - Rename 'digital-ocean' to 'digitalocean' --- .../server_providers/digital_ocean/digital_ocean.dart | 7 +++++-- .../rest_maps/server_providers/hetzner/hetzner.dart | 7 +++++-- .../rest_maps/server_providers/server_provider.dart | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index ee574988..37965890 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -46,7 +46,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - String rootAddress = 'https://api.digitalocean.com/v2'; + final String rootAddress = 'https://api.digitalocean.com/v2'; + + @override + final String infectProviderName = 'digitalocean'; @override Future isApiTokenValid(final String token) async { @@ -311,7 +314,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String formattedHostname = getHostnameFromDomain(domainName); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=digital-ocean NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); final Dio client = await getClient(); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 7a26de87..6c67ff3e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -46,7 +46,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - String rootAddress = 'https://api.hetzner.cloud/v1'; + final String rootAddress = 'https://api.hetzner.cloud/v1'; + + @override + final String infectProviderName = 'hetzner'; @override Future isApiTokenValid(final String token) async { @@ -344,7 +347,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; ServerHostingDetails? serverDetails; DioError? hetznerError; diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 7d42c0ab..b04ae1e0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -39,4 +39,6 @@ abstract class ServerProviderApi extends ApiMap { Future isApiTokenValid(final String token); ProviderApiTokenValidation getApiTokenValidation(); + + abstract final String infectProviderName; } From 86b80156fd8085a79532773055985e2110341ec3 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 30 Oct 2022 18:21:38 +0400 Subject: [PATCH 252/732] refactor: Generalize DKIM usage into DnsRecords - Replace raw DKIM String object with a general DnsRecord structure - Implement network utils for common operations with networking concepts and structures - Implement initializing page pop up to re-try server deployment in case of a random networking error --- .../graphql_maps/schema/schema.graphql | 8 + .../graphql_maps/schema/schema.graphql.dart | 216 +++++++++++++++++ .../graphql_maps/schema/schema.graphql.g.dart | 22 ++ .../schema/server_settings.graphql | 6 +- .../schema/server_settings.graphql.dart | 218 ++---------------- .../schema/server_settings.graphql.g.dart | 27 +-- .../graphql_maps/schema/services.graphql | 6 +- .../graphql_maps/schema/services.graphql.dart | 213 ++--------------- .../schema/services.graphql.g.dart | 26 +-- .../graphql_maps/server_api/server.dart | 24 +- .../dns_providers/cloudflare/cloudflare.dart | 13 +- .../rest_maps/dns_providers/dns_provider.dart | 4 +- .../cubit/dns_records/dns_records_cubit.dart | 98 +------- .../cubit/dns_records/dns_records_state.dart | 41 ---- .../server_installation_repository.dart | 10 +- lib/logic/models/json/dns_records.dart | 4 +- lib/logic/models/service.dart | 5 +- lib/ui/pages/dns_details/dns_details.dart | 1 + lib/utils/network_utils.dart | 135 +++++++++++ 19 files changed, 456 insertions(+), 621 deletions(-) create mode 100644 lib/utils/network_utils.dart diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 2f60c969..5da67b2c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -348,4 +348,12 @@ enum UserType { type Users { allUsers: [User!]! getUser(username: String!): User +} + +fragment dnsRecordFields on DnsRecord { + content + name + priority + recordType + ttl } \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index aa2d2c1e..7187e0e2 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1,3 +1,5 @@ +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; part 'schema.graphql.g.dart'; @@ -736,6 +738,220 @@ enum Enum$UserType { $unknown } +@JsonSerializable(explicitToJson: true) +class Fragment$dnsRecordFields { + Fragment$dnsRecordFields( + {required this.content, + required this.name, + this.priority, + required this.recordType, + required this.ttl, + required this.$__typename}); + + @override + factory Fragment$dnsRecordFields.fromJson(Map json) => + _$Fragment$dnsRecordFieldsFromJson(json); + + final String content; + + final String name; + + final int? priority; + + final String recordType; + + final int ttl; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Fragment$dnsRecordFieldsToJson(this); + int get hashCode { + final l$content = content; + final l$name = name; + final l$priority = priority; + final l$recordType = recordType; + final l$ttl = ttl; + final l$$__typename = $__typename; + return Object.hashAll( + [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Fragment$dnsRecordFields) || + runtimeType != other.runtimeType) return false; + final l$content = content; + final lOther$content = other.content; + if (l$content != lOther$content) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$priority = priority; + final lOther$priority = other.priority; + if (l$priority != lOther$priority) return false; + final l$recordType = recordType; + final lOther$recordType = other.recordType; + if (l$recordType != lOther$recordType) return false; + final l$ttl = ttl; + final lOther$ttl = other.ttl; + if (l$ttl != lOther$ttl) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$dnsRecordFields + on Fragment$dnsRecordFields { + CopyWith$Fragment$dnsRecordFields get copyWith => + CopyWith$Fragment$dnsRecordFields(this, (i) => i); +} + +abstract class CopyWith$Fragment$dnsRecordFields { + factory CopyWith$Fragment$dnsRecordFields(Fragment$dnsRecordFields instance, + TRes Function(Fragment$dnsRecordFields) then) = + _CopyWithImpl$Fragment$dnsRecordFields; + + factory CopyWith$Fragment$dnsRecordFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$dnsRecordFields; + + TRes call( + {String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename}); +} + +class _CopyWithImpl$Fragment$dnsRecordFields + implements CopyWith$Fragment$dnsRecordFields { + _CopyWithImpl$Fragment$dnsRecordFields(this._instance, this._then); + + final Fragment$dnsRecordFields _instance; + + final TRes Function(Fragment$dnsRecordFields) _then; + + static const _undefined = {}; + + TRes call( + {Object? content = _undefined, + Object? name = _undefined, + Object? priority = _undefined, + Object? recordType = _undefined, + Object? ttl = _undefined, + Object? $__typename = _undefined}) => + _then(Fragment$dnsRecordFields( + content: content == _undefined || content == null + ? _instance.content + : (content as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + priority: + priority == _undefined ? _instance.priority : (priority as int?), + recordType: recordType == _undefined || recordType == null + ? _instance.recordType + : (recordType as String), + ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Fragment$dnsRecordFields + implements CopyWith$Fragment$dnsRecordFields { + _CopyWithStubImpl$Fragment$dnsRecordFields(this._res); + + TRes _res; + + call( + {String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename}) => + _res; +} + +const fragmentDefinitiondnsRecordFields = FragmentDefinitionNode( + name: NameNode(value: 'dnsRecordFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'DnsRecord'), isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'ttl'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])); +const documentNodeFragmentdnsRecordFields = DocumentNode(definitions: [ + fragmentDefinitiondnsRecordFields, +]); + +extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient { + void writeFragment$dnsRecordFields( + {required Fragment$dnsRecordFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'dnsRecordFields', + document: documentNodeFragmentdnsRecordFields)), + data: data.toJson(), + broadcast: broadcast); + Fragment$dnsRecordFields? readFragment$dnsRecordFields( + {required Map idFields, bool optimistic = true}) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'dnsRecordFields', + document: documentNodeFragmentdnsRecordFields)), + optimistic: optimistic); + return result == null ? null : Fragment$dnsRecordFields.fromJson(result); + } +} + const possibleTypesMap = { 'MutationReturnInterface': { 'ApiKeyMutationReturn', diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart index d3008d30..7d1280c8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart @@ -123,3 +123,25 @@ Map _$Input$UserMutationInputToJson( 'username': instance.username, 'password': instance.password, }; + +Fragment$dnsRecordFields _$Fragment$dnsRecordFieldsFromJson( + Map json) => + Fragment$dnsRecordFields( + content: json['content'] as String, + name: json['name'] as String, + priority: json['priority'] as int?, + recordType: json['recordType'] as String, + ttl: json['ttl'] as int, + $__typename: json['__typename'] as String, + ); + +Map _$Fragment$dnsRecordFieldsToJson( + Fragment$dnsRecordFields instance) => + { + 'content': instance.content, + 'name': instance.name, + 'priority': instance.priority, + 'recordType': instance.recordType, + 'ttl': instance.ttl, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql index d8a1d62d..83e5f06e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql @@ -35,11 +35,7 @@ query DomainInfo { hostname provider requiredDnsRecords { - content - name - priority - recordType - ttl + ...dnsRecordFields } } } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index c0a70151..5d036afa 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1444,36 +1444,9 @@ const documentNodeQueryDomainInfo = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'content'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'priority'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'recordType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'ttl'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + FragmentSpreadNode( + name: NameNode(value: 'dnsRecordFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -1502,6 +1475,7 @@ const documentNodeQueryDomainInfo = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitiondnsRecordFields, ]); Query$DomainInfo _parserFn$Query$DomainInfo(Map data) => Query$DomainInfo.fromJson(data); @@ -1699,8 +1673,7 @@ class Query$DomainInfo$system$domainInfo { @JsonKey(unknownEnumValue: Enum$DnsProvider.$unknown) final Enum$DnsProvider provider; - final List - requiredDnsRecords; + final List requiredDnsRecords; @JsonKey(name: '__typename') final String $__typename; @@ -1775,14 +1748,12 @@ abstract class CopyWith$Query$DomainInfo$system$domainInfo { {String? domain, String? hostname, Enum$DnsProvider? provider, - List? - requiredDnsRecords, + List? requiredDnsRecords, String? $__typename}); TRes requiredDnsRecords( - Iterable Function( + Iterable Function( Iterable< - CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< - Query$DomainInfo$system$domainInfo$requiredDnsRecords>>) + CopyWith$Fragment$dnsRecordFields>) _fn); } @@ -1815,21 +1786,20 @@ class _CopyWithImpl$Query$DomainInfo$system$domainInfo requiredDnsRecords: requiredDnsRecords == _undefined || requiredDnsRecords == null ? _instance.requiredDnsRecords - : (requiredDnsRecords as List< - Query$DomainInfo$system$domainInfo$requiredDnsRecords>), + : (requiredDnsRecords as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); TRes requiredDnsRecords( - Iterable Function( + Iterable Function( Iterable< - CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< - Query$DomainInfo$system$domainInfo$requiredDnsRecords>>) + CopyWith$Fragment$dnsRecordFields< + Fragment$dnsRecordFields>>) _fn) => call( - requiredDnsRecords: _fn(_instance.requiredDnsRecords.map((e) => - CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords( - e, (i) => i))).toList()); + requiredDnsRecords: _fn(_instance.requiredDnsRecords + .map((e) => CopyWith$Fragment$dnsRecordFields(e, (i) => i))) + .toList()); } class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo @@ -1842,168 +1812,12 @@ class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo {String? domain, String? hostname, Enum$DnsProvider? provider, - List? - requiredDnsRecords, + List? requiredDnsRecords, String? $__typename}) => _res; requiredDnsRecords(_fn) => _res; } -@JsonSerializable(explicitToJson: true) -class Query$DomainInfo$system$domainInfo$requiredDnsRecords { - Query$DomainInfo$system$domainInfo$requiredDnsRecords( - {required this.content, - required this.name, - this.priority, - required this.recordType, - required this.ttl, - required this.$__typename}); - - @override - factory Query$DomainInfo$system$domainInfo$requiredDnsRecords.fromJson( - Map json) => - _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsFromJson(json); - - final String content; - - final String name; - - final int? priority; - - final String recordType; - - final int ttl; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsToJson(this); - int get hashCode { - final l$content = content; - final l$name = name; - final l$priority = priority; - final l$recordType = recordType; - final l$ttl = ttl; - final l$$__typename = $__typename; - return Object.hashAll( - [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$DomainInfo$system$domainInfo$requiredDnsRecords) || - runtimeType != other.runtimeType) return false; - final l$content = content; - final lOther$content = other.content; - if (l$content != lOther$content) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - final l$priority = priority; - final lOther$priority = other.priority; - if (l$priority != lOther$priority) return false; - final l$recordType = recordType; - final lOther$recordType = other.recordType; - if (l$recordType != lOther$recordType) return false; - final l$ttl = ttl; - final lOther$ttl = other.ttl; - if (l$ttl != lOther$ttl) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$DomainInfo$system$domainInfo$requiredDnsRecords - on Query$DomainInfo$system$domainInfo$requiredDnsRecords { - CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< - Query$DomainInfo$system$domainInfo$requiredDnsRecords> - get copyWith => - CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords( - this, (i) => i); -} - -abstract class CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords< - TRes> { - factory CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords( - Query$DomainInfo$system$domainInfo$requiredDnsRecords instance, - TRes Function(Query$DomainInfo$system$domainInfo$requiredDnsRecords) - then) = - _CopyWithImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords; - - factory CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords.stub( - TRes res) = - _CopyWithStubImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords; - - TRes call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}); -} - -class _CopyWithImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords - implements - CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords { - _CopyWithImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords( - this._instance, this._then); - - final Query$DomainInfo$system$domainInfo$requiredDnsRecords _instance; - - final TRes Function(Query$DomainInfo$system$domainInfo$requiredDnsRecords) - _then; - - static const _undefined = {}; - - TRes call( - {Object? content = _undefined, - Object? name = _undefined, - Object? priority = _undefined, - Object? recordType = _undefined, - Object? ttl = _undefined, - Object? $__typename = _undefined}) => - _then(Query$DomainInfo$system$domainInfo$requiredDnsRecords( - content: content == _undefined || content == null - ? _instance.content - : (content as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - priority: - priority == _undefined ? _instance.priority : (priority as int?), - recordType: recordType == _undefined || recordType == null - ? _instance.recordType - : (recordType as String), - ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords< - TRes> - implements - CopyWith$Query$DomainInfo$system$domainInfo$requiredDnsRecords { - _CopyWithStubImpl$Query$DomainInfo$system$domainInfo$requiredDnsRecords( - this._res); - - TRes _res; - - call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}) => - _res; -} - @JsonSerializable(explicitToJson: true) class Variables$Mutation$ChangeTimezone { Variables$Mutation$ChangeTimezone({required this.timezone}); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart index fc66954b..c928b177 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart @@ -190,8 +190,7 @@ Query$DomainInfo$system$domainInfo _$Query$DomainInfo$system$domainInfoFromJson( unknownValue: Enum$DnsProvider.$unknown), requiredDnsRecords: (json['requiredDnsRecords'] as List) .map((e) => - Query$DomainInfo$system$domainInfo$requiredDnsRecords.fromJson( - e as Map)) + Fragment$dnsRecordFields.fromJson(e as Map)) .toList(), $__typename: json['__typename'] as String, ); @@ -212,30 +211,6 @@ const _$Enum$DnsProviderEnumMap = { Enum$DnsProvider.$unknown: r'$unknown', }; -Query$DomainInfo$system$domainInfo$requiredDnsRecords - _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsFromJson( - Map json) => - Query$DomainInfo$system$domainInfo$requiredDnsRecords( - content: json['content'] as String, - name: json['name'] as String, - priority: json['priority'] as int?, - recordType: json['recordType'] as String, - ttl: json['ttl'] as int, - $__typename: json['__typename'] as String, - ); - -Map - _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsToJson( - Query$DomainInfo$system$domainInfo$requiredDnsRecords instance) => - { - 'content': instance.content, - 'name': instance.name, - 'priority': instance.priority, - 'recordType': instance.recordType, - 'ttl': instance.ttl, - '__typename': instance.$__typename, - }; - Variables$Mutation$ChangeTimezone _$Variables$Mutation$ChangeTimezoneFromJson( Map json) => Variables$Mutation$ChangeTimezone( diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index ce464426..7386c362 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -10,11 +10,7 @@ query AllServices { description displayName dnsRecords { - content - name - priority - recordType - ttl + ...dnsRecordFields } id isEnabled diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 411186ad..a31058c4 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -312,36 +312,9 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'content'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'priority'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'recordType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'ttl'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + FragmentSpreadNode( + name: NameNode(value: 'dnsRecordFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -456,6 +429,7 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitiondnsRecordFields, ]); Query$AllServices _parserFn$Query$AllServices(Map data) => Query$AllServices.fromJson(data); @@ -679,7 +653,7 @@ class Query$AllServices$services$allServices { final String displayName; - final List? dnsRecords; + final List? dnsRecords; final String id; @@ -807,7 +781,7 @@ abstract class CopyWith$Query$AllServices$services$allServices { TRes call( {String? description, String? displayName, - List? dnsRecords, + List? dnsRecords, String? id, bool? isEnabled, bool? isMovable, @@ -818,10 +792,9 @@ abstract class CopyWith$Query$AllServices$services$allServices { String? url, String? $__typename}); TRes dnsRecords( - Iterable? Function( + Iterable? Function( Iterable< - CopyWith$Query$AllServices$services$allServices$dnsRecords< - Query$AllServices$services$allServices$dnsRecords>>?) + CopyWith$Fragment$dnsRecordFields>?) _fn); CopyWith$Query$AllServices$services$allServices$storageUsage get storageUsage; @@ -860,8 +833,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices : (displayName as String), dnsRecords: dnsRecords == _undefined ? _instance.dnsRecords - : (dnsRecords - as List?), + : (dnsRecords as List?), id: id == _undefined || id == null ? _instance.id : (id as String), isEnabled: isEnabled == _undefined || isEnabled == null ? _instance.isEnabled @@ -887,15 +859,15 @@ class _CopyWithImpl$Query$AllServices$services$allServices ? _instance.$__typename : ($__typename as String))); TRes dnsRecords( - Iterable? Function( + Iterable? Function( Iterable< - CopyWith$Query$AllServices$services$allServices$dnsRecords< - Query$AllServices$services$allServices$dnsRecords>>?) + CopyWith$Fragment$dnsRecordFields< + Fragment$dnsRecordFields>>?) _fn) => call( - dnsRecords: _fn(_instance.dnsRecords?.map((e) => - CopyWith$Query$AllServices$services$allServices$dnsRecords( - e, (i) => i)))?.toList()); + dnsRecords: _fn(_instance.dnsRecords + ?.map((e) => CopyWith$Fragment$dnsRecordFields(e, (i) => i))) + ?.toList()); CopyWith$Query$AllServices$services$allServices$storageUsage get storageUsage { final local$storageUsage = _instance.storageUsage; @@ -913,7 +885,7 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices call( {String? description, String? displayName, - List? dnsRecords, + List? dnsRecords, String? id, bool? isEnabled, bool? isMovable, @@ -931,159 +903,6 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices _res); } -@JsonSerializable(explicitToJson: true) -class Query$AllServices$services$allServices$dnsRecords { - Query$AllServices$services$allServices$dnsRecords( - {required this.content, - required this.name, - this.priority, - required this.recordType, - required this.ttl, - required this.$__typename}); - - @override - factory Query$AllServices$services$allServices$dnsRecords.fromJson( - Map json) => - _$Query$AllServices$services$allServices$dnsRecordsFromJson(json); - - final String content; - - final String name; - - final int? priority; - - final String recordType; - - final int ttl; - - @JsonKey(name: '__typename') - final String $__typename; - - Map toJson() => - _$Query$AllServices$services$allServices$dnsRecordsToJson(this); - int get hashCode { - final l$content = content; - final l$name = name; - final l$priority = priority; - final l$recordType = recordType; - final l$ttl = ttl; - final l$$__typename = $__typename; - return Object.hashAll( - [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllServices$services$allServices$dnsRecords) || - runtimeType != other.runtimeType) return false; - final l$content = content; - final lOther$content = other.content; - if (l$content != lOther$content) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - final l$priority = priority; - final lOther$priority = other.priority; - if (l$priority != lOther$priority) return false; - final l$recordType = recordType; - final lOther$recordType = other.recordType; - if (l$recordType != lOther$recordType) return false; - final l$ttl = ttl; - final lOther$ttl = other.ttl; - if (l$ttl != lOther$ttl) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; - return true; - } -} - -extension UtilityExtension$Query$AllServices$services$allServices$dnsRecords - on Query$AllServices$services$allServices$dnsRecords { - CopyWith$Query$AllServices$services$allServices$dnsRecords< - Query$AllServices$services$allServices$dnsRecords> - get copyWith => - CopyWith$Query$AllServices$services$allServices$dnsRecords( - this, (i) => i); -} - -abstract class CopyWith$Query$AllServices$services$allServices$dnsRecords< - TRes> { - factory CopyWith$Query$AllServices$services$allServices$dnsRecords( - Query$AllServices$services$allServices$dnsRecords instance, - TRes Function(Query$AllServices$services$allServices$dnsRecords) - then) = - _CopyWithImpl$Query$AllServices$services$allServices$dnsRecords; - - factory CopyWith$Query$AllServices$services$allServices$dnsRecords.stub( - TRes res) = - _CopyWithStubImpl$Query$AllServices$services$allServices$dnsRecords; - - TRes call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}); -} - -class _CopyWithImpl$Query$AllServices$services$allServices$dnsRecords - implements - CopyWith$Query$AllServices$services$allServices$dnsRecords { - _CopyWithImpl$Query$AllServices$services$allServices$dnsRecords( - this._instance, this._then); - - final Query$AllServices$services$allServices$dnsRecords _instance; - - final TRes Function(Query$AllServices$services$allServices$dnsRecords) _then; - - static const _undefined = {}; - - TRes call( - {Object? content = _undefined, - Object? name = _undefined, - Object? priority = _undefined, - Object? recordType = _undefined, - Object? ttl = _undefined, - Object? $__typename = _undefined}) => - _then(Query$AllServices$services$allServices$dnsRecords( - content: content == _undefined || content == null - ? _instance.content - : (content as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - priority: - priority == _undefined ? _instance.priority : (priority as int?), - recordType: recordType == _undefined || recordType == null - ? _instance.recordType - : (recordType as String), - ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$AllServices$services$allServices$dnsRecords - implements - CopyWith$Query$AllServices$services$allServices$dnsRecords { - _CopyWithStubImpl$Query$AllServices$services$allServices$dnsRecords( - this._res); - - TRes _res; - - call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}) => - _res; -} - @JsonSerializable(explicitToJson: true) class Query$AllServices$services$allServices$storageUsage { Query$AllServices$services$allServices$storageUsage( diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart index 405ab468..52663401 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart @@ -62,8 +62,7 @@ Query$AllServices$services$allServices displayName: json['displayName'] as String, dnsRecords: (json['dnsRecords'] as List?) ?.map((e) => - Query$AllServices$services$allServices$dnsRecords.fromJson( - e as Map)) + Fragment$dnsRecordFields.fromJson(e as Map)) .toList(), id: json['id'] as String, isEnabled: json['isEnabled'] as bool, @@ -107,29 +106,6 @@ const _$Enum$ServiceStatusEnumEnumMap = { Enum$ServiceStatusEnum.$unknown: r'$unknown', }; -Query$AllServices$services$allServices$dnsRecords - _$Query$AllServices$services$allServices$dnsRecordsFromJson( - Map json) => - Query$AllServices$services$allServices$dnsRecords( - content: json['content'] as String, - name: json['name'] as String, - priority: json['priority'] as int?, - recordType: json['recordType'] as String, - ttl: json['ttl'] as int, - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServices$services$allServices$dnsRecordsToJson( - Query$AllServices$services$allServices$dnsRecords instance) => - { - 'content': instance.content, - 'name': instance.name, - 'priority': instance.priority, - 'recordType': instance.recordType, - 'ttl': instance.ttl, - '__typename': instance.$__typename, - }; - Query$AllServices$services$allServices$storageUsage _$Query$AllServices$services$allServices$storageUsageFromJson( Map json) => diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 82aa24be..c2cda13b 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -13,6 +13,7 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; @@ -256,11 +257,8 @@ class ServerApi extends ApiMap return key; } - @Deprecated( - 'Server now aware of all required DNS records. More general approach has to be implemented', - ) - Future getDkim() async { - String? dkim; + Future> getDnsRecords() async { + List records = []; QueryResult response; try { @@ -269,21 +267,17 @@ class ServerApi extends ApiMap if (response.hasException) { print(response.exception.toString()); } - dkim = response.parsedData!.system.domainInfo.requiredDnsRecords - .firstWhere( - ( - final Query$DomainInfo$system$domainInfo$requiredDnsRecords - dnsRecord, - ) => - dnsRecord.name == 'selector._domainkey' && - dnsRecord.recordType == 'TXT', + records = response.parsedData!.system.domainInfo.requiredDnsRecords + .map( + (final Fragment$dnsRecordFields fragment) => + DnsRecord.fromGraphQL(fragment), ) - .content; + .toList(); } catch (e) { print(e); } - return dkim; + return records; } Future>> getApiTokens() async { diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 3088de67..c79f0987 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -242,25 +242,18 @@ class CloudflareApi extends DnsProviderApi { } @override - Future setDkim( - final String dkimRecordString, + Future setDnsRecord( + final DnsRecord record, final ServerDomain domain, ) async { final String domainZoneId = domain.zoneId; final String url = '$rootAddress/zones/$domainZoneId/dns_records'; - final DnsRecord dkimRecord = DnsRecord( - type: 'TXT', - name: 'selector._domainkey', - content: dkimRecordString, - ttl: 18000, - ); - final Dio client = await getClient(); try { await client.post( url, - data: dkimRecord.toJson(), + data: record.toJson(), ); } catch (e) { print(e); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 6680975e..3ff6222e 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -19,8 +19,8 @@ abstract class DnsProviderApi extends ApiMap { required final ServerDomain domain, final String? ip4, }); - Future setDkim( - final String dkimRecordString, + Future setDnsRecord( + final DnsRecord record, final ServerDomain domain, ); Future getZoneId(final String domain); diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 29d19d81..6159b9be 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -7,6 +7,7 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; part 'dns_records_state.dart'; @@ -30,7 +31,7 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: _getDesiredDnsRecords( + dnsRecords: getDesiredDnsRecords( serverInstallationCubit.state.serverDomain?.domainName, '', '', @@ -46,9 +47,10 @@ class DnsRecordsCubit final List records = await dnsProviderApiFactory! .getDnsProvider() .getDnsRecords(domain: domain); - final String? dkimPublicKey = await api.getDkim(); + final String? dkimPublicKey = + extractDkimRecord(await api.getDnsRecords())?.content; final List desiredRecords = - _getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey); + getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey); final List foundRecords = []; for (final DesiredDnsRecord record in desiredRecords) { if (record.description == 'record.dkim') { @@ -121,7 +123,6 @@ class DnsRecordsCubit emit(state.copyWith(dnsState: DnsRecordsStatus.refreshing)); final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; - final String? dkimPublicKey = await api.getDkim(); final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); await dnsProviderApi.removeSimilarRecords(domain: domain!); @@ -129,88 +130,13 @@ class DnsRecordsCubit domain: domain, ip4: ipAddress, ); - await dnsProviderApi.setDkim(dkimPublicKey ?? '', domain); + + final List records = await api.getDnsRecords(); + final DnsRecord? dkimRecord = extractDkimRecord(records); + if (dkimRecord != null) { + await dnsProviderApi.setDnsRecord(dkimRecord, domain); + } + await load(); } - - List _getDesiredDnsRecords( - final String? domainName, - final String? ipAddress, - final String? dkimPublicKey, - ) { - if (domainName == null || ipAddress == null) { - return []; - } - return [ - DesiredDnsRecord( - name: domainName, - content: ipAddress, - description: 'record.root', - ), - DesiredDnsRecord( - name: 'api.$domainName', - content: ipAddress, - description: 'record.api', - ), - DesiredDnsRecord( - name: 'cloud.$domainName', - content: ipAddress, - description: 'record.cloud', - ), - DesiredDnsRecord( - name: 'git.$domainName', - content: ipAddress, - description: 'record.git', - ), - DesiredDnsRecord( - name: 'meet.$domainName', - content: ipAddress, - description: 'record.meet', - ), - DesiredDnsRecord( - name: 'social.$domainName', - content: ipAddress, - description: 'record.social', - ), - DesiredDnsRecord( - name: 'password.$domainName', - content: ipAddress, - description: 'record.password', - ), - DesiredDnsRecord( - name: 'vpn.$domainName', - content: ipAddress, - description: 'record.vpn', - ), - DesiredDnsRecord( - name: domainName, - content: domainName, - description: 'record.mx', - type: 'MX', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '_dmarc.$domainName', - content: 'v=DMARC1; p=none', - description: 'record.dmarc', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: domainName, - content: 'v=spf1 a mx ip4:$ipAddress -all', - description: 'record.spf', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - if (dkimPublicKey != null) - DesiredDnsRecord( - name: 'selector._domainkey.$domainName', - content: dkimPublicKey, - description: 'record.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - ]; - } } diff --git a/lib/logic/cubit/dns_records/dns_records_state.dart b/lib/logic/cubit/dns_records/dns_records_state.dart index 4b39d014..222dda66 100644 --- a/lib/logic/cubit/dns_records/dns_records_state.dart +++ b/lib/logic/cubit/dns_records/dns_records_state.dart @@ -7,12 +7,6 @@ enum DnsRecordsStatus { error, } -enum DnsRecordsCategory { - services, - email, - other, -} - class DnsRecordsState extends ServerInstallationDependendState { const DnsRecordsState({ this.dnsState = DnsRecordsStatus.uninitialized, @@ -37,38 +31,3 @@ class DnsRecordsState extends ServerInstallationDependendState { dnsRecords: dnsRecords ?? this.dnsRecords, ); } - -class DesiredDnsRecord { - const DesiredDnsRecord({ - required this.name, - required this.content, - this.type = 'A', - this.description = '', - this.category = DnsRecordsCategory.services, - this.isSatisfied = false, - }); - - final String name; - final String type; - final String content; - final String description; - final DnsRecordsCategory category; - final bool isSatisfied; - - DesiredDnsRecord copyWith({ - final String? name, - final String? type, - final String? content, - final String? description, - final DnsRecordsCategory? category, - final bool? isSatisfied, - }) => - DesiredDnsRecord( - name: name ?? this.name, - type: type ?? this.type, - content: content ?? this.content, - description: description ?? this.description, - category: category ?? this.category, - isSatisfied: isSatisfied ?? this.isSatisfied, - ); -} diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 4bd500fd..c4a3e7ff 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -21,10 +21,12 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; class IpNotFoundException implements Exception { IpNotFoundException(this.message); @@ -286,7 +288,7 @@ class ServerInstallationRepository { ], ), ); - } else if (e.response!.data['error']['code'] == 'resource_unavailable') { + } else { final NavigationService nav = getIt.get(); nav.showPopUpDialog( BrandAlert( @@ -390,15 +392,15 @@ class ServerInstallationRepository { dnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); - String dkimRecordString = ''; + late DnsRecord record; try { - dkimRecordString = (await api.getDkim())!; + record = extractDkimRecord(await api.getDnsRecords())!; } catch (e) { print(e); rethrow; } - await dnsProviderApi.setDkim(dkimRecordString, cloudFlareDomain); + await dnsProviderApi.setDnsRecord(record, cloudFlareDomain); } Future isHttpServerWorking() async { diff --git a/lib/logic/models/json/dns_records.dart b/lib/logic/models/json/dns_records.dart index 1bb385b5..c4799876 100644 --- a/lib/logic/models/json/dns_records.dart +++ b/lib/logic/models/json/dns_records.dart @@ -1,5 +1,5 @@ import 'package:json_annotation/json_annotation.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; part 'dns_records.g.dart'; @@ -15,7 +15,7 @@ class DnsRecord { }); DnsRecord.fromGraphQL( - final Query$AllServices$services$allServices$dnsRecords record, + final Fragment$dnsRecordFields record, ) : this( type: record.recordType, name: record.name, diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 79bd8f7e..898d2965 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -23,7 +23,10 @@ class Service { // Decode the base64 encoded svg icon to text. svgIcon: utf8.decode(base64.decode(service.svgIcon)), dnsRecords: service.dnsRecords - ?.map((final record) => DnsRecord.fromGraphQL(record)) + ?.map( + (final Fragment$dnsRecordFields record) => + DnsRecord.fromGraphQL(record), + ) .toList() ?? [], url: service.url, diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 8bf264d6..692921eb 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -6,6 +6,7 @@ import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; class DnsDetailsPage extends StatefulWidget { const DnsDetailsPage({super.key}); diff --git a/lib/utils/network_utils.dart b/lib/utils/network_utils.dart new file mode 100644 index 00000000..8b75728f --- /dev/null +++ b/lib/utils/network_utils.dart @@ -0,0 +1,135 @@ +import 'package:selfprivacy/logic/models/json/dns_records.dart'; + +enum DnsRecordsCategory { + services, + email, + other, +} + +class DesiredDnsRecord { + const DesiredDnsRecord({ + required this.name, + required this.content, + this.type = 'A', + this.description = '', + this.category = DnsRecordsCategory.services, + this.isSatisfied = false, + }); + + final String name; + final String type; + final String content; + final String description; + final DnsRecordsCategory category; + final bool isSatisfied; + + DesiredDnsRecord copyWith({ + final String? name, + final String? type, + final String? content, + final String? description, + final DnsRecordsCategory? category, + final bool? isSatisfied, + }) => + DesiredDnsRecord( + name: name ?? this.name, + type: type ?? this.type, + content: content ?? this.content, + description: description ?? this.description, + category: category ?? this.category, + isSatisfied: isSatisfied ?? this.isSatisfied, + ); +} + +List getDesiredDnsRecords( + final String? domainName, + final String? ipAddress, + final String? dkimPublicKey, +) { + if (domainName == null || ipAddress == null) { + return []; + } + return [ + DesiredDnsRecord( + name: domainName, + content: ipAddress, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ipAddress, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ipAddress, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ipAddress, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ipAddress, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ipAddress, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ipAddress, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ipAddress, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: domainName, + content: domainName, + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: 'v=DMARC1; p=none', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: domainName, + content: 'v=spf1 a mx ip4:$ipAddress -all', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; +} + +DnsRecord? extractDkimRecord(final List records) { + DnsRecord? dkimRecord; + + for (final DnsRecord record in records) { + if (record.type == 'TXT' && record.name == 'selector._domainkey') { + dkimRecord = record; + } + } + + return dkimRecord; +} From dc4ba7bce57e7e39a7ec7ddba06333cd340d12e7 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 2 Nov 2022 18:59:41 +0400 Subject: [PATCH 253/732] fix(digital-ocean): Modify cloud-init, add write_files sections Provide host.nix to infect with 0644 permissions --- .../server_providers/digital_ocean/digital_ocean.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 37965890..1ab8a132 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -313,8 +313,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String formattedHostname = getHostnameFromDomain(domainName); + // TODO: change to 'master' change to 'master' change to 'master' + const String infectBranch = 'digital-ocean'; + final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nwrite_files:\n- path: /etc/nixos/host.nix\n permissions: '0644'\n content: |\n {pkgs, ...}:\n {\n environment.systemPackages = with pkgs; [ vim ];\n }\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName NIXOS_IMPORT=./host.nix NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); final Dio client = await getClient(); From 6d548ce197c8b4b74aa6f44ebc393dae8089a638 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 3 Nov 2022 00:50:36 +0400 Subject: [PATCH 254/732] docs: Add brief list of critical packages for Linux build Since I always forget what implicit dependencies this application has, maybe we need better documentation structure --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index cce3b61f..feb332f2 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,13 @@ Application will do the following things for you: Supported platforms are Android, Linux, and Windows. We are looking forward to support iOS and macOS builds. +For Linux builds, make sure you have these packages installed: +|Arch-based|Debian-based| +|----------|------------| +|pacman -S ninja xdg-user-dirs gnome-keyring unzip xz-utils zip|apt install ninja-build xdg-user-dirs gnome-keyring unzip xz-utils zip| + +Install [Flutter](https://docs.flutter.dev/get-started/install/linux) and [Android SDK tools](https://developer.android.com/studio/command-line/sdkmanager), then try your setup: + ``` flutter pub get From edc171efd7e2f80b806c5e4ab07ef4e596047327 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 4 Nov 2022 15:59:38 +0400 Subject: [PATCH 255/732] fix(digital-ocean): Fix emoji picking for Digital ocean locations --- .../rest_maps/server_providers/digital_ocean/digital_ocean.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 1ab8a132..f607da96 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -523,7 +523,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { String? getEmojiFlag(final String query) { String? emoji; - switch (query.toLowerCase().substring(0, 2)) { + switch (query.toLowerCase().substring(0, 3)) { case 'fra': emoji = '🇩🇪'; break; From aa1c04fdb8235cee00e2993c1efc73b6f7bc159b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 4 Nov 2022 16:05:40 +0400 Subject: [PATCH 256/732] fix(digital-ocean): Fix response code checking on volume actions We can't compare with 'compelted' because Digital Ocean responses with 'in progress' right away or something, so it's better to check if it's just not 'error' --- .../server_providers/digital_ocean/digital_ocean.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index f607da96..989085b2 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -241,8 +241,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'region': region, }, ); - success = - dbPostResponse.data['action']['status'].toString() == 'completed'; + success = dbPostResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { @@ -268,8 +267,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'region': region, }, ); - success = - dbPostResponse.data['action']['status'].toString() == 'completed'; + success = dbPostResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { From 59d186a8afab0a6438f1e9599a59a5ca0b03234d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 4 Nov 2022 16:18:35 +0400 Subject: [PATCH 257/732] fix(volume): Change raw int to DiskSize object in volume endpoints We already have an abstraction for size, there is no need to pass size value as raw numeric variables --- .../server_providers/digital_ocean/digital_ocean.dart | 7 +++++-- .../rest_maps/server_providers/hetzner/hetzner.dart | 7 +++++-- .../rest_maps/server_providers/volume_provider.dart | 3 ++- .../cubit/provider_volumes/provider_volume_cubit.dart | 5 +++-- lib/ui/pages/server_storage/extending_volume.dart | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 989085b2..6bc66b35 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -252,7 +252,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future resizeVolume(final ServerVolume volume, final int sizeGb) async { + Future resizeVolume( + final ServerVolume volume, + final DiskSize size, + ) async { bool success = false; final Response dbPostResponse; @@ -263,7 +266,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { data: { 'type': 'resize', 'volume_name': volume.name, - 'size_gigabytes': sizeGb, + 'size_gigabytes': size.gibibyte, 'region': region, }, ); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 6c67ff3e..13fb2cde 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -281,7 +281,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future resizeVolume(final ServerVolume volume, final int sizeGb) async { + Future resizeVolume( + final ServerVolume volume, + final DiskSize size, + ) async { bool success = false; final Response dbPostResponse; @@ -290,7 +293,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { dbPostResponse = await client.post( '/volumes/$volume.id/actions/resize', data: { - 'size': sizeGb, + 'size': size.gibibyte, }, ); success = dbPostResponse.data['action']['status'].toString() != 'error'; diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart index da196406..d3ae6f2a 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart @@ -1,4 +1,5 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/price.dart'; @@ -7,7 +8,7 @@ mixin VolumeProviderApi on ApiMap { Future> getVolumes({final String? status}); Future attachVolume(final ServerVolume volume, final int serverId); Future detachVolume(final ServerVolume volume); - Future resizeVolume(final ServerVolume volume, final int sizeGb); + Future resizeVolume(final ServerVolume volume, final DiskSize size); Future deleteVolume(final ServerVolume volume); Future getPricePerGb(); } diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 1c9ef2b1..1a8f1c15 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -6,6 +6,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/price.dart'; @@ -76,7 +77,7 @@ class ApiProviderVolumeCubit Future resizeVolume( final DiskVolume volume, - final int newSizeGb, + final DiskSize newSize, final Function() callback, ) async { getIt().showSnackBar( @@ -85,7 +86,7 @@ class ApiProviderVolumeCubit emit(state.copyWith(isResizing: true)); final bool resized = await providerApi!.getVolumeProvider().resizeVolume( volume.providerVolume!, - newSizeGb, + newSize, ); if (!resized) { diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index b2293e11..e16544b5 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -153,7 +153,7 @@ class _ExtendingVolumePageState extends State { : () { context.read().resizeVolume( widget.diskVolumeToResize, - _currentSliderGbValue.round(), + DiskSize.fromGibibyte(_currentSliderGbValue), context.read().reload, ); Navigator.of(context).pushAndRemoveUntil( From 6eb49fa8f1a389c1326e88109e89eabef3e5f942 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 8 Nov 2022 04:25:04 +0300 Subject: [PATCH 258/732] fix(digital-ocean): Change the cloud-config payload Now the server builds! --- .../server_providers/digital_ocean/digital_ocean.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 6bc66b35..db9bcd93 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -315,10 +315,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String formattedHostname = getHostnameFromDomain(domainName); // TODO: change to 'master' change to 'master' change to 'master' - const String infectBranch = 'digital-ocean'; + const String infectBranch = 'providers/digital-ocean'; final String userdataString = - "#cloud-config\nwrite_files:\n- path: /etc/nixos/host.nix\n permissions: '0644'\n content: |\n {pkgs, ...}:\n {\n environment.systemPackages = with pkgs; [ vim ];\n }\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName NIXOS_IMPORT=./host.nix NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); final Dio client = await getClient(); From cdc47ecdb3624769b64ddb5f294f208d3ee39923 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 9 Nov 2022 19:49:37 +0400 Subject: [PATCH 259/732] refactor(ui): Move all pop up dialogs into general utils function To not import get_it everywhere and encapsulate all the related dirt into utils. --- assets/translations/en.json | 3 +- assets/translations/ru.json | 3 +- .../server_installation_repository.dart | 165 +++++++----------- .../components/jobs_content/jobs_content.dart | 28 +-- lib/ui/helpers/modals.dart | 31 ++++ .../pages/backup_details/backup_details.dart | 35 ++-- 6 files changed, 119 insertions(+), 146 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 2958663e..dd6e2ca3 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -31,7 +31,8 @@ "remove": "Remove", "apply": "Apply", "done": "Done", - "continue": "Continue" + "continue": "Continue", + "alert": "Alert" }, "more_page": { "configuration_wizard": "Setup wizard", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 0fe5001b..71f5c0ef 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -31,7 +31,8 @@ "remove": "Удалить", "apply": "Применить", "done": "Готово", - "continue": "Продолжить" + "continue": "Продолжить", + "alert": "Уведомление" }, "more_page": { "configuration_wizard": "Мастер настройки", diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 386bc08c..f736310c 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -27,8 +27,7 @@ import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; -import 'package:selfprivacy/ui/components/action_button/action_button.dart'; -import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/utils/network_utils.dart'; class IpNotFoundException implements Exception { @@ -262,84 +261,62 @@ class ServerInstallationRepository { onSuccess(serverDetails); } on DioError catch (e) { if (e.response!.data['error']['code'] == 'uniqueness_error') { - final NavigationService nav = getIt.get(); - nav.showPopUpDialog( - BrandAlert( - title: 'modals.already_exists'.tr(), - contentText: 'modals.destroy_server'.tr(), - actions: [ - ActionButton( - text: 'basis.delete'.tr(), - isRed: true, - onPressed: () async { - await api.deleteServer( - domainName: domainName, - ); + showPopUpAlert( + alertTitle: 'modals.already_exists'.tr(), + description: 'modals.destroy_server'.tr(), + actionButtonTitle: 'modals.yes'.tr(), + actionButtonOnPressed: () async { + await api.deleteServer( + domainName: domainName, + ); - ServerHostingDetails? serverDetails; - try { - serverDetails = await api.createServer( - dnsApiToken: cloudFlareKey, - rootUser: rootUser, - domainName: domainName, - serverType: getIt().serverType!, - ); - } catch (e) { - print(e); - } + ServerHostingDetails? serverDetails; + try { + serverDetails = await api.createServer( + dnsApiToken: cloudFlareKey, + rootUser: rootUser, + domainName: domainName, + serverType: getIt().serverType!, + ); + } catch (e) { + print(e); + } - if (serverDetails == null) { - print('Server is not initialized!'); - return; - } - await saveServerDetails(serverDetails); - onSuccess(serverDetails); - }, - ), - ActionButton( - text: 'basis.cancel'.tr(), - onPressed: onCancel, - ), - ], - ), + if (serverDetails == null) { + print('Server is not initialized!'); + return; + } + await saveServerDetails(serverDetails); + onSuccess(serverDetails); + }, + cancelButtonOnPressed: onCancel, ); } else { - final NavigationService nav = getIt.get(); - nav.showPopUpDialog( - BrandAlert( - title: 'modals.unexpected_error'.tr(), - contentText: 'modals.try_again'.tr(), - actions: [ - ActionButton( - text: 'modals.yes'.tr(), - isRed: true, - onPressed: () async { - ServerHostingDetails? serverDetails; - try { - serverDetails = await api.createServer( - dnsApiToken: cloudFlareKey, - rootUser: rootUser, - domainName: domainName, - serverType: getIt().serverType!, - ); - } catch (e) { - print(e); - } + showPopUpAlert( + alertTitle: 'modals.unexpected_error'.tr(), + description: 'modals.try_again'.tr(), + actionButtonTitle: 'modals.yes'.tr(), + actionButtonOnPressed: () async { + ServerHostingDetails? serverDetails; + try { + serverDetails = await api.createServer( + dnsApiToken: cloudFlareKey, + rootUser: rootUser, + domainName: domainName, + serverType: getIt().serverType!, + ); + } catch (e) { + print(e); + } - if (serverDetails == null) { - print('Server is not initialized!'); - return; - } - await saveServerDetails(serverDetails); - onSuccess(serverDetails); - }, - ), - ActionButton( - text: 'basis.cancel'.tr(), - onPressed: onCancel, - ), - ], - ), + if (serverDetails == null) { + print('Server is not initialized!'); + return; + } + await saveServerDetails(serverDetails); + onSuccess(serverDetails); + }, + cancelButtonOnPressed: onCancel, ); } } @@ -366,31 +343,19 @@ class ServerInstallationRepository { domain: domain, ); } on DioError catch (e) { - final NavigationService nav = getIt.get(); - nav.showPopUpDialog( - BrandAlert( - title: e.response!.data['errors'][0]['code'] == 1038 - ? 'modals.you_cant_use_this_api'.tr() - : 'domain.error'.tr(), - contentText: 'modals.delete_server_volume'.tr(), - actions: [ - ActionButton( - text: 'basis.delete'.tr(), - isRed: true, - onPressed: () async { - await serverApi.deleteServer( - domainName: domain.domainName, - ); - - onCancel(); - }, - ), - ActionButton( - text: 'basis.cancel'.tr(), - onPressed: onCancel, - ), - ], - ), + showPopUpAlert( + alertTitle: e.response!.data['errors'][0]['code'] == 1038 + ? 'modals.you_cant_use_this_api'.tr() + : 'domain.error'.tr(), + description: 'modals.delete_server_volume'.tr(), + cancelButtonOnPressed: onCancel, + actionButtonTitle: 'basis.delete'.tr(), + actionButtonOnPressed: () async { + await serverApi.deleteServer( + domainName: domain.domainName, + ); + onCancel(); + }, ); return false; } diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index 25fb3612..bafe94a7 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -2,18 +2,16 @@ import 'package:flutter/material.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; -import 'package:selfprivacy/ui/components/action_button/action_button.dart'; -import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; class JobsContent extends StatelessWidget { const JobsContent({super.key}); @@ -47,26 +45,16 @@ class JobsContent extends StatelessWidget { ), const SizedBox(height: 10), BrandButton.text( + title: 'jobs.reboot_server'.tr(), onPressed: () { - final NavigationService nav = getIt(); - nav.showPopUpDialog( - BrandAlert( - title: 'jobs.reboot_server'.tr(), - contentText: 'modals.are_you_sure'.tr(), - actions: [ - ActionButton( - text: 'basis.cancel'.tr(), - ), - ActionButton( - onPressed: () => - {context.read().rebootServer()}, - text: 'modals.reboot'.tr(), - ) - ], - ), + showPopUpAlert( + alertTitle: 'jobs.reboot_server'.tr(), + description: 'modals.are_you_sure'.tr(), + actionButtonTitle: 'modals.reboot'.tr(), + actionButtonOnPressed: () => + {context.read().rebootServer()}, ); }, - title: 'jobs.reboot_server'.tr(), ), ]; } diff --git a/lib/ui/helpers/modals.dart b/lib/ui/helpers/modals.dart index 8867885f..1750c2aa 100644 --- a/lib/ui/helpers/modals.dart +++ b/lib/ui/helpers/modals.dart @@ -1,5 +1,9 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/ui/components/action_button/action_button.dart'; +import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; Future showBrandBottomSheet({ required final BuildContext context, @@ -12,3 +16,30 @@ Future showBrandBottomSheet({ shadow: const BoxShadow(color: Colors.transparent), backgroundColor: Colors.transparent, ); + +void showPopUpAlert({ + required final String description, + required final String actionButtonTitle, + required final void Function() actionButtonOnPressed, + final void Function()? cancelButtonOnPressed, + final String? alertTitle, + final String? cancelButtonTitle, +}) { + getIt.get().showPopUpDialog( + BrandAlert( + title: alertTitle ?? 'basis.alert'.tr(), + contentText: description, + actions: [ + ActionButton( + text: actionButtonTitle, + isRed: true, + onPressed: actionButtonOnPressed, + ), + ActionButton( + text: cancelButtonTitle ?? 'basis.cancel'.tr(), + onPressed: cancelButtonOnPressed, + ), + ], + ), + ); +} diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index e982a3d4..268b0870 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -1,17 +1,15 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/action_button/action_button.dart'; -import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -157,28 +155,17 @@ class _BackupDetailsState extends State onTap: preventActions ? null : () { - final NavigationService nav = - getIt(); - nav.showPopUpDialog( - BrandAlert( - title: 'backup.restoring'.tr(), - contentText: 'backup.restore_alert'.tr( - args: [backup.time.toString()], - ), - actions: [ - ActionButton( - text: 'basis.cancel'.tr(), - ), - ActionButton( - onPressed: () => { - context - .read() - .restoreBackup(backup.id) - }, - text: 'modals.yes'.tr(), - ) - ], + showPopUpAlert( + alertTitle: 'backup.restoring'.tr(), + description: 'backup.restore_alert'.tr( + args: [backup.time.toString()], ), + actionButtonTitle: 'modals.yes'.tr(), + actionButtonOnPressed: () => { + context + .read() + .restoreBackup(backup.id) + }, ); }, title: Text( From b3395915da3672a5639c27e879ba5835f56bf9d2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 10 Nov 2022 21:03:16 +0400 Subject: [PATCH 260/732] fix(digital-ocean): Add correct linuxDevice path to volume objects linuxDevice consists of supposedly hardcoded 'scsi-0DO_Volume_' plus given volume name --- .../server_providers/digital_ocean/digital_ocean.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index db9bcd93..a951daa0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -119,7 +119,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { name: dbName, sizeByte: dbSize, serverId: null, - linuxDevice: null, + linuxDevice: 'scsi-0DO_Volume_$dbName', uuid: dbId, ); } catch (e) { @@ -156,7 +156,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { name: dbName, sizeByte: dbSize, serverId: dbDropletIds.isNotEmpty ? dbDropletIds[0] : null, - linuxDevice: null, + linuxDevice: 'scsi-0DO_Volume_$dbName', uuid: dbId, ); volumes.add(volume); From 10bdd4c80058348af75b4a89addfd32b12325549 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 11 Nov 2022 07:32:01 +0400 Subject: [PATCH 261/732] refactor(server-api): Make general server info polymorphic Removing Hetzner type hardcode from server page and replacing it with generic String-based metadata container --- assets/translations/en.json | 1 + assets/translations/ru.json | 1 + .../digital_ocean/digital_ocean.dart | 65 ++++++++++++++++--- .../server_providers/hetzner/hetzner.dart | 62 ++++++++++++++++-- .../server_providers/server_provider.dart | 2 + .../server_detailed_info_cubit.dart | 4 +- .../server_detailed_info_repository.dart | 40 ++++++++---- .../server_detailed_info_state.dart | 8 +-- lib/logic/models/server_metadata.dart | 21 ++++++ .../server_details/server_details_screen.dart | 1 + lib/ui/pages/server_details/text_details.dart | 51 ++++++--------- 11 files changed, 189 insertions(+), 67 deletions(-) create mode 100644 lib/logic/models/server_metadata.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index dd6e2ca3..4cc240b9 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -110,6 +110,7 @@ "disk": "Disk local", "monthly_cost": "Monthly cost", "location": "Location", + "provider": "Provider", "core_count": { "one": "{} core", "two": "{} cores", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 71f5c0ef..49c08079 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -110,6 +110,7 @@ "disk": "Диск", "monthly_cost": "Ежемесячная стоимость", "location": "Размещение", + "provider": "Провайдер", "core_count": { "one": "{} ядро", "two": "{} ядра", diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index a951daa0..c216d4c5 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -2,18 +2,20 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @@ -313,8 +315,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String formattedHostname = getHostnameFromDomain(domainName); - - // TODO: change to 'master' change to 'master' change to 'master' const String infectBranch = 'providers/digital-ocean'; final String userdataString = @@ -474,14 +474,59 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return metrics; } - Future getInfo() async { - final ServerHostingDetails? hetznerServer = - getIt().serverDetails; - final Dio client = await getClient(); - final Response response = await client.get('/servers/${hetznerServer!.id}'); - close(client); + @override + Future> getMetadata(final int serverId) async { + List metadata = []; - return HetznerServerInfo.fromJson(response.data!['server']); + final Dio client = await getClient(); + try { + final Response response = await client.get('/droplets/$serverId'); + final droplet = response.data!['droplet']; + metadata = [ + ServerMetadataEntity( + type: MetadataType.id, + name: 'server.server_id'.tr(), + value: droplet['id'].toString(), + ), + ServerMetadataEntity( + type: MetadataType.status, + name: 'server.status'.tr(), + value: droplet['status'].toString().capitalize(), + ), + ServerMetadataEntity( + type: MetadataType.cpu, + name: 'server.cpu'.tr(), + value: 'server.core_count'.plural(droplet['vcpus']), + ), + ServerMetadataEntity( + type: MetadataType.ram, + name: 'server.ram'.tr(), + value: "${droplet['memory'].toString()} MB", + ), + ServerMetadataEntity( + type: MetadataType.cost, + name: 'server.monthly_cost'.tr(), + value: droplet['size']['price_monthly'].toString(), + ), + ServerMetadataEntity( + type: MetadataType.location, + name: 'server.location'.tr(), + value: + '${droplet['region']['name']} ${getEmojiFlag(droplet['region']['slug'].toString()) ?? ''}', + ), + ServerMetadataEntity( + type: MetadataType.other, + name: 'server.provider'.tr(), + value: 'Digital Ocean', + ), + ]; + } catch (e) { + print(e); + } finally { + close(client); + } + + return metadata; } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 13fb2cde..922c309c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; @@ -12,8 +13,10 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { @@ -513,14 +516,59 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return metrics; } - Future getInfo() async { - final ServerHostingDetails? hetznerServer = - getIt().serverDetails; - final Dio client = await getClient(); - final Response response = await client.get('/servers/${hetznerServer!.id}'); - close(client); + @override + Future> getMetadata(final int serverId) async { + List metadata = []; - return HetznerServerInfo.fromJson(response.data!['server']); + final Dio client = await getClient(); + try { + final Response response = await client.get('/servers/$serverId'); + final hetznerInfo = HetznerServerInfo.fromJson(response.data!['server']); + metadata = [ + ServerMetadataEntity( + type: MetadataType.id, + name: 'server.server_id'.tr(), + value: hetznerInfo.id.toString(), + ), + ServerMetadataEntity( + type: MetadataType.status, + name: 'server.status'.tr(), + value: hetznerInfo.status.toString().split('.')[1].capitalize(), + ), + ServerMetadataEntity( + type: MetadataType.cpu, + name: 'server.cpu'.tr(), + value: 'server.core_count'.plural(hetznerInfo.serverType.cores), + ), + ServerMetadataEntity( + type: MetadataType.ram, + name: 'server.ram'.tr(), + value: '${hetznerInfo.serverType.memory.toString()} GB', + ), + ServerMetadataEntity( + type: MetadataType.cost, + name: 'server.monthly_cost'.tr(), + value: hetznerInfo.serverType.prices[1].monthly.toStringAsFixed(2), + ), + ServerMetadataEntity( + type: MetadataType.location, + name: 'server.location'.tr(), + value: + '${hetznerInfo.location.city}, ${hetznerInfo.location.country}', + ), + ServerMetadataEntity( + type: MetadataType.other, + name: 'server.provider'.tr(), + value: 'Hetzner', + ), + ]; + } catch (e) { + print(e); + } finally { + close(client); + } + + return metadata; } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index b04ae1e0..9e0b57bf 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -3,6 +3,7 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -39,6 +40,7 @@ abstract class ServerProviderApi extends ApiMap { Future isApiTokenValid(final String token); ProviderApiTokenValidation getApiTokenValidation(); + Future> getMetadata(final int serverId); abstract final String infectProviderName; } diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart index a3af96e8..b6a39733 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart @@ -2,7 +2,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_repository.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; part 'server_detailed_info_state.dart'; @@ -22,7 +22,7 @@ class ServerDetailsCubit final ServerDetailsRepositoryDto data = await repository.load(); emit( Loaded( - serverInfo: data.hetznerServerInfo, + metadata: data.metadata, autoUpgradeSettings: data.autoUpgradeSettings, serverTimezone: data.serverTimezone, checkTime: DateTime.now(), diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index bfa3991f..fcc0c5d8 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,22 +1,42 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ServerDetailsRepository { - HetznerApi hetzner = HetznerApi( - /// TODO: Hetzner hardcode (???) - region: getIt().serverLocation, - ); ServerApi server = ServerApi(); + ServerProviderApiFactory? serverProviderApiFactory; + + void _buildServerProviderFactory() { + final ServerProvider? providerType = getIt().serverProvider; + final String? location = getIt().serverLocation; + serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( + ServerProviderApiFactorySettings( + provider: providerType ?? ServerProvider.unknown, + location: location, + ), + ); + } Future load() async { + if (serverProviderApiFactory == null) { + _buildServerProviderFactory(); + } + final settings = await server.getSystemSettings(); + final serverId = getIt().serverDetails!.id; + final metadata = await serverProviderApiFactory! + .getServerProvider() + .getMetadata(serverId); + return ServerDetailsRepositoryDto( autoUpgradeSettings: settings.autoUpgradeSettings, - hetznerServerInfo: await hetzner.getInfo(), + metadata: metadata, serverTimezone: TimeZoneSettings.fromString( settings.timezone, ), @@ -40,13 +60,11 @@ class ServerDetailsRepository { class ServerDetailsRepositoryDto { ServerDetailsRepositoryDto({ - required this.hetznerServerInfo, + required this.metadata, required this.serverTimezone, required this.autoUpgradeSettings, }); - final HetznerServerInfo hetznerServerInfo; - + final List metadata; final TimeZoneSettings serverTimezone; - final AutoUpgradeSettings autoUpgradeSettings; } diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart index ea5f4864..64f4d91d 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_state.dart @@ -17,21 +17,19 @@ class Loading extends ServerDetailsState {} class Loaded extends ServerDetailsState { const Loaded({ - required this.serverInfo, + required this.metadata, required this.serverTimezone, required this.autoUpgradeSettings, required this.checkTime, }); - final HetznerServerInfo serverInfo; - + final List metadata; final TimeZoneSettings serverTimezone; - final AutoUpgradeSettings autoUpgradeSettings; final DateTime checkTime; @override List get props => [ - serverInfo, + metadata, serverTimezone, autoUpgradeSettings, checkTime, diff --git a/lib/logic/models/server_metadata.dart b/lib/logic/models/server_metadata.dart new file mode 100644 index 00000000..1a08abc0 --- /dev/null +++ b/lib/logic/models/server_metadata.dart @@ -0,0 +1,21 @@ +enum MetadataType { + id, + status, + cpu, + ram, + cost, + location, + + other, +} + +class ServerMetadataEntity { + ServerMetadataEntity({ + required this.name, + required this.value, + this.type = MetadataType.other, + }); + final MetadataType type; + final String name; + final String value; +} diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index e0d82b6d..acf19583 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; diff --git a/lib/ui/pages/server_details/text_details.dart b/lib/ui/pages/server_details/text_details.dart index e9b3c0f7..2c06375f 100644 --- a/lib/ui/pages/server_details/text_details.dart +++ b/lib/ui/pages/server_details/text_details.dart @@ -1,6 +1,16 @@ part of 'server_details_screen.dart'; class _TextDetails extends StatelessWidget { + final Map metadataToIcon = const { + MetadataType.id: Icons.numbers_outlined, + MetadataType.status: Icons.mode_standby_outlined, + MetadataType.cpu: Icons.memory_outlined, + MetadataType.ram: Icons.memory_outlined, + MetadataType.cost: Icons.euro_outlined, + MetadataType.location: Icons.location_on_outlined, + MetadataType.other: Icons.info_outlined, + }; + @override Widget build(final BuildContext context) { final details = context.watch().state; @@ -10,7 +20,6 @@ class _TextDetails extends StatelessWidget { } else if (details is ServerDetailsNotReady) { return _TempMessage(message: 'basis.no_data'.tr()); } else if (details is Loaded) { - final data = details.serverInfo; return FilledCard( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -24,37 +33,15 @@ class _TextDetails extends StatelessWidget { ), ), ), - ListTileOnSurfaceVariant( - leadingIcon: Icons.numbers_outlined, - title: data.id.toString(), - subtitle: 'server.server_id'.tr(), - ), - ListTileOnSurfaceVariant( - leadingIcon: Icons.mode_standby_outlined, - title: data.status.toString().split('.')[1].capitalize(), - subtitle: 'server.status'.tr(), - ), - ListTileOnSurfaceVariant( - leadingIcon: Icons.memory_outlined, - title: 'server.core_count'.plural(data.serverType.cores), - subtitle: 'server.cpu'.tr(), - ), - ListTileOnSurfaceVariant( - leadingIcon: Icons.memory_outlined, - title: '${data.serverType.memory.toString()} GB', - subtitle: 'server.ram'.tr(), - ), - ListTileOnSurfaceVariant( - leadingIcon: Icons.euro_outlined, - title: data.serverType.prices[1].monthly.toStringAsFixed(2), - subtitle: 'server.monthly_cost'.tr(), - ), - // Server location - ListTileOnSurfaceVariant( - leadingIcon: Icons.location_on_outlined, - title: '${data.location.city}, ${data.location.country}', - subtitle: 'server.location'.tr(), - ), + ...details.metadata + .map( + (final metadata) => ListTileOnSurfaceVariant( + leadingIcon: metadataToIcon[metadata.type], + title: metadata.name, + subtitle: metadata.value, + ), + ) + .toList(), ], ), ); From e66b24d8696b3a99f025b218c12b86eabab7a816 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 11 Nov 2022 15:29:17 +0400 Subject: [PATCH 262/732] refactor: Remove obsolete initializing steps enum type --- lib/logic/common_enum/common_enum.dart | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/logic/common_enum/common_enum.dart b/lib/logic/common_enum/common_enum.dart index 69686978..557448b1 100644 --- a/lib/logic/common_enum/common_enum.dart +++ b/lib/logic/common_enum/common_enum.dart @@ -5,17 +5,6 @@ enum LoadingStatus { error, } -enum InitializingSteps { - setHetznerKey, - setCloudFlareKey, - setDomainName, - setRootUser, - createServer, - checkCloudFlareDns, - startServer, - checkSystemDnsAndDkimSet, -} - enum Period { hour, day, From a7cbde663e1aab3913222b72bbbd15ccfbdc4725 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 12 Nov 2022 21:29:06 +0400 Subject: [PATCH 263/732] refactor(server-api): Generalize and encapsulate server metrics endpoints --- .../digital_ocean/digital_ocean.dart | 31 ++------ .../server_providers/hetzner/hetzner.dart | 75 +++++++++++++++++-- .../server_providers/server_provider.dart | 6 ++ .../hetzner_metrics_repository.dart | 74 ------------------ .../hetzner_metrics_state.dart | 45 ----------- .../metrics_cubit.dart} | 20 ++--- .../cubit/metrics/metrics_repository.dart | 67 +++++++++++++++++ lib/logic/cubit/metrics/metrics_state.dart | 31 ++++++++ .../provider_volume_cubit.dart | 4 +- .../server_installation_cubit.dart | 17 ++--- lib/logic/models/hetzner_metrics.dart | 11 --- lib/logic/models/metrics.dart | 34 +++++++++ .../server_details/charts/bottom_title.dart | 2 +- lib/ui/pages/server_details/charts/chart.dart | 28 +++---- .../server_details/charts/cpu_chart.dart | 2 +- .../server_details/charts/network_charts.dart | 2 +- .../server_details/server_details_screen.dart | 5 +- .../recovering/recovery_confirm_server.dart | 5 +- 18 files changed, 253 insertions(+), 206 deletions(-) delete mode 100644 lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart delete mode 100644 lib/logic/cubit/hetzner_metrics/hetzner_metrics_state.dart rename lib/logic/cubit/{hetzner_metrics/hetzner_metrics_cubit.dart => metrics/metrics_cubit.dart} (57%) create mode 100644 lib/logic/cubit/metrics/metrics_repository.dart create mode 100644 lib/logic/cubit/metrics/metrics_state.dart delete mode 100644 lib/logic/models/hetzner_metrics.dart create mode 100644 lib/logic/models/metrics.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index c216d4c5..527a8ed2 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; @@ -444,34 +445,14 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return server.copyWith(startTime: DateTime.now()); } - Future> getMetrics( + @override + Future getMetrics( + final int serverId, final DateTime start, final DateTime end, - final String type, ) async { - final ServerHostingDetails? hetznerServer = - getIt().serverDetails; - - Map metrics = {}; - final Dio client = await getClient(); - try { - final Map queryParameters = { - 'start': start.toUtc().toIso8601String(), - 'end': end.toUtc().toIso8601String(), - 'type': type - }; - final Response res = await client.get( - '/servers/${hetznerServer!.id}/metrics', - queryParameters: queryParameters, - ); - metrics = res.data; - } catch (e) { - print(e); - } finally { - close(client); - } - - return metrics; + ServerMetrics? metrics; + return metrics!; } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 922c309c..09bf4f82 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; @@ -486,14 +487,12 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return server.copyWith(startTime: DateTime.now()); } - Future> getMetrics( + Future> requestRawMetrics( + final int serverId, final DateTime start, final DateTime end, final String type, ) async { - final ServerHostingDetails? hetznerServer = - getIt().serverDetails; - Map metrics = {}; final Dio client = await getClient(); try { @@ -503,10 +502,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'type': type }; final Response res = await client.get( - '/servers/${hetznerServer!.id}/metrics', + '/servers/$serverId/metrics', queryParameters: queryParameters, ); - metrics = res.data; + metrics = res.data['metrics']; } catch (e) { print(e); } finally { @@ -516,6 +515,70 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return metrics; } + List timeSeriesSerializer( + final Map json, + final String type, + ) { + final List list = json['time_series'][type]['values']; + return list + .map((final el) => TimeSeriesData(el[0], double.parse(el[1]))) + .toList(); + } + + @override + Future getMetrics( + final int serverId, + final DateTime start, + final DateTime end, + ) async { + ServerMetrics? metrics; + + final Map rawCpuMetrics = await requestRawMetrics( + serverId, + start, + end, + 'cpu', + ); + final Map rawNetworkMetrics = await requestRawMetrics( + serverId, + start, + end, + 'network', + ); + + if (rawNetworkMetrics.isEmpty || rawCpuMetrics.isEmpty) { + return metrics; + } + + metrics = ServerMetrics( + cpu: timeSeriesSerializer( + rawCpuMetrics, + 'cpu', + ), + ppsIn: timeSeriesSerializer( + rawNetworkMetrics, + 'network.0.pps.in', + ), + ppsOut: timeSeriesSerializer( + rawNetworkMetrics, + 'network.0.pps.out', + ), + bandwidthIn: timeSeriesSerializer( + rawNetworkMetrics, + 'network.0.bandwidth.in', + ), + bandwidthOut: timeSeriesSerializer( + rawNetworkMetrics, + 'network.0.bandwidth.out', + ), + end: end, + start: start, + stepsInSecond: rawCpuMetrics['step'], + ); + + return metrics; + } + @override Future> getMetadata(final int serverId) async { List metadata = []; diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 9e0b57bf..42004e70 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -2,6 +2,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; @@ -41,6 +42,11 @@ abstract class ServerProviderApi extends ApiMap { Future isApiTokenValid(final String token); ProviderApiTokenValidation getApiTokenValidation(); Future> getMetadata(final int serverId); + Future getMetrics( + final int serverId, + final DateTime start, + final DateTime end, + ); abstract final String infectProviderName; } diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart deleted file mode 100644 index bc1d8e42..00000000 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart +++ /dev/null @@ -1,74 +0,0 @@ -import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; - -import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart'; - -class MetricsLoadException implements Exception { - MetricsLoadException(this.message); - final String message; -} - -class HetznerMetricsRepository { - Future getMetrics(final Period period) async { - final DateTime end = DateTime.now(); - DateTime start; - - switch (period) { - case Period.hour: - start = end.subtract(const Duration(hours: 1)); - break; - case Period.day: - start = end.subtract(const Duration(days: 1)); - break; - case Period.month: - start = end.subtract(const Duration(days: 15)); - break; - } - - final HetznerApi api = HetznerApi( - /// TODO: Hetzner hardcode (???) - hasLogger: false, - region: getIt().serverLocation, - ); - - final List> results = await Future.wait([ - api.getMetrics(start, end, 'cpu'), - api.getMetrics(start, end, 'network'), - ]); - - final cpuMetricsData = results[0]['metrics']; - final networkMetricsData = results[1]['metrics']; - - if (cpuMetricsData == null || networkMetricsData == null) { - throw MetricsLoadException('Metrics data is null'); - } - - return HetznerMetricsLoaded( - period: period, - start: start, - end: end, - stepInSeconds: cpuMetricsData['step'], - cpu: timeSeriesSerializer(cpuMetricsData, 'cpu'), - ppsIn: timeSeriesSerializer(networkMetricsData, 'network.0.pps.in'), - ppsOut: timeSeriesSerializer(networkMetricsData, 'network.0.pps.out'), - bandwidthIn: - timeSeriesSerializer(networkMetricsData, 'network.0.bandwidth.in'), - bandwidthOut: timeSeriesSerializer( - networkMetricsData, - 'network.0.bandwidth.out', - ), - ); - } -} - -List timeSeriesSerializer( - final Map json, - final String type, -) { - final List list = json['time_series'][type]['values']; - return list - .map((final el) => TimeSeriesData(el[0], double.parse(el[1]))) - .toList(); -} diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_state.dart b/lib/logic/cubit/hetzner_metrics/hetzner_metrics_state.dart deleted file mode 100644 index b6204db9..00000000 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_state.dart +++ /dev/null @@ -1,45 +0,0 @@ -part of 'hetzner_metrics_cubit.dart'; - -abstract class HetznerMetricsState extends Equatable { - const HetznerMetricsState(); - - abstract final Period period; -} - -class HetznerMetricsLoading extends HetznerMetricsState { - const HetznerMetricsLoading(this.period); - @override - final Period period; - - @override - List get props => [period]; -} - -class HetznerMetricsLoaded extends HetznerMetricsState { - const HetznerMetricsLoaded({ - required this.period, - required this.start, - required this.end, - required this.stepInSeconds, - required this.cpu, - required this.ppsIn, - required this.ppsOut, - required this.bandwidthIn, - required this.bandwidthOut, - }); - - @override - final Period period; - final DateTime start; - final DateTime end; - final num stepInSeconds; - - final List cpu; - final List ppsIn; - final List ppsOut; - final List bandwidthIn; - final List bandwidthOut; - - @override - List get props => [period, start, end]; -} diff --git a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart b/lib/logic/cubit/metrics/metrics_cubit.dart similarity index 57% rename from lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart rename to lib/logic/cubit/metrics/metrics_cubit.dart index 1cfdc23a..2a2dec28 100644 --- a/lib/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart +++ b/lib/logic/cubit/metrics/metrics_cubit.dart @@ -3,16 +3,16 @@ import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; -import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_repository.dart'; +import 'package:selfprivacy/logic/cubit/metrics/metrics_repository.dart'; -part 'hetzner_metrics_state.dart'; +part 'metrics_state.dart'; -class HetznerMetricsCubit extends Cubit { - HetznerMetricsCubit() : super(const HetznerMetricsLoading(Period.day)); +class MetricsCubit extends Cubit { + MetricsCubit() : super(const MetricsLoading(Period.day)); - final HetznerMetricsRepository repository = HetznerMetricsRepository(); + final MetricsRepository repository = MetricsRepository(); Timer? timer; @@ -30,7 +30,7 @@ class HetznerMetricsCubit extends Cubit { void changePeriod(final Period period) async { closeTimer(); - emit(HetznerMetricsLoading(period)); + emit(MetricsLoading(period)); load(period); } @@ -40,14 +40,14 @@ class HetznerMetricsCubit extends Cubit { void load(final Period period) async { try { - final HetznerMetricsLoaded newState = await repository.getMetrics(period); + final MetricsLoaded newState = await repository.getMetrics(period); timer = Timer( - Duration(seconds: newState.stepInSeconds.toInt()), + Duration(seconds: newState.metrics.stepsInSecond.toInt()), () => load(newState.period), ); emit(newState); } on StateError { - print('Tried to emit Hetzner metrics when cubit is closed'); + print('Tried to emit metrics when cubit is closed'); } on MetricsLoadException { timer = Timer( Duration(seconds: state.period.stepPeriodInSeconds), diff --git a/lib/logic/cubit/metrics/metrics_repository.dart b/lib/logic/cubit/metrics/metrics_repository.dart new file mode 100644 index 00000000..15da1b0c --- /dev/null +++ b/lib/logic/cubit/metrics/metrics_repository.dart @@ -0,0 +1,67 @@ +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; +import 'package:selfprivacy/logic/common_enum/common_enum.dart'; + +import 'package:selfprivacy/logic/cubit/metrics/metrics_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; + +class MetricsLoadException implements Exception { + MetricsLoadException(this.message); + final String message; +} + +class MetricsRepository { + ServerProviderApiFactory? serverProviderApiFactory; + + void _buildServerProviderFactory() { + final ServerProvider? providerType = getIt().serverProvider; + final String? location = getIt().serverLocation; + serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( + ServerProviderApiFactorySettings( + provider: providerType ?? ServerProvider.unknown, + location: location, + ), + ); + } + + Future getMetrics(final Period period) async { + if (serverProviderApiFactory == null) { + _buildServerProviderFactory(); + } + + final DateTime end = DateTime.now(); + DateTime start; + + switch (period) { + case Period.hour: + start = end.subtract(const Duration(hours: 1)); + break; + case Period.day: + start = end.subtract(const Duration(days: 1)); + break; + case Period.month: + start = end.subtract(const Duration(days: 15)); + break; + } + + final serverId = getIt().serverDetails!.id; + final ServerMetrics? metrics = + await serverProviderApiFactory!.getServerProvider().getMetrics( + serverId, + start, + end, + ); + + if (metrics == null) { + throw MetricsLoadException('Metrics data is null'); + } + + return MetricsLoaded( + period: period, + metrics: metrics, + ); + } +} diff --git a/lib/logic/cubit/metrics/metrics_state.dart b/lib/logic/cubit/metrics/metrics_state.dart new file mode 100644 index 00000000..b27546ce --- /dev/null +++ b/lib/logic/cubit/metrics/metrics_state.dart @@ -0,0 +1,31 @@ +part of 'metrics_cubit.dart'; + +abstract class MetricsState extends Equatable { + const MetricsState(); + + abstract final Period period; +} + +class MetricsLoading extends MetricsState { + const MetricsLoading(this.period); + @override + final Period period; + + @override + List get props => [period]; +} + +class MetricsLoaded extends MetricsState { + const MetricsLoaded({ + required this.period, + required this.metrics, + }); + + @override + final Period period; + + final ServerMetrics metrics; + + @override + List get props => [period, metrics]; +} diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 1a8f1c15..b3a3dd48 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -98,13 +98,13 @@ class ApiProviderVolumeCubit } getIt().showSnackBar( - 'Hetzner resized, waiting 10 seconds', + 'Provider volume resized, waiting 10 seconds', ); await Future.delayed(const Duration(seconds: 10)); await ServerApi().resizeVolume(volume.name); getIt().showSnackBar( - 'Server api resized, waiting 20 seconds', + 'Server volume resized, waiting 20 seconds', ); await Future.delayed(const Duration(seconds: 20)); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 6ff73893..9e82a780 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -305,14 +305,13 @@ class ServerInstallationCubit extends Cubit { ), ); timer = Timer(pauseDuration, () async { - final ServerHostingDetails hetznerServerDetails = - await repository.restart(); + final ServerHostingDetails serverDetails = await repository.restart(); await repository.saveIsServerResetedFirstTime(true); - await repository.saveServerDetails(hetznerServerDetails); + await repository.saveServerDetails(serverDetails); final ServerInstallationNotFinished newState = dataState.copyWith( isServerResetedFirstTime: true, - serverDetails: hetznerServerDetails, + serverDetails: serverDetails, isLoading: false, ); @@ -347,14 +346,13 @@ class ServerInstallationCubit extends Cubit { ), ); timer = Timer(pauseDuration, () async { - final ServerHostingDetails hetznerServerDetails = - await repository.restart(); + final ServerHostingDetails serverDetails = await repository.restart(); await repository.saveIsServerResetedSecondTime(true); - await repository.saveServerDetails(hetznerServerDetails); + await repository.saveServerDetails(serverDetails); final ServerInstallationNotFinished newState = dataState.copyWith( isServerResetedSecondTime: true, - serverDetails: hetznerServerDetails, + serverDetails: serverDetails, isLoading: false, ); @@ -560,8 +558,7 @@ class ServerInstallationCubit extends Cubit { } } - Future> - getServersOnHetznerAccount() async { + Future> getAvailableServers() async { final ServerInstallationRecovery dataState = state as ServerInstallationRecovery; final List servers = diff --git a/lib/logic/models/hetzner_metrics.dart b/lib/logic/models/hetzner_metrics.dart deleted file mode 100644 index 2f41a4b2..00000000 --- a/lib/logic/models/hetzner_metrics.dart +++ /dev/null @@ -1,11 +0,0 @@ -class TimeSeriesData { - TimeSeriesData( - this.secondsSinceEpoch, - this.value, - ); - - final int secondsSinceEpoch; - DateTime get time => - DateTime.fromMillisecondsSinceEpoch(secondsSinceEpoch * 1000); - final double value; -} diff --git a/lib/logic/models/metrics.dart b/lib/logic/models/metrics.dart new file mode 100644 index 00000000..786ee369 --- /dev/null +++ b/lib/logic/models/metrics.dart @@ -0,0 +1,34 @@ +class TimeSeriesData { + TimeSeriesData( + this.secondsSinceEpoch, + this.value, + ); + + final int secondsSinceEpoch; + DateTime get time => + DateTime.fromMillisecondsSinceEpoch(secondsSinceEpoch * 1000); + final double value; +} + +class ServerMetrics { + ServerMetrics({ + required this.stepsInSecond, + required this.cpu, + required this.ppsIn, + required this.ppsOut, + required this.bandwidthIn, + required this.bandwidthOut, + required this.start, + required this.end, + }); + + final num stepsInSecond; + final List cpu; + final List ppsIn; + final List ppsOut; + final List bandwidthIn; + final List bandwidthOut; + + final DateTime start; + final DateTime end; +} diff --git a/lib/ui/pages/server_details/charts/bottom_title.dart b/lib/ui/pages/server_details/charts/bottom_title.dart index 3db976ad..797fdebd 100644 --- a/lib/ui/pages/server_details/charts/bottom_title.dart +++ b/lib/ui/pages/server_details/charts/bottom_title.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:intl/intl.dart'; String bottomTitle( diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index fb46eb71..774dcf75 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -3,11 +3,11 @@ part of '../server_details_screen.dart'; class _Chart extends StatelessWidget { @override Widget build(final BuildContext context) { - final HetznerMetricsCubit cubit = context.watch(); + final MetricsCubit cubit = context.watch(); final Period period = cubit.state.period; - final HetznerMetricsState state = cubit.state; + final MetricsState state = cubit.state; List charts; - if (state is HetznerMetricsLoaded || state is HetznerMetricsLoading) { + if (state is MetricsLoaded || state is MetricsLoading) { charts = [ FilledCard( clipped: false, @@ -26,10 +26,10 @@ class _Chart extends StatelessWidget { Stack( alignment: Alignment.center, children: [ - if (state is HetznerMetricsLoaded) getCpuChart(state), + if (state is MetricsLoaded) getCpuChart(state), AnimatedOpacity( duration: const Duration(milliseconds: 200), - opacity: state is HetznerMetricsLoading ? 1 : 0, + opacity: state is MetricsLoading ? 1 : 0, child: const _GraphLoadingCardContent(), ), ], @@ -72,10 +72,10 @@ class _Chart extends StatelessWidget { Stack( alignment: Alignment.center, children: [ - if (state is HetznerMetricsLoaded) getBandwidthChart(state), + if (state is MetricsLoaded) getBandwidthChart(state), AnimatedOpacity( duration: const Duration(milliseconds: 200), - opacity: state is HetznerMetricsLoading ? 1 : 0, + opacity: state is MetricsLoading ? 1 : 0, child: const _GraphLoadingCardContent(), ), ], @@ -122,29 +122,29 @@ class _Chart extends StatelessWidget { ); } - Widget getCpuChart(final HetznerMetricsLoaded state) { - final data = state.cpu; + Widget getCpuChart(final MetricsLoaded state) { + final data = state.metrics.cpu; return SizedBox( height: 200, child: CpuChart( data: data, period: state.period, - start: state.start, + start: state.metrics.start, ), ); } - Widget getBandwidthChart(final HetznerMetricsLoaded state) { - final ppsIn = state.bandwidthIn; - final ppsOut = state.bandwidthOut; + Widget getBandwidthChart(final MetricsLoaded state) { + final ppsIn = state.metrics.bandwidthIn; + final ppsOut = state.metrics.bandwidthOut; return SizedBox( height: 200, child: NetworkChart( listData: [ppsIn, ppsOut], period: state.period, - start: state.start, + start: state.metrics.start, ), ); } diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart index 9b437b16..89ead8fe 100644 --- a/lib/ui/pages/server_details/charts/cpu_chart.dart +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:intl/intl.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/bottom_title.dart'; diff --git a/lib/ui/pages/server_details/charts/network_charts.dart b/lib/ui/pages/server_details/charts/network_charts.dart index c71ae7b1..d444ac84 100644 --- a/lib/ui/pages/server_details/charts/network_charts.dart +++ b/lib/ui/pages/server_details/charts/network_charts.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; -import 'package:selfprivacy/logic/models/hetzner_metrics.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/bottom_title.dart'; class NetworkChart extends StatelessWidget { diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index acf19583..245df021 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; -import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.dart'; +import 'package:selfprivacy/logic/cubit/metrics/metrics_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; @@ -22,7 +22,6 @@ import 'package:selfprivacy/ui/pages/server_details/charts/cpu_chart.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/network_charts.dart'; import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; -import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:timezone/timezone.dart'; @@ -93,7 +92,7 @@ class _ServerDetailsScreenState extends State ), const SizedBox(height: 8), BlocProvider( - create: (final context) => HetznerMetricsCubit()..restart(), + create: (final context) => MetricsCubit()..restart(), child: _Chart(), ), const SizedBox(height: 8), diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 430e0894..969e3d39 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -45,9 +45,8 @@ class _RecoveryConfirmServerState extends State { hasFlashButton: false, children: [ FutureBuilder>( - future: context - .read() - .getServersOnHetznerAccount(), + future: + context.read().getAvailableServers(), builder: (final context, final snapshot) { if (snapshot.hasData) { final servers = snapshot.data; From e20063a9ad2e569104f6909f52f9b71f6bfc1843 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 12 Nov 2022 22:44:15 +0400 Subject: [PATCH 264/732] chore: Remove unneeded metrics fields PPS metrics aren't used in our charts --- .../rest_maps/server_providers/hetzner/hetzner.dart | 8 -------- lib/logic/models/metrics.dart | 4 ---- 2 files changed, 12 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 09bf4f82..f2bd0a9e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -555,14 +555,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { rawCpuMetrics, 'cpu', ), - ppsIn: timeSeriesSerializer( - rawNetworkMetrics, - 'network.0.pps.in', - ), - ppsOut: timeSeriesSerializer( - rawNetworkMetrics, - 'network.0.pps.out', - ), bandwidthIn: timeSeriesSerializer( rawNetworkMetrics, 'network.0.bandwidth.in', diff --git a/lib/logic/models/metrics.dart b/lib/logic/models/metrics.dart index 786ee369..4f5d3efc 100644 --- a/lib/logic/models/metrics.dart +++ b/lib/logic/models/metrics.dart @@ -14,8 +14,6 @@ class ServerMetrics { ServerMetrics({ required this.stepsInSecond, required this.cpu, - required this.ppsIn, - required this.ppsOut, required this.bandwidthIn, required this.bandwidthOut, required this.start, @@ -24,8 +22,6 @@ class ServerMetrics { final num stepsInSecond; final List cpu; - final List ppsIn; - final List ppsOut; final List bandwidthIn; final List bandwidthOut; From 7fdc5467146f3243e073d565956dbf1322408bb2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 14 Nov 2022 09:48:36 +0400 Subject: [PATCH 265/732] refactor(server-api): Make appearance provider name polymorphic and required for metadata --- lib/logic/api_maps/rest_maps/api_map.dart | 3 ++- .../digital_ocean/digital_ocean.dart | 11 +++++++---- .../rest_maps/server_providers/hetzner/hetzner.dart | 12 ++++++++---- .../rest_maps/server_providers/server_provider.dart | 8 +++++++- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/api_map.dart b/lib/logic/api_maps/rest_maps/api_map.dart index 007bfd98..4c22c461 100644 --- a/lib/logic/api_maps/rest_maps/api_map.dart +++ b/lib/logic/api_maps/rest_maps/api_map.dart @@ -41,7 +41,8 @@ abstract class ApiMap { FutureOr get options; - abstract final String rootAddress; + String get rootAddress; + abstract final bool hasLogger; abstract final bool isWithToken; diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 527a8ed2..1c1f342c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -49,10 +49,13 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - final String rootAddress = 'https://api.digitalocean.com/v2'; + String get rootAddress => 'https://api.digitalocean.com/v2'; @override - final String infectProviderName = 'digitalocean'; + String get infectProviderName => 'digitalocean'; + + @override + String get appearanceProviderName => 'Digital Ocean'; @override Future isApiTokenValid(final String token) async { @@ -452,7 +455,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final DateTime end, ) async { ServerMetrics? metrics; - return metrics!; + return metrics; } @override @@ -498,7 +501,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ServerMetadataEntity( type: MetadataType.other, name: 'server.provider'.tr(), - value: 'Digital Ocean', + value: appearanceProviderName, ), ]; } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index f2bd0a9e..7e623c69 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -50,10 +50,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - final String rootAddress = 'https://api.hetzner.cloud/v1'; + String get rootAddress => 'https://api.hetzner.cloud/v1'; @override - final String infectProviderName = 'hetzner'; + String get infectProviderName => 'hetzner'; + + @override + String get appearanceProviderName => 'Hetzner'; @override Future isApiTokenValid(final String token) async { @@ -349,12 +352,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); + const String infectBranch = 'providers/hetzner'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; ServerHostingDetails? serverDetails; DioError? hetznerError; @@ -614,7 +618,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ServerMetadataEntity( type: MetadataType.other, name: 'server.provider'.tr(), - value: 'Hetzner', + value: appearanceProviderName, ), ]; } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 42004e70..21c6ddd0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -48,5 +48,11 @@ abstract class ServerProviderApi extends ApiMap { final DateTime end, ); - abstract final String infectProviderName; + /// Provider name key which lets infect understand what kind of installation + /// it requires, for example 'digitaloceal' for Digital Ocean + String get infectProviderName; + + /// Actual provider name to render on information page for user, + /// for example 'Digital Ocean' for Digital Ocean + String get appearanceProviderName; } From 92b417a10317e81b891747933b1d84d84811b397 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 14 Nov 2022 20:45:05 +0400 Subject: [PATCH 266/732] feat(digital-ocean): Implement metrics for Digital Ocean --- lib/logic/api_maps/rest_maps/api_map.dart | 4 +- .../digital_ocean/digital_ocean.dart | 101 ++++++++++++++++++ .../server_providers/hetzner/hetzner.dart | 8 +- .../server_details/charts/bottom_title.dart | 2 +- 4 files changed, 108 insertions(+), 7 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/api_map.dart b/lib/logic/api_maps/rest_maps/api_map.dart index 4c22c461..6fd0bdda 100644 --- a/lib/logic/api_maps/rest_maps/api_map.dart +++ b/lib/logic/api_maps/rest_maps/api_map.dart @@ -9,8 +9,8 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; abstract class ApiMap { - Future getClient() async { - final Dio dio = Dio(await options); + Future getClient({final BaseOptions? customOptions}) async { + final Dio dio = Dio(customOptions ?? (await options)); if (hasLogger) { dio.interceptors.add(PrettyDioLogger()); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 1c1f342c..50c043e6 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -448,6 +448,46 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return server.copyWith(startTime: DateTime.now()); } + /// Digital Ocean returns a map of lists of /proc/state values, + /// so here we are trying to implement average CPU + /// load calculation for each point in time on a given interval. + /// + /// For each point of time: + /// + /// `Average Load = 100 * (1 - (Idle Load / Total Load))` + /// + /// For more info please proceed to read: + /// https://rosettacode.org/wiki/Linux_CPU_utilization + List calculateCpuLoadMetrics(final List rawProcStatMetrics) { + final List cpuLoads = []; + + final int pointsInTime = (rawProcStatMetrics[0]['values'] as List).length; + for (int i = 0; i < pointsInTime; ++i) { + double currentMetricLoad = 0.0; + double? currentMetricIdle; + for (final rawProcStat in rawProcStatMetrics) { + final String rawProcValue = rawProcStat['values'][i][1]; + // Converting MBit into bit + final double procValue = double.parse(rawProcValue) * 1000000; + currentMetricLoad += procValue; + if (currentMetricIdle == null && + rawProcStat['metric']['mode'] == 'idle') { + currentMetricIdle = procValue; + } + } + currentMetricIdle ??= 0.0; + currentMetricLoad = 100.0 * (1 - (currentMetricIdle / currentMetricLoad)); + cpuLoads.add( + TimeSeriesData( + rawProcStatMetrics[0]['values'][i][0], + currentMetricLoad, + ), + ); + } + + return cpuLoads; + } + @override Future getMetrics( final int serverId, @@ -455,6 +495,67 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final DateTime end, ) async { ServerMetrics? metrics; + + const int step = 15; + final Dio client = await getClient(); + //try { + Response response = await client.get( + '/monitoring/metrics/droplet/bandwidth', + queryParameters: { + 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', + 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', + 'host_id': '$serverId', + 'interface': 'public', + 'direction': 'inbound', + }, + ); + + final List inbound = response.data['data']['result'][0]['values']; + + response = await client.get( + '/monitoring/metrics/droplet/bandwidth', + queryParameters: { + 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', + 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', + 'host_id': '$serverId', + 'interface': 'public', + 'direction': 'outbound', + }, + ); + + final List outbound = response.data['data']['result'][0]['values']; + + response = await client.get( + '/monitoring/metrics/droplet/cpu', + queryParameters: { + 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', + 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', + 'host_id': '$serverId', + }, + ); + + metrics = ServerMetrics( + bandwidthIn: inbound + .map( + (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), + ) + .toList(), + bandwidthOut: outbound + .map( + (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), + ) + .toList(), + cpu: calculateCpuLoadMetrics(response.data['data']['result']), + start: start, + end: end, + stepsInSecond: step, + ); + /* } catch (e) { + print(e); + } finally { + close(client); + }*/ + return metrics; } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 7e623c69..ccbeeef0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -519,7 +519,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return metrics; } - List timeSeriesSerializer( + List serializeTimeSeries( final Map json, final String type, ) { @@ -555,15 +555,15 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } metrics = ServerMetrics( - cpu: timeSeriesSerializer( + cpu: serializeTimeSeries( rawCpuMetrics, 'cpu', ), - bandwidthIn: timeSeriesSerializer( + bandwidthIn: serializeTimeSeries( rawNetworkMetrics, 'network.0.bandwidth.in', ), - bandwidthOut: timeSeriesSerializer( + bandwidthOut: serializeTimeSeries( rawNetworkMetrics, 'network.0.bandwidth.out', ), diff --git a/lib/ui/pages/server_details/charts/bottom_title.dart b/lib/ui/pages/server_details/charts/bottom_title.dart index 797fdebd..8d215d7e 100644 --- a/lib/ui/pages/server_details/charts/bottom_title.dart +++ b/lib/ui/pages/server_details/charts/bottom_title.dart @@ -11,7 +11,7 @@ String bottomTitle( final day = DateFormat('MMMd'); String res; - if (value <= 0) { + if (value <= 0 || value >= data.length) { return ''; } From 2a5fceae9110fb70a37099f38cdb7b97907bf3e4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 16 Nov 2022 00:49:41 +0400 Subject: [PATCH 267/732] fix(hetzner): Fix endpoints urls Incorrect dereferencing in strings --- .../rest_maps/server_providers/hetzner/hetzner.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index ccbeeef0..ce9aeeee 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -234,7 +234,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { Future deleteVolume(final ServerVolume volume) async { final Dio client = await getClient(); try { - await client.delete('/volumes/$volume.id'); + await client.delete('/volumes/${volume.id}'); } catch (e) { print(e); } finally { @@ -253,7 +253,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { dbPostResponse = await client.post( - '/volumes/$volume.id/actions/attach', + '/volumes/${volume.id}/actions/attach', data: { 'automount': true, 'server': serverId, @@ -276,7 +276,9 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final Response dbPostResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post('/volumes/$volume.id/actions/detach'); + dbPostResponse = await client.post( + '/volumes/${volume.id}/actions/detach', + ); success = dbPostResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); @@ -298,7 +300,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { dbPostResponse = await client.post( - '/volumes/$volume.id/actions/resize', + '/volumes/${volume.id}/actions/resize', data: { 'size': size.gibibyte, }, From bde364dde1dd0ee27fc60f7f1cca867b52ce2aba Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 16 Nov 2022 04:12:49 +0400 Subject: [PATCH 268/732] fix(digital-ocean): Adjust charts rendering for digital ocean values --- lib/ui/pages/server_details/charts/cpu_chart.dart | 2 +- lib/ui/pages/server_details/charts/network_charts.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart index 89ead8fe..8c3ae9c7 100644 --- a/lib/ui/pages/server_details/charts/cpu_chart.dart +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -83,7 +83,7 @@ class CpuChart extends StatelessWidget { ], minY: 0, maxY: 100, - minX: data.length - 200, + minX: 0, titlesData: FlTitlesData( topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), bottomTitles: AxisTitles( diff --git a/lib/ui/pages/server_details/charts/network_charts.dart b/lib/ui/pages/server_details/charts/network_charts.dart index d444ac84..946d0247 100644 --- a/lib/ui/pages/server_details/charts/network_charts.dart +++ b/lib/ui/pages/server_details/charts/network_charts.dart @@ -116,7 +116,7 @@ class NetworkChart extends StatelessWidget { ...listData[1].map((final e) => e.value) ].reduce(max) * 1.2, - minX: listData[0].length - 200, + minX: 0, titlesData: FlTitlesData( topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), bottomTitles: AxisTitles( From 0234278c2c3f0e5f8dd458615c1fec3e8c66bf62 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 16 Nov 2022 04:24:40 +0400 Subject: [PATCH 269/732] refactor: Rename server.dart to server_api.dart Because the class is called ServerApi, not just Server, it's totally not consistent with all other apis --- lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart | 2 +- .../api_maps/graphql_maps/server_api/server_actions_api.dart | 2 +- .../graphql_maps/server_api/{server.dart => server_api.dart} | 0 lib/logic/api_maps/graphql_maps/server_api/services_api.dart | 2 +- lib/logic/api_maps/graphql_maps/server_api/users_api.dart | 2 +- lib/logic/api_maps/graphql_maps/server_api/volume_api.dart | 2 +- lib/logic/cubit/backups/backups_cubit.dart | 2 +- lib/logic/cubit/client_jobs/client_jobs_cubit.dart | 2 +- lib/logic/cubit/devices/devices_cubit.dart | 2 +- lib/logic/cubit/dns_records/dns_records_cubit.dart | 2 +- .../forms/setup/recovering/recovery_domain_form_cubit.dart | 2 +- lib/logic/cubit/provider_volumes/provider_volume_cubit.dart | 2 +- lib/logic/cubit/recovery_key/recovery_key_cubit.dart | 2 +- .../server_detailed_info/server_detailed_info_repository.dart | 2 +- .../server_installation/server_installation_repository.dart | 2 +- lib/logic/cubit/server_jobs/server_jobs_cubit.dart | 2 +- lib/logic/cubit/server_volumes/server_volume_cubit.dart | 2 +- lib/logic/cubit/services/services_cubit.dart | 2 +- lib/logic/cubit/users/users_cubit.dart | 2 +- lib/ui/pages/more/about_application.dart | 2 +- 20 files changed, 19 insertions(+), 19 deletions(-) rename lib/logic/api_maps/graphql_maps/server_api/{server.dart => server_api.dart} (100%) diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart index 67e8bcb3..84acff43 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -1,4 +1,4 @@ -part of 'server.dart'; +part of 'server_api.dart'; mixin JobsApi on ApiMap { Future> getServerJobs() async { diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart index 780f1d37..65e77b98 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart @@ -1,4 +1,4 @@ -part of 'server.dart'; +part of 'server_api.dart'; mixin ServerActionsApi on ApiMap { Future _commonBoolRequest(final Function graphQLMethod) async { diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart similarity index 100% rename from lib/logic/api_maps/graphql_maps/server_api/server.dart rename to lib/logic/api_maps/graphql_maps/server_api/server_api.dart diff --git a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart index 2ef0e2ca..a2e85914 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart @@ -1,4 +1,4 @@ -part of 'server.dart'; +part of 'server_api.dart'; mixin ServicesApi on ApiMap { Future> getAllServices() async { diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index bb46bfef..c11f6a0e 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -1,4 +1,4 @@ -part of 'server.dart'; +part of 'server_api.dart'; mixin UsersApi on ApiMap { Future> getAllUsers() async { diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index 70119f28..360dd491 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -1,4 +1,4 @@ -part of 'server.dart'; +part of 'server_api.dart'; mixin VolumeApi on ApiMap { Future> getServerDiskVolumes() async { diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 5f72f2e2..b0fbc020 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index e9378bed..8b6a66b4 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index 065113f1..10ad943d 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index d0d1cd12..f3b91bff 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/utils/network_utils.dart'; part 'dns_records_state.dart'; diff --git a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart index dbfc7259..7f840d0a 100644 --- a/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index b3a3dd48..fb087cf9 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -1,6 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index 875d419a..76a572d1 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index fcc0c5d8..5e0f78ea 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index f736310c..7e631388 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -14,7 +14,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; diff --git a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart index fc102115..4cc0cf97 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_cubit.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; diff --git a/lib/logic/cubit/server_volumes/server_volume_cubit.dart b/lib/logic/cubit/server_volumes/server_volume_cubit.dart index e48a809e..c10bc377 100644 --- a/lib/logic/cubit/server_volumes/server_volume_cubit.dart +++ b/lib/logic/cubit/server_volumes/server_volume_cubit.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart index f76c15a7..54e22b3d 100644 --- a/lib/logic/cubit/services/services_cubit.dart +++ b/lib/logic/cubit/services/services_cubit.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index f31580fb..070fce2c 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:hive/hive.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 697e7811..ceefd0c7 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:package_info/package_info.dart'; From 51dc4c67b2b7a60a489fe27f0cce56ed26a9fb44 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 17 Nov 2022 11:14:34 +0400 Subject: [PATCH 270/732] feat(recovery): Implement access recovery routing for server providers --- assets/translations/en.json | 7 +- assets/translations/ru.json | 1 + .../schema/disk_volumes.graphql.dart | 2 +- .../graphql_maps/schema/schema.graphql | 1 + .../graphql_maps/schema/schema.graphql.dart | 2 + .../graphql_maps/schema/server_api.graphql | 8 + .../schema/server_api.graphql.dart | 420 +++++++++++++++++- .../schema/server_api.graphql.g.dart | 52 +++ .../schema/server_settings.graphql.dart | 2 +- .../graphql_maps/schema/services.graphql.dart | 1 + .../graphql_maps/schema/users.graphql.dart | 2 +- .../graphql_maps/server_api/server_api.dart | 26 ++ .../server_installation_cubit.dart | 11 + .../setup/recovering/recovery_routing.dart | 4 +- ...> recovery_server_provider_connected.dart} | 11 +- 15 files changed, 536 insertions(+), 14 deletions(-) rename lib/ui/pages/setup/recovering/{recovery_hentzner_connected.dart => recovery_server_provider_connected.dart} (89%) diff --git a/assets/translations/en.json b/assets/translations/en.json index 4cc240b9..908ef5e1 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -300,6 +300,7 @@ "checks": "Checks have been completed \n{} out of {}" }, "recovering": { + "generic_error": "Operation failed, please try again.", "recovery_main_header": "Connect to an existing server", "domain_recovery_description": "Enter a server domain you want to get access for:", "domain_recover_placeholder": "Your domain", @@ -319,9 +320,9 @@ "fallback_select_provider_console": "Access to the server console of my prodiver.", "authorization_failed": "Couldn't log in with this key", "fallback_select_provider_console_hint": "For example: Hetzner.", - "hetzner_connected": "Connect to Hetzner", - "hetzner_connected_description": "Communication established. Enter Hetzner token with access to {}:", - "hetzner_connected_placeholder": "Hetzner token", + "server_provider_connected": "Connect to your Server Provider", + "server_provider_connected_description": "Communication established. Enter you token with access to {}:", + "server_provider_connected_placeholder": "Server Provider token", "confirm_server": "Confirm server", "confirm_server_description": "Found your server! Confirm it is the right one:", "confirm_server_accept": "Yes! That's it", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 49c08079..ee056a3d 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -299,6 +299,7 @@ "checks": "Проверок выполнено: \n{} / {}" }, "recovering": { + "generic_error": "Ошибка проведения операции, попробуйте ещё раз.", "recovery_main_header": "Подключиться к существующему серверу", "domain_recovery_description": "Введите домен, по которому вы хотите получить доступ к серверу:", "domain_recover_placeholder": "Домен", diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 2464c561..359a7a27 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -4,7 +4,7 @@ import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; +import 'server_api.graphql.dart'; part 'disk_volumes.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 5da67b2c..ed167742 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -173,6 +173,7 @@ input RecoveryKeyLimitsInput { enum ServerProvider { HETZNER + DIGITALOCEAN } type Service { diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 7187e0e2..11d49a43 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -693,6 +693,8 @@ enum Enum$DnsProvider { enum Enum$ServerProvider { @JsonValue('HETZNER') HETZNER, + @JsonValue('DIGITALOCEAN') + DIGITALOCEAN, $unknown } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index 96374fad..d4339094 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -64,6 +64,14 @@ mutation RebootSystem { } } +query SystemServerProvider { + system { + provider { + provider + } + } +} + query GetApiTokens { api { devices { diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index c31a3487..325ee89d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -4,7 +4,6 @@ import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; part 'server_api.graphql.g.dart'; @JsonSerializable(explicitToJson: true) @@ -3178,6 +3177,425 @@ class _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem _res; } +@JsonSerializable(explicitToJson: true) +class Query$SystemServerProvider { + Query$SystemServerProvider({required this.system, required this.$__typename}); + + @override + factory Query$SystemServerProvider.fromJson(Map json) => + _$Query$SystemServerProviderFromJson(json); + + final Query$SystemServerProvider$system system; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemServerProviderToJson(this); + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([l$system, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemServerProvider) || + runtimeType != other.runtimeType) return false; + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemServerProvider + on Query$SystemServerProvider { + CopyWith$Query$SystemServerProvider + get copyWith => CopyWith$Query$SystemServerProvider(this, (i) => i); +} + +abstract class CopyWith$Query$SystemServerProvider { + factory CopyWith$Query$SystemServerProvider( + Query$SystemServerProvider instance, + TRes Function(Query$SystemServerProvider) then) = + _CopyWithImpl$Query$SystemServerProvider; + + factory CopyWith$Query$SystemServerProvider.stub(TRes res) = + _CopyWithStubImpl$Query$SystemServerProvider; + + TRes call({Query$SystemServerProvider$system? system, String? $__typename}); + CopyWith$Query$SystemServerProvider$system get system; +} + +class _CopyWithImpl$Query$SystemServerProvider + implements CopyWith$Query$SystemServerProvider { + _CopyWithImpl$Query$SystemServerProvider(this._instance, this._then); + + final Query$SystemServerProvider _instance; + + final TRes Function(Query$SystemServerProvider) _then; + + static const _undefined = {}; + + TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemServerProvider( + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemServerProvider$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemServerProvider$system get system { + final local$system = _instance.system; + return CopyWith$Query$SystemServerProvider$system( + local$system, (e) => call(system: e)); + } +} + +class _CopyWithStubImpl$Query$SystemServerProvider + implements CopyWith$Query$SystemServerProvider { + _CopyWithStubImpl$Query$SystemServerProvider(this._res); + + TRes _res; + + call({Query$SystemServerProvider$system? system, String? $__typename}) => + _res; + CopyWith$Query$SystemServerProvider$system get system => + CopyWith$Query$SystemServerProvider$system.stub(_res); +} + +const documentNodeQuerySystemServerProvider = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'SystemServerProvider'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$SystemServerProvider _parserFn$Query$SystemServerProvider( + Map data) => + Query$SystemServerProvider.fromJson(data); + +class Options$Query$SystemServerProvider + extends graphql.QueryOptions { + Options$Query$SystemServerProvider( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemServerProvider, + parserFn: _parserFn$Query$SystemServerProvider); +} + +class WatchOptions$Query$SystemServerProvider + extends graphql.WatchQueryOptions { + WatchOptions$Query$SystemServerProvider( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemServerProvider, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemServerProvider); +} + +class FetchMoreOptions$Query$SystemServerProvider + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$SystemServerProvider( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQuerySystemServerProvider); +} + +extension ClientExtension$Query$SystemServerProvider on graphql.GraphQLClient { + Future> + query$SystemServerProvider( + [Options$Query$SystemServerProvider? options]) async => + await this.query(options ?? Options$Query$SystemServerProvider()); + graphql.ObservableQuery + watchQuery$SystemServerProvider( + [WatchOptions$Query$SystemServerProvider? options]) => + this.watchQuery(options ?? WatchOptions$Query$SystemServerProvider()); + void writeQuery$SystemServerProvider( + {required Query$SystemServerProvider data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemServerProvider)), + data: data.toJson(), + broadcast: broadcast); + Query$SystemServerProvider? readQuery$SystemServerProvider( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemServerProvider)), + optimistic: optimistic); + return result == null ? null : Query$SystemServerProvider.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemServerProvider$system { + Query$SystemServerProvider$system( + {required this.provider, required this.$__typename}); + + @override + factory Query$SystemServerProvider$system.fromJson( + Map json) => + _$Query$SystemServerProvider$systemFromJson(json); + + final Query$SystemServerProvider$system$provider provider; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemServerProvider$systemToJson(this); + int get hashCode { + final l$provider = provider; + final l$$__typename = $__typename; + return Object.hashAll([l$provider, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemServerProvider$system) || + runtimeType != other.runtimeType) return false; + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemServerProvider$system + on Query$SystemServerProvider$system { + CopyWith$Query$SystemServerProvider$system + get copyWith => + CopyWith$Query$SystemServerProvider$system(this, (i) => i); +} + +abstract class CopyWith$Query$SystemServerProvider$system { + factory CopyWith$Query$SystemServerProvider$system( + Query$SystemServerProvider$system instance, + TRes Function(Query$SystemServerProvider$system) then) = + _CopyWithImpl$Query$SystemServerProvider$system; + + factory CopyWith$Query$SystemServerProvider$system.stub(TRes res) = + _CopyWithStubImpl$Query$SystemServerProvider$system; + + TRes call( + {Query$SystemServerProvider$system$provider? provider, + String? $__typename}); + CopyWith$Query$SystemServerProvider$system$provider get provider; +} + +class _CopyWithImpl$Query$SystemServerProvider$system + implements CopyWith$Query$SystemServerProvider$system { + _CopyWithImpl$Query$SystemServerProvider$system(this._instance, this._then); + + final Query$SystemServerProvider$system _instance; + + final TRes Function(Query$SystemServerProvider$system) _then; + + static const _undefined = {}; + + TRes call( + {Object? provider = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemServerProvider$system( + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Query$SystemServerProvider$system$provider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemServerProvider$system$provider get provider { + final local$provider = _instance.provider; + return CopyWith$Query$SystemServerProvider$system$provider( + local$provider, (e) => call(provider: e)); + } +} + +class _CopyWithStubImpl$Query$SystemServerProvider$system + implements CopyWith$Query$SystemServerProvider$system { + _CopyWithStubImpl$Query$SystemServerProvider$system(this._res); + + TRes _res; + + call( + {Query$SystemServerProvider$system$provider? provider, + String? $__typename}) => + _res; + CopyWith$Query$SystemServerProvider$system$provider get provider => + CopyWith$Query$SystemServerProvider$system$provider.stub(_res); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemServerProvider$system$provider { + Query$SystemServerProvider$system$provider( + {required this.provider, required this.$__typename}); + + @override + factory Query$SystemServerProvider$system$provider.fromJson( + Map json) => + _$Query$SystemServerProvider$system$providerFromJson(json); + + @JsonKey(unknownEnumValue: Enum$ServerProvider.$unknown) + final Enum$ServerProvider provider; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemServerProvider$system$providerToJson(this); + int get hashCode { + final l$provider = provider; + final l$$__typename = $__typename; + return Object.hashAll([l$provider, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemServerProvider$system$provider) || + runtimeType != other.runtimeType) return false; + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemServerProvider$system$provider + on Query$SystemServerProvider$system$provider { + CopyWith$Query$SystemServerProvider$system$provider< + Query$SystemServerProvider$system$provider> + get copyWith => + CopyWith$Query$SystemServerProvider$system$provider(this, (i) => i); +} + +abstract class CopyWith$Query$SystemServerProvider$system$provider { + factory CopyWith$Query$SystemServerProvider$system$provider( + Query$SystemServerProvider$system$provider instance, + TRes Function(Query$SystemServerProvider$system$provider) then) = + _CopyWithImpl$Query$SystemServerProvider$system$provider; + + factory CopyWith$Query$SystemServerProvider$system$provider.stub(TRes res) = + _CopyWithStubImpl$Query$SystemServerProvider$system$provider; + + TRes call({Enum$ServerProvider? provider, String? $__typename}); +} + +class _CopyWithImpl$Query$SystemServerProvider$system$provider + implements CopyWith$Query$SystemServerProvider$system$provider { + _CopyWithImpl$Query$SystemServerProvider$system$provider( + this._instance, this._then); + + final Query$SystemServerProvider$system$provider _instance; + + final TRes Function(Query$SystemServerProvider$system$provider) _then; + + static const _undefined = {}; + + TRes call( + {Object? provider = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemServerProvider$system$provider( + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$ServerProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$SystemServerProvider$system$provider + implements CopyWith$Query$SystemServerProvider$system$provider { + _CopyWithStubImpl$Query$SystemServerProvider$system$provider(this._res); + + TRes _res; + + call({Enum$ServerProvider? provider, String? $__typename}) => _res; +} + @JsonSerializable(explicitToJson: true) class Query$GetApiTokens { Query$GetApiTokens({required this.api, required this.$__typename}); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart index 525f8d64..f0ec390c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart @@ -330,6 +330,58 @@ Map _$Mutation$RebootSystem$rebootSystemToJson( '__typename': instance.$__typename, }; +Query$SystemServerProvider _$Query$SystemServerProviderFromJson( + Map json) => + Query$SystemServerProvider( + system: Query$SystemServerProvider$system.fromJson( + json['system'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemServerProviderToJson( + Query$SystemServerProvider instance) => + { + 'system': instance.system.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemServerProvider$system _$Query$SystemServerProvider$systemFromJson( + Map json) => + Query$SystemServerProvider$system( + provider: Query$SystemServerProvider$system$provider.fromJson( + json['provider'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemServerProvider$systemToJson( + Query$SystemServerProvider$system instance) => + { + 'provider': instance.provider.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemServerProvider$system$provider + _$Query$SystemServerProvider$system$providerFromJson( + Map json) => + Query$SystemServerProvider$system$provider( + provider: $enumDecode(_$Enum$ServerProviderEnumMap, json['provider'], + unknownValue: Enum$ServerProvider.$unknown), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemServerProvider$system$providerToJson( + Query$SystemServerProvider$system$provider instance) => + { + 'provider': _$Enum$ServerProviderEnumMap[instance.provider]!, + '__typename': instance.$__typename, + }; + +const _$Enum$ServerProviderEnumMap = { + Enum$ServerProvider.HETZNER: 'HETZNER', + Enum$ServerProvider.DIGITALOCEAN: 'DIGITALOCEAN', + Enum$ServerProvider.$unknown: r'$unknown', +}; + Query$GetApiTokens _$Query$GetApiTokensFromJson(Map json) => Query$GetApiTokens( api: Query$GetApiTokens$api.fromJson(json['api'] as Map), diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 5d036afa..a077cf7d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -3,7 +3,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; +import 'server_api.graphql.dart'; part 'server_settings.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index a31058c4..92138d02 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -4,6 +4,7 @@ import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'server_api.graphql.dart'; part 'services.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 18a15aa9..ce846b30 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -3,7 +3,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; +import 'server_api.graphql.dart'; part 'users.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index c2cda13b..be5402ab 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -9,6 +9,7 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql. import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; @@ -88,6 +89,31 @@ class ServerApi extends ApiMap return apiVersion; } + Future getServerProviderType() async { + QueryResult response; + ServerProvider providerType = ServerProvider.unknown; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$SystemServerProvider(); + if (response.hasException) { + print(response.exception.toString()); + } + final rawProviderValue = response.data!['system']['provider']['provider']; + switch (rawProviderValue) { + case 'HETZNER': + providerType = ServerProvider.hetzner; + break; + case 'DIGITALOCEAN': + providerType = ServerProvider.digitalOcean; + break; + } + } catch (e) { + print(e); + } + return providerType; + } + Future isUsingBinds() async { QueryResult response; bool usesBinds = false; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 9e82a780..3b972ac1 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; @@ -478,6 +479,16 @@ class ServerInstallationCubit extends Cubit { token, dataState.recoveryCapabilities, ); + final ServerProvider provider = await ServerApi( + customToken: token, + isWithToken: true, + ).getServerProviderType(); + if (provider == ServerProvider.unknown) { + getIt() + .showSnackBar('recovering.generic_error'.tr()); + return; + } + setServerProviderType(provider); await repository.saveServerDetails(serverDetails); emit( dataState.copyWith( diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index c6f56560..c2fb1d13 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -13,7 +13,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_new_device_key. import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_backblaze.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_server.dart'; -import 'package:selfprivacy/ui/pages/setup/recovering/recovery_hentzner_connected.dart'; +import 'package:selfprivacy/ui/pages/setup/recovering/recovery_server_provider_connected.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_method_select.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -48,7 +48,7 @@ class RecoveryRouting extends StatelessWidget { currentPage = const RecoverByOldToken(); break; case RecoveryStep.serverProviderToken: - currentPage = const RecoveryHetznerConnected(); + currentPage = const RecoveryServerProviderConnected(); break; case RecoveryStep.serverSelection: currentPage = const RecoveryConfirmServer(); diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart similarity index 89% rename from lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart rename to lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 76951395..152e4308 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -10,8 +10,8 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; -class RecoveryHetznerConnected extends StatelessWidget { - const RecoveryHetznerConnected({super.key}); +class RecoveryServerProviderConnected extends StatelessWidget { + const RecoveryServerProviderConnected({super.key}); @override Widget build(final BuildContext context) { @@ -26,8 +26,8 @@ class RecoveryHetznerConnected extends StatelessWidget { context.watch().state; return BrandHeroScreen( - heroTitle: 'recovering.hetzner_connected'.tr(), - heroSubtitle: 'recovering.hetzner_connected_description'.tr( + heroTitle: 'recovering.server_provider_connected'.tr(), + heroSubtitle: 'recovering.server_provider_connected_description'.tr( args: [appConfig.state.serverDomain?.domainName ?? 'your domain'], ), hasBackButton: true, @@ -40,7 +40,8 @@ class RecoveryHetznerConnected extends StatelessWidget { formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), - labelText: 'recovering.hetzner_connected_placeholder'.tr(), + labelText: + 'recovering.server_provider_connected_placeholder'.tr(), ), ), const SizedBox(height: 16), From 611fe6bf453e73ce9f63e3b12c05b7b97d9a0f8a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 17 Nov 2022 11:21:49 +0400 Subject: [PATCH 271/732] feat(server-api): Implement support for staging acme certificates Related to https://letsencrypt.org/docs/staging-environment/ to not get domain banned by constant renewal --- .../server_providers/digital_ocean/digital_ocean.dart | 2 +- .../api_maps/rest_maps/server_providers/hetzner/hetzner.dart | 2 +- .../api_maps/rest_maps/server_providers/server_provider.dart | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 50c043e6..fedb397e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -322,7 +322,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { const String infectBranch = 'providers/digital-ocean'; final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); final Dio client = await getClient(); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index ce9aeeee..cbe45f46 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -360,7 +360,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; ServerHostingDetails? serverDetails; DioError? hetznerError; diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 21c6ddd0..0be28b85 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -55,4 +55,9 @@ abstract class ServerProviderApi extends ApiMap { /// Actual provider name to render on information page for user, /// for example 'Digital Ocean' for Digital Ocean String get appearanceProviderName; + + /// Whether we request for staging temprorary certificates. + /// Hardcode to 'true' in the middle of testing to not + /// get your domain banned but constant certificate renewal + String get stagingAcme => 'false'; } From 268816385f116ea143f417005b11f2cd4c1b1201 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 18 Nov 2022 05:19:54 +0400 Subject: [PATCH 272/732] fix(recovery): Fix custom api token on recovering provider type --- .../cubit/server_installation/server_installation_cubit.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 3b972ac1..d56c6e2e 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -480,7 +480,7 @@ class ServerInstallationCubit extends Cubit { dataState.recoveryCapabilities, ); final ServerProvider provider = await ServerApi( - customToken: token, + customToken: serverDetails.apiToken, isWithToken: true, ).getServerProviderType(); if (provider == ServerProvider.unknown) { From 0c4da8eb9f1d7c96606496ed623bf09aa94a91d3 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 18 Nov 2022 07:07:42 +0400 Subject: [PATCH 273/732] refactor: Move all API factories into encapsulated static class Because it's very hard to track all different provider factories created in different cubits, if users reset application config the previous factories stayed unchanged which would lead to unexpected behavior --- .../api_maps/rest_maps/api_controller.dart | 44 ++++++++++ .../server_providers/server_provider.dart | 2 +- .../cubit/dns_records/dns_records_cubit.dart | 15 +--- .../initializing/dns_provider_form_cubit.dart | 8 +- .../initializing/domain_setup_cubit.dart | 7 +- .../cubit/metrics/metrics_repository.dart | 25 ++---- .../provider_volume_cubit.dart | 49 ++++++----- .../server_detailed_info_repository.dart | 27 +----- .../server_installation_cubit.dart | 62 +++++++++----- .../server_installation_repository.dart | 82 ++++++++++--------- .../setup/initializing/initializing.dart | 5 +- 11 files changed, 173 insertions(+), 153 deletions(-) create mode 100644 lib/logic/api_maps/rest_maps/api_controller.dart diff --git a/lib/logic/api_maps/rest_maps/api_controller.dart b/lib/logic/api_maps/rest_maps/api_controller.dart new file mode 100644 index 00000000..440d25af --- /dev/null +++ b/lib/logic/api_maps/rest_maps/api_controller.dart @@ -0,0 +1,44 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; + +class ApiController { + static VolumeProviderApiFactory? get currentVolumeProviderApiFactory => + _volumeProviderApiFactory; + static DnsProviderApiFactory? get currentDnsProviderApiFactory => + _dnsProviderApiFactory; + static ServerProviderApiFactory? get currentServerProviderApiFactory => + _serverProviderApiFactory; + + static void initVolumeProviderApiFactory( + final ServerProviderApiFactorySettings settings, + ) { + _volumeProviderApiFactory = + VolumeApiFactoryCreator.createVolumeProviderApiFactory(settings); + } + + static void initDnsProviderApiFactory( + final DnsProviderApiFactorySettings settings, + ) { + _dnsProviderApiFactory = + ApiFactoryCreator.createDnsProviderApiFactory(settings); + } + + static void initServerProviderApiFactory( + final ServerProviderApiFactorySettings settings, + ) { + _serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory(settings); + } + + static void clearProviderApiFactories() { + _volumeProviderApiFactory = null; + _dnsProviderApiFactory = null; + _serverProviderApiFactory = null; + } + + static VolumeProviderApiFactory? _volumeProviderApiFactory; + static DnsProviderApiFactory? _dnsProviderApiFactory; + static ServerProviderApiFactory? _serverProviderApiFactory; +} diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 0be28b85..f846a7a8 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -59,5 +59,5 @@ abstract class ServerProviderApi extends ApiMap { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned but constant certificate renewal - String get stagingAcme => 'false'; + String get stagingAcme => 'true'; } diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index f3b91bff..3403dc68 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,8 +1,6 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; @@ -20,12 +18,6 @@ class DnsRecordsCubit const DnsRecordsState(dnsState: DnsRecordsStatus.refreshing), ); - DnsProviderApiFactory? dnsProviderApiFactory = - ApiFactoryCreator.createDnsProviderApiFactory( - DnsProviderApiFactorySettings(provider: DnsProvider.cloudflare), - ); // TODO: HARDCODE FOR NOW!!! - // TODO: Remove when provider selection is implemented. - final ServerApi api = ServerApi(); @override @@ -46,7 +38,8 @@ class DnsRecordsCubit final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; if (domain != null && ipAddress != null) { - final List records = await dnsProviderApiFactory! + final List records = await ApiController + .currentDnsProviderApiFactory! .getDnsProvider() .getDnsRecords(domain: domain); final String? dkimPublicKey = @@ -126,7 +119,7 @@ class DnsRecordsCubit final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; final DnsProviderApi dnsProviderApi = - dnsProviderApiFactory!.getDnsProvider(); + ApiController.currentDnsProviderApiFactory!.getDnsProvider(); await dnsProviderApi.removeSimilarRecords(domain: domain!); await dnsProviderApi.createMultipleDnsRecords( domain: domain, diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index c2348a69..5ba72483 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -7,16 +7,16 @@ import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class DnsProviderFormCubit extends FormCubit { DnsProviderFormCubit(this.initializingCubit) { - final RegExp regExp = initializingCubit.getDnsProviderApiTokenValidation(); + //final RegExp regExp = initializingCubit.getDnsProviderApiTokenValidation(); apiKey = FieldCubit( initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - ValidationModel( + /*ValidationModel( regExp.hasMatch, 'validations.invalid_format'.tr(), - ), - LengthStringNotEqualValidation(40) + ),*/ + //LengthStringNotEqualValidation(40) ], ); diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index a1c458fb..62fc1050 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -1,4 +1,5 @@ import 'package:cubit_form/cubit_form.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -9,8 +10,7 @@ class DomainSetupCubit extends Cubit { Future load() async { emit(Loading(LoadingTypes.loadingDomain)); - final List list = await serverInstallationCubit - .repository.dnsProviderApiFactory! + final List list = await ApiController.currentDnsProviderApiFactory! .getDnsProvider() .domainList(); if (list.isEmpty) { @@ -31,8 +31,7 @@ class DomainSetupCubit extends Cubit { emit(Loading(LoadingTypes.saving)); - final String? zoneId = await serverInstallationCubit - .repository.dnsProviderApiFactory! + final String? zoneId = await ApiController.currentDnsProviderApiFactory! .getDnsProvider() .getZoneId(domainName); diff --git a/lib/logic/cubit/metrics/metrics_repository.dart b/lib/logic/cubit/metrics/metrics_repository.dart index 15da1b0c..71c298bf 100644 --- a/lib/logic/cubit/metrics/metrics_repository.dart +++ b/lib/logic/cubit/metrics/metrics_repository.dart @@ -1,11 +1,8 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/metrics/metrics_cubit.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; class MetricsLoadException implements Exception { @@ -14,22 +11,10 @@ class MetricsLoadException implements Exception { } class MetricsRepository { - ServerProviderApiFactory? serverProviderApiFactory; - - void _buildServerProviderFactory() { - final ServerProvider? providerType = getIt().serverProvider; - final String? location = getIt().serverLocation; - serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( - ServerProviderApiFactorySettings( - provider: providerType ?? ServerProvider.unknown, - location: location, - ), - ); - } - Future getMetrics(final Period period) async { - if (serverProviderApiFactory == null) { - _buildServerProviderFactory(); + final providerApiFactory = ApiController.currentServerProviderApiFactory; + if (providerApiFactory == null) { + throw MetricsLoadException('Server Provider data is null'); } final DateTime end = DateTime.now(); @@ -49,7 +34,7 @@ class MetricsRepository { final serverId = getIt().serverDetails!.id; final ServerMetrics? metrics = - await serverProviderApiFactory!.getServerProvider().getMetrics( + await providerApiFactory.getServerProvider().getMetrics( serverId, start, end, diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index fb087cf9..11e180d0 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -1,9 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; @@ -17,30 +15,19 @@ class ApiProviderVolumeCubit extends ServerInstallationDependendCubit { ApiProviderVolumeCubit(final ServerInstallationCubit serverInstallationCubit) : super(serverInstallationCubit, const ApiProviderVolumeState.initial()); - - VolumeProviderApiFactory? providerApi; - final ServerApi serverApi = ServerApi(); @override Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { - final serverDetails = getIt().serverDetails; - final serverLocation = getIt().serverLocation; - providerApi = serverDetails == null - ? null - : VolumeApiFactoryCreator.createVolumeProviderApiFactory( - ServerProviderApiFactorySettings( - location: serverLocation, - provider: getIt().serverDetails!.provider, - ), - ); _refetch(); } } Future getPricePerGb() async => - providerApi!.getVolumeProvider().getPricePerGb(); + ApiController.currentVolumeProviderApiFactory! + .getVolumeProvider() + .getPricePerGb(); Future refresh() async { emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); @@ -48,12 +35,14 @@ class ApiProviderVolumeCubit } Future _refetch() async { - if (providerApi == null) { + if (ApiController.currentVolumeProviderApiFactory == null) { return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } - final List volumes = - await providerApi!.getVolumeProvider().getVolumes(); + final List volumes = await ApiController + .currentVolumeProviderApiFactory! + .getVolumeProvider() + .getVolumes(); if (volumes.isEmpty) { return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); @@ -64,14 +53,16 @@ class ApiProviderVolumeCubit Future attachVolume(final DiskVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; - await providerApi! + await ApiController.currentVolumeProviderApiFactory! .getVolumeProvider() .attachVolume(volume.providerVolume!, server.id); refresh(); } Future detachVolume(final DiskVolume volume) async { - await providerApi!.getVolumeProvider().detachVolume(volume.providerVolume!); + await ApiController.currentVolumeProviderApiFactory! + .getVolumeProvider() + .detachVolume(volume.providerVolume!); refresh(); } @@ -84,7 +75,9 @@ class ApiProviderVolumeCubit 'Starting resize', ); emit(state.copyWith(isResizing: true)); - final bool resized = await providerApi!.getVolumeProvider().resizeVolume( + final bool resized = await ApiController.currentVolumeProviderApiFactory! + .getVolumeProvider() + .resizeVolume( volume.providerVolume!, newSize, ); @@ -120,8 +113,10 @@ class ApiProviderVolumeCubit } Future createVolume() async { - final ServerVolume? volume = - await providerApi!.getVolumeProvider().createVolume(); + final ServerVolume? volume = await ApiController + .currentVolumeProviderApiFactory! + .getVolumeProvider() + .createVolume(); final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); @@ -133,7 +128,9 @@ class ApiProviderVolumeCubit } Future deleteVolume(final DiskVolume volume) async { - await providerApi!.getVolumeProvider().deleteVolume(volume.providerVolume!); + await ApiController.currentVolumeProviderApiFactory! + .getVolumeProvider() + .deleteVolume(volume.providerVolume!); refresh(); } diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index 5e0f78ea..ca6848bc 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,38 +1,19 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; class ServerDetailsRepository { ServerApi server = ServerApi(); - ServerProviderApiFactory? serverProviderApiFactory; - - void _buildServerProviderFactory() { - final ServerProvider? providerType = getIt().serverProvider; - final String? location = getIt().serverLocation; - serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( - ServerProviderApiFactorySettings( - provider: providerType ?? ServerProvider.unknown, - location: location, - ), - ); - } Future load() async { - if (serverProviderApiFactory == null) { - _buildServerProviderFactory(); - } - + final serverProviderApi = ApiController.currentServerProviderApiFactory; final settings = await server.getSystemSettings(); final serverId = getIt().serverDetails!.id; - final metadata = await serverProviderApiFactory! - .getServerProvider() - .getMetadata(serverId); + final metadata = + await serverProviderApi!.getServerProvider().getMetadata(serverId); return ServerDetailsRepositoryDto( autoUpgradeSettings: settings.autoUpgradeSettings, diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index d56c6e2e..fa18cda8 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -5,7 +5,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; @@ -59,8 +59,7 @@ class ServerInstallationCubit extends Cubit { void setServerProviderType(final ServerProvider providerType) async { await repository.saveServerProviderType(providerType); - repository.serverProviderApiFactory = - ApiFactoryCreator.createServerProviderApiFactory( + ApiController.initServerProviderApiFactory( ServerProviderApiFactorySettings( provider: providerType, ), @@ -68,18 +67,19 @@ class ServerInstallationCubit extends Cubit { } ProviderApiTokenValidation serverProviderApiTokenValidation() => - repository.serverProviderApiFactory! + ApiController.currentServerProviderApiFactory! .getServerProvider() .getApiTokenValidation(); - RegExp getDnsProviderApiTokenValidation() => repository.dnsProviderApiFactory! - .getDnsProvider() - .getApiTokenValidation(); + RegExp getDnsProviderApiTokenValidation() => + ApiController.currentDnsProviderApiFactory! + .getDnsProvider() + .getApiTokenValidation(); Future isServerProviderApiTokenValid( final String providerToken, ) async => - repository.serverProviderApiFactory! + ApiController.currentServerProviderApiFactory! .getServerProvider( settings: const ServerProviderApiSettings( isWithToken: false, @@ -89,19 +89,30 @@ class ServerInstallationCubit extends Cubit { Future isDnsProviderApiTokenValid( final String providerToken, - ) async => - repository.dnsProviderApiFactory! - .getDnsProvider( - settings: const DnsProviderApiSettings(isWithToken: false), - ) - .isApiTokenValid(providerToken); + ) async { + if (ApiController.currentDnsProviderApiFactory == null) { + // No other DNS provider is supported for now, + // so it's safe to hardcode Cloudflare + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: DnsProvider.cloudflare, + ), + ); + } + + return ApiController.currentDnsProviderApiFactory! + .getDnsProvider( + settings: const DnsProviderApiSettings(isWithToken: false), + ) + .isApiTokenValid(providerToken); + } Future> fetchAvailableLocations() async { - if (repository.serverProviderApiFactory == null) { + if (ApiController.currentServerProviderApiFactory == null) { return []; } - return repository.serverProviderApiFactory! + return ApiController.currentServerProviderApiFactory! .getServerProvider() .getAvailableLocations(); } @@ -109,11 +120,11 @@ class ServerInstallationCubit extends Cubit { Future> fetchAvailableTypesByLocation( final ServerProviderLocation location, ) async { - if (repository.serverProviderApiFactory == null) { + if (ApiController.currentServerProviderApiFactory == null) { return []; } - return repository.serverProviderApiFactory! + return ApiController.currentServerProviderApiFactory! .getServerProvider() .getServerTypesByLocation(location: location); } @@ -141,8 +152,16 @@ class ServerInstallationCubit extends Cubit { void setServerType(final ServerType serverType) async { await repository.saveServerType(serverType); - repository.serverProviderApiFactory = - ApiFactoryCreator.createServerProviderApiFactory( + ApiController.initServerProviderApiFactory( + ServerProviderApiFactorySettings( + provider: getIt().serverProvider!, + location: serverType.location.identifier, + ), + ); + + // All server providers support volumes for now, + // so it's safe to initialize. + ApiController.initVolumeProviderApiFactory( ServerProviderApiFactorySettings( provider: getIt().serverProvider!, location: serverType.location.identifier, @@ -162,6 +181,7 @@ class ServerInstallationCubit extends Cubit { return; } await repository.saveCloudFlareKey(cloudFlareKey); + emit( (state as ServerInstallationNotFinished) .copyWith(cloudFlareKey: cloudFlareKey), @@ -677,7 +697,7 @@ class ServerInstallationCubit extends Cubit { void clearAppConfig() { closeTimer(); - + ApiController.clearProviderApiFactories(); repository.clearAppConfig(); emit(const ServerInstallationEmpty()); } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 7e631388..59e4921c 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -9,14 +9,12 @@ import 'package:hive/hive.dart'; import 'package:pub_semver/pub_semver.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -43,13 +41,6 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); - ServerProviderApiFactory? serverProviderApiFactory; - DnsProviderApiFactory? dnsProviderApiFactory = - ApiFactoryCreator.createDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: DnsProvider.cloudflare, - ), // TODO: HARDCODE FOR NOW!!! - ); Future load() async { final String? providerApiToken = getIt().serverProviderKey; @@ -67,8 +58,16 @@ class ServerInstallationRepository { if (serverProvider != null || (serverDetails != null && serverDetails.provider != ServerProvider.unknown)) { - serverProviderApiFactory = - ApiFactoryCreator.createServerProviderApiFactory( + ApiController.initServerProviderApiFactory( + ServerProviderApiFactorySettings( + provider: serverProvider ?? serverDetails!.provider, + location: location, + ), + ); + + // All current providers support volumes + // so it's safe to hardcode for now + ApiController.initVolumeProviderApiFactory( ServerProviderApiFactorySettings( provider: serverProvider ?? serverDetails!.provider, location: location, @@ -77,7 +76,7 @@ class ServerInstallationRepository { } if (serverDomain != null && serverDomain.provider != DnsProvider.unknown) { - dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( + ApiController.initDnsProviderApiFactory( DnsProviderApiFactorySettings( provider: serverDomain.provider, ), @@ -168,14 +167,16 @@ class ServerInstallationRepository { ) async { ServerHostingDetails serverDetails; - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - serverDetails = await api.powerOn(); + serverDetails = await ApiController.currentServerProviderApiFactory! + .getServerProvider() + .powerOn(); return serverDetails; } Future getDomainId(final String token, final String domain) async { - final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider( + final DnsProviderApi dnsProviderApi = + ApiController.currentDnsProviderApiFactory!.getDnsProvider( settings: DnsProviderApiSettings( isWithToken: false, customToken: token, @@ -244,7 +245,8 @@ class ServerInstallationRepository { required final Future Function(ServerHostingDetails serverDetails) onSuccess, }) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); + final ServerProviderApi api = + ApiController.currentServerProviderApiFactory!.getServerProvider(); try { final ServerHostingDetails? serverDetails = await api.createServer( dnsApiToken: cloudFlareKey, @@ -328,9 +330,9 @@ class ServerInstallationRepository { required final void Function() onCancel, }) async { final DnsProviderApi dnsProviderApi = - dnsProviderApiFactory!.getDnsProvider(); + ApiController.currentDnsProviderApiFactory!.getDnsProvider(); final ServerProviderApi serverApi = - serverProviderApiFactory!.getServerProvider(); + ApiController.currentServerProviderApiFactory!.getServerProvider(); await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, @@ -370,7 +372,7 @@ class ServerInstallationRepository { Future createDkimRecord(final ServerDomain cloudFlareDomain) async { final DnsProviderApi dnsProviderApi = - dnsProviderApiFactory!.getDnsProvider(); + ApiController.currentDnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); late DnsRecord record; @@ -389,15 +391,15 @@ class ServerInstallationRepository { return api.isHttpServerWorking(); } - Future restart() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - return api.restart(); - } + Future restart() async => + ApiController.currentServerProviderApiFactory! + .getServerProvider() + .restart(); - Future powerOn() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - return api.powerOn(); - } + Future powerOn() async => + ApiController.currentServerProviderApiFactory! + .getServerProvider() + .powerOn(); Future getRecoveryCapabilities( final ServerDomain serverDomain, @@ -632,10 +634,10 @@ class ServerInstallationRepository { } } - Future> getServersOnProviderAccount() async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - return api.getServers(); - } + Future> getServersOnProviderAccount() async => + ApiController.currentServerProviderApiFactory! + .getServerProvider() + .getServers(); Future saveServerDetails( final ServerHostingDetails serverDetails, @@ -724,13 +726,11 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - final DnsProviderApi dnsProviderApi = - dnsProviderApiFactory!.getDnsProvider(); - - await api.deleteServer( - domainName: serverDomain.domainName, - ); + await ApiController.currentServerProviderApiFactory! + .getServerProvider() + .deleteServer( + domainName: serverDomain.domainName, + ); await box.put(BNames.hasFinalChecked, false); await box.put(BNames.isServerStarted, false); @@ -739,7 +739,9 @@ class ServerInstallationRepository { await box.put(BNames.isLoading, false); await box.put(BNames.serverDetails, null); - await dnsProviderApi.removeSimilarRecords(domain: serverDomain); + await ApiController.currentDnsProviderApiFactory! + .getDnsProvider() + .removeSimilarRecords(domain: serverDomain); } Future deleteServerRelatedRecords() async { diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 48d95a6d..b81680bc 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -206,9 +206,8 @@ class InitializingPage extends StatelessWidget { ), const Spacer(), BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), + onPressed: () => + context.read().trySubmit(), text: 'basis.connect'.tr(), ), const SizedBox(height: 10), From da394e22acc47b689b6935c79176b80a0f51df6b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 18 Nov 2022 10:59:47 +0400 Subject: [PATCH 274/732] feat(server-api): Implement bad certificates fallback for staging environment Without it client application won't accept staging certificates from server --- lib/logic/api_maps/graphql_maps/api_map.dart | 15 +++++++++ .../digital_ocean/digital_ocean.dart | 2 ++ .../server_providers/hetzner/hetzner.dart | 3 +- .../server_providers/server_provider.dart | 5 --- lib/logic/api_maps/staging_options.dart | 8 +++++ pubspec.lock | 32 +++++++++---------- pubspec.yaml | 1 + 7 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 lib/logic/api_maps/staging_options.dart diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index c01f1837..ed495fea 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -1,10 +1,25 @@ +import 'dart:io'; + import 'package:graphql_flutter/graphql_flutter.dart'; +import 'package:http/io_client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; abstract class ApiMap { Future getClient() async { + final HttpClient httpClient = HttpClient(); + if (StagingOptions.stagingAcme) { + httpClient.badCertificateCallback = ( + final cert, + final host, + final port, + ) => + true; + } + final httpLink = HttpLink( 'https://api.$rootAddress/graphql', + httpClient: IOClient(httpClient), ); final String token = _getApiToken(); diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index fedb397e..da5d975c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -6,6 +6,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -320,6 +321,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String formattedHostname = getHostnameFromDomain(domainName); const String infectBranch = 'providers/digital-ocean'; + final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String userdataString = "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index cbe45f46..f8062286 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -6,6 +6,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; @@ -355,7 +356,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); const String infectBranch = 'providers/hetzner'; - + final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index f846a7a8..21c6ddd0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -55,9 +55,4 @@ abstract class ServerProviderApi extends ApiMap { /// Actual provider name to render on information page for user, /// for example 'Digital Ocean' for Digital Ocean String get appearanceProviderName; - - /// Whether we request for staging temprorary certificates. - /// Hardcode to 'true' in the middle of testing to not - /// get your domain banned but constant certificate renewal - String get stagingAcme => 'true'; } diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart new file mode 100644 index 00000000..3d04876e --- /dev/null +++ b/lib/logic/api_maps/staging_options.dart @@ -0,0 +1,8 @@ +/// Controls staging environment for network, is used during manual +/// integration testing and such +class StagingOptions { + /// Whether we request for staging temprorary certificates. + /// Hardcode to 'true' in the middle of testing to not + /// get your domain banned but constant certificate renewal + static bool get stagingAcme => true; +} diff --git a/pubspec.lock b/pubspec.lock index 8eae4c89..c5901997 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" auto_size_text: dependency: "direct main" description: @@ -126,7 +126,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -147,7 +147,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: @@ -350,7 +350,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: @@ -631,12 +631,12 @@ packages: source: hosted version: "1.1.3" http: - dependency: transitive + dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.4" + version: "0.13.5" http_multi_server: dependency: transitive description: @@ -762,21 +762,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -846,7 +846,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_drawing: dependency: transitive description: @@ -1159,7 +1159,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -1187,7 +1187,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" system_theme: dependency: "direct main" description: @@ -1208,28 +1208,28 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test: dependency: transitive description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.21.1" + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.13" + version: "0.4.16" timezone: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 372bd4a2..af1521e1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,6 +33,7 @@ dependencies: gtk_theme_fl: ^0.0.1 hive: ^2.2.3 hive_flutter: ^1.1.0 + http: ^0.13.5 intl: ^0.17.0 ionicons: ^0.1.2 json_annotation: ^4.6.0 From b26e22cd4ea41c9af38269893577f3ab59ecba9d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 18 Nov 2022 11:30:50 +0400 Subject: [PATCH 275/732] fix: Check on null for server type identifier It is not needed to finish installation so it's okat if it's empty --- .../cubit/server_installation/server_installation_state.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 18742303..ad88571e 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -191,7 +191,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, - serverTypeIdentificator: serverTypeIdentificator!, + serverTypeIdentificator: serverTypeIdentificator ?? '', cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, From b53bb6d4ddf5ffdef724284e25507798d866ce3a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 18 Nov 2022 11:31:56 +0400 Subject: [PATCH 276/732] refactor: Remove 'unused' warnings --- .../initializing/dns_provider_form_cubit.dart | 7 +- .../setup/initializing/initializing.dart | 74 +++++++++---------- 2 files changed, 36 insertions(+), 45 deletions(-) diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index 5ba72483..e50d7db3 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -7,16 +7,11 @@ import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class DnsProviderFormCubit extends FormCubit { DnsProviderFormCubit(this.initializingCubit) { - //final RegExp regExp = initializingCubit.getDnsProviderApiTokenValidation(); apiKey = FieldCubit( initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - /*ValidationModel( - regExp.hasMatch, - 'validations.invalid_format'.tr(), - ),*/ - //LengthStringNotEqualValidation(40) + LengthStringNotEqualValidation(40) ], ); diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index b81680bc..c56928a9 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -181,48 +181,44 @@ class InitializingPage extends StatelessWidget { BlocProvider( create: (final context) => DnsProviderFormCubit(initializingCubit), child: Builder( - builder: (final context) { - final formCubitState = context.watch().state; - - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/logos/cloudflare.png', - width: 150, + builder: (final context) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/logos/cloudflare.png', + width: 150, + ), + const SizedBox(height: 10), + BrandText.h2('initializing.connect_cloudflare'.tr()), + const SizedBox(height: 10), + BrandText.body2('initializing.manage_domain_dns'.tr()), + const Spacer(), + CubitFormTextField( + formFieldCubit: context.read().apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: InputDecoration( + hintText: 'initializing.cloudflare_api_token'.tr(), ), - const SizedBox(height: 10), - BrandText.h2('initializing.connect_cloudflare'.tr()), - const SizedBox(height: 10), - BrandText.body2('initializing.manage_domain_dns'.tr()), - const Spacer(), - CubitFormTextField( - formFieldCubit: context.read().apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: InputDecoration( - hintText: 'initializing.cloudflare_api_token'.tr(), + ), + const Spacer(), + BrandButton.rised( + onPressed: () => + context.read().trySubmit(), + text: 'basis.connect'.tr(), + ), + const SizedBox(height: 10), + BrandButton.text( + onPressed: () => _showModal( + context, + const _HowTo( + fileName: 'how_cloudflare', ), ), - const Spacer(), - BrandButton.rised( - onPressed: () => - context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - const SizedBox(height: 10), - BrandButton.text( - onPressed: () => _showModal( - context, - const _HowTo( - fileName: 'how_cloudflare', - ), - ), - title: 'initializing.how'.tr(), - ), - ], - ); - }, + title: 'initializing.how'.tr(), + ), + ], + ), ), ); From b2a5d57a1dfa8c87a46246a8ea4e722ffe92214b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 20 Nov 2022 14:48:08 +0400 Subject: [PATCH 277/732] feat(initializing): Add description and back button to server type step --- assets/translations/en.json | 2 ++ assets/translations/ru.json | 4 +++- .../setup/initializing/initializing.dart | 5 ++++ .../initializing/server_type_picker.dart | 23 +++++++++++++++++-- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 908ef5e1..18e70c5b 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -273,6 +273,8 @@ "place_where_data": "A place where your data and SelfPrivacy services will reside:", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", + "choose_location_type": "Choose your server location and type:", + "back_to_locations": "Go back to available locations!", "no_locations_found": "No available locations found. Make sure your account is accessible.", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "cloudflare_bad_key_error": "Cloudflare API key is invalid", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index ee056a3d..7352bf59 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -271,7 +271,9 @@ "connect_to_server": "Подключите сервер", "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", "how": "Как получить API Token", - "provider_bad_key_error": "API ключ провайдера неверен", + "provider_bad_key_error": "Provider API key is invalid", + "choose_location_type": "Выберите локацию и тип вашего сервера:", + "back_to_locations": "Назад к доступным локациям!", "no_locations_found": "Не найдено локаций. Убедитесь, что ваш аккаунт доступен.", "no_server_types_found": "Не удалось получить список серверов. Убедитесь, что ваш аккаунт доступен и попытайтесь сменить локацию сервера.", "cloudflare_bad_key_error": "Cloudflare API ключ неверен", diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index c56928a9..29fcd6f0 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -82,6 +82,11 @@ class InitializingPage extends StatelessWidget { activeIndex: cubit.state.porgressBar, ), ), + if (cubit.state.porgressBar == + ServerSetupProgress.serverProviderFilled.index) + BrandText.h2( + 'initializing.choose_location_type'.tr(), + ), _addCard( AnimatedSwitcher( duration: const Duration(milliseconds: 300), diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index a6757571..04b3bd5f 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -4,6 +4,7 @@ import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; class ServerTypePicker extends StatefulWidget { const ServerTypePicker({ @@ -21,7 +22,7 @@ class _ServerTypePickerState extends State { ServerProviderLocation? serverProviderLocation; ServerType? serverType; - void setServerProviderLocation(final ServerProviderLocation location) { + void setServerProviderLocation(final ServerProviderLocation? location) { setState(() { serverProviderLocation = location; }); @@ -39,6 +40,9 @@ class _ServerTypePickerState extends State { return SelectTypePage( location: serverProviderLocation!, serverInstallationCubit: widget.serverInstallationCubit, + backToLocationPickingCallback: () { + setServerProviderLocation(null); + }, ); } } @@ -102,6 +106,7 @@ class SelectLocationPage extends StatelessWidget { class SelectTypePage extends StatelessWidget { const SelectTypePage({ + required this.backToLocationPickingCallback, required this.location, required this.serverInstallationCubit, super.key, @@ -109,6 +114,7 @@ class SelectTypePage extends StatelessWidget { final ServerProviderLocation location; final ServerInstallationCubit serverInstallationCubit; + final Function backToLocationPickingCallback; @override Widget build(final BuildContext context) => FutureBuilder( @@ -119,7 +125,20 @@ class SelectTypePage extends StatelessWidget { ) { if (snapshot.hasData) { if ((snapshot.data as List).isEmpty) { - return Text('initializing.no_server_types_found'.tr()); + return Column( + children: [ + Text( + 'initializing.no_server_types_found'.tr(), + ), + const SizedBox(height: 10), + BrandButton.rised( + onPressed: () { + backToLocationPickingCallback(); + }, + text: 'initializing.back_to_locations'.tr(), + ), + ], + ); } return ListView( padding: paddingH15V0, From 58c9e00ce0d8191366739226916ffac750894aba Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 20 Nov 2022 18:31:31 +0400 Subject: [PATCH 278/732] fix(recovery): Add reverse dns validation for digital ocean In Digital Ocean reverse dns is not domain name but just name, like mydomainname instead of mydomainname.xyz, so we need additional condition --- .../server_installation/server_installation_cubit.dart | 6 ++++-- .../server_installation/server_installation_repository.dart | 2 +- .../server_installation/server_installation_state.dart | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index fa18cda8..08852825 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -508,8 +508,8 @@ class ServerInstallationCubit extends Cubit { .showSnackBar('recovering.generic_error'.tr()); return; } - setServerProviderType(provider); await repository.saveServerDetails(serverDetails); + setServerProviderType(provider); emit( dataState.copyWith( serverDetails: serverDetails, @@ -600,7 +600,9 @@ class ServerInstallationCubit extends Cubit { serverBasicInfo: server, isIpValid: server.ip == dataState.serverDetails?.ip4, isReverseDnsValid: - server.reverseDns == dataState.serverDomain?.domainName, + server.reverseDns == dataState.serverDomain?.domainName || + server.reverseDns == + dataState.serverDomain?.domainName.split('.')[0], ), ); return validated.toList(); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 59e4921c..cc3860e3 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -86,7 +86,7 @@ class ServerInstallationRepository { if (box.get(BNames.hasFinalChecked, defaultValue: false)) { return ServerInstallationFinished( providerApiToken: providerApiToken!, - serverTypeIdentificator: serverTypeIdentificator!, + serverTypeIdentificator: serverTypeIdentificator ?? '', cloudFlareKey: cloudflareToken!, serverDomain: serverDomain!, backblazeCredential: backblazeCredential!, diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index ad88571e..331c3e2a 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -331,7 +331,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, - serverTypeIdentificator: serverTypeIdentificator!, + serverTypeIdentificator: serverTypeIdentificator ?? '', cloudFlareKey: cloudFlareKey!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, From 93b28d981e6398387dc9338cbdf4e7aaf5e4c82b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 20 Nov 2022 18:34:20 +0400 Subject: [PATCH 279/732] chore: Remove testing flag before merging into master --- lib/logic/api_maps/staging_options.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index 3d04876e..fd4e8099 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -4,5 +4,5 @@ class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned but constant certificate renewal - static bool get stagingAcme => true; + static bool get stagingAcme => false; } From 479efac6e9e7c2cda6e2ef988b5fdfe3d3bc37a9 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 20 Nov 2022 18:35:44 +0400 Subject: [PATCH 280/732] chore: Fix an awkward commentary typo... --- lib/logic/api_maps/staging_options.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index fd4e8099..7d3084b7 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -3,6 +3,6 @@ class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not - /// get your domain banned but constant certificate renewal + /// get your domain banned by constant certificate renewal static bool get stagingAcme => false; } From 3ba2c6f7319866bddfc346b8bc77ff8355370a9e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 21 Nov 2022 12:35:00 +0400 Subject: [PATCH 281/732] feat: Add refresh indicator on Recovery Key page to support drag gestures --- lib/ui/pages/recovery_key/recovery_key.dart | 23 +++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index 0330a5a0..abec4663 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -21,6 +21,12 @@ class RecoveryKey extends StatefulWidget { } class _RecoveryKeyState extends State { + @override + void initState() { + super.initState(); + context.read().load(); + } + @override Widget build(final BuildContext context) { final RecoveryKeyState keyStatus = context.watch().state; @@ -50,12 +56,17 @@ class _RecoveryKeyState extends State { break; } - return BrandHeroScreen( - heroTitle: 'recovery_key.key_main_header'.tr(), - heroSubtitle: subtitle, - hasBackButton: true, - hasFlashButton: false, - children: widgets, + return RefreshIndicator( + onRefresh: () async { + context.read().load(); + }, + child: BrandHeroScreen( + heroTitle: 'recovery_key.key_main_header'.tr(), + heroSubtitle: subtitle, + hasBackButton: true, + hasFlashButton: false, + children: widgets, + ), ); } } From 8c6b56f61dc52dccd81aa5b84fd7bae9c3d13f01 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 23 Nov 2022 11:55:28 +0400 Subject: [PATCH 282/732] fix: Make improvements by Code Review --- assets/translations/ru.json | 2 +- lib/logic/api_maps/graphql_maps/api_map.dart | 6 +- .../graphql_maps/server_api/server_api.dart | 14 +- .../digital_ocean/digital_ocean.dart | 177 +++++++++--------- .../server_providers/hetzner/hetzner.dart | 119 ++++++------ .../server_providers/server_provider.dart | 2 +- lib/logic/models/hive/server_details.dart | 14 +- lib/logic/models/server_metadata.dart | 24 ++- .../server_details/server_details_screen.dart | 1 - lib/ui/pages/server_details/text_details.dart | 12 +- lib/utils/password_generator.dart | 2 +- 11 files changed, 192 insertions(+), 181 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 7352bf59..3dd4e590 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -271,7 +271,7 @@ "connect_to_server": "Подключите сервер", "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", "how": "Как получить API Token", - "provider_bad_key_error": "Provider API key is invalid", + "provider_bad_key_error": "API ключ провайдера неверен", "choose_location_type": "Выберите локацию и тип вашего сервера:", "back_to_locations": "Назад к доступным локациям!", "no_locations_found": "Не найдено локаций. Убедитесь, что ваш аккаунт доступен.", diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index ed495fea..185a5e54 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -7,19 +7,21 @@ import 'package:selfprivacy/logic/api_maps/staging_options.dart'; abstract class ApiMap { Future getClient() async { - final HttpClient httpClient = HttpClient(); + IOClient? ioClient; if (StagingOptions.stagingAcme) { + final HttpClient httpClient = HttpClient(); httpClient.badCertificateCallback = ( final cert, final host, final port, ) => true; + ioClient = IOClient(httpClient); } final httpLink = HttpLink( 'https://api.$rootAddress/graphql', - httpClient: IOClient(httpClient), + httpClient: ioClient, ); final String token = _getApiToken(); diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index be5402ab..4370131f 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -90,7 +90,7 @@ class ServerApi extends ApiMap } Future getServerProviderType() async { - QueryResult response; + QueryResult response; ServerProvider providerType = ServerProvider.unknown; try { @@ -99,15 +99,9 @@ class ServerApi extends ApiMap if (response.hasException) { print(response.exception.toString()); } - final rawProviderValue = response.data!['system']['provider']['provider']; - switch (rawProviderValue) { - case 'HETZNER': - providerType = ServerProvider.hetzner; - break; - case 'DIGITALOCEAN': - providerType = ServerProvider.digitalOcean; - break; - } + providerType = ServerProvider.fromGraphQL( + response.parsedData!.system.provider.provider, + ); } catch (e) { print(e); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index da5d975c..ba3f0d63 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -56,7 +56,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { String get infectProviderName => 'digitalocean'; @override - String get appearanceProviderName => 'Digital Ocean'; + String get displayProviderName => 'Digital Ocean'; @override Future isApiTokenValid(final String token) async { @@ -102,32 +102,32 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { Future createVolume() async { ServerVolume? volume; - final Response dbCreateResponse; + final Response createVolumeResponse; final Dio client = await getClient(); try { final List volumes = await getVolumes(); await Future.delayed(const Duration(seconds: 6)); - dbCreateResponse = await client.post( + createVolumeResponse = await client.post( '/volumes', data: { 'size_gigabytes': 10, - 'name': 'volume${StringGenerators.dbStorageName()}', + 'name': 'volume${StringGenerators.storageName()}', 'labels': {'labelkey': 'value'}, 'region': region, 'filesystem_type': 'ext4', }, ); - final dbId = dbCreateResponse.data['volume']['id']; - final dbSize = dbCreateResponse.data['volume']['size_gigabytes']; - final dbName = dbCreateResponse.data['volume']['name']; + final volumeId = createVolumeResponse.data['volume']['id']; + final volumeSize = createVolumeResponse.data['volume']['size_gigabytes']; + final volumeName = createVolumeResponse.data['volume']['name']; volume = ServerVolume( id: volumes.length, - name: dbName, - sizeByte: dbSize, + name: volumeName, + sizeByte: volumeSize, serverId: null, - linuxDevice: 'scsi-0DO_Volume_$dbName', - uuid: dbId, + linuxDevice: '/dev/disk/by-id/scsi-0DO_Volume_$volumeName', + uuid: volumeId, ); } catch (e) { print(e); @@ -142,29 +142,29 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { Future> getVolumes({final String? status}) async { final List volumes = []; - final Response dbGetResponse; + final Response getVolumesResponse; final Dio client = await getClient(); try { - dbGetResponse = await client.get( + getVolumesResponse = await client.get( '/volumes', queryParameters: { 'status': status, }, ); - final List rawVolumes = dbGetResponse.data['volumes']; + final List rawVolumes = getVolumesResponse.data['volumes']; int id = 0; for (final rawVolume in rawVolumes) { - final dbId = rawVolume['id']; - final int dbSize = rawVolume['size_gigabytes'] * 1024 * 1024 * 1024; - final dbDropletIds = rawVolume['droplet_ids']; - final String dbName = rawVolume['name']; + final volumeId = rawVolume['id']; + final int volumeSize = rawVolume['size_gigabytes'] * 1024 * 1024 * 1024; + final volumeDropletIds = rawVolume['droplet_ids']; + final String volumeName = rawVolume['name']; final volume = ServerVolume( id: id++, - name: dbName, - sizeByte: dbSize, - serverId: dbDropletIds.isNotEmpty ? dbDropletIds[0] : null, - linuxDevice: 'scsi-0DO_Volume_$dbName', - uuid: dbId, + name: volumeName, + sizeByte: volumeSize, + serverId: volumeDropletIds.isNotEmpty ? volumeDropletIds[0] : null, + linuxDevice: 'scsi-0DO_Volume_$volumeName', + uuid: volumeId, ); volumes.add(volume); } @@ -178,24 +178,24 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } Future getVolume(final String volumeUuid) async { - ServerVolume? neededVolume; + ServerVolume? requestedVolume; final List volumes = await getVolumes(); for (final volume in volumes) { if (volume.uuid == volumeUuid) { - neededVolume = volume; + requestedVolume = volume; } } - return neededVolume; + return requestedVolume; } @override Future deleteVolume(final ServerVolume volume) async { final Dio client = await getClient(); try { - await client.delete('/volumes/$volume.uuid'); + await client.delete('/volumes/${volume.uuid}'); } catch (e) { print(e); } finally { @@ -210,10 +210,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ) async { bool success = false; - final Response dbPostResponse; + final Response attachVolumeResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post( + attachVolumeResponse = await client.post( '/volumes/actions', data: { 'type': 'attach', @@ -222,7 +222,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'droplet_id': serverId, }, ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + attachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { @@ -236,10 +237,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { Future detachVolume(final ServerVolume volume) async { bool success = false; - final Response dbPostResponse; + final Response detachVolumeResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post( + detachVolumeResponse = await client.post( '/volumes/actions', data: { 'type': 'detach', @@ -248,7 +249,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'region': region, }, ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + detachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { @@ -265,10 +267,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ) async { bool success = false; - final Response dbPostResponse; + final Response resizeVolumeResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post( + resizeVolumeResponse = await client.post( '/volumes/actions', data: { 'type': 'resize', @@ -277,7 +279,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'region': region, }, ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + resizeVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { @@ -450,7 +453,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return server.copyWith(startTime: DateTime.now()); } - /// Digital Ocean returns a map of lists of /proc/state values, + /// Digital Ocean returns a map of lists of /proc/stat values, /// so here we are trying to implement average CPU /// load calculation for each point in time on a given interval. /// @@ -500,63 +503,63 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { const int step = 15; final Dio client = await getClient(); - //try { - Response response = await client.get( - '/monitoring/metrics/droplet/bandwidth', - queryParameters: { - 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', - 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', - 'host_id': '$serverId', - 'interface': 'public', - 'direction': 'inbound', - }, - ); + try { + Response response = await client.get( + '/monitoring/metrics/droplet/bandwidth', + queryParameters: { + 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', + 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', + 'host_id': '$serverId', + 'interface': 'public', + 'direction': 'inbound', + }, + ); - final List inbound = response.data['data']['result'][0]['values']; + final List inbound = response.data['data']['result'][0]['values']; - response = await client.get( - '/monitoring/metrics/droplet/bandwidth', - queryParameters: { - 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', - 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', - 'host_id': '$serverId', - 'interface': 'public', - 'direction': 'outbound', - }, - ); + response = await client.get( + '/monitoring/metrics/droplet/bandwidth', + queryParameters: { + 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', + 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', + 'host_id': '$serverId', + 'interface': 'public', + 'direction': 'outbound', + }, + ); - final List outbound = response.data['data']['result'][0]['values']; + final List outbound = response.data['data']['result'][0]['values']; - response = await client.get( - '/monitoring/metrics/droplet/cpu', - queryParameters: { - 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', - 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', - 'host_id': '$serverId', - }, - ); + response = await client.get( + '/monitoring/metrics/droplet/cpu', + queryParameters: { + 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', + 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', + 'host_id': '$serverId', + }, + ); - metrics = ServerMetrics( - bandwidthIn: inbound - .map( - (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), - ) - .toList(), - bandwidthOut: outbound - .map( - (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), - ) - .toList(), - cpu: calculateCpuLoadMetrics(response.data['data']['result']), - start: start, - end: end, - stepsInSecond: step, - ); - /* } catch (e) { + metrics = ServerMetrics( + bandwidthIn: inbound + .map( + (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), + ) + .toList(), + bandwidthOut: outbound + .map( + (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), + ) + .toList(), + cpu: calculateCpuLoadMetrics(response.data['data']['result']), + start: start, + end: end, + stepsInSecond: step, + ); + } catch (e) { print(e); } finally { close(client); - }*/ + } return metrics; } @@ -604,7 +607,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ServerMetadataEntity( type: MetadataType.other, name: 'server.provider'.tr(), - value: appearanceProviderName, + value: displayProviderName, ), ]; } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index f8062286..57df7837 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -57,7 +57,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { String get infectProviderName => 'hetzner'; @override - String get appearanceProviderName => 'Hetzner'; + String get displayProviderName => 'Hetzner'; @override Future isApiTokenValid(final String token) async { @@ -102,12 +102,12 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { Future getPricePerGb() async { double? price; - final Response dbGetResponse; + final Response pricingResponse; final Dio client = await getClient(); try { - dbGetResponse = await client.get('/pricing'); + pricingResponse = await client.get('/pricing'); - final volume = dbGetResponse.data['pricing']['volume']; + final volume = pricingResponse.data['pricing']['volume']; final volumePrice = volume['price_per_gb_month']['gross']; price = double.parse(volumePrice); } catch (e) { @@ -128,31 +128,31 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { Future createVolume() async { ServerVolume? volume; - final Response dbCreateResponse; + final Response createVolumeResponse; final Dio client = await getClient(); try { - dbCreateResponse = await client.post( + createVolumeResponse = await client.post( '/volumes', data: { 'size': 10, - 'name': StringGenerators.dbStorageName(), + 'name': StringGenerators.storageName(), 'labels': {'labelkey': 'value'}, 'location': region, 'automount': false, 'format': 'ext4' }, ); - final dbId = dbCreateResponse.data['volume']['id']; - final dbSize = dbCreateResponse.data['volume']['size']; - final dbServer = dbCreateResponse.data['volume']['server']; - final dbName = dbCreateResponse.data['volume']['name']; - final dbDevice = dbCreateResponse.data['volume']['linux_device']; + final volumeId = createVolumeResponse.data['volume']['id']; + final volumeSize = createVolumeResponse.data['volume']['size']; + final volumeServer = createVolumeResponse.data['volume']['server']; + final volumeName = createVolumeResponse.data['volume']['name']; + final volumeDevice = createVolumeResponse.data['volume']['linux_device']; volume = ServerVolume( - id: dbId, - name: dbName, - sizeByte: dbSize, - serverId: dbServer, - linuxDevice: dbDevice, + id: volumeId, + name: volumeName, + sizeByte: volumeSize, + serverId: volumeServer, + linuxDevice: volumeDevice, ); } catch (e) { print(e); @@ -167,28 +167,28 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { Future> getVolumes({final String? status}) async { final List volumes = []; - final Response dbGetResponse; + final Response getVolumesResonse; final Dio client = await getClient(); try { - dbGetResponse = await client.get( + getVolumesResonse = await client.get( '/volumes', queryParameters: { 'status': status, }, ); - final List rawVolumes = dbGetResponse.data['volumes']; + final List rawVolumes = getVolumesResonse.data['volumes']; for (final rawVolume in rawVolumes) { - final int dbId = rawVolume['id']; - final int dbSize = rawVolume['size'] * 1024 * 1024 * 1024; - final dbServer = rawVolume['server']; - final String dbName = rawVolume['name']; - final dbDevice = rawVolume['linux_device']; + final int volumeId = rawVolume['id']; + final int volumeSize = rawVolume['size'] * 1024 * 1024 * 1024; + final volumeServer = rawVolume['server']; + final String volumeName = rawVolume['name']; + final volumeDevice = rawVolume['linux_device']; final volume = ServerVolume( - id: dbId, - name: dbName, - sizeByte: dbSize, - serverId: dbServer, - linuxDevice: dbDevice, + id: volumeId, + name: volumeName, + sizeByte: volumeSize, + serverId: volumeServer, + linuxDevice: volumeDevice, ); volumes.add(volume); } @@ -206,21 +206,21 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ) async { ServerVolume? volume; - final Response dbGetResponse; + final Response getVolumeResponse; final Dio client = await getClient(); try { - dbGetResponse = await client.get('/volumes/$volumeId'); - final int dbId = dbGetResponse.data['volume']['id']; - final int dbSize = dbGetResponse.data['volume']['size']; - final int dbServer = dbGetResponse.data['volume']['server']; - final String dbName = dbGetResponse.data['volume']['name']; - final dbDevice = dbGetResponse.data['volume']['linux_device']; + getVolumeResponse = await client.get('/volumes/$volumeId'); + final int responseVolumeId = getVolumeResponse.data['volume']['id']; + final int volumeSize = getVolumeResponse.data['volume']['size']; + final int volumeServer = getVolumeResponse.data['volume']['server']; + final String volumeName = getVolumeResponse.data['volume']['name']; + final volumeDevice = getVolumeResponse.data['volume']['linux_device']; volume = ServerVolume( - id: dbId, - name: dbName, - sizeByte: dbSize, - serverId: dbServer, - linuxDevice: dbDevice, + id: responseVolumeId, + name: volumeName, + sizeByte: volumeSize, + serverId: volumeServer, + linuxDevice: volumeDevice, ); } catch (e) { print(e); @@ -250,17 +250,18 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ) async { bool success = false; - final Response dbPostResponse; + final Response attachVolumeResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post( + attachVolumeResponse = await client.post( '/volumes/${volume.id}/actions/attach', data: { 'automount': true, 'server': serverId, }, ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + attachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { @@ -274,13 +275,14 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { Future detachVolume(final ServerVolume volume) async { bool success = false; - final Response dbPostResponse; + final Response detachVolumeResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post( + detachVolumeResponse = await client.post( '/volumes/${volume.id}/actions/detach', ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + detachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { @@ -297,16 +299,17 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ) async { bool success = false; - final Response dbPostResponse; + final Response resizeVolumeResponse; final Dio client = await getClient(); try { - dbPostResponse = await client.post( + resizeVolumeResponse = await client.post( '/volumes/${volume.id}/actions/resize', data: { 'size': size.gibibyte, }, ); - success = dbPostResponse.data['action']['status'].toString() != 'error'; + success = + resizeVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); } finally { @@ -334,7 +337,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, - dataBase: newVolume, + volume: newVolume, serverType: serverType, ); @@ -345,13 +348,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String dnsApiToken, required final User rootUser, required final String domainName, - required final ServerVolume dataBase, + required final ServerVolume volume, required final String serverType, }) async { final Dio client = await getClient(); final String dbPassword = StringGenerators.dbPassword(); - final int dbId = dataBase.id; + final int volumeId = volume.id; final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); @@ -373,7 +376,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'server_type': serverType, 'start_after_create': false, 'image': 'ubuntu-20.04', - 'volumes': [dbId], + 'volumes': [volumeId], 'networks': [], 'user_data': userdataString, 'labels': {}, @@ -391,7 +394,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { id: serverCreateResponse.data['server']['id'], ip4: serverCreateResponse.data['server']['public_net']['ipv4']['ip'], createTime: DateTime.now(), - volume: dataBase, + volume: volume, apiToken: apiToken, provider: ServerProvider.hetzner, ); @@ -407,7 +410,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { if (!success) { await Future.delayed(const Duration(seconds: 10)); - await deleteVolume(dataBase); + await deleteVolume(volume); } if (hetznerError != null) { @@ -621,7 +624,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ServerMetadataEntity( type: MetadataType.other, name: 'server.provider'.tr(), - value: appearanceProviderName, + value: displayProviderName, ), ]; } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 21c6ddd0..a2eb71f3 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -54,5 +54,5 @@ abstract class ServerProviderApi extends ApiMap { /// Actual provider name to render on information page for user, /// for example 'Digital Ocean' for Digital Ocean - String get appearanceProviderName; + String get displayProviderName; } diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index faaf37b4..57a54762 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -1,4 +1,5 @@ import 'package:hive/hive.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; part 'server_details.g.dart'; @@ -82,5 +83,16 @@ enum ServerProvider { @HiveField(1) hetzner, @HiveField(2) - digitalOcean, + digitalOcean; + + factory ServerProvider.fromGraphQL(final Enum$ServerProvider provider) { + switch (provider) { + case Enum$ServerProvider.HETZNER: + return hetzner; + case Enum$ServerProvider.DIGITALOCEAN: + return digitalOcean; + default: + return unknown; + } + } } diff --git a/lib/logic/models/server_metadata.dart b/lib/logic/models/server_metadata.dart index 1a08abc0..0275a2ef 100644 --- a/lib/logic/models/server_metadata.dart +++ b/lib/logic/models/server_metadata.dart @@ -1,12 +1,20 @@ -enum MetadataType { - id, - status, - cpu, - ram, - cost, - location, +import 'package:flutter/material.dart'; - other, +enum MetadataType { + id(icon: Icons.numbers_outlined), + status(icon: Icons.mode_standby_outlined), + cpu(icon: Icons.memory_outlined), + ram(icon: Icons.memory_outlined), + cost(icon: Icons.payments_outlined), + location(icon: Icons.location_on_outlined), + + other(icon: Icons.info_outlined); + + const MetadataType({ + required this.icon, + }); + + final IconData icon; } class ServerMetadataEntity { diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 245df021..487e1a25 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -10,7 +10,6 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; -import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; diff --git a/lib/ui/pages/server_details/text_details.dart b/lib/ui/pages/server_details/text_details.dart index 2c06375f..5f447901 100644 --- a/lib/ui/pages/server_details/text_details.dart +++ b/lib/ui/pages/server_details/text_details.dart @@ -1,16 +1,6 @@ part of 'server_details_screen.dart'; class _TextDetails extends StatelessWidget { - final Map metadataToIcon = const { - MetadataType.id: Icons.numbers_outlined, - MetadataType.status: Icons.mode_standby_outlined, - MetadataType.cpu: Icons.memory_outlined, - MetadataType.ram: Icons.memory_outlined, - MetadataType.cost: Icons.euro_outlined, - MetadataType.location: Icons.location_on_outlined, - MetadataType.other: Icons.info_outlined, - }; - @override Widget build(final BuildContext context) { final details = context.watch().state; @@ -36,7 +26,7 @@ class _TextDetails extends StatelessWidget { ...details.metadata .map( (final metadata) => ListTileOnSurfaceVariant( - leadingIcon: metadataToIcon[metadata.type], + leadingIcon: metadata.type.icon, title: metadata.name, subtitle: metadata.value, ), diff --git a/lib/utils/password_generator.dart b/lib/utils/password_generator.dart index c8a6cdf0..a940bb19 100644 --- a/lib/utils/password_generator.dart +++ b/lib/utils/password_generator.dart @@ -101,7 +101,7 @@ class StringGenerators { hasSymbols: true, ); - static StringGeneratorFunction dbStorageName = () => getRandomString( + static StringGeneratorFunction storageName = () => getRandomString( 6, hasLowercaseLetters: true, hasUppercaseLetters: false, From bd33b8d679dea439d211105b9ce5225db46fc701 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 28 Nov 2022 22:51:37 +0400 Subject: [PATCH 283/732] feat: Implement distinction for connection errors on initialing page Now it's 'false' when api token is invalid and null response if couldn't connect at all, to show different kinds of errors to the user --- assets/translations/en.json | 1 + assets/translations/ru.json | 1 + lib/logic/api_maps/api_generic_result.dart | 13 +++ .../graphql_maps/server_api/server_api.dart | 83 ++++++++----------- .../digital_ocean/digital_ocean.dart | 35 +++++--- .../server_providers/hetzner/hetzner.dart | 35 +++++--- .../server_providers/server_provider.dart | 5 +- lib/logic/cubit/devices/devices_cubit.dart | 7 +- .../initializing/provider_form_cubit.dart | 11 ++- .../recovery_key/recovery_key_cubit.dart | 4 +- .../server_installation_cubit.dart | 29 +++++-- .../server_installation_repository.dart | 8 +- 12 files changed, 142 insertions(+), 90 deletions(-) create mode 100644 lib/logic/api_maps/api_generic_result.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 18e70c5b..de30d6f0 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -273,6 +273,7 @@ "place_where_data": "A place where your data and SelfPrivacy services will reside:", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", + "could_not_connect": "Counldn't connect to the provider, please check your connection.", "choose_location_type": "Choose your server location and type:", "back_to_locations": "Go back to available locations!", "no_locations_found": "No available locations found. Make sure your account is accessible.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 3dd4e590..b1228fa1 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -272,6 +272,7 @@ "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", "how": "Как получить API Token", "provider_bad_key_error": "API ключ провайдера неверен", + "could_not_connect": "Не удалось соединиться с провайдером. Пожалуйста, проверьте подключение.", "choose_location_type": "Выберите локацию и тип вашего сервера:", "back_to_locations": "Назад к доступным локациям!", "no_locations_found": "Не найдено локаций. Убедитесь, что ваш аккаунт доступен.", diff --git a/lib/logic/api_maps/api_generic_result.dart b/lib/logic/api_maps/api_generic_result.dart new file mode 100644 index 00000000..b5bacfb6 --- /dev/null +++ b/lib/logic/api_maps/api_generic_result.dart @@ -0,0 +1,13 @@ +class APIGenericResult { + APIGenericResult({ + required this.success, + required this.data, + this.message, + }); + + /// Whether was a response successfully received, + /// doesn't represent success of the request if `data` is `bool` + final bool success; + final String? message; + final T data; +} diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 4370131f..5216ffa8 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -1,5 +1,6 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; @@ -22,27 +23,15 @@ import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/ssh_settings.dart'; import 'package:selfprivacy/logic/models/system_settings.dart'; +export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; + part 'jobs_api.dart'; part 'server_actions_api.dart'; part 'services_api.dart'; part 'users_api.dart'; part 'volume_api.dart'; -class GenericResult { - GenericResult({ - required this.success, - required this.data, - this.message, - }); - - /// Whether was a response successfully received, - /// doesn't represent success of the request if `data` is `bool` - final bool success; - final String? message; - final T data; -} - -class GenericMutationResult extends GenericResult { +class GenericMutationResult extends APIGenericResult { GenericMutationResult({ required super.success, required this.code, @@ -206,7 +195,7 @@ class ServerApi extends ApiMap return settings; } - Future> getRecoveryTokenStatus() async { + Future> getRecoveryTokenStatus() async { RecoveryKeyStatus? key; QueryResult response; String? error; @@ -223,18 +212,18 @@ class ServerApi extends ApiMap print(e); } - return GenericResult( + return APIGenericResult( success: error == null, data: key, message: error, ); } - Future> generateRecoveryToken( + Future> generateRecoveryToken( final DateTime? expirationDate, final int? numberOfUses, ) async { - GenericResult key; + APIGenericResult key; QueryResult response; try { @@ -255,19 +244,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - key = GenericResult( + key = APIGenericResult( success: false, data: '', message: response.exception.toString(), ); } - key = GenericResult( + key = APIGenericResult( success: true, data: response.parsedData!.getNewRecoveryApiKey.key!, ); } catch (e) { print(e); - key = GenericResult( + key = APIGenericResult( success: false, data: '', message: e.toString(), @@ -300,8 +289,8 @@ class ServerApi extends ApiMap return records; } - Future>> getApiTokens() async { - GenericResult> tokens; + Future>> getApiTokens() async { + APIGenericResult> tokens; QueryResult response; try { @@ -310,7 +299,7 @@ class ServerApi extends ApiMap if (response.hasException) { final message = response.exception.toString(); print(message); - tokens = GenericResult>( + tokens = APIGenericResult>( success: false, data: [], message: message, @@ -324,13 +313,13 @@ class ServerApi extends ApiMap ApiToken.fromGraphQL(device), ) .toList(); - tokens = GenericResult>( + tokens = APIGenericResult>( success: true, data: parsed, ); } catch (e) { print(e); - tokens = GenericResult>( + tokens = APIGenericResult>( success: false, data: [], message: e.toString(), @@ -340,8 +329,8 @@ class ServerApi extends ApiMap return tokens; } - Future> deleteApiToken(final String name) async { - GenericResult returnable; + Future> deleteApiToken(final String name) async { + APIGenericResult returnable; QueryResult response; try { @@ -358,19 +347,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - returnable = GenericResult( + returnable = APIGenericResult( success: false, data: null, message: response.exception.toString(), ); } - returnable = GenericResult( + returnable = APIGenericResult( success: true, data: null, ); } catch (e) { print(e); - returnable = GenericResult( + returnable = APIGenericResult( success: false, data: null, message: e.toString(), @@ -380,8 +369,8 @@ class ServerApi extends ApiMap return returnable; } - Future> createDeviceToken() async { - GenericResult token; + Future> createDeviceToken() async { + APIGenericResult token; QueryResult response; try { @@ -393,19 +382,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = GenericResult( + token = APIGenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = GenericResult( + token = APIGenericResult( success: true, data: response.parsedData!.getNewDeviceApiKey.key!, ); } catch (e) { print(e); - token = GenericResult( + token = APIGenericResult( success: false, data: '', message: e.toString(), @@ -417,10 +406,10 @@ class ServerApi extends ApiMap Future isHttpServerWorking() async => (await getApiVersion()) != null; - Future> authorizeDevice( + Future> authorizeDevice( final DeviceToken deviceToken, ) async { - GenericResult token; + APIGenericResult token; QueryResult response; try { @@ -442,19 +431,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = GenericResult( + token = APIGenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = GenericResult( + token = APIGenericResult( success: true, data: response.parsedData!.authorizeWithNewDeviceApiKey.token!, ); } catch (e) { print(e); - token = GenericResult( + token = APIGenericResult( success: false, data: '', message: e.toString(), @@ -464,10 +453,10 @@ class ServerApi extends ApiMap return token; } - Future> useRecoveryToken( + Future> useRecoveryToken( final DeviceToken deviceToken, ) async { - GenericResult token; + APIGenericResult token; QueryResult response; try { @@ -489,19 +478,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = GenericResult( + token = APIGenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = GenericResult( + token = APIGenericResult( success: true, data: response.parsedData!.useRecoveryApiKey.token!, ); } catch (e) { print(e); - token = GenericResult( + token = APIGenericResult( success: false, data: '', message: e.toString(), diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index ba3f0d63..b97018e2 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -59,35 +59,50 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { String get displayProviderName => 'Digital Ocean'; @override - Future isApiTokenValid(final String token) async { + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; + String message = ''; final Dio client = await getClient(); try { response = await client.get( '/account', options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), headers: {'Authorization': 'Bearer $token'}, ), ); } catch (e) { print(e); isValid = false; + message = e.toString(); } finally { close(client); } - if (response != null) { - if (response.statusCode == HttpStatus.ok) { - isValid = true; - } else if (response.statusCode == HttpStatus.unauthorized) { - isValid = false; - } else { - throw Exception('code: ${response.statusCode}'); - } + if (response == null) { + return APIGenericResult( + data: isValid, + success: false, + message: message, + ); } - return isValid; + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + + return APIGenericResult( + data: isValid, + success: true, + message: response.statusMessage, + ); } /// Hardcoded on their documentation and there is no pricing API at all diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 57df7837..87331d85 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -60,35 +60,50 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { String get displayProviderName => 'Hetzner'; @override - Future isApiTokenValid(final String token) async { + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; + String message = ''; final Dio client = await getClient(); try { response = await client.get( '/servers', options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), headers: {'Authorization': 'Bearer $token'}, ), ); } catch (e) { print(e); isValid = false; + message = e.toString(); } finally { close(client); } - if (response != null) { - if (response.statusCode == HttpStatus.ok) { - isValid = true; - } else if (response.statusCode == HttpStatus.unauthorized) { - isValid = false; - } else { - throw Exception('code: ${response.statusCode}'); - } + if (response == null) { + return APIGenericResult( + data: isValid, + success: false, + message: message, + ); } - return isValid; + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + + return APIGenericResult( + data: isValid, + success: true, + message: response.statusMessage, + ); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index a2eb71f3..45e2bd2e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -1,3 +1,4 @@ +import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -8,6 +9,8 @@ import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; + class ProviderApiTokenValidation { ProviderApiTokenValidation({ required this.length, @@ -39,7 +42,7 @@ abstract class ServerProviderApi extends ApiMap { required final ServerDomain domain, }); - Future isApiTokenValid(final String token); + Future> isApiTokenValid(final String token); ProviderApiTokenValidation getApiTokenValidation(); Future> getMetadata(final int serverId); Future getMetrics( diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index 10ad943d..5e5c145c 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -35,7 +35,7 @@ class ApiDevicesCubit } Future?> _getApiTokens() async { - final GenericResult> response = await api.getApiTokens(); + final APIGenericResult> response = await api.getApiTokens(); if (response.success) { return response.data; } else { @@ -44,7 +44,8 @@ class ApiDevicesCubit } Future deleteDevice(final ApiToken device) async { - final GenericResult response = await api.deleteApiToken(device.name); + final APIGenericResult response = + await api.deleteApiToken(device.name); if (response.success) { emit( ApiDevicesState( @@ -59,7 +60,7 @@ class ApiDevicesCubit } Future getNewDeviceKey() async { - final GenericResult response = await api.createDeviceToken(); + final APIGenericResult response = await api.createDeviceToken(); if (response.success) { return response.data; } else { diff --git a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart index d3307762..ebabb5e7 100644 --- a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart @@ -29,21 +29,24 @@ class ProviderFormCubit extends FormCubit { @override FutureOr asyncValidation() async { - late bool isKeyValid; + bool? isKeyValid; try { isKeyValid = await serverInstallationCubit .isServerProviderApiTokenValid(apiKey.state.value); } catch (e) { addError(e); - isKeyValid = false; + } + + if (isKeyValid == null) { + apiKey.setError(''); + return false; } if (!isKeyValid) { apiKey.setError('initializing.provider_bad_key_error'.tr()); - return false; } - return true; + return isKeyValid; } } diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index 76a572d1..56800be3 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -32,7 +32,7 @@ class RecoveryKeyCubit } Future _getRecoveryKeyStatus() async { - final GenericResult response = + final APIGenericResult response = await api.getRecoveryTokenStatus(); if (response.success) { return response.data; @@ -57,7 +57,7 @@ class RecoveryKeyCubit final DateTime? expirationDate, final int? numberOfUses, }) async { - final GenericResult response = + final APIGenericResult response = await api.generateRecoveryToken(expirationDate, numberOfUses); if (response.success) { refresh(); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 08852825..dd9dadbd 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -76,16 +76,27 @@ class ServerInstallationCubit extends Cubit { .getDnsProvider() .getApiTokenValidation(); - Future isServerProviderApiTokenValid( + Future isServerProviderApiTokenValid( final String providerToken, - ) async => - ApiController.currentServerProviderApiFactory! - .getServerProvider( - settings: const ServerProviderApiSettings( - isWithToken: false, - ), - ) - .isApiTokenValid(providerToken); + ) async { + final APIGenericResult apiResponse = + await ApiController.currentServerProviderApiFactory! + .getServerProvider( + settings: const ServerProviderApiSettings( + isWithToken: false, + ), + ) + .isApiTokenValid(providerToken); + + if (!apiResponse.success) { + getIt().showSnackBar( + 'initializing.could_not_connect'.tr(), + ); + return null; + } + + return apiResponse.data; + } Future isDnsProviderApiTokenValid( final String providerToken, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index cc3860e3..8365529a 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -479,7 +479,7 @@ class ServerInstallationRepository { overrideDomain: serverDomain.domainName, ); final String serverIp = await getServerIpFromDomain(serverDomain); - final GenericResult result = await serverApi.authorizeDevice( + final APIGenericResult result = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: newDeviceKey), ); @@ -516,7 +516,7 @@ class ServerInstallationRepository { overrideDomain: serverDomain.domainName, ); final String serverIp = await getServerIpFromDomain(serverDomain); - final GenericResult result = await serverApi.useRecoveryToken( + final APIGenericResult result = await serverApi.useRecoveryToken( DeviceToken(device: await getDeviceName(), token: recoveryKey), ); @@ -577,9 +577,9 @@ class ServerInstallationRepository { ); } } - final GenericResult deviceAuthKey = + final APIGenericResult deviceAuthKey = await serverApi.createDeviceToken(); - final GenericResult result = await serverApi.authorizeDevice( + final APIGenericResult result = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), ); From 1df5f6594d21f2f82104e2ae334851a9322d8e29 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 28 Nov 2022 23:11:08 +0400 Subject: [PATCH 284/732] feat: Implement distinction for connection errors on server type page Now user gets notified when connection error occurs --- .../digital_ocean/digital_ocean.dart | 19 ++++++++++++---- .../server_providers/hetzner/hetzner.dart | 19 ++++++++++++---- .../server_providers/server_provider.dart | 5 +++-- .../server_installation_cubit.dart | 22 +++++++++++++++++-- 4 files changed, 53 insertions(+), 12 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index b97018e2..55534b1d 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -709,7 +709,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future> getAvailableLocations() async { + Future>> + getAvailableLocations() async { List locations = []; final Dio client = await getClient(); @@ -730,15 +731,20 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { .toList(); } catch (e) { print(e); + return APIGenericResult( + data: [], + success: false, + message: e.toString(), + ); } finally { close(client); } - return locations; + return APIGenericResult(data: locations, success: true); } @override - Future> getServerTypesByLocation({ + Future>> getServerTypesByLocation({ required final ServerProviderLocation location, }) async { final List types = []; @@ -771,11 +777,16 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } } catch (e) { print(e); + return APIGenericResult( + data: [], + success: false, + message: e.toString(), + ); } finally { close(client); } - return types; + return APIGenericResult(data: types, success: true); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 87331d85..0f735217 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -707,7 +707,8 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future> getAvailableLocations() async { + Future>> + getAvailableLocations() async { List locations = []; final Dio client = await getClient(); @@ -728,15 +729,20 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { .toList(); } catch (e) { print(e); + return APIGenericResult( + success: false, + data: [], + message: e.toString(), + ); } finally { close(client); } - return locations; + return APIGenericResult(success: true, data: locations); } @override - Future> getServerTypesByLocation({ + Future>> getServerTypesByLocation({ required final ServerProviderLocation location, }) async { final List types = []; @@ -769,11 +775,16 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } } catch (e) { print(e); + return APIGenericResult( + data: [], + success: false, + message: e.toString(), + ); } finally { close(client); } - return types; + return APIGenericResult(data: types, success: true); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 45e2bd2e..1b9a320a 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -22,8 +22,9 @@ class ProviderApiTokenValidation { abstract class ServerProviderApi extends ApiMap { Future> getServers(); - Future> getAvailableLocations(); - Future> getServerTypesByLocation({ + Future>> + getAvailableLocations(); + Future>> getServerTypesByLocation({ required final ServerProviderLocation location, }); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index dd9dadbd..ef23d18a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -123,9 +123,18 @@ class ServerInstallationCubit extends Cubit { return []; } - return ApiController.currentServerProviderApiFactory! + final APIGenericResult apiResult = await ApiController + .currentServerProviderApiFactory! .getServerProvider() .getAvailableLocations(); + + if (!apiResult.success) { + getIt().showSnackBar( + 'initializing.could_not_connect'.tr(), + ); + } + + return apiResult.data; } Future> fetchAvailableTypesByLocation( @@ -135,9 +144,18 @@ class ServerInstallationCubit extends Cubit { return []; } - return ApiController.currentServerProviderApiFactory! + final APIGenericResult apiResult = await ApiController + .currentServerProviderApiFactory! .getServerProvider() .getServerTypesByLocation(location: location); + + if (!apiResult.success) { + getIt().showSnackBar( + 'initializing.could_not_connect'.tr(), + ); + } + + return apiResult.data; } void setServerProviderKey(final String serverProviderKey) async { From e62e8bf916c4757330c25c1fa33074126b1e3891 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 28 Nov 2022 23:55:37 +0400 Subject: [PATCH 285/732] feat: Implement distinction for connection errors on dns provider page Now user gets notified when connection error occurs --- .../dns_providers/cloudflare/cloudflare.dart | 39 +++++++++++++------ .../rest_maps/dns_providers/dns_provider.dart | 5 ++- .../initializing/dns_provider_form_cubit.dart | 11 ++++-- .../server_installation_cubit.dart | 22 ++++++++--- 4 files changed, 55 insertions(+), 22 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index c79f0987..f4d786ca 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -46,33 +46,50 @@ class CloudflareApi extends DnsProviderApi { String rootAddress = 'https://api.cloudflare.com/client/v4'; @override - Future isApiTokenValid(final String token) async { + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; + String message = ''; final Dio client = await getClient(); try { response = await client.get( '/user/tokens/verify', - options: Options(headers: {'Authorization': 'Bearer $token'}), + options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), + headers: {'Authorization': 'Bearer $token'}, + ), ); } catch (e) { print(e); isValid = false; + message = e.toString(); } finally { close(client); } - if (response != null) { - if (response.statusCode == HttpStatus.ok) { - isValid = true; - } else if (response.statusCode == HttpStatus.unauthorized) { - isValid = false; - } else { - throw Exception('code: ${response.statusCode}'); - } + if (response == null) { + return APIGenericResult( + data: isValid, + success: false, + message: message, + ); } - return isValid; + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + + return APIGenericResult( + data: isValid, + success: true, + message: response.statusMessage, + ); } @override diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 3ff6222e..2c538251 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -1,7 +1,10 @@ +import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; + class DomainNotFoundException implements Exception { DomainNotFoundException(this.message); final String message; @@ -26,6 +29,6 @@ abstract class DnsProviderApi extends ApiMap { Future getZoneId(final String domain); Future> domainList(); - Future isApiTokenValid(final String token); + Future> isApiTokenValid(final String token); RegExp getApiTokenValidation(); } diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index e50d7db3..553c3492 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -28,21 +28,24 @@ class DnsProviderFormCubit extends FormCubit { @override FutureOr asyncValidation() async { - late bool isKeyValid; + bool? isKeyValid; try { isKeyValid = await initializingCubit .isDnsProviderApiTokenValid(apiKey.state.value); } catch (e) { addError(e); - isKeyValid = false; + } + + if (isKeyValid == null) { + apiKey.setError(''); + return false; } if (!isKeyValid) { apiKey.setError('initializing.cloudflare_bad_key_error'.tr()); - return false; } - return true; + return isKeyValid; } } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index ef23d18a..c63154c0 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -98,7 +98,7 @@ class ServerInstallationCubit extends Cubit { return apiResponse.data; } - Future isDnsProviderApiTokenValid( + Future isDnsProviderApiTokenValid( final String providerToken, ) async { if (ApiController.currentDnsProviderApiFactory == null) { @@ -111,11 +111,21 @@ class ServerInstallationCubit extends Cubit { ); } - return ApiController.currentDnsProviderApiFactory! - .getDnsProvider( - settings: const DnsProviderApiSettings(isWithToken: false), - ) - .isApiTokenValid(providerToken); + final APIGenericResult apiResponse = + await ApiController.currentDnsProviderApiFactory! + .getDnsProvider( + settings: const DnsProviderApiSettings(isWithToken: false), + ) + .isApiTokenValid(providerToken); + + if (!apiResponse.success) { + getIt().showSnackBar( + 'initializing.could_not_connect'.tr(), + ); + return null; + } + + return apiResponse.data; } Future> fetchAvailableLocations() async { From 6b5a4f78757a00f4e3c20866ac9af2d3f0b5bff4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 29 Nov 2022 15:27:19 +0400 Subject: [PATCH 286/732] chore: Make assets for connectior eroor shorter To fit on screen --- assets/translations/en.json | 2 +- assets/translations/ru.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index de30d6f0..d490583e 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -273,7 +273,7 @@ "place_where_data": "A place where your data and SelfPrivacy services will reside:", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", - "could_not_connect": "Counldn't connect to the provider, please check your connection.", + "could_not_connect": "Counldn't connect to the provider.", "choose_location_type": "Choose your server location and type:", "back_to_locations": "Go back to available locations!", "no_locations_found": "No available locations found. Make sure your account is accessible.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index b1228fa1..17cdbcad 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -272,7 +272,7 @@ "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", "how": "Как получить API Token", "provider_bad_key_error": "API ключ провайдера неверен", - "could_not_connect": "Не удалось соединиться с провайдером. Пожалуйста, проверьте подключение.", + "could_not_connect": "Не удалось соединиться с провайдером.", "choose_location_type": "Выберите локацию и тип вашего сервера:", "back_to_locations": "Назад к доступным локациям!", "no_locations_found": "Не найдено локаций. Убедитесь, что ваш аккаунт доступен.", From 1dfd2180d2f08626577f94b7fa8f2b8eddefb8db Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 29 Nov 2022 15:28:09 +0400 Subject: [PATCH 287/732] feat: Implement distinction for connection errors on storage page Now user gets notified when connection error occurs --- lib/logic/api_maps/rest_maps/backblaze.dart | 35 +++++++++++++++---- .../initializing/backblaze_form_cubit.dart | 29 ++++++++++----- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index 5140311d..95ced573 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -2,9 +2,12 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; +export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; + class BackblazeApiAuth { BackblazeApiAuth({required this.authorizationToken, required this.apiUrl}); @@ -71,28 +74,46 @@ class BackblazeApi extends ApiMap { ); } - Future isValid(final String encodedApiKey) async { + Future> isApiTokenValid( + final String encodedApiKey, + ) async { final Dio client = await getClient(); + bool isTokenValid = false; try { final Response response = await client.get( 'b2_authorize_account', - options: Options(headers: {'Authorization': 'Basic $encodedApiKey'}), + options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), + headers: {'Authorization': 'Basic $encodedApiKey'}, + ), ); if (response.statusCode == HttpStatus.ok) { if (response.data['allowed']['capabilities'].contains('listBuckets')) { - return true; + isTokenValid = true; } - return false; + isTokenValid = false; } else if (response.statusCode == HttpStatus.unauthorized) { - return false; + isTokenValid = false; } else { throw Exception('code: ${response.statusCode}'); } - } on DioError { - return false; + } on DioError catch (e) { + print(e); + return APIGenericResult( + data: false, + success: false, + message: e.toString(), + ); } finally { close(client); } + + return APIGenericResult( + data: isTokenValid, + success: true, + ); } // Create bucket diff --git a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart index 2a9f4662..7390eee1 100644 --- a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart @@ -1,13 +1,14 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/get_it/navigation.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:easy_localization/easy_localization.dart'; class BackblazeFormCubit extends FormCubit { BackblazeFormCubit(this.serverInstallationCubit) { - //var regExp = RegExp(r"\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]"); keyId = FieldCubit( initalValue: '', validations: [ @@ -40,7 +41,7 @@ class BackblazeFormCubit extends FormCubit { @override FutureOr asyncValidation() async { - late bool isKeyValid; + late APIGenericResult backblazeResponse; final BackblazeApi apiClient = BackblazeApi(isWithToken: false); try { @@ -48,18 +49,30 @@ class BackblazeFormCubit extends FormCubit { keyId.state.value, applicationKey.state.value, ); - isKeyValid = await apiClient.isValid(encodedApiKey); + backblazeResponse = await apiClient.isApiTokenValid(encodedApiKey); } catch (e) { addError(e); - isKeyValid = false; + backblazeResponse = APIGenericResult( + success: false, + data: false, + message: e.toString(), + ); } - if (!isKeyValid) { - keyId.setError('initializing.backblaze_bad_key_error'.tr()); - applicationKey.setError('initializing.backblaze_bad_key_error'.tr()); + if (!backblazeResponse.success) { + getIt().showSnackBar( + 'initializing.could_not_connect'.tr(), + ); + keyId.setError(''); + applicationKey.setError(''); return false; } - return true; + if (!backblazeResponse.data) { + keyId.setError('initializing.backblaze_bad_key_error'.tr()); + applicationKey.setError('initializing.backblaze_bad_key_error'.tr()); + } + + return backblazeResponse.data; } } From 65f5d987e2f0747e17552d0d88da49d021145ba7 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 29 Nov 2022 19:21:36 +0400 Subject: [PATCH 288/732] feat: Implement error handling for server installation Now user gets notified when connection error occurs --- .../dns_providers/cloudflare/cloudflare.dart | 20 ++++++- .../rest_maps/dns_providers/dns_provider.dart | 4 +- .../digital_ocean/digital_ocean.dart | 4 +- .../server_providers/hetzner/hetzner.dart | 9 +++- .../server_providers/server_provider.dart | 2 +- .../server_installation_repository.dart | 54 +++++++++++++------ 6 files changed, 71 insertions(+), 22 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index f4d786ca..14cf5c96 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -113,7 +113,7 @@ class CloudflareApi extends DnsProviderApi { } @override - Future removeSimilarRecords({ + Future> removeSimilarRecords({ required final ServerDomain domain, final String? ip4, }) async { @@ -139,9 +139,16 @@ class CloudflareApi extends DnsProviderApi { await Future.wait(allDeleteFutures); } catch (e) { print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } + + return APIGenericResult(success: true, data: null); } @override @@ -183,7 +190,7 @@ class CloudflareApi extends DnsProviderApi { } @override - Future createMultipleDnsRecords({ + Future> createMultipleDnsRecords({ required final ServerDomain domain, final String? ip4, }) async { @@ -206,9 +213,18 @@ class CloudflareApi extends DnsProviderApi { } on DioError catch (e) { print(e.message); rethrow; + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } + + return APIGenericResult(success: true, data: null); } List projectDnsRecords( diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 2c538251..106d185c 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -14,11 +14,11 @@ abstract class DnsProviderApi extends ApiMap { Future> getDnsRecords({ required final ServerDomain domain, }); - Future removeSimilarRecords({ + Future> removeSimilarRecords({ required final ServerDomain domain, final String? ip4, }); - Future createMultipleDnsRecords({ + Future> createMultipleDnsRecords({ required final ServerDomain domain, final String? ip4, }); diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 55534b1d..86cda482 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -790,11 +790,13 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future createReverseDns({ + Future> createReverseDns({ required final ServerHostingDetails serverDetails, required final ServerDomain domain, }) async { /// TODO remove from provider interface + const bool success = true; + return APIGenericResult(success: success, data: null); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 0f735217..4b51b27c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -788,7 +788,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future createReverseDns({ + Future> createReverseDns({ required final ServerHostingDetails serverDetails, required final ServerDomain domain, }) async { @@ -803,8 +803,15 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } catch (e) { print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } + + return APIGenericResult(success: true, data: null); } } diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 1b9a320a..21f6f376 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -38,7 +38,7 @@ abstract class ServerProviderApi extends ApiMap { required final String domainName, required final String serverType, }); - Future createReverseDns({ + Future> createReverseDns({ required final ServerHostingDetails serverDetails, required final ServerDomain domain, }); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 8365529a..fb4d9d15 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -334,21 +334,9 @@ class ServerInstallationRepository { final ServerProviderApi serverApi = ApiController.currentServerProviderApiFactory!.getServerProvider(); - await dnsProviderApi.removeSimilarRecords( - ip4: serverDetails.ip4, - domain: domain, - ); - - try { - await dnsProviderApi.createMultipleDnsRecords( - ip4: serverDetails.ip4, - domain: domain, - ); - } on DioError catch (e) { + void showDomainErrorPopUp(final String error) { showPopUpAlert( - alertTitle: e.response!.data['errors'][0]['code'] == 1038 - ? 'modals.you_cant_use_this_api'.tr() - : 'domain.error'.tr(), + alertTitle: error, description: 'modals.delete_server_volume'.tr(), cancelButtonOnPressed: onCancel, actionButtonTitle: 'basis.delete'.tr(), @@ -359,14 +347,50 @@ class ServerInstallationRepository { onCancel(); }, ); + } + + final APIGenericResult removingResult = + await dnsProviderApi.removeSimilarRecords( + ip4: serverDetails.ip4, + domain: domain, + ); + + if (!removingResult.success) { + showDomainErrorPopUp('domain.error'.tr()); return false; } - await serverApi.createReverseDns( + bool createdSuccessfully = false; + String errorMessage = 'domain.error'.tr(); + try { + final APIGenericResult createResult = + await dnsProviderApi.createMultipleDnsRecords( + ip4: serverDetails.ip4, + domain: domain, + ); + createdSuccessfully = createResult.success; + } on DioError catch (e) { + if (e.response!.data['errors'][0]['code'] == 1038) { + errorMessage = 'modals.you_cant_use_this_api'.tr(); + } + } + + if (!createdSuccessfully) { + showDomainErrorPopUp(errorMessage); + return false; + } + + final APIGenericResult createReverseResult = + await serverApi.createReverseDns( serverDetails: serverDetails, domain: domain, ); + if (!createReverseResult.success) { + showDomainErrorPopUp(errorMessage); + return false; + } + return true; } From 54d8b044394497ac0874f4d54167c83398fdbe94 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 30 Nov 2022 19:02:30 +0400 Subject: [PATCH 289/732] fix: Fix backblaze token validation True if correct, false if incorrect, null if no connection --- lib/logic/api_maps/rest_maps/backblaze.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index 95ced573..edc283b5 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -90,10 +90,7 @@ class BackblazeApi extends ApiMap { ), ); if (response.statusCode == HttpStatus.ok) { - if (response.data['allowed']['capabilities'].contains('listBuckets')) { - isTokenValid = true; - } - isTokenValid = false; + isTokenValid = response.data['allowed']['capabilities'].contains('listBuckets'); } else if (response.statusCode == HttpStatus.unauthorized) { isTokenValid = false; } else { From 899c84c54fa4e2844bc2b3d4fcc0ac20d43785a1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 30 Nov 2022 19:04:04 +0400 Subject: [PATCH 290/732] chore: Rename Check step to Installation It just feels more convenient tbh... --- lib/ui/pages/setup/initializing/initializing.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 29fcd6f0..1e3e7982 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -77,7 +77,7 @@ class InitializingPage extends StatelessWidget { 'Domain', 'User', 'Server', - 'Check', + 'Installation', ], activeIndex: cubit.state.porgressBar, ), From 29b0bf23976111fad52fbc77930305b1936206cc Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 30 Nov 2022 19:05:21 +0400 Subject: [PATCH 291/732] fix: Fix some initializing errors Correct progress index calculation and hardcore cloudflare loading until new providers for DNS are supported --- .../server_installation_repository.dart | 13 ++++++------- .../server_installation_state.dart | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index fb4d9d15..80c3ee0d 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -75,13 +75,12 @@ class ServerInstallationRepository { ); } - if (serverDomain != null && serverDomain.provider != DnsProvider.unknown) { - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: serverDomain.provider, - ), - ); - } + // No other DNS provider is supported for now, so it's fine. + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: DnsProvider.cloudflare, + ), + ); if (box.get(BNames.hasFinalChecked, defaultValue: false)) { return ServerInstallationFinished( diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 331c3e2a..69934bbd 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -48,7 +48,7 @@ abstract class ServerInstallationState extends Equatable { bool get isFullyInitilized => _fulfilementList.every((final el) => el!); ServerSetupProgress get progress => ServerSetupProgress - .values[_fulfilementList.where((final el) => el!).length]; + .values[_fulfilementList.where((final el) => el!).length + 1]; int get porgressBar { if (progress.index < 6) { From e0b32404bedb60f913cd16313d8297882d79ec94 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Dec 2022 22:40:08 +0400 Subject: [PATCH 292/732] refactor: Implement better error handling on create server stage Replace try-catch hell with APIGenericResult chain --- lib/logic/api_maps/api_generic_result.dart | 2 + .../graphql_maps/server_api/jobs_api.dart | 6 +- .../graphql_maps/server_api/server_api.dart | 10 --- .../graphql_maps/server_api/services_api.dart | 36 ++++---- .../graphql_maps/server_api/users_api.dart | 30 +++---- .../graphql_maps/server_api/volume_api.dart | 8 +- .../digital_ocean/digital_ocean.dart | 54 +++++++++--- .../server_providers/hetzner/hetzner.dart | 68 ++++++++++----- .../server_providers/server_provider.dart | 2 +- .../server_providers/volume_provider.dart | 10 ++- .../initializing/backblaze_form_cubit.dart | 1 - .../provider_volume_cubit.dart | 9 +- .../server_installation_repository.dart | 82 +++++++++++-------- lib/logic/cubit/users/users_cubit.dart | 10 +-- 14 files changed, 197 insertions(+), 131 deletions(-) diff --git a/lib/logic/api_maps/api_generic_result.dart b/lib/logic/api_maps/api_generic_result.dart index b5bacfb6..81e1760a 100644 --- a/lib/logic/api_maps/api_generic_result.dart +++ b/lib/logic/api_maps/api_generic_result.dart @@ -3,6 +3,7 @@ class APIGenericResult { required this.success, required this.data, this.message, + this.code, }); /// Whether was a response successfully received, @@ -10,4 +11,5 @@ class APIGenericResult { final bool success; final String? message; final T data; + final int? code; } diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart index 84acff43..c14aa98d 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -22,13 +22,13 @@ mixin JobsApi on ApiMap { return jobsList; } - Future> removeApiJob(final String uid) async { + Future> removeApiJob(final String uid) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$RemoveJob(jobId: uid); final mutation = Options$Mutation$RemoveJob(variables: variables); final response = await client.mutate$RemoveJob(mutation); - return GenericMutationResult( + return APIGenericResult( data: response.parsedData?.removeJob.success ?? false, success: true, code: response.parsedData?.removeJob.code ?? 0, @@ -36,7 +36,7 @@ mixin JobsApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: false, success: false, code: 0, diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 5216ffa8..bb703103 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -31,16 +31,6 @@ part 'services_api.dart'; part 'users_api.dart'; part 'volume_api.dart'; -class GenericMutationResult extends APIGenericResult { - GenericMutationResult({ - required super.success, - required this.code, - required super.data, - super.message, - }); - final int code; -} - class ServerApi extends ApiMap with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi { ServerApi({ diff --git a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart index a2e85914..adfe806f 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart @@ -20,7 +20,7 @@ mixin ServicesApi on ApiMap { return services; } - Future> enableService( + Future> enableService( final String serviceId, ) async { try { @@ -28,7 +28,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$EnableService(serviceId: serviceId); final mutation = Options$Mutation$EnableService(variables: variables); final response = await client.mutate$EnableService(mutation); - return GenericMutationResult( + return APIGenericResult( data: response.parsedData?.enableService.success ?? false, success: true, code: response.parsedData?.enableService.code ?? 0, @@ -36,7 +36,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: false, success: false, code: 0, @@ -45,7 +45,7 @@ mixin ServicesApi on ApiMap { } } - Future> disableService( + Future> disableService( final String serviceId, ) async { try { @@ -53,7 +53,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$DisableService(serviceId: serviceId); final mutation = Options$Mutation$DisableService(variables: variables); final response = await client.mutate$DisableService(mutation); - return GenericMutationResult( + return APIGenericResult( data: null, success: response.parsedData?.disableService.success ?? false, code: response.parsedData?.disableService.code ?? 0, @@ -61,7 +61,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: null, success: false, code: 0, @@ -70,7 +70,7 @@ mixin ServicesApi on ApiMap { } } - Future> stopService( + Future> stopService( final String serviceId, ) async { try { @@ -78,7 +78,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$StopService(serviceId: serviceId); final mutation = Options$Mutation$StopService(variables: variables); final response = await client.mutate$StopService(mutation); - return GenericMutationResult( + return APIGenericResult( data: response.parsedData?.stopService.success ?? false, success: true, code: response.parsedData?.stopService.code ?? 0, @@ -86,7 +86,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: false, success: false, code: 0, @@ -95,13 +95,13 @@ mixin ServicesApi on ApiMap { } } - Future startService(final String serviceId) async { + Future startService(final String serviceId) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$StartService(serviceId: serviceId); final mutation = Options$Mutation$StartService(variables: variables); final response = await client.mutate$StartService(mutation); - return GenericMutationResult( + return APIGenericResult( data: null, success: response.parsedData?.startService.success ?? false, code: response.parsedData?.startService.code ?? 0, @@ -109,7 +109,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: null, success: false, code: 0, @@ -118,7 +118,7 @@ mixin ServicesApi on ApiMap { } } - Future> restartService( + Future> restartService( final String serviceId, ) async { try { @@ -126,7 +126,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$RestartService(serviceId: serviceId); final mutation = Options$Mutation$RestartService(variables: variables); final response = await client.mutate$RestartService(mutation); - return GenericMutationResult( + return APIGenericResult( data: response.parsedData?.restartService.success ?? false, success: true, code: response.parsedData?.restartService.code ?? 0, @@ -134,7 +134,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: false, success: false, code: 0, @@ -143,7 +143,7 @@ mixin ServicesApi on ApiMap { } } - Future> moveService( + Future> moveService( final String serviceId, final String destination, ) async { @@ -158,7 +158,7 @@ mixin ServicesApi on ApiMap { final mutation = Options$Mutation$MoveService(variables: variables); final response = await client.mutate$MoveService(mutation); final jobJson = response.parsedData?.moveService.job?.toJson(); - return GenericMutationResult( + return APIGenericResult( success: true, code: response.parsedData?.moveService.code ?? 0, message: response.parsedData?.moveService.message, @@ -166,7 +166,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( success: false, code: 0, message: e.toString(), diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index c11f6a0e..f1851353 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -45,7 +45,7 @@ mixin UsersApi on ApiMap { return user; } - Future> createUser( + Future> createUser( final String username, final String password, ) async { @@ -56,7 +56,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$CreateUser(variables: variables); final response = await client.mutate$CreateUser(mutation); - return GenericMutationResult( + return APIGenericResult( success: true, code: response.parsedData?.createUser.code ?? 500, message: response.parsedData?.createUser.message, @@ -66,7 +66,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( success: false, code: 0, message: e.toString(), @@ -75,7 +75,7 @@ mixin UsersApi on ApiMap { } } - Future> deleteUser( + Future> deleteUser( final String username, ) async { try { @@ -83,7 +83,7 @@ mixin UsersApi on ApiMap { final variables = Variables$Mutation$DeleteUser(username: username); final mutation = Options$Mutation$DeleteUser(variables: variables); final response = await client.mutate$DeleteUser(mutation); - return GenericMutationResult( + return APIGenericResult( data: response.parsedData?.deleteUser.success ?? false, success: true, code: response.parsedData?.deleteUser.code ?? 500, @@ -91,7 +91,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: false, success: false, code: 500, @@ -100,7 +100,7 @@ mixin UsersApi on ApiMap { } } - Future> updateUser( + Future> updateUser( final String username, final String password, ) async { @@ -111,7 +111,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$UpdateUser(variables: variables); final response = await client.mutate$UpdateUser(mutation); - return GenericMutationResult( + return APIGenericResult( success: true, code: response.parsedData?.updateUser.code ?? 500, message: response.parsedData?.updateUser.message, @@ -121,7 +121,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: null, success: false, code: 0, @@ -130,7 +130,7 @@ mixin UsersApi on ApiMap { } } - Future> addSshKey( + Future> addSshKey( final String username, final String sshKey, ) async { @@ -144,7 +144,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$AddSshKey(variables: variables); final response = await client.mutate$AddSshKey(mutation); - return GenericMutationResult( + return APIGenericResult( success: true, code: response.parsedData?.addSshKey.code ?? 500, message: response.parsedData?.addSshKey.message, @@ -154,7 +154,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: null, success: false, code: 0, @@ -163,7 +163,7 @@ mixin UsersApi on ApiMap { } } - Future> removeSshKey( + Future> removeSshKey( final String username, final String sshKey, ) async { @@ -177,7 +177,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$RemoveSshKey(variables: variables); final response = await client.mutate$RemoveSshKey(mutation); - return GenericMutationResult( + return APIGenericResult( success: response.parsedData?.removeSshKey.success ?? false, code: response.parsedData?.removeSshKey.code ?? 500, message: response.parsedData?.removeSshKey.message, @@ -187,7 +187,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return GenericMutationResult( + return APIGenericResult( data: null, success: false, code: 0, diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index 360dd491..e830cabd 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -57,10 +57,10 @@ mixin VolumeApi on ApiMap { } } - Future> migrateToBinds( + Future> migrateToBinds( final Map serviceToDisk, ) async { - GenericMutationResult? mutation; + APIGenericResult? mutation; try { final GraphQLClient client = await getClient(); @@ -78,7 +78,7 @@ mixin VolumeApi on ApiMap { await client.mutate$MigrateToBinds( migrateMutation, ); - mutation = mutation = GenericMutationResult( + mutation = mutation = APIGenericResult( success: true, code: result.parsedData!.migrateToBinds.code, message: result.parsedData!.migrateToBinds.message, @@ -86,7 +86,7 @@ mixin VolumeApi on ApiMap { ); } catch (e) { print(e); - mutation = GenericMutationResult( + mutation = APIGenericResult( success: false, code: 0, message: e.toString(), diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 86cda482..1ab5795c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -114,10 +114,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); @override - Future createVolume() async { + Future> createVolume() async { ServerVolume? volume; - final Response createVolumeResponse; + Response? createVolumeResponse; final Dio client = await getClient(); try { final List volumes = await getVolumes(); @@ -146,11 +146,21 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } catch (e) { print(e); + return APIGenericResult( + data: null, + success: false, + message: e.toString(), + ); } finally { client.close(); } - return volume; + return APIGenericResult( + data: volume, + success: true, + code: createVolumeResponse.statusCode, + message: createVolumeResponse.statusMessage, + ); } @override @@ -219,13 +229,13 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future attachVolume( + Future> attachVolume( final ServerVolume volume, final int serverId, ) async { bool success = false; - final Response attachVolumeResponse; + Response? attachVolumeResponse; final Dio client = await getClient(); try { attachVolumeResponse = await client.post( @@ -241,11 +251,21 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { attachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); + return APIGenericResult( + data: false, + success: false, + message: e.toString(), + ); } finally { close(client); } - return success; + return APIGenericResult( + data: success, + success: true, + code: attachVolumeResponse.statusCode, + message: attachVolumeResponse.statusMessage, + ); } @override @@ -323,7 +343,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future createServer({ + Future> createServer({ required final String dnsApiToken, required final User rootUser, required final String domainName, @@ -345,6 +365,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); + Response? serverCreateResponse; final Dio client = await getClient(); try { final Map data = { @@ -356,14 +377,15 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { }; print('Decoded data: $data'); - final Response serverCreateResponse = await client.post( + serverCreateResponse = await client.post( '/droplets', data: data, ); final int serverId = serverCreateResponse.data['droplet']['id']; - final ServerVolume? newVolume = await createVolume(); - final bool attachedVolume = await attachVolume(newVolume!, serverId); + final ServerVolume? newVolume = (await createVolume()).data; + final bool attachedVolume = + (await attachVolume(newVolume!, serverId)).data; String? ipv4; int attempts = 0; @@ -391,11 +413,21 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } } catch (e) { print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } - return serverDetails; + return APIGenericResult( + data: serverDetails, + success: true, + code: serverCreateResponse.statusCode, + message: serverCreateResponse.statusMessage, + ); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 4b51b27c..6e2049e9 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -140,10 +140,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future createVolume() async { + Future> createVolume() async { ServerVolume? volume; - final Response createVolumeResponse; + Response? createVolumeResponse; final Dio client = await getClient(); try { createVolumeResponse = await client.post( @@ -171,11 +171,21 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } catch (e) { print(e); + return APIGenericResult( + data: null, + success: false, + message: e.toString(), + ); } finally { client.close(); } - return volume; + return APIGenericResult( + data: volume, + success: true, + code: createVolumeResponse.statusCode, + message: createVolumeResponse.statusMessage, + ); } @override @@ -259,13 +269,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future attachVolume( + Future> attachVolume( final ServerVolume volume, final int serverId, ) async { bool success = false; - final Response attachVolumeResponse; + Response? attachVolumeResponse; final Dio client = await getClient(); try { attachVolumeResponse = await client.post( @@ -283,7 +293,12 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { client.close(); } - return success; + return APIGenericResult( + data: success, + success: true, + code: attachVolumeResponse?.statusCode, + message: attachVolumeResponse?.statusMessage, + ); } @override @@ -335,31 +350,33 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future createServer({ + Future> createServer({ required final String dnsApiToken, required final User rootUser, required final String domainName, required final String serverType, }) async { - ServerHostingDetails? details; + final APIGenericResult newVolumeResponse = + await createVolume(); - final ServerVolume? newVolume = await createVolume(); - if (newVolume == null) { - return details; + if (!newVolumeResponse.success || newVolumeResponse.data == null) { + return APIGenericResult( + data: null, + success: false, + message: newVolumeResponse.message, + code: newVolumeResponse.code, + ); } - - details = await createServerWithVolume( + return createServerWithVolume( dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, - volume: newVolume, + volume: newVolumeResponse.data!, serverType: serverType, ); - - return details; } - Future createServerWithVolume({ + Future> createServerWithVolume({ required final String dnsApiToken, required final User rootUser, required final String domainName, @@ -381,6 +398,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String userdataString = "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + Response? serverCreateResponse; ServerHostingDetails? serverDetails; DioError? hetznerError; bool success = false; @@ -400,7 +418,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { }; print('Decoded data: $data'); - final Response serverCreateResponse = await client.post( + serverCreateResponse = await client.post( '/servers', data: data, ); @@ -428,11 +446,19 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { await deleteVolume(volume); } - if (hetznerError != null) { - throw hetznerError; + String? apiResultMessage = serverCreateResponse?.statusMessage; + if (hetznerError != null && + hetznerError.response!.data['error']['code'] == 'uniqueness_error') { + apiResultMessage = 'uniqueness_error'; } - return serverDetails; + return APIGenericResult( + data: serverDetails, + success: success && hetznerError == null, + code: serverCreateResponse?.statusCode ?? + hetznerError?.response?.statusCode, + message: apiResultMessage, + ); } static String getHostnameFromDomain(final String domain) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 21f6f376..05fb5e61 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -32,7 +32,7 @@ abstract class ServerProviderApi extends ApiMap { Future powerOn(); Future deleteServer({required final String domainName}); - Future createServer({ + Future> createServer({ required final String dnsApiToken, required final User rootUser, required final String domainName, diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart index d3ae6f2a..5e01d268 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart @@ -1,12 +1,18 @@ +import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/price.dart'; +export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; + mixin VolumeProviderApi on ApiMap { - Future createVolume(); + Future> createVolume(); Future> getVolumes({final String? status}); - Future attachVolume(final ServerVolume volume, final int serverId); + Future> attachVolume( + final ServerVolume volume, + final int serverId, + ); Future detachVolume(final ServerVolume volume); Future resizeVolume(final ServerVolume volume, final DiskSize size); Future deleteVolume(final ServerVolume volume); diff --git a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart index 7390eee1..21d17a84 100644 --- a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart @@ -3,7 +3,6 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/get_it/navigation.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:easy_localization/easy_localization.dart'; diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 11e180d0..ff8eb797 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -113,10 +113,11 @@ class ApiProviderVolumeCubit } Future createVolume() async { - final ServerVolume? volume = await ApiController - .currentVolumeProviderApiFactory! - .getVolumeProvider() - .createVolume(); + final ServerVolume? volume = (await ApiController + .currentVolumeProviderApiFactory! + .getVolumeProvider() + .createVolume()) + .data; final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 80c3ee0d..b495ec0d 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -246,22 +246,52 @@ class ServerInstallationRepository { }) async { final ServerProviderApi api = ApiController.currentServerProviderApiFactory!.getServerProvider(); + + void showInstallationErrorPopUp() { + showPopUpAlert( + alertTitle: 'modals.unexpected_error'.tr(), + description: 'modals.try_again'.tr(), + actionButtonTitle: 'modals.yes'.tr(), + actionButtonOnPressed: () async { + ServerHostingDetails? serverDetails; + try { + final APIGenericResult createResult = await api.createServer( + dnsApiToken: cloudFlareKey, + rootUser: rootUser, + domainName: domainName, + serverType: getIt().serverType!, + ); + serverDetails = createResult.data; + } catch (e) { + print(e); + } + + if (serverDetails == null) { + print('Server is not initialized!'); + return; + } + await saveServerDetails(serverDetails); + onSuccess(serverDetails); + }, + cancelButtonOnPressed: onCancel, + ); + } + try { - final ServerHostingDetails? serverDetails = await api.createServer( + final APIGenericResult createServerResult = + await api.createServer( dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, ); - if (serverDetails == null) { - print('Server is not initialized!'); - return; + if (createServerResult.data == null) { + const String e = 'Server is not initialized!'; + print(e); } - saveServerDetails(serverDetails); - onSuccess(serverDetails); - } on DioError catch (e) { - if (e.response!.data['error']['code'] == 'uniqueness_error') { + + if (createServerResult.message == 'uniqueness_error') { showPopUpAlert( alertTitle: 'modals.already_exists'.tr(), description: 'modals.destroy_server'.tr(), @@ -273,39 +303,13 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { - serverDetails = await api.createServer( - dnsApiToken: cloudFlareKey, - rootUser: rootUser, - domainName: domainName, - serverType: getIt().serverType!, - ); - } catch (e) { - print(e); - } - - if (serverDetails == null) { - print('Server is not initialized!'); - return; - } - await saveServerDetails(serverDetails); - onSuccess(serverDetails); - }, - cancelButtonOnPressed: onCancel, - ); - } else { - showPopUpAlert( - alertTitle: 'modals.unexpected_error'.tr(), - description: 'modals.try_again'.tr(), - actionButtonTitle: 'modals.yes'.tr(), - actionButtonOnPressed: () async { - ServerHostingDetails? serverDetails; - try { - serverDetails = await api.createServer( + final APIGenericResult createResult = await api.createServer( dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, ); + serverDetails = createResult.data; } catch (e) { print(e); } @@ -320,6 +324,12 @@ class ServerInstallationRepository { cancelButtonOnPressed: onCancel, ); } + + saveServerDetails(createServerResult.data!); + onSuccess(createServerResult.data!); + } catch (e) { + print(e); + showInstallationErrorPopUp(); } } diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 070fce2c..001ce8d0 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -78,7 +78,7 @@ class UsersCubit extends ServerInstallationDependendCubit { return; } // If API returned error, do nothing - final GenericMutationResult result = + final APIGenericResult result = await api.createUser(user.login, password); if (result.data == null) { getIt() @@ -101,7 +101,7 @@ class UsersCubit extends ServerInstallationDependendCubit { return; } final List loadedUsers = List.from(state.users); - final GenericMutationResult result = await api.deleteUser(user.login); + final APIGenericResult result = await api.deleteUser(user.login); if (result.success && result.data) { loadedUsers.removeWhere((final User u) => u.login == user.login); await box.clear(); @@ -128,7 +128,7 @@ class UsersCubit extends ServerInstallationDependendCubit { .showSnackBar('users.could_not_change_password'.tr()); return; } - final GenericMutationResult result = + final APIGenericResult result = await api.updateUser(user.login, newPassword); if (result.data == null) { getIt().showSnackBar( @@ -138,7 +138,7 @@ class UsersCubit extends ServerInstallationDependendCubit { } Future addSshKey(final User user, final String publicKey) async { - final GenericMutationResult result = + final APIGenericResult result = await api.addSshKey(user.login, publicKey); if (result.data != null) { final User updatedUser = result.data!; @@ -157,7 +157,7 @@ class UsersCubit extends ServerInstallationDependendCubit { } Future deleteSshKey(final User user, final String publicKey) async { - final GenericMutationResult result = + final APIGenericResult result = await api.removeSshKey(user.login, publicKey); if (result.data != null) { final User updatedUser = result.data!; From b5133aa2a6206cee969b82a532e569a66e31c193 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Dec 2022 23:06:57 +0400 Subject: [PATCH 293/732] fix: Remove breaking installation changes --- .../server_installation/server_installation_repository.dart | 1 + .../cubit/server_installation/server_installation_state.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index b495ec0d..05863b83 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -323,6 +323,7 @@ class ServerInstallationRepository { }, cancelButtonOnPressed: onCancel, ); + return; } saveServerDetails(createServerResult.data!); diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 69934bbd..331c3e2a 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -48,7 +48,7 @@ abstract class ServerInstallationState extends Equatable { bool get isFullyInitilized => _fulfilementList.every((final el) => el!); ServerSetupProgress get progress => ServerSetupProgress - .values[_fulfilementList.where((final el) => el!).length + 1]; + .values[_fulfilementList.where((final el) => el!).length]; int get porgressBar { if (progress.index < 6) { From d7318ed2e4433028fc471e018009989e185f349e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 13 Dec 2022 08:15:32 +0400 Subject: [PATCH 294/732] fix: Make recovery by API token endpoint expect GraphQL token We pass GraphQL token, but at the same time we did not use it and tried to authorize without token... --- .../server_installation/server_installation_repository.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 05863b83..f1aeadf5 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -583,7 +583,7 @@ class ServerInstallationRepository { final ServerRecoveryCapabilities recoveryCapabilities, ) async { final ServerApi serverApi = ServerApi( - isWithToken: false, + isWithToken: true, overrideDomain: serverDomain.domainName, customToken: apiToken, ); From 7847839ea66290f1cfcb65188b130b3bfacc2728 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 15 Dec 2022 15:42:21 +0400 Subject: [PATCH 295/732] feat: Enable server provider logging --- assets/translations/en.json | 1 + assets/translations/ru.json | 1 + .../digital_ocean/digital_ocean.dart | 2 +- .../server_providers/hetzner/hetzner.dart | 2 +- .../server_installation_cubit.dart | 33 ++++++++++++------- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index d490583e..daa4544f 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -392,6 +392,7 @@ "generation_error": "Couldn't generate a recovery key. {}" }, "modals": { + "server_validators_error": "Couldn't fetch available servers.", "already_exists": "Such server already exists.", "unexpected_error": "Unexpected error during placement from the provider side.", "destroy_server": "Destroy the server and create a new one?", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 17cdbcad..a5cc6634 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -392,6 +392,7 @@ "generation_error": "Не удалось сгенерировать ключ. {}" }, "modals": { + "server_validators_error": "Не удалось получить список серверов.", "already_exists": "Такой сервер уже существует.", "unexpected_error": "Непредвиденная ошибка со стороны провайдера.", "destroy_server": "Уничтожить сервер и создать новый?", diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 1ab5795c..c7928653 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -23,7 +23,7 @@ import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { DigitalOceanApi({ required this.region, - this.hasLogger = false, + this.hasLogger = true, this.isWithToken = true, }); @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 6e2049e9..f0e032e8 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -24,7 +24,7 @@ import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { HetznerApi({ this.region, - this.hasLogger = false, + this.hasLogger = true, this.isWithToken = true, }); @override diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index c63154c0..4da57479 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -633,18 +633,27 @@ class ServerInstallationCubit extends Cubit { state as ServerInstallationRecovery; final List servers = await repository.getServersOnProviderAccount(); - final Iterable validated = servers.map( - (final ServerBasicInfo server) => - ServerBasicInfoWithValidators.fromServerBasicInfo( - serverBasicInfo: server, - isIpValid: server.ip == dataState.serverDetails?.ip4, - isReverseDnsValid: - server.reverseDns == dataState.serverDomain?.domainName || - server.reverseDns == - dataState.serverDomain?.domainName.split('.')[0], - ), - ); - return validated.toList(); + List validatedList = []; + try { + final Iterable validated = servers.map( + (final ServerBasicInfo server) => + ServerBasicInfoWithValidators.fromServerBasicInfo( + serverBasicInfo: server, + isIpValid: server.ip == dataState.serverDetails?.ip4, + isReverseDnsValid: + server.reverseDns == dataState.serverDomain?.domainName || + server.reverseDns == + dataState.serverDomain?.domainName.split('.')[0], + ), + ); + validatedList = validated.toList(); + } catch (e) { + print(e); + getIt() + .showSnackBar('modals.server_validators_error'.tr()); + } + + return validatedList; } Future setServerId(final ServerBasicInfo server) async { From 18d3039dc4103bb28d9496720bc4738fc52e62f1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 17 Dec 2022 14:26:19 +0400 Subject: [PATCH 296/732] chore: Create infrastructure for Digital Ocean DNS provider Also rename hardcoded cloudflare names from backend --- .../rest_maps/api_factory_creator.dart | 3 + .../dns_providers/cloudflare/cloudflare.dart | 2 +- .../digital_ocean_dns/digital_ocean_dns.dart | 304 ++++++++++++++++++ .../digital_ocean_dns_factory.dart | 16 + .../initializing/dns_provider_form_cubit.dart | 2 +- .../server_installation_cubit.dart | 20 +- .../server_installation_repository.dart | 14 +- .../server_installation_state.dart | 40 +-- lib/logic/get_it/api_config.dart | 12 +- lib/logic/models/hive/server_domain.dart | 2 + .../setup/recovering/recovery_routing.dart | 2 +- 11 files changed, 371 insertions(+), 46 deletions(-) create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 25518f3c..c835b0cd 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart'; @@ -32,6 +33,8 @@ class ApiFactoryCreator { switch (settings.provider) { case DnsProvider.cloudflare: return CloudflareApiFactory(); + case DnsProvider.digitalOcean: + return DigitalOceanDnsApiFactory(); case DnsProvider.unknown: throw UnknownApiProviderException('Unknown DNS provider'); } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 14cf5c96..04ff622b 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -27,7 +27,7 @@ class CloudflareApi extends DnsProviderApi { BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); if (isWithToken) { - final String? token = getIt().cloudFlareKey; + final String? token = getIt().dnsProviderKey; assert(token != null); options.headers = {'Authorization': 'Bearer $token'}; } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart new file mode 100644 index 00000000..a633fa65 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -0,0 +1,304 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; + +class DigitalOceanDnsApi extends DnsProviderApi { + DigitalOceanDnsApi({ + this.hasLogger = false, + this.isWithToken = true, + this.customToken, + }); + @override + final bool hasLogger; + @override + final bool isWithToken; + + final String? customToken; + + @override + RegExp getApiTokenValidation() => + RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + + @override + BaseOptions get options { + final BaseOptions options = BaseOptions(baseUrl: rootAddress); + if (isWithToken) { + final String? token = getIt().dnsProviderKey; + assert(token != null); + options.headers = {'Authorization': 'Bearer $token'}; + } + + if (customToken != null) { + options.headers = {'Authorization': 'Bearer $customToken'}; + } + + if (validateStatus != null) { + options.validateStatus = validateStatus!; + } + return options; + } + + @override + String rootAddress = 'https://api.digitalocean.com/v2'; + + @override + Future> isApiTokenValid(final String token) async { + bool isValid = false; + Response? response; + String message = ''; + final Dio client = await getClient(); + try { + response = await client.get( + '/account', + options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), + headers: {'Authorization': 'Bearer $token'}, + ), + ); + } catch (e) { + print(e); + isValid = false; + message = e.toString(); + } finally { + close(client); + } + + if (response == null) { + return APIGenericResult( + data: isValid, + success: false, + message: message, + ); + } + + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + + return APIGenericResult( + data: isValid, + success: true, + message: response.statusMessage, + ); + } + + @override + // TODO: Remove from DnsProviderInterface, stub for now + Future getZoneId(final String domain) async => domain; + + @override + Future> removeSimilarRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final String domainName = domain.domainName; + final String domainZoneId = domain.zoneId; + + final String url = '/zones/$domainZoneId/dns_records'; + + final Dio client = await getClient(); + try { + final Response response = await client.get(url); + + final List records = response.data['result'] ?? []; + final List allDeleteFutures = []; + + for (final record in records) { + if (record['zone_name'] == domainName) { + allDeleteFutures.add( + client.delete('$url/${record["id"]}'), + ); + } + } + await Future.wait(allDeleteFutures); + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return APIGenericResult(success: true, data: null); + } + + @override + Future> getDnsRecords({ + required final ServerDomain domain, + }) async { + Response response; + final String domainName = domain.domainName; + final String domainZoneId = domain.zoneId; + final List allRecords = []; + + final String url = '/zones/$domainZoneId/dns_records'; + + final Dio client = await getClient(); + try { + response = await client.get(url); + final List records = response.data['result'] ?? []; + + for (final record in records) { + if (record['zone_name'] == domainName) { + allRecords.add( + DnsRecord( + name: record['name'], + type: record['type'], + content: record['content'], + ttl: record['ttl'], + proxied: record['proxied'], + ), + ); + } + } + } catch (e) { + print(e); + } finally { + close(client); + } + + return allRecords; + } + + @override + Future> createMultipleDnsRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final String domainName = domain.domainName; + final String domainZoneId = domain.zoneId; + final List listDnsRecords = projectDnsRecords(domainName, ip4); + final List allCreateFutures = []; + + final Dio client = await getClient(); + try { + for (final DnsRecord record in listDnsRecords) { + allCreateFutures.add( + client.post( + '/zones/$domainZoneId/dns_records', + data: record.toJson(), + ), + ); + } + await Future.wait(allCreateFutures); + } on DioError catch (e) { + print(e.message); + rethrow; + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return APIGenericResult(success: true, data: null); + } + + List projectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = + DnsRecord(type: 'A', name: domainName, content: ip4); + + final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: 'v=DMARC1; p=none', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } + + @override + Future setDnsRecord( + final DnsRecord record, + final ServerDomain domain, + ) async { + final String domainZoneId = domain.zoneId; + final String url = '$rootAddress/zones/$domainZoneId/dns_records'; + + final Dio client = await getClient(); + try { + await client.post( + url, + data: record.toJson(), + ); + } catch (e) { + print(e); + } finally { + close(client); + } + } + + @override + Future> domainList() async { + final String url = '$rootAddress/zones'; + List domains = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get( + url, + queryParameters: {'per_page': 50}, + ); + domains = response.data['result'] + .map((final el) => el['name'] as String) + .toList(); + } catch (e) { + print(e); + } finally { + close(client); + } + + return domains; + } +} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart new file mode 100644 index 00000000..715a4178 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart @@ -0,0 +1,16 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; + +class DigitalOceanDnsApiFactory extends DnsProviderApiFactory { + @override + DnsProviderApi getDnsProvider({ + final DnsProviderApiSettings settings = const DnsProviderApiSettings(), + }) => + DigitalOceanDnsApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + customToken: settings.customToken, + ); +} diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index 553c3492..bfcaf0f9 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -20,7 +20,7 @@ class DnsProviderFormCubit extends FormCubit { @override FutureOr onSubmit() async { - initializingCubit.setCloudflareKey(apiKey.state.value); + initializingCubit.setDnsApiToken(apiKey.state.value); } final ServerInstallationCubit initializingCubit; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index c63154c0..466d255c 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -214,16 +214,16 @@ class ServerInstallationCubit extends Cubit { ); } - void setCloudflareKey(final String cloudFlareKey) async { + void setDnsApiToken(final String dnsApiToken) async { if (state is ServerInstallationRecovery) { - setAndValidateCloudflareToken(cloudFlareKey); + setAndValidateCloudflareToken(dnsApiToken); return; } - await repository.saveCloudFlareKey(cloudFlareKey); + await repository.setDnsApiToken(dnsApiToken); emit( (state as ServerInstallationNotFinished) - .copyWith(cloudFlareKey: cloudFlareKey), + .copyWith(dnsApiToken: dnsApiToken), ); } @@ -284,7 +284,7 @@ class ServerInstallationCubit extends Cubit { await repository.createServer( state.rootUser!, state.serverDomain!.domainName, - state.cloudFlareKey!, + state.dnsApiToken!, state.backblazeCredential!, onCancel: onCancel, onSuccess: onSuccess, @@ -586,7 +586,7 @@ class ServerInstallationCubit extends Cubit { ), ); break; - case RecoveryStep.cloudflareToken: + case RecoveryStep.dnsProviderToken: repository.deleteServerDetails(); emit( dataState.copyWith( @@ -673,7 +673,7 @@ class ServerInstallationCubit extends Cubit { emit( dataState.copyWith( serverDetails: serverDetails, - currentStep: RecoveryStep.cloudflareToken, + currentStep: RecoveryStep.dnsProviderToken, ), ); } @@ -699,7 +699,7 @@ class ServerInstallationCubit extends Cubit { provider: DnsProvider.cloudflare, ), ); - await repository.saveCloudFlareKey(token); + await repository.setDnsApiToken(token); emit( dataState.copyWith( serverDomain: ServerDomain( @@ -707,7 +707,7 @@ class ServerInstallationCubit extends Cubit { zoneId: zoneId, provider: DnsProvider.cloudflare, ), - cloudFlareKey: token, + dnsApiToken: token, currentStep: RecoveryStep.backblazeToken, ), ); @@ -754,7 +754,7 @@ class ServerInstallationCubit extends Cubit { ServerInstallationNotFinished( providerApiToken: state.providerApiToken, serverDomain: state.serverDomain, - cloudFlareKey: state.cloudFlareKey, + dnsApiToken: state.dnsApiToken, backblazeCredential: state.backblazeCredential, rootUser: state.rootUser, serverDetails: null, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index f1aeadf5..0cb476ea 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -45,7 +45,7 @@ class ServerInstallationRepository { Future load() async { final String? providerApiToken = getIt().serverProviderKey; final String? location = getIt().serverLocation; - final String? cloudflareToken = getIt().cloudFlareKey; + final String? cloudflareToken = getIt().dnsProviderKey; final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; final ServerProvider? serverProvider = @@ -86,7 +86,7 @@ class ServerInstallationRepository { return ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudflareToken!, + dnsApiToken: cloudflareToken!, serverDomain: serverDomain!, backblazeCredential: backblazeCredential!, serverDetails: serverDetails!, @@ -103,7 +103,7 @@ class ServerInstallationRepository { serverDomain != null) { return ServerInstallationRecovery( providerApiToken: providerApiToken, - cloudFlareKey: cloudflareToken, + dnsApiToken: cloudflareToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, serverDetails: serverDetails, @@ -120,7 +120,7 @@ class ServerInstallationRepository { return ServerInstallationNotFinished( providerApiToken: providerApiToken, - cloudFlareKey: cloudflareToken, + dnsApiToken: cloudflareToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, serverDetails: serverDetails, @@ -147,7 +147,7 @@ class ServerInstallationRepository { if (serverDomain.provider != DnsProvider.unknown) { return RecoveryStep.backblazeToken; } - return RecoveryStep.cloudflareToken; + return RecoveryStep.dnsProviderToken; } return RecoveryStep.serverSelection; } @@ -717,8 +717,8 @@ class ServerInstallationRepository { getIt().init(); } - Future saveCloudFlareKey(final String key) async { - await getIt().storeCloudFlareKey(key); + Future setDnsApiToken(final String key) async { + await getIt().storeDnsProviderKey(key); } Future deleteCloudFlareKey() async { diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 331c3e2a..5ceaafdd 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -4,7 +4,7 @@ abstract class ServerInstallationState extends Equatable { const ServerInstallationState({ required this.providerApiToken, required this.serverTypeIdentificator, - required this.cloudFlareKey, + required this.dnsApiToken, required this.backblazeCredential, required this.serverDomain, required this.rootUser, @@ -18,7 +18,7 @@ abstract class ServerInstallationState extends Equatable { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -28,7 +28,7 @@ abstract class ServerInstallationState extends Equatable { ]; final String? providerApiToken; - final String? cloudFlareKey; + final String? dnsApiToken; final String? serverTypeIdentificator; final BackblazeCredential? backblazeCredential; final ServerDomain? serverDomain; @@ -40,7 +40,7 @@ abstract class ServerInstallationState extends Equatable { bool get isServerProviderApiKeyFilled => providerApiToken != null; bool get isServerTypeFilled => serverTypeIdentificator != null; - bool get isDnsProviderFilled => cloudFlareKey != null; + bool get isDnsProviderFilled => dnsApiToken != null; bool get isBackupsProviderFilled => backblazeCredential != null; bool get isDomainSelected => serverDomain != null; bool get isPrimaryUserFilled => rootUser != null; @@ -87,7 +87,7 @@ class TimerState extends ServerInstallationNotFinished { }) : super( providerApiToken: dataState.providerApiToken, serverTypeIdentificator: dataState.serverTypeIdentificator, - cloudFlareKey: dataState.cloudFlareKey, + dnsApiToken: dataState.dnsApiToken, backblazeCredential: dataState.backblazeCredential, serverDomain: dataState.serverDomain, rootUser: dataState.rootUser, @@ -114,7 +114,7 @@ enum ServerSetupProgress { nothingYet, serverProviderFilled, servertTypeFilled, - cloudFlareFilled, + dnsProviderFilled, backblazeFilled, domainFilled, userFilled, @@ -133,7 +133,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { required this.dnsMatches, super.providerApiToken, super.serverTypeIdentificator, - super.cloudFlareKey, + super.dnsApiToken, super.backblazeCredential, super.serverDomain, super.rootUser, @@ -146,7 +146,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -160,7 +160,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationNotFinished copyWith({ final String? providerApiToken, final String? serverTypeIdentificator, - final String? cloudFlareKey, + final String? dnsApiToken, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, @@ -175,7 +175,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { providerApiToken: providerApiToken ?? this.providerApiToken, serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, - cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, + dnsApiToken: dnsApiToken ?? this.dnsApiToken, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, rootUser: rootUser ?? this.rootUser, @@ -192,7 +192,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudFlareKey!, + dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, rootUser: rootUser!, @@ -208,7 +208,7 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { : super( providerApiToken: null, serverTypeIdentificator: null, - cloudFlareKey: null, + dnsApiToken: null, backblazeCredential: null, serverDomain: null, rootUser: null, @@ -225,7 +225,7 @@ class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ required String super.providerApiToken, required String super.serverTypeIdentificator, - required String super.cloudFlareKey, + required String super.dnsApiToken, required BackblazeCredential super.backblazeCredential, required ServerDomain super.serverDomain, required User super.rootUser, @@ -239,7 +239,7 @@ class ServerInstallationFinished extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -256,7 +256,7 @@ enum RecoveryStep { oldToken, serverProviderToken, serverSelection, - cloudflareToken, + dnsProviderToken, backblazeToken, } @@ -278,7 +278,7 @@ class ServerInstallationRecovery extends ServerInstallationState { required this.recoveryCapabilities, super.providerApiToken, super.serverTypeIdentificator, - super.cloudFlareKey, + super.dnsApiToken, super.backblazeCredential, super.serverDomain, super.rootUser, @@ -295,7 +295,7 @@ class ServerInstallationRecovery extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -308,7 +308,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationRecovery copyWith({ final String? providerApiToken, final String? serverTypeIdentificator, - final String? cloudFlareKey, + final String? dnsApiToken, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, @@ -320,7 +320,7 @@ class ServerInstallationRecovery extends ServerInstallationState { providerApiToken: providerApiToken ?? this.providerApiToken, serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, - cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, + dnsApiToken: dnsApiToken ?? this.dnsApiToken, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, rootUser: rootUser ?? this.rootUser, @@ -332,7 +332,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudFlareKey!, + dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, rootUser: rootUser!, diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 434c9b32..6697c2f8 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -12,7 +12,7 @@ class ApiConfigModel { String? get serverProviderKey => _serverProviderKey; String? get serverLocation => _serverLocation; String? get serverType => _serverType; - String? get cloudFlareKey => _cloudFlareKey; + String? get dnsProviderKey => _dnsProviderKey; ServerProvider? get serverProvider => _serverProvider; BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; @@ -20,7 +20,7 @@ class ApiConfigModel { String? _serverProviderKey; String? _serverLocation; - String? _cloudFlareKey; + String? _dnsProviderKey; String? _serverType; ServerProvider? _serverProvider; ServerHostingDetails? _serverDetails; @@ -38,9 +38,9 @@ class ApiConfigModel { _serverProviderKey = value; } - Future storeCloudFlareKey(final String value) async { + Future storeDnsProviderKey(final String value) async { await _box.put(BNames.cloudFlareKey, value); - _cloudFlareKey = value; + _dnsProviderKey = value; } Future storeServerTypeIdentifier(final String typeIdentifier) async { @@ -76,7 +76,7 @@ class ApiConfigModel { void clear() { _serverProviderKey = null; _serverLocation = null; - _cloudFlareKey = null; + _dnsProviderKey = null; _backblazeCredential = null; _serverDomain = null; _serverDetails = null; @@ -88,7 +88,7 @@ class ApiConfigModel { void init() { _serverProviderKey = _box.get(BNames.hetznerKey); _serverLocation = _box.get(BNames.serverLocation); - _cloudFlareKey = _box.get(BNames.cloudFlareKey); + _dnsProviderKey = _box.get(BNames.cloudFlareKey); _backblazeCredential = _box.get(BNames.backblazeCredential); _serverDomain = _box.get(BNames.serverDomain); _serverDetails = _box.get(BNames.serverDetails); diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index 9b5d32c1..a58ff5a1 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -29,4 +29,6 @@ enum DnsProvider { unknown, @HiveField(1) cloudflare, + @HiveField(2) + digitalOcean, } diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index c2fb1d13..120cf11b 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -53,7 +53,7 @@ class RecoveryRouting extends StatelessWidget { case RecoveryStep.serverSelection: currentPage = const RecoveryConfirmServer(); break; - case RecoveryStep.cloudflareToken: + case RecoveryStep.dnsProviderToken: currentPage = const RecoveryConfirmCloudflare(); break; case RecoveryStep.backblazeToken: From 813d275d1262a0ef74313beac66f4b0d78f3dc26 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Dec 2022 22:47:35 +0400 Subject: [PATCH 297/732] feat: Implement logging for GraphQL API map Log to application console all requests and all responses --- lib/logic/api_maps/graphql_maps/api_map.dart | 58 ++++++++++++++++++-- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index 185a5e54..0f786417 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -1,9 +1,48 @@ +// ignore_for_file: prefer_foreach + +import 'dart:async'; import 'dart:io'; import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:http/io_client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/models/message.dart'; + +void _logToAppConsole(final T objectToLog) { + getIt.get().addMessage( + Message( + text: objectToLog.toString(), + ), + ); +} + +class LoggingLink extends Link { + @override + Stream request( + final Request request, [ + final NextLink? forward, + ]) async* { + _logToAppConsole(request); + yield* forward!(request); + } +} + +class LoggingResponseParser extends ResponseParser { + @override + Response parseResponse(final Map body) { + final response = super.parseResponse(body); + _logToAppConsole(response); + return response; + } + + @override + GraphQLError parseError(final Map error) { + final graphQlError = super.parseError(error); + _logToAppConsole(graphQlError); + return graphQlError; + } +} abstract class ApiMap { Future getClient() async { @@ -22,16 +61,23 @@ abstract class ApiMap { final httpLink = HttpLink( 'https://api.$rootAddress/graphql', httpClient: ioClient, + parser: LoggingResponseParser(), ); final String token = _getApiToken(); - final Link graphQLLink = isWithToken - ? AuthLink( - getToken: () async => - customToken == '' ? 'Bearer $token' : customToken, - ).concat(httpLink) - : httpLink; + final Link graphQLLink = LoggingLink().concat( + isWithToken + ? AuthLink( + getToken: () async => + customToken == '' ? 'Bearer $token' : customToken, + ).concat(httpLink) + : httpLink, + ); + + // Every request goes through either chain: + // 1. AuthLink -> HttpLink -> LoggingLink + // 2. HttpLink -> LoggingLink return GraphQLClient( cache: GraphQLCache(), From 8dffcab30d28caab2b679ef5c5c99c2be3d3ea41 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Dec 2022 22:53:07 +0400 Subject: [PATCH 298/732] chore: Rename and unify GraphQL logging classes --- lib/logic/api_maps/graphql_maps/api_map.dart | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index 0f786417..02b9bc04 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -1,6 +1,3 @@ -// ignore_for_file: prefer_foreach - -import 'dart:async'; import 'dart:io'; import 'package:graphql_flutter/graphql_flutter.dart'; @@ -17,7 +14,7 @@ void _logToAppConsole(final T objectToLog) { ); } -class LoggingLink extends Link { +class RequestLoggingLink extends Link { @override Stream request( final Request request, [ @@ -28,7 +25,7 @@ class LoggingLink extends Link { } } -class LoggingResponseParser extends ResponseParser { +class ResponseLoggingParser extends ResponseParser { @override Response parseResponse(final Map body) { final response = super.parseResponse(body); @@ -61,12 +58,12 @@ abstract class ApiMap { final httpLink = HttpLink( 'https://api.$rootAddress/graphql', httpClient: ioClient, - parser: LoggingResponseParser(), + parser: ResponseLoggingParser(), ); final String token = _getApiToken(); - final Link graphQLLink = LoggingLink().concat( + final Link graphQLLink = RequestLoggingLink().concat( isWithToken ? AuthLink( getToken: () async => @@ -76,8 +73,8 @@ abstract class ApiMap { ); // Every request goes through either chain: - // 1. AuthLink -> HttpLink -> LoggingLink - // 2. HttpLink -> LoggingLink + // 1. RequestLoggingLink -> AuthLink -> HttpLink + // 2. RequestLoggingLink -> HttpLink return GraphQLClient( cache: GraphQLCache(), From a45b93cd27aaf9de3452b8bfc5d71dd047a80952 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 21 Dec 2022 23:31:03 +0400 Subject: [PATCH 299/732] feat: Improve Dns Record structure and logic It is to much digital ocean api. The decision with adding optional id is bad, but it will be refactored soon along with entire backend. --- .../dns_providers/cloudflare/cloudflare.dart | 50 +------ .../digital_ocean_dns/digital_ocean_dns.dart | 125 ++++++------------ .../rest_maps/dns_providers/dns_provider.dart | 47 +++++++ lib/logic/models/json/dns_records.dart | 4 + 4 files changed, 94 insertions(+), 132 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 04ff622b..433ee792 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -196,7 +196,8 @@ class CloudflareApi extends DnsProviderApi { }) async { final String domainName = domain.domainName; final String domainZoneId = domain.zoneId; - final List listDnsRecords = projectDnsRecords(domainName, ip4); + final List listDnsRecords = + getProjectDnsRecords(domainName, ip4); final List allCreateFutures = []; final Dio client = await getClient(); @@ -227,53 +228,6 @@ class CloudflareApi extends DnsProviderApi { return APIGenericResult(success: true, data: null); } - List projectDnsRecords( - final String? domainName, - final String? ip4, - ) { - final DnsRecord domainA = - DnsRecord(type: 'A', name: domainName, content: ip4); - - final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); - final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); - final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); - final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); - final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); - final DnsRecord passwordA = - DnsRecord(type: 'A', name: 'password', content: ip4); - final DnsRecord socialA = - DnsRecord(type: 'A', name: 'social', content: ip4); - final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); - - final DnsRecord txt1 = DnsRecord( - type: 'TXT', - name: '_dmarc', - content: 'v=DMARC1; p=none', - ttl: 18000, - ); - - final DnsRecord txt2 = DnsRecord( - type: 'TXT', - name: domainName, - content: 'v=spf1 a mx ip4:$ip4 -all', - ttl: 18000, - ); - - return [ - domainA, - apiA, - cloudA, - gitA, - meetA, - passwordA, - socialA, - mx, - txt1, - txt2, - vpn - ]; - } - @override Future setDnsRecord( final DnsRecord record, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index a633fa65..887dc1ca 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -102,23 +102,15 @@ class DigitalOceanDnsApi extends DnsProviderApi { final String? ip4, }) async { final String domainName = domain.domainName; - final String domainZoneId = domain.zoneId; - - final String url = '/zones/$domainZoneId/dns_records'; final Dio client = await getClient(); try { - final Response response = await client.get(url); - - final List records = response.data['result'] ?? []; - final List allDeleteFutures = []; - + final List allDeleteFutures = []; + final List records = await getDnsRecords(domain: domain); for (final record in records) { - if (record['zone_name'] == domainName) { - allDeleteFutures.add( - client.delete('$url/${record["id"]}'), - ); - } + allDeleteFutures.add( + client.delete('/domains/$domainName/records/${record.id}'), + ); } await Future.wait(allDeleteFutures); } catch (e) { @@ -141,28 +133,31 @@ class DigitalOceanDnsApi extends DnsProviderApi { }) async { Response response; final String domainName = domain.domainName; - final String domainZoneId = domain.zoneId; final List allRecords = []; - final String url = '/zones/$domainZoneId/dns_records'; + /// Default amount is 20, but we will eventually overflow it, + /// so I hardcode it to the maximum available amount in advance just in case + /// + /// https://docs.digitalocean.com/reference/api/api-reference/#operation/domains_list_records + const int amountPerPage = 200; + final String url = '/domains/$domainName/records?per_page=$amountPerPage'; final Dio client = await getClient(); try { response = await client.get(url); - final List records = response.data['result'] ?? []; + final List records = response.data['domain_records'] ?? []; for (final record in records) { - if (record['zone_name'] == domainName) { - allRecords.add( - DnsRecord( - name: record['name'], - type: record['type'], - content: record['content'], - ttl: record['ttl'], - proxied: record['proxied'], - ), - ); - } + allRecords.add( + DnsRecord( + id: record['id'], + name: record['name'], + type: record['type'], + content: record['data'], + ttl: record['ttl'], + proxied: false, + ), + ); } } catch (e) { print(e); @@ -179,17 +174,22 @@ class DigitalOceanDnsApi extends DnsProviderApi { final String? ip4, }) async { final String domainName = domain.domainName; - final String domainZoneId = domain.zoneId; - final List listDnsRecords = projectDnsRecords(domainName, ip4); + final List dnsRecords = getProjectDnsRecords(domainName, ip4); final List allCreateFutures = []; final Dio client = await getClient(); try { - for (final DnsRecord record in listDnsRecords) { + for (final DnsRecord record in dnsRecords) { allCreateFutures.add( client.post( - '/zones/$domainZoneId/dns_records', - data: record.toJson(), + '/domains/$domainName/records', + data: { + 'type': record.type, + 'name': record.name, + 'data': record.content, + 'ttl': record.ttl, + 'priority': record.priority, + }, ), ); } @@ -211,66 +211,23 @@ class DigitalOceanDnsApi extends DnsProviderApi { return APIGenericResult(success: true, data: null); } - List projectDnsRecords( - final String? domainName, - final String? ip4, - ) { - final DnsRecord domainA = - DnsRecord(type: 'A', name: domainName, content: ip4); - - final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); - final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); - final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); - final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); - final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); - final DnsRecord passwordA = - DnsRecord(type: 'A', name: 'password', content: ip4); - final DnsRecord socialA = - DnsRecord(type: 'A', name: 'social', content: ip4); - final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); - - final DnsRecord txt1 = DnsRecord( - type: 'TXT', - name: '_dmarc', - content: 'v=DMARC1; p=none', - ttl: 18000, - ); - - final DnsRecord txt2 = DnsRecord( - type: 'TXT', - name: domainName, - content: 'v=spf1 a mx ip4:$ip4 -all', - ttl: 18000, - ); - - return [ - domainA, - apiA, - cloudA, - gitA, - meetA, - passwordA, - socialA, - mx, - txt1, - txt2, - vpn - ]; - } - @override Future setDnsRecord( final DnsRecord record, final ServerDomain domain, ) async { - final String domainZoneId = domain.zoneId; - final String url = '$rootAddress/zones/$domainZoneId/dns_records'; - final Dio client = await getClient(); try { + final domainName = domain.domainName; await client.post( - url, - data: record.toJson(), + '/domains/$domainName/records', + data: { + 'type': record.type, + 'name': record.name, + 'data': record.content, + 'ttl': record.ttl, + 'priority': record.priority, + }, ); } catch (e) { print(e); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 106d185c..ce308121 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -31,4 +31,51 @@ abstract class DnsProviderApi extends ApiMap { Future> isApiTokenValid(final String token); RegExp getApiTokenValidation(); + + List getProjectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = + DnsRecord(type: 'A', name: domainName, content: ip4); + + final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: 'v=DMARC1; p=none', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } } diff --git a/lib/logic/models/json/dns_records.dart b/lib/logic/models/json/dns_records.dart index c4799876..1680e943 100644 --- a/lib/logic/models/json/dns_records.dart +++ b/lib/logic/models/json/dns_records.dart @@ -9,6 +9,7 @@ class DnsRecord { required this.type, required this.name, required this.content, + this.id, this.ttl = 3600, this.priority = 10, this.proxied = false, @@ -31,5 +32,8 @@ class DnsRecord { final int priority; final bool proxied; + /// TODO: Refactoring refactoring refactoring refactoring >:c + final int? id; + Map toJson() => _$DnsRecordToJson(this); } From fc4f78162bb4d351fd0945fc1c4d7dd51fadeb72 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 21 Dec 2022 23:35:20 +0400 Subject: [PATCH 300/732] feat: Implement domain list getter for digital ocean dns --- .../digital_ocean_dns/digital_ocean_dns.dart | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index 887dc1ca..1d5dba6f 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -238,16 +238,13 @@ class DigitalOceanDnsApi extends DnsProviderApi { @override Future> domainList() async { - final String url = '$rootAddress/zones'; + final String url = '$rootAddress/domains'; List domains = []; final Dio client = await getClient(); try { - final Response response = await client.get( - url, - queryParameters: {'per_page': 50}, - ); - domains = response.data['result'] + final Response response = await client.get(url); + domains = response.data['domains'] .map((final el) => el['name'] as String) .toList(); } catch (e) { From 41dc77103f8a98b7076a9bee7469f387c6bf2d83 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 22 Dec 2022 22:45:06 +0400 Subject: [PATCH 301/732] feat: Implement error handling on server deletion Notify users when errors occured and handle application state accordingly --- assets/translations/en.json | 2 + assets/translations/ru.json | 2 + .../digital_ocean/digital_ocean.dart | 48 +++++++++++++++--- .../server_providers/hetzner/hetzner.dart | 49 ++++++++++++------- .../server_providers/server_provider.dart | 4 +- .../server_installation_cubit.dart | 6 ++- .../server_installation_repository.dart | 25 ++++++++-- 7 files changed, 107 insertions(+), 29 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index daa4544f..1b596cba 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -392,6 +392,8 @@ "generation_error": "Couldn't generate a recovery key. {}" }, "modals": { + "dns_removal_error": "Couldn't remove DNS records.", + "server_deletion_error": "Couldn't delete active server.", "server_validators_error": "Couldn't fetch available servers.", "already_exists": "Such server already exists.", "unexpected_error": "Unexpected error during placement from the provider side.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index a5cc6634..8764580a 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -392,6 +392,8 @@ "generation_error": "Не удалось сгенерировать ключ. {}" }, "modals": { + "dns_removal_error": "Невозможно удалить DNS записи.", + "server_deletion_error": "Невозможно удалить сервер.", "server_validators_error": "Не удалось получить список серверов.", "already_exists": "Такой сервер уже существует.", "unexpected_error": "Непредвиденная ошибка со стороны провайдера.", diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index c7928653..2898b609 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -431,17 +431,41 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future deleteServer({ + Future> deleteServer({ required final String domainName, }) async { final Dio client = await getClient(); - final ServerBasicInfo serverToRemove = (await getServers()).firstWhere( - (final el) => el.name == domainName, - ); - final ServerVolume volumeToRemove = (await getVolumes()).firstWhere( - (final el) => el.serverId == serverToRemove.id, - ); + final servers = await getServers(); + final ServerBasicInfo serverToRemove; + try { + serverToRemove = servers.firstWhere( + (final el) => el.name == domainName, + ); + } catch (e) { + print(e); + return APIGenericResult( + data: false, + success: false, + message: e.toString(), + ); + } + + final volumes = await getVolumes(); + final ServerVolume volumeToRemove; + try { + volumeToRemove = volumes.firstWhere( + (final el) => el.serverId == serverToRemove.id, + ); + } catch (e) { + print(e); + return APIGenericResult( + data: false, + success: false, + message: e.toString(), + ); + } + final List laterFutures = []; await detachVolume(volumeToRemove); @@ -453,9 +477,19 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { await Future.wait(laterFutures); } catch (e) { print(e); + return APIGenericResult( + success: false, + data: false, + message: e.toString(), + ); } finally { close(client); } + + return APIGenericResult( + success: true, + data: true, + ); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index f0e032e8..d7a13b95 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -479,31 +479,46 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } @override - Future deleteServer({ + Future> deleteServer({ required final String domainName, }) async { final Dio client = await getClient(); + try { + final String hostname = getHostnameFromDomain(domainName); - final String hostname = getHostnameFromDomain(domainName); + final Response serversReponse = await client.get('/servers'); + final List servers = serversReponse.data['servers']; + final Map server = + servers.firstWhere((final el) => el['name'] == hostname); + final List volumes = server['volumes']; + final List laterFutures = []; - final Response serversReponse = await client.get('/servers'); - final List servers = serversReponse.data['servers']; - final Map server = servers.firstWhere((final el) => el['name'] == hostname); - final List volumes = server['volumes']; - final List laterFutures = []; + for (final volumeId in volumes) { + await client.post('/volumes/$volumeId/actions/detach'); + } + await Future.delayed(const Duration(seconds: 10)); - for (final volumeId in volumes) { - await client.post('/volumes/$volumeId/actions/detach'); + for (final volumeId in volumes) { + laterFutures.add(client.delete('/volumes/$volumeId')); + } + laterFutures.add(client.delete('/servers/${server['id']}')); + + await Future.wait(laterFutures); + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: false, + message: e.toString(), + ); + } finally { + close(client); } - await Future.delayed(const Duration(seconds: 10)); - for (final volumeId in volumes) { - laterFutures.add(client.delete('/volumes/$volumeId')); - } - laterFutures.add(client.delete('/servers/${server['id']}')); - - await Future.wait(laterFutures); - close(client); + return APIGenericResult( + success: true, + data: true, + ); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 05fb5e61..c858d67b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -31,7 +31,9 @@ abstract class ServerProviderApi extends ApiMap { Future restart(); Future powerOn(); - Future deleteServer({required final String domainName}); + Future> deleteServer({ + required final String domainName, + }); Future> createServer({ required final String dnsApiToken, required final User rootUser, diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 4da57479..5638b765 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -756,7 +756,11 @@ class ServerInstallationCubit extends Cubit { closeTimer(); if (state.serverDetails != null) { - await repository.deleteServer(state.serverDomain!); + final bool deletionResult = + await repository.deleteServer(state.serverDomain!); + if (!deletionResult) { + return; + } } await repository.deleteServerRelatedRecords(); emit( diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index f1aeadf5..5d45e7b9 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -759,13 +759,26 @@ class ServerInstallationRepository { await box.put(BNames.hasFinalChecked, value); } - Future deleteServer(final ServerDomain serverDomain) async { - await ApiController.currentServerProviderApiFactory! + Future deleteServer(final ServerDomain serverDomain) async { + final APIGenericResult deletionResult = await ApiController + .currentServerProviderApiFactory! .getServerProvider() .deleteServer( domainName: serverDomain.domainName, ); + if (!deletionResult.success) { + getIt() + .showSnackBar('modals.server_validators_error'.tr()); + return false; + } + + if (!deletionResult.data) { + getIt() + .showSnackBar('modals.server_deletion_error'.tr()); + return false; + } + await box.put(BNames.hasFinalChecked, false); await box.put(BNames.isServerStarted, false); await box.put(BNames.isServerResetedFirstTime, false); @@ -773,9 +786,15 @@ class ServerInstallationRepository { await box.put(BNames.isLoading, false); await box.put(BNames.serverDetails, null); - await ApiController.currentDnsProviderApiFactory! + final APIGenericResult removalResult = await ApiController + .currentDnsProviderApiFactory! .getDnsProvider() .removeSimilarRecords(domain: serverDomain); + + if (!removalResult.success) { + getIt().showSnackBar('modals.dns_removal_error'.tr()); + } + return true; } Future deleteServerRelatedRecords() async { From f64f741a76796bbe672556321834dbd0574716b5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 23 Dec 2022 00:17:48 +0400 Subject: [PATCH 302/732] fix: Manage server deletion for Digital Ocean --- .../digital_ocean/digital_ocean.dart | 23 ++++--------------- .../server_providers/hetzner/hetzner.dart | 18 +-------------- lib/utils/network_utils.dart | 17 ++++++++++++++ 3 files changed, 22 insertions(+), 36 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 2898b609..4beb53f7 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -18,6 +18,7 @@ import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @@ -325,23 +326,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return success; } - static String getHostnameFromDomain(final String domain) { - // Replace all non-alphanumeric characters with an underscore - String hostname = - domain.split('.')[0].replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); - if (hostname.endsWith('-')) { - hostname = hostname.substring(0, hostname.length - 1); - } - if (hostname.startsWith('-')) { - hostname = hostname.substring(1); - } - if (hostname.isEmpty) { - hostname = 'selfprivacy-server'; - } - - return hostname; - } - @override Future> createServer({ required final String dnsApiToken, @@ -436,11 +420,12 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { }) async { final Dio client = await getClient(); + final String hostname = getHostnameFromDomain(domainName); final servers = await getServers(); final ServerBasicInfo serverToRemove; try { serverToRemove = servers.firstWhere( - (final el) => el.name == domainName, + (final el) => el.name == hostname, ); } catch (e) { print(e); @@ -473,7 +458,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { try { laterFutures.add(deleteVolume(volumeToRemove)); - laterFutures.add(client.delete('/droplets/$serverToRemove.id')); + laterFutures.add(client.delete('/droplets/${serverToRemove.id}')); await Future.wait(laterFutures); } catch (e) { print(e); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index d7a13b95..7f51c768 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -19,6 +19,7 @@ import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { @@ -461,23 +462,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - static String getHostnameFromDomain(final String domain) { - // Replace all non-alphanumeric characters with an underscore - String hostname = - domain.split('.')[0].replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); - if (hostname.endsWith('-')) { - hostname = hostname.substring(0, hostname.length - 1); - } - if (hostname.startsWith('-')) { - hostname = hostname.substring(1); - } - if (hostname.isEmpty) { - hostname = 'selfprivacy-server'; - } - - return hostname; - } - @override Future> deleteServer({ required final String domainName, diff --git a/lib/utils/network_utils.dart b/lib/utils/network_utils.dart index 8b75728f..fc06ecb8 100644 --- a/lib/utils/network_utils.dart +++ b/lib/utils/network_utils.dart @@ -133,3 +133,20 @@ DnsRecord? extractDkimRecord(final List records) { return dkimRecord; } + +String getHostnameFromDomain(final String domain) { + // Replace all non-alphanumeric characters with an underscore + String hostname = + domain.split('.')[0].replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); + if (hostname.endsWith('-')) { + hostname = hostname.substring(0, hostname.length - 1); + } + if (hostname.startsWith('-')) { + hostname = hostname.substring(1); + } + if (hostname.isEmpty) { + hostname = 'selfprivacy-server'; + } + + return hostname; +} From d333787f3734b640ac47e3ded94b18639ecfd6a2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 28 Dec 2022 17:23:28 +0400 Subject: [PATCH 303/732] fix: Change incorrect domain for domain lists --- .../dns_providers/digital_ocean_dns/digital_ocean_dns.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index 1d5dba6f..d2359e87 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -238,12 +238,11 @@ class DigitalOceanDnsApi extends DnsProviderApi { @override Future> domainList() async { - final String url = '$rootAddress/domains'; List domains = []; final Dio client = await getClient(); try { - final Response response = await client.get(url); + final Response response = await client.get('/domains'); domains = response.data['domains'] .map((final el) => el['name'] as String) .toList(); From e560de58e7cd98671a63c4c90395d4c694ce1413 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 30 Dec 2022 07:25:18 +0400 Subject: [PATCH 304/732] feat: Implement DNS provider picker page --- assets/translations/en.json | 7 +- assets/translations/ru.json | 5 +- lib/config/hive_config.dart | 3 + ...t.dart => server_provider_form_cubit.dart} | 4 +- .../server_installation_cubit.dart | 19 +- .../server_installation_repository.dart | 4 + lib/logic/get_it/api_config.dart | 9 + .../initializing/dns_provider_picker.dart | 205 ++++++++++++++++++ .../setup/initializing/initializing.dart | 62 ++---- .../initializing/server_provider_picker.dart | 8 +- .../recovery_server_provider_connected.dart | 11 +- 11 files changed, 267 insertions(+), 70 deletions(-) rename lib/logic/cubit/forms/setup/initializing/{provider_form_cubit.dart => server_provider_form_cubit.dart} (91%) create mode 100644 lib/ui/pages/setup/initializing/dns_provider_picker.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index daa4544f..05bb823b 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -268,9 +268,10 @@ "no_ssh_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." }, "initializing": { - "connect_to_server": "Connect a server", + "connect_to_server": "Connect the server provider", "select_provider": "Select your provider", - "place_where_data": "A place where your data and SelfPrivacy services will reside:", + "server_provider_description": "A place where your data and SelfPrivacy services will reside:", + "dns_provider_description": "A service which lets your IP point towards domain names:", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", "could_not_connect": "Counldn't connect to the provider.", @@ -280,7 +281,7 @@ "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", - "connect_cloudflare": "Connect CloudFlare", + "connect_to_dns": "Connect the DNS provider", "manage_domain_dns": "To manage your domain's DNS", "cloudflare_api_token": "CloudFlare API Token", "connect_backblaze_storage": "Connect Backblaze storage", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index a5cc6634..f9fb3fb2 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -269,7 +269,8 @@ }, "initializing": { "connect_to_server": "Подключите сервер", - "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", + "server_provider_description": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", + "dns_provider_description": "Это позволит связать ваш домен с IP адресом:", "how": "Как получить API Token", "provider_bad_key_error": "API ключ провайдера неверен", "could_not_connect": "Не удалось соединиться с провайдером.", @@ -279,7 +280,7 @@ "no_server_types_found": "Не удалось получить список серверов. Убедитесь, что ваш аккаунт доступен и попытайтесь сменить локацию сервера.", "cloudflare_bad_key_error": "Cloudflare API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", - "connect_cloudflare": "Подключите CloudFlare", + "connect_to_dns": "Подключите DNS провайдер", "manage_domain_dns": "Для управления DNS вашего домена", "cloudflare_api_token": "CloudFlare API ключ", "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 93bce6ee..b300e247 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -90,6 +90,9 @@ class BNames { /// A String field of [serverInstallationBox] box. static String serverProvider = 'serverProvider'; + /// A String field of [serverInstallationBox] box. + static String dnsProvider = 'dnsProvider'; + /// A String field of [serverLocation] box. static String serverLocation = 'serverLocation'; diff --git a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart similarity index 91% rename from lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart rename to lib/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart index ebabb5e7..97144d29 100644 --- a/lib/logic/cubit/forms/setup/initializing/provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart @@ -4,8 +4,8 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -class ProviderFormCubit extends FormCubit { - ProviderFormCubit(this.serverInstallationCubit) { +class ServerProviderFormCubit extends FormCubit { + ServerProviderFormCubit(this.serverInstallationCubit) { //final int tokenLength = // serverInstallationCubit.serverProviderApiTokenValidation().length; apiKey = FieldCubit( diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 244cd5de..1d8a4c5e 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -66,6 +66,15 @@ class ServerInstallationCubit extends Cubit { ); } + void setDnsProviderType(final DnsProvider providerType) async { + await repository.saveDnsProviderType(providerType); + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: providerType, + ), + ); + } + ProviderApiTokenValidation serverProviderApiTokenValidation() => ApiController.currentServerProviderApiFactory! .getServerProvider() @@ -101,16 +110,6 @@ class ServerInstallationCubit extends Cubit { Future isDnsProviderApiTokenValid( final String providerToken, ) async { - if (ApiController.currentDnsProviderApiFactory == null) { - // No other DNS provider is supported for now, - // so it's safe to hardcode Cloudflare - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: DnsProvider.cloudflare, - ), - ); - } - final APIGenericResult apiResponse = await ApiController.currentDnsProviderApiFactory! .getDnsProvider( diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 0cb476ea..817db846 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -688,6 +688,10 @@ class ServerInstallationRepository { await getIt().storeServerProviderType(type); } + Future saveDnsProviderType(final DnsProvider type) async { + await getIt().storeDnsProviderType(type); + } + Future saveServerProviderKey(final String key) async { await getIt().storeServerProviderKey(key); } diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 6697c2f8..2ca9d53b 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -14,6 +14,7 @@ class ApiConfigModel { String? get serverType => _serverType; String? get dnsProviderKey => _dnsProviderKey; ServerProvider? get serverProvider => _serverProvider; + DnsProvider? get dnsProvider => _dnsProvider; BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; @@ -23,6 +24,7 @@ class ApiConfigModel { String? _dnsProviderKey; String? _serverType; ServerProvider? _serverProvider; + DnsProvider? _dnsProvider; ServerHostingDetails? _serverDetails; BackblazeCredential? _backblazeCredential; ServerDomain? _serverDomain; @@ -33,6 +35,11 @@ class ApiConfigModel { _serverProvider = value; } + Future storeDnsProviderType(final DnsProvider value) async { + await _box.put(BNames.dnsProvider, value); + _dnsProvider = value; + } + Future storeServerProviderKey(final String value) async { await _box.put(BNames.hetznerKey, value); _serverProviderKey = value; @@ -75,6 +82,7 @@ class ApiConfigModel { void clear() { _serverProviderKey = null; + _dnsProvider = null; _serverLocation = null; _dnsProviderKey = null; _backblazeCredential = null; @@ -95,5 +103,6 @@ class ApiConfigModel { _backblazeBucket = _box.get(BNames.backblazeBucket); _serverType = _box.get(BNames.serverTypeIdentifier); _serverProvider = _box.get(BNames.serverProvider); + _dnsProvider = _box.get(BNames.dnsProvider); } } diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart new file mode 100644 index 00000000..74bb9b4b --- /dev/null +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -0,0 +1,205 @@ +import 'package:cubit_form/cubit_form.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; + +class DnsProviderPicker extends StatefulWidget { + const DnsProviderPicker({ + required this.formCubit, + required this.serverInstallationCubit, + super.key, + }); + + final DnsProviderFormCubit formCubit; + final ServerInstallationCubit serverInstallationCubit; + + @override + State createState() => _DnsProviderPickerState(); +} + +class _DnsProviderPickerState extends State { + DnsProvider selectedProvider = DnsProvider.unknown; + + void setProvider(final DnsProvider provider) { + setState(() { + selectedProvider = provider; + }); + } + + @override + Widget build(final BuildContext context) { + switch (selectedProvider) { + case DnsProvider.unknown: + return ProviderSelectionPage( + serverInstallationCubit: widget.serverInstallationCubit, + callback: setProvider, + ); + + case DnsProvider.cloudflare: + return ProviderInputDataPage( + providerCubit: widget.formCubit, + providerInfo: ProviderPageInfo( + providerType: DnsProvider.cloudflare, + pathToHow: 'how_cloudflare', + image: Image.asset( + 'assets/images/logos/cloudflare.png', + width: 150, + ), + ), + ); + + case DnsProvider.digitalOcean: + return ProviderInputDataPage( + providerCubit: widget.formCubit, + providerInfo: ProviderPageInfo( + providerType: DnsProvider.digitalOcean, + pathToHow: 'how_cloudflare', + image: Image.asset( + 'assets/images/logos/digital_ocean.png', + width: 150, + ), + ), + ); + } + } +} + +class ProviderPageInfo { + const ProviderPageInfo({ + required this.providerType, + required this.pathToHow, + required this.image, + }); + + final String pathToHow; + final Image image; + final DnsProvider providerType; +} + +class ProviderInputDataPage extends StatelessWidget { + const ProviderInputDataPage({ + required this.providerInfo, + required this.providerCubit, + super.key, + }); + + final ProviderPageInfo providerInfo; + final DnsProviderFormCubit providerCubit; + + @override + Widget build(final BuildContext context) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + providerInfo.image, + const SizedBox(height: 10), + Text( + 'initializing.connect_to_dns'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const Spacer(), + CubitFormTextField( + formFieldCubit: providerCubit.apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'Provider API Token', + ), + ), + const Spacer(), + FilledButton( + title: 'basis.connect'.tr(), + onPressed: () => providerCubit.trySubmit(), + ), + const SizedBox(height: 10), + OutlinedButton( + child: Text('initializing.how'.tr()), + onPressed: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => BrandBottomSheet( + isExpended: true, + child: Padding( + padding: paddingH15V0, + child: ListView( + padding: const EdgeInsets.symmetric(vertical: 16), + children: [ + BrandMarkdown( + fileName: providerInfo.pathToHow, + ), + ], + ), + ), + ), + ), + ), + ], + ); +} + +class ProviderSelectionPage extends StatelessWidget { + const ProviderSelectionPage({ + required this.callback, + required this.serverInstallationCubit, + super.key, + }); + + final Function callback; + final ServerInstallationCubit serverInstallationCubit; + + @override + Widget build(final BuildContext context) => Column( + children: [ + Text( + 'initializing.select_provider'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 10), + Text( + 'initializing.dns_provider_description'.tr(), + ), + const SizedBox(height: 10), + ConstrainedBox( + constraints: const BoxConstraints( + maxWidth: 320, + ), + child: Row( + children: [ + InkWell( + onTap: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.cloudflare); + callback(DnsProvider.cloudflare); + }, + child: Image.asset( + 'assets/images/logos/cloudflare.png', + width: 150, + ), + ), + const SizedBox( + width: 20, + ), + InkWell( + onTap: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.digitalOcean); + callback(DnsProvider.digitalOcean); + }, + child: Image.asset( + 'assets/images/logos/digital_ocean.png', + width: 150, + ), + ), + ], + ), + ), + ], + ); +} diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 1e3e7982..831b6ebb 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -2,7 +2,7 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; @@ -17,6 +17,7 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/dns_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_type_picker.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; @@ -37,7 +38,7 @@ class InitializingPage extends StatelessWidget { actualInitializingPage = [ () => _stepServerProviderToken(cubit), () => _stepServerType(cubit), - () => _stepCloudflare(cubit), + () => _stepDnsProviderToken(cubit), () => _stepBackblaze(cubit), () => _stepDomain(cubit), () => _stepUser(cubit), @@ -149,10 +150,11 @@ class InitializingPage extends StatelessWidget { final ServerInstallationCubit serverInstallationCubit, ) => BlocProvider( - create: (final context) => ProviderFormCubit(serverInstallationCubit), + create: (final context) => + ServerProviderFormCubit(serverInstallationCubit), child: Builder( builder: (final context) { - final providerCubit = context.watch(); + final providerCubit = context.watch(); return ServerProviderPicker( formCubit: providerCubit, serverInstallationCubit: serverInstallationCubit, @@ -165,7 +167,8 @@ class InitializingPage extends StatelessWidget { final ServerInstallationCubit serverInstallationCubit, ) => BlocProvider( - create: (final context) => ProviderFormCubit(serverInstallationCubit), + create: (final context) => + ServerProviderFormCubit(serverInstallationCubit), child: Builder( builder: (final context) => ServerTypePicker( serverInstallationCubit: serverInstallationCubit, @@ -182,48 +185,19 @@ class InitializingPage extends StatelessWidget { ); } - Widget _stepCloudflare(final ServerInstallationCubit initializingCubit) => + Widget _stepDnsProviderToken( + final ServerInstallationCubit initializingCubit, + ) => BlocProvider( create: (final context) => DnsProviderFormCubit(initializingCubit), child: Builder( - builder: (final context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/logos/cloudflare.png', - width: 150, - ), - const SizedBox(height: 10), - BrandText.h2('initializing.connect_cloudflare'.tr()), - const SizedBox(height: 10), - BrandText.body2('initializing.manage_domain_dns'.tr()), - const Spacer(), - CubitFormTextField( - formFieldCubit: context.read().apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: InputDecoration( - hintText: 'initializing.cloudflare_api_token'.tr(), - ), - ), - const Spacer(), - BrandButton.rised( - onPressed: () => - context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - const SizedBox(height: 10), - BrandButton.text( - onPressed: () => _showModal( - context, - const _HowTo( - fileName: 'how_cloudflare', - ), - ), - title: 'initializing.how'.tr(), - ), - ], - ), + builder: (final context) { + final providerCubit = context.watch(); + return DnsProviderPicker( + formCubit: providerCubit, + serverInstallationCubit: initializingCubit, + ); + }, ), ); diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 4934d1e3..947da77b 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -3,7 +3,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; @@ -16,7 +16,7 @@ class ServerProviderPicker extends StatefulWidget { super.key, }); - final ProviderFormCubit formCubit; + final ServerProviderFormCubit formCubit; final ServerInstallationCubit serverInstallationCubit; @override @@ -90,7 +90,7 @@ class ProviderInputDataPage extends StatelessWidget { }); final ProviderPageInfo providerInfo; - final ProviderFormCubit providerCubit; + final ServerProviderFormCubit providerCubit; @override Widget build(final BuildContext context) => Column( @@ -162,7 +162,7 @@ class ProviderSelectionPage extends StatelessWidget { ), const SizedBox(height: 10), Text( - 'initializing.place_where_data'.tr(), + 'initializing.server_provider_description'.tr(), ), const SizedBox(height: 10), ConstrainedBox( diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 152e4308..f2771bf5 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; @@ -19,11 +19,12 @@ class RecoveryServerProviderConnected extends StatelessWidget { context.watch(); return BlocProvider( - create: (final BuildContext context) => ProviderFormCubit(appConfig), + create: (final BuildContext context) => + ServerProviderFormCubit(appConfig), child: Builder( builder: (final BuildContext context) { final FormCubitState formCubitState = - context.watch().state; + context.watch().state; return BrandHeroScreen( heroTitle: 'recovering.server_provider_connected'.tr(), @@ -37,7 +38,7 @@ class RecoveryServerProviderConnected extends StatelessWidget { }, children: [ CubitFormTextField( - formFieldCubit: context.read().apiKey, + formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), labelText: @@ -49,7 +50,7 @@ class RecoveryServerProviderConnected extends StatelessWidget { title: 'basis.continue'.tr(), onPressed: formCubitState.isSubmitting ? null - : () => context.read().trySubmit(), + : () => context.read().trySubmit(), ), const SizedBox(height: 16), BrandButton.text( From f24137cd98e411df314ffdb7a1b21f5b685fe3b6 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 31 Dec 2022 03:25:05 +0400 Subject: [PATCH 305/732] docs: Implement new basic onboading translations --- assets/translations/en.json | 29 ++++++++++++++++++++----- assets/translations/ru.json | 9 +++++++- lib/logic/api_maps/staging_options.dart | 2 +- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 1b596cba..ff0bf35a 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -4,6 +4,7 @@ "basis": { "providers": "Providers", "providers_title": "Your Data Center", + "select": "Select", "services": "Services", "services_title": "Your personal, private and independent services.", "users": "Users", @@ -79,8 +80,14 @@ "onboarding": { "page1_title": "Digital independence, available to all of us", "page1_text": "Mail, VPN, Messenger, social network and much more on your private server, under your control.", - "page2_title": "SelfPrivacy — it's not a cloud, but your personal datacenter", - "page2_text": "SelfPrivacy works only with your provider accounts: Hetzner, Cloudflare, Backblaze. If you do not own those, we'll help you to create them." + "page2_title": "SelfPrivacy is not a cloud, it's Your personal datacenter", + "page2_text": "SelfPrivacy only works with providers that you choose. If you do not have required accounts in those, we'll help you to create them.", + "page2_server_provider_title": "Server provider", + "page2_server_provider_text": "A server provider maintains your server in its own data center. SelfPrivacy will automatically connect to the provider and setup all necessary things.", + "page2_dns_provider_title": "DNS provider", + "page2_dns_provider_text": "You need a domain to have a place in the Internet. And you also need a reliable DNS provider to have the domain pointed to your server. We will suggest you pick a supported DNS provider to automatically setup networking.", + "page2_backup_provider_title": "Backup provider", + "page2_backup_provider_text": "What if something happens to your server? Imagine a hacker attack, an accidental data deletion or denial of service? Your data will be kept safe in your provider of backups. They will be securely encrypted and anytime accessible to restore your server with." }, "resource_chart": { "month": "Month", @@ -268,9 +275,21 @@ "no_ssh_notice": "Only email and SSH accounts are created for this user. Single Sign On for all services is coming soon." }, "initializing": { - "connect_to_server": "Connect a server", - "select_provider": "Select your provider", - "place_where_data": "A place where your data and SelfPrivacy services will reside:", + "connect_to_server": "Let's start with a server.", + "select_provider": "Pick any provider from the following list, they all support SelfPrivacy", + "select_provider_countries_title": "Available countries", + "select_provider_countries_text_hetzner": "Germany, Finland, USA", + "select_provider_countries_text_do": "USA, Netherlands, Singapore, UK, Germany, Canada, India, Australia", + "select_provider_price_title": "Average price", + "select_provider_price_text_hetzner": "€8 per month for a relatively small server and 50GB of disk storage", + "select_provider_price_text_do": "$17 per month for a relatively small server and 50GB of disk storage", + "select_provider_payment_title": "Payment methods", + "select_provider_payment_text_hetzner": "Credit cards, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Credit cards, Google Pay, PayPal", + "select_provider_email_notice": "E-mail hosting won't be available for new clients. Nevertheless it will be unlocked as soon as you complete your first payment.", + "select_provider_site_button": "Visit site", + "connect_to_server_provider": "Autorize in ", + "connect_to_server_provider_text": "With API token SelfPrivacy will be able to setup a server ", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", "could_not_connect": "Counldn't connect to the provider.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 8764580a..93feaf86 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -3,6 +3,7 @@ "locale": "ru", "basis": { "providers": "Провайдеры", + "select": "Выбрать", "providers_title": "Ваш Дата Центр", "services": "Сервисы", "services_title": "Ваши личные, приватные и независимые сервисы.", @@ -80,7 +81,13 @@ "page1_title": "Цифровая независимость доступна каждому", "page1_text": "Почта, VPN, Мессенджер, социальная сеть и многое другое на Вашем личном сервере, под Вашим полным контролем.", "page2_title": "SelfPrivacy — это не облако, а Ваш личный дата-центр", - "page2_text": "SelfPrivacy работает только с вашими сервис-провайдерами: Hetzner, Cloudflare, Backblaze. Если у Вас нет учётных записей, мы поможем их создать." + "page2_text": "SelfPrivacy работает только с сервис-провайдерами на ваш выбор. Если у Вас нет учётных записей, мы поможем их создать.", + "page2_server_provider_title": "Сервер-провайдер", + "page2_server_provider_text": "Сервер-провайдер будет обслуживать ваш сервер в своём дата-центре. SelfPrivacy автоматически подключится к нему и настроит вам сервер.", + "page2_dns_provider_title": "DNS-провайдер", + "page2_dns_provider_text": "Чтобы быть в интернете, нужен домен. Чтобы домен указывал на ваш сервер, нужен надёжный DNS сервер. Мы предложим вам выбрать один из поддерживаемых DNS серверов автоматически настроим все записи. Хотите настроить их вручную? Так тоже можно.", + "page2_backup_provider_title": "Бэкап-провайдер", + "page2_backup_provider_text": "Что если с сервером что-то случится? Хакерская атака, отказ в обслуживании или просто случайное удаление данных? Ваши данные будут в сохранности в другом месте, у провайдера хранилища ваших резервных копий. Все они надёжно шифруются, и вы сможете восстановить свой сервер." }, "resource_chart": { "month": "Месяц", diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index 7d3084b7..26b07e53 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -4,5 +4,5 @@ class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned by constant certificate renewal - static bool get stagingAcme => false; + static bool get stagingAcme => true; } From e342727181b10912f6edab63c54b01b4019040a2 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 05:31:59 +0300 Subject: [PATCH 306/732] refactor(services): Remove services switch on services screen cards --- lib/ui/pages/services/services.dart | 91 +++++++---------------------- 1 file changed, 20 insertions(+), 71 deletions(-) diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index c4226250..1a6bb9fc 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -4,14 +4,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; -import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/brand_switch/brand_switch.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; @@ -21,14 +18,6 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; import 'package:url_launcher/url_launcher.dart'; -const switchableServices = [ - 'bitwarden', - 'nextcloud', - 'pleroma', - 'gitea', - 'ocserv', -]; - class ServicesPage extends StatefulWidget { const ServicesPage({super.key}); @@ -100,24 +89,28 @@ class _Card extends StatelessWidget { final isReady = context.watch().state is ServerInstallationFinished; - final serviceState = context.watch().state; - final jobsCubit = context.watch(); - final jobState = jobsCubit.state; - - final switchableService = switchableServices.contains(service.id); - final hasSwitchJob = switchableService && - jobState is JobsStateWithJobs && - jobState.clientJobList.any( - (final el) => el is ServiceToggleJob && el.id == service.id, - ); - - final isSwitchOn = isReady && - (!switchableServices.contains(service.id) || - serviceState.isEnableByType(service)); - final config = context.watch().state; final domainName = UiHelpers.getDomainName(config); + StateType getStatus(final ServiceStatus status) { + switch (status) { + case ServiceStatus.active: + return StateType.stable; + case ServiceStatus.activating: + return StateType.stable; + case ServiceStatus.deactivating: + return StateType.uninitialized; + case ServiceStatus.inactive: + return StateType.uninitialized; + case ServiceStatus.failed: + return StateType.error; + case ServiceStatus.off: + return StateType.uninitialized; + case ServiceStatus.reloading: + return StateType.stable; + } + } + return GestureDetector( onTap: isReady ? () => Navigator.of(context) @@ -130,8 +123,7 @@ class _Card extends StatelessWidget { Row( children: [ IconStatusMask( - status: - isSwitchOn ? StateType.stable : StateType.uninitialized, + status: getStatus(service.status), icon: SvgPicture.string( service.svgIcon, width: 30.0, @@ -139,33 +131,6 @@ class _Card extends StatelessWidget { color: Theme.of(context).colorScheme.onBackground, ), ), - if (isReady && switchableService) ...[ - const Spacer(), - Builder( - builder: (final context) { - late bool isActive; - if (hasSwitchJob) { - isActive = (jobState.clientJobList.firstWhere( - (final el) => - el is ServiceToggleJob && el.id == service.id, - ) as ServiceToggleJob) - .needToTurnOn; - } else { - isActive = serviceState.isEnableByType(service); - } - - return BrandSwitch( - value: isActive, - onChanged: (final value) => jobsCubit.addJob( - ServiceToggleJob( - service: service, - needToTurnOn: value, - ), - ), - ); - }, - ), - ] ], ), ClipRect( @@ -215,22 +180,6 @@ class _Card extends StatelessWidget { const SizedBox(height: 10), ], ), - if (hasSwitchJob) - Positioned( - bottom: 24, - left: 0, - right: 0, - child: BackdropFilter( - filter: ImageFilter.blur( - sigmaX: 3, - sigmaY: 2, - ), - child: BrandText.h2( - 'jobs.run_jobs'.tr(), - textAlign: TextAlign.center, - ), - ), - ) ], ), ) From fc3d78662e31b5fbe75cb253fbdeb4fc4cc935f0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 05:33:04 +0300 Subject: [PATCH 307/732] refactor(theming): Remove gtk and win plugins for color extraction Default plugin now takes care of that --- lib/theming/factory/app_theme_factory.dart | 39 ++++++------------- linux/flutter/generated_plugin_registrant.cc | 8 ++-- linux/flutter/generated_plugins.cmake | 2 +- pubspec.lock | 27 ++----------- pubspec.yaml | 5 +-- .../flutter/generated_plugin_registrant.cc | 3 -- windows/flutter/generated_plugins.cmake | 1 - 7 files changed, 21 insertions(+), 64 deletions(-) diff --git a/lib/theming/factory/app_theme_factory.dart b/lib/theming/factory/app_theme_factory.dart index 65bb1648..2b7309d5 100644 --- a/lib/theming/factory/app_theme_factory.dart +++ b/lib/theming/factory/app_theme_factory.dart @@ -1,10 +1,7 @@ -import 'dart:io'; - import 'package:dynamic_color/dynamic_color.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:system_theme/system_theme.dart'; -import 'package:gtk_theme_fl/gtk_theme_fl.dart'; +import 'package:material_color_utilities/palettes/core_palette.dart'; abstract class AppThemeFactory { AppThemeFactory._(); @@ -22,40 +19,18 @@ abstract class AppThemeFactory { required final Color fallbackColor, final bool isDark = false, }) async { - ColorScheme? gtkColorsScheme; final Brightness brightness = isDark ? Brightness.dark : Brightness.light; final ColorScheme? dynamicColorsScheme = await _getDynamicColors(brightness); - if (Platform.isLinux) { - final GtkThemeData themeData = await GtkThemeData.initialize(); - final bool isGtkDark = - Color(themeData.theme_bg_color).computeLuminance() < 0.5; - final bool isInverseNeeded = isGtkDark != isDark; - gtkColorsScheme = ColorScheme.fromSeed( - seedColor: Color(themeData.theme_selected_bg_color), - brightness: brightness, - background: isInverseNeeded ? null : Color(themeData.theme_bg_color), - surface: isInverseNeeded ? null : Color(themeData.theme_base_color), - ); - } - - final SystemAccentColor accentColor = SystemAccentColor(fallbackColor); - - try { - await accentColor.load(); - } on MissingPluginException catch (e) { - print('_createAppTheme: ${e.message}'); - } - final ColorScheme fallbackColorScheme = ColorScheme.fromSeed( - seedColor: accentColor.accent, + seedColor: fallbackColor, brightness: brightness, ); final ColorScheme colorScheme = - dynamicColorsScheme ?? gtkColorsScheme ?? fallbackColorScheme; + dynamicColorsScheme ?? fallbackColorScheme; final Typography appTypography = Typography.material2021(); @@ -80,4 +55,12 @@ abstract class AppThemeFactory { return Future.value(null); } } + + static Future getCorePalette() async { + try { + return await DynamicColorPlugin.getCorePalette(); + } on PlatformException { + return Future.value(null); + } + } } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index cf327b12..075ecba3 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,17 +6,17 @@ #include "generated_plugin_registrant.h" +#include #include -#include #include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) dynamic_color_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); + dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); - g_autoptr(FlPluginRegistrar) gtk_theme_fl_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "GtkThemeFlPlugin"); - gtk_theme_fl_plugin_register_with_registrar(gtk_theme_fl_registrar); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 6c700a87..6fd458b2 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,8 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + dynamic_color flutter_secure_storage_linux - gtk_theme_fl url_launcher_linux ) diff --git a/pubspec.lock b/pubspec.lock index c5901997..cb43c377 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -308,7 +308,7 @@ packages: name: dynamic_color url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "1.5.4" easy_localization: dependency: "direct main" description: @@ -602,13 +602,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - gtk_theme_fl: - dependency: "direct main" - description: - name: gtk_theme_fl - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1" hive: dependency: "direct main" description: @@ -764,7 +757,7 @@ packages: source: hosted version: "0.12.12" material_color_utilities: - dependency: transitive + dependency: "direct main" description: name: material_color_utilities url: "https://pub.dartlang.org" @@ -1188,20 +1181,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.1" - system_theme: - dependency: "direct main" - description: - name: system_theme - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - system_theme_web: - dependency: transitive - description: - name: system_theme_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.2" term_glyph: dependency: transitive description: @@ -1414,4 +1393,4 @@ packages: version: "3.1.1" sdks: dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index af1521e1..dc69cd58 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: cubit_form: ^2.0.1 device_info_plus: ^4.0.1 dio: ^4.0.4 - dynamic_color: ^1.4.0 + dynamic_color: ^1.5.4 easy_localization: ^3.0.0 either_option: ^2.0.1-dev.1 equatable: ^2.0.3 @@ -30,7 +30,6 @@ dependencies: graphql: ^5.1.1 graphql_codegen: ^0.10.2 graphql_flutter: ^5.1.0 - gtk_theme_fl: ^0.0.1 hive: ^2.2.3 hive_flutter: ^1.1.0 http: ^0.13.5 @@ -38,6 +37,7 @@ dependencies: ionicons: ^0.1.2 json_annotation: ^4.6.0 local_auth: ^2.0.2 + material_color_utilities: ^0.1.5 modal_bottom_sheet: ^2.0.1 nanoid: ^1.0.0 package_info: ^2.0.2 @@ -45,7 +45,6 @@ dependencies: provider: ^6.0.2 pub_semver: ^2.1.1 share_plus: ^4.0.4 - system_theme: ^2.0.0 timezone: ^0.8.0 url_launcher: ^6.0.20 wakelock: ^0.6.1+1 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 1feb1b08..9c422c29 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -9,7 +9,6 @@ #include #include #include -#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { @@ -19,8 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); FlutterSecureStorageWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); - SystemThemePluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("SystemThemePlugin")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index fa5d72de..0039d570 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST connectivity_plus_windows dynamic_color flutter_secure_storage_windows - system_theme url_launcher_windows ) From 3fad05c8d515143c5e851d202a2e39ef5de313c4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 31 Dec 2022 06:40:02 +0400 Subject: [PATCH 308/732] docs: Add english text for new installation process --- assets/translations/en.json | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index ff0bf35a..027ae820 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -289,18 +289,24 @@ "select_provider_email_notice": "E-mail hosting won't be available for new clients. Nevertheless it will be unlocked as soon as you complete your first payment.", "select_provider_site_button": "Visit site", "connect_to_server_provider": "Autorize in ", - "connect_to_server_provider_text": "With API token SelfPrivacy will be able to setup a server ", + "connect_to_server_provider_text": "With API token SelfPrivacy will be able to rent a machine and setup your server on it", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", "could_not_connect": "Counldn't connect to the provider.", - "choose_location_type": "Choose your server location and type:", - "back_to_locations": "Go back to available locations!", - "no_locations_found": "No available locations found. Make sure your account is accessible.", + "choose_location_type": "Where do you want to order your server?", + "choose_location_type_text": "Different locations provide different server configurations, prices and connection speed.", + "locations_not_found": "Oops!", + "locations_not_found_text": "There are no available servers to rent", + "back_to_locations": "Select something else", + "choose_server_type": "What type of server do you need?", + "choose_server_type_text": "Different resource capabilities support different services. Don't worry, you can expand your server anytime", + "choose_server_type_notice": "The important things to look at are the CPU and RAM. The data of your services will be stored on a mounted volume which is easily explandable and gets paid for separately.", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", - "connect_cloudflare": "Connect CloudFlare", - "manage_domain_dns": "To manage your domain's DNS", + "select_dns": "Now let's select a DNS provider", + "select_dns_text": "", + "manage_domain_dns": "To manage your domarin's DNS", "cloudflare_api_token": "CloudFlare API Token", "connect_backblaze_storage": "Connect Backblaze storage", "no_connected_domains": "No connected domains at the moment", From 979e8dd9084f2ac45d048bb3d5ed2170b1f2bc6e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 31 Dec 2022 06:53:01 +0400 Subject: [PATCH 309/732] docs: Add select provider notice --- assets/translations/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/translations/en.json b/assets/translations/en.json index 027ae820..e8a3ab72 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -277,6 +277,7 @@ "initializing": { "connect_to_server": "Let's start with a server.", "select_provider": "Pick any provider from the following list, they all support SelfPrivacy", + "select_provider_notice": "By 'Relatively small' we mean a machine with 2 cores of CPU and 2 gigabytes of RAM.", "select_provider_countries_title": "Available countries", "select_provider_countries_text_hetzner": "Germany, Finland, USA", "select_provider_countries_text_do": "USA, Netherlands, Singapore, UK, Germany, Canada, India, Australia", From 41340f20266816653887a3ca0cf640c96bd97120 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 31 Dec 2022 07:36:49 +0400 Subject: [PATCH 310/732] docs: Add server type assets --- assets/translations/en.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/translations/en.json b/assets/translations/en.json index e8a3ab72..4ada7c08 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -302,6 +302,10 @@ "choose_server_type": "What type of server do you need?", "choose_server_type_text": "Different resource capabilities support different services. Don't worry, you can expand your server anytime", "choose_server_type_notice": "The important things to look at are the CPU and RAM. The data of your services will be stored on a mounted volume which is easily explandable and gets paid for separately.", + "choose_server_type_ram": "{} GB of RAM", + "choose_server_type_cpu": "{} GB of system storage", + "choose_server_type_payment_eur": "{} EUR per month", + "choose_server_type_payment_usd": "{} USD per month", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", From 72969ec1eb35dd210cfa500fd1ee49e0e5922d63 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 06:40:08 +0300 Subject: [PATCH 311/732] fix(Incorrect translation keys): --- assets/translations/en.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 4ada7c08..c036ef62 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -303,9 +303,8 @@ "choose_server_type_text": "Different resource capabilities support different services. Don't worry, you can expand your server anytime", "choose_server_type_notice": "The important things to look at are the CPU and RAM. The data of your services will be stored on a mounted volume which is easily explandable and gets paid for separately.", "choose_server_type_ram": "{} GB of RAM", - "choose_server_type_cpu": "{} GB of system storage", - "choose_server_type_payment_eur": "{} EUR per month", - "choose_server_type_payment_usd": "{} USD per month", + "choose_server_type_storage": "{} GB of system storage", + "choose_server_type_payment_per_month": "{} per month", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", @@ -474,4 +473,4 @@ "length_not_equal": "Length is [], should be {}", "length_longer": "Length is [], should be shorter than or equal to {}" } -} \ No newline at end of file +} From a750fa2eeb071bdf2bd8e603cda241b937fa0cf2 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 06:44:31 +0300 Subject: [PATCH 312/732] fix(translations): typo --- assets/translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index c036ef62..4857d1d0 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -310,7 +310,7 @@ "backblaze_bad_key_error": "Backblaze storage information is invalid", "select_dns": "Now let's select a DNS provider", "select_dns_text": "", - "manage_domain_dns": "To manage your domarin's DNS", + "manage_domain_dns": "To manage your domain's DNS", "cloudflare_api_token": "CloudFlare API Token", "connect_backblaze_storage": "Connect Backblaze storage", "no_connected_domains": "No connected domains at the moment", From 040de6926843972bbb59c9969d055dbddb5d4fef Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 06:58:37 +0300 Subject: [PATCH 313/732] docs(translations): Add translations to use this domain screen --- assets/translations/en.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/translations/en.json b/assets/translations/en.json index 4857d1d0..45bdf821 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -311,6 +311,8 @@ "select_dns": "Now let's select a DNS provider", "select_dns_text": "", "manage_domain_dns": "To manage your domain's DNS", + "use_this_domain": "Use this domain?", + "use_this_domain_text": "The token you provided gives access to the following domain", "cloudflare_api_token": "CloudFlare API Token", "connect_backblaze_storage": "Connect Backblaze storage", "no_connected_domains": "No connected domains at the moment", From b007fec75b9645fdcddb716ff36e25fe8eba54fc Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 07:16:10 +0300 Subject: [PATCH 314/732] refactor(initializing): Refresh the server istallation UI --- assets/images/logos/digital_ocean.svg | 6 + assets/images/logos/hetzner.svg | 10 + lib/illustrations/stray_deer.dart | 2521 +++++++++++++++++ lib/logic/api_maps/rest_maps/backblaze.dart | 3 +- .../app_settings/app_settings_cubit.dart | 15 +- .../app_settings/app_settings_state.dart | 9 +- lib/logic/models/hive/server_details.dart | 11 + lib/theming/factory/app_theme_factory.dart | 3 +- .../components/progress_bar/progress_bar.dart | 13 - lib/ui/pages/onboarding/onboarding.dart | 75 +- lib/ui/pages/services/services.dart | 2 - .../setup/initializing/initializing.dart | 464 +-- .../initializing/server_provider_picker.dart | 248 +- .../initializing/server_type_picker.dart | 227 +- 14 files changed, 3222 insertions(+), 385 deletions(-) create mode 100644 assets/images/logos/digital_ocean.svg create mode 100644 assets/images/logos/hetzner.svg create mode 100644 lib/illustrations/stray_deer.dart diff --git a/assets/images/logos/digital_ocean.svg b/assets/images/logos/digital_ocean.svg new file mode 100644 index 00000000..98b04c36 --- /dev/null +++ b/assets/images/logos/digital_ocean.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/logos/hetzner.svg b/assets/images/logos/hetzner.svg new file mode 100644 index 00000000..5cafc101 --- /dev/null +++ b/assets/images/logos/hetzner.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/lib/illustrations/stray_deer.dart b/lib/illustrations/stray_deer.dart new file mode 100644 index 00000000..b7223291 --- /dev/null +++ b/lib/illustrations/stray_deer.dart @@ -0,0 +1,2521 @@ +import 'package:dynamic_color/dynamic_color.dart'; +import 'package:flutter/material.dart'; +import 'package:material_color_utilities/palettes/core_palette.dart'; + +// max_width coefficient is 1 +class StrayDeerPainter extends CustomPainter { + StrayDeerPainter({required this.colorPalette, required this.colorScheme}); + + final CorePalette colorPalette; + final ColorScheme colorScheme; + + @override + void paint(final Canvas canvas, final Size size) { + final Color deerTracks = Color(colorPalette.tertiary.get(70)); + final Color mailBag = Color(colorPalette.tertiary.get(80)); + final Color contourColor = Color(colorPalette.tertiary.get(10)); + final Color deerSkin = + const Color(0xffe0ac9c).harmonizeWith(colorScheme.primary); + + print('deerSkin: $deerSkin'); + print('colorScheme.primary: ${colorScheme.primary}'); + print('colorPalette.tertiary.get(10): ${colorPalette.tertiary.get(50)}'); + + final Path path0 = Path(); + path0.moveTo(size.width * 0.6099773, size.height * 0.6719577); + path0.lineTo(size.width * 0.6088435, size.height * 0.6719577); + path0.lineTo(size.width * 0.6148904, size.height * 0.6727135); + path0.lineTo(size.width * 0.6099773, size.height * 0.6719577); + path0.close(); + path0.moveTo(size.width * 0.5593348, size.height * 0.6723356); + path0.cubicTo( + size.width * 0.5525321, + size.height * 0.6723356, + size.width * 0.5461073, + size.height * 0.6738473, + size.width * 0.5400605, + size.height * 0.6761149); + path0.lineTo(size.width * 0.5476190, size.height * 0.6806500); + path0.cubicTo( + size.width * 0.5529101, + size.height * 0.6798942, + size.width * 0.5585790, + size.height * 0.6806500, + size.width * 0.5634921, + size.height * 0.6787604); + path0.cubicTo( + size.width * 0.5653817, + size.height * 0.6780045, + size.width * 0.5680272, + size.height * 0.6764928, + size.width * 0.5680272, + size.height * 0.6746032); + path0.cubicTo( + size.width * 0.5680272, + size.height * 0.6727135, + size.width * 0.5653817, + size.height * 0.6727135, + size.width * 0.5642479, + size.height * 0.6727135); + path0.lineTo(size.width * 0.5593348, size.height * 0.6727135); + path0.close(); + path0.moveTo(size.width * 0.6757370, size.height * 0.6727135); + path0.lineTo(size.width * 0.6700680, size.height * 0.6730915); + path0.cubicTo( + size.width * 0.6681784, + size.height * 0.6734694, + size.width * 0.6655329, + size.height * 0.6730915, + size.width * 0.6636432, + size.height * 0.6746032); + path0.lineTo(size.width * 0.6636432, size.height * 0.6753590); + path0.lineTo(size.width * 0.6723356, size.height * 0.6810280); + path0.lineTo(size.width * 0.6874528, size.height * 0.6825397); + path0.cubicTo( + size.width * 0.6897203, + size.height * 0.6825397, + size.width * 0.6923658, + size.height * 0.6832955, + size.width * 0.6938776, + size.height * 0.6814059); + path0.cubicTo( + size.width * 0.6953893, + size.height * 0.6798942, + size.width * 0.6931217, + size.height * 0.6776266, + size.width * 0.6919879, + size.height * 0.6772487); + path0.arcToPoint(Offset(size.width * 0.6757370, size.height * 0.6727135), + radius: Radius.elliptical( + size.width * 0.03325775, size.height * 0.03325775), + rotation: 0, + largeArc: false, + clockwise: false); + path0.close(); + path0.moveTo(size.width * 0.5971277, size.height * 0.6768707); + path0.cubicTo( + size.width * 0.5997732, + size.height * 0.6780045, + size.width * 0.6027967, + size.height * 0.6780045, + size.width * 0.6054422, + size.height * 0.6768707); + path0.close(); + path0.moveTo(size.width * 0.4950869, size.height * 0.6814059); + path0.lineTo(size.width * 0.4924414, size.height * 0.6814059); + path0.cubicTo( + size.width * 0.4909297, + size.height * 0.6814059, + size.width * 0.4886621, + size.height * 0.6814059, + size.width * 0.4871504, + size.height * 0.6825397); + path0.lineTo(size.width * 0.4833711, size.height * 0.6912320); + path0.cubicTo( + size.width * 0.4894180, + size.height * 0.6904762, + size.width * 0.4954649, + size.height * 0.6904762, + size.width * 0.5011338, + size.height * 0.6882086); + path0.cubicTo( + size.width * 0.5030234, + size.height * 0.6874528, + size.width * 0.5049131, + size.height * 0.6866969, + size.width * 0.5064248, + size.height * 0.6851852); + path0.cubicTo( + size.width * 0.5071807, + size.height * 0.6840514, + size.width * 0.5056689, + size.height * 0.6829176, + size.width * 0.5045351, + size.height * 0.6825397); + path0.cubicTo( + size.width * 0.5015117, + size.height * 0.6817838, + size.width * 0.4984883, + size.height * 0.6814059, + size.width * 0.4950869, + size.height * 0.6814059); + path0.close(); + path0.moveTo(size.width * 0.6303855, size.height * 0.6832955); + path0.arcToPoint(Offset(size.width * 0.6179138, size.height * 0.6863190), + radius: Radius.elliptical( + size.width * 0.03401361, size.height * 0.03401361), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.6167800, + size.height * 0.6866969, + size.width * 0.6148904, + size.height * 0.6874528, + size.width * 0.6148904, + size.height * 0.6889645); + path0.cubicTo( + size.width * 0.6148904, + size.height * 0.6904762, + size.width * 0.6167800, + size.height * 0.6904762, + size.width * 0.6175359, + size.height * 0.6900983); + path0.lineTo(size.width * 0.6179138, size.height * 0.6938776); + path0.cubicTo( + size.width * 0.6250945, + size.height * 0.6934996, + size.width * 0.6322751, + size.height * 0.6934996, + size.width * 0.6386999, + size.height * 0.6904762); + path0.cubicTo( + size.width * 0.6398337, + size.height * 0.6900983, + size.width * 0.6417234, + size.height * 0.6889645, + size.width * 0.6413454, + size.height * 0.6874528); + path0.cubicTo( + size.width * 0.6405896, + size.height * 0.6851852, + size.width * 0.6379441, + size.height * 0.6848073, + size.width * 0.6360544, + size.height * 0.6840514); + path0.lineTo(size.width * 0.6303855, size.height * 0.6832955); + path0.close(); + path0.moveTo(size.width * 0.7959184, size.height * 0.6885865); + path0.lineTo(size.width * 0.7932729, size.height * 0.6889645); + path0.lineTo(size.width * 0.7932729, size.height * 0.6893424); + path0.lineTo(size.width * 0.7932729, size.height * 0.6893424); + path0.lineTo(size.width * 0.7951625, size.height * 0.6980348); + path0.arcToPoint(Offset(size.width * 0.8148148, size.height * 0.7018141), + radius: Radius.elliptical( + size.width * 0.02116402, size.height * 0.02116402), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.8163265, + size.height * 0.7010582, + size.width * 0.8178382, + size.height * 0.6999244, + size.width * 0.8170824, + size.height * 0.6980348); + path0.cubicTo( + size.width * 0.8163265, + size.height * 0.6961451, + size.width * 0.8140590, + size.height * 0.6946334, + size.width * 0.8121693, + size.height * 0.6938776); + path0.arcToPoint(Offset(size.width * 0.7981859, size.height * 0.6885865), + radius: Radius.elliptical( + size.width * 0.03665911, size.height * 0.03665911), + rotation: 0, + largeArc: false, + clockwise: false); + path0.lineTo(size.width * 0.7959184, size.height * 0.6885865); + path0.close(); + path0.moveTo(size.width * 0.7448980, size.height * 0.6900983); + path0.lineTo(size.width * 0.7430083, size.height * 0.6900983); + path0.cubicTo( + size.width * 0.7407407, + size.height * 0.6904762, + size.width * 0.7384732, + size.height * 0.6916100, + size.width * 0.7369615, + size.height * 0.6938776); + path0.cubicTo( + size.width * 0.7365835, + size.height * 0.6938776, + size.width * 0.7369615, + size.height * 0.6946334, + size.width * 0.7369615, + size.height * 0.6946334); + path0.lineTo(size.width * 0.7369615, size.height * 0.6999244); + path0.cubicTo( + size.width * 0.7418745, + size.height * 0.7006803, + size.width * 0.7467876, + size.height * 0.7014361, + size.width * 0.7520786, + size.height * 0.7006803); + path0.cubicTo( + size.width * 0.7543462, + size.height * 0.7006803, + size.width * 0.7566138, + size.height * 0.6999244, + size.width * 0.7585034, + size.height * 0.6980348); + path0.cubicTo( + size.width * 0.7600151, + size.height * 0.6969010, + size.width * 0.7585034, + size.height * 0.6953893, + size.width * 0.7573696, + size.height * 0.6942555); + path0.cubicTo( + size.width * 0.7535903, + size.height * 0.6919879, + size.width * 0.7494331, + size.height * 0.6897203, + size.width * 0.7448980, + size.height * 0.6900983); + path0.close(); + path0.moveTo(size.width * 0.4357521, size.height * 0.6961451); + path0.lineTo(size.width * 0.4349962, size.height * 0.7052154); + path0.cubicTo( + size.width * 0.4399093, + size.height * 0.7055933, + size.width * 0.4448224, + size.height * 0.7040816, + size.width * 0.4489796, + size.height * 0.7014361); + path0.cubicTo( + size.width * 0.4504913, + size.height * 0.7010582, + size.width * 0.4523810, + size.height * 0.7003023, + size.width * 0.4531368, + size.height * 0.6991686); + path0.cubicTo( + size.width * 0.4538927, + size.height * 0.6980348, + size.width * 0.4527589, + size.height * 0.6972789, + size.width * 0.4520030, + size.height * 0.6972789); + path0.cubicTo( + size.width * 0.4489796, + size.height * 0.6961451, + size.width * 0.4459562, + size.height * 0.6972789, + size.width * 0.4433107, + size.height * 0.6965231); + path0.lineTo(size.width * 0.4357521, size.height * 0.6961451); + path0.close(); + path0.moveTo(size.width * 0.3408919, size.height * 0.6999244); + path0.arcToPoint(Offset(size.width * 0.3250189, size.height * 0.7052154), + radius: Radius.elliptical( + size.width * 0.03401361, size.height * 0.03401361), + rotation: 0, + largeArc: false, + clockwise: false); + path0.lineTo(size.width * 0.3208617, size.height * 0.7108844); + path0.cubicTo( + size.width * 0.3465608, + size.height * 0.7146636, + size.width * 0.3522298, + size.height * 0.6999244, + size.width * 0.3408919, + size.height * 0.6999244); + path0.close(); + path0.moveTo(size.width * 0.8435374, size.height * 0.7195767); + path0.cubicTo( + size.width * 0.8420257, + size.height * 0.7195767, + size.width * 0.8405140, + size.height * 0.7199546, + size.width * 0.8397581, + size.height * 0.7210884); + path0.lineTo(size.width * 0.8344671, size.height * 0.7248677); + path0.cubicTo( + size.width * 0.8359788, + size.height * 0.7271353, + size.width * 0.8374906, + size.height * 0.7297808, + size.width * 0.8397581, + size.height * 0.7312925); + path0.cubicTo( + size.width * 0.8416478, + size.height * 0.7328042, + size.width * 0.8446712, + size.height * 0.7324263, + size.width * 0.8473167, + size.height * 0.7324263); + path0.cubicTo( + size.width * 0.8488284, + size.height * 0.7324263, + size.width * 0.8510960, + size.height * 0.7324263, + size.width * 0.8526077, + size.height * 0.7309146); + path0.cubicTo( + size.width * 0.8541194, + size.height * 0.7286470, + size.width * 0.8533636, + size.height * 0.7260015, + size.width * 0.8522298, + size.height * 0.7241119); + path0.arcToPoint(Offset(size.width * 0.8431595, size.height * 0.7195767), + radius: Radius.elliptical( + size.width * 0.01020408, size.height * 0.01020408), + rotation: 0, + largeArc: false, + clockwise: false); + path0.close(); + path0.moveTo(size.width * 0.2883598, size.height * 0.7237339); + path0.cubicTo( + size.width * 0.2853364, + size.height * 0.7237339, + size.width * 0.2808012, + size.height * 0.7244898, + size.width * 0.2743764, + size.height * 0.7256236); + path0.lineTo(size.width * 0.2660620, size.height * 0.7343159); + path0.cubicTo( + size.width * 0.2834467, + size.height * 0.7331822, + size.width * 0.3012094, + size.height * 0.7237339, + size.width * 0.2883598, + size.height * 0.7237339); + path0.close(); + path0.moveTo(size.width * 0.8907785, size.height * 0.7241119); + path0.lineTo(size.width * 0.8892668, size.height * 0.7241119); + path0.lineTo(size.width * 0.8869992, size.height * 0.7278912); + path0.cubicTo( + size.width * 0.8881330, + size.height * 0.7312925, + size.width * 0.8904006, + size.height * 0.7331822, + size.width * 0.8926682, + size.height * 0.7350718); + path0.cubicTo( + size.width * 0.8945578, + size.height * 0.7369615, + size.width * 0.8964475, + size.height * 0.7388511, + size.width * 0.8990930, + size.height * 0.7403628); + path0.cubicTo( + size.width * 0.9006047, + size.height * 0.7411187, + size.width * 0.9028723, + size.height * 0.7422525, + size.width * 0.9043840, + size.height * 0.7418745); + path0.cubicTo( + size.width * 0.9058957, + size.height * 0.7411187, + size.width * 0.9058957, + size.height * 0.7392290, + size.width * 0.9062736, + size.height * 0.7380952); + path0.cubicTo( + size.width * 0.9062736, + size.height * 0.7339380, + size.width * 0.9047619, + size.height * 0.7294029, + size.width * 0.9009826, + size.height * 0.7271353); + path0.cubicTo( + size.width * 0.8987150, + size.height * 0.7256236, + size.width * 0.8956916, + size.height * 0.7248677, + size.width * 0.8926682, + size.height * 0.7244898); + path0.lineTo(size.width * 0.8907785, size.height * 0.7244898); + path0.close(); + path0.moveTo(size.width * 0.2078609, size.height * 0.7373394); + path0.cubicTo( + size.width * 0.2029478, + size.height * 0.7388511, + size.width * 0.1976568, + size.height * 0.7388511, + size.width * 0.1931217, + size.height * 0.7414966); + path0.cubicTo( + size.width * 0.1908541, + size.height * 0.7430083, + size.width * 0.1893424, + size.height * 0.7464097, + size.width * 0.1912320, + size.height * 0.7486772); + path0.cubicTo( + size.width * 0.1931217, + size.height * 0.7509448, + size.width * 0.1965231, + size.height * 0.7513228, + size.width * 0.1991686, + size.height * 0.7517007); + path0.cubicTo( + size.width * 0.2048375, + size.height * 0.7517007, + size.width * 0.2105064, + size.height * 0.7517007, + size.width * 0.2154195, + size.height * 0.7490552); + path0.arcToPoint(Offset(size.width * 0.2214664, size.height * 0.7452759), + radius: Radius.elliptical( + size.width * 0.02645503, size.height * 0.02645503), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.2226002, + size.height * 0.7445200, + size.width * 0.2237339, + size.height * 0.7422525, + size.width * 0.2222222, + size.height * 0.7407407); + path0.cubicTo( + size.width * 0.2203326, + size.height * 0.7388511, + size.width * 0.2173091, + size.height * 0.7380952, + size.width * 0.2146636, + size.height * 0.7384732); + path0.cubicTo( + size.width * 0.2135299, + size.height * 0.7384732, + size.width * 0.2123961, + size.height * 0.7392290, + size.width * 0.2116402, + size.height * 0.7399849); + path0.close(); + path0.moveTo(size.width * 0.1583522, size.height * 0.7392290); + path0.cubicTo( + size.width * 0.1572184, + size.height * 0.7392290, + size.width * 0.1564626, + size.height * 0.7392290, + size.width * 0.1553288, + size.height * 0.7399849); + path0.cubicTo( + size.width * 0.1545729, + size.height * 0.7403628, + size.width * 0.1541950, + size.height * 0.7411187, + size.width * 0.1541950, + size.height * 0.7422525); + path0.lineTo(size.width * 0.1466364, size.height * 0.7422525); + path0.cubicTo( + size.width * 0.1436130, + size.height * 0.7441421, + size.width * 0.1405896, + size.height * 0.7460317, + size.width * 0.1379441, + size.height * 0.7490552); + path0.cubicTo( + size.width * 0.1364324, + size.height * 0.7505669, + size.width * 0.1341648, + size.height * 0.7528345, + size.width * 0.1341648, + size.height * 0.7551020); + path0.cubicTo( + size.width * 0.1349206, + size.height * 0.7573696, + size.width * 0.1371882, + size.height * 0.7577475, + size.width * 0.1390779, + size.height * 0.7577475); + path0.cubicTo( + size.width * 0.1451247, + size.height * 0.7577475, + size.width * 0.1504157, + size.height * 0.7554800, + size.width * 0.1557067, + size.height * 0.7520786); + path0.cubicTo( + size.width * 0.1579743, + size.height * 0.7505669, + size.width * 0.1594860, + size.height * 0.7482993, + size.width * 0.1617536, + size.height * 0.7464097); + path0.cubicTo( + size.width * 0.1628874, + size.height * 0.7448980, + size.width * 0.1647770, + size.height * 0.7426304, + size.width * 0.1628874, + size.height * 0.7407407); + path0.arcToPoint(Offset(size.width * 0.1583522, size.height * 0.7392290), + radius: Radius.elliptical( + size.width * 0.007558579, size.height * 0.007558579), + rotation: 0, + largeArc: false, + clockwise: false); + path0.close(); + path0.moveTo(size.width * 0.8764172, size.height * 0.7505669); + path0.lineTo(size.width * 0.8726379, size.height * 0.7532124); + path0.cubicTo( + size.width * 0.8737717, + size.height * 0.7569917, + size.width * 0.8733938, + size.height * 0.7615268, + size.width * 0.8756614, + size.height * 0.7645503); + path0.lineTo(size.width * 0.8794407, size.height * 0.7694633); + path0.cubicTo( + size.width * 0.8809524, + size.height * 0.7705971, + size.width * 0.8832200, + size.height * 0.7717309, + size.width * 0.8851096, + size.height * 0.7705971); + path0.cubicTo( + size.width * 0.8862434, + size.height * 0.7694633, + size.width * 0.8866213, + size.height * 0.7675737, + size.width * 0.8862434, + size.height * 0.7660620); + path0.cubicTo( + size.width * 0.8862434, + size.height * 0.7630385, + size.width * 0.8847317, + size.height * 0.7600151, + size.width * 0.8832200, + size.height * 0.7573696); + path0.cubicTo( + size.width * 0.8824641, + size.height * 0.7547241, + size.width * 0.8809524, + size.height * 0.7520786, + size.width * 0.8783069, + size.height * 0.7513228); + path0.arcToPoint(Offset(size.width * 0.8764172, size.height * 0.7509448), + radius: Radius.elliptical( + size.width * 0.007558579, size.height * 0.007558579), + rotation: 0, + largeArc: false, + clockwise: false); + path0.close(); + path0.moveTo(size.width * 0.1190476, size.height * 0.7709751); + path0.cubicTo( + size.width * 0.1190476, + size.height * 0.7709751, + size.width * 0.1190476, + size.height * 0.7709751, + size.width * 0.1190476, + size.height * 0.7709751); + path0.cubicTo( + size.width * 0.1171580, + size.height * 0.7709751, + size.width * 0.1156463, + size.height * 0.7713530, + size.width * 0.1145125, + size.height * 0.7721088); + path0.lineTo(size.width * 0.1141345, size.height * 0.7728647); + path0.lineTo(size.width * 0.1111111, size.height * 0.7739985); + path0.cubicTo( + size.width * 0.1092215, + size.height * 0.7762661, + size.width * 0.1073318, + size.height * 0.7785336, + size.width * 0.1065760, + size.height * 0.7815571); + path0.cubicTo( + size.width * 0.1061980, + size.height * 0.7834467, + size.width * 0.1065760, + size.height * 0.7853364, + size.width * 0.1080877, + size.height * 0.7860922); + path0.cubicTo( + size.width * 0.1095994, + size.height * 0.7868481, + size.width * 0.1114890, + size.height * 0.7860922, + size.width * 0.1130008, + size.height * 0.7853364); + path0.cubicTo( + size.width * 0.1156463, + size.height * 0.7834467, + size.width * 0.1182918, + size.height * 0.7815571, + size.width * 0.1205593, + size.height * 0.7785336); + path0.cubicTo( + size.width * 0.1213152, + size.height * 0.7766440, + size.width * 0.1220711, + size.height * 0.7747543, + size.width * 0.1216931, + size.height * 0.7728647); + path0.cubicTo( + size.width * 0.1216931, + size.height * 0.7713530, + size.width * 0.1201814, + size.height * 0.7709751, + size.width * 0.1190476, + size.height * 0.7709751); + path0.close(); + path0.moveTo(size.width * 0.9213908, size.height * 0.7739985); + path0.lineTo(size.width * 0.9172336, size.height * 0.7758881); + path0.cubicTo( + size.width * 0.9142101, + size.height * 0.7808012, + size.width * 0.9126984, + size.height * 0.7868481, + size.width * 0.9123205, + size.height * 0.7925170); + path0.cubicTo( + size.width * 0.9123205, + size.height * 0.7940287, + size.width * 0.9111867, + size.height * 0.7962963, + size.width * 0.9123205, + size.height * 0.7974301); + path0.cubicTo( + size.width * 0.9138322, + size.height * 0.7981859, + size.width * 0.9157218, + size.height * 0.7974301, + size.width * 0.9168556, + size.height * 0.7970522); + path0.arcToPoint(Offset(size.width * 0.9263039, size.height * 0.7845805), + radius: Radius.elliptical( + size.width * 0.01511716, size.height * 0.01511716), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.9263039, + size.height * 0.7808012, + size.width * 0.9259259, + size.height * 0.7770219, + size.width * 0.9229025, + size.height * 0.7743764); + path0.arcToPoint(Offset(size.width * 0.9213908, size.height * 0.7743764), + radius: Radius.elliptical( + size.width * 0.002267574, size.height * 0.002267574), + rotation: 0, + largeArc: false, + clockwise: false); + path0.close(); + path0.moveTo(size.width * 0.1511716, size.height * 0.7902494); + path0.lineTo(size.width * 0.1451247, size.height * 0.8027211); + path0.cubicTo( + size.width * 0.1466364, + size.height * 0.8061224, + size.width * 0.1485261, + size.height * 0.8099017, + size.width * 0.1519274, + size.height * 0.8117914); + path0.cubicTo( + size.width * 0.1553288, + size.height * 0.8133031, + size.width * 0.1594860, + size.height * 0.8140590, + size.width * 0.1625094, + size.height * 0.8121693); + path0.cubicTo( + size.width * 0.1643991, + size.height * 0.8114135, + size.width * 0.1651550, + size.height * 0.8091459, + size.width * 0.1651550, + size.height * 0.8072562); + path0.cubicTo( + size.width * 0.1643991, + size.height * 0.8015873, + size.width * 0.1625094, + size.height * 0.7959184, + size.width * 0.1575964, + size.height * 0.7928949); + path0.arcToPoint(Offset(size.width * 0.1511716, size.height * 0.7902494), + radius: Radius.elliptical( + size.width * 0.01511716, size.height * 0.01511716), + rotation: 0, + largeArc: false, + clockwise: false); + path0.close(); + path0.moveTo(size.width * 0.8805745, size.height * 0.8008314); + path0.lineTo(size.width * 0.8779289, size.height * 0.8012094); + path0.arcToPoint(Offset(size.width * 0.8643235, size.height * 0.8087680), + radius: Radius.elliptical( + size.width * 0.03665911, size.height * 0.03665911), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.8635676, + size.height * 0.8099017, + size.width * 0.8643235, + size.height * 0.8110355, + size.width * 0.8650794, + size.height * 0.8110355); + path0.cubicTo( + size.width * 0.8673469, + size.height * 0.8114135, + size.width * 0.8699924, + size.height * 0.8117914, + size.width * 0.8722600, + size.height * 0.8110355); + path0.cubicTo( + size.width * 0.8752834, + size.height * 0.8102797, + size.width * 0.8779289, + size.height * 0.8087680, + size.width * 0.8798186, + size.height * 0.8065004); + path0.cubicTo( + size.width * 0.8809524, + size.height * 0.8053666, + size.width * 0.8817082, + size.height * 0.8042328, + size.width * 0.8813303, + size.height * 0.8027211); + path0.cubicTo( + size.width * 0.8813303, + size.height * 0.8019652, + size.width * 0.8805745, + size.height * 0.8012094, + size.width * 0.8809524, + size.height * 0.8008314); + path0.close(); + path0.moveTo(size.width * 0.8030990, size.height * 0.8216175); + path0.lineTo(size.width * 0.7985639, size.height * 0.8227513); + path0.arcToPoint(Offset(size.width * 0.7910053, size.height * 0.8276644), + radius: Radius.elliptical( + size.width * 0.02267574, size.height * 0.02267574), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.7902494, + size.height * 0.8287982, + size.width * 0.7910053, + size.height * 0.8303099, + size.width * 0.7921391, + size.height * 0.8306878); + path0.cubicTo( + size.width * 0.7947846, + size.height * 0.8321995, + size.width * 0.7974301, + size.height * 0.8321995, + size.width * 0.8004535, + size.height * 0.8318216); + path0.cubicTo( + size.width * 0.8046107, + size.height * 0.8318216, + size.width * 0.8087680, + size.height * 0.8303099, + size.width * 0.8129252, + size.height * 0.8295540); + path0.cubicTo( + size.width * 0.8140590, + size.height * 0.8291761, + size.width * 0.8155707, + size.height * 0.8280423, + size.width * 0.8136810, + size.height * 0.8272865); + path0.lineTo(size.width * 0.8046107, size.height * 0.8216175); + path0.lineTo(size.width * 0.8030990, size.height * 0.8216175); + path0.close(); + path0.moveTo(size.width * 0.8499622, size.height * 0.8280423); + path0.cubicTo( + size.width * 0.8473167, + size.height * 0.8284203, + size.width * 0.8450491, + size.height * 0.8295540, + size.width * 0.8427816, + size.height * 0.8310658); + path0.cubicTo( + size.width * 0.8405140, + size.height * 0.8321995, + size.width * 0.8382464, + size.height * 0.8340892, + size.width * 0.8374906, + size.height * 0.8363568); + path0.cubicTo( + size.width * 0.8367347, + size.height * 0.8374906, + size.width * 0.8374906, + size.height * 0.8393802, + size.width * 0.8386243, + size.height * 0.8397581); + path0.cubicTo( + size.width * 0.8408919, + size.height * 0.8401361, + size.width * 0.8435374, + size.height * 0.8397581, + size.width * 0.8458050, + size.height * 0.8393802); + path0.cubicTo( + size.width * 0.8480726, + size.height * 0.8386243, + size.width * 0.8507181, + size.height * 0.8382464, + size.width * 0.8526077, + size.height * 0.8367347); + path0.cubicTo( + size.width * 0.8544974, + size.height * 0.8356009, + size.width * 0.8563870, + size.height * 0.8340892, + size.width * 0.8575208, + size.height * 0.8321995); + path0.cubicTo( + size.width * 0.8582766, + size.height * 0.8306878, + size.width * 0.8563870, + size.height * 0.8303099, + size.width * 0.8552532, + size.height * 0.8299320); + path0.lineTo(size.width * 0.8533636, size.height * 0.8299320); + path0.close(); + path0.moveTo(size.width * 0.1375661, size.height * 0.8291761); + path0.cubicTo( + size.width * 0.1364324, + size.height * 0.8291761, + size.width * 0.1356765, + size.height * 0.8291761, + size.width * 0.1345427, + size.height * 0.8299320); + path0.cubicTo( + size.width * 0.1341648, + size.height * 0.8299320, + size.width * 0.1334089, + size.height * 0.8306878, + size.width * 0.1334089, + size.height * 0.8314437); + path0.lineTo(size.width * 0.1303855, size.height * 0.8352230); + path0.cubicTo( + size.width * 0.1296296, + size.height * 0.8374906, + size.width * 0.1315193, + size.height * 0.8397581, + size.width * 0.1334089, + size.height * 0.8412698); + path0.lineTo(size.width * 0.1379441, size.height * 0.8450491); + path0.arcToPoint(Offset(size.width * 0.1455026, size.height * 0.8480726), + radius: Radius.elliptical( + size.width * 0.01133787, size.height * 0.01133787), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.1481481, + size.height * 0.8480726, + size.width * 0.1511716, + size.height * 0.8469388, + size.width * 0.1530612, + size.height * 0.8450491); + path0.cubicTo( + size.width * 0.1541950, + size.height * 0.8431595, + size.width * 0.1530612, + size.height * 0.8412698, + size.width * 0.1523054, + size.height * 0.8393802); + path0.cubicTo( + size.width * 0.1496599, + size.height * 0.8356009, + size.width * 0.1458806, + size.height * 0.8329554, + size.width * 0.1421013, + size.height * 0.8303099); + path0.cubicTo( + size.width * 0.1409675, + size.height * 0.8295540, + size.width * 0.1390779, + size.height * 0.8291761, + size.width * 0.1375661, + size.height * 0.8291761); + path0.close(); + path0.moveTo(size.width * 0.6749811, size.height * 0.8363568); + path0.lineTo(size.width * 0.6742252, size.height * 0.8363568); + path0.cubicTo( + size.width * 0.6708239, + size.height * 0.8363568, + size.width * 0.6674225, + size.height * 0.8363568, + size.width * 0.6643991, + size.height * 0.8378685); + path0.lineTo(size.width * 0.6598639, size.height * 0.8405140); + path0.cubicTo( + size.width * 0.6606198, + size.height * 0.8416478, + size.width * 0.6621315, + size.height * 0.8424036, + size.width * 0.6636432, + size.height * 0.8427816); + path0.lineTo(size.width * 0.6712018, size.height * 0.8446712); + path0.cubicTo( + size.width * 0.6749811, + size.height * 0.8458050, + size.width * 0.6798942, + size.height * 0.8461829, + size.width * 0.6836735, + size.height * 0.8442933); + path0.cubicTo( + size.width * 0.6851852, + size.height * 0.8431595, + size.width * 0.6870748, + size.height * 0.8420257, + size.width * 0.6866969, + size.height * 0.8405140); + path0.cubicTo( + size.width * 0.6866969, + size.height * 0.8386243, + size.width * 0.6848073, + size.height * 0.8378685, + size.width * 0.6829176, + size.height * 0.8374906); + path0.cubicTo( + size.width * 0.6806500, + size.height * 0.8367347, + size.width * 0.6776266, + size.height * 0.8363568, + size.width * 0.6749811, + size.height * 0.8363568); + path0.close(); + path0.moveTo(size.width * 0.2003023, size.height * 0.8401361); + path0.cubicTo( + size.width * 0.1984127, + size.height * 0.8401361, + size.width * 0.1965231, + size.height * 0.8401361, + size.width * 0.1946334, + size.height * 0.8412698); + path0.cubicTo( + size.width * 0.1938776, + size.height * 0.8416478, + size.width * 0.1916100, + size.height * 0.8424036, + size.width * 0.1931217, + size.height * 0.8431595); + path0.lineTo(size.width * 0.1931217, size.height * 0.8442933); + path0.cubicTo( + size.width * 0.1931217, + size.height * 0.8465608, + size.width * 0.1953893, + size.height * 0.8480726, + size.width * 0.1969010, + size.height * 0.8488284); + path0.cubicTo( + size.width * 0.2006803, + size.height * 0.8503401, + size.width * 0.2044596, + size.height * 0.8510960, + size.width * 0.2082389, + size.height * 0.8507181); + path0.cubicTo( + size.width * 0.2101285, + size.height * 0.8503401, + size.width * 0.2120181, + size.height * 0.8495843, + size.width * 0.2127740, + size.height * 0.8480726); + path0.cubicTo( + size.width * 0.2135299, + size.height * 0.8458050, + size.width * 0.2123961, + size.height * 0.8439153, + size.width * 0.2105064, + size.height * 0.8427816); + path0.cubicTo( + size.width * 0.2074830, + size.height * 0.8408919, + size.width * 0.2040816, + size.height * 0.8401361, + size.width * 0.2003023, + size.height * 0.8401361); + path0.close(); + path0.moveTo(size.width * 0.5816327, size.height * 0.8439153); + path0.cubicTo( + size.width * 0.5782313, + size.height * 0.8439153, + size.width * 0.5752079, + size.height * 0.8446712, + size.width * 0.5721844, + size.height * 0.8450491); + path0.cubicTo( + size.width * 0.5691610, + size.height * 0.8458050, + size.width * 0.5661376, + size.height * 0.8465608, + size.width * 0.5646259, + size.height * 0.8495843); + path0.lineTo(size.width * 0.5661376, size.height * 0.8507181); + path0.lineTo(size.width * 0.5714286, size.height * 0.8522298); + path0.cubicTo( + size.width * 0.5752079, + size.height * 0.8533636, + size.width * 0.5789872, + size.height * 0.8537415, + size.width * 0.5827664, + size.height * 0.8533636); + path0.arcToPoint(Offset(size.width * 0.5903250, size.height * 0.8514739), + radius: Radius.elliptical( + size.width * 0.02267574, size.height * 0.02267574), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.5918367, + size.height * 0.8507181, + size.width * 0.5933485, + size.height * 0.8492063, + size.width * 0.5922147, + size.height * 0.8476946); + path0.cubicTo( + size.width * 0.5910809, + size.height * 0.8461829, + size.width * 0.5891912, + size.height * 0.8454271, + size.width * 0.5873016, + size.height * 0.8446712); + path0.cubicTo( + size.width * 0.5854119, + size.height * 0.8439153, + size.width * 0.5835223, + size.height * 0.8439153, + size.width * 0.5816327, + size.height * 0.8439153); + path0.close(); + path0.moveTo(size.width * 0.7403628, size.height * 0.8492063); + path0.cubicTo( + size.width * 0.7384732, + size.height * 0.8492063, + size.width * 0.7365835, + size.height * 0.8499622, + size.width * 0.7346939, + size.height * 0.8507181); + path0.cubicTo( + size.width * 0.7324263, + size.height * 0.8510960, + size.width * 0.7309146, + size.height * 0.8544974, + size.width * 0.7328042, + size.height * 0.8567649); + path0.cubicTo( + size.width * 0.7339380, + size.height * 0.8578987, + size.width * 0.7358277, + size.height * 0.8578987, + size.width * 0.7373394, + size.height * 0.8582766); + path0.cubicTo( + size.width * 0.7426304, + size.height * 0.8590325, + size.width * 0.7482993, + size.height * 0.8594104, + size.width * 0.7524565, + size.height * 0.8571429); + path0.cubicTo( + size.width * 0.7547241, + size.height * 0.8563870, + size.width * 0.7562358, + size.height * 0.8552532, + size.width * 0.7577475, + size.height * 0.8533636); + path0.cubicTo( + size.width * 0.7585034, + size.height * 0.8518519, + size.width * 0.7566138, + size.height * 0.8510960, + size.width * 0.7554800, + size.height * 0.8507181); + path0.lineTo(size.width * 0.7543462, size.height * 0.8507181); + path0.lineTo(size.width * 0.7418745, size.height * 0.8492063); + path0.lineTo(size.width * 0.7403628, size.height * 0.8492063); + path0.close(); + path0.moveTo(size.width * 0.3287982, size.height * 0.8552532); + path0.lineTo(size.width * 0.3208617, size.height * 0.8560091); + path0.cubicTo( + size.width * 0.3159486, + size.height * 0.8567649, + size.width * 0.3117914, + size.height * 0.8586546, + size.width * 0.3087680, + size.height * 0.8620559); + path0.lineTo(size.width * 0.3087680, size.height * 0.8665911); + path0.lineTo(size.width * 0.3140590, size.height * 0.8665911); + path0.cubicTo( + size.width * 0.3208617, + size.height * 0.8650794, + size.width * 0.3276644, + size.height * 0.8647014, + size.width * 0.3340892, + size.height * 0.8624339); + path0.cubicTo( + size.width * 0.3356009, + size.height * 0.8616780, + size.width * 0.3378685, + size.height * 0.8609221, + size.width * 0.3378685, + size.height * 0.8590325); + path0.cubicTo( + size.width * 0.3382464, + size.height * 0.8571429, + size.width * 0.3359788, + size.height * 0.8560091, + size.width * 0.3340892, + size.height * 0.8556311); + path0.lineTo(size.width * 0.3287982, size.height * 0.8556311); + path0.close(); + path0.moveTo(size.width * 0.3083900, size.height * 0.8665911); + path0.lineTo(size.width * 0.3083900, size.height * 0.8665911); + path0.close(); + path0.moveTo(size.width * 0.4546485, size.height * 0.8601663); + path0.cubicTo( + size.width * 0.4527589, + size.height * 0.8601663, + size.width * 0.4508692, + size.height * 0.8601663, + size.width * 0.4489796, + size.height * 0.8609221); + path0.cubicTo( + size.width * 0.4463341, + size.height * 0.8616780, + size.width * 0.4436886, + size.height * 0.8631897, + size.width * 0.4433107, + size.height * 0.8658352); + path0.lineTo(size.width * 0.4444444, size.height * 0.8684807); + path0.lineTo(size.width * 0.4493575, size.height * 0.8688587); + path0.cubicTo( + size.width * 0.4542706, + size.height * 0.8696145, + size.width * 0.4591837, + size.height * 0.8696145, + size.width * 0.4640967, + size.height * 0.8688587); + path0.cubicTo( + size.width * 0.4659864, + size.height * 0.8688587, + size.width * 0.4678760, + size.height * 0.8681028, + size.width * 0.4693878, + size.height * 0.8662132); + path0.cubicTo( + size.width * 0.4701436, + size.height * 0.8650794, + size.width * 0.4708995, + size.height * 0.8631897, + size.width * 0.4693878, + size.height * 0.8624339); + path0.cubicTo( + size.width * 0.4671202, + size.height * 0.8613001, + size.width * 0.4644747, + size.height * 0.8613001, + size.width * 0.4618292, + size.height * 0.8609221); + path0.lineTo(size.width * 0.4542706, size.height * 0.8601663); + path0.close(); + path0.moveTo(size.width * 0.2301587, size.height * 0.8654573); + path0.lineTo(size.width * 0.2290249, size.height * 0.8654573); + path0.cubicTo( + size.width * 0.2260015, + size.height * 0.8654573, + size.width * 0.2233560, + size.height * 0.8665911, + size.width * 0.2207105, + size.height * 0.8677249); + path0.cubicTo( + size.width * 0.2199546, + size.height * 0.8677249, + size.width * 0.2191988, + size.height * 0.8681028, + size.width * 0.2207105, + size.height * 0.8677249); + path0.lineTo(size.width * 0.2169312, size.height * 0.8722600); + path0.cubicTo( + size.width * 0.2184429, + size.height * 0.8749055, + size.width * 0.2214664, + size.height * 0.8760393, + size.width * 0.2241119, + size.height * 0.8760393); + path0.cubicTo( + size.width * 0.2297808, + size.height * 0.8779289, + size.width * 0.2358277, + size.height * 0.8786848, + size.width * 0.2414966, + size.height * 0.8771731); + path0.cubicTo( + size.width * 0.2437642, + size.height * 0.8767952, + size.width * 0.2460317, + size.height * 0.8764172, + size.width * 0.2467876, + size.height * 0.8745276); + path0.cubicTo( + size.width * 0.2479214, + size.height * 0.8726379, + size.width * 0.2460317, + size.height * 0.8711262, + size.width * 0.2448980, + size.height * 0.8699924); + path0.cubicTo( + size.width * 0.2411187, + size.height * 0.8662132, + size.width * 0.2354497, + size.height * 0.8654573, + size.width * 0.2297808, + size.height * 0.8654573); + path0.close(); + path0.moveTo(size.width * 0.6326531, size.height * 0.8730159); + path0.lineTo(size.width * 0.6239607, size.height * 0.8741497); + path0.cubicTo( + size.width * 0.6201814, + size.height * 0.8749055, + size.width * 0.6160242, + size.height * 0.8760393, + size.width * 0.6126228, + size.height * 0.8790627); + path0.lineTo(size.width * 0.6137566, size.height * 0.8828420); + path0.lineTo(size.width * 0.6190476, size.height * 0.8839758); + path0.lineTo(size.width * 0.6292517, size.height * 0.8843537); + path0.cubicTo( + size.width * 0.6337868, + size.height * 0.8843537, + size.width * 0.6386999, + size.height * 0.8839758, + size.width * 0.6417234, + size.height * 0.8805745); + path0.cubicTo( + size.width * 0.6428571, + size.height * 0.8798186, + size.width * 0.6439909, + size.height * 0.8783069, + size.width * 0.6436130, + size.height * 0.8767952); + path0.cubicTo( + size.width * 0.6428571, + size.height * 0.8749055, + size.width * 0.6402116, + size.height * 0.8749055, + size.width * 0.6386999, + size.height * 0.8741497); + path0.cubicTo( + size.width * 0.6368103, + size.height * 0.8733938, + size.width * 0.6349206, + size.height * 0.8733938, + size.width * 0.6326531, + size.height * 0.8733938); + path0.close(); + path0.moveTo(size.width * 0.6137566, size.height * 0.8832200); + path0.cubicTo( + size.width * 0.6137566, + size.height * 0.8832200, + size.width * 0.6137566, + size.height * 0.8832200, + size.width * 0.6137566, + size.height * 0.8832200); + path0.lineTo(size.width * 0.6137566, size.height * 0.8832200); + path0.close(); + path0.moveTo(size.width * 0.6791383, size.height * 0.8783069); + path0.lineTo(size.width * 0.6798942, size.height * 0.8794407); + path0.lineTo(size.width * 0.6791383, size.height * 0.8783069); + path0.close(); + path0.moveTo(size.width * 0.6798942, size.height * 0.8794407); + path0.cubicTo( + size.width * 0.6814059, + size.height * 0.8813303, + size.width * 0.6825397, + size.height * 0.8835979, + size.width * 0.6844293, + size.height * 0.8851096); + path0.lineTo(size.width * 0.6851852, size.height * 0.8858655); + path0.close(); + path0.moveTo(size.width * 0.6689342, size.height * 0.8801965); + path0.lineTo(size.width * 0.6746032, size.height * 0.8858655); + path0.lineTo(size.width * 0.6689342, size.height * 0.8801965); + path0.close(); + path0.moveTo(size.width * 0.3556311, size.height * 0.8801965); + path0.cubicTo( + size.width * 0.3529856, + size.height * 0.8801965, + size.width * 0.3503401, + size.height * 0.8805745, + size.width * 0.3480726, + size.height * 0.8820862); + path0.cubicTo( + size.width * 0.3473167, + size.height * 0.8828420, + size.width * 0.3461829, + size.height * 0.8835979, + size.width * 0.3458050, + size.height * 0.8847317); + path0.lineTo(size.width * 0.3427816, size.height * 0.8862434); + path0.arcToPoint(Offset(size.width * 0.3616780, size.height * 0.8938020), + radius: Radius.elliptical( + size.width * 0.03590325, size.height * 0.03590325), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.3654573, + size.height * 0.8945578, + size.width * 0.3692366, + size.height * 0.8956916, + size.width * 0.3730159, + size.height * 0.8938020); + path0.cubicTo( + size.width * 0.3745276, + size.height * 0.8926682, + size.width * 0.3775510, + size.height * 0.8915344, + size.width * 0.3771731, + size.height * 0.8892668); + path0.cubicTo( + size.width * 0.3771731, + size.height * 0.8869992, + size.width * 0.3749055, + size.height * 0.8854875, + size.width * 0.3733938, + size.height * 0.8847317); + path0.arcToPoint(Offset(size.width * 0.3556311, size.height * 0.8801965), + radius: Radius.elliptical( + size.width * 0.03476946, size.height * 0.03476946), + rotation: 0, + largeArc: false, + clockwise: false); + path0.close(); + path0.moveTo(size.width * 0.4962207, size.height * 0.8832200); + path0.lineTo(size.width * 0.4913076, size.height * 0.8835979); + path0.cubicTo( + size.width * 0.4894180, + size.height * 0.8839758, + size.width * 0.4871504, + size.height * 0.8854875, + size.width * 0.4867725, + size.height * 0.8877551); + path0.lineTo(size.width * 0.4875283, size.height * 0.8896447); + path0.lineTo(size.width * 0.4871504, size.height * 0.8900227); + path0.cubicTo( + size.width * 0.4867725, + size.height * 0.8915344, + size.width * 0.4894180, + size.height * 0.8919123, + size.width * 0.4909297, + size.height * 0.8926682); + path0.arcToPoint(Offset(size.width * 0.5045351, size.height * 0.8964475), + radius: Radius.elliptical( + size.width * 0.03401361, size.height * 0.03401361), + rotation: 0, + largeArc: false, + clockwise: false); + path0.cubicTo( + size.width * 0.5079365, + size.height * 0.8964475, + size.width * 0.5117158, + size.height * 0.8964475, + size.width * 0.5143613, + size.height * 0.8945578); + path0.cubicTo( + size.width * 0.5158730, + size.height * 0.8934240, + size.width * 0.5173847, + size.height * 0.8907785, + size.width * 0.5154951, + size.height * 0.8892668); + path0.cubicTo( + size.width * 0.5128496, + size.height * 0.8873772, + size.width * 0.5098262, + size.height * 0.8862434, + size.width * 0.5064248, + size.height * 0.8851096); + path0.cubicTo( + size.width * 0.5034014, + size.height * 0.8839758, + size.width * 0.4996221, + size.height * 0.8832200, + size.width * 0.4962207, + size.height * 0.8832200); + path0.close(); + path0.moveTo(size.width * 0.6746032, size.height * 0.8858655); + path0.lineTo(size.width * 0.6749811, size.height * 0.8866213); + path0.close(); + + final Paint paint0Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint0Stroke.color = deerTracks.withOpacity(1); + paint0Stroke.strokeCap = StrokeCap.round; + paint0Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path0, paint0Stroke); + + final Path path_1 = Path(); + path_1.moveTo(size.width * 0.3605442, size.height * 0.4489796); + path_1.cubicTo( + size.width * 0.3594104, + size.height * 0.4667423, + size.width * 0.3439153, + size.height * 0.4690098, + size.width * 0.3367347, + size.height * 0.4708995); + path_1.cubicTo( + size.width * 0.3227513, + size.height * 0.4232804, + size.width * 0.3053666, + size.height * 0.4395314, + size.width * 0.3193500, + size.height * 0.4765684); + path_1.cubicTo( + size.width * 0.3072562, + size.height * 0.4811036, + size.width * 0.2800454, + size.height * 0.4882842, + size.width * 0.2702192, + size.height * 0.4916856); + path_1.cubicTo( + size.width * 0.2653061, + size.height * 0.4848828, + size.width * 0.2426304, + size.height * 0.4622071, + size.width * 0.2195767, + size.height * 0.4656085); + path_1.cubicTo( + size.width * 0.2044596, + size.height * 0.4640967, + size.width * 0.1836735, + size.height * 0.4648526, + size.width * 0.1855631, + size.height * 0.4754346); + path_1.cubicTo( + size.width * 0.1965231, + size.height * 0.4863946, + size.width * 0.1825397, + size.height * 0.4962207, + size.width * 0.1885865, + size.height * 0.4965986); + path_1.cubicTo( + size.width * 0.1613757, + size.height * 0.5086924, + size.width * 0.1545729, + size.height * 0.4523810, + size.width * 0.1405896, + size.height * 0.4523810); + path_1.cubicTo( + size.width * 0.1315193, + size.height * 0.4572940, + size.width * 0.1462585, + size.height * 0.4973545, + size.width * 0.1311413, + size.height * 0.4807256); + path_1.cubicTo( + size.width * 0.1164021, + size.height * 0.4769463, + size.width * 0.1148904, + size.height * 0.4331066, + size.width * 0.09977324, + size.height * 0.4452003); + path_1.cubicTo( + size.width * 0.09599395, + size.height * 0.4656085, + size.width * 0.1095994, + size.height * 0.4867725, + size.width * 0.1239607, + size.height * 0.5003779); + path_1.cubicTo( + size.width * 0.1409675, + size.height * 0.5162509, + size.width * 0.1678005, + size.height * 0.5060469, + size.width * 0.1844293, + size.height * 0.5192744); + path_1.cubicTo( + size.width * 0.1825397, + size.height * 0.5347695, + size.width * 0.2014361, + size.height * 0.5495087, + size.width * 0.1908541, + size.height * 0.5650038); + path_1.cubicTo( + size.width * 0.1870748, + size.height * 0.5740741, + size.width * 0.1825397, + size.height * 0.5831444, + size.width * 0.1961451, + size.height * 0.5831444); + path_1.cubicTo( + size.width * 0.2082389, + size.height * 0.5914588, + size.width * 0.2278912, + size.height * 0.5922147, + size.width * 0.2377173, + size.height * 0.5967498); + path_1.cubicTo( + size.width * 0.2460317, + size.height * 0.6107332, + size.width * 0.2728647, + size.height * 0.6148904, + size.width * 0.2626606, + size.height * 0.6360544); + path_1.lineTo(size.width * 0.2539683, size.height * 0.7324263); + path_1.cubicTo( + size.width * 0.2743764, + size.height * 0.7384732, + size.width * 0.2811791, + size.height * 0.7150416, + size.width * 0.2834467, + size.height * 0.6999244); + path_1.cubicTo( + size.width * 0.2860922, + size.height * 0.6900983, + size.width * 0.2879819, + size.height * 0.6651550, + size.width * 0.2966742, + size.height * 0.6662887); + path_1.cubicTo( + size.width * 0.3053666, + size.height * 0.6787604, + size.width * 0.3042328, + size.height * 0.7154195, + size.width * 0.3257748, + size.height * 0.7067271); + path_1.cubicTo( + size.width * 0.3446712, + size.height * 0.6972789, + size.width * 0.3253968, + size.height * 0.6757370, + size.width * 0.3257748, + size.height * 0.6602419); + path_1.lineTo(size.width * 0.3125472, size.height * 0.6024187); + path_1.lineTo(size.width * 0.4070295, size.height * 0.6024187); + path_1.cubicTo( + size.width * 0.4085412, + size.height * 0.6364324, + size.width * 0.4089191, + size.height * 0.6734694, + size.width * 0.4104308, + size.height * 0.7071051); + path_1.cubicTo( + size.width * 0.4323507, + size.height * 0.7142857, + size.width * 0.4436886, + size.height * 0.6874528, + size.width * 0.4410431, + size.height * 0.6693122); + path_1.lineTo(size.width * 0.4470899, size.height * 0.6277400); + path_1.cubicTo( + size.width * 0.4569161, + size.height * 0.6466364, + size.width * 0.4557823, + size.height * 0.6712018, + size.width * 0.4720333, + size.height * 0.6863190); + path_1.cubicTo( + size.width * 0.4939531, + size.height * 0.6832955, + size.width * 0.4890401, + size.height * 0.6693122, + size.width * 0.4833711, + size.height * 0.6428571); + path_1.cubicTo( + size.width * 0.4803477, + size.height * 0.6050642, + size.width * 0.4708995, + size.height * 0.5684051, + size.width * 0.4618292, + size.height * 0.5321240); + path_1.cubicTo( + size.width * 0.4792139, + size.height * 0.5192744, + size.width * 0.4811036, + size.height * 0.4943311, + size.width * 0.4693878, + size.height * 0.4773243); + path_1.cubicTo( + size.width * 0.4576720, + size.height * 0.4546485, + size.width * 0.4455782, + size.height * 0.4848828, + size.width * 0.4467120, + size.height * 0.4977324); + path_1.cubicTo( + size.width * 0.4489796, + size.height * 0.5211640, + size.width * 0.4202570, + size.height * 0.5000000, + size.width * 0.4070295, + size.height * 0.5011338); + path_1.cubicTo( + size.width * 0.3941799, + size.height * 0.4973545, + size.width * 0.3556311, + size.height * 0.4890401, + size.width * 0.3537415, + size.height * 0.4848828); + path_1.cubicTo( + size.width * 0.3813303, + size.height * 0.4716553, + size.width * 0.3854875, + size.height * 0.4648526, + size.width * 0.3771731, + size.height * 0.4402872); + path_1.cubicTo( + size.width * 0.3654573, + size.height * 0.3873772, + size.width * 0.3439153, + size.height * 0.4021164, + size.width * 0.3605442, + size.height * 0.4489796); + path_1.close(); + + final Paint paint1Fill = Paint()..style = PaintingStyle.fill; + paint1Fill.color = deerSkin.withOpacity(1); + canvas.drawPath(path_1, paint1Fill); + + final Path path_2 = Path(); + path_2.moveTo(size.width * 0.3624339, size.height * 0.4818594); + path_2.lineTo(size.width * 0.3492063, size.height * 0.4882842); + path_2.cubicTo( + size.width * 0.3616780, + size.height * 0.4886621, + size.width * 0.3775510, + size.height * 0.5090703, + size.width * 0.3760393, + size.height * 0.5192744); + path_2.cubicTo( + size.width * 0.3548753, + size.height * 0.5222978, + size.width * 0.3325775, + size.height * 0.5283447, + size.width * 0.3178382, + size.height * 0.5241875); + path_2.lineTo(size.width * 0.3114135, size.height * 0.5003779); + path_2.cubicTo( + size.width * 0.3076342, + size.height * 0.5011338, + size.width * 0.2944067, + size.height * 0.4992441, + size.width * 0.2981859, + size.height * 0.5064248); + path_2.lineTo(size.width * 0.3057445, size.height * 0.5253212); + path_2.arcToPoint(Offset(size.width * 0.2970522, size.height * 0.5423280), + radius: Radius.elliptical( + size.width * 0.01360544, size.height * 0.01360544), + rotation: 0, + largeArc: false, + clockwise: false); + path_2.cubicTo( + size.width * 0.3004535, + size.height * 0.5748299, + size.width * 0.2898715, + size.height * 0.6345427, + size.width * 0.3393802, + size.height * 0.6194255); + path_2.lineTo(size.width * 0.4168556, size.height * 0.6054422); + path_2.lineTo(size.width * 0.4259259, size.height * 0.5952381); + path_2.cubicTo( + size.width * 0.4229025, + size.height * 0.5718065, + size.width * 0.4236584, + size.height * 0.5623583, + size.width * 0.4202570, + size.height * 0.5385488); + path_2.cubicTo( + size.width * 0.4179894, + size.height * 0.5306122, + size.width * 0.4115646, + size.height * 0.5166289, + size.width * 0.4036281, + size.height * 0.5185185); + path_2.cubicTo( + size.width * 0.3998488, + size.height * 0.5177627, + size.width * 0.3956916, + size.height * 0.5177627, + size.width * 0.3915344, + size.height * 0.5177627); + path_2.cubicTo( + size.width * 0.3885110, + size.height * 0.5068027, + size.width * 0.3862434, + size.height * 0.4920635, + size.width * 0.3794407, + size.height * 0.4882842); + path_2.cubicTo( + size.width * 0.3771731, + size.height * 0.4867725, + size.width * 0.3643235, + size.height * 0.4837491, + size.width * 0.3624339, + size.height * 0.4818594); + path_2.close(); + + final Paint paint2Fill = Paint()..style = PaintingStyle.fill; + paint2Fill.color = mailBag.withOpacity(1); + canvas.drawPath(path_2, paint2Fill); + + final Path path3 = Path(); + path3.moveTo(size.width * 0.2872260, size.height * 0.8212396); + path3.cubicTo( + size.width * 0.2917611, + size.height * 0.8193500, + size.width * 0.2966742, + size.height * 0.8189720, + size.width * 0.3015873, + size.height * 0.8201058); + path3.lineTo(size.width * 0.3091459, size.height * 0.8219955); + path3.moveTo(size.width * 0.3212396, size.height * 0.8072562); + path3.arcToPoint(Offset(size.width * 0.3696145, size.height * 0.8174603), + radius: Radius.elliptical( + size.width * 0.09070295, size.height * 0.09070295), + rotation: 0, + largeArc: false, + clockwise: true); + path3.moveTo(size.width * 0.3624339, size.height * 0.8034769); + path3.cubicTo( + size.width * 0.3673469, + size.height * 0.8049887, + size.width * 0.3722600, + size.height * 0.8065004, + size.width * 0.3764172, + size.height * 0.8099017); + path3.lineTo(size.width * 0.3813303, size.height * 0.8136810); + + final Paint paint3Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint3Stroke.color = deerTracks.withOpacity(1); + paint3Stroke.strokeCap = StrokeCap.round; + paint3Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path3, paint3Stroke); + + final Path path4 = Path(); + path4.moveTo(size.width * 0.2437642, size.height * 0.6077098); + path4.arcToPoint(Offset(size.width * 0.2634165, size.height * 0.6167800), + radius: Radius.elliptical( + size.width * 0.02947846, size.height * 0.02947846), + rotation: 0, + largeArc: false, + clockwise: false); + + final Paint paint4Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint4Stroke.color = contourColor.withOpacity(1); + paint4Stroke.strokeCap = StrokeCap.round; + paint4Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path4, paint4Stroke); + + final Path path5 = Path(); + path5.moveTo(size.width * 0.2653061, size.height * 0.6046863); + path5.cubicTo( + size.width * 0.2603930, + size.height * 0.6455026, + size.width * 0.2551020, + size.height * 0.6878307, + size.width * 0.2524565, + size.height * 0.7282691); + path5.moveTo(size.width * 0.2464097, size.height * 0.7312925); + path5.cubicTo( + size.width * 0.2569917, + size.height * 0.7369615, + size.width * 0.2671958, + size.height * 0.7339380, + size.width * 0.2773998, + size.height * 0.7305367); + path5.moveTo(size.width * 0.3053666, size.height * 0.6043084); + path5.cubicTo( + size.width * 0.2978080, + size.height * 0.6356765, + size.width * 0.2928949, + size.height * 0.6972789, + size.width * 0.2751323, + size.height * 0.7244898); + path5.moveTo(size.width * 0.2974301, size.height * 0.6621315); + path5.cubicTo( + size.width * 0.3004535, + size.height * 0.6734694, + size.width * 0.3034769, + size.height * 0.6851852, + size.width * 0.3087680, + size.height * 0.6961451); + path5.moveTo(size.width * 0.3117914, size.height * 0.7040816); + path5.lineTo(size.width * 0.3136810, size.height * 0.7040816); + path5.moveTo(size.width * 0.3121693, size.height * 0.7112623); + path5.cubicTo( + size.width * 0.3182162, + size.height * 0.7120181, + size.width * 0.3219955, + size.height * 0.7093726, + size.width * 0.3280423, + size.height * 0.7082389); + path5.moveTo(size.width * 0.3185941, size.height * 0.6224490); + path5.cubicTo( + size.width * 0.3201058, + size.height * 0.6269841, + size.width * 0.3204837, + size.height * 0.6318972, + size.width * 0.3216175, + size.height * 0.6364324); + path5.cubicTo( + size.width * 0.3253968, + size.height * 0.6523054, + size.width * 0.3284203, + size.height * 0.6678005, + size.width * 0.3306878, + size.height * 0.6836735); + path5.lineTo(size.width * 0.3321995, size.height * 0.7014361); + + final Paint paint5Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint5Stroke.color = contourColor.withOpacity(1); + paint5Stroke.strokeCap = StrokeCap.round; + paint5Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path5, paint5Stroke); + + final Path path6 = Path(); + path6.moveTo(size.width * 0.2362056, size.height * 0.5933485); + path6.cubicTo( + size.width * 0.2467876, + size.height * 0.6050642, + size.width * 0.2675737, + size.height * 0.6073318, + size.width * 0.2815571, + size.height * 0.6009070); + path6.moveTo(size.width * 0.2165533, size.height * 0.5899471); + path6.cubicTo( + size.width * 0.2392290, + size.height * 0.5967498, + size.width * 0.2543462, + size.height * 0.5793651, + size.width * 0.2641723, + size.height * 0.5612245); + path6.moveTo(size.width * 0.2033258, size.height * 0.5835223); + path6.cubicTo( + size.width * 0.2071051, + size.height * 0.5884354, + size.width * 0.2120181, + size.height * 0.5891912, + size.width * 0.2169312, + size.height * 0.5861678); + path6.moveTo(size.width * 0.1965231, size.height * 0.5529101); + path6.cubicTo( + size.width * 0.1965231, + size.height * 0.5551776, + size.width * 0.1840514, + size.height * 0.5680272, + size.width * 0.1870748, + size.height * 0.5774754); + path6.moveTo(size.width * 0.1987906, size.height * 0.5234316); + path6.cubicTo( + size.width * 0.1987906, + size.height * 0.5287226, + size.width * 0.2037037, + size.height * 0.5415722, + size.width * 0.2089947, + size.height * 0.5479970); + path6.moveTo(size.width * 0.2256236, size.height * 0.5245654); + path6.arcToPoint(Offset(size.width * 0.2354497, size.height * 0.5483749), + radius: Radius.elliptical( + size.width * 0.05668934, size.height * 0.05668934), + rotation: 0, + largeArc: false, + clockwise: false); + path6.moveTo(size.width * 0.1904762, size.height * 0.4947090); + path6.cubicTo( + size.width * 0.1764928, + size.height * 0.5136054, + size.width * 0.1836735, + size.height * 0.5393046, + size.width * 0.1965231, + size.height * 0.5521542); + + final Paint paint6Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint6Stroke.color = contourColor.withOpacity(1); + paint6Stroke.strokeCap = StrokeCap.round; + paint6Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path6, paint6Stroke); + + final Path path7 = Path(); + path7.moveTo(size.width * 0.09826153, size.height * 0.4595616); + path7.cubicTo( + size.width * 0.1046863, + size.height * 0.4935752, + size.width * 0.1337868, + size.height * 0.5117158, + size.width * 0.1825397, + size.height * 0.5124717); + + final Paint paint7Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint7Stroke.color = contourColor.withOpacity(1); + paint7Stroke.strokeCap = StrokeCap.round; + paint7Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path7, paint7Stroke); + + final Path path8 = Path(); + path8.moveTo(size.width * 0.09788360, size.height * 0.4546485); + path8.cubicTo( + size.width * 0.09297052, + size.height * 0.4421769, + size.width * 0.1092215, + size.height * 0.4334845, + size.width * 0.1152683, + size.height * 0.4527589); + path8.cubicTo( + size.width * 0.1182918, + size.height * 0.4625850, + size.width * 0.1228269, + size.height * 0.4724112, + size.width * 0.1269841, + size.height * 0.4788360); + path8.moveTo(size.width * 0.1292517, size.height * 0.4811036); + path8.cubicTo( + size.width * 0.1341648, + size.height * 0.4845049, + size.width * 0.1398337, + size.height * 0.4863946, + size.width * 0.1447468, + size.height * 0.4886621); + path8.moveTo(size.width * 0.1462585, size.height * 0.4894180); + path8.cubicTo( + size.width * 0.1424792, + size.height * 0.4818594, + size.width * 0.1371882, + size.height * 0.4701436, + size.width * 0.1352986, + size.height * 0.4622071); + path8.cubicTo( + size.width * 0.1334089, + size.height * 0.4531368, + size.width * 0.1451247, + size.height * 0.4459562, + size.width * 0.1504157, + size.height * 0.4584278); + path8.moveTo(size.width * 0.1670446, size.height * 0.4935752); + path8.cubicTo( + size.width * 0.1632653, + size.height * 0.4826153, + size.width * 0.1557067, + size.height * 0.4678760, + size.width * 0.1507937, + size.height * 0.4580499); + + final Paint paint8Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint8Stroke.color = contourColor.withOpacity(1); + paint8Stroke.strokeCap = StrokeCap.round; + paint8Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path8, paint8Stroke); + + final Path path9 = Path(); + path9.moveTo(size.width * 0.1957672, size.height * 0.4950869); + path9.cubicTo( + size.width * 0.1719577, + size.height * 0.4977324, + size.width * 0.1938776, + size.height * 0.4818594, + size.width * 0.2071051, + size.height * 0.4829932); + path9.cubicTo( + size.width * 0.2021920, + size.height * 0.4818594, + size.width * 0.1882086, + size.height * 0.4829932, + size.width * 0.1851852, + size.height * 0.4773243); + path9.cubicTo( + size.width * 0.1814059, + size.height * 0.4697657, + size.width * 0.2116402, + size.height * 0.4671202, + size.width * 0.2161754, + size.height * 0.4663643); + path9.cubicTo( + size.width * 0.2422525, + size.height * 0.4629630, + size.width * 0.2630385, + size.height * 0.4754346, + size.width * 0.2690854, + size.height * 0.4905518); + + final Paint paint9Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint9Stroke.color = contourColor.withOpacity(1); + paint9Stroke.strokeCap = StrokeCap.round; + paint9Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path9, paint9Stroke); + + final Path path10 = Path(); + path10.moveTo(size.width * 0.2694633, size.height * 0.4935752); + path10.cubicTo( + size.width * 0.2872260, + size.height * 0.4897959, + size.width * 0.2989418, + size.height * 0.4860166, + size.width * 0.3163265, + size.height * 0.4799698); + path10.moveTo(size.width * 0.2751323, size.height * 0.5105820); + path10.cubicTo( + size.width * 0.2970522, + size.height * 0.5041572, + size.width * 0.3817082, + size.height * 0.4863946, + size.width * 0.3809524, + size.height * 0.4538927); + path10.moveTo(size.width * 0.3790627, size.height * 0.4459562); + path10.cubicTo( + size.width * 0.3809524, + size.height * 0.4444444, + size.width * 0.3805745, + size.height * 0.4452003, + size.width * 0.3820862, + size.height * 0.4433107); + path10.moveTo(size.width * 0.3193500, size.height * 0.4773243); + path10.cubicTo( + size.width * 0.3163265, + size.height * 0.4705215, + size.width * 0.3163265, + size.height * 0.4629630, + size.width * 0.3129252, + size.height * 0.4561602); + path10.moveTo(size.width * 0.3401361, size.height * 0.4705215); + path10.cubicTo( + size.width * 0.3469388, + size.height * 0.4671202, + size.width * 0.3590325, + size.height * 0.4606954, + size.width * 0.3578987, + size.height * 0.4489796); + path10.moveTo(size.width * 0.3371126, size.height * 0.4693878); + path10.cubicTo( + size.width * 0.3333333, + size.height * 0.4603175, + size.width * 0.3276644, + size.height * 0.4327286, + size.width * 0.3163265, + size.height * 0.4399093); + path10.cubicTo( + size.width * 0.3106576, + size.height * 0.4433107, + size.width * 0.3110355, + size.height * 0.4478458, + size.width * 0.3117914, + size.height * 0.4531368); + path10.moveTo(size.width * 0.4100529, size.height * 0.7093726); + path10.cubicTo( + size.width * 0.4149660, + size.height * 0.7105064, + size.width * 0.4229025, + size.height * 0.7093726, + size.width * 0.4244142, + size.height * 0.7082389); + path10.moveTo(size.width * 0.4327286, size.height * 0.7048375); + path10.lineTo(size.width * 0.4289494, size.height * 0.7010582); + path10.moveTo(size.width * 0.4108088, size.height * 0.7010582); + path10.cubicTo( + size.width * 0.4092971, + size.height * 0.6708239, + size.width * 0.4115646, + size.height * 0.6405896, + size.width * 0.4108088, + size.height * 0.6103553); + path10.moveTo(size.width * 0.4357521, size.height * 0.6965231); + path10.cubicTo( + size.width * 0.4410431, + size.height * 0.6560847, + size.width * 0.4508692, + size.height * 0.6141345, + size.width * 0.4527589, + size.height * 0.5729403); + path10.moveTo(size.width * 0.4508692, size.height * 0.5672714); + path10.cubicTo( + size.width * 0.4546485, + size.height * 0.5702948, + size.width * 0.4523810, + size.height * 0.5680272, + size.width * 0.4569161, + size.height * 0.5748299); + path10.moveTo(size.width * 0.4656085, size.height * 0.6855631); + path10.lineTo(size.width * 0.4693878, size.height * 0.6817838); + + final Paint paint10Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint10Stroke.color = contourColor.withOpacity(1); + paint10Stroke.strokeCap = StrokeCap.round; + paint10Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path10, paint10Stroke); + + final Path path11 = Path(); + path11.moveTo(size.width * 0.4648526, size.height * 0.6753590); + path11.cubicTo( + size.width * 0.4603175, + size.height * 0.6579743, + size.width * 0.4520030, + size.height * 0.6417234, + size.width * 0.4452003, + size.height * 0.6254724); + path11.moveTo(size.width * 0.4739229, size.height * 0.6878307); + path11.arcToPoint(Offset(size.width * 0.4863946, size.height * 0.6832955), + radius: Radius.elliptical( + size.width * 0.04913076, size.height * 0.04913076), + rotation: 0, + largeArc: false, + clockwise: false); + path11.moveTo(size.width * 0.4882842, size.height * 0.6746032); + path11.arcToPoint(Offset(size.width * 0.4606954, size.height * 0.5362812), + radius: + Radius.elliptical(size.width * 0.8752834, size.height * 0.8752834), + rotation: 0, + largeArc: false, + clockwise: false); + path11.moveTo(size.width * 0.4622071, size.height * 0.5328798); + path11.cubicTo( + size.width * 0.4863946, + size.height * 0.5166289, + size.width * 0.4735450, + size.height * 0.4822373, + size.width * 0.4546485, + size.height * 0.4686319); + + final Paint paint11Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint11Stroke.color = contourColor.withOpacity(1); + paint11Stroke.strokeCap = StrokeCap.round; + paint11Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path11, paint11Stroke); + + final Path path12 = Path(); + path12.moveTo(size.width * 0.4512472, size.height * 0.4761905); + path12.cubicTo( + size.width * 0.4531368, + size.height * 0.4803477, + size.width * 0.4572940, + size.height * 0.4863946, + size.width * 0.4588057, + size.height * 0.4894180); + path12.moveTo(size.width * 0.4501134, size.height * 0.4829932); + path12.cubicTo( + size.width * 0.4425548, + size.height * 0.4913076, + size.width * 0.4399093, + size.height * 0.5113379, + size.width * 0.4512472, + size.height * 0.5173847); + path12.moveTo(size.width * 0.3900227, size.height * 0.5000000); + path12.cubicTo( + size.width * 0.4070295, + size.height * 0.5011338, + size.width * 0.4270597, + size.height * 0.5022676, + size.width * 0.4433107, + size.height * 0.5083144); + + final Paint paint12Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint12Stroke.color = contourColor.withOpacity(1); + paint12Stroke.strokeCap = StrokeCap.round; + paint12Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path12, paint12Stroke); + + final Path path13 = Path(); + path13.moveTo(size.width * 0.3065004, size.height * 0.6084656); + path13.cubicTo( + size.width * 0.3072562, + size.height * 0.6133787, + size.width * 0.3091459, + size.height * 0.6179138, + size.width * 0.3140590, + size.height * 0.6194255); + path13.cubicTo( + size.width * 0.3201058, + size.height * 0.6224490, + size.width * 0.3941799, + size.height * 0.6130008, + size.width * 0.4160998, + size.height * 0.6069539); + path13.moveTo(size.width * 0.4225246, size.height * 0.5990174); + path13.cubicTo( + size.width * 0.4213908, + size.height * 0.5975057, + size.width * 0.4202570, + size.height * 0.5959940, + size.width * 0.4187453, + size.height * 0.5952381); + path13.moveTo(size.width * 0.4270597, size.height * 0.5910809); + path13.cubicTo( + size.width * 0.4270597, + size.height * 0.5850340, + size.width * 0.4198791, + size.height * 0.5393046, + size.width * 0.4195011, + size.height * 0.5328798); + path13.cubicTo( + size.width * 0.4183673, + size.height * 0.5234316, + size.width * 0.4157218, + size.height * 0.5158730, + size.width * 0.4032502, + size.height * 0.5177627); + path13.moveTo(size.width * 0.3926682, size.height * 0.5721844); + path13.cubicTo( + size.width * 0.3990930, + size.height * 0.5767196, + size.width * 0.4092971, + size.height * 0.5831444, + size.width * 0.4138322, + size.height * 0.5884354); + + final Paint paint13Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint13Stroke.color = contourColor.withOpacity(1); + paint13Stroke.strokeCap = StrokeCap.round; + paint13Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path13, paint13Stroke); + + final Path path14 = Path(); + path14.moveTo(size.width * 0.4104308, size.height * 0.5226757); + path14.cubicTo( + size.width * 0.3998488, + size.height * 0.5377929, + size.width * 0.3847317, + size.height * 0.5740741, + size.width * 0.3707483, + size.height * 0.5755858); + path14.cubicTo( + size.width * 0.3556311, + size.height * 0.5767196, + size.width * 0.3163265, + size.height * 0.5468632, + size.width * 0.3038549, + size.height * 0.5389267); + path14.moveTo(size.width * 0.3182162, size.height * 0.6111111); + path14.cubicTo( + size.width * 0.3235072, + size.height * 0.6027967, + size.width * 0.3306878, + size.height * 0.5963719, + size.width * 0.3356009, + size.height * 0.5876795); + path14.moveTo(size.width * 0.3408919, size.height * 0.5801209); + path14.cubicTo( + size.width * 0.3431595, + size.height * 0.5767196, + size.width * 0.3454271, + size.height * 0.5729403, + size.width * 0.3469388, + size.height * 0.5687831); + + final Paint paint14Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint14Stroke.color = contourColor.withOpacity(1); + paint14Stroke.strokeCap = StrokeCap.round; + paint14Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path14, paint14Stroke); + + final Path path15 = Path(); + path15.moveTo(size.width * 0.3046107, size.height * 0.6009070); + path15.cubicTo( + size.width * 0.3034769, + size.height * 0.5903250, + size.width * 0.2955404, + size.height * 0.5529101, + size.width * 0.2955404, + size.height * 0.5427060); + path15.cubicTo( + size.width * 0.2955404, + size.height * 0.5328798, + size.width * 0.2978080, + size.height * 0.5275888, + size.width * 0.3219955, + size.height * 0.5264550); + path15.moveTo(size.width * 0.3303099, size.height * 0.5253212); + path15.cubicTo( + size.width * 0.3514739, + size.height * 0.5215420, + size.width * 0.3733938, + size.height * 0.5196523, + size.width * 0.3934240, + size.height * 0.5188964); + path15.moveTo(size.width * 0.3518519, size.height * 0.4935752); + path15.cubicTo( + size.width * 0.3662132, + size.height * 0.4860166, + size.width * 0.3749055, + size.height * 0.5079365, + size.width * 0.3756614, + size.height * 0.5166289); + path15.moveTo(size.width * 0.3631897, size.height * 0.4818594); + path15.cubicTo( + size.width * 0.3813303, + size.height * 0.4829932, + size.width * 0.3907785, + size.height * 0.5034014, + size.width * 0.3896447, + size.height * 0.5170068); + + final Paint paint15Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint15Stroke.color = contourColor.withOpacity(1); + paint15Stroke.strokeCap = StrokeCap.round; + paint15Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path15, paint15Stroke); + + final Path path16 = Path(); + path16.moveTo(size.width * 0.3049887, size.height * 0.5291005); + path16.cubicTo( + size.width * 0.3034769, + size.height * 0.5222978, + size.width * 0.3004535, + size.height * 0.5154951, + size.width * 0.2981859, + size.height * 0.5086924); + path16.moveTo(size.width * 0.3212396, size.height * 0.5268330); + path16.cubicTo( + size.width * 0.3185941, + size.height * 0.5192744, + size.width * 0.3167045, + size.height * 0.5117158, + size.width * 0.3129252, + size.height * 0.5049131); + path16.moveTo(size.width * 0.1678005, size.height * 0.4950869); + path16.lineTo(size.width * 0.1749811, size.height * 0.4965986); + path16.moveTo(size.width * 0.2683296, size.height * 0.5226757); + path16.cubicTo( + size.width * 0.2910053, + size.height * 0.5464853, + size.width * 0.2944067, + size.height * 0.5162509, + size.width * 0.2728647, + size.height * 0.5102041); + + final Paint paint16Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint16Stroke.color = contourColor.withOpacity(1); + paint16Stroke.strokeCap = StrokeCap.round; + paint16Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path16, paint16Stroke); + + final Path path17 = Path(); + path17.moveTo(size.width * 0.1927438, size.height * 0.5820106); + path17.cubicTo( + size.width * 0.1980348, + size.height * 0.5839002, + size.width * 0.2033258, + size.height * 0.5823885, + size.width * 0.2101285, + size.height * 0.5782313); + + final Paint paint17Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint17Stroke.color = contourColor.withOpacity(1); + paint17Stroke.strokeCap = StrokeCap.round; + paint17Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path17, paint17Stroke); + + final Paint paint17Fill = Paint()..style = PaintingStyle.fill; + paint17Fill.color = contourColor.withOpacity(1); + canvas.drawPath(path17, paint17Fill); + + final Path path18 = Path(); + path18.moveTo(size.width * 0.3764172, size.height * 0.4365079); + path18.cubicTo( + size.width * 0.3730159, + size.height * 0.4270597, + size.width * 0.3718821, + size.height * 0.4040060, + size.width * 0.3571429, + size.height * 0.4085412); + path18.cubicTo( + size.width * 0.3469388, + size.height * 0.4119426, + size.width * 0.3563870, + size.height * 0.4349962, + size.width * 0.3571429, + size.height * 0.4402872); + + final Paint paint18Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint18Stroke.color = contourColor.withOpacity(1); + paint18Stroke.strokeCap = StrokeCap.round; + paint18Stroke.strokeJoin = StrokeJoin.miter; + canvas.drawPath(path18, paint18Stroke); + + final Path path19 = Path(); + path19.moveTo(size.width * 0.1530612, size.height * 0.4104308); + path19.cubicTo( + size.width * 0.1477702, + size.height * 0.4085412, + size.width * 0.1447468, + size.height * 0.4028723, + size.width * 0.1455026, + size.height * 0.3972033); + path19.cubicTo( + size.width * 0.1458806, + size.height * 0.3919123, + size.width * 0.1485261, + size.height * 0.3866213, + size.width * 0.1530612, + size.height * 0.3839758); + path19.cubicTo( + size.width * 0.1568405, + size.height * 0.3817082, + size.width * 0.1617536, + size.height * 0.3809524, + size.width * 0.1655329, + size.height * 0.3828420); + path19.cubicTo( + size.width * 0.1700680, + size.height * 0.3847317, + size.width * 0.1742252, + size.height * 0.3881330, + size.width * 0.1757370, + size.height * 0.3926682); + path19.arcToPoint(Offset(size.width * 0.1734694, size.height * 0.4096750), + radius: Radius.elliptical( + size.width * 0.01889645, size.height * 0.01889645), + rotation: 0, + largeArc: false, + clockwise: true); + path19.cubicTo( + size.width * 0.1712018, + size.height * 0.4134543, + size.width * 0.1659108, + size.height * 0.4142101, + size.width * 0.1651550, + size.height * 0.4187453); + path19.cubicTo( + size.width * 0.1643991, + size.height * 0.4232804, + size.width * 0.1689342, + size.height * 0.4270597, + size.width * 0.1708239, + size.height * 0.4308390); + path19.moveTo(size.width * 0.1757370, size.height * 0.4383976); + path19.cubicTo( + size.width * 0.1757370, + size.height * 0.4387755, + size.width * 0.1761149, + size.height * 0.4383976, + size.width * 0.1761149, + size.height * 0.4383976); + path19.lineTo(size.width * 0.1761149, size.height * 0.4387755); + + final Paint paint19Stroke = Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.007558579; + paint19Stroke.color = contourColor.withOpacity(1); + paint19Stroke.strokeCap = StrokeCap.round; + paint19Stroke.strokeJoin = StrokeJoin.round; + canvas.drawPath(path19, paint19Stroke); + } + + @override + bool shouldRepaint(covariant final StrayDeerPainter oldDelegate) => + colorPalette != oldDelegate.colorPalette; +} diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index edc283b5..8ea94803 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -90,7 +90,8 @@ class BackblazeApi extends ApiMap { ), ); if (response.statusCode == HttpStatus.ok) { - isTokenValid = response.data['allowed']['capabilities'].contains('listBuckets'); + isTokenValid = + response.data['allowed']['capabilities'].contains('listBuckets'); } else if (response.statusCode == HttpStatus.unauthorized) { isTokenValid = false; } else { diff --git a/lib/logic/cubit/app_settings/app_settings_cubit.dart b/lib/logic/cubit/app_settings/app_settings_cubit.dart index 06b46730..d013d418 100644 --- a/lib/logic/cubit/app_settings/app_settings_cubit.dart +++ b/lib/logic/cubit/app_settings/app_settings_cubit.dart @@ -1,7 +1,12 @@ +import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:equatable/equatable.dart'; import 'package:hive/hive.dart'; +import 'package:material_color_utilities/material_color_utilities.dart' + as color_utils; +import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/hive_config.dart'; +import 'package:selfprivacy/theming/factory/app_theme_factory.dart'; export 'package:provider/provider.dart'; @@ -20,7 +25,7 @@ class AppSettingsCubit extends Cubit { Box box = Hive.box(BNames.appSettingsBox); - void load() { + void load() async { final bool? isDarkModeOn = box.get(BNames.isDarkModeOn); final bool? isOnboardingShowing = box.get(BNames.isOnboardingShowing); emit( @@ -29,6 +34,14 @@ class AppSettingsCubit extends Cubit { isOnboardingShowing: isOnboardingShowing, ), ); + WidgetsFlutterBinding.ensureInitialized(); + final color_utils.CorePalette? colorPalette = + await AppThemeFactory.getCorePalette(); + emit( + state.copyWith( + corePalette: colorPalette, + ), + ); } void updateDarkMode({required final bool isDarkModeOn}) { diff --git a/lib/logic/cubit/app_settings/app_settings_state.dart b/lib/logic/cubit/app_settings/app_settings_state.dart index 92da9667..8b29f6e9 100644 --- a/lib/logic/cubit/app_settings/app_settings_state.dart +++ b/lib/logic/cubit/app_settings/app_settings_state.dart @@ -4,20 +4,27 @@ class AppSettingsState extends Equatable { const AppSettingsState({ required this.isDarkModeOn, required this.isOnboardingShowing, + this.corePalette, }); final bool isDarkModeOn; final bool isOnboardingShowing; + final color_utils.CorePalette? corePalette; AppSettingsState copyWith({ final bool? isDarkModeOn, final bool? isOnboardingShowing, + final color_utils.CorePalette? corePalette, }) => AppSettingsState( isDarkModeOn: isDarkModeOn ?? this.isDarkModeOn, isOnboardingShowing: isOnboardingShowing ?? this.isOnboardingShowing, + corePalette: corePalette ?? this.corePalette, ); + color_utils.CorePalette get corePaletteOrDefault => + corePalette ?? color_utils.CorePalette.of(BrandColors.primary.value); + @override - List get props => [isDarkModeOn, isOnboardingShowing]; + List get props => [isDarkModeOn, isOnboardingShowing, corePalette]; } diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index 57a54762..54ec257f 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -95,4 +95,15 @@ enum ServerProvider { return unknown; } } + + String get displayName { + switch (this) { + case ServerProvider.hetzner: + return 'Hetzner Cloud'; + case ServerProvider.digitalOcean: + return 'Digital Ocean'; + default: + return 'Unknown'; + } + } } diff --git a/lib/theming/factory/app_theme_factory.dart b/lib/theming/factory/app_theme_factory.dart index 2b7309d5..e3ce278a 100644 --- a/lib/theming/factory/app_theme_factory.dart +++ b/lib/theming/factory/app_theme_factory.dart @@ -29,8 +29,7 @@ abstract class AppThemeFactory { brightness: brightness, ); - final ColorScheme colorScheme = - dynamicColorsScheme ?? fallbackColorScheme; + final ColorScheme colorScheme = dynamicColorsScheme ?? fallbackColorScheme; final Typography appTypography = Typography.material2021(); diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index eae4161d..00f1388e 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; class ProgressBar extends StatefulWidget { const ProgressBar({ @@ -63,13 +62,6 @@ class _ProgressBarState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - BrandText.h2('Progress'), - const SizedBox(height: 10), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: even, - ), - const SizedBox(height: 7), Container( alignment: Alignment.centerLeft, decoration: BoxDecoration( @@ -98,11 +90,6 @@ class _ProgressBarState extends State { ), ), ), - const SizedBox(height: 5), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: odd, - ), ], ); } diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index 36478a1c..c00b4f12 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -49,11 +48,16 @@ class _OnboardingPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 30), - BrandText.h2( + Text( 'onboarding.page1_title'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), - const SizedBox(height: 20), - BrandText.body2('onboarding.page1_text'.tr()), + const SizedBox(height: 16), + Text( + 'onboarding.page1_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), Flexible( child: Center( child: Image.asset( @@ -86,34 +90,49 @@ class _OnboardingPageState extends State { maxHeight: MediaQuery.of(context).size.height, ), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 30), - BrandText.h2('onboarding.page2_title'.tr()), - const SizedBox(height: 20), - BrandText.body2('onboarding.page2_text'.tr()), - const SizedBox(height: 20), - Center( - child: Image.asset( - _fileName( - context: context, - path: 'assets/images/onboarding', - fileExtention: 'png', - fileName: 'logos_line', - ), - ), + Text( + 'onboarding.page2_title'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), - Flexible( - child: Center( - child: Image.asset( - _fileName( - context: context, - path: 'assets/images/onboarding', - fileExtention: 'png', - fileName: 'onboarding2', - ), - ), - ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_server_provider_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_server_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_dns_provider_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_dns_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_backup_provider_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_backup_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), BrandButton.rised( onPressed: () { context.read().turnOffOnboarding(); diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 1a6bb9fc..498f84a1 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -1,5 +1,3 @@ -import 'dart:ui'; - import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 1e3e7982..36ddb8e9 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -11,7 +11,6 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cu import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; @@ -56,88 +55,91 @@ class InitializingPage extends StatelessWidget { .pushReplacement(materialRoute(const RootPage())); } }, - child: SafeArea( - child: Scaffold( - body: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: paddingH15V0.copyWith(top: 10, bottom: 10), - child: cubit.state is ServerInstallationFinished - ? const SizedBox( - height: 80, - ) - : ProgressBar( - steps: const [ - 'Hosting', - 'Server Type', - 'CloudFlare', - 'Backblaze', - 'Domain', - 'User', - 'Server', - 'Installation', - ], - activeIndex: cubit.state.porgressBar, - ), + child: Scaffold( + appBar: AppBar( + actions: [ + if (cubit.state is ServerInstallationFinished) + IconButton( + icon: const Icon(Icons.check), + onPressed: () { + Navigator.of(context) + .pushReplacement(materialRoute(const RootPage())); + }, + ) + ], + bottom: PreferredSize( + preferredSize: const Size.fromHeight(28), + child: Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), + child: ProgressBar( + steps: const [ + 'Hosting', + 'Server Type', + 'CloudFlare', + 'Backblaze', + 'Domain', + 'User', + 'Server', + 'Installation', + ], + activeIndex: cubit.state.porgressBar, + ), + ), + ), + ), + body: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(16.0, 0, 16.0, 0.0), + child: AnimatedSwitcher( + duration: const Duration(milliseconds: 300), + child: actualInitializingPage, ), - if (cubit.state.porgressBar == - ServerSetupProgress.serverProviderFilled.index) - BrandText.h2( - 'initializing.choose_location_type'.tr(), - ), - _addCard( - AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: actualInitializingPage, - ), + ), + ConstrainedBox( + constraints: BoxConstraints( + minHeight: MediaQuery.of(context).size.height - + MediaQuery.of(context).padding.top - + MediaQuery.of(context).padding.bottom - + 566, ), - ConstrainedBox( - constraints: BoxConstraints( - minHeight: MediaQuery.of(context).size.height - - MediaQuery.of(context).padding.top - - MediaQuery.of(context).padding.bottom - - 566, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + alignment: Alignment.center, + child: BrandButton.text( + title: cubit.state is ServerInstallationFinished + ? 'basis.close'.tr() + : 'basis.later'.tr(), + onPressed: () { + Navigator.of(context).pushAndRemoveUntil( + materialRoute(const RootPage()), + (final predicate) => false, + ); + }, + ), + ), + if (cubit.state is ServerInstallationEmpty) Container( alignment: Alignment.center, child: BrandButton.text( - title: cubit.state is ServerInstallationFinished - ? 'basis.close'.tr() - : 'basis.later'.tr(), + title: 'basis.connect_to_existing'.tr(), onPressed: () { - Navigator.of(context).pushAndRemoveUntil( - materialRoute(const RootPage()), - (final predicate) => false, + Navigator.of(context).push( + materialRoute( + const RecoveryRouting(), + ), ); }, ), - ), - if (cubit.state is ServerInstallationFinished) - Container() - else - Container( - alignment: Alignment.center, - child: BrandButton.text( - title: 'basis.connect_to_existing'.tr(), - onPressed: () { - Navigator.of(context).push( - materialRoute( - const RecoveryRouting(), - ), - ); - }, - ), - ) - ], - ), + ) + ], ), - ], - ), + ), + ], ), ), ), @@ -189,15 +191,16 @@ class InitializingPage extends StatelessWidget { builder: (final context) => Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - 'assets/images/logos/cloudflare.png', - width: 150, + Text( + '${'initializing.connect_to_server_provider'.tr()}Cloudflare', + style: Theme.of(context).textTheme.headlineSmall, ), - const SizedBox(height: 10), - BrandText.h2('initializing.connect_cloudflare'.tr()), - const SizedBox(height: 10), - BrandText.body2('initializing.manage_domain_dns'.tr()), - const Spacer(), + const SizedBox(height: 16), + Text( + 'initializing.manage_domain_dns'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 32), CubitFormTextField( formFieldCubit: context.read().apiKey, textAlign: TextAlign.center, @@ -206,7 +209,7 @@ class InitializingPage extends StatelessWidget { hintText: 'initializing.cloudflare_api_token'.tr(), ), ), - const Spacer(), + const SizedBox(height: 32), BrandButton.rised( onPressed: () => context.read().trySubmit(), @@ -236,14 +239,11 @@ class InitializingPage extends StatelessWidget { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - 'assets/images/logos/backblaze.png', - height: 50, + Text( + '${'initializing.connect_to_server_provider'.tr()}Backblaze', + style: Theme.of(context).textTheme.headlineSmall, ), - const SizedBox(height: 10), - BrandText.h2('initializing.connect_backblaze_storage'.tr()), - const SizedBox(height: 10), - const Spacer(), + const SizedBox(height: 32), CubitFormTextField( formFieldCubit: context.read().keyId, textAlign: TextAlign.center, @@ -252,7 +252,7 @@ class InitializingPage extends StatelessWidget { hintText: 'KeyID', ), ), - const Spacer(), + const SizedBox(height: 16), CubitFormTextField( formFieldCubit: context.read().applicationKey, @@ -262,7 +262,7 @@ class InitializingPage extends StatelessWidget { hintText: 'Master Application Key', ), ), - const Spacer(), + const SizedBox(height: 32), BrandButton.rised( onPressed: formCubitState.isSubmitting ? null @@ -292,91 +292,85 @@ class InitializingPage extends StatelessWidget { builder: (final context) { final DomainSetupState state = context.watch().state; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/logos/cloudflare.png', - width: 150, - ), - const SizedBox(height: 30), - BrandText.h2('basis.domain'.tr()), - const SizedBox(height: 10), - if (state is Empty) - BrandText.body2('initializing.no_connected_domains'.tr()), - if (state is Loading) - BrandText.body2( - state.type == LoadingTypes.loadingDomain - ? 'initializing.loading_domain_list'.tr() - : 'basis.saving'.tr(), + return SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.use_this_domain'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), - if (state is MoreThenOne) - BrandText.body2( - 'initializing.found_more_domains'.tr(), + const SizedBox(height: 16), + Text( + 'initializing.use_this_domain_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, ), - if (state is Loaded) ...[ - const SizedBox(height: 10), - Row( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: BrandText.h3( + const SizedBox(height: 32), + if (state is Empty) + Text( + 'initializing.no_connected_domains'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + if (state is Loading) + Text( + state.type == LoadingTypes.loadingDomain + ? 'initializing.loading_domain_list'.tr() + : 'basis.saving'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + if (state is MoreThenOne) + Text( + 'initializing.found_more_domains'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + if (state is Loaded) ...[ + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( state.domain, + style: Theme.of(context) + .textTheme + .headlineMedium + ?.copyWith( + color: + Theme.of(context).colorScheme.onBackground, + ), textAlign: TextAlign.center, ), - ), - SizedBox( - width: 56, - child: BrandButton.rised( - onPressed: () => - context.read().load(), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: const [ - Icon( - Icons.refresh, - color: Colors.white, - ), - ], - ), - ), - ), - ], - ) - ], - if (state is Empty) ...[ - const SizedBox(height: 30), - BrandButton.rised( - onPressed: () => context.read().load(), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Icon( - Icons.refresh, - color: Colors.white, - ), - const SizedBox(width: 10), - BrandText.buttonTitleText('domain.update_list'.tr()), ], ), - ), + ], + if (state is Empty) ...[ + const SizedBox(height: 30), + BrandButton.rised( + onPressed: () => context.read().load(), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + Icons.refresh, + color: Colors.white, + ), + const SizedBox(width: 10), + BrandText.buttonTitleText('domain.update_list'.tr()), + ], + ), + ), + ], + if (state is Loaded) ...[ + const SizedBox(height: 32), + BrandButton.rised( + onPressed: () => + context.read().saveDomain(), + text: 'initializing.save_domain'.tr(), + ), + ], ], - if (state is Loaded) ...[ - const SizedBox(height: 30), - BrandButton.rised( - onPressed: () => - context.read().saveDomain(), - text: 'initializing.save_domain'.tr(), - ), - ], - const SizedBox( - height: 10, - width: double.infinity, - ), - ], + ), ); }, ), @@ -393,12 +387,16 @@ class InitializingPage extends StatelessWidget { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - BrandText.h2('initializing.create_master_account'.tr()), - const SizedBox(height: 10), - BrandText.body2( - 'initializing.enter_username_and_password'.tr(), + Text( + 'initializing.create_master_account'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), - const Spacer(), + const SizedBox(height: 16), + Text( + 'initializing.enter_username_and_password'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + if (formCubitState.isErrorShown) const SizedBox(height: 16), if (formCubitState.isErrorShown) Text( 'users.username_rule'.tr(), @@ -406,7 +404,7 @@ class InitializingPage extends StatelessWidget { color: Theme.of(context).colorScheme.error, ), ), - const SizedBox(height: 10), + const SizedBox(height: 32), CubitFormTextField( formFieldCubit: context.read().userName, textAlign: TextAlign.center, @@ -415,7 +413,7 @@ class InitializingPage extends StatelessWidget { hintText: 'basis.username'.tr(), ), ), - const SizedBox(height: 10), + const SizedBox(height: 16), BlocBuilder, FieldCubitState>( bloc: context.read().isVisible, builder: (final context, final state) { @@ -446,7 +444,7 @@ class InitializingPage extends StatelessWidget { ); }, ), - const Spacer(), + const SizedBox(height: 32), BrandButton.rised( onPressed: formCubitState.isSubmitting ? null @@ -466,11 +464,16 @@ class InitializingPage extends StatelessWidget { builder: (final context) => Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Spacer(flex: 2), - BrandText.h2('initializing.final'.tr()), - const SizedBox(height: 10), - BrandText.body2('initializing.create_server'.tr()), - const Spacer(), + Text( + 'initializing.final'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.create_server'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 128), BrandButton.rised( onPressed: isLoading ? null : appConfigCubit.createServerAndSetDnsRecords, @@ -505,55 +508,64 @@ class InitializingPage extends StatelessWidget { doneCount = 0; } return Builder( - builder: (final context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox(height: 15), - BrandText.h4( - 'initializing.checks'.tr(args: [doneCount.toString(), '4']), - ), - const Spacer(flex: 2), - const SizedBox(height: 10), - BrandText.body2(text), - const SizedBox(height: 10), - if (doneCount == 0 && state.dnsMatches != null) - Column( - children: state.dnsMatches!.entries.map((final entry) { - final String domain = entry.key; - final bool isCorrect = entry.value; - return Row( - children: [ - if (isCorrect) const Icon(Icons.check, color: Colors.green), - if (!isCorrect) - const Icon(Icons.schedule, color: Colors.amber), - const SizedBox(width: 10), - Text(domain), - ], - ); - }).toList(), + builder: (final context) => SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.checks'.tr(args: [doneCount.toString(), '4']), + style: Theme.of(context).textTheme.headlineSmall, ), - const SizedBox(height: 10), - if (!state.isLoading) - Row( - children: [ - BrandText.body2('initializing.until_the_next_check'.tr()), - BrandTimer( - startDateTime: state.timerStart!, - duration: state.duration!, - ) - ], - ), - if (state.isLoading) BrandText.body2('initializing.check'.tr()), - ], + const SizedBox(height: 16), + if (text != null) + Text( + text, + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 128), + const SizedBox(height: 10), + if (doneCount == 0 && state.dnsMatches != null) + Column( + children: state.dnsMatches!.entries.map((final entry) { + final String domain = entry.key; + final bool isCorrect = entry.value; + return Row( + children: [ + if (isCorrect) + const Icon(Icons.check, color: Colors.green), + if (!isCorrect) + const Icon(Icons.schedule, color: Colors.amber), + const SizedBox(width: 10), + Text(domain), + ], + ); + }).toList(), + ), + const SizedBox(height: 10), + if (!state.isLoading) + Row( + children: [ + Text( + 'initializing.until_the_next_check'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + BrandTimer( + startDateTime: state.timerStart!, + duration: state.duration!, + ) + ], + ), + if (state.isLoading) + Text( + 'initializing.check'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), ), ); } - - Widget _addCard(final Widget child) => Container( - height: 450, - padding: paddingH15V0, - child: BrandCards.big(child: child), - ); } class _HowTo extends StatelessWidget { diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 4934d1e3..bf99863b 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -1,13 +1,18 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; +import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:url_launcher/url_launcher.dart'; class ServerProviderPicker extends StatefulWidget { const ServerProviderPicker({ @@ -96,13 +101,16 @@ class ProviderInputDataPage extends StatelessWidget { Widget build(final BuildContext context) => Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - providerInfo.image, - const SizedBox(height: 10), Text( - 'initializing.connect_to_server'.tr(), - style: Theme.of(context).textTheme.titleLarge, + "${'initializing.connect_to_server_provider'.tr()}${providerInfo.providerType.displayName}", + style: Theme.of(context).textTheme.headlineSmall, ), - const Spacer(), + const SizedBox(height: 16), + Text( + 'initializing.connect_to_server_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 32), CubitFormTextField( formFieldCubit: providerCubit.apiKey, textAlign: TextAlign.center, @@ -111,13 +119,13 @@ class ProviderInputDataPage extends StatelessWidget { hintText: 'Provider API Token', ), ), - const Spacer(), + const SizedBox(height: 32), FilledButton( title: 'basis.connect'.tr(), onPressed: () => providerCubit.trySubmit(), ), const SizedBox(height: 10), - OutlinedButton( + BrandOutlinedButton( child: Text('initializing.how'.tr()), onPressed: () => showModalBottomSheet( context: context, @@ -154,51 +162,189 @@ class ProviderSelectionPage extends StatelessWidget { final ServerInstallationCubit serverInstallationCubit; @override - Widget build(final BuildContext context) => Column( - children: [ - Text( - 'initializing.select_provider'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - const SizedBox(height: 10), - Text( - 'initializing.place_where_data'.tr(), - ), - const SizedBox(height: 10), - ConstrainedBox( - constraints: const BoxConstraints( - maxWidth: 320, + Widget build(final BuildContext context) => SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.connect_to_server'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), - child: Row( - children: [ - InkWell( - onTap: () { - serverInstallationCubit - .setServerProviderType(ServerProvider.hetzner); - callback(ServerProvider.hetzner); - }, - child: Image.asset( - 'assets/images/logos/hetzner.png', - width: 150, - ), - ), - const SizedBox( - width: 20, - ), - InkWell( - onTap: () { - serverInstallationCubit - .setServerProviderType(ServerProvider.digitalOcean); - callback(ServerProvider.digitalOcean); - }, - child: Image.asset( - 'assets/images/logos/digital_ocean.png', - width: 150, - ), - ), - ], + const SizedBox(height: 10), + Text( + 'initializing.select_provider'.tr(), + style: Theme.of(context).textTheme.bodyMedium, ), - ), - ], + const SizedBox(height: 10), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color(0xFFD50C2D), + ), + child: SvgPicture.asset( + 'assets/images/logos/hetzner.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Hetzner Cloud', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_countries_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_countries_text_hetzner' + .tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_text_hetzner'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_hetzner'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_email_notice'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + FilledButton( + title: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setServerProviderType(ServerProvider.hetzner); + callback(ServerProvider.hetzner); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + _launchURL('https://www.hetzner.com/cloud'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color(0xFF0080FF), + ), + child: SvgPicture.asset( + 'assets/images/logos/digital_ocean.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Digital Ocean', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_countries_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_countries_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + FilledButton( + title: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setServerProviderType(ServerProvider.digitalOcean); + callback(ServerProvider.digitalOcean); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + _launchURL('https://www.digitalocean.com'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), + const SizedBox(height: 16), + InfoBox(text: 'initializing.select_provider_notice'.tr()), + ], + ), ); } + +void _launchURL(final url) async { + try { + final Uri uri = Uri.parse(url); + await launchUrl( + uri, + mode: LaunchMode.externalApplication, + ); + } catch (e) { + print(e); + } +} diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 04b3bd5f..b702398b 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -1,10 +1,12 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/illustrations/stray_deer.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; class ServerTypePicker extends StatefulWidget { const ServerTypePicker({ @@ -68,27 +70,43 @@ class SelectLocationPage extends StatelessWidget { if ((snapshot.data as List).isEmpty) { return Text('initializing.no_locations_found'.tr()); } - return ListView( - padding: paddingH15V0, + return Column( children: [ + Text( + 'initializing.choose_location_type'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.choose_location_type_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), ...(snapshot.data! as List).map( - (final location) => InkWell( - onTap: () { - callback(location); - }, - child: Card( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (location.flag != null) Text(location.flag!), - const SizedBox(height: 8), - Text(location.title), - const SizedBox(height: 8), - if (location.description != null) - Text(location.description!), - ], + (final location) => SizedBox( + width: double.infinity, + child: InkWell( + onTap: () { + callback(location); + }, + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '${location.flag ?? ''} ${location.title}', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + if (location.description != null) + Text( + location.description!, + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), ), ), ), @@ -126,11 +144,33 @@ class SelectTypePage extends StatelessWidget { if (snapshot.hasData) { if ((snapshot.data as List).isEmpty) { return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'initializing.no_server_types_found'.tr(), + 'initializing.locations_not_found'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), - const SizedBox(height: 10), + const SizedBox(height: 16), + Text( + 'initializing.locations_not_found_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + LayoutBuilder( + builder: (final context, final constraints) => CustomPaint( + size: Size( + constraints.maxWidth, + (constraints.maxWidth * 1).toDouble(), + ), + painter: StrayDeerPainter( + colorScheme: Theme.of(context).colorScheme, + colorPalette: context + .read() + .state + .corePaletteOrDefault, + ), + ), + ), + const SizedBox(height: 16), BrandButton.rised( onPressed: () { backToLocationPickingCallback(); @@ -140,51 +180,118 @@ class SelectTypePage extends StatelessWidget { ], ); } - return ListView( - padding: paddingH15V0, + return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + 'initializing.choose_server_type'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.choose_server_type_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), ...(snapshot.data! as List).map( - (final type) => InkWell( - onTap: () { - serverInstallationCubit.setServerType(type); - }, - child: Card( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - type.title, - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 8), - Text( - 'cores: ${type.cores.toString()}', - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 8), - Text( - 'ram: ${type.ram.toString()}', - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 8), - Text( - 'disk: ${type.disk.gibibyte.toString()}', - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 8), - Text( - 'price: ${type.price.value.toString()} ${type.price.currency}', - style: Theme.of(context).textTheme.bodySmall, - ), - ], + (final type) => SizedBox( + width: double.infinity, + child: InkWell( + onTap: () { + serverInstallationCubit.setServerType(type); + }, + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + type.title, + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.memory_outlined, + color: + Theme.of(context).colorScheme.onSurface, + ), + const SizedBox(width: 8), + Text( + 'server.core_count'.plural(type.cores), + style: + Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.memory_outlined, + color: + Theme.of(context).colorScheme.onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_ram' + .tr(args: [type.ram.toString()]), + style: + Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.sd_card_outlined, + color: + Theme.of(context).colorScheme.onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_storage' + .tr(args: [ + type.disk.gibibyte.toString() + ]), + style: + Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + const Divider(height: 8), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.payments_outlined, + color: + Theme.of(context).colorScheme.onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_payment_per_month' + .tr(args: [ + '${type.price.value.toString()} ${type.price.currency}' + ]), + style: + Theme.of(context).textTheme.bodyLarge, + ), + ], + ), + ], + ), ), ), ), ), ), - const SizedBox(height: 24), + const SizedBox(height: 16), + InfoBox(text: 'initializing.choose_server_type_notice'.tr()), ], ); } else { From 6950e325589db96f73bef8ebf5c6c76140fd3e82 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 31 Dec 2022 08:29:42 +0400 Subject: [PATCH 315/732] docs(translations): Translate new assets to Russian --- assets/translations/en.json | 1 + assets/translations/ru.json | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 45bdf821..9c3d5e6a 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -299,6 +299,7 @@ "locations_not_found": "Oops!", "locations_not_found_text": "There are no available servers to rent", "back_to_locations": "Select something else", + "no_locations_found": "No available locations found, make sure your account is accessible", "choose_server_type": "What type of server do you need?", "choose_server_type_text": "Different resource capabilities support different services. Don't worry, you can expand your server anytime", "choose_server_type_notice": "The important things to look at are the CPU and RAM. The data of your services will be stored on a mounted volume which is easily explandable and gets paid for separately.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 93feaf86..3ab94069 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -275,19 +275,43 @@ "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." }, "initializing": { - "connect_to_server": "Подключите сервер", - "place_where_data": "Здесь будут жить ваши данные и SelfPrivacy-сервисы:", + "connect_to_server": "Начнём с сервера.", + "select_provider": "Ниже подборка провайдеров, которых поддерживает SelfPrivacy", + "select_provider_notice": "Под 'Небольшим сервером' имеется ввиду сервер с двумя потоками процессора и двумя гигабайтами оперативной памяти.", + "select_provider_countries_title": "Доступные страны", + "select_provider_countries_text_hetzner": "Германия, Финляндия, США", + "select_provider_countries_text_do": "США, Нидерланды, Сингапур, Великобритания, Германия, Канада, Индия, Австралия", + "select_provider_price_title": "Средняя цена", + "select_provider_price_text_hetzner": "€8 в месяц за небольшой сервер и 50GB места на диске", + "select_provider_price_text_do": "$17 в месяц за небольшой сервер и 50GB места на диске", + "select_provider_payment_title": "Методы оплаты", + "select_provider_payment_text_hetzner": "Банковские карты, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Банковские карты, Google Pay, PayPal", + "select_provider_email_notice": "Хостинг электронной почты недоступен для новых клиентов. Разблокировать можно будет после первой оплаты.", + "select_provider_site_button": "Посетить сайт", + "connect_to_server_provider": "Авторизоваться в ", + "connect_to_server_provider_text": "С помощью API токена приложение SelfPrivacy сможет от вашего имени заказать и настроить сервер", "how": "Как получить API Token", "provider_bad_key_error": "API ключ провайдера неверен", "could_not_connect": "Не удалось соединиться с провайдером.", - "choose_location_type": "Выберите локацию и тип вашего сервера:", - "back_to_locations": "Назад к доступным локациям!", + "choose_location_type": "Где заказать сервер?", + "choose_location_type_text": "От выбора локации будут зависеть доступные конфигурации, цены и скорость вашего соединения с сервером.", + "locations_not_found": "Упс!", + "locations_not_found_text": "В этом месте не оказалось доступных серверов для аренды", + "back_to_locations": "Выберем другой", "no_locations_found": "Не найдено локаций. Убедитесь, что ваш аккаунт доступен.", - "no_server_types_found": "Не удалось получить список серверов. Убедитесь, что ваш аккаунт доступен и попытайтесь сменить локацию сервера.", + "choose_server_type": "Какой выбрать тип сервера?", + "choose_server_type_text": "От ресурсов сервера зависит, какие сервисы смогут запуститься. Расширить сервер можно будет в любое время", + "choose_server_type_notice": "Главное, на что стоит обратить внимание — количество потоков процессора и объём оперативной памяти. Данные сервисов будут размещены на отдельном диске, который оплачивается отдельно и легко расширяем!", + "choose_server_type_ram": "{} GB у RAM", + "choose_server_type_storage": "{} GB системного хранилища", + "choose_server_type_payment_per_month": "{} в месяц", + "no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...", "cloudflare_bad_key_error": "Cloudflare API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", - "connect_cloudflare": "Подключите CloudFlare", "manage_domain_dns": "Для управления DNS вашего домена", + "use_this_domain": "Используем этот домен?", + "use_this_domain_text": "Указанный вами токен даёт контроль над этим доменом", "cloudflare_api_token": "CloudFlare API ключ", "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", "no_connected_domains": "На данный момент подлюченных доменов нет", From 48446ab3d5187eac2149f28c3bfe81af5d940f0d Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 07:49:11 +0300 Subject: [PATCH 316/732] fix(charts): Temporary fix for Hetzner CPU chart --- lib/ui/pages/server_details/charts/cpu_chart.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart index 8c3ae9c7..30928ca0 100644 --- a/lib/ui/pages/server_details/charts/cpu_chart.dart +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -1,6 +1,10 @@ +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; +import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:intl/intl.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/bottom_title.dart'; @@ -82,7 +86,10 @@ class CpuChart extends StatelessWidget { ), ], minY: 0, - maxY: 100, + // Maximal value of data by 100 step + maxY: + ((data.map((final e) => e.value).reduce(max) - 1) / 100).ceil() * + 100.0, minX: 0, titlesData: FlTitlesData( topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), From 3feb5acf717e3e39f06134f29ab5aa13fa2ba19d Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 07:50:43 +0300 Subject: [PATCH 317/732] style: Linting --- lib/illustrations/stray_deer.dart | 3950 +++++++++-------- .../server_details/charts/cpu_chart.dart | 2 - .../initializing/server_type_picker.dart | 14 +- 3 files changed, 2170 insertions(+), 1796 deletions(-) diff --git a/lib/illustrations/stray_deer.dart b/lib/illustrations/stray_deer.dart index b7223291..88fd55c3 100644 --- a/lib/illustrations/stray_deer.dart +++ b/lib/illustrations/stray_deer.dart @@ -29,160 +29,186 @@ class StrayDeerPainter extends CustomPainter { path0.close(); path0.moveTo(size.width * 0.5593348, size.height * 0.6723356); path0.cubicTo( - size.width * 0.5525321, - size.height * 0.6723356, - size.width * 0.5461073, - size.height * 0.6738473, - size.width * 0.5400605, - size.height * 0.6761149); + size.width * 0.5525321, + size.height * 0.6723356, + size.width * 0.5461073, + size.height * 0.6738473, + size.width * 0.5400605, + size.height * 0.6761149, + ); path0.lineTo(size.width * 0.5476190, size.height * 0.6806500); path0.cubicTo( - size.width * 0.5529101, - size.height * 0.6798942, - size.width * 0.5585790, - size.height * 0.6806500, - size.width * 0.5634921, - size.height * 0.6787604); + size.width * 0.5529101, + size.height * 0.6798942, + size.width * 0.5585790, + size.height * 0.6806500, + size.width * 0.5634921, + size.height * 0.6787604, + ); path0.cubicTo( - size.width * 0.5653817, - size.height * 0.6780045, - size.width * 0.5680272, - size.height * 0.6764928, - size.width * 0.5680272, - size.height * 0.6746032); + size.width * 0.5653817, + size.height * 0.6780045, + size.width * 0.5680272, + size.height * 0.6764928, + size.width * 0.5680272, + size.height * 0.6746032, + ); path0.cubicTo( - size.width * 0.5680272, - size.height * 0.6727135, - size.width * 0.5653817, - size.height * 0.6727135, - size.width * 0.5642479, - size.height * 0.6727135); + size.width * 0.5680272, + size.height * 0.6727135, + size.width * 0.5653817, + size.height * 0.6727135, + size.width * 0.5642479, + size.height * 0.6727135, + ); path0.lineTo(size.width * 0.5593348, size.height * 0.6727135); path0.close(); path0.moveTo(size.width * 0.6757370, size.height * 0.6727135); path0.lineTo(size.width * 0.6700680, size.height * 0.6730915); path0.cubicTo( - size.width * 0.6681784, - size.height * 0.6734694, - size.width * 0.6655329, - size.height * 0.6730915, - size.width * 0.6636432, - size.height * 0.6746032); + size.width * 0.6681784, + size.height * 0.6734694, + size.width * 0.6655329, + size.height * 0.6730915, + size.width * 0.6636432, + size.height * 0.6746032, + ); path0.lineTo(size.width * 0.6636432, size.height * 0.6753590); path0.lineTo(size.width * 0.6723356, size.height * 0.6810280); path0.lineTo(size.width * 0.6874528, size.height * 0.6825397); path0.cubicTo( - size.width * 0.6897203, - size.height * 0.6825397, - size.width * 0.6923658, - size.height * 0.6832955, - size.width * 0.6938776, - size.height * 0.6814059); + size.width * 0.6897203, + size.height * 0.6825397, + size.width * 0.6923658, + size.height * 0.6832955, + size.width * 0.6938776, + size.height * 0.6814059, + ); path0.cubicTo( - size.width * 0.6953893, - size.height * 0.6798942, - size.width * 0.6931217, - size.height * 0.6776266, - size.width * 0.6919879, - size.height * 0.6772487); - path0.arcToPoint(Offset(size.width * 0.6757370, size.height * 0.6727135), - radius: Radius.elliptical( - size.width * 0.03325775, size.height * 0.03325775), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.6953893, + size.height * 0.6798942, + size.width * 0.6931217, + size.height * 0.6776266, + size.width * 0.6919879, + size.height * 0.6772487, + ); + path0.arcToPoint( + Offset(size.width * 0.6757370, size.height * 0.6727135), + radius: Radius.elliptical( + size.width * 0.03325775, + size.height * 0.03325775, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.close(); path0.moveTo(size.width * 0.5971277, size.height * 0.6768707); path0.cubicTo( - size.width * 0.5997732, - size.height * 0.6780045, - size.width * 0.6027967, - size.height * 0.6780045, - size.width * 0.6054422, - size.height * 0.6768707); + size.width * 0.5997732, + size.height * 0.6780045, + size.width * 0.6027967, + size.height * 0.6780045, + size.width * 0.6054422, + size.height * 0.6768707, + ); path0.close(); path0.moveTo(size.width * 0.4950869, size.height * 0.6814059); path0.lineTo(size.width * 0.4924414, size.height * 0.6814059); path0.cubicTo( - size.width * 0.4909297, - size.height * 0.6814059, - size.width * 0.4886621, - size.height * 0.6814059, - size.width * 0.4871504, - size.height * 0.6825397); + size.width * 0.4909297, + size.height * 0.6814059, + size.width * 0.4886621, + size.height * 0.6814059, + size.width * 0.4871504, + size.height * 0.6825397, + ); path0.lineTo(size.width * 0.4833711, size.height * 0.6912320); path0.cubicTo( - size.width * 0.4894180, - size.height * 0.6904762, - size.width * 0.4954649, - size.height * 0.6904762, - size.width * 0.5011338, - size.height * 0.6882086); + size.width * 0.4894180, + size.height * 0.6904762, + size.width * 0.4954649, + size.height * 0.6904762, + size.width * 0.5011338, + size.height * 0.6882086, + ); path0.cubicTo( - size.width * 0.5030234, - size.height * 0.6874528, - size.width * 0.5049131, - size.height * 0.6866969, - size.width * 0.5064248, - size.height * 0.6851852); + size.width * 0.5030234, + size.height * 0.6874528, + size.width * 0.5049131, + size.height * 0.6866969, + size.width * 0.5064248, + size.height * 0.6851852, + ); path0.cubicTo( - size.width * 0.5071807, - size.height * 0.6840514, - size.width * 0.5056689, - size.height * 0.6829176, - size.width * 0.5045351, - size.height * 0.6825397); + size.width * 0.5071807, + size.height * 0.6840514, + size.width * 0.5056689, + size.height * 0.6829176, + size.width * 0.5045351, + size.height * 0.6825397, + ); path0.cubicTo( - size.width * 0.5015117, - size.height * 0.6817838, - size.width * 0.4984883, - size.height * 0.6814059, - size.width * 0.4950869, - size.height * 0.6814059); + size.width * 0.5015117, + size.height * 0.6817838, + size.width * 0.4984883, + size.height * 0.6814059, + size.width * 0.4950869, + size.height * 0.6814059, + ); path0.close(); path0.moveTo(size.width * 0.6303855, size.height * 0.6832955); - path0.arcToPoint(Offset(size.width * 0.6179138, size.height * 0.6863190), - radius: Radius.elliptical( - size.width * 0.03401361, size.height * 0.03401361), - rotation: 0, - largeArc: false, - clockwise: false); + path0.arcToPoint( + Offset(size.width * 0.6179138, size.height * 0.6863190), + radius: Radius.elliptical( + size.width * 0.03401361, + size.height * 0.03401361, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.6167800, - size.height * 0.6866969, - size.width * 0.6148904, - size.height * 0.6874528, - size.width * 0.6148904, - size.height * 0.6889645); + size.width * 0.6167800, + size.height * 0.6866969, + size.width * 0.6148904, + size.height * 0.6874528, + size.width * 0.6148904, + size.height * 0.6889645, + ); path0.cubicTo( - size.width * 0.6148904, - size.height * 0.6904762, - size.width * 0.6167800, - size.height * 0.6904762, - size.width * 0.6175359, - size.height * 0.6900983); + size.width * 0.6148904, + size.height * 0.6904762, + size.width * 0.6167800, + size.height * 0.6904762, + size.width * 0.6175359, + size.height * 0.6900983, + ); path0.lineTo(size.width * 0.6179138, size.height * 0.6938776); path0.cubicTo( - size.width * 0.6250945, - size.height * 0.6934996, - size.width * 0.6322751, - size.height * 0.6934996, - size.width * 0.6386999, - size.height * 0.6904762); + size.width * 0.6250945, + size.height * 0.6934996, + size.width * 0.6322751, + size.height * 0.6934996, + size.width * 0.6386999, + size.height * 0.6904762, + ); path0.cubicTo( - size.width * 0.6398337, - size.height * 0.6900983, - size.width * 0.6417234, - size.height * 0.6889645, - size.width * 0.6413454, - size.height * 0.6874528); + size.width * 0.6398337, + size.height * 0.6900983, + size.width * 0.6417234, + size.height * 0.6889645, + size.width * 0.6413454, + size.height * 0.6874528, + ); path0.cubicTo( - size.width * 0.6405896, - size.height * 0.6851852, - size.width * 0.6379441, - size.height * 0.6848073, - size.width * 0.6360544, - size.height * 0.6840514); + size.width * 0.6405896, + size.height * 0.6851852, + size.width * 0.6379441, + size.height * 0.6848073, + size.width * 0.6360544, + size.height * 0.6840514, + ); path0.lineTo(size.width * 0.6303855, size.height * 0.6832955); path0.close(); path0.moveTo(size.width * 0.7959184, size.height * 0.6885865); @@ -190,931 +216,1097 @@ class StrayDeerPainter extends CustomPainter { path0.lineTo(size.width * 0.7932729, size.height * 0.6893424); path0.lineTo(size.width * 0.7932729, size.height * 0.6893424); path0.lineTo(size.width * 0.7951625, size.height * 0.6980348); - path0.arcToPoint(Offset(size.width * 0.8148148, size.height * 0.7018141), - radius: Radius.elliptical( - size.width * 0.02116402, size.height * 0.02116402), - rotation: 0, - largeArc: false, - clockwise: false); + path0.arcToPoint( + Offset(size.width * 0.8148148, size.height * 0.7018141), + radius: Radius.elliptical( + size.width * 0.02116402, + size.height * 0.02116402, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.8163265, - size.height * 0.7010582, - size.width * 0.8178382, - size.height * 0.6999244, - size.width * 0.8170824, - size.height * 0.6980348); + size.width * 0.8163265, + size.height * 0.7010582, + size.width * 0.8178382, + size.height * 0.6999244, + size.width * 0.8170824, + size.height * 0.6980348, + ); path0.cubicTo( - size.width * 0.8163265, - size.height * 0.6961451, - size.width * 0.8140590, - size.height * 0.6946334, - size.width * 0.8121693, - size.height * 0.6938776); - path0.arcToPoint(Offset(size.width * 0.7981859, size.height * 0.6885865), - radius: Radius.elliptical( - size.width * 0.03665911, size.height * 0.03665911), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.8163265, + size.height * 0.6961451, + size.width * 0.8140590, + size.height * 0.6946334, + size.width * 0.8121693, + size.height * 0.6938776, + ); + path0.arcToPoint( + Offset(size.width * 0.7981859, size.height * 0.6885865), + radius: Radius.elliptical( + size.width * 0.03665911, + size.height * 0.03665911, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.lineTo(size.width * 0.7959184, size.height * 0.6885865); path0.close(); path0.moveTo(size.width * 0.7448980, size.height * 0.6900983); path0.lineTo(size.width * 0.7430083, size.height * 0.6900983); path0.cubicTo( - size.width * 0.7407407, - size.height * 0.6904762, - size.width * 0.7384732, - size.height * 0.6916100, - size.width * 0.7369615, - size.height * 0.6938776); + size.width * 0.7407407, + size.height * 0.6904762, + size.width * 0.7384732, + size.height * 0.6916100, + size.width * 0.7369615, + size.height * 0.6938776, + ); path0.cubicTo( - size.width * 0.7365835, - size.height * 0.6938776, - size.width * 0.7369615, - size.height * 0.6946334, - size.width * 0.7369615, - size.height * 0.6946334); + size.width * 0.7365835, + size.height * 0.6938776, + size.width * 0.7369615, + size.height * 0.6946334, + size.width * 0.7369615, + size.height * 0.6946334, + ); path0.lineTo(size.width * 0.7369615, size.height * 0.6999244); path0.cubicTo( - size.width * 0.7418745, - size.height * 0.7006803, - size.width * 0.7467876, - size.height * 0.7014361, - size.width * 0.7520786, - size.height * 0.7006803); + size.width * 0.7418745, + size.height * 0.7006803, + size.width * 0.7467876, + size.height * 0.7014361, + size.width * 0.7520786, + size.height * 0.7006803, + ); path0.cubicTo( - size.width * 0.7543462, - size.height * 0.7006803, - size.width * 0.7566138, - size.height * 0.6999244, - size.width * 0.7585034, - size.height * 0.6980348); + size.width * 0.7543462, + size.height * 0.7006803, + size.width * 0.7566138, + size.height * 0.6999244, + size.width * 0.7585034, + size.height * 0.6980348, + ); path0.cubicTo( - size.width * 0.7600151, - size.height * 0.6969010, - size.width * 0.7585034, - size.height * 0.6953893, - size.width * 0.7573696, - size.height * 0.6942555); + size.width * 0.7600151, + size.height * 0.6969010, + size.width * 0.7585034, + size.height * 0.6953893, + size.width * 0.7573696, + size.height * 0.6942555, + ); path0.cubicTo( - size.width * 0.7535903, - size.height * 0.6919879, - size.width * 0.7494331, - size.height * 0.6897203, - size.width * 0.7448980, - size.height * 0.6900983); + size.width * 0.7535903, + size.height * 0.6919879, + size.width * 0.7494331, + size.height * 0.6897203, + size.width * 0.7448980, + size.height * 0.6900983, + ); path0.close(); path0.moveTo(size.width * 0.4357521, size.height * 0.6961451); path0.lineTo(size.width * 0.4349962, size.height * 0.7052154); path0.cubicTo( - size.width * 0.4399093, - size.height * 0.7055933, - size.width * 0.4448224, - size.height * 0.7040816, - size.width * 0.4489796, - size.height * 0.7014361); + size.width * 0.4399093, + size.height * 0.7055933, + size.width * 0.4448224, + size.height * 0.7040816, + size.width * 0.4489796, + size.height * 0.7014361, + ); path0.cubicTo( - size.width * 0.4504913, - size.height * 0.7010582, - size.width * 0.4523810, - size.height * 0.7003023, - size.width * 0.4531368, - size.height * 0.6991686); + size.width * 0.4504913, + size.height * 0.7010582, + size.width * 0.4523810, + size.height * 0.7003023, + size.width * 0.4531368, + size.height * 0.6991686, + ); path0.cubicTo( - size.width * 0.4538927, - size.height * 0.6980348, - size.width * 0.4527589, - size.height * 0.6972789, - size.width * 0.4520030, - size.height * 0.6972789); + size.width * 0.4538927, + size.height * 0.6980348, + size.width * 0.4527589, + size.height * 0.6972789, + size.width * 0.4520030, + size.height * 0.6972789, + ); path0.cubicTo( - size.width * 0.4489796, - size.height * 0.6961451, - size.width * 0.4459562, - size.height * 0.6972789, - size.width * 0.4433107, - size.height * 0.6965231); + size.width * 0.4489796, + size.height * 0.6961451, + size.width * 0.4459562, + size.height * 0.6972789, + size.width * 0.4433107, + size.height * 0.6965231, + ); path0.lineTo(size.width * 0.4357521, size.height * 0.6961451); path0.close(); path0.moveTo(size.width * 0.3408919, size.height * 0.6999244); - path0.arcToPoint(Offset(size.width * 0.3250189, size.height * 0.7052154), - radius: Radius.elliptical( - size.width * 0.03401361, size.height * 0.03401361), - rotation: 0, - largeArc: false, - clockwise: false); + path0.arcToPoint( + Offset(size.width * 0.3250189, size.height * 0.7052154), + radius: Radius.elliptical( + size.width * 0.03401361, + size.height * 0.03401361, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.lineTo(size.width * 0.3208617, size.height * 0.7108844); path0.cubicTo( - size.width * 0.3465608, - size.height * 0.7146636, - size.width * 0.3522298, - size.height * 0.6999244, - size.width * 0.3408919, - size.height * 0.6999244); + size.width * 0.3465608, + size.height * 0.7146636, + size.width * 0.3522298, + size.height * 0.6999244, + size.width * 0.3408919, + size.height * 0.6999244, + ); path0.close(); path0.moveTo(size.width * 0.8435374, size.height * 0.7195767); path0.cubicTo( - size.width * 0.8420257, - size.height * 0.7195767, - size.width * 0.8405140, - size.height * 0.7199546, - size.width * 0.8397581, - size.height * 0.7210884); + size.width * 0.8420257, + size.height * 0.7195767, + size.width * 0.8405140, + size.height * 0.7199546, + size.width * 0.8397581, + size.height * 0.7210884, + ); path0.lineTo(size.width * 0.8344671, size.height * 0.7248677); path0.cubicTo( - size.width * 0.8359788, - size.height * 0.7271353, - size.width * 0.8374906, - size.height * 0.7297808, - size.width * 0.8397581, - size.height * 0.7312925); + size.width * 0.8359788, + size.height * 0.7271353, + size.width * 0.8374906, + size.height * 0.7297808, + size.width * 0.8397581, + size.height * 0.7312925, + ); path0.cubicTo( - size.width * 0.8416478, - size.height * 0.7328042, - size.width * 0.8446712, - size.height * 0.7324263, - size.width * 0.8473167, - size.height * 0.7324263); + size.width * 0.8416478, + size.height * 0.7328042, + size.width * 0.8446712, + size.height * 0.7324263, + size.width * 0.8473167, + size.height * 0.7324263, + ); path0.cubicTo( - size.width * 0.8488284, - size.height * 0.7324263, - size.width * 0.8510960, - size.height * 0.7324263, - size.width * 0.8526077, - size.height * 0.7309146); + size.width * 0.8488284, + size.height * 0.7324263, + size.width * 0.8510960, + size.height * 0.7324263, + size.width * 0.8526077, + size.height * 0.7309146, + ); path0.cubicTo( - size.width * 0.8541194, - size.height * 0.7286470, - size.width * 0.8533636, - size.height * 0.7260015, - size.width * 0.8522298, - size.height * 0.7241119); - path0.arcToPoint(Offset(size.width * 0.8431595, size.height * 0.7195767), - radius: Radius.elliptical( - size.width * 0.01020408, size.height * 0.01020408), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.8541194, + size.height * 0.7286470, + size.width * 0.8533636, + size.height * 0.7260015, + size.width * 0.8522298, + size.height * 0.7241119, + ); + path0.arcToPoint( + Offset(size.width * 0.8431595, size.height * 0.7195767), + radius: Radius.elliptical( + size.width * 0.01020408, + size.height * 0.01020408, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.close(); path0.moveTo(size.width * 0.2883598, size.height * 0.7237339); path0.cubicTo( - size.width * 0.2853364, - size.height * 0.7237339, - size.width * 0.2808012, - size.height * 0.7244898, - size.width * 0.2743764, - size.height * 0.7256236); + size.width * 0.2853364, + size.height * 0.7237339, + size.width * 0.2808012, + size.height * 0.7244898, + size.width * 0.2743764, + size.height * 0.7256236, + ); path0.lineTo(size.width * 0.2660620, size.height * 0.7343159); path0.cubicTo( - size.width * 0.2834467, - size.height * 0.7331822, - size.width * 0.3012094, - size.height * 0.7237339, - size.width * 0.2883598, - size.height * 0.7237339); + size.width * 0.2834467, + size.height * 0.7331822, + size.width * 0.3012094, + size.height * 0.7237339, + size.width * 0.2883598, + size.height * 0.7237339, + ); path0.close(); path0.moveTo(size.width * 0.8907785, size.height * 0.7241119); path0.lineTo(size.width * 0.8892668, size.height * 0.7241119); path0.lineTo(size.width * 0.8869992, size.height * 0.7278912); path0.cubicTo( - size.width * 0.8881330, - size.height * 0.7312925, - size.width * 0.8904006, - size.height * 0.7331822, - size.width * 0.8926682, - size.height * 0.7350718); + size.width * 0.8881330, + size.height * 0.7312925, + size.width * 0.8904006, + size.height * 0.7331822, + size.width * 0.8926682, + size.height * 0.7350718, + ); path0.cubicTo( - size.width * 0.8945578, - size.height * 0.7369615, - size.width * 0.8964475, - size.height * 0.7388511, - size.width * 0.8990930, - size.height * 0.7403628); + size.width * 0.8945578, + size.height * 0.7369615, + size.width * 0.8964475, + size.height * 0.7388511, + size.width * 0.8990930, + size.height * 0.7403628, + ); path0.cubicTo( - size.width * 0.9006047, - size.height * 0.7411187, - size.width * 0.9028723, - size.height * 0.7422525, - size.width * 0.9043840, - size.height * 0.7418745); + size.width * 0.9006047, + size.height * 0.7411187, + size.width * 0.9028723, + size.height * 0.7422525, + size.width * 0.9043840, + size.height * 0.7418745, + ); path0.cubicTo( - size.width * 0.9058957, - size.height * 0.7411187, - size.width * 0.9058957, - size.height * 0.7392290, - size.width * 0.9062736, - size.height * 0.7380952); + size.width * 0.9058957, + size.height * 0.7411187, + size.width * 0.9058957, + size.height * 0.7392290, + size.width * 0.9062736, + size.height * 0.7380952, + ); path0.cubicTo( - size.width * 0.9062736, - size.height * 0.7339380, - size.width * 0.9047619, - size.height * 0.7294029, - size.width * 0.9009826, - size.height * 0.7271353); + size.width * 0.9062736, + size.height * 0.7339380, + size.width * 0.9047619, + size.height * 0.7294029, + size.width * 0.9009826, + size.height * 0.7271353, + ); path0.cubicTo( - size.width * 0.8987150, - size.height * 0.7256236, - size.width * 0.8956916, - size.height * 0.7248677, - size.width * 0.8926682, - size.height * 0.7244898); + size.width * 0.8987150, + size.height * 0.7256236, + size.width * 0.8956916, + size.height * 0.7248677, + size.width * 0.8926682, + size.height * 0.7244898, + ); path0.lineTo(size.width * 0.8907785, size.height * 0.7244898); path0.close(); path0.moveTo(size.width * 0.2078609, size.height * 0.7373394); path0.cubicTo( - size.width * 0.2029478, - size.height * 0.7388511, - size.width * 0.1976568, - size.height * 0.7388511, - size.width * 0.1931217, - size.height * 0.7414966); + size.width * 0.2029478, + size.height * 0.7388511, + size.width * 0.1976568, + size.height * 0.7388511, + size.width * 0.1931217, + size.height * 0.7414966, + ); path0.cubicTo( - size.width * 0.1908541, - size.height * 0.7430083, - size.width * 0.1893424, - size.height * 0.7464097, - size.width * 0.1912320, - size.height * 0.7486772); + size.width * 0.1908541, + size.height * 0.7430083, + size.width * 0.1893424, + size.height * 0.7464097, + size.width * 0.1912320, + size.height * 0.7486772, + ); path0.cubicTo( - size.width * 0.1931217, - size.height * 0.7509448, - size.width * 0.1965231, - size.height * 0.7513228, - size.width * 0.1991686, - size.height * 0.7517007); + size.width * 0.1931217, + size.height * 0.7509448, + size.width * 0.1965231, + size.height * 0.7513228, + size.width * 0.1991686, + size.height * 0.7517007, + ); path0.cubicTo( - size.width * 0.2048375, - size.height * 0.7517007, - size.width * 0.2105064, - size.height * 0.7517007, - size.width * 0.2154195, - size.height * 0.7490552); - path0.arcToPoint(Offset(size.width * 0.2214664, size.height * 0.7452759), - radius: Radius.elliptical( - size.width * 0.02645503, size.height * 0.02645503), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.2048375, + size.height * 0.7517007, + size.width * 0.2105064, + size.height * 0.7517007, + size.width * 0.2154195, + size.height * 0.7490552, + ); + path0.arcToPoint( + Offset(size.width * 0.2214664, size.height * 0.7452759), + radius: Radius.elliptical( + size.width * 0.02645503, + size.height * 0.02645503, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.2226002, - size.height * 0.7445200, - size.width * 0.2237339, - size.height * 0.7422525, - size.width * 0.2222222, - size.height * 0.7407407); + size.width * 0.2226002, + size.height * 0.7445200, + size.width * 0.2237339, + size.height * 0.7422525, + size.width * 0.2222222, + size.height * 0.7407407, + ); path0.cubicTo( - size.width * 0.2203326, - size.height * 0.7388511, - size.width * 0.2173091, - size.height * 0.7380952, - size.width * 0.2146636, - size.height * 0.7384732); + size.width * 0.2203326, + size.height * 0.7388511, + size.width * 0.2173091, + size.height * 0.7380952, + size.width * 0.2146636, + size.height * 0.7384732, + ); path0.cubicTo( - size.width * 0.2135299, - size.height * 0.7384732, - size.width * 0.2123961, - size.height * 0.7392290, - size.width * 0.2116402, - size.height * 0.7399849); + size.width * 0.2135299, + size.height * 0.7384732, + size.width * 0.2123961, + size.height * 0.7392290, + size.width * 0.2116402, + size.height * 0.7399849, + ); path0.close(); path0.moveTo(size.width * 0.1583522, size.height * 0.7392290); path0.cubicTo( - size.width * 0.1572184, - size.height * 0.7392290, - size.width * 0.1564626, - size.height * 0.7392290, - size.width * 0.1553288, - size.height * 0.7399849); + size.width * 0.1572184, + size.height * 0.7392290, + size.width * 0.1564626, + size.height * 0.7392290, + size.width * 0.1553288, + size.height * 0.7399849, + ); path0.cubicTo( - size.width * 0.1545729, - size.height * 0.7403628, - size.width * 0.1541950, - size.height * 0.7411187, - size.width * 0.1541950, - size.height * 0.7422525); + size.width * 0.1545729, + size.height * 0.7403628, + size.width * 0.1541950, + size.height * 0.7411187, + size.width * 0.1541950, + size.height * 0.7422525, + ); path0.lineTo(size.width * 0.1466364, size.height * 0.7422525); path0.cubicTo( - size.width * 0.1436130, - size.height * 0.7441421, - size.width * 0.1405896, - size.height * 0.7460317, - size.width * 0.1379441, - size.height * 0.7490552); + size.width * 0.1436130, + size.height * 0.7441421, + size.width * 0.1405896, + size.height * 0.7460317, + size.width * 0.1379441, + size.height * 0.7490552, + ); path0.cubicTo( - size.width * 0.1364324, - size.height * 0.7505669, - size.width * 0.1341648, - size.height * 0.7528345, - size.width * 0.1341648, - size.height * 0.7551020); + size.width * 0.1364324, + size.height * 0.7505669, + size.width * 0.1341648, + size.height * 0.7528345, + size.width * 0.1341648, + size.height * 0.7551020, + ); path0.cubicTo( - size.width * 0.1349206, - size.height * 0.7573696, - size.width * 0.1371882, - size.height * 0.7577475, - size.width * 0.1390779, - size.height * 0.7577475); + size.width * 0.1349206, + size.height * 0.7573696, + size.width * 0.1371882, + size.height * 0.7577475, + size.width * 0.1390779, + size.height * 0.7577475, + ); path0.cubicTo( - size.width * 0.1451247, - size.height * 0.7577475, - size.width * 0.1504157, - size.height * 0.7554800, - size.width * 0.1557067, - size.height * 0.7520786); + size.width * 0.1451247, + size.height * 0.7577475, + size.width * 0.1504157, + size.height * 0.7554800, + size.width * 0.1557067, + size.height * 0.7520786, + ); path0.cubicTo( - size.width * 0.1579743, - size.height * 0.7505669, - size.width * 0.1594860, - size.height * 0.7482993, - size.width * 0.1617536, - size.height * 0.7464097); + size.width * 0.1579743, + size.height * 0.7505669, + size.width * 0.1594860, + size.height * 0.7482993, + size.width * 0.1617536, + size.height * 0.7464097, + ); path0.cubicTo( - size.width * 0.1628874, - size.height * 0.7448980, - size.width * 0.1647770, - size.height * 0.7426304, - size.width * 0.1628874, - size.height * 0.7407407); - path0.arcToPoint(Offset(size.width * 0.1583522, size.height * 0.7392290), - radius: Radius.elliptical( - size.width * 0.007558579, size.height * 0.007558579), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.1628874, + size.height * 0.7448980, + size.width * 0.1647770, + size.height * 0.7426304, + size.width * 0.1628874, + size.height * 0.7407407, + ); + path0.arcToPoint( + Offset(size.width * 0.1583522, size.height * 0.7392290), + radius: Radius.elliptical( + size.width * 0.007558579, + size.height * 0.007558579, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.close(); path0.moveTo(size.width * 0.8764172, size.height * 0.7505669); path0.lineTo(size.width * 0.8726379, size.height * 0.7532124); path0.cubicTo( - size.width * 0.8737717, - size.height * 0.7569917, - size.width * 0.8733938, - size.height * 0.7615268, - size.width * 0.8756614, - size.height * 0.7645503); + size.width * 0.8737717, + size.height * 0.7569917, + size.width * 0.8733938, + size.height * 0.7615268, + size.width * 0.8756614, + size.height * 0.7645503, + ); path0.lineTo(size.width * 0.8794407, size.height * 0.7694633); path0.cubicTo( - size.width * 0.8809524, - size.height * 0.7705971, - size.width * 0.8832200, - size.height * 0.7717309, - size.width * 0.8851096, - size.height * 0.7705971); + size.width * 0.8809524, + size.height * 0.7705971, + size.width * 0.8832200, + size.height * 0.7717309, + size.width * 0.8851096, + size.height * 0.7705971, + ); path0.cubicTo( - size.width * 0.8862434, - size.height * 0.7694633, - size.width * 0.8866213, - size.height * 0.7675737, - size.width * 0.8862434, - size.height * 0.7660620); + size.width * 0.8862434, + size.height * 0.7694633, + size.width * 0.8866213, + size.height * 0.7675737, + size.width * 0.8862434, + size.height * 0.7660620, + ); path0.cubicTo( - size.width * 0.8862434, - size.height * 0.7630385, - size.width * 0.8847317, - size.height * 0.7600151, - size.width * 0.8832200, - size.height * 0.7573696); + size.width * 0.8862434, + size.height * 0.7630385, + size.width * 0.8847317, + size.height * 0.7600151, + size.width * 0.8832200, + size.height * 0.7573696, + ); path0.cubicTo( - size.width * 0.8824641, - size.height * 0.7547241, - size.width * 0.8809524, - size.height * 0.7520786, - size.width * 0.8783069, - size.height * 0.7513228); - path0.arcToPoint(Offset(size.width * 0.8764172, size.height * 0.7509448), - radius: Radius.elliptical( - size.width * 0.007558579, size.height * 0.007558579), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.8824641, + size.height * 0.7547241, + size.width * 0.8809524, + size.height * 0.7520786, + size.width * 0.8783069, + size.height * 0.7513228, + ); + path0.arcToPoint( + Offset(size.width * 0.8764172, size.height * 0.7509448), + radius: Radius.elliptical( + size.width * 0.007558579, + size.height * 0.007558579, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.close(); path0.moveTo(size.width * 0.1190476, size.height * 0.7709751); path0.cubicTo( - size.width * 0.1190476, - size.height * 0.7709751, - size.width * 0.1190476, - size.height * 0.7709751, - size.width * 0.1190476, - size.height * 0.7709751); + size.width * 0.1190476, + size.height * 0.7709751, + size.width * 0.1190476, + size.height * 0.7709751, + size.width * 0.1190476, + size.height * 0.7709751, + ); path0.cubicTo( - size.width * 0.1171580, - size.height * 0.7709751, - size.width * 0.1156463, - size.height * 0.7713530, - size.width * 0.1145125, - size.height * 0.7721088); + size.width * 0.1171580, + size.height * 0.7709751, + size.width * 0.1156463, + size.height * 0.7713530, + size.width * 0.1145125, + size.height * 0.7721088, + ); path0.lineTo(size.width * 0.1141345, size.height * 0.7728647); path0.lineTo(size.width * 0.1111111, size.height * 0.7739985); path0.cubicTo( - size.width * 0.1092215, - size.height * 0.7762661, - size.width * 0.1073318, - size.height * 0.7785336, - size.width * 0.1065760, - size.height * 0.7815571); + size.width * 0.1092215, + size.height * 0.7762661, + size.width * 0.1073318, + size.height * 0.7785336, + size.width * 0.1065760, + size.height * 0.7815571, + ); path0.cubicTo( - size.width * 0.1061980, - size.height * 0.7834467, - size.width * 0.1065760, - size.height * 0.7853364, - size.width * 0.1080877, - size.height * 0.7860922); + size.width * 0.1061980, + size.height * 0.7834467, + size.width * 0.1065760, + size.height * 0.7853364, + size.width * 0.1080877, + size.height * 0.7860922, + ); path0.cubicTo( - size.width * 0.1095994, - size.height * 0.7868481, - size.width * 0.1114890, - size.height * 0.7860922, - size.width * 0.1130008, - size.height * 0.7853364); + size.width * 0.1095994, + size.height * 0.7868481, + size.width * 0.1114890, + size.height * 0.7860922, + size.width * 0.1130008, + size.height * 0.7853364, + ); path0.cubicTo( - size.width * 0.1156463, - size.height * 0.7834467, - size.width * 0.1182918, - size.height * 0.7815571, - size.width * 0.1205593, - size.height * 0.7785336); + size.width * 0.1156463, + size.height * 0.7834467, + size.width * 0.1182918, + size.height * 0.7815571, + size.width * 0.1205593, + size.height * 0.7785336, + ); path0.cubicTo( - size.width * 0.1213152, - size.height * 0.7766440, - size.width * 0.1220711, - size.height * 0.7747543, - size.width * 0.1216931, - size.height * 0.7728647); + size.width * 0.1213152, + size.height * 0.7766440, + size.width * 0.1220711, + size.height * 0.7747543, + size.width * 0.1216931, + size.height * 0.7728647, + ); path0.cubicTo( - size.width * 0.1216931, - size.height * 0.7713530, - size.width * 0.1201814, - size.height * 0.7709751, - size.width * 0.1190476, - size.height * 0.7709751); + size.width * 0.1216931, + size.height * 0.7713530, + size.width * 0.1201814, + size.height * 0.7709751, + size.width * 0.1190476, + size.height * 0.7709751, + ); path0.close(); path0.moveTo(size.width * 0.9213908, size.height * 0.7739985); path0.lineTo(size.width * 0.9172336, size.height * 0.7758881); path0.cubicTo( - size.width * 0.9142101, - size.height * 0.7808012, - size.width * 0.9126984, - size.height * 0.7868481, - size.width * 0.9123205, - size.height * 0.7925170); + size.width * 0.9142101, + size.height * 0.7808012, + size.width * 0.9126984, + size.height * 0.7868481, + size.width * 0.9123205, + size.height * 0.7925170, + ); path0.cubicTo( - size.width * 0.9123205, - size.height * 0.7940287, - size.width * 0.9111867, - size.height * 0.7962963, - size.width * 0.9123205, - size.height * 0.7974301); + size.width * 0.9123205, + size.height * 0.7940287, + size.width * 0.9111867, + size.height * 0.7962963, + size.width * 0.9123205, + size.height * 0.7974301, + ); path0.cubicTo( - size.width * 0.9138322, - size.height * 0.7981859, - size.width * 0.9157218, - size.height * 0.7974301, - size.width * 0.9168556, - size.height * 0.7970522); - path0.arcToPoint(Offset(size.width * 0.9263039, size.height * 0.7845805), - radius: Radius.elliptical( - size.width * 0.01511716, size.height * 0.01511716), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.9138322, + size.height * 0.7981859, + size.width * 0.9157218, + size.height * 0.7974301, + size.width * 0.9168556, + size.height * 0.7970522, + ); + path0.arcToPoint( + Offset(size.width * 0.9263039, size.height * 0.7845805), + radius: Radius.elliptical( + size.width * 0.01511716, + size.height * 0.01511716, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.9263039, - size.height * 0.7808012, - size.width * 0.9259259, - size.height * 0.7770219, - size.width * 0.9229025, - size.height * 0.7743764); - path0.arcToPoint(Offset(size.width * 0.9213908, size.height * 0.7743764), - radius: Radius.elliptical( - size.width * 0.002267574, size.height * 0.002267574), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.9263039, + size.height * 0.7808012, + size.width * 0.9259259, + size.height * 0.7770219, + size.width * 0.9229025, + size.height * 0.7743764, + ); + path0.arcToPoint( + Offset(size.width * 0.9213908, size.height * 0.7743764), + radius: Radius.elliptical( + size.width * 0.002267574, + size.height * 0.002267574, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.close(); path0.moveTo(size.width * 0.1511716, size.height * 0.7902494); path0.lineTo(size.width * 0.1451247, size.height * 0.8027211); path0.cubicTo( - size.width * 0.1466364, - size.height * 0.8061224, - size.width * 0.1485261, - size.height * 0.8099017, - size.width * 0.1519274, - size.height * 0.8117914); + size.width * 0.1466364, + size.height * 0.8061224, + size.width * 0.1485261, + size.height * 0.8099017, + size.width * 0.1519274, + size.height * 0.8117914, + ); path0.cubicTo( - size.width * 0.1553288, - size.height * 0.8133031, - size.width * 0.1594860, - size.height * 0.8140590, - size.width * 0.1625094, - size.height * 0.8121693); + size.width * 0.1553288, + size.height * 0.8133031, + size.width * 0.1594860, + size.height * 0.8140590, + size.width * 0.1625094, + size.height * 0.8121693, + ); path0.cubicTo( - size.width * 0.1643991, - size.height * 0.8114135, - size.width * 0.1651550, - size.height * 0.8091459, - size.width * 0.1651550, - size.height * 0.8072562); + size.width * 0.1643991, + size.height * 0.8114135, + size.width * 0.1651550, + size.height * 0.8091459, + size.width * 0.1651550, + size.height * 0.8072562, + ); path0.cubicTo( - size.width * 0.1643991, - size.height * 0.8015873, - size.width * 0.1625094, - size.height * 0.7959184, - size.width * 0.1575964, - size.height * 0.7928949); - path0.arcToPoint(Offset(size.width * 0.1511716, size.height * 0.7902494), - radius: Radius.elliptical( - size.width * 0.01511716, size.height * 0.01511716), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.1643991, + size.height * 0.8015873, + size.width * 0.1625094, + size.height * 0.7959184, + size.width * 0.1575964, + size.height * 0.7928949, + ); + path0.arcToPoint( + Offset(size.width * 0.1511716, size.height * 0.7902494), + radius: Radius.elliptical( + size.width * 0.01511716, + size.height * 0.01511716, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.close(); path0.moveTo(size.width * 0.8805745, size.height * 0.8008314); path0.lineTo(size.width * 0.8779289, size.height * 0.8012094); - path0.arcToPoint(Offset(size.width * 0.8643235, size.height * 0.8087680), - radius: Radius.elliptical( - size.width * 0.03665911, size.height * 0.03665911), - rotation: 0, - largeArc: false, - clockwise: false); + path0.arcToPoint( + Offset(size.width * 0.8643235, size.height * 0.8087680), + radius: Radius.elliptical( + size.width * 0.03665911, + size.height * 0.03665911, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.8635676, - size.height * 0.8099017, - size.width * 0.8643235, - size.height * 0.8110355, - size.width * 0.8650794, - size.height * 0.8110355); + size.width * 0.8635676, + size.height * 0.8099017, + size.width * 0.8643235, + size.height * 0.8110355, + size.width * 0.8650794, + size.height * 0.8110355, + ); path0.cubicTo( - size.width * 0.8673469, - size.height * 0.8114135, - size.width * 0.8699924, - size.height * 0.8117914, - size.width * 0.8722600, - size.height * 0.8110355); + size.width * 0.8673469, + size.height * 0.8114135, + size.width * 0.8699924, + size.height * 0.8117914, + size.width * 0.8722600, + size.height * 0.8110355, + ); path0.cubicTo( - size.width * 0.8752834, - size.height * 0.8102797, - size.width * 0.8779289, - size.height * 0.8087680, - size.width * 0.8798186, - size.height * 0.8065004); + size.width * 0.8752834, + size.height * 0.8102797, + size.width * 0.8779289, + size.height * 0.8087680, + size.width * 0.8798186, + size.height * 0.8065004, + ); path0.cubicTo( - size.width * 0.8809524, - size.height * 0.8053666, - size.width * 0.8817082, - size.height * 0.8042328, - size.width * 0.8813303, - size.height * 0.8027211); + size.width * 0.8809524, + size.height * 0.8053666, + size.width * 0.8817082, + size.height * 0.8042328, + size.width * 0.8813303, + size.height * 0.8027211, + ); path0.cubicTo( - size.width * 0.8813303, - size.height * 0.8019652, - size.width * 0.8805745, - size.height * 0.8012094, - size.width * 0.8809524, - size.height * 0.8008314); + size.width * 0.8813303, + size.height * 0.8019652, + size.width * 0.8805745, + size.height * 0.8012094, + size.width * 0.8809524, + size.height * 0.8008314, + ); path0.close(); path0.moveTo(size.width * 0.8030990, size.height * 0.8216175); path0.lineTo(size.width * 0.7985639, size.height * 0.8227513); - path0.arcToPoint(Offset(size.width * 0.7910053, size.height * 0.8276644), - radius: Radius.elliptical( - size.width * 0.02267574, size.height * 0.02267574), - rotation: 0, - largeArc: false, - clockwise: false); + path0.arcToPoint( + Offset(size.width * 0.7910053, size.height * 0.8276644), + radius: Radius.elliptical( + size.width * 0.02267574, + size.height * 0.02267574, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.7902494, - size.height * 0.8287982, - size.width * 0.7910053, - size.height * 0.8303099, - size.width * 0.7921391, - size.height * 0.8306878); + size.width * 0.7902494, + size.height * 0.8287982, + size.width * 0.7910053, + size.height * 0.8303099, + size.width * 0.7921391, + size.height * 0.8306878, + ); path0.cubicTo( - size.width * 0.7947846, - size.height * 0.8321995, - size.width * 0.7974301, - size.height * 0.8321995, - size.width * 0.8004535, - size.height * 0.8318216); + size.width * 0.7947846, + size.height * 0.8321995, + size.width * 0.7974301, + size.height * 0.8321995, + size.width * 0.8004535, + size.height * 0.8318216, + ); path0.cubicTo( - size.width * 0.8046107, - size.height * 0.8318216, - size.width * 0.8087680, - size.height * 0.8303099, - size.width * 0.8129252, - size.height * 0.8295540); + size.width * 0.8046107, + size.height * 0.8318216, + size.width * 0.8087680, + size.height * 0.8303099, + size.width * 0.8129252, + size.height * 0.8295540, + ); path0.cubicTo( - size.width * 0.8140590, - size.height * 0.8291761, - size.width * 0.8155707, - size.height * 0.8280423, - size.width * 0.8136810, - size.height * 0.8272865); + size.width * 0.8140590, + size.height * 0.8291761, + size.width * 0.8155707, + size.height * 0.8280423, + size.width * 0.8136810, + size.height * 0.8272865, + ); path0.lineTo(size.width * 0.8046107, size.height * 0.8216175); path0.lineTo(size.width * 0.8030990, size.height * 0.8216175); path0.close(); path0.moveTo(size.width * 0.8499622, size.height * 0.8280423); path0.cubicTo( - size.width * 0.8473167, - size.height * 0.8284203, - size.width * 0.8450491, - size.height * 0.8295540, - size.width * 0.8427816, - size.height * 0.8310658); + size.width * 0.8473167, + size.height * 0.8284203, + size.width * 0.8450491, + size.height * 0.8295540, + size.width * 0.8427816, + size.height * 0.8310658, + ); path0.cubicTo( - size.width * 0.8405140, - size.height * 0.8321995, - size.width * 0.8382464, - size.height * 0.8340892, - size.width * 0.8374906, - size.height * 0.8363568); + size.width * 0.8405140, + size.height * 0.8321995, + size.width * 0.8382464, + size.height * 0.8340892, + size.width * 0.8374906, + size.height * 0.8363568, + ); path0.cubicTo( - size.width * 0.8367347, - size.height * 0.8374906, - size.width * 0.8374906, - size.height * 0.8393802, - size.width * 0.8386243, - size.height * 0.8397581); + size.width * 0.8367347, + size.height * 0.8374906, + size.width * 0.8374906, + size.height * 0.8393802, + size.width * 0.8386243, + size.height * 0.8397581, + ); path0.cubicTo( - size.width * 0.8408919, - size.height * 0.8401361, - size.width * 0.8435374, - size.height * 0.8397581, - size.width * 0.8458050, - size.height * 0.8393802); + size.width * 0.8408919, + size.height * 0.8401361, + size.width * 0.8435374, + size.height * 0.8397581, + size.width * 0.8458050, + size.height * 0.8393802, + ); path0.cubicTo( - size.width * 0.8480726, - size.height * 0.8386243, - size.width * 0.8507181, - size.height * 0.8382464, - size.width * 0.8526077, - size.height * 0.8367347); + size.width * 0.8480726, + size.height * 0.8386243, + size.width * 0.8507181, + size.height * 0.8382464, + size.width * 0.8526077, + size.height * 0.8367347, + ); path0.cubicTo( - size.width * 0.8544974, - size.height * 0.8356009, - size.width * 0.8563870, - size.height * 0.8340892, - size.width * 0.8575208, - size.height * 0.8321995); + size.width * 0.8544974, + size.height * 0.8356009, + size.width * 0.8563870, + size.height * 0.8340892, + size.width * 0.8575208, + size.height * 0.8321995, + ); path0.cubicTo( - size.width * 0.8582766, - size.height * 0.8306878, - size.width * 0.8563870, - size.height * 0.8303099, - size.width * 0.8552532, - size.height * 0.8299320); + size.width * 0.8582766, + size.height * 0.8306878, + size.width * 0.8563870, + size.height * 0.8303099, + size.width * 0.8552532, + size.height * 0.8299320, + ); path0.lineTo(size.width * 0.8533636, size.height * 0.8299320); path0.close(); path0.moveTo(size.width * 0.1375661, size.height * 0.8291761); path0.cubicTo( - size.width * 0.1364324, - size.height * 0.8291761, - size.width * 0.1356765, - size.height * 0.8291761, - size.width * 0.1345427, - size.height * 0.8299320); + size.width * 0.1364324, + size.height * 0.8291761, + size.width * 0.1356765, + size.height * 0.8291761, + size.width * 0.1345427, + size.height * 0.8299320, + ); path0.cubicTo( - size.width * 0.1341648, - size.height * 0.8299320, - size.width * 0.1334089, - size.height * 0.8306878, - size.width * 0.1334089, - size.height * 0.8314437); + size.width * 0.1341648, + size.height * 0.8299320, + size.width * 0.1334089, + size.height * 0.8306878, + size.width * 0.1334089, + size.height * 0.8314437, + ); path0.lineTo(size.width * 0.1303855, size.height * 0.8352230); path0.cubicTo( - size.width * 0.1296296, - size.height * 0.8374906, - size.width * 0.1315193, - size.height * 0.8397581, - size.width * 0.1334089, - size.height * 0.8412698); + size.width * 0.1296296, + size.height * 0.8374906, + size.width * 0.1315193, + size.height * 0.8397581, + size.width * 0.1334089, + size.height * 0.8412698, + ); path0.lineTo(size.width * 0.1379441, size.height * 0.8450491); - path0.arcToPoint(Offset(size.width * 0.1455026, size.height * 0.8480726), - radius: Radius.elliptical( - size.width * 0.01133787, size.height * 0.01133787), - rotation: 0, - largeArc: false, - clockwise: false); + path0.arcToPoint( + Offset(size.width * 0.1455026, size.height * 0.8480726), + radius: Radius.elliptical( + size.width * 0.01133787, + size.height * 0.01133787, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.1481481, - size.height * 0.8480726, - size.width * 0.1511716, - size.height * 0.8469388, - size.width * 0.1530612, - size.height * 0.8450491); + size.width * 0.1481481, + size.height * 0.8480726, + size.width * 0.1511716, + size.height * 0.8469388, + size.width * 0.1530612, + size.height * 0.8450491, + ); path0.cubicTo( - size.width * 0.1541950, - size.height * 0.8431595, - size.width * 0.1530612, - size.height * 0.8412698, - size.width * 0.1523054, - size.height * 0.8393802); + size.width * 0.1541950, + size.height * 0.8431595, + size.width * 0.1530612, + size.height * 0.8412698, + size.width * 0.1523054, + size.height * 0.8393802, + ); path0.cubicTo( - size.width * 0.1496599, - size.height * 0.8356009, - size.width * 0.1458806, - size.height * 0.8329554, - size.width * 0.1421013, - size.height * 0.8303099); + size.width * 0.1496599, + size.height * 0.8356009, + size.width * 0.1458806, + size.height * 0.8329554, + size.width * 0.1421013, + size.height * 0.8303099, + ); path0.cubicTo( - size.width * 0.1409675, - size.height * 0.8295540, - size.width * 0.1390779, - size.height * 0.8291761, - size.width * 0.1375661, - size.height * 0.8291761); + size.width * 0.1409675, + size.height * 0.8295540, + size.width * 0.1390779, + size.height * 0.8291761, + size.width * 0.1375661, + size.height * 0.8291761, + ); path0.close(); path0.moveTo(size.width * 0.6749811, size.height * 0.8363568); path0.lineTo(size.width * 0.6742252, size.height * 0.8363568); path0.cubicTo( - size.width * 0.6708239, - size.height * 0.8363568, - size.width * 0.6674225, - size.height * 0.8363568, - size.width * 0.6643991, - size.height * 0.8378685); + size.width * 0.6708239, + size.height * 0.8363568, + size.width * 0.6674225, + size.height * 0.8363568, + size.width * 0.6643991, + size.height * 0.8378685, + ); path0.lineTo(size.width * 0.6598639, size.height * 0.8405140); path0.cubicTo( - size.width * 0.6606198, - size.height * 0.8416478, - size.width * 0.6621315, - size.height * 0.8424036, - size.width * 0.6636432, - size.height * 0.8427816); + size.width * 0.6606198, + size.height * 0.8416478, + size.width * 0.6621315, + size.height * 0.8424036, + size.width * 0.6636432, + size.height * 0.8427816, + ); path0.lineTo(size.width * 0.6712018, size.height * 0.8446712); path0.cubicTo( - size.width * 0.6749811, - size.height * 0.8458050, - size.width * 0.6798942, - size.height * 0.8461829, - size.width * 0.6836735, - size.height * 0.8442933); + size.width * 0.6749811, + size.height * 0.8458050, + size.width * 0.6798942, + size.height * 0.8461829, + size.width * 0.6836735, + size.height * 0.8442933, + ); path0.cubicTo( - size.width * 0.6851852, - size.height * 0.8431595, - size.width * 0.6870748, - size.height * 0.8420257, - size.width * 0.6866969, - size.height * 0.8405140); + size.width * 0.6851852, + size.height * 0.8431595, + size.width * 0.6870748, + size.height * 0.8420257, + size.width * 0.6866969, + size.height * 0.8405140, + ); path0.cubicTo( - size.width * 0.6866969, - size.height * 0.8386243, - size.width * 0.6848073, - size.height * 0.8378685, - size.width * 0.6829176, - size.height * 0.8374906); + size.width * 0.6866969, + size.height * 0.8386243, + size.width * 0.6848073, + size.height * 0.8378685, + size.width * 0.6829176, + size.height * 0.8374906, + ); path0.cubicTo( - size.width * 0.6806500, - size.height * 0.8367347, - size.width * 0.6776266, - size.height * 0.8363568, - size.width * 0.6749811, - size.height * 0.8363568); + size.width * 0.6806500, + size.height * 0.8367347, + size.width * 0.6776266, + size.height * 0.8363568, + size.width * 0.6749811, + size.height * 0.8363568, + ); path0.close(); path0.moveTo(size.width * 0.2003023, size.height * 0.8401361); path0.cubicTo( - size.width * 0.1984127, - size.height * 0.8401361, - size.width * 0.1965231, - size.height * 0.8401361, - size.width * 0.1946334, - size.height * 0.8412698); + size.width * 0.1984127, + size.height * 0.8401361, + size.width * 0.1965231, + size.height * 0.8401361, + size.width * 0.1946334, + size.height * 0.8412698, + ); path0.cubicTo( - size.width * 0.1938776, - size.height * 0.8416478, - size.width * 0.1916100, - size.height * 0.8424036, - size.width * 0.1931217, - size.height * 0.8431595); + size.width * 0.1938776, + size.height * 0.8416478, + size.width * 0.1916100, + size.height * 0.8424036, + size.width * 0.1931217, + size.height * 0.8431595, + ); path0.lineTo(size.width * 0.1931217, size.height * 0.8442933); path0.cubicTo( - size.width * 0.1931217, - size.height * 0.8465608, - size.width * 0.1953893, - size.height * 0.8480726, - size.width * 0.1969010, - size.height * 0.8488284); + size.width * 0.1931217, + size.height * 0.8465608, + size.width * 0.1953893, + size.height * 0.8480726, + size.width * 0.1969010, + size.height * 0.8488284, + ); path0.cubicTo( - size.width * 0.2006803, - size.height * 0.8503401, - size.width * 0.2044596, - size.height * 0.8510960, - size.width * 0.2082389, - size.height * 0.8507181); + size.width * 0.2006803, + size.height * 0.8503401, + size.width * 0.2044596, + size.height * 0.8510960, + size.width * 0.2082389, + size.height * 0.8507181, + ); path0.cubicTo( - size.width * 0.2101285, - size.height * 0.8503401, - size.width * 0.2120181, - size.height * 0.8495843, - size.width * 0.2127740, - size.height * 0.8480726); + size.width * 0.2101285, + size.height * 0.8503401, + size.width * 0.2120181, + size.height * 0.8495843, + size.width * 0.2127740, + size.height * 0.8480726, + ); path0.cubicTo( - size.width * 0.2135299, - size.height * 0.8458050, - size.width * 0.2123961, - size.height * 0.8439153, - size.width * 0.2105064, - size.height * 0.8427816); + size.width * 0.2135299, + size.height * 0.8458050, + size.width * 0.2123961, + size.height * 0.8439153, + size.width * 0.2105064, + size.height * 0.8427816, + ); path0.cubicTo( - size.width * 0.2074830, - size.height * 0.8408919, - size.width * 0.2040816, - size.height * 0.8401361, - size.width * 0.2003023, - size.height * 0.8401361); + size.width * 0.2074830, + size.height * 0.8408919, + size.width * 0.2040816, + size.height * 0.8401361, + size.width * 0.2003023, + size.height * 0.8401361, + ); path0.close(); path0.moveTo(size.width * 0.5816327, size.height * 0.8439153); path0.cubicTo( - size.width * 0.5782313, - size.height * 0.8439153, - size.width * 0.5752079, - size.height * 0.8446712, - size.width * 0.5721844, - size.height * 0.8450491); + size.width * 0.5782313, + size.height * 0.8439153, + size.width * 0.5752079, + size.height * 0.8446712, + size.width * 0.5721844, + size.height * 0.8450491, + ); path0.cubicTo( - size.width * 0.5691610, - size.height * 0.8458050, - size.width * 0.5661376, - size.height * 0.8465608, - size.width * 0.5646259, - size.height * 0.8495843); + size.width * 0.5691610, + size.height * 0.8458050, + size.width * 0.5661376, + size.height * 0.8465608, + size.width * 0.5646259, + size.height * 0.8495843, + ); path0.lineTo(size.width * 0.5661376, size.height * 0.8507181); path0.lineTo(size.width * 0.5714286, size.height * 0.8522298); path0.cubicTo( - size.width * 0.5752079, - size.height * 0.8533636, - size.width * 0.5789872, - size.height * 0.8537415, - size.width * 0.5827664, - size.height * 0.8533636); - path0.arcToPoint(Offset(size.width * 0.5903250, size.height * 0.8514739), - radius: Radius.elliptical( - size.width * 0.02267574, size.height * 0.02267574), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.5752079, + size.height * 0.8533636, + size.width * 0.5789872, + size.height * 0.8537415, + size.width * 0.5827664, + size.height * 0.8533636, + ); + path0.arcToPoint( + Offset(size.width * 0.5903250, size.height * 0.8514739), + radius: Radius.elliptical( + size.width * 0.02267574, + size.height * 0.02267574, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.5918367, - size.height * 0.8507181, - size.width * 0.5933485, - size.height * 0.8492063, - size.width * 0.5922147, - size.height * 0.8476946); + size.width * 0.5918367, + size.height * 0.8507181, + size.width * 0.5933485, + size.height * 0.8492063, + size.width * 0.5922147, + size.height * 0.8476946, + ); path0.cubicTo( - size.width * 0.5910809, - size.height * 0.8461829, - size.width * 0.5891912, - size.height * 0.8454271, - size.width * 0.5873016, - size.height * 0.8446712); + size.width * 0.5910809, + size.height * 0.8461829, + size.width * 0.5891912, + size.height * 0.8454271, + size.width * 0.5873016, + size.height * 0.8446712, + ); path0.cubicTo( - size.width * 0.5854119, - size.height * 0.8439153, - size.width * 0.5835223, - size.height * 0.8439153, - size.width * 0.5816327, - size.height * 0.8439153); + size.width * 0.5854119, + size.height * 0.8439153, + size.width * 0.5835223, + size.height * 0.8439153, + size.width * 0.5816327, + size.height * 0.8439153, + ); path0.close(); path0.moveTo(size.width * 0.7403628, size.height * 0.8492063); path0.cubicTo( - size.width * 0.7384732, - size.height * 0.8492063, - size.width * 0.7365835, - size.height * 0.8499622, - size.width * 0.7346939, - size.height * 0.8507181); + size.width * 0.7384732, + size.height * 0.8492063, + size.width * 0.7365835, + size.height * 0.8499622, + size.width * 0.7346939, + size.height * 0.8507181, + ); path0.cubicTo( - size.width * 0.7324263, - size.height * 0.8510960, - size.width * 0.7309146, - size.height * 0.8544974, - size.width * 0.7328042, - size.height * 0.8567649); + size.width * 0.7324263, + size.height * 0.8510960, + size.width * 0.7309146, + size.height * 0.8544974, + size.width * 0.7328042, + size.height * 0.8567649, + ); path0.cubicTo( - size.width * 0.7339380, - size.height * 0.8578987, - size.width * 0.7358277, - size.height * 0.8578987, - size.width * 0.7373394, - size.height * 0.8582766); + size.width * 0.7339380, + size.height * 0.8578987, + size.width * 0.7358277, + size.height * 0.8578987, + size.width * 0.7373394, + size.height * 0.8582766, + ); path0.cubicTo( - size.width * 0.7426304, - size.height * 0.8590325, - size.width * 0.7482993, - size.height * 0.8594104, - size.width * 0.7524565, - size.height * 0.8571429); + size.width * 0.7426304, + size.height * 0.8590325, + size.width * 0.7482993, + size.height * 0.8594104, + size.width * 0.7524565, + size.height * 0.8571429, + ); path0.cubicTo( - size.width * 0.7547241, - size.height * 0.8563870, - size.width * 0.7562358, - size.height * 0.8552532, - size.width * 0.7577475, - size.height * 0.8533636); + size.width * 0.7547241, + size.height * 0.8563870, + size.width * 0.7562358, + size.height * 0.8552532, + size.width * 0.7577475, + size.height * 0.8533636, + ); path0.cubicTo( - size.width * 0.7585034, - size.height * 0.8518519, - size.width * 0.7566138, - size.height * 0.8510960, - size.width * 0.7554800, - size.height * 0.8507181); + size.width * 0.7585034, + size.height * 0.8518519, + size.width * 0.7566138, + size.height * 0.8510960, + size.width * 0.7554800, + size.height * 0.8507181, + ); path0.lineTo(size.width * 0.7543462, size.height * 0.8507181); path0.lineTo(size.width * 0.7418745, size.height * 0.8492063); path0.lineTo(size.width * 0.7403628, size.height * 0.8492063); @@ -1122,35 +1314,39 @@ class StrayDeerPainter extends CustomPainter { path0.moveTo(size.width * 0.3287982, size.height * 0.8552532); path0.lineTo(size.width * 0.3208617, size.height * 0.8560091); path0.cubicTo( - size.width * 0.3159486, - size.height * 0.8567649, - size.width * 0.3117914, - size.height * 0.8586546, - size.width * 0.3087680, - size.height * 0.8620559); + size.width * 0.3159486, + size.height * 0.8567649, + size.width * 0.3117914, + size.height * 0.8586546, + size.width * 0.3087680, + size.height * 0.8620559, + ); path0.lineTo(size.width * 0.3087680, size.height * 0.8665911); path0.lineTo(size.width * 0.3140590, size.height * 0.8665911); path0.cubicTo( - size.width * 0.3208617, - size.height * 0.8650794, - size.width * 0.3276644, - size.height * 0.8647014, - size.width * 0.3340892, - size.height * 0.8624339); + size.width * 0.3208617, + size.height * 0.8650794, + size.width * 0.3276644, + size.height * 0.8647014, + size.width * 0.3340892, + size.height * 0.8624339, + ); path0.cubicTo( - size.width * 0.3356009, - size.height * 0.8616780, - size.width * 0.3378685, - size.height * 0.8609221, - size.width * 0.3378685, - size.height * 0.8590325); + size.width * 0.3356009, + size.height * 0.8616780, + size.width * 0.3378685, + size.height * 0.8609221, + size.width * 0.3378685, + size.height * 0.8590325, + ); path0.cubicTo( - size.width * 0.3382464, - size.height * 0.8571429, - size.width * 0.3359788, - size.height * 0.8560091, - size.width * 0.3340892, - size.height * 0.8556311); + size.width * 0.3382464, + size.height * 0.8571429, + size.width * 0.3359788, + size.height * 0.8560091, + size.width * 0.3340892, + size.height * 0.8556311, + ); path0.lineTo(size.width * 0.3287982, size.height * 0.8556311); path0.close(); path0.moveTo(size.width * 0.3083900, size.height * 0.8665911); @@ -1158,153 +1354,172 @@ class StrayDeerPainter extends CustomPainter { path0.close(); path0.moveTo(size.width * 0.4546485, size.height * 0.8601663); path0.cubicTo( - size.width * 0.4527589, - size.height * 0.8601663, - size.width * 0.4508692, - size.height * 0.8601663, - size.width * 0.4489796, - size.height * 0.8609221); + size.width * 0.4527589, + size.height * 0.8601663, + size.width * 0.4508692, + size.height * 0.8601663, + size.width * 0.4489796, + size.height * 0.8609221, + ); path0.cubicTo( - size.width * 0.4463341, - size.height * 0.8616780, - size.width * 0.4436886, - size.height * 0.8631897, - size.width * 0.4433107, - size.height * 0.8658352); + size.width * 0.4463341, + size.height * 0.8616780, + size.width * 0.4436886, + size.height * 0.8631897, + size.width * 0.4433107, + size.height * 0.8658352, + ); path0.lineTo(size.width * 0.4444444, size.height * 0.8684807); path0.lineTo(size.width * 0.4493575, size.height * 0.8688587); path0.cubicTo( - size.width * 0.4542706, - size.height * 0.8696145, - size.width * 0.4591837, - size.height * 0.8696145, - size.width * 0.4640967, - size.height * 0.8688587); + size.width * 0.4542706, + size.height * 0.8696145, + size.width * 0.4591837, + size.height * 0.8696145, + size.width * 0.4640967, + size.height * 0.8688587, + ); path0.cubicTo( - size.width * 0.4659864, - size.height * 0.8688587, - size.width * 0.4678760, - size.height * 0.8681028, - size.width * 0.4693878, - size.height * 0.8662132); + size.width * 0.4659864, + size.height * 0.8688587, + size.width * 0.4678760, + size.height * 0.8681028, + size.width * 0.4693878, + size.height * 0.8662132, + ); path0.cubicTo( - size.width * 0.4701436, - size.height * 0.8650794, - size.width * 0.4708995, - size.height * 0.8631897, - size.width * 0.4693878, - size.height * 0.8624339); + size.width * 0.4701436, + size.height * 0.8650794, + size.width * 0.4708995, + size.height * 0.8631897, + size.width * 0.4693878, + size.height * 0.8624339, + ); path0.cubicTo( - size.width * 0.4671202, - size.height * 0.8613001, - size.width * 0.4644747, - size.height * 0.8613001, - size.width * 0.4618292, - size.height * 0.8609221); + size.width * 0.4671202, + size.height * 0.8613001, + size.width * 0.4644747, + size.height * 0.8613001, + size.width * 0.4618292, + size.height * 0.8609221, + ); path0.lineTo(size.width * 0.4542706, size.height * 0.8601663); path0.close(); path0.moveTo(size.width * 0.2301587, size.height * 0.8654573); path0.lineTo(size.width * 0.2290249, size.height * 0.8654573); path0.cubicTo( - size.width * 0.2260015, - size.height * 0.8654573, - size.width * 0.2233560, - size.height * 0.8665911, - size.width * 0.2207105, - size.height * 0.8677249); + size.width * 0.2260015, + size.height * 0.8654573, + size.width * 0.2233560, + size.height * 0.8665911, + size.width * 0.2207105, + size.height * 0.8677249, + ); path0.cubicTo( - size.width * 0.2199546, - size.height * 0.8677249, - size.width * 0.2191988, - size.height * 0.8681028, - size.width * 0.2207105, - size.height * 0.8677249); + size.width * 0.2199546, + size.height * 0.8677249, + size.width * 0.2191988, + size.height * 0.8681028, + size.width * 0.2207105, + size.height * 0.8677249, + ); path0.lineTo(size.width * 0.2169312, size.height * 0.8722600); path0.cubicTo( - size.width * 0.2184429, - size.height * 0.8749055, - size.width * 0.2214664, - size.height * 0.8760393, - size.width * 0.2241119, - size.height * 0.8760393); + size.width * 0.2184429, + size.height * 0.8749055, + size.width * 0.2214664, + size.height * 0.8760393, + size.width * 0.2241119, + size.height * 0.8760393, + ); path0.cubicTo( - size.width * 0.2297808, - size.height * 0.8779289, - size.width * 0.2358277, - size.height * 0.8786848, - size.width * 0.2414966, - size.height * 0.8771731); + size.width * 0.2297808, + size.height * 0.8779289, + size.width * 0.2358277, + size.height * 0.8786848, + size.width * 0.2414966, + size.height * 0.8771731, + ); path0.cubicTo( - size.width * 0.2437642, - size.height * 0.8767952, - size.width * 0.2460317, - size.height * 0.8764172, - size.width * 0.2467876, - size.height * 0.8745276); + size.width * 0.2437642, + size.height * 0.8767952, + size.width * 0.2460317, + size.height * 0.8764172, + size.width * 0.2467876, + size.height * 0.8745276, + ); path0.cubicTo( - size.width * 0.2479214, - size.height * 0.8726379, - size.width * 0.2460317, - size.height * 0.8711262, - size.width * 0.2448980, - size.height * 0.8699924); + size.width * 0.2479214, + size.height * 0.8726379, + size.width * 0.2460317, + size.height * 0.8711262, + size.width * 0.2448980, + size.height * 0.8699924, + ); path0.cubicTo( - size.width * 0.2411187, - size.height * 0.8662132, - size.width * 0.2354497, - size.height * 0.8654573, - size.width * 0.2297808, - size.height * 0.8654573); + size.width * 0.2411187, + size.height * 0.8662132, + size.width * 0.2354497, + size.height * 0.8654573, + size.width * 0.2297808, + size.height * 0.8654573, + ); path0.close(); path0.moveTo(size.width * 0.6326531, size.height * 0.8730159); path0.lineTo(size.width * 0.6239607, size.height * 0.8741497); path0.cubicTo( - size.width * 0.6201814, - size.height * 0.8749055, - size.width * 0.6160242, - size.height * 0.8760393, - size.width * 0.6126228, - size.height * 0.8790627); + size.width * 0.6201814, + size.height * 0.8749055, + size.width * 0.6160242, + size.height * 0.8760393, + size.width * 0.6126228, + size.height * 0.8790627, + ); path0.lineTo(size.width * 0.6137566, size.height * 0.8828420); path0.lineTo(size.width * 0.6190476, size.height * 0.8839758); path0.lineTo(size.width * 0.6292517, size.height * 0.8843537); path0.cubicTo( - size.width * 0.6337868, - size.height * 0.8843537, - size.width * 0.6386999, - size.height * 0.8839758, - size.width * 0.6417234, - size.height * 0.8805745); + size.width * 0.6337868, + size.height * 0.8843537, + size.width * 0.6386999, + size.height * 0.8839758, + size.width * 0.6417234, + size.height * 0.8805745, + ); path0.cubicTo( - size.width * 0.6428571, - size.height * 0.8798186, - size.width * 0.6439909, - size.height * 0.8783069, - size.width * 0.6436130, - size.height * 0.8767952); + size.width * 0.6428571, + size.height * 0.8798186, + size.width * 0.6439909, + size.height * 0.8783069, + size.width * 0.6436130, + size.height * 0.8767952, + ); path0.cubicTo( - size.width * 0.6428571, - size.height * 0.8749055, - size.width * 0.6402116, - size.height * 0.8749055, - size.width * 0.6386999, - size.height * 0.8741497); + size.width * 0.6428571, + size.height * 0.8749055, + size.width * 0.6402116, + size.height * 0.8749055, + size.width * 0.6386999, + size.height * 0.8741497, + ); path0.cubicTo( - size.width * 0.6368103, - size.height * 0.8733938, - size.width * 0.6349206, - size.height * 0.8733938, - size.width * 0.6326531, - size.height * 0.8733938); + size.width * 0.6368103, + size.height * 0.8733938, + size.width * 0.6349206, + size.height * 0.8733938, + size.width * 0.6326531, + size.height * 0.8733938, + ); path0.close(); path0.moveTo(size.width * 0.6137566, size.height * 0.8832200); path0.cubicTo( - size.width * 0.6137566, - size.height * 0.8832200, - size.width * 0.6137566, - size.height * 0.8832200, - size.width * 0.6137566, - size.height * 0.8832200); + size.width * 0.6137566, + size.height * 0.8832200, + size.width * 0.6137566, + size.height * 0.8832200, + size.width * 0.6137566, + size.height * 0.8832200, + ); path0.lineTo(size.width * 0.6137566, size.height * 0.8832200); path0.close(); path0.moveTo(size.width * 0.6791383, size.height * 0.8783069); @@ -1313,12 +1528,13 @@ class StrayDeerPainter extends CustomPainter { path0.close(); path0.moveTo(size.width * 0.6798942, size.height * 0.8794407); path0.cubicTo( - size.width * 0.6814059, - size.height * 0.8813303, - size.width * 0.6825397, - size.height * 0.8835979, - size.width * 0.6844293, - size.height * 0.8851096); + size.width * 0.6814059, + size.height * 0.8813303, + size.width * 0.6825397, + size.height * 0.8835979, + size.width * 0.6844293, + size.height * 0.8851096, + ); path0.lineTo(size.width * 0.6851852, size.height * 0.8858655); path0.close(); path0.moveTo(size.width * 0.6689342, size.height * 0.8801965); @@ -1327,106 +1543,129 @@ class StrayDeerPainter extends CustomPainter { path0.close(); path0.moveTo(size.width * 0.3556311, size.height * 0.8801965); path0.cubicTo( - size.width * 0.3529856, - size.height * 0.8801965, - size.width * 0.3503401, - size.height * 0.8805745, - size.width * 0.3480726, - size.height * 0.8820862); + size.width * 0.3529856, + size.height * 0.8801965, + size.width * 0.3503401, + size.height * 0.8805745, + size.width * 0.3480726, + size.height * 0.8820862, + ); path0.cubicTo( - size.width * 0.3473167, - size.height * 0.8828420, - size.width * 0.3461829, - size.height * 0.8835979, - size.width * 0.3458050, - size.height * 0.8847317); + size.width * 0.3473167, + size.height * 0.8828420, + size.width * 0.3461829, + size.height * 0.8835979, + size.width * 0.3458050, + size.height * 0.8847317, + ); path0.lineTo(size.width * 0.3427816, size.height * 0.8862434); - path0.arcToPoint(Offset(size.width * 0.3616780, size.height * 0.8938020), - radius: Radius.elliptical( - size.width * 0.03590325, size.height * 0.03590325), - rotation: 0, - largeArc: false, - clockwise: false); + path0.arcToPoint( + Offset(size.width * 0.3616780, size.height * 0.8938020), + radius: Radius.elliptical( + size.width * 0.03590325, + size.height * 0.03590325, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.3654573, - size.height * 0.8945578, - size.width * 0.3692366, - size.height * 0.8956916, - size.width * 0.3730159, - size.height * 0.8938020); + size.width * 0.3654573, + size.height * 0.8945578, + size.width * 0.3692366, + size.height * 0.8956916, + size.width * 0.3730159, + size.height * 0.8938020, + ); path0.cubicTo( - size.width * 0.3745276, - size.height * 0.8926682, - size.width * 0.3775510, - size.height * 0.8915344, - size.width * 0.3771731, - size.height * 0.8892668); + size.width * 0.3745276, + size.height * 0.8926682, + size.width * 0.3775510, + size.height * 0.8915344, + size.width * 0.3771731, + size.height * 0.8892668, + ); path0.cubicTo( - size.width * 0.3771731, - size.height * 0.8869992, - size.width * 0.3749055, - size.height * 0.8854875, - size.width * 0.3733938, - size.height * 0.8847317); - path0.arcToPoint(Offset(size.width * 0.3556311, size.height * 0.8801965), - radius: Radius.elliptical( - size.width * 0.03476946, size.height * 0.03476946), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.3771731, + size.height * 0.8869992, + size.width * 0.3749055, + size.height * 0.8854875, + size.width * 0.3733938, + size.height * 0.8847317, + ); + path0.arcToPoint( + Offset(size.width * 0.3556311, size.height * 0.8801965), + radius: Radius.elliptical( + size.width * 0.03476946, + size.height * 0.03476946, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.close(); path0.moveTo(size.width * 0.4962207, size.height * 0.8832200); path0.lineTo(size.width * 0.4913076, size.height * 0.8835979); path0.cubicTo( - size.width * 0.4894180, - size.height * 0.8839758, - size.width * 0.4871504, - size.height * 0.8854875, - size.width * 0.4867725, - size.height * 0.8877551); + size.width * 0.4894180, + size.height * 0.8839758, + size.width * 0.4871504, + size.height * 0.8854875, + size.width * 0.4867725, + size.height * 0.8877551, + ); path0.lineTo(size.width * 0.4875283, size.height * 0.8896447); path0.lineTo(size.width * 0.4871504, size.height * 0.8900227); path0.cubicTo( - size.width * 0.4867725, - size.height * 0.8915344, - size.width * 0.4894180, - size.height * 0.8919123, - size.width * 0.4909297, - size.height * 0.8926682); - path0.arcToPoint(Offset(size.width * 0.5045351, size.height * 0.8964475), - radius: Radius.elliptical( - size.width * 0.03401361, size.height * 0.03401361), - rotation: 0, - largeArc: false, - clockwise: false); + size.width * 0.4867725, + size.height * 0.8915344, + size.width * 0.4894180, + size.height * 0.8919123, + size.width * 0.4909297, + size.height * 0.8926682, + ); + path0.arcToPoint( + Offset(size.width * 0.5045351, size.height * 0.8964475), + radius: Radius.elliptical( + size.width * 0.03401361, + size.height * 0.03401361, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path0.cubicTo( - size.width * 0.5079365, - size.height * 0.8964475, - size.width * 0.5117158, - size.height * 0.8964475, - size.width * 0.5143613, - size.height * 0.8945578); + size.width * 0.5079365, + size.height * 0.8964475, + size.width * 0.5117158, + size.height * 0.8964475, + size.width * 0.5143613, + size.height * 0.8945578, + ); path0.cubicTo( - size.width * 0.5158730, - size.height * 0.8934240, - size.width * 0.5173847, - size.height * 0.8907785, - size.width * 0.5154951, - size.height * 0.8892668); + size.width * 0.5158730, + size.height * 0.8934240, + size.width * 0.5173847, + size.height * 0.8907785, + size.width * 0.5154951, + size.height * 0.8892668, + ); path0.cubicTo( - size.width * 0.5128496, - size.height * 0.8873772, - size.width * 0.5098262, - size.height * 0.8862434, - size.width * 0.5064248, - size.height * 0.8851096); + size.width * 0.5128496, + size.height * 0.8873772, + size.width * 0.5098262, + size.height * 0.8862434, + size.width * 0.5064248, + size.height * 0.8851096, + ); path0.cubicTo( - size.width * 0.5034014, - size.height * 0.8839758, - size.width * 0.4996221, - size.height * 0.8832200, - size.width * 0.4962207, - size.height * 0.8832200); + size.width * 0.5034014, + size.height * 0.8839758, + size.width * 0.4996221, + size.height * 0.8832200, + size.width * 0.4962207, + size.height * 0.8832200, + ); path0.close(); path0.moveTo(size.width * 0.6746032, size.height * 0.8858655); path0.lineTo(size.width * 0.6749811, size.height * 0.8866213); @@ -1443,219 +1682,249 @@ class StrayDeerPainter extends CustomPainter { final Path path_1 = Path(); path_1.moveTo(size.width * 0.3605442, size.height * 0.4489796); path_1.cubicTo( - size.width * 0.3594104, - size.height * 0.4667423, - size.width * 0.3439153, - size.height * 0.4690098, - size.width * 0.3367347, - size.height * 0.4708995); + size.width * 0.3594104, + size.height * 0.4667423, + size.width * 0.3439153, + size.height * 0.4690098, + size.width * 0.3367347, + size.height * 0.4708995, + ); path_1.cubicTo( - size.width * 0.3227513, - size.height * 0.4232804, - size.width * 0.3053666, - size.height * 0.4395314, - size.width * 0.3193500, - size.height * 0.4765684); + size.width * 0.3227513, + size.height * 0.4232804, + size.width * 0.3053666, + size.height * 0.4395314, + size.width * 0.3193500, + size.height * 0.4765684, + ); path_1.cubicTo( - size.width * 0.3072562, - size.height * 0.4811036, - size.width * 0.2800454, - size.height * 0.4882842, - size.width * 0.2702192, - size.height * 0.4916856); + size.width * 0.3072562, + size.height * 0.4811036, + size.width * 0.2800454, + size.height * 0.4882842, + size.width * 0.2702192, + size.height * 0.4916856, + ); path_1.cubicTo( - size.width * 0.2653061, - size.height * 0.4848828, - size.width * 0.2426304, - size.height * 0.4622071, - size.width * 0.2195767, - size.height * 0.4656085); + size.width * 0.2653061, + size.height * 0.4848828, + size.width * 0.2426304, + size.height * 0.4622071, + size.width * 0.2195767, + size.height * 0.4656085, + ); path_1.cubicTo( - size.width * 0.2044596, - size.height * 0.4640967, - size.width * 0.1836735, - size.height * 0.4648526, - size.width * 0.1855631, - size.height * 0.4754346); + size.width * 0.2044596, + size.height * 0.4640967, + size.width * 0.1836735, + size.height * 0.4648526, + size.width * 0.1855631, + size.height * 0.4754346, + ); path_1.cubicTo( - size.width * 0.1965231, - size.height * 0.4863946, - size.width * 0.1825397, - size.height * 0.4962207, - size.width * 0.1885865, - size.height * 0.4965986); + size.width * 0.1965231, + size.height * 0.4863946, + size.width * 0.1825397, + size.height * 0.4962207, + size.width * 0.1885865, + size.height * 0.4965986, + ); path_1.cubicTo( - size.width * 0.1613757, - size.height * 0.5086924, - size.width * 0.1545729, - size.height * 0.4523810, - size.width * 0.1405896, - size.height * 0.4523810); + size.width * 0.1613757, + size.height * 0.5086924, + size.width * 0.1545729, + size.height * 0.4523810, + size.width * 0.1405896, + size.height * 0.4523810, + ); path_1.cubicTo( - size.width * 0.1315193, - size.height * 0.4572940, - size.width * 0.1462585, - size.height * 0.4973545, - size.width * 0.1311413, - size.height * 0.4807256); + size.width * 0.1315193, + size.height * 0.4572940, + size.width * 0.1462585, + size.height * 0.4973545, + size.width * 0.1311413, + size.height * 0.4807256, + ); path_1.cubicTo( - size.width * 0.1164021, - size.height * 0.4769463, - size.width * 0.1148904, - size.height * 0.4331066, - size.width * 0.09977324, - size.height * 0.4452003); + size.width * 0.1164021, + size.height * 0.4769463, + size.width * 0.1148904, + size.height * 0.4331066, + size.width * 0.09977324, + size.height * 0.4452003, + ); path_1.cubicTo( - size.width * 0.09599395, - size.height * 0.4656085, - size.width * 0.1095994, - size.height * 0.4867725, - size.width * 0.1239607, - size.height * 0.5003779); + size.width * 0.09599395, + size.height * 0.4656085, + size.width * 0.1095994, + size.height * 0.4867725, + size.width * 0.1239607, + size.height * 0.5003779, + ); path_1.cubicTo( - size.width * 0.1409675, - size.height * 0.5162509, - size.width * 0.1678005, - size.height * 0.5060469, - size.width * 0.1844293, - size.height * 0.5192744); + size.width * 0.1409675, + size.height * 0.5162509, + size.width * 0.1678005, + size.height * 0.5060469, + size.width * 0.1844293, + size.height * 0.5192744, + ); path_1.cubicTo( - size.width * 0.1825397, - size.height * 0.5347695, - size.width * 0.2014361, - size.height * 0.5495087, - size.width * 0.1908541, - size.height * 0.5650038); + size.width * 0.1825397, + size.height * 0.5347695, + size.width * 0.2014361, + size.height * 0.5495087, + size.width * 0.1908541, + size.height * 0.5650038, + ); path_1.cubicTo( - size.width * 0.1870748, - size.height * 0.5740741, - size.width * 0.1825397, - size.height * 0.5831444, - size.width * 0.1961451, - size.height * 0.5831444); + size.width * 0.1870748, + size.height * 0.5740741, + size.width * 0.1825397, + size.height * 0.5831444, + size.width * 0.1961451, + size.height * 0.5831444, + ); path_1.cubicTo( - size.width * 0.2082389, - size.height * 0.5914588, - size.width * 0.2278912, - size.height * 0.5922147, - size.width * 0.2377173, - size.height * 0.5967498); + size.width * 0.2082389, + size.height * 0.5914588, + size.width * 0.2278912, + size.height * 0.5922147, + size.width * 0.2377173, + size.height * 0.5967498, + ); path_1.cubicTo( - size.width * 0.2460317, - size.height * 0.6107332, - size.width * 0.2728647, - size.height * 0.6148904, - size.width * 0.2626606, - size.height * 0.6360544); + size.width * 0.2460317, + size.height * 0.6107332, + size.width * 0.2728647, + size.height * 0.6148904, + size.width * 0.2626606, + size.height * 0.6360544, + ); path_1.lineTo(size.width * 0.2539683, size.height * 0.7324263); path_1.cubicTo( - size.width * 0.2743764, - size.height * 0.7384732, - size.width * 0.2811791, - size.height * 0.7150416, - size.width * 0.2834467, - size.height * 0.6999244); + size.width * 0.2743764, + size.height * 0.7384732, + size.width * 0.2811791, + size.height * 0.7150416, + size.width * 0.2834467, + size.height * 0.6999244, + ); path_1.cubicTo( - size.width * 0.2860922, - size.height * 0.6900983, - size.width * 0.2879819, - size.height * 0.6651550, - size.width * 0.2966742, - size.height * 0.6662887); + size.width * 0.2860922, + size.height * 0.6900983, + size.width * 0.2879819, + size.height * 0.6651550, + size.width * 0.2966742, + size.height * 0.6662887, + ); path_1.cubicTo( - size.width * 0.3053666, - size.height * 0.6787604, - size.width * 0.3042328, - size.height * 0.7154195, - size.width * 0.3257748, - size.height * 0.7067271); + size.width * 0.3053666, + size.height * 0.6787604, + size.width * 0.3042328, + size.height * 0.7154195, + size.width * 0.3257748, + size.height * 0.7067271, + ); path_1.cubicTo( - size.width * 0.3446712, - size.height * 0.6972789, - size.width * 0.3253968, - size.height * 0.6757370, - size.width * 0.3257748, - size.height * 0.6602419); + size.width * 0.3446712, + size.height * 0.6972789, + size.width * 0.3253968, + size.height * 0.6757370, + size.width * 0.3257748, + size.height * 0.6602419, + ); path_1.lineTo(size.width * 0.3125472, size.height * 0.6024187); path_1.lineTo(size.width * 0.4070295, size.height * 0.6024187); path_1.cubicTo( - size.width * 0.4085412, - size.height * 0.6364324, - size.width * 0.4089191, - size.height * 0.6734694, - size.width * 0.4104308, - size.height * 0.7071051); + size.width * 0.4085412, + size.height * 0.6364324, + size.width * 0.4089191, + size.height * 0.6734694, + size.width * 0.4104308, + size.height * 0.7071051, + ); path_1.cubicTo( - size.width * 0.4323507, - size.height * 0.7142857, - size.width * 0.4436886, - size.height * 0.6874528, - size.width * 0.4410431, - size.height * 0.6693122); + size.width * 0.4323507, + size.height * 0.7142857, + size.width * 0.4436886, + size.height * 0.6874528, + size.width * 0.4410431, + size.height * 0.6693122, + ); path_1.lineTo(size.width * 0.4470899, size.height * 0.6277400); path_1.cubicTo( - size.width * 0.4569161, - size.height * 0.6466364, - size.width * 0.4557823, - size.height * 0.6712018, - size.width * 0.4720333, - size.height * 0.6863190); + size.width * 0.4569161, + size.height * 0.6466364, + size.width * 0.4557823, + size.height * 0.6712018, + size.width * 0.4720333, + size.height * 0.6863190, + ); path_1.cubicTo( - size.width * 0.4939531, - size.height * 0.6832955, - size.width * 0.4890401, - size.height * 0.6693122, - size.width * 0.4833711, - size.height * 0.6428571); + size.width * 0.4939531, + size.height * 0.6832955, + size.width * 0.4890401, + size.height * 0.6693122, + size.width * 0.4833711, + size.height * 0.6428571, + ); path_1.cubicTo( - size.width * 0.4803477, - size.height * 0.6050642, - size.width * 0.4708995, - size.height * 0.5684051, - size.width * 0.4618292, - size.height * 0.5321240); + size.width * 0.4803477, + size.height * 0.6050642, + size.width * 0.4708995, + size.height * 0.5684051, + size.width * 0.4618292, + size.height * 0.5321240, + ); path_1.cubicTo( - size.width * 0.4792139, - size.height * 0.5192744, - size.width * 0.4811036, - size.height * 0.4943311, - size.width * 0.4693878, - size.height * 0.4773243); + size.width * 0.4792139, + size.height * 0.5192744, + size.width * 0.4811036, + size.height * 0.4943311, + size.width * 0.4693878, + size.height * 0.4773243, + ); path_1.cubicTo( - size.width * 0.4576720, - size.height * 0.4546485, - size.width * 0.4455782, - size.height * 0.4848828, - size.width * 0.4467120, - size.height * 0.4977324); + size.width * 0.4576720, + size.height * 0.4546485, + size.width * 0.4455782, + size.height * 0.4848828, + size.width * 0.4467120, + size.height * 0.4977324, + ); path_1.cubicTo( - size.width * 0.4489796, - size.height * 0.5211640, - size.width * 0.4202570, - size.height * 0.5000000, - size.width * 0.4070295, - size.height * 0.5011338); + size.width * 0.4489796, + size.height * 0.5211640, + size.width * 0.4202570, + size.height * 0.5000000, + size.width * 0.4070295, + size.height * 0.5011338, + ); path_1.cubicTo( - size.width * 0.3941799, - size.height * 0.4973545, - size.width * 0.3556311, - size.height * 0.4890401, - size.width * 0.3537415, - size.height * 0.4848828); + size.width * 0.3941799, + size.height * 0.4973545, + size.width * 0.3556311, + size.height * 0.4890401, + size.width * 0.3537415, + size.height * 0.4848828, + ); path_1.cubicTo( - size.width * 0.3813303, - size.height * 0.4716553, - size.width * 0.3854875, - size.height * 0.4648526, - size.width * 0.3771731, - size.height * 0.4402872); + size.width * 0.3813303, + size.height * 0.4716553, + size.width * 0.3854875, + size.height * 0.4648526, + size.width * 0.3771731, + size.height * 0.4402872, + ); path_1.cubicTo( - size.width * 0.3654573, - size.height * 0.3873772, - size.width * 0.3439153, - size.height * 0.4021164, - size.width * 0.3605442, - size.height * 0.4489796); + size.width * 0.3654573, + size.height * 0.3873772, + size.width * 0.3439153, + size.height * 0.4021164, + size.width * 0.3605442, + size.height * 0.4489796, + ); path_1.close(); final Paint paint1Fill = Paint()..style = PaintingStyle.fill; @@ -1666,78 +1935,91 @@ class StrayDeerPainter extends CustomPainter { path_2.moveTo(size.width * 0.3624339, size.height * 0.4818594); path_2.lineTo(size.width * 0.3492063, size.height * 0.4882842); path_2.cubicTo( - size.width * 0.3616780, - size.height * 0.4886621, - size.width * 0.3775510, - size.height * 0.5090703, - size.width * 0.3760393, - size.height * 0.5192744); + size.width * 0.3616780, + size.height * 0.4886621, + size.width * 0.3775510, + size.height * 0.5090703, + size.width * 0.3760393, + size.height * 0.5192744, + ); path_2.cubicTo( - size.width * 0.3548753, - size.height * 0.5222978, - size.width * 0.3325775, - size.height * 0.5283447, - size.width * 0.3178382, - size.height * 0.5241875); + size.width * 0.3548753, + size.height * 0.5222978, + size.width * 0.3325775, + size.height * 0.5283447, + size.width * 0.3178382, + size.height * 0.5241875, + ); path_2.lineTo(size.width * 0.3114135, size.height * 0.5003779); path_2.cubicTo( - size.width * 0.3076342, - size.height * 0.5011338, - size.width * 0.2944067, - size.height * 0.4992441, - size.width * 0.2981859, - size.height * 0.5064248); + size.width * 0.3076342, + size.height * 0.5011338, + size.width * 0.2944067, + size.height * 0.4992441, + size.width * 0.2981859, + size.height * 0.5064248, + ); path_2.lineTo(size.width * 0.3057445, size.height * 0.5253212); - path_2.arcToPoint(Offset(size.width * 0.2970522, size.height * 0.5423280), - radius: Radius.elliptical( - size.width * 0.01360544, size.height * 0.01360544), - rotation: 0, - largeArc: false, - clockwise: false); + path_2.arcToPoint( + Offset(size.width * 0.2970522, size.height * 0.5423280), + radius: Radius.elliptical( + size.width * 0.01360544, + size.height * 0.01360544, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path_2.cubicTo( - size.width * 0.3004535, - size.height * 0.5748299, - size.width * 0.2898715, - size.height * 0.6345427, - size.width * 0.3393802, - size.height * 0.6194255); + size.width * 0.3004535, + size.height * 0.5748299, + size.width * 0.2898715, + size.height * 0.6345427, + size.width * 0.3393802, + size.height * 0.6194255, + ); path_2.lineTo(size.width * 0.4168556, size.height * 0.6054422); path_2.lineTo(size.width * 0.4259259, size.height * 0.5952381); path_2.cubicTo( - size.width * 0.4229025, - size.height * 0.5718065, - size.width * 0.4236584, - size.height * 0.5623583, - size.width * 0.4202570, - size.height * 0.5385488); + size.width * 0.4229025, + size.height * 0.5718065, + size.width * 0.4236584, + size.height * 0.5623583, + size.width * 0.4202570, + size.height * 0.5385488, + ); path_2.cubicTo( - size.width * 0.4179894, - size.height * 0.5306122, - size.width * 0.4115646, - size.height * 0.5166289, - size.width * 0.4036281, - size.height * 0.5185185); + size.width * 0.4179894, + size.height * 0.5306122, + size.width * 0.4115646, + size.height * 0.5166289, + size.width * 0.4036281, + size.height * 0.5185185, + ); path_2.cubicTo( - size.width * 0.3998488, - size.height * 0.5177627, - size.width * 0.3956916, - size.height * 0.5177627, - size.width * 0.3915344, - size.height * 0.5177627); + size.width * 0.3998488, + size.height * 0.5177627, + size.width * 0.3956916, + size.height * 0.5177627, + size.width * 0.3915344, + size.height * 0.5177627, + ); path_2.cubicTo( - size.width * 0.3885110, - size.height * 0.5068027, - size.width * 0.3862434, - size.height * 0.4920635, - size.width * 0.3794407, - size.height * 0.4882842); + size.width * 0.3885110, + size.height * 0.5068027, + size.width * 0.3862434, + size.height * 0.4920635, + size.width * 0.3794407, + size.height * 0.4882842, + ); path_2.cubicTo( - size.width * 0.3771731, - size.height * 0.4867725, - size.width * 0.3643235, - size.height * 0.4837491, - size.width * 0.3624339, - size.height * 0.4818594); + size.width * 0.3771731, + size.height * 0.4867725, + size.width * 0.3643235, + size.height * 0.4837491, + size.width * 0.3624339, + size.height * 0.4818594, + ); path_2.close(); final Paint paint2Fill = Paint()..style = PaintingStyle.fill; @@ -1747,28 +2029,34 @@ class StrayDeerPainter extends CustomPainter { final Path path3 = Path(); path3.moveTo(size.width * 0.2872260, size.height * 0.8212396); path3.cubicTo( - size.width * 0.2917611, - size.height * 0.8193500, - size.width * 0.2966742, - size.height * 0.8189720, - size.width * 0.3015873, - size.height * 0.8201058); + size.width * 0.2917611, + size.height * 0.8193500, + size.width * 0.2966742, + size.height * 0.8189720, + size.width * 0.3015873, + size.height * 0.8201058, + ); path3.lineTo(size.width * 0.3091459, size.height * 0.8219955); path3.moveTo(size.width * 0.3212396, size.height * 0.8072562); - path3.arcToPoint(Offset(size.width * 0.3696145, size.height * 0.8174603), - radius: Radius.elliptical( - size.width * 0.09070295, size.height * 0.09070295), - rotation: 0, - largeArc: false, - clockwise: true); + path3.arcToPoint( + Offset(size.width * 0.3696145, size.height * 0.8174603), + radius: Radius.elliptical( + size.width * 0.09070295, + size.height * 0.09070295, + ), + rotation: 0, + largeArc: false, + clockwise: true, + ); path3.moveTo(size.width * 0.3624339, size.height * 0.8034769); path3.cubicTo( - size.width * 0.3673469, - size.height * 0.8049887, - size.width * 0.3722600, - size.height * 0.8065004, - size.width * 0.3764172, - size.height * 0.8099017); + size.width * 0.3673469, + size.height * 0.8049887, + size.width * 0.3722600, + size.height * 0.8065004, + size.width * 0.3764172, + size.height * 0.8099017, + ); path3.lineTo(size.width * 0.3813303, size.height * 0.8136810); final Paint paint3Stroke = Paint() @@ -1781,12 +2069,16 @@ class StrayDeerPainter extends CustomPainter { final Path path4 = Path(); path4.moveTo(size.width * 0.2437642, size.height * 0.6077098); - path4.arcToPoint(Offset(size.width * 0.2634165, size.height * 0.6167800), - radius: Radius.elliptical( - size.width * 0.02947846, size.height * 0.02947846), - rotation: 0, - largeArc: false, - clockwise: false); + path4.arcToPoint( + Offset(size.width * 0.2634165, size.height * 0.6167800), + radius: Radius.elliptical( + size.width * 0.02947846, + size.height * 0.02947846, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); final Paint paint4Stroke = Paint() ..style = PaintingStyle.stroke @@ -1799,61 +2091,68 @@ class StrayDeerPainter extends CustomPainter { final Path path5 = Path(); path5.moveTo(size.width * 0.2653061, size.height * 0.6046863); path5.cubicTo( - size.width * 0.2603930, - size.height * 0.6455026, - size.width * 0.2551020, - size.height * 0.6878307, - size.width * 0.2524565, - size.height * 0.7282691); + size.width * 0.2603930, + size.height * 0.6455026, + size.width * 0.2551020, + size.height * 0.6878307, + size.width * 0.2524565, + size.height * 0.7282691, + ); path5.moveTo(size.width * 0.2464097, size.height * 0.7312925); path5.cubicTo( - size.width * 0.2569917, - size.height * 0.7369615, - size.width * 0.2671958, - size.height * 0.7339380, - size.width * 0.2773998, - size.height * 0.7305367); + size.width * 0.2569917, + size.height * 0.7369615, + size.width * 0.2671958, + size.height * 0.7339380, + size.width * 0.2773998, + size.height * 0.7305367, + ); path5.moveTo(size.width * 0.3053666, size.height * 0.6043084); path5.cubicTo( - size.width * 0.2978080, - size.height * 0.6356765, - size.width * 0.2928949, - size.height * 0.6972789, - size.width * 0.2751323, - size.height * 0.7244898); + size.width * 0.2978080, + size.height * 0.6356765, + size.width * 0.2928949, + size.height * 0.6972789, + size.width * 0.2751323, + size.height * 0.7244898, + ); path5.moveTo(size.width * 0.2974301, size.height * 0.6621315); path5.cubicTo( - size.width * 0.3004535, - size.height * 0.6734694, - size.width * 0.3034769, - size.height * 0.6851852, - size.width * 0.3087680, - size.height * 0.6961451); + size.width * 0.3004535, + size.height * 0.6734694, + size.width * 0.3034769, + size.height * 0.6851852, + size.width * 0.3087680, + size.height * 0.6961451, + ); path5.moveTo(size.width * 0.3117914, size.height * 0.7040816); path5.lineTo(size.width * 0.3136810, size.height * 0.7040816); path5.moveTo(size.width * 0.3121693, size.height * 0.7112623); path5.cubicTo( - size.width * 0.3182162, - size.height * 0.7120181, - size.width * 0.3219955, - size.height * 0.7093726, - size.width * 0.3280423, - size.height * 0.7082389); + size.width * 0.3182162, + size.height * 0.7120181, + size.width * 0.3219955, + size.height * 0.7093726, + size.width * 0.3280423, + size.height * 0.7082389, + ); path5.moveTo(size.width * 0.3185941, size.height * 0.6224490); path5.cubicTo( - size.width * 0.3201058, - size.height * 0.6269841, - size.width * 0.3204837, - size.height * 0.6318972, - size.width * 0.3216175, - size.height * 0.6364324); + size.width * 0.3201058, + size.height * 0.6269841, + size.width * 0.3204837, + size.height * 0.6318972, + size.width * 0.3216175, + size.height * 0.6364324, + ); path5.cubicTo( - size.width * 0.3253968, - size.height * 0.6523054, - size.width * 0.3284203, - size.height * 0.6678005, - size.width * 0.3306878, - size.height * 0.6836735); + size.width * 0.3253968, + size.height * 0.6523054, + size.width * 0.3284203, + size.height * 0.6678005, + size.width * 0.3306878, + size.height * 0.6836735, + ); path5.lineTo(size.width * 0.3321995, size.height * 0.7014361); final Paint paint5Stroke = Paint() @@ -1867,59 +2166,69 @@ class StrayDeerPainter extends CustomPainter { final Path path6 = Path(); path6.moveTo(size.width * 0.2362056, size.height * 0.5933485); path6.cubicTo( - size.width * 0.2467876, - size.height * 0.6050642, - size.width * 0.2675737, - size.height * 0.6073318, - size.width * 0.2815571, - size.height * 0.6009070); + size.width * 0.2467876, + size.height * 0.6050642, + size.width * 0.2675737, + size.height * 0.6073318, + size.width * 0.2815571, + size.height * 0.6009070, + ); path6.moveTo(size.width * 0.2165533, size.height * 0.5899471); path6.cubicTo( - size.width * 0.2392290, - size.height * 0.5967498, - size.width * 0.2543462, - size.height * 0.5793651, - size.width * 0.2641723, - size.height * 0.5612245); + size.width * 0.2392290, + size.height * 0.5967498, + size.width * 0.2543462, + size.height * 0.5793651, + size.width * 0.2641723, + size.height * 0.5612245, + ); path6.moveTo(size.width * 0.2033258, size.height * 0.5835223); path6.cubicTo( - size.width * 0.2071051, - size.height * 0.5884354, - size.width * 0.2120181, - size.height * 0.5891912, - size.width * 0.2169312, - size.height * 0.5861678); + size.width * 0.2071051, + size.height * 0.5884354, + size.width * 0.2120181, + size.height * 0.5891912, + size.width * 0.2169312, + size.height * 0.5861678, + ); path6.moveTo(size.width * 0.1965231, size.height * 0.5529101); path6.cubicTo( - size.width * 0.1965231, - size.height * 0.5551776, - size.width * 0.1840514, - size.height * 0.5680272, - size.width * 0.1870748, - size.height * 0.5774754); + size.width * 0.1965231, + size.height * 0.5551776, + size.width * 0.1840514, + size.height * 0.5680272, + size.width * 0.1870748, + size.height * 0.5774754, + ); path6.moveTo(size.width * 0.1987906, size.height * 0.5234316); path6.cubicTo( - size.width * 0.1987906, - size.height * 0.5287226, - size.width * 0.2037037, - size.height * 0.5415722, - size.width * 0.2089947, - size.height * 0.5479970); + size.width * 0.1987906, + size.height * 0.5287226, + size.width * 0.2037037, + size.height * 0.5415722, + size.width * 0.2089947, + size.height * 0.5479970, + ); path6.moveTo(size.width * 0.2256236, size.height * 0.5245654); - path6.arcToPoint(Offset(size.width * 0.2354497, size.height * 0.5483749), - radius: Radius.elliptical( - size.width * 0.05668934, size.height * 0.05668934), - rotation: 0, - largeArc: false, - clockwise: false); + path6.arcToPoint( + Offset(size.width * 0.2354497, size.height * 0.5483749), + radius: Radius.elliptical( + size.width * 0.05668934, + size.height * 0.05668934, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path6.moveTo(size.width * 0.1904762, size.height * 0.4947090); path6.cubicTo( - size.width * 0.1764928, - size.height * 0.5136054, - size.width * 0.1836735, - size.height * 0.5393046, - size.width * 0.1965231, - size.height * 0.5521542); + size.width * 0.1764928, + size.height * 0.5136054, + size.width * 0.1836735, + size.height * 0.5393046, + size.width * 0.1965231, + size.height * 0.5521542, + ); final Paint paint6Stroke = Paint() ..style = PaintingStyle.stroke @@ -1932,12 +2241,13 @@ class StrayDeerPainter extends CustomPainter { final Path path7 = Path(); path7.moveTo(size.width * 0.09826153, size.height * 0.4595616); path7.cubicTo( - size.width * 0.1046863, - size.height * 0.4935752, - size.width * 0.1337868, - size.height * 0.5117158, - size.width * 0.1825397, - size.height * 0.5124717); + size.width * 0.1046863, + size.height * 0.4935752, + size.width * 0.1337868, + size.height * 0.5117158, + size.width * 0.1825397, + size.height * 0.5124717, + ); final Paint paint7Stroke = Paint() ..style = PaintingStyle.stroke @@ -1950,50 +2260,56 @@ class StrayDeerPainter extends CustomPainter { final Path path8 = Path(); path8.moveTo(size.width * 0.09788360, size.height * 0.4546485); path8.cubicTo( - size.width * 0.09297052, - size.height * 0.4421769, - size.width * 0.1092215, - size.height * 0.4334845, - size.width * 0.1152683, - size.height * 0.4527589); + size.width * 0.09297052, + size.height * 0.4421769, + size.width * 0.1092215, + size.height * 0.4334845, + size.width * 0.1152683, + size.height * 0.4527589, + ); path8.cubicTo( - size.width * 0.1182918, - size.height * 0.4625850, - size.width * 0.1228269, - size.height * 0.4724112, - size.width * 0.1269841, - size.height * 0.4788360); + size.width * 0.1182918, + size.height * 0.4625850, + size.width * 0.1228269, + size.height * 0.4724112, + size.width * 0.1269841, + size.height * 0.4788360, + ); path8.moveTo(size.width * 0.1292517, size.height * 0.4811036); path8.cubicTo( - size.width * 0.1341648, - size.height * 0.4845049, - size.width * 0.1398337, - size.height * 0.4863946, - size.width * 0.1447468, - size.height * 0.4886621); + size.width * 0.1341648, + size.height * 0.4845049, + size.width * 0.1398337, + size.height * 0.4863946, + size.width * 0.1447468, + size.height * 0.4886621, + ); path8.moveTo(size.width * 0.1462585, size.height * 0.4894180); path8.cubicTo( - size.width * 0.1424792, - size.height * 0.4818594, - size.width * 0.1371882, - size.height * 0.4701436, - size.width * 0.1352986, - size.height * 0.4622071); + size.width * 0.1424792, + size.height * 0.4818594, + size.width * 0.1371882, + size.height * 0.4701436, + size.width * 0.1352986, + size.height * 0.4622071, + ); path8.cubicTo( - size.width * 0.1334089, - size.height * 0.4531368, - size.width * 0.1451247, - size.height * 0.4459562, - size.width * 0.1504157, - size.height * 0.4584278); + size.width * 0.1334089, + size.height * 0.4531368, + size.width * 0.1451247, + size.height * 0.4459562, + size.width * 0.1504157, + size.height * 0.4584278, + ); path8.moveTo(size.width * 0.1670446, size.height * 0.4935752); path8.cubicTo( - size.width * 0.1632653, - size.height * 0.4826153, - size.width * 0.1557067, - size.height * 0.4678760, - size.width * 0.1507937, - size.height * 0.4580499); + size.width * 0.1632653, + size.height * 0.4826153, + size.width * 0.1557067, + size.height * 0.4678760, + size.width * 0.1507937, + size.height * 0.4580499, + ); final Paint paint8Stroke = Paint() ..style = PaintingStyle.stroke @@ -2006,33 +2322,37 @@ class StrayDeerPainter extends CustomPainter { final Path path9 = Path(); path9.moveTo(size.width * 0.1957672, size.height * 0.4950869); path9.cubicTo( - size.width * 0.1719577, - size.height * 0.4977324, - size.width * 0.1938776, - size.height * 0.4818594, - size.width * 0.2071051, - size.height * 0.4829932); + size.width * 0.1719577, + size.height * 0.4977324, + size.width * 0.1938776, + size.height * 0.4818594, + size.width * 0.2071051, + size.height * 0.4829932, + ); path9.cubicTo( - size.width * 0.2021920, - size.height * 0.4818594, - size.width * 0.1882086, - size.height * 0.4829932, - size.width * 0.1851852, - size.height * 0.4773243); + size.width * 0.2021920, + size.height * 0.4818594, + size.width * 0.1882086, + size.height * 0.4829932, + size.width * 0.1851852, + size.height * 0.4773243, + ); path9.cubicTo( - size.width * 0.1814059, - size.height * 0.4697657, - size.width * 0.2116402, - size.height * 0.4671202, - size.width * 0.2161754, - size.height * 0.4663643); + size.width * 0.1814059, + size.height * 0.4697657, + size.width * 0.2116402, + size.height * 0.4671202, + size.width * 0.2161754, + size.height * 0.4663643, + ); path9.cubicTo( - size.width * 0.2422525, - size.height * 0.4629630, - size.width * 0.2630385, - size.height * 0.4754346, - size.width * 0.2690854, - size.height * 0.4905518); + size.width * 0.2422525, + size.height * 0.4629630, + size.width * 0.2630385, + size.height * 0.4754346, + size.width * 0.2690854, + size.height * 0.4905518, + ); final Paint paint9Stroke = Paint() ..style = PaintingStyle.stroke @@ -2045,93 +2365,104 @@ class StrayDeerPainter extends CustomPainter { final Path path10 = Path(); path10.moveTo(size.width * 0.2694633, size.height * 0.4935752); path10.cubicTo( - size.width * 0.2872260, - size.height * 0.4897959, - size.width * 0.2989418, - size.height * 0.4860166, - size.width * 0.3163265, - size.height * 0.4799698); + size.width * 0.2872260, + size.height * 0.4897959, + size.width * 0.2989418, + size.height * 0.4860166, + size.width * 0.3163265, + size.height * 0.4799698, + ); path10.moveTo(size.width * 0.2751323, size.height * 0.5105820); path10.cubicTo( - size.width * 0.2970522, - size.height * 0.5041572, - size.width * 0.3817082, - size.height * 0.4863946, - size.width * 0.3809524, - size.height * 0.4538927); + size.width * 0.2970522, + size.height * 0.5041572, + size.width * 0.3817082, + size.height * 0.4863946, + size.width * 0.3809524, + size.height * 0.4538927, + ); path10.moveTo(size.width * 0.3790627, size.height * 0.4459562); path10.cubicTo( - size.width * 0.3809524, - size.height * 0.4444444, - size.width * 0.3805745, - size.height * 0.4452003, - size.width * 0.3820862, - size.height * 0.4433107); + size.width * 0.3809524, + size.height * 0.4444444, + size.width * 0.3805745, + size.height * 0.4452003, + size.width * 0.3820862, + size.height * 0.4433107, + ); path10.moveTo(size.width * 0.3193500, size.height * 0.4773243); path10.cubicTo( - size.width * 0.3163265, - size.height * 0.4705215, - size.width * 0.3163265, - size.height * 0.4629630, - size.width * 0.3129252, - size.height * 0.4561602); + size.width * 0.3163265, + size.height * 0.4705215, + size.width * 0.3163265, + size.height * 0.4629630, + size.width * 0.3129252, + size.height * 0.4561602, + ); path10.moveTo(size.width * 0.3401361, size.height * 0.4705215); path10.cubicTo( - size.width * 0.3469388, - size.height * 0.4671202, - size.width * 0.3590325, - size.height * 0.4606954, - size.width * 0.3578987, - size.height * 0.4489796); + size.width * 0.3469388, + size.height * 0.4671202, + size.width * 0.3590325, + size.height * 0.4606954, + size.width * 0.3578987, + size.height * 0.4489796, + ); path10.moveTo(size.width * 0.3371126, size.height * 0.4693878); path10.cubicTo( - size.width * 0.3333333, - size.height * 0.4603175, - size.width * 0.3276644, - size.height * 0.4327286, - size.width * 0.3163265, - size.height * 0.4399093); + size.width * 0.3333333, + size.height * 0.4603175, + size.width * 0.3276644, + size.height * 0.4327286, + size.width * 0.3163265, + size.height * 0.4399093, + ); path10.cubicTo( - size.width * 0.3106576, - size.height * 0.4433107, - size.width * 0.3110355, - size.height * 0.4478458, - size.width * 0.3117914, - size.height * 0.4531368); + size.width * 0.3106576, + size.height * 0.4433107, + size.width * 0.3110355, + size.height * 0.4478458, + size.width * 0.3117914, + size.height * 0.4531368, + ); path10.moveTo(size.width * 0.4100529, size.height * 0.7093726); path10.cubicTo( - size.width * 0.4149660, - size.height * 0.7105064, - size.width * 0.4229025, - size.height * 0.7093726, - size.width * 0.4244142, - size.height * 0.7082389); + size.width * 0.4149660, + size.height * 0.7105064, + size.width * 0.4229025, + size.height * 0.7093726, + size.width * 0.4244142, + size.height * 0.7082389, + ); path10.moveTo(size.width * 0.4327286, size.height * 0.7048375); path10.lineTo(size.width * 0.4289494, size.height * 0.7010582); path10.moveTo(size.width * 0.4108088, size.height * 0.7010582); path10.cubicTo( - size.width * 0.4092971, - size.height * 0.6708239, - size.width * 0.4115646, - size.height * 0.6405896, - size.width * 0.4108088, - size.height * 0.6103553); + size.width * 0.4092971, + size.height * 0.6708239, + size.width * 0.4115646, + size.height * 0.6405896, + size.width * 0.4108088, + size.height * 0.6103553, + ); path10.moveTo(size.width * 0.4357521, size.height * 0.6965231); path10.cubicTo( - size.width * 0.4410431, - size.height * 0.6560847, - size.width * 0.4508692, - size.height * 0.6141345, - size.width * 0.4527589, - size.height * 0.5729403); + size.width * 0.4410431, + size.height * 0.6560847, + size.width * 0.4508692, + size.height * 0.6141345, + size.width * 0.4527589, + size.height * 0.5729403, + ); path10.moveTo(size.width * 0.4508692, size.height * 0.5672714); path10.cubicTo( - size.width * 0.4546485, - size.height * 0.5702948, - size.width * 0.4523810, - size.height * 0.5680272, - size.width * 0.4569161, - size.height * 0.5748299); + size.width * 0.4546485, + size.height * 0.5702948, + size.width * 0.4523810, + size.height * 0.5680272, + size.width * 0.4569161, + size.height * 0.5748299, + ); path10.moveTo(size.width * 0.4656085, size.height * 0.6855631); path10.lineTo(size.width * 0.4693878, size.height * 0.6817838); @@ -2146,34 +2477,42 @@ class StrayDeerPainter extends CustomPainter { final Path path11 = Path(); path11.moveTo(size.width * 0.4648526, size.height * 0.6753590); path11.cubicTo( - size.width * 0.4603175, - size.height * 0.6579743, - size.width * 0.4520030, - size.height * 0.6417234, - size.width * 0.4452003, - size.height * 0.6254724); + size.width * 0.4603175, + size.height * 0.6579743, + size.width * 0.4520030, + size.height * 0.6417234, + size.width * 0.4452003, + size.height * 0.6254724, + ); path11.moveTo(size.width * 0.4739229, size.height * 0.6878307); - path11.arcToPoint(Offset(size.width * 0.4863946, size.height * 0.6832955), - radius: Radius.elliptical( - size.width * 0.04913076, size.height * 0.04913076), - rotation: 0, - largeArc: false, - clockwise: false); + path11.arcToPoint( + Offset(size.width * 0.4863946, size.height * 0.6832955), + radius: Radius.elliptical( + size.width * 0.04913076, + size.height * 0.04913076, + ), + rotation: 0, + largeArc: false, + clockwise: false, + ); path11.moveTo(size.width * 0.4882842, size.height * 0.6746032); - path11.arcToPoint(Offset(size.width * 0.4606954, size.height * 0.5362812), - radius: - Radius.elliptical(size.width * 0.8752834, size.height * 0.8752834), - rotation: 0, - largeArc: false, - clockwise: false); + path11.arcToPoint( + Offset(size.width * 0.4606954, size.height * 0.5362812), + radius: + Radius.elliptical(size.width * 0.8752834, size.height * 0.8752834), + rotation: 0, + largeArc: false, + clockwise: false, + ); path11.moveTo(size.width * 0.4622071, size.height * 0.5328798); path11.cubicTo( - size.width * 0.4863946, - size.height * 0.5166289, - size.width * 0.4735450, - size.height * 0.4822373, - size.width * 0.4546485, - size.height * 0.4686319); + size.width * 0.4863946, + size.height * 0.5166289, + size.width * 0.4735450, + size.height * 0.4822373, + size.width * 0.4546485, + size.height * 0.4686319, + ); final Paint paint11Stroke = Paint() ..style = PaintingStyle.stroke @@ -2186,28 +2525,31 @@ class StrayDeerPainter extends CustomPainter { final Path path12 = Path(); path12.moveTo(size.width * 0.4512472, size.height * 0.4761905); path12.cubicTo( - size.width * 0.4531368, - size.height * 0.4803477, - size.width * 0.4572940, - size.height * 0.4863946, - size.width * 0.4588057, - size.height * 0.4894180); + size.width * 0.4531368, + size.height * 0.4803477, + size.width * 0.4572940, + size.height * 0.4863946, + size.width * 0.4588057, + size.height * 0.4894180, + ); path12.moveTo(size.width * 0.4501134, size.height * 0.4829932); path12.cubicTo( - size.width * 0.4425548, - size.height * 0.4913076, - size.width * 0.4399093, - size.height * 0.5113379, - size.width * 0.4512472, - size.height * 0.5173847); + size.width * 0.4425548, + size.height * 0.4913076, + size.width * 0.4399093, + size.height * 0.5113379, + size.width * 0.4512472, + size.height * 0.5173847, + ); path12.moveTo(size.width * 0.3900227, size.height * 0.5000000); path12.cubicTo( - size.width * 0.4070295, - size.height * 0.5011338, - size.width * 0.4270597, - size.height * 0.5022676, - size.width * 0.4433107, - size.height * 0.5083144); + size.width * 0.4070295, + size.height * 0.5011338, + size.width * 0.4270597, + size.height * 0.5022676, + size.width * 0.4433107, + size.height * 0.5083144, + ); final Paint paint12Stroke = Paint() ..style = PaintingStyle.stroke @@ -2220,50 +2562,56 @@ class StrayDeerPainter extends CustomPainter { final Path path13 = Path(); path13.moveTo(size.width * 0.3065004, size.height * 0.6084656); path13.cubicTo( - size.width * 0.3072562, - size.height * 0.6133787, - size.width * 0.3091459, - size.height * 0.6179138, - size.width * 0.3140590, - size.height * 0.6194255); + size.width * 0.3072562, + size.height * 0.6133787, + size.width * 0.3091459, + size.height * 0.6179138, + size.width * 0.3140590, + size.height * 0.6194255, + ); path13.cubicTo( - size.width * 0.3201058, - size.height * 0.6224490, - size.width * 0.3941799, - size.height * 0.6130008, - size.width * 0.4160998, - size.height * 0.6069539); + size.width * 0.3201058, + size.height * 0.6224490, + size.width * 0.3941799, + size.height * 0.6130008, + size.width * 0.4160998, + size.height * 0.6069539, + ); path13.moveTo(size.width * 0.4225246, size.height * 0.5990174); path13.cubicTo( - size.width * 0.4213908, - size.height * 0.5975057, - size.width * 0.4202570, - size.height * 0.5959940, - size.width * 0.4187453, - size.height * 0.5952381); + size.width * 0.4213908, + size.height * 0.5975057, + size.width * 0.4202570, + size.height * 0.5959940, + size.width * 0.4187453, + size.height * 0.5952381, + ); path13.moveTo(size.width * 0.4270597, size.height * 0.5910809); path13.cubicTo( - size.width * 0.4270597, - size.height * 0.5850340, - size.width * 0.4198791, - size.height * 0.5393046, - size.width * 0.4195011, - size.height * 0.5328798); + size.width * 0.4270597, + size.height * 0.5850340, + size.width * 0.4198791, + size.height * 0.5393046, + size.width * 0.4195011, + size.height * 0.5328798, + ); path13.cubicTo( - size.width * 0.4183673, - size.height * 0.5234316, - size.width * 0.4157218, - size.height * 0.5158730, - size.width * 0.4032502, - size.height * 0.5177627); + size.width * 0.4183673, + size.height * 0.5234316, + size.width * 0.4157218, + size.height * 0.5158730, + size.width * 0.4032502, + size.height * 0.5177627, + ); path13.moveTo(size.width * 0.3926682, size.height * 0.5721844); path13.cubicTo( - size.width * 0.3990930, - size.height * 0.5767196, - size.width * 0.4092971, - size.height * 0.5831444, - size.width * 0.4138322, - size.height * 0.5884354); + size.width * 0.3990930, + size.height * 0.5767196, + size.width * 0.4092971, + size.height * 0.5831444, + size.width * 0.4138322, + size.height * 0.5884354, + ); final Paint paint13Stroke = Paint() ..style = PaintingStyle.stroke @@ -2276,35 +2624,39 @@ class StrayDeerPainter extends CustomPainter { final Path path14 = Path(); path14.moveTo(size.width * 0.4104308, size.height * 0.5226757); path14.cubicTo( - size.width * 0.3998488, - size.height * 0.5377929, - size.width * 0.3847317, - size.height * 0.5740741, - size.width * 0.3707483, - size.height * 0.5755858); + size.width * 0.3998488, + size.height * 0.5377929, + size.width * 0.3847317, + size.height * 0.5740741, + size.width * 0.3707483, + size.height * 0.5755858, + ); path14.cubicTo( - size.width * 0.3556311, - size.height * 0.5767196, - size.width * 0.3163265, - size.height * 0.5468632, - size.width * 0.3038549, - size.height * 0.5389267); + size.width * 0.3556311, + size.height * 0.5767196, + size.width * 0.3163265, + size.height * 0.5468632, + size.width * 0.3038549, + size.height * 0.5389267, + ); path14.moveTo(size.width * 0.3182162, size.height * 0.6111111); path14.cubicTo( - size.width * 0.3235072, - size.height * 0.6027967, - size.width * 0.3306878, - size.height * 0.5963719, - size.width * 0.3356009, - size.height * 0.5876795); + size.width * 0.3235072, + size.height * 0.6027967, + size.width * 0.3306878, + size.height * 0.5963719, + size.width * 0.3356009, + size.height * 0.5876795, + ); path14.moveTo(size.width * 0.3408919, size.height * 0.5801209); path14.cubicTo( - size.width * 0.3431595, - size.height * 0.5767196, - size.width * 0.3454271, - size.height * 0.5729403, - size.width * 0.3469388, - size.height * 0.5687831); + size.width * 0.3431595, + size.height * 0.5767196, + size.width * 0.3454271, + size.height * 0.5729403, + size.width * 0.3469388, + size.height * 0.5687831, + ); final Paint paint14Stroke = Paint() ..style = PaintingStyle.stroke @@ -2317,43 +2669,48 @@ class StrayDeerPainter extends CustomPainter { final Path path15 = Path(); path15.moveTo(size.width * 0.3046107, size.height * 0.6009070); path15.cubicTo( - size.width * 0.3034769, - size.height * 0.5903250, - size.width * 0.2955404, - size.height * 0.5529101, - size.width * 0.2955404, - size.height * 0.5427060); + size.width * 0.3034769, + size.height * 0.5903250, + size.width * 0.2955404, + size.height * 0.5529101, + size.width * 0.2955404, + size.height * 0.5427060, + ); path15.cubicTo( - size.width * 0.2955404, - size.height * 0.5328798, - size.width * 0.2978080, - size.height * 0.5275888, - size.width * 0.3219955, - size.height * 0.5264550); + size.width * 0.2955404, + size.height * 0.5328798, + size.width * 0.2978080, + size.height * 0.5275888, + size.width * 0.3219955, + size.height * 0.5264550, + ); path15.moveTo(size.width * 0.3303099, size.height * 0.5253212); path15.cubicTo( - size.width * 0.3514739, - size.height * 0.5215420, - size.width * 0.3733938, - size.height * 0.5196523, - size.width * 0.3934240, - size.height * 0.5188964); + size.width * 0.3514739, + size.height * 0.5215420, + size.width * 0.3733938, + size.height * 0.5196523, + size.width * 0.3934240, + size.height * 0.5188964, + ); path15.moveTo(size.width * 0.3518519, size.height * 0.4935752); path15.cubicTo( - size.width * 0.3662132, - size.height * 0.4860166, - size.width * 0.3749055, - size.height * 0.5079365, - size.width * 0.3756614, - size.height * 0.5166289); + size.width * 0.3662132, + size.height * 0.4860166, + size.width * 0.3749055, + size.height * 0.5079365, + size.width * 0.3756614, + size.height * 0.5166289, + ); path15.moveTo(size.width * 0.3631897, size.height * 0.4818594); path15.cubicTo( - size.width * 0.3813303, - size.height * 0.4829932, - size.width * 0.3907785, - size.height * 0.5034014, - size.width * 0.3896447, - size.height * 0.5170068); + size.width * 0.3813303, + size.height * 0.4829932, + size.width * 0.3907785, + size.height * 0.5034014, + size.width * 0.3896447, + size.height * 0.5170068, + ); final Paint paint15Stroke = Paint() ..style = PaintingStyle.stroke @@ -2366,30 +2723,33 @@ class StrayDeerPainter extends CustomPainter { final Path path16 = Path(); path16.moveTo(size.width * 0.3049887, size.height * 0.5291005); path16.cubicTo( - size.width * 0.3034769, - size.height * 0.5222978, - size.width * 0.3004535, - size.height * 0.5154951, - size.width * 0.2981859, - size.height * 0.5086924); + size.width * 0.3034769, + size.height * 0.5222978, + size.width * 0.3004535, + size.height * 0.5154951, + size.width * 0.2981859, + size.height * 0.5086924, + ); path16.moveTo(size.width * 0.3212396, size.height * 0.5268330); path16.cubicTo( - size.width * 0.3185941, - size.height * 0.5192744, - size.width * 0.3167045, - size.height * 0.5117158, - size.width * 0.3129252, - size.height * 0.5049131); + size.width * 0.3185941, + size.height * 0.5192744, + size.width * 0.3167045, + size.height * 0.5117158, + size.width * 0.3129252, + size.height * 0.5049131, + ); path16.moveTo(size.width * 0.1678005, size.height * 0.4950869); path16.lineTo(size.width * 0.1749811, size.height * 0.4965986); path16.moveTo(size.width * 0.2683296, size.height * 0.5226757); path16.cubicTo( - size.width * 0.2910053, - size.height * 0.5464853, - size.width * 0.2944067, - size.height * 0.5162509, - size.width * 0.2728647, - size.height * 0.5102041); + size.width * 0.2910053, + size.height * 0.5464853, + size.width * 0.2944067, + size.height * 0.5162509, + size.width * 0.2728647, + size.height * 0.5102041, + ); final Paint paint16Stroke = Paint() ..style = PaintingStyle.stroke @@ -2402,12 +2762,13 @@ class StrayDeerPainter extends CustomPainter { final Path path17 = Path(); path17.moveTo(size.width * 0.1927438, size.height * 0.5820106); path17.cubicTo( - size.width * 0.1980348, - size.height * 0.5839002, - size.width * 0.2033258, - size.height * 0.5823885, - size.width * 0.2101285, - size.height * 0.5782313); + size.width * 0.1980348, + size.height * 0.5839002, + size.width * 0.2033258, + size.height * 0.5823885, + size.width * 0.2101285, + size.height * 0.5782313, + ); final Paint paint17Stroke = Paint() ..style = PaintingStyle.stroke @@ -2424,19 +2785,21 @@ class StrayDeerPainter extends CustomPainter { final Path path18 = Path(); path18.moveTo(size.width * 0.3764172, size.height * 0.4365079); path18.cubicTo( - size.width * 0.3730159, - size.height * 0.4270597, - size.width * 0.3718821, - size.height * 0.4040060, - size.width * 0.3571429, - size.height * 0.4085412); + size.width * 0.3730159, + size.height * 0.4270597, + size.width * 0.3718821, + size.height * 0.4040060, + size.width * 0.3571429, + size.height * 0.4085412, + ); path18.cubicTo( - size.width * 0.3469388, - size.height * 0.4119426, - size.width * 0.3563870, - size.height * 0.4349962, - size.width * 0.3571429, - size.height * 0.4402872); + size.width * 0.3469388, + size.height * 0.4119426, + size.width * 0.3563870, + size.height * 0.4349962, + size.width * 0.3571429, + size.height * 0.4402872, + ); final Paint paint18Stroke = Paint() ..style = PaintingStyle.stroke @@ -2449,61 +2812,72 @@ class StrayDeerPainter extends CustomPainter { final Path path19 = Path(); path19.moveTo(size.width * 0.1530612, size.height * 0.4104308); path19.cubicTo( - size.width * 0.1477702, - size.height * 0.4085412, - size.width * 0.1447468, - size.height * 0.4028723, - size.width * 0.1455026, - size.height * 0.3972033); + size.width * 0.1477702, + size.height * 0.4085412, + size.width * 0.1447468, + size.height * 0.4028723, + size.width * 0.1455026, + size.height * 0.3972033, + ); path19.cubicTo( - size.width * 0.1458806, - size.height * 0.3919123, - size.width * 0.1485261, - size.height * 0.3866213, - size.width * 0.1530612, - size.height * 0.3839758); + size.width * 0.1458806, + size.height * 0.3919123, + size.width * 0.1485261, + size.height * 0.3866213, + size.width * 0.1530612, + size.height * 0.3839758, + ); path19.cubicTo( - size.width * 0.1568405, - size.height * 0.3817082, - size.width * 0.1617536, - size.height * 0.3809524, - size.width * 0.1655329, - size.height * 0.3828420); + size.width * 0.1568405, + size.height * 0.3817082, + size.width * 0.1617536, + size.height * 0.3809524, + size.width * 0.1655329, + size.height * 0.3828420, + ); path19.cubicTo( - size.width * 0.1700680, - size.height * 0.3847317, - size.width * 0.1742252, - size.height * 0.3881330, - size.width * 0.1757370, - size.height * 0.3926682); - path19.arcToPoint(Offset(size.width * 0.1734694, size.height * 0.4096750), - radius: Radius.elliptical( - size.width * 0.01889645, size.height * 0.01889645), - rotation: 0, - largeArc: false, - clockwise: true); + size.width * 0.1700680, + size.height * 0.3847317, + size.width * 0.1742252, + size.height * 0.3881330, + size.width * 0.1757370, + size.height * 0.3926682, + ); + path19.arcToPoint( + Offset(size.width * 0.1734694, size.height * 0.4096750), + radius: Radius.elliptical( + size.width * 0.01889645, + size.height * 0.01889645, + ), + rotation: 0, + largeArc: false, + clockwise: true, + ); path19.cubicTo( - size.width * 0.1712018, - size.height * 0.4134543, - size.width * 0.1659108, - size.height * 0.4142101, - size.width * 0.1651550, - size.height * 0.4187453); + size.width * 0.1712018, + size.height * 0.4134543, + size.width * 0.1659108, + size.height * 0.4142101, + size.width * 0.1651550, + size.height * 0.4187453, + ); path19.cubicTo( - size.width * 0.1643991, - size.height * 0.4232804, - size.width * 0.1689342, - size.height * 0.4270597, - size.width * 0.1708239, - size.height * 0.4308390); + size.width * 0.1643991, + size.height * 0.4232804, + size.width * 0.1689342, + size.height * 0.4270597, + size.width * 0.1708239, + size.height * 0.4308390, + ); path19.moveTo(size.width * 0.1757370, size.height * 0.4383976); path19.cubicTo( - size.width * 0.1757370, - size.height * 0.4387755, - size.width * 0.1761149, - size.height * 0.4383976, - size.width * 0.1761149, - size.height * 0.4383976); + size.width * 0.1757370, + size.height * 0.4387755, + size.width * 0.1761149, + size.height * 0.4383976, + size.width * 0.1761149, + size.height * 0.4383976, + ); path19.lineTo(size.width * 0.1761149, size.height * 0.4387755); final Paint paint19Stroke = Paint() diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart index 30928ca0..2ec349a0 100644 --- a/lib/ui/pages/server_details/charts/cpu_chart.dart +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -2,9 +2,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:fl_chart/fl_chart.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; -import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:intl/intl.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/bottom_title.dart'; diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index b702398b..5a6632c8 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -254,9 +254,9 @@ class SelectTypePage extends StatelessWidget { const SizedBox(width: 8), Text( 'initializing.choose_server_type_storage' - .tr(args: [ - type.disk.gibibyte.toString() - ]), + .tr( + args: [type.disk.gibibyte.toString()], + ), style: Theme.of(context).textTheme.bodyMedium, ), @@ -275,9 +275,11 @@ class SelectTypePage extends StatelessWidget { const SizedBox(width: 8), Text( 'initializing.choose_server_type_payment_per_month' - .tr(args: [ - '${type.price.value.toString()} ${type.price.currency}' - ]), + .tr( + args: [ + '${type.price.value.toString()} ${type.price.currency}' + ], + ), style: Theme.of(context).textTheme.bodyLarge, ), From e2a9493b619b57ae121e778265a5bf35aae845a9 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 07:51:47 +0300 Subject: [PATCH 318/732] fix(jobs): Make jobs panel take less space Closes: #136 --- .../brand_bottom_sheet.dart | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart index 0f60ed09..d53b5ced 100644 --- a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart +++ b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart @@ -15,7 +15,7 @@ class BrandBottomSheet extends StatelessWidget { Widget build(final BuildContext context) { final double mainHeight = MediaQuery.of(context).size.height - MediaQuery.of(context).padding.top - - 100; + 300; late Widget innerWidget; if (isExpended) { innerWidget = Scaffold( @@ -29,31 +29,28 @@ class BrandBottomSheet extends StatelessWidget { child: IntrinsicHeight(child: child), ); } - return ConstrainedBox( - constraints: BoxConstraints(maxHeight: mainHeight + 4 + 6), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Center( - child: Container( - height: 4, - width: 30, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: BrandColors.gray4, - ), + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Center( + child: Container( + height: 4, + width: 30, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(2), + color: BrandColors.gray4, ), ), - const SizedBox(height: 6), - ClipRRect( - borderRadius: const BorderRadius.vertical(top: Radius.circular(20)), - child: ConstrainedBox( - constraints: BoxConstraints(maxHeight: mainHeight), - child: innerWidget, - ), + ), + const SizedBox(height: 6), + ClipRRect( + borderRadius: const BorderRadius.vertical(top: Radius.circular(20)), + child: ConstrainedBox( + constraints: BoxConstraints(maxHeight: mainHeight), + child: innerWidget, ), - ], - ), + ), + ], ); } } From 5f311ee9072a5885963b0f90fe17eae2b3728ac5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 07:58:20 +0300 Subject: [PATCH 319/732] feat(logging): Add limit to log console --- lib/logic/get_it/console.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/logic/get_it/console.dart b/lib/logic/get_it/console.dart index 290f31ab..a523c5e8 100644 --- a/lib/logic/get_it/console.dart +++ b/lib/logic/get_it/console.dart @@ -9,5 +9,9 @@ class ConsoleModel extends ChangeNotifier { void addMessage(final Message message) { messages.add(message); notifyListeners(); + // Make sure we don't have too many messages + if (messages.length > 500) { + messages.removeAt(0); + } } } From bbb1d55b64a823a5890cfa291810c1b556abd0f0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 08:08:25 +0300 Subject: [PATCH 320/732] feat(services): Sort the services by their status Done by changing the indexes of ServiceStatus enum and sorting by it. --- lib/logic/models/service.dart | 6 +++--- lib/ui/pages/services/services.dart | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 898d2965..039065e3 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -105,13 +105,13 @@ class ServiceStorageUsage { } enum ServiceStatus { + failed, + reloading, activating, active, deactivating, - failed, inactive, - off, - reloading; + off; factory ServiceStatus.fromGraphQL(final Enum$ServiceStatusEnum graphQL) { switch (graphQL) { diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 498f84a1..fc00922b 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -41,6 +41,10 @@ class _ServicesPageState extends State { final isReady = context.watch().state is ServerInstallationFinished; + final services = [...context.watch().state.services]; + services + .sort((final a, final b) => a.status.index.compareTo(b.status.index)); + return Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(52), @@ -58,10 +62,7 @@ class _ServicesPageState extends State { BrandText.body1('basis.services_title'.tr()), const SizedBox(height: 24), if (!isReady) ...[const NotReadyCard(), const SizedBox(height: 24)], - ...context - .read() - .state - .services + ...services .map( (final service) => Padding( padding: const EdgeInsets.only( From 53fc0d4d28d1ca027a331f792540ae6e5e7094ae Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 08:13:28 +0300 Subject: [PATCH 321/732] chore: Disable staging ACME --- lib/logic/api_maps/staging_options.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index 26b07e53..7d3084b7 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -4,5 +4,5 @@ class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned by constant certificate renewal - static bool get stagingAcme => true; + static bool get stagingAcme => false; } From 2fb9932eb66656cc65f0ebcb16220891e2482d48 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 08:40:32 +0300 Subject: [PATCH 322/732] chore: Bump version --- .../android/en-US/changelogs/0.8.0.txt | 33 +++++++++++++++++++ pubspec.yaml | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/0.8.0.txt diff --git a/fastlane/metadata/android/en-US/changelogs/0.8.0.txt b/fastlane/metadata/android/en-US/changelogs/0.8.0.txt new file mode 100644 index 00000000..e7d8dbad --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/0.8.0.txt @@ -0,0 +1,33 @@ +Server setup: +- Added support for Digital Ocean as server provider +- You can now choose server region +- You can now choose server tier +- Server installation UI has been refreshed +- Fields now have more specific error messages + +Common UI: +- New app bar used in most of the screens + +Services: +- Services are now sorted by their status + +Server settings: +- Timezone search screen now has a search bar +- Fixed job creation when switching the setting multiple times +- Server destruction now works + +Jobs: +- Jobs panel now should take slightly less space + +Auth: +- Recovery key page can now be reloaded by dragging down + +Logging: +- Log console now has a limit of 500 lines +- GraphQL API requests are now logged in the console +- Networks errors are better handled + +For developers: +- App now only uses GraphQL API to communicate with the server. All REST API calls have been removed. +- Server can now be deployed with staging ACME certificates +- Language assets have been reorganized diff --git a/pubspec.yaml b/pubspec.yaml index dc69cd58..d47daac7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: selfprivacy description: selfprivacy.org publish_to: 'none' -version: 0.7.0+16 +version: 0.8.0+17 environment: sdk: '>=2.17.0 <3.0.0' From 12de989df63d0f649db10fbd7dfd6c9b05028b0c Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 31 Dec 2022 10:01:27 +0400 Subject: [PATCH 323/732] docs: Add Digital Ocean how-to markdown --- assets/markdown/how_digital_ocean-en.md | 12 ++++++++++++ assets/markdown/how_digital_ocean-ru.md | 10 ++++++++++ assets/translations/en.json | 2 +- .../setup/initializing/server_provider_picker.dart | 4 ++-- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 assets/markdown/how_digital_ocean-en.md create mode 100644 assets/markdown/how_digital_ocean-ru.md diff --git a/assets/markdown/how_digital_ocean-en.md b/assets/markdown/how_digital_ocean-en.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-en.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-ru.md b/assets/markdown/how_digital_ocean-ru.md new file mode 100644 index 00000000..a4795811 --- /dev/null +++ b/assets/markdown/how_digital_ocean-ru.md @@ -0,0 +1,10 @@ +### How to get Digital Ocean API Token +1. Перейдите по [ссылке](https://cloud.digitalocean.com/) и войдите в ваш аккаунт. +2. Перейдите в новый проект, либо создайте проект, если ещё этого не сделали. +3. Перейдите в "API" раздел в меню слева. +4. Нажмите на "Generate New Token". +5. Введите какое-нибудь имя для токена. +6. Установите время истощения на "No expiry". +7. Проставьте галочку в пункте "Write (optional)". +8. Теперь нажмите на "Generate Token" кнопку внизу. +9. После этого появится ваш токен. Скопируйте его в надёжное место, лучше в ваш собственный менеджер паролей. \ No newline at end of file diff --git a/assets/translations/en.json b/assets/translations/en.json index 9c3d5e6a..6f23654b 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -289,7 +289,7 @@ "select_provider_payment_text_do": "Credit cards, Google Pay, PayPal", "select_provider_email_notice": "E-mail hosting won't be available for new clients. Nevertheless it will be unlocked as soon as you complete your first payment.", "select_provider_site_button": "Visit site", - "connect_to_server_provider": "Autorize in ", + "connect_to_server_provider": "Now log in ", "connect_to_server_provider_text": "With API token SelfPrivacy will be able to rent a machine and setup your server on it", "how": "How to obtain API token", "provider_bad_key_error": "Provider API key is invalid", diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index bf99863b..9775a945 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -51,7 +51,7 @@ class _ServerProviderPickerState extends State { providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( providerType: ServerProvider.hetzner, - pathToHow: 'hetzner_how', + pathToHow: 'how_hetzner', image: Image.asset( 'assets/images/logos/hetzner.png', width: 150, @@ -64,7 +64,7 @@ class _ServerProviderPickerState extends State { providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( providerType: ServerProvider.digitalOcean, - pathToHow: 'hetzner_how', + pathToHow: 'how_digital_ocean', image: Image.asset( 'assets/images/logos/digital_ocean.png', width: 150, From d1c4aa9fc6f02120082afd503c341306efe54169 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 09:04:25 +0300 Subject: [PATCH 324/732] feat(about): Add privacy policy and licenses --- assets/translations/en.json | 3 ++- assets/translations/ru.json | 5 +++-- lib/ui/pages/more/about_application.dart | 21 +++++++++++++++++++ .../setup/initializing/initializing.dart | 3 ++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 6f23654b..0f5f1c99 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -54,7 +54,8 @@ "about_application_page": { "title": "About", "application_version_text": "Application version v.{}", - "api_version_text": "Server API version v.{}" + "api_version_text": "Server API version v.{}", + "privacy_policy": "Privacy policy" }, "application_settings": { "title": "Application settings", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 3ab94069..f960a85d 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -54,7 +54,8 @@ "about_application_page": { "title": "О приложении", "application_version_text": "Версия приложения v.{}", - "api_version_text": "Версия API сервера v.{}" + "api_version_text": "Версия API сервера v.{}", + "privacy_policy": "Политика конфиденциальности" }, "application_settings": { "title": "Настройки приложения", @@ -475,4 +476,4 @@ "length_not_equal": "Длина строки [], должно быть равно {}", "length_longer": "Длина строки [], должно быть меньше либо равно {}" } -} \ No newline at end of file +} diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index ceefd0c7..7a9dc11e 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:package_info/package_info.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:url_launcher/url_launcher.dart'; class AboutApplicationPage extends StatelessWidget { const AboutApplicationPage({super.key}); @@ -37,6 +38,26 @@ class AboutApplicationPage extends StatelessWidget { .tr(args: [snapshot.data.toString()]), ), ), + const SizedBox(height: 10), + // Button to call showAboutDialog + TextButton( + onPressed: () => showAboutDialog( + context: context, + applicationName: 'SelfPrivacy', + applicationLegalese: '© 2022 SelfPrivacy', + // Link to privacy policy + children: [ + TextButton( + onPressed: () => launchUrl( + Uri.parse('https://selfprivacy.ru/privacy-policy'), + mode: LaunchMode.externalApplication, + ), + child: Text('about_application_page.privacy_policy'.tr()), + ), + ], + ), + child: const Text('Show about dialog'), + ), ], ), ), diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 36ddb8e9..72d82520 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -122,7 +122,8 @@ class InitializingPage extends StatelessWidget { }, ), ), - if (cubit.state is ServerInstallationEmpty) + if (cubit.state is ServerInstallationEmpty || + cubit.state is ServerInstallationNotFinished) Container( alignment: Alignment.center, child: BrandButton.text( From 4ed0ffb84676811f540b412260ad89bb80aa8eee Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 31 Dec 2022 10:56:47 +0300 Subject: [PATCH 325/732] ci: Enable AAB generation --- .drone.yml | 40 +++++++++++++++++++-------------------- android/gradle.properties | 1 + ci.py | 1 + 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.drone.yml b/.drone.yml index 129e1070..76bf5dd7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -97,16 +97,16 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS -# - name: Build Intermediate Android Release Artifact (Bundle) -# commands: -# - ./ci.py --build-bundle -# environment: -# STANDALONE_KEYSTORE_PASS: -# from_secret: STANDALONE_KEYSTORE_PASS -# FDROID_KEYSTORE_PASS: -# from_secret: FDROID_KEYSTORE_PASS -# GOOGLE_KEYSTORE_PASS: -# from_secret: GOOGLE_KEYSTORE_PASS + - name: Build Intermediate Android Release Artifact (Bundle) + commands: + - ./ci.py --build-bundle + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS - name: Sign Android Release Artifact (.APK) for Standalone Use commands: @@ -132,16 +132,16 @@ steps: GOOGLE_KEYSTORE_PASS: from_secret: GOOGLE_KEYSTORE_PASS -# - name: Sign Android Release Artifact (Bundle) for Google Play -# commands: -# - ./ci.py --sign-bundle -# environment: -# STANDALONE_KEYSTORE_PASS: -# from_secret: STANDALONE_KEYSTORE_PASS -# FDROID_KEYSTORE_PASS: -# from_secret: FDROID_KEYSTORE_PASS -# GOOGLE_KEYSTORE_PASS: -# from_secret: GOOGLE_KEYSTORE_PASS + - name: Sign Android Release Artifact (Bundle) for Google Play + commands: + - ./ci.py --sign-bundle + environment: + STANDALONE_KEYSTORE_PASS: + from_secret: STANDALONE_KEYSTORE_PASS + FDROID_KEYSTORE_PASS: + from_secret: FDROID_KEYSTORE_PASS + GOOGLE_KEYSTORE_PASS: + from_secret: GOOGLE_KEYSTORE_PASS - name: Package Linux AppImage Artifact commands: diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a3..c396be2a 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +android.bundle.enableUncompressedNativeLibs=false diff --git a/ci.py b/ci.py index 02a17004..b0b9e996 100755 --- a/ci.py +++ b/ci.py @@ -149,6 +149,7 @@ def package_linux_archive(): def deploy_gitea_release(): gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk") gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/standalone_{APP_NAME}-{APP_SEMVER}.apk.idsig") + gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.aab") gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage") gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/SelfPrivacy-{APP_SEMVER}-x86_64.AppImage.zsync") gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.flatpak") From 2980887333b00d6b6bc2e5fe877e694362af8adb Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 4 Jan 2023 14:42:22 +0400 Subject: [PATCH 326/732] feat: Add DNS provider selection page Upload cloudflare svg --- assets/images/logos/cloudflare.svg | 10 +++++ assets/translations/en.json | 4 +- assets/translations/ru.json | 4 +- .../initializing/dns_provider_form_cubit.dart | 3 +- .../initializing/dns_provider_picker.dart | 39 ++++--------------- 5 files changed, 25 insertions(+), 35 deletions(-) create mode 100644 assets/images/logos/cloudflare.svg diff --git a/assets/images/logos/cloudflare.svg b/assets/images/logos/cloudflare.svg new file mode 100644 index 00000000..a8cbf3bc --- /dev/null +++ b/assets/images/logos/cloudflare.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/translations/en.json b/assets/translations/en.json index 7d39a922..5f74b0e1 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -285,11 +285,13 @@ "select_provider_countries_text_hetzner": "Germany, Finland, USA", "select_provider_countries_text_do": "USA, Netherlands, Singapore, UK, Germany, Canada, India, Australia", "select_provider_price_title": "Average price", + "select_provider_price_free": "Free", "select_provider_price_text_hetzner": "€8 per month for a relatively small server and 50GB of disk storage", "select_provider_price_text_do": "$17 per month for a relatively small server and 50GB of disk storage", "select_provider_payment_title": "Payment methods", "select_provider_payment_text_hetzner": "Credit cards, SWIFT, SEPA, PayPal", "select_provider_payment_text_do": "Credit cards, Google Pay, PayPal", + "select_provider_payment_text_cloudflare": "Credit cards", "select_provider_email_notice": "E-mail hosting won't be available for new clients. Nevertheless it will be unlocked as soon as you complete your first payment.", "select_provider_site_button": "Visit site", "connect_to_server_provider": "Now log in ", @@ -310,7 +312,7 @@ "choose_server_type_storage": "{} GB of system storage", "choose_server_type_payment_per_month": "{} per month", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", - "cloudflare_bad_key_error": "Cloudflare API key is invalid", + "dns_provider_bad_key_error": "API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", "connect_to_dns": "Connect the DNS provider", "select_dns": "Now let's select a DNS provider", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 29492950..82183962 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -284,11 +284,13 @@ "select_provider_countries_text_hetzner": "Германия, Финляндия, США", "select_provider_countries_text_do": "США, Нидерланды, Сингапур, Великобритания, Германия, Канада, Индия, Австралия", "select_provider_price_title": "Средняя цена", + "select_provider_price_free": "Бесплатно", "select_provider_price_text_hetzner": "€8 в месяц за небольшой сервер и 50GB места на диске", "select_provider_price_text_do": "$17 в месяц за небольшой сервер и 50GB места на диске", "select_provider_payment_title": "Методы оплаты", "select_provider_payment_text_hetzner": "Банковские карты, SWIFT, SEPA, PayPal", "select_provider_payment_text_do": "Банковские карты, Google Pay, PayPal", + "select_provider_payment_text_cloudflare": "Банковские карты", "select_provider_email_notice": "Хостинг электронной почты недоступен для новых клиентов. Разблокировать можно будет после первой оплаты.", "select_provider_site_button": "Посетить сайт", "connect_to_server_provider": "Авторизоваться в ", @@ -309,7 +311,7 @@ "choose_server_type_storage": "{} GB системного хранилища", "choose_server_type_payment_per_month": "{} в месяц", "no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...", - "cloudflare_bad_key_error": "Cloudflare API ключ неверен", + "dns_provider_bad_key_error": "API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", "connect_to_dns": "Подключите DNS провайдер", "manage_domain_dns": "Для управления DNS вашего домена", diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index bfcaf0f9..eb23dd42 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -11,7 +11,6 @@ class DnsProviderFormCubit extends FormCubit { initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - LengthStringNotEqualValidation(40) ], ); @@ -43,7 +42,7 @@ class DnsProviderFormCubit extends FormCubit { } if (!isKeyValid) { - apiKey.setError('initializing.cloudflare_bad_key_error'.tr()); + apiKey.setError('initializing.dns_provider_bad_key_error'.tr()); } return isKeyValid; diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 99aadfbc..da6098f5 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -164,7 +164,7 @@ class ProviderSelectionPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'initializing.connect_to_server'.tr(), + 'initializing.select_dns'.tr(), style: Theme.of(context).textTheme.headlineSmall, ), const SizedBox(height: 10), @@ -187,10 +187,10 @@ class ProviderSelectionPage extends StatelessWidget { padding: const EdgeInsets.all(10), decoration: BoxDecoration( borderRadius: BorderRadius.circular(40), - color: const Color(0xFFD50C2D), + color: const Color.fromARGB(255, 241, 215, 166), ), child: SvgPicture.asset( - 'assets/images/logos/hetzner.svg', + 'assets/images/logos/cloudflare.svg', ), ), const SizedBox(width: 16), @@ -201,22 +201,12 @@ class ProviderSelectionPage extends StatelessWidget { ], ), const SizedBox(height: 16), - Text( - 'initializing.select_provider_countries_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_countries_text_hetzner' - .tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), Text( 'initializing.select_provider_price_title'.tr(), style: Theme.of(context).textTheme.bodyLarge, ), Text( - 'initializing.select_provider_price_text_hetzner'.tr(), + 'initializing.select_provider_price_free'.tr(), style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), @@ -225,12 +215,8 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodyLarge, ), Text( - 'initializing.select_provider_payment_text_hetzner'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_email_notice'.tr(), + 'initializing.select_provider_payment_text_cloudflare' + .tr(), style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), @@ -245,7 +231,7 @@ class ProviderSelectionPage extends StatelessWidget { // Outlined button that will open website BrandOutlinedButton( onPressed: () => - launchURL('https://cloud.digitalocean.com/'), + launchURL('https://dash.cloudflare.com/'), title: 'initializing.select_provider_site_button'.tr(), ), ], @@ -281,21 +267,12 @@ class ProviderSelectionPage extends StatelessWidget { ], ), const SizedBox(height: 16), - Text( - 'initializing.select_provider_countries_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_countries_text_do'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), Text( 'initializing.select_provider_price_title'.tr(), style: Theme.of(context).textTheme.bodyLarge, ), Text( - 'initializing.select_provider_price_text_do'.tr(), + 'initializing.select_provider_price_free'.tr(), style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), From 36bc5b25546f3314f80597900bb0563bd87dca85 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 5 Jan 2023 13:16:30 +0400 Subject: [PATCH 327/732] chore: Generate build runner files --- assets/translations/en.json | 1 + assets/translations/ru.json | 1 + .../graphql_maps/schema/disk_volumes.graphql.dart | 2 +- .../graphql_maps/schema/server_api.graphql.dart | 1 + .../schema/server_settings.graphql.dart | 2 +- .../graphql_maps/schema/services.graphql.dart | 1 - .../graphql_maps/schema/users.graphql.dart | 2 +- lib/logic/models/hive/server_domain.g.dart | 5 +++++ lib/logic/models/json/dns_records.g.dart | 1 + .../setup/initializing/dns_provider_picker.dart | 15 +++++++++------ 10 files changed, 21 insertions(+), 10 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 5f74b0e1..d039a22d 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -315,6 +315,7 @@ "dns_provider_bad_key_error": "API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", "connect_to_dns": "Connect the DNS provider", + "connect_to_dns_provider_text": "With API token SelfPrivacy will manage all DNS entries", "select_dns": "Now let's select a DNS provider", "manage_domain_dns": "To manage your domain's DNS", "use_this_domain": "Use this domain?", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 82183962..586d5f58 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -314,6 +314,7 @@ "dns_provider_bad_key_error": "API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", "connect_to_dns": "Подключите DNS провайдер", + "connect_to_dns_provider_text": "С помощью API токена приложение SelfPrivacy настроит DNS записи", "manage_domain_dns": "Для управления DNS вашего домена", "use_this_domain": "Используем этот домен?", "use_this_domain_text": "Указанный вами токен даёт контроль над этим доменом", diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 359a7a27..2464c561 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -4,7 +4,7 @@ import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; +import 'services.graphql.dart'; part 'disk_volumes.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 325ee89d..09671eed 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -4,6 +4,7 @@ import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; part 'server_api.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index a077cf7d..5d036afa 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -3,7 +3,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; +import 'services.graphql.dart'; part 'server_settings.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 92138d02..a31058c4 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -4,7 +4,6 @@ import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; part 'services.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index ce846b30..18a15aa9 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -3,7 +3,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; +import 'services.graphql.dart'; part 'users.graphql.g.dart'; @JsonSerializable(explicitToJson: true) diff --git a/lib/logic/models/hive/server_domain.g.dart b/lib/logic/models/hive/server_domain.g.dart index 3265db6b..c7ebc25f 100644 --- a/lib/logic/models/hive/server_domain.g.dart +++ b/lib/logic/models/hive/server_domain.g.dart @@ -58,6 +58,8 @@ class DnsProviderAdapter extends TypeAdapter { return DnsProvider.unknown; case 1: return DnsProvider.cloudflare; + case 2: + return DnsProvider.digitalOcean; default: return DnsProvider.unknown; } @@ -72,6 +74,9 @@ class DnsProviderAdapter extends TypeAdapter { case DnsProvider.cloudflare: writer.writeByte(1); break; + case DnsProvider.digitalOcean: + writer.writeByte(2); + break; } } diff --git a/lib/logic/models/json/dns_records.g.dart b/lib/logic/models/json/dns_records.g.dart index c8c12c34..b58db5de 100644 --- a/lib/logic/models/json/dns_records.g.dart +++ b/lib/logic/models/json/dns_records.g.dart @@ -13,4 +13,5 @@ Map _$DnsRecordToJson(DnsRecord instance) => { 'ttl': instance.ttl, 'priority': instance.priority, 'proxied': instance.proxied, + 'id': instance.id, }; diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index da6098f5..e72d8203 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -100,13 +100,16 @@ class ProviderInputDataPage extends StatelessWidget { Widget build(final BuildContext context) => Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - providerInfo.image, - const SizedBox(height: 10), Text( 'initializing.connect_to_dns'.tr(), - style: Theme.of(context).textTheme.titleLarge, + style: Theme.of(context).textTheme.headlineSmall, ), - const Spacer(), + const SizedBox(height: 16), + Text( + 'initializing.connect_to_server_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 32), CubitFormTextField( formFieldCubit: providerCubit.apiKey, textAlign: TextAlign.center, @@ -115,13 +118,13 @@ class ProviderInputDataPage extends StatelessWidget { hintText: 'Provider API Token', ), ), - const Spacer(), + const SizedBox(height: 32), FilledButton( title: 'basis.connect'.tr(), onPressed: () => providerCubit.trySubmit(), ), const SizedBox(height: 10), - OutlinedButton( + BrandOutlinedButton( child: Text('initializing.how'.tr()), onPressed: () => showModalBottomSheet( context: context, From 9184a9db5d3a5f8cfbec37e82f344da120895e80 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 5 Jan 2023 14:05:05 +0400 Subject: [PATCH 328/732] feat: Implement DnsProvider loaging --- .../initializing/dns_provider_form_cubit.dart | 1 - .../server_installation_repository.dart | 16 ++++++++++------ lib/ui/pages/services/service_page.dart | 1 - lib/ui/pages/services/services.dart | 1 - 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index eb23dd42..084adb83 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class DnsProviderFormCubit extends FormCubit { DnsProviderFormCubit(this.initializingCubit) { diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 83a2d2fa..5f98229f 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -48,6 +48,7 @@ class ServerInstallationRepository { final String? cloudflareToken = getIt().dnsProviderKey; final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; + final DnsProvider? dnsProvider = getIt().dnsProvider; final ServerProvider? serverProvider = getIt().serverProvider; final BackblazeCredential? backblazeCredential = @@ -75,12 +76,15 @@ class ServerInstallationRepository { ); } - // No other DNS provider is supported for now, so it's fine. - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: DnsProvider.cloudflare, - ), - ); + if (dnsProvider != null || + (serverDomain != null && + serverDomain.provider != ServerProvider.unknown)) { + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: dnsProvider ?? serverDomain!.provider, + ), + ); + } if (box.get(BNames.hasFinalChecked, defaultValue: false)) { return ServerInstallationFinished( diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index c2ebbe3a..b6ca7cee 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -11,7 +11,6 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; -import 'package:url_launcher/url_launcher.dart'; class ServicePage extends StatefulWidget { const ServicePage({required this.serviceId, super.key}); diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 0f0243ef..e6c0e5c9 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -15,7 +15,6 @@ import 'package:selfprivacy/ui/pages/services/service_page.dart'; import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; -import 'package:url_launcher/url_launcher.dart'; class ServicesPage extends StatefulWidget { const ServicesPage({super.key}); From 07de11c75aa662bb758c79627d0658a8662700db Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 6 Jan 2023 19:28:52 +0400 Subject: [PATCH 329/732] fix: Implement correct DNS entries creation and deletion --- .../digital_ocean_dns/digital_ocean_dns.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index d2359e87..b98a2794 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -105,12 +105,15 @@ class DigitalOceanDnsApi extends DnsProviderApi { final Dio client = await getClient(); try { + const String ignoreType = 'SOA'; final List allDeleteFutures = []; final List records = await getDnsRecords(domain: domain); for (final record in records) { - allDeleteFutures.add( - client.delete('/domains/$domainName/records/${record.id}'), - ); + if (record.type != ignoreType) { + allDeleteFutures.add( + client.delete('/domains/$domainName/records/${record.id}'), + ); + } } await Future.wait(allDeleteFutures); } catch (e) { @@ -186,7 +189,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { data: { 'type': record.type, 'name': record.name, - 'data': record.content, + 'data': record.type == 'MX' ? '@' : record.content, 'ttl': record.ttl, 'priority': record.priority, }, From 120a8fc64427637889dad089f8f1d8d7f0ab0f78 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 10 Jan 2023 21:24:26 +0400 Subject: [PATCH 330/732] feat: Implement proper DNS entries creation for Digital Ocean --- .../dns_providers/digital_ocean_dns/digital_ocean_dns.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index b98a2794..309c26a8 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -188,7 +188,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { '/domains/$domainName/records', data: { 'type': record.type, - 'name': record.name, + 'name': record.name == domainName ? '@' : record.name, 'data': record.type == 'MX' ? '@' : record.content, 'ttl': record.ttl, 'priority': record.priority, From 3b962c5f5ae0da5c7572360b66cc9726d1cecb2a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 11 Jan 2023 22:01:46 +0400 Subject: [PATCH 331/732] feat: Adapt Desired DNS Records checking for Digital Ocean --- .../dns_providers/cloudflare/cloudflare.dart | 82 ++++++++++++ .../dns_providers/desired_dns_record.dart | 44 +++++++ .../digital_ocean_dns/digital_ocean_dns.dart | 90 +++++++++++++ .../rest_maps/dns_providers/dns_provider.dart | 7 + .../cubit/dns_records/dns_records_cubit.dart | 50 ++++--- lib/ui/pages/dns_details/dns_details.dart | 13 +- lib/utils/network_utils.dart | 122 ------------------ 7 files changed, 261 insertions(+), 147 deletions(-) create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 433ee792..1da08c40 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -189,6 +189,88 @@ class CloudflareApi extends DnsProviderApi { return allRecords; } + @override + List getDesiredDnsRecords({ + final String? domainName, + final String? ipAddress, + final String? dkimPublicKey, + }) { + if (domainName == null || ipAddress == null) { + return []; + } + return [ + DesiredDnsRecord( + name: domainName, + content: ipAddress, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ipAddress, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ipAddress, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ipAddress, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ipAddress, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ipAddress, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ipAddress, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ipAddress, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: domainName, + content: domainName, + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: 'v=DMARC1; p=none', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: domainName, + content: 'v=spf1 a mx ip4:$ipAddress -all', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } + @override Future> createMultipleDnsRecords({ required final ServerDomain domain, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart b/lib/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart new file mode 100644 index 00000000..4a64d49e --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart @@ -0,0 +1,44 @@ +enum DnsRecordsCategory { + services, + email, + other, +} + +class DesiredDnsRecord { + const DesiredDnsRecord({ + required this.name, + required this.content, + this.type = 'A', + this.description = '', + this.category = DnsRecordsCategory.services, + this.isSatisfied = false, + this.displayName, + }); + + final String name; + final String type; + final String content; + final String description; + final String? displayName; + final DnsRecordsCategory category; + final bool isSatisfied; + + DesiredDnsRecord copyWith({ + final String? name, + final String? type, + final String? content, + final String? description, + final String? displayName, + final DnsRecordsCategory? category, + final bool? isSatisfied, + }) => + DesiredDnsRecord( + name: name ?? this.name, + type: type ?? this.type, + content: content ?? this.content, + description: description ?? this.description, + category: category ?? this.category, + isSatisfied: isSatisfied ?? this.isSatisfied, + displayName: displayName ?? this.displayName, + ); +} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index 309c26a8..b1485312 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -171,6 +171,96 @@ class DigitalOceanDnsApi extends DnsProviderApi { return allRecords; } + @override + List getDesiredDnsRecords({ + final String? domainName, + final String? ipAddress, + final String? dkimPublicKey, + }) { + if (domainName == null || ipAddress == null) { + return []; + } + return [ + DesiredDnsRecord( + name: '@', + content: ipAddress, + description: 'record.root', + displayName: domainName, + ), + DesiredDnsRecord( + name: 'api', + content: ipAddress, + description: 'record.api', + displayName: 'api.$domainName', + ), + DesiredDnsRecord( + name: 'cloud', + content: ipAddress, + description: 'record.cloud', + displayName: 'cloud.$domainName', + ), + DesiredDnsRecord( + name: 'git', + content: ipAddress, + description: 'record.git', + displayName: 'git.$domainName', + ), + DesiredDnsRecord( + name: 'meet', + content: ipAddress, + description: 'record.meet', + displayName: 'meet.$domainName', + ), + DesiredDnsRecord( + name: 'social', + content: ipAddress, + description: 'record.social', + displayName: 'social.$domainName', + ), + DesiredDnsRecord( + name: 'password', + content: ipAddress, + description: 'record.password', + displayName: 'password.$domainName', + ), + DesiredDnsRecord( + name: 'vpn', + content: ipAddress, + description: 'record.vpn', + displayName: 'vpn.$domainName', + ), + DesiredDnsRecord( + name: domainName, + content: domainName, + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: 'v=DMARC1; p=none', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: domainName, + content: 'v=spf1 a mx ip4:$ipAddress -all', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } + @override Future> createMultipleDnsRecords({ required final ServerDomain domain, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index ce308121..0d010242 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -1,9 +1,11 @@ import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +export 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; class DomainNotFoundException implements Exception { DomainNotFoundException(this.message); @@ -14,6 +16,11 @@ abstract class DnsProviderApi extends ApiMap { Future> getDnsRecords({ required final ServerDomain domain, }); + List getDesiredDnsRecords({ + final String? domainName, + final String? ipAddress, + final String? dkimPublicKey, + }); Future> removeSimilarRecords({ required final ServerDomain domain, final String? ip4, diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 3403dc68..589fb1ff 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -25,11 +25,14 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: getDesiredDnsRecords( - serverInstallationCubit.state.serverDomain?.domainName, - '', - '', - ), + dnsRecords: ApiController.currentDnsProviderApiFactory! + .getDnsProvider() + .getDesiredDnsRecords( + domainName: + serverInstallationCubit.state.serverDomain?.domainName, + dkimPublicKey: '', + ipAddress: '', + ), ), ); @@ -44,16 +47,23 @@ class DnsRecordsCubit .getDnsRecords(domain: domain); final String? dkimPublicKey = extractDkimRecord(await api.getDnsRecords())?.content; - final List desiredRecords = - getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey); + final List desiredRecords = ApiController + .currentDnsProviderApiFactory! + .getDnsProvider() + .getDesiredDnsRecords( + domainName: domain.domainName, + ipAddress: ipAddress, + dkimPublicKey: dkimPublicKey, + ); final List foundRecords = []; - for (final DesiredDnsRecord record in desiredRecords) { - if (record.description == 'record.dkim') { + for (final DesiredDnsRecord desiredRecord in desiredRecords) { + if (desiredRecord.description == 'record.dkim') { final DnsRecord foundRecord = records.firstWhere( - (final r) => r.name == record.name && r.type == record.type, + (final r) => + r.name == desiredRecord.name && r.type == desiredRecord.type, orElse: () => DnsRecord( - name: record.name, - type: record.type, + name: desiredRecord.name, + type: desiredRecord.type, content: '', ttl: 800, proxied: false, @@ -65,22 +75,22 @@ class DnsRecordsCubit final String? foundContent = foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); final String content = - record.content.replaceAll(RegExp(r'\s+'), ''); + desiredRecord.content.replaceAll(RegExp(r'\s+'), ''); if (foundContent == content) { - foundRecords.add(record.copyWith(isSatisfied: true)); + foundRecords.add(desiredRecord.copyWith(isSatisfied: true)); } else { - foundRecords.add(record.copyWith(isSatisfied: false)); + foundRecords.add(desiredRecord.copyWith(isSatisfied: false)); } } else { if (records.any( (final r) => - r.name == record.name && - r.type == record.type && - r.content == record.content, + r.name == desiredRecord.name && + r.type == desiredRecord.type && + r.content == desiredRecord.content, )) { - foundRecords.add(record.copyWith(isSatisfied: true)); + foundRecords.add(desiredRecord.copyWith(isSatisfied: true)); } else { - foundRecords.add(record.copyWith(isSatisfied: false)); + foundRecords.add(desiredRecord.copyWith(isSatisfied: false)); } } } diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 692921eb..98f23979 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -1,12 +1,12 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/utils/network_utils.dart'; class DnsDetailsPage extends StatefulWidget { const DnsDetailsPage({super.key}); @@ -109,9 +109,12 @@ class _DnsDetailsPageState extends State { heroIcon: BrandIcons.globe, heroTitle: 'domain.screen_title'.tr(), children: [ - _getStateCard(dnsCubit.dnsState, () { - context.read().fix(); - }), + _getStateCard( + dnsCubit.dnsState, + () { + context.read().fix(); + }, + ), const SizedBox(height: 16.0), ListTile( title: Text( @@ -150,7 +153,7 @@ class _DnsDetailsPageState extends State { dnsRecord.description.tr(), ), subtitle: Text( - dnsRecord.name, + dnsRecord.displayName ?? dnsRecord.name, ), ), ], diff --git a/lib/utils/network_utils.dart b/lib/utils/network_utils.dart index 1a8f0df2..a94ecb35 100644 --- a/lib/utils/network_utils.dart +++ b/lib/utils/network_utils.dart @@ -1,128 +1,6 @@ import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:url_launcher/url_launcher.dart'; -enum DnsRecordsCategory { - services, - email, - other, -} - -class DesiredDnsRecord { - const DesiredDnsRecord({ - required this.name, - required this.content, - this.type = 'A', - this.description = '', - this.category = DnsRecordsCategory.services, - this.isSatisfied = false, - }); - - final String name; - final String type; - final String content; - final String description; - final DnsRecordsCategory category; - final bool isSatisfied; - - DesiredDnsRecord copyWith({ - final String? name, - final String? type, - final String? content, - final String? description, - final DnsRecordsCategory? category, - final bool? isSatisfied, - }) => - DesiredDnsRecord( - name: name ?? this.name, - type: type ?? this.type, - content: content ?? this.content, - description: description ?? this.description, - category: category ?? this.category, - isSatisfied: isSatisfied ?? this.isSatisfied, - ); -} - -List getDesiredDnsRecords( - final String? domainName, - final String? ipAddress, - final String? dkimPublicKey, -) { - if (domainName == null || ipAddress == null) { - return []; - } - return [ - DesiredDnsRecord( - name: domainName, - content: ipAddress, - description: 'record.root', - ), - DesiredDnsRecord( - name: 'api.$domainName', - content: ipAddress, - description: 'record.api', - ), - DesiredDnsRecord( - name: 'cloud.$domainName', - content: ipAddress, - description: 'record.cloud', - ), - DesiredDnsRecord( - name: 'git.$domainName', - content: ipAddress, - description: 'record.git', - ), - DesiredDnsRecord( - name: 'meet.$domainName', - content: ipAddress, - description: 'record.meet', - ), - DesiredDnsRecord( - name: 'social.$domainName', - content: ipAddress, - description: 'record.social', - ), - DesiredDnsRecord( - name: 'password.$domainName', - content: ipAddress, - description: 'record.password', - ), - DesiredDnsRecord( - name: 'vpn.$domainName', - content: ipAddress, - description: 'record.vpn', - ), - DesiredDnsRecord( - name: domainName, - content: domainName, - description: 'record.mx', - type: 'MX', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '_dmarc.$domainName', - content: 'v=DMARC1; p=none', - description: 'record.dmarc', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: domainName, - content: 'v=spf1 a mx ip4:$ipAddress -all', - description: 'record.spf', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - if (dkimPublicKey != null) - DesiredDnsRecord( - name: 'selector._domainkey.$domainName', - content: dkimPublicKey, - description: 'record.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - ]; -} - DnsRecord? extractDkimRecord(final List records) { DnsRecord? dkimRecord; From 7d2b474210340e2307c256ffa407c15ab5e8deba Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 14 Jan 2023 01:14:28 +0200 Subject: [PATCH 332/732] try to fix pipeline --- ci.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ci.py b/ci.py index b0b9e996..85860fb6 100755 --- a/ci.py +++ b/ci.py @@ -6,7 +6,7 @@ import requests import yaml import argparse -CONTAINER_IMAGE = "localhost/flutter-build-env" +CONTAINER_IMAGE = "registry.selfprivacy.org:5001/flutter-build-env" HOST_HOME = "/var/lib/drone-runner-exec" CONTAINER_HOME = "/tmp/builder" HOST_MOUNTED_VOLUME = f"{HOST_HOME}/.local/share/containers/storage/volumes/release/_data" @@ -36,14 +36,14 @@ def podman_offline(dir, *args): "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get("STANDALONE_KEYSTORE_PASS"), "--env", "GOOGLE_KEYSTORE_PASS=" + os.environ.get("GOOGLE_KEYSTORE_PASS"), "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", - CONTAINER_IMAGE, "bash", "-c", ' '.join(args) + "--ulimit", "nofile:102400:102400", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) def podman_online(dir, *args): subprocess.run(["podman", "run", "--rm", "--cap-add=CHOWN", f"--workdir={dir}", "-v", os.getcwd() + f":{CONTAINER_HOME}/src", "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", - CONTAINER_IMAGE, "bash", "-c", ' '.join(args) + "--ulimit", "nofile:102400:102400",CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) # Utilities @@ -93,17 +93,17 @@ def gitea_upload_attachment(file): # Targets def build_linux(): - podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/flutter_pub_cache", + podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/flutter_pub_cache", "&& flutter pub get --offline", "&& flutter build linux") def build_apk(): - podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", - "&& flutter pub get --offline", + podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", + "&& flutter pub get", "&& flutter build apk --flavor production") def build_bundle(): - podman_offline(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", - "&& flutter pub get --offline", + podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", + "&& flutter pub get", "&& flutter build appbundle --flavor production") def sign_apk_standalone(): @@ -163,10 +163,12 @@ def deploy_fdroid_repo(): def ci_build_linux(): podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/flutter_pub_cache", + "&& flutter pub get", "&& flutter build linux --debug") def ci_build_apk(): podman_online(f"{CONTAINER_HOME}/src", "chown -R $(id -u):$(id -g) /tmp/gradle /tmp/flutter_pub_cache", + "&& flutter pub get", "&& flutter build apk --flavor nightly") def ci_run_tests(): From 90b1cc67e40ea45df8a7385660971720ed787d72 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Sat, 14 Jan 2023 01:22:20 +0200 Subject: [PATCH 333/732] typo --- ci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.py b/ci.py index 85860fb6..a76f6654 100755 --- a/ci.py +++ b/ci.py @@ -36,14 +36,14 @@ def podman_offline(dir, *args): "--env", "STANDALONE_KEYSTORE_PASS=" + os.environ.get("STANDALONE_KEYSTORE_PASS"), "--env", "GOOGLE_KEYSTORE_PASS=" + os.environ.get("GOOGLE_KEYSTORE_PASS"), "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", - "--ulimit", "nofile:102400:102400", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) + "--ulimit", "nofile=102400:102400", CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) def podman_online(dir, *args): subprocess.run(["podman", "run", "--rm", "--cap-add=CHOWN", f"--workdir={dir}", "-v", os.getcwd() + f":{CONTAINER_HOME}/src", "--user", os.getuid().__str__() + ":" + os.getgid().__str__(), "--userns=keep-id", - "--ulimit", "nofile:102400:102400",CONTAINER_IMAGE, "bash", "-c", ' '.join(args) + "--ulimit", "nofile=102400:102400",CONTAINER_IMAGE, "bash", "-c", ' '.join(args) ], check=True) # Utilities From 841aee73e89a9f784a9c9763e35147d66c1b67fb Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 16 Jan 2023 21:25:48 +0400 Subject: [PATCH 334/732] feat: Implement Digital Ocean DNS email entries --- .../digital_ocean_dns/digital_ocean_dns.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index b1485312..b5b33f98 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -229,22 +229,22 @@ class DigitalOceanDnsApi extends DnsProviderApi { description: 'record.vpn', displayName: 'vpn.$domainName', ), - DesiredDnsRecord( - name: domainName, - content: domainName, + const DesiredDnsRecord( + name: '@', + content: '@', description: 'record.mx', type: 'MX', category: DnsRecordsCategory.email, ), - DesiredDnsRecord( - name: '_dmarc.$domainName', + const DesiredDnsRecord( + name: '_dmarc', content: 'v=DMARC1; p=none', description: 'record.dmarc', type: 'TXT', category: DnsRecordsCategory.email, ), DesiredDnsRecord( - name: domainName, + name: '@', content: 'v=spf1 a mx ip4:$ipAddress -all', description: 'record.spf', type: 'TXT', @@ -252,7 +252,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { ), if (dkimPublicKey != null) DesiredDnsRecord( - name: 'selector._domainkey.$domainName', + name: 'selector._domainkey', content: dkimPublicKey, description: 'record.dkim', type: 'TXT', From 439b079c09a6bafa2e844ddc021312fd88a4b538 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 17 Jan 2023 03:20:54 +0200 Subject: [PATCH 335/732] Include AABs in Release Stage --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 76bf5dd7..8ea23a42 100644 --- a/.drone.yml +++ b/.drone.yml @@ -157,8 +157,7 @@ steps: - name: Push Artifacts to the Release Volume commands: -# - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.aab *.tar.zstd - - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.tar.zstd + - git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.aab *.tar.zstd - git commit -m Release - git archive --format=tar HEAD | podman volume import release - From 08cd59a709b73963315cb56a4c0526b3a32125cb Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 17 Jan 2023 17:27:32 +0400 Subject: [PATCH 336/732] feat: Implement DNS_PROVIDER_TYPE variable for infecting server --- .../digital_ocean/digital_ocean.dart | 4 +++- .../server_providers/hetzner/hetzner.dart | 6 +++++- .../server_providers/server_provider.dart | 15 +++++++++++++++ .../server_installation_repository.dart | 3 +++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 4beb53f7..438e92bf 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -332,6 +332,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }) async { ServerHostingDetails? serverDetails; @@ -344,9 +345,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String formattedHostname = getHostnameFromDomain(domainName); const String infectBranch = 'providers/digital-ocean'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; + final String dnsProviderType = dnsProviderToInfectName(dnsProvider); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); Response? serverCreateResponse; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 7f51c768..b9761133 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -356,6 +356,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }) async { final APIGenericResult newVolumeResponse = await createVolume(); @@ -374,6 +375,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { domainName: domainName, volume: newVolumeResponse.data!, serverType: serverType, + dnsProvider: dnsProvider, ); } @@ -383,6 +385,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String domainName, required final ServerVolume volume, required final String serverType, + required final DnsProvider dnsProvider, }) async { final Dio client = await getClient(); @@ -395,9 +398,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); + final String dnsProviderType = dnsProviderToInfectName(dnsProvider); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; Response? serverCreateResponse; ServerHostingDetails? serverDetails; diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index c858d67b..32d31764 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -39,6 +39,7 @@ abstract class ServerProviderApi extends ApiMap { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }); Future> createReverseDns({ required final ServerHostingDetails serverDetails, @@ -54,6 +55,20 @@ abstract class ServerProviderApi extends ApiMap { final DateTime end, ); + String dnsProviderToInfectName(final DnsProvider dnsProvider) { + String dnsProviderType; + switch (dnsProvider) { + case DnsProvider.digitalOcean: + dnsProviderType = 'DIGITALOCEAN'; + break; + case DnsProvider.cloudflare: + default: + dnsProviderType = 'CLOUDFLARE'; + break; + } + return dnsProviderType; + } + /// Provider name key which lets infect understand what kind of installation /// it requires, for example 'digitaloceal' for Digital Ocean String get infectProviderName; diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 5f98229f..3b787a70 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -260,6 +260,7 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { final APIGenericResult createResult = await api.createServer( + dnsProvider: getIt().dnsProvider!, dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, @@ -284,6 +285,7 @@ class ServerInstallationRepository { try { final APIGenericResult createServerResult = await api.createServer( + dnsProvider: getIt().dnsProvider!, dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, @@ -308,6 +310,7 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { final APIGenericResult createResult = await api.createServer( + dnsProvider: getIt().dnsProvider!, dnsApiToken: cloudFlareKey, rootUser: rootUser, domainName: domainName, From 14263083a57c3624fdd684f136aab7489019434a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 17 Jan 2023 18:33:25 +0400 Subject: [PATCH 337/732] feat: Implement server recovery for different dns providers --- .../graphql_maps/schema/schema.graphql | 3 +- .../graphql_maps/schema/schema.graphql.dart | 2 + .../graphql_maps/schema/server_api.graphql | 8 + .../schema/server_api.graphql.dart | 412 ++++++++++++++++++ .../schema/server_api.graphql.g.dart | 52 +++ .../schema/server_settings.graphql.g.dart | 1 + .../graphql_maps/server_api/server_api.dart | 20 + .../server_installation_cubit.dart | 16 +- lib/logic/models/hive/server_domain.dart | 14 +- 9 files changed, 523 insertions(+), 5 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index ed167742..81c703d1 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -75,7 +75,8 @@ type DeviceApiTokenMutationReturn implements MutationReturnInterface { } enum DnsProvider { - CLOUDFLARE + CLOUDFLARE, + DIGITALOCEAN } type DnsRecord { diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 11d49a43..305ca781 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -687,6 +687,8 @@ class _CopyWithStubImpl$Input$UserMutationInput enum Enum$DnsProvider { @JsonValue('CLOUDFLARE') CLOUDFLARE, + @JsonValue('DIGITALOCEAN') + DIGITALOCEAN, $unknown } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index d4339094..f1012815 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -72,6 +72,14 @@ query SystemServerProvider { } } +query SystemDnsProvider { + system { + domainInfo { + provider + } + } +} + query GetApiTokens { api { devices { diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 09671eed..16c4a4a6 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -3597,6 +3597,418 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system$provider call({Enum$ServerProvider? provider, String? $__typename}) => _res; } +@JsonSerializable(explicitToJson: true) +class Query$SystemDnsProvider { + Query$SystemDnsProvider({required this.system, required this.$__typename}); + + @override + factory Query$SystemDnsProvider.fromJson(Map json) => + _$Query$SystemDnsProviderFromJson(json); + + final Query$SystemDnsProvider$system system; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemDnsProviderToJson(this); + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([l$system, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemDnsProvider) || runtimeType != other.runtimeType) + return false; + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider on Query$SystemDnsProvider { + CopyWith$Query$SystemDnsProvider get copyWith => + CopyWith$Query$SystemDnsProvider(this, (i) => i); +} + +abstract class CopyWith$Query$SystemDnsProvider { + factory CopyWith$Query$SystemDnsProvider(Query$SystemDnsProvider instance, + TRes Function(Query$SystemDnsProvider) then) = + _CopyWithImpl$Query$SystemDnsProvider; + + factory CopyWith$Query$SystemDnsProvider.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider; + + TRes call({Query$SystemDnsProvider$system? system, String? $__typename}); + CopyWith$Query$SystemDnsProvider$system get system; +} + +class _CopyWithImpl$Query$SystemDnsProvider + implements CopyWith$Query$SystemDnsProvider { + _CopyWithImpl$Query$SystemDnsProvider(this._instance, this._then); + + final Query$SystemDnsProvider _instance; + + final TRes Function(Query$SystemDnsProvider) _then; + + static const _undefined = {}; + + TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemDnsProvider( + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemDnsProvider$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemDnsProvider$system get system { + final local$system = _instance.system; + return CopyWith$Query$SystemDnsProvider$system( + local$system, (e) => call(system: e)); + } +} + +class _CopyWithStubImpl$Query$SystemDnsProvider + implements CopyWith$Query$SystemDnsProvider { + _CopyWithStubImpl$Query$SystemDnsProvider(this._res); + + TRes _res; + + call({Query$SystemDnsProvider$system? system, String? $__typename}) => _res; + CopyWith$Query$SystemDnsProvider$system get system => + CopyWith$Query$SystemDnsProvider$system.stub(_res); +} + +const documentNodeQuerySystemDnsProvider = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'SystemDnsProvider'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$SystemDnsProvider _parserFn$Query$SystemDnsProvider( + Map data) => + Query$SystemDnsProvider.fromJson(data); + +class Options$Query$SystemDnsProvider + extends graphql.QueryOptions { + Options$Query$SystemDnsProvider( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemDnsProvider, + parserFn: _parserFn$Query$SystemDnsProvider); +} + +class WatchOptions$Query$SystemDnsProvider + extends graphql.WatchQueryOptions { + WatchOptions$Query$SystemDnsProvider( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemDnsProvider, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemDnsProvider); +} + +class FetchMoreOptions$Query$SystemDnsProvider + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$SystemDnsProvider( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQuerySystemDnsProvider); +} + +extension ClientExtension$Query$SystemDnsProvider on graphql.GraphQLClient { + Future> query$SystemDnsProvider( + [Options$Query$SystemDnsProvider? options]) async => + await this.query(options ?? Options$Query$SystemDnsProvider()); + graphql.ObservableQuery watchQuery$SystemDnsProvider( + [WatchOptions$Query$SystemDnsProvider? options]) => + this.watchQuery(options ?? WatchOptions$Query$SystemDnsProvider()); + void writeQuery$SystemDnsProvider( + {required Query$SystemDnsProvider data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemDnsProvider)), + data: data.toJson(), + broadcast: broadcast); + Query$SystemDnsProvider? readQuery$SystemDnsProvider( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemDnsProvider)), + optimistic: optimistic); + return result == null ? null : Query$SystemDnsProvider.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemDnsProvider$system { + Query$SystemDnsProvider$system( + {required this.domainInfo, required this.$__typename}); + + @override + factory Query$SystemDnsProvider$system.fromJson(Map json) => + _$Query$SystemDnsProvider$systemFromJson(json); + + final Query$SystemDnsProvider$system$domainInfo domainInfo; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemDnsProvider$systemToJson(this); + int get hashCode { + final l$domainInfo = domainInfo; + final l$$__typename = $__typename; + return Object.hashAll([l$domainInfo, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemDnsProvider$system) || + runtimeType != other.runtimeType) return false; + final l$domainInfo = domainInfo; + final lOther$domainInfo = other.domainInfo; + if (l$domainInfo != lOther$domainInfo) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider$system + on Query$SystemDnsProvider$system { + CopyWith$Query$SystemDnsProvider$system + get copyWith => CopyWith$Query$SystemDnsProvider$system(this, (i) => i); +} + +abstract class CopyWith$Query$SystemDnsProvider$system { + factory CopyWith$Query$SystemDnsProvider$system( + Query$SystemDnsProvider$system instance, + TRes Function(Query$SystemDnsProvider$system) then) = + _CopyWithImpl$Query$SystemDnsProvider$system; + + factory CopyWith$Query$SystemDnsProvider$system.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider$system; + + TRes call( + {Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename}); + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo; +} + +class _CopyWithImpl$Query$SystemDnsProvider$system + implements CopyWith$Query$SystemDnsProvider$system { + _CopyWithImpl$Query$SystemDnsProvider$system(this._instance, this._then); + + final Query$SystemDnsProvider$system _instance; + + final TRes Function(Query$SystemDnsProvider$system) _then; + + static const _undefined = {}; + + TRes call( + {Object? domainInfo = _undefined, + Object? $__typename = _undefined}) => + _then(Query$SystemDnsProvider$system( + domainInfo: domainInfo == _undefined || domainInfo == null + ? _instance.domainInfo + : (domainInfo as Query$SystemDnsProvider$system$domainInfo), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo { + final local$domainInfo = _instance.domainInfo; + return CopyWith$Query$SystemDnsProvider$system$domainInfo( + local$domainInfo, (e) => call(domainInfo: e)); + } +} + +class _CopyWithStubImpl$Query$SystemDnsProvider$system + implements CopyWith$Query$SystemDnsProvider$system { + _CopyWithStubImpl$Query$SystemDnsProvider$system(this._res); + + TRes _res; + + call( + {Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename}) => + _res; + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo => + CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(_res); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemDnsProvider$system$domainInfo { + Query$SystemDnsProvider$system$domainInfo( + {required this.provider, required this.$__typename}); + + @override + factory Query$SystemDnsProvider$system$domainInfo.fromJson( + Map json) => + _$Query$SystemDnsProvider$system$domainInfoFromJson(json); + + @JsonKey(unknownEnumValue: Enum$DnsProvider.$unknown) + final Enum$DnsProvider provider; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemDnsProvider$system$domainInfoToJson(this); + int get hashCode { + final l$provider = provider; + final l$$__typename = $__typename; + return Object.hashAll([l$provider, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemDnsProvider$system$domainInfo) || + runtimeType != other.runtimeType) return false; + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider$system$domainInfo + on Query$SystemDnsProvider$system$domainInfo { + CopyWith$Query$SystemDnsProvider$system$domainInfo< + Query$SystemDnsProvider$system$domainInfo> + get copyWith => + CopyWith$Query$SystemDnsProvider$system$domainInfo(this, (i) => i); +} + +abstract class CopyWith$Query$SystemDnsProvider$system$domainInfo { + factory CopyWith$Query$SystemDnsProvider$system$domainInfo( + Query$SystemDnsProvider$system$domainInfo instance, + TRes Function(Query$SystemDnsProvider$system$domainInfo) then) = + _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo; + + factory CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo; + + TRes call({Enum$DnsProvider? provider, String? $__typename}); +} + +class _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo + implements CopyWith$Query$SystemDnsProvider$system$domainInfo { + _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo( + this._instance, this._then); + + final Query$SystemDnsProvider$system$domainInfo _instance; + + final TRes Function(Query$SystemDnsProvider$system$domainInfo) _then; + + static const _undefined = {}; + + TRes call( + {Object? provider = _undefined, Object? $__typename = _undefined}) => + _then(Query$SystemDnsProvider$system$domainInfo( + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$DnsProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); +} + +class _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo + implements CopyWith$Query$SystemDnsProvider$system$domainInfo { + _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo(this._res); + + TRes _res; + + call({Enum$DnsProvider? provider, String? $__typename}) => _res; +} + @JsonSerializable(explicitToJson: true) class Query$GetApiTokens { Query$GetApiTokens({required this.api, required this.$__typename}); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart index f0ec390c..0d658310 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart @@ -382,6 +382,58 @@ const _$Enum$ServerProviderEnumMap = { Enum$ServerProvider.$unknown: r'$unknown', }; +Query$SystemDnsProvider _$Query$SystemDnsProviderFromJson( + Map json) => + Query$SystemDnsProvider( + system: Query$SystemDnsProvider$system.fromJson( + json['system'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemDnsProviderToJson( + Query$SystemDnsProvider instance) => + { + 'system': instance.system.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemDnsProvider$system _$Query$SystemDnsProvider$systemFromJson( + Map json) => + Query$SystemDnsProvider$system( + domainInfo: Query$SystemDnsProvider$system$domainInfo.fromJson( + json['domainInfo'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemDnsProvider$systemToJson( + Query$SystemDnsProvider$system instance) => + { + 'domainInfo': instance.domainInfo.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemDnsProvider$system$domainInfo + _$Query$SystemDnsProvider$system$domainInfoFromJson( + Map json) => + Query$SystemDnsProvider$system$domainInfo( + provider: $enumDecode(_$Enum$DnsProviderEnumMap, json['provider'], + unknownValue: Enum$DnsProvider.$unknown), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemDnsProvider$system$domainInfoToJson( + Query$SystemDnsProvider$system$domainInfo instance) => + { + 'provider': _$Enum$DnsProviderEnumMap[instance.provider]!, + '__typename': instance.$__typename, + }; + +const _$Enum$DnsProviderEnumMap = { + Enum$DnsProvider.CLOUDFLARE: 'CLOUDFLARE', + Enum$DnsProvider.DIGITALOCEAN: 'DIGITALOCEAN', + Enum$DnsProvider.$unknown: r'$unknown', +}; + Query$GetApiTokens _$Query$GetApiTokensFromJson(Map json) => Query$GetApiTokens( api: Query$GetApiTokens$api.fromJson(json['api'] as Map), diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart index c928b177..6f4cb2d4 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart @@ -208,6 +208,7 @@ Map _$Query$DomainInfo$system$domainInfoToJson( const _$Enum$DnsProviderEnumMap = { Enum$DnsProvider.CLOUDFLARE: 'CLOUDFLARE', + Enum$DnsProvider.DIGITALOCEAN: 'DIGITALOCEAN', Enum$DnsProvider.$unknown: r'$unknown', }; diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index bb703103..51da63ac 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dar import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; @@ -87,6 +88,25 @@ class ServerApi extends ApiMap return providerType; } + Future getDnsProviderType() async { + QueryResult response; + DnsProvider providerType = DnsProvider.unknown; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$SystemDnsProvider(); + if (response.hasException) { + print(response.exception.toString()); + } + providerType = DnsProvider.fromGraphQL( + response.parsedData!.system.domainInfo.provider, + ); + } catch (e) { + print(e); + } + return providerType; + } + Future isUsingBinds() async { QueryResult response; bool usesBinds = false; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 487e60c7..60a801fd 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -537,17 +537,27 @@ class ServerInstallationCubit extends Cubit { token, dataState.recoveryCapabilities, ); - final ServerProvider provider = await ServerApi( + final ServerProvider serverProvider = await ServerApi( customToken: serverDetails.apiToken, isWithToken: true, ).getServerProviderType(); - if (provider == ServerProvider.unknown) { + final DnsProvider dnsProvider = await ServerApi( + customToken: serverDetails.apiToken, + isWithToken: true, + ).getDnsProviderType(); + if (serverProvider == ServerProvider.unknown) { + getIt() + .showSnackBar('recovering.generic_error'.tr()); + return; + } + if (dnsProvider == DnsProvider.unknown) { getIt() .showSnackBar('recovering.generic_error'.tr()); return; } await repository.saveServerDetails(serverDetails); - setServerProviderType(provider); + setServerProviderType(serverProvider); + setDnsProviderType(dnsProvider); emit( dataState.copyWith( serverDetails: serverDetails, diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index a58ff5a1..0b8a5bc8 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -1,4 +1,5 @@ import 'package:hive/hive.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; part 'server_domain.g.dart'; @@ -30,5 +31,16 @@ enum DnsProvider { @HiveField(1) cloudflare, @HiveField(2) - digitalOcean, + digitalOcean; + + factory DnsProvider.fromGraphQL(final Enum$DnsProvider provider) { + switch (provider) { + case Enum$DnsProvider.CLOUDFLARE: + return cloudflare; + case Enum$DnsProvider.DIGITALOCEAN: + return digitalOcean; + default: + return unknown; + } + } } From f06ad3bf9cd9b8d36a80ae3137d5cec5d7be6370 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 20 Jan 2023 13:39:57 +0300 Subject: [PATCH 338/732] chore(translations): Add languages to md files --- assets/markdown/about-be.md | 12 ++++++++++ assets/markdown/about-cs.md | 12 ++++++++++ assets/markdown/about-de.md | 12 ++++++++++ assets/markdown/about-es.md | 12 ++++++++++ assets/markdown/about-fr.md | 12 ++++++++++ assets/markdown/about-it.md | 12 ++++++++++ assets/markdown/about-ja.md | 12 ++++++++++ assets/markdown/about-ka.md | 12 ++++++++++ assets/markdown/about-nl.md | 12 ++++++++++ assets/markdown/about-pl.md | 12 ++++++++++ assets/markdown/about-sk.md | 12 ++++++++++ assets/markdown/about-th.md | 12 ++++++++++ assets/markdown/about-uk.md | 12 ++++++++++ assets/markdown/how_backblaze-be.md | 8 +++++++ assets/markdown/how_backblaze-cs.md | 8 +++++++ assets/markdown/how_backblaze-de.md | 8 +++++++ assets/markdown/how_backblaze-es.md | 8 +++++++ assets/markdown/how_backblaze-fr.md | 8 +++++++ assets/markdown/how_backblaze-it.md | 8 +++++++ assets/markdown/how_backblaze-ja.md | 8 +++++++ assets/markdown/how_backblaze-ka.md | 8 +++++++ assets/markdown/how_backblaze-nl.md | 8 +++++++ assets/markdown/how_backblaze-pl.md | 8 +++++++ assets/markdown/how_backblaze-sk.md | 8 +++++++ assets/markdown/how_backblaze-th.md | 8 +++++++ assets/markdown/how_backblaze-uk.md | 8 +++++++ assets/markdown/how_cloudflare-be.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-cs.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-de.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-es.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-fr.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-it.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-ja.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-ka.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-nl.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-pl.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-sk.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-th.md | 17 ++++++++++++++ assets/markdown/how_cloudflare-uk.md | 17 ++++++++++++++ assets/markdown/how_digital_ocean-be.md | 12 ++++++++++ assets/markdown/how_digital_ocean-cs.md | 12 ++++++++++ assets/markdown/how_digital_ocean-de.md | 12 ++++++++++ assets/markdown/how_digital_ocean-es.md | 12 ++++++++++ assets/markdown/how_digital_ocean-fr.md | 12 ++++++++++ assets/markdown/how_digital_ocean-it.md | 12 ++++++++++ assets/markdown/how_digital_ocean-ja.md | 12 ++++++++++ assets/markdown/how_digital_ocean-ka.md | 12 ++++++++++ assets/markdown/how_digital_ocean-nl.md | 12 ++++++++++ assets/markdown/how_digital_ocean-pl.md | 12 ++++++++++ assets/markdown/how_digital_ocean-sk.md | 12 ++++++++++ assets/markdown/how_digital_ocean-th.md | 12 ++++++++++ assets/markdown/how_digital_ocean-uk.md | 12 ++++++++++ assets/markdown/how_fallback_old-be.md | 3 +++ assets/markdown/how_fallback_old-cs.md | 3 +++ assets/markdown/how_fallback_old-de.md | 3 +++ assets/markdown/how_fallback_old-es.md | 3 +++ assets/markdown/how_fallback_old-fr.md | 3 +++ assets/markdown/how_fallback_old-it.md | 3 +++ assets/markdown/how_fallback_old-ja.md | 3 +++ assets/markdown/how_fallback_old-ka.md | 3 +++ assets/markdown/how_fallback_old-nl.md | 3 +++ assets/markdown/how_fallback_old-pl.md | 3 +++ assets/markdown/how_fallback_old-sk.md | 3 +++ assets/markdown/how_fallback_old-th.md | 3 +++ assets/markdown/how_fallback_old-uk.md | 3 +++ assets/markdown/how_fallback_ssh-be.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-cs.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-de.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-es.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-fr.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-it.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-ja.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-ka.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-nl.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-pl.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-sk.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-th.md | 19 +++++++++++++++ assets/markdown/how_fallback_ssh-uk.md | 19 +++++++++++++++ assets/markdown/how_fallback_terminal-be.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-cs.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-de.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-es.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-fr.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-it.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-ja.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-ka.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-nl.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-pl.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-sk.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-th.md | 26 +++++++++++++++++++++ assets/markdown/how_fallback_terminal-uk.md | 26 +++++++++++++++++++++ assets/markdown/how_hetzner-be.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-cs.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-de.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-es.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-fr.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-it.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-ja.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-ka.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-nl.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-pl.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-sk.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-th.md | 23 ++++++++++++++++++ assets/markdown/how_hetzner-uk.md | 23 ++++++++++++++++++ 104 files changed, 1560 insertions(+) create mode 100644 assets/markdown/about-be.md create mode 100644 assets/markdown/about-cs.md create mode 100644 assets/markdown/about-de.md create mode 100644 assets/markdown/about-es.md create mode 100644 assets/markdown/about-fr.md create mode 100644 assets/markdown/about-it.md create mode 100644 assets/markdown/about-ja.md create mode 100644 assets/markdown/about-ka.md create mode 100644 assets/markdown/about-nl.md create mode 100644 assets/markdown/about-pl.md create mode 100644 assets/markdown/about-sk.md create mode 100644 assets/markdown/about-th.md create mode 100644 assets/markdown/about-uk.md create mode 100644 assets/markdown/how_backblaze-be.md create mode 100644 assets/markdown/how_backblaze-cs.md create mode 100644 assets/markdown/how_backblaze-de.md create mode 100644 assets/markdown/how_backblaze-es.md create mode 100644 assets/markdown/how_backblaze-fr.md create mode 100644 assets/markdown/how_backblaze-it.md create mode 100644 assets/markdown/how_backblaze-ja.md create mode 100644 assets/markdown/how_backblaze-ka.md create mode 100644 assets/markdown/how_backblaze-nl.md create mode 100644 assets/markdown/how_backblaze-pl.md create mode 100644 assets/markdown/how_backblaze-sk.md create mode 100644 assets/markdown/how_backblaze-th.md create mode 100644 assets/markdown/how_backblaze-uk.md create mode 100644 assets/markdown/how_cloudflare-be.md create mode 100644 assets/markdown/how_cloudflare-cs.md create mode 100644 assets/markdown/how_cloudflare-de.md create mode 100644 assets/markdown/how_cloudflare-es.md create mode 100644 assets/markdown/how_cloudflare-fr.md create mode 100644 assets/markdown/how_cloudflare-it.md create mode 100644 assets/markdown/how_cloudflare-ja.md create mode 100644 assets/markdown/how_cloudflare-ka.md create mode 100644 assets/markdown/how_cloudflare-nl.md create mode 100644 assets/markdown/how_cloudflare-pl.md create mode 100644 assets/markdown/how_cloudflare-sk.md create mode 100644 assets/markdown/how_cloudflare-th.md create mode 100644 assets/markdown/how_cloudflare-uk.md create mode 100644 assets/markdown/how_digital_ocean-be.md create mode 100644 assets/markdown/how_digital_ocean-cs.md create mode 100644 assets/markdown/how_digital_ocean-de.md create mode 100644 assets/markdown/how_digital_ocean-es.md create mode 100644 assets/markdown/how_digital_ocean-fr.md create mode 100644 assets/markdown/how_digital_ocean-it.md create mode 100644 assets/markdown/how_digital_ocean-ja.md create mode 100644 assets/markdown/how_digital_ocean-ka.md create mode 100644 assets/markdown/how_digital_ocean-nl.md create mode 100644 assets/markdown/how_digital_ocean-pl.md create mode 100644 assets/markdown/how_digital_ocean-sk.md create mode 100644 assets/markdown/how_digital_ocean-th.md create mode 100644 assets/markdown/how_digital_ocean-uk.md create mode 100644 assets/markdown/how_fallback_old-be.md create mode 100644 assets/markdown/how_fallback_old-cs.md create mode 100644 assets/markdown/how_fallback_old-de.md create mode 100644 assets/markdown/how_fallback_old-es.md create mode 100644 assets/markdown/how_fallback_old-fr.md create mode 100644 assets/markdown/how_fallback_old-it.md create mode 100644 assets/markdown/how_fallback_old-ja.md create mode 100644 assets/markdown/how_fallback_old-ka.md create mode 100644 assets/markdown/how_fallback_old-nl.md create mode 100644 assets/markdown/how_fallback_old-pl.md create mode 100644 assets/markdown/how_fallback_old-sk.md create mode 100644 assets/markdown/how_fallback_old-th.md create mode 100644 assets/markdown/how_fallback_old-uk.md create mode 100644 assets/markdown/how_fallback_ssh-be.md create mode 100644 assets/markdown/how_fallback_ssh-cs.md create mode 100644 assets/markdown/how_fallback_ssh-de.md create mode 100644 assets/markdown/how_fallback_ssh-es.md create mode 100644 assets/markdown/how_fallback_ssh-fr.md create mode 100644 assets/markdown/how_fallback_ssh-it.md create mode 100644 assets/markdown/how_fallback_ssh-ja.md create mode 100644 assets/markdown/how_fallback_ssh-ka.md create mode 100644 assets/markdown/how_fallback_ssh-nl.md create mode 100644 assets/markdown/how_fallback_ssh-pl.md create mode 100644 assets/markdown/how_fallback_ssh-sk.md create mode 100644 assets/markdown/how_fallback_ssh-th.md create mode 100644 assets/markdown/how_fallback_ssh-uk.md create mode 100644 assets/markdown/how_fallback_terminal-be.md create mode 100644 assets/markdown/how_fallback_terminal-cs.md create mode 100644 assets/markdown/how_fallback_terminal-de.md create mode 100644 assets/markdown/how_fallback_terminal-es.md create mode 100644 assets/markdown/how_fallback_terminal-fr.md create mode 100644 assets/markdown/how_fallback_terminal-it.md create mode 100644 assets/markdown/how_fallback_terminal-ja.md create mode 100644 assets/markdown/how_fallback_terminal-ka.md create mode 100644 assets/markdown/how_fallback_terminal-nl.md create mode 100644 assets/markdown/how_fallback_terminal-pl.md create mode 100644 assets/markdown/how_fallback_terminal-sk.md create mode 100644 assets/markdown/how_fallback_terminal-th.md create mode 100644 assets/markdown/how_fallback_terminal-uk.md create mode 100644 assets/markdown/how_hetzner-be.md create mode 100644 assets/markdown/how_hetzner-cs.md create mode 100644 assets/markdown/how_hetzner-de.md create mode 100644 assets/markdown/how_hetzner-es.md create mode 100644 assets/markdown/how_hetzner-fr.md create mode 100644 assets/markdown/how_hetzner-it.md create mode 100644 assets/markdown/how_hetzner-ja.md create mode 100644 assets/markdown/how_hetzner-ka.md create mode 100644 assets/markdown/how_hetzner-nl.md create mode 100644 assets/markdown/how_hetzner-pl.md create mode 100644 assets/markdown/how_hetzner-sk.md create mode 100644 assets/markdown/how_hetzner-th.md create mode 100644 assets/markdown/how_hetzner-uk.md diff --git a/assets/markdown/about-be.md b/assets/markdown/about-be.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-be.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-cs.md b/assets/markdown/about-cs.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-cs.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-de.md b/assets/markdown/about-de.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-de.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-es.md b/assets/markdown/about-es.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-es.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-fr.md b/assets/markdown/about-fr.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-fr.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-it.md b/assets/markdown/about-it.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-it.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-ja.md b/assets/markdown/about-ja.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-ja.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-ka.md b/assets/markdown/about-ka.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-ka.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-nl.md b/assets/markdown/about-nl.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-nl.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-pl.md b/assets/markdown/about-pl.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-pl.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-sk.md b/assets/markdown/about-sk.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-sk.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-th.md b/assets/markdown/about-th.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-th.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/about-uk.md b/assets/markdown/about-uk.md new file mode 100644 index 00000000..3963aa6e --- /dev/null +++ b/assets/markdown/about-uk.md @@ -0,0 +1,12 @@ +### About us + +More and more corporations want to control our data. +We want to have full control of our **data** on our own. + +### Our mission + +Digital independence and privacy, available to everyone + +### Target + +Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file diff --git a/assets/markdown/how_backblaze-be.md b/assets/markdown/how_backblaze-be.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-be.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-cs.md b/assets/markdown/how_backblaze-cs.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-cs.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-de.md b/assets/markdown/how_backblaze-de.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-de.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-es.md b/assets/markdown/how_backblaze-es.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-es.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-fr.md b/assets/markdown/how_backblaze-fr.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-fr.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-it.md b/assets/markdown/how_backblaze-it.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-it.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-ja.md b/assets/markdown/how_backblaze-ja.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-ja.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-ka.md b/assets/markdown/how_backblaze-ka.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-ka.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-nl.md b/assets/markdown/how_backblaze-nl.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-nl.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-pl.md b/assets/markdown/how_backblaze-pl.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-pl.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-sk.md b/assets/markdown/how_backblaze-sk.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-sk.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-th.md b/assets/markdown/how_backblaze-th.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-th.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-uk.md b/assets/markdown/how_backblaze-uk.md new file mode 100644 index 00000000..b1e341d1 --- /dev/null +++ b/assets/markdown/how_backblaze-uk.md @@ -0,0 +1,8 @@ +### How to get Backblaze API Token +1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm +2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. +3. Click on the blue **Generate New Master Application Key** button. +4. In the appeared pop-up window confirm the generation. +5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. + +![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_cloudflare-be.md b/assets/markdown/how_cloudflare-be.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-be.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-cs.md b/assets/markdown/how_cloudflare-cs.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-cs.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-de.md b/assets/markdown/how_cloudflare-de.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-de.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-es.md b/assets/markdown/how_cloudflare-es.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-es.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-fr.md b/assets/markdown/how_cloudflare-fr.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-fr.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-it.md b/assets/markdown/how_cloudflare-it.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-it.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-ja.md b/assets/markdown/how_cloudflare-ja.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-ja.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-ka.md b/assets/markdown/how_cloudflare-ka.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-ka.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-nl.md b/assets/markdown/how_cloudflare-nl.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-nl.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-pl.md b/assets/markdown/how_cloudflare-pl.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-pl.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-sk.md b/assets/markdown/how_cloudflare-sk.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-sk.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-th.md b/assets/markdown/how_cloudflare-th.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-th.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_cloudflare-uk.md b/assets/markdown/how_cloudflare-uk.md new file mode 100644 index 00000000..61fb4b4e --- /dev/null +++ b/assets/markdown/how_cloudflare-uk.md @@ -0,0 +1,17 @@ +### How to get Cloudflare API Token +1. Visit the following link: https://dash.cloudflare.com/ +2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** +3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Click on **Create Token** button. +5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. +6. In the **Token Name** field, give your token a name. +7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. +8. Next, right under this line, click Add More. Similar field will appear. +9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. +10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. +11. Flick to the bottom and press the blue **Continue to Summary** button. +12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. +13. Click on **Create Token**. +14. We copy the created token, and save it in a reliable place (preferably in the password manager). + +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_digital_ocean-be.md b/assets/markdown/how_digital_ocean-be.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-be.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-cs.md b/assets/markdown/how_digital_ocean-cs.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-cs.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-de.md b/assets/markdown/how_digital_ocean-de.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-de.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-es.md b/assets/markdown/how_digital_ocean-es.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-es.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-fr.md b/assets/markdown/how_digital_ocean-fr.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-fr.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-it.md b/assets/markdown/how_digital_ocean-it.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-it.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-ja.md b/assets/markdown/how_digital_ocean-ja.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-ja.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-ka.md b/assets/markdown/how_digital_ocean-ka.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-ka.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-nl.md b/assets/markdown/how_digital_ocean-nl.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-nl.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-pl.md b/assets/markdown/how_digital_ocean-pl.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-pl.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-sk.md b/assets/markdown/how_digital_ocean-sk.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-sk.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-th.md b/assets/markdown/how_digital_ocean-th.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-th.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_digital_ocean-uk.md b/assets/markdown/how_digital_ocean-uk.md new file mode 100644 index 00000000..dc6355c2 --- /dev/null +++ b/assets/markdown/how_digital_ocean-uk.md @@ -0,0 +1,12 @@ +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file diff --git a/assets/markdown/how_fallback_old-be.md b/assets/markdown/how_fallback_old-be.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-be.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-cs.md b/assets/markdown/how_fallback_old-cs.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-cs.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-de.md b/assets/markdown/how_fallback_old-de.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-de.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-es.md b/assets/markdown/how_fallback_old-es.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-es.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-fr.md b/assets/markdown/how_fallback_old-fr.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-fr.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-it.md b/assets/markdown/how_fallback_old-it.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-it.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-ja.md b/assets/markdown/how_fallback_old-ja.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-ja.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-ka.md b/assets/markdown/how_fallback_old-ka.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-ka.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-nl.md b/assets/markdown/how_fallback_old-nl.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-nl.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-pl.md b/assets/markdown/how_fallback_old-pl.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-pl.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-sk.md b/assets/markdown/how_fallback_old-sk.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-sk.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-th.md b/assets/markdown/how_fallback_old-th.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-th.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_old-uk.md b/assets/markdown/how_fallback_old-uk.md new file mode 100644 index 00000000..c12504e7 --- /dev/null +++ b/assets/markdown/how_fallback_old-uk.md @@ -0,0 +1,3 @@ +In the next window, enter the token obtained from the console of the previous version of the application. + +Enter it without the word *Bearer*. diff --git a/assets/markdown/how_fallback_ssh-be.md b/assets/markdown/how_fallback_ssh-be.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-be.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-cs.md b/assets/markdown/how_fallback_ssh-cs.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-cs.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-de.md b/assets/markdown/how_fallback_ssh-de.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-de.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-es.md b/assets/markdown/how_fallback_ssh-es.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-es.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-fr.md b/assets/markdown/how_fallback_ssh-fr.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-fr.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-it.md b/assets/markdown/how_fallback_ssh-it.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-it.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-ja.md b/assets/markdown/how_fallback_ssh-ja.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-ja.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-ka.md b/assets/markdown/how_fallback_ssh-ka.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-ka.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-nl.md b/assets/markdown/how_fallback_ssh-nl.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-nl.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-pl.md b/assets/markdown/how_fallback_ssh-pl.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-pl.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-sk.md b/assets/markdown/how_fallback_ssh-sk.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-sk.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-th.md b/assets/markdown/how_fallback_ssh-th.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-th.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_ssh-uk.md b/assets/markdown/how_fallback_ssh-uk.md new file mode 100644 index 00000000..ce90e76a --- /dev/null +++ b/assets/markdown/how_fallback_ssh-uk.md @@ -0,0 +1,19 @@ +Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` + +```sh +cat /etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-be.md b/assets/markdown/how_fallback_terminal-be.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-be.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-cs.md b/assets/markdown/how_fallback_terminal-cs.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-cs.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-de.md b/assets/markdown/how_fallback_terminal-de.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-de.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-es.md b/assets/markdown/how_fallback_terminal-es.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-es.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-fr.md b/assets/markdown/how_fallback_terminal-fr.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-fr.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-it.md b/assets/markdown/how_fallback_terminal-it.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-it.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-ja.md b/assets/markdown/how_fallback_terminal-ja.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-ja.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-ka.md b/assets/markdown/how_fallback_terminal-ka.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-ka.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-nl.md b/assets/markdown/how_fallback_terminal-nl.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-nl.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-pl.md b/assets/markdown/how_fallback_terminal-pl.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-pl.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-sk.md b/assets/markdown/how_fallback_terminal-sk.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-sk.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-th.md b/assets/markdown/how_fallback_terminal-th.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-th.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_fallback_terminal-uk.md b/assets/markdown/how_fallback_terminal-uk.md new file mode 100644 index 00000000..77c97efa --- /dev/null +++ b/assets/markdown/how_fallback_terminal-uk.md @@ -0,0 +1,26 @@ +In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. + +In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. + +Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. + +Mount your server file system and see the contents of the token file: + +```sh +mount /dev/sda1 /mnt +cat /mnt/etc/nixos/userdata/tokens.json +``` + +This file will have a similar construction: + +```json +{ + "tokens": [ + { + "token": "token_to_copy", + "name": "device_name", + "date": "date" + } +``` + +Copy the token from the file and paste it in the next window. diff --git a/assets/markdown/how_hetzner-be.md b/assets/markdown/how_hetzner-be.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-be.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-cs.md b/assets/markdown/how_hetzner-cs.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-cs.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-de.md b/assets/markdown/how_hetzner-de.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-de.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-es.md b/assets/markdown/how_hetzner-es.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-es.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-fr.md b/assets/markdown/how_hetzner-fr.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-fr.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-it.md b/assets/markdown/how_hetzner-it.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-it.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-ja.md b/assets/markdown/how_hetzner-ja.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-ja.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-ka.md b/assets/markdown/how_hetzner-ka.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-ka.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-nl.md b/assets/markdown/how_hetzner-nl.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-nl.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-pl.md b/assets/markdown/how_hetzner-pl.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-pl.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-sk.md b/assets/markdown/how_hetzner-sk.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-sk.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-th.md b/assets/markdown/how_hetzner-th.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-th.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/markdown/how_hetzner-uk.md b/assets/markdown/how_hetzner-uk.md new file mode 100644 index 00000000..6f859c18 --- /dev/null +++ b/assets/markdown/how_hetzner-uk.md @@ -0,0 +1,23 @@ +### How to get Hetzner API Token +1. Visit the following [link](https://console.hetzner.cloud/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Hover side panel with mouse cursor. Panel should expand and show us + a menu. We're interested in the last one — **Security** (icon of a + key). +4. Next, in the upper part of an interface, we can see approximately + the following: **SSH Keys, API Tokens, Certificates, Members.** You + need **API Tokens**. Click on it. +5. In the right part of the interface, there should be **Generate API + token** button. If you're using mobile version og a webpage, in the + lower right corner you'll see **red cross**. Push that button. +6. In the **Description** field, give our token a name (this can be any + name that you like. It doesn't influence the essence. +7. Under the **Description** field we can see a possibility to choose + **permissions**. Pick **Read & Write**. +8. Click **Generate API Token.** +9. After that, our key will be shown. Store it in the reliable place, + or in the password manager, which is better. + +![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) From 0ae4a40e6246d302e46d2574282b4abea20be2da Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 23 Jan 2023 19:36:43 +0400 Subject: [PATCH 339/732] chore: Rename api factories --- .../api_maps/rest_maps/api_factory_creator.dart | 4 ++-- .../{digital_ocean.dart => digital_ocean_api.dart} | 0 ...factory.dart => digital_ocean_api_factory.dart} | 2 +- .../hetzner/{hetzner.dart => hetzner_api.dart} | 0 ...tzner_factory.dart => hetzner_api_factory.dart} | 2 +- lib/logic/providers/server_providers/hetzner.dart | 0 .../server_providers/server_provider_factory.dart | 14 ++++++++++++++ 7 files changed, 18 insertions(+), 4 deletions(-) rename lib/logic/api_maps/rest_maps/server_providers/digital_ocean/{digital_ocean.dart => digital_ocean_api.dart} (100%) rename lib/logic/api_maps/rest_maps/server_providers/digital_ocean/{digital_ocean_factory.dart => digital_ocean_api_factory.dart} (96%) rename lib/logic/api_maps/rest_maps/server_providers/hetzner/{hetzner.dart => hetzner_api.dart} (100%) rename lib/logic/api_maps/rest_maps/server_providers/hetzner/{hetzner_factory.dart => hetzner_api_factory.dart} (97%) create mode 100644 lib/logic/providers/server_providers/hetzner.dart create mode 100644 lib/logic/providers/server_providers/server_provider_factory.dart diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index c835b0cd..662dd4f8 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -2,8 +2,8 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart similarity index 100% rename from lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart rename to lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart similarity index 96% rename from lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart rename to lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart index 73a1e647..6383c4ab 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart similarity index 100% rename from lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart rename to lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart similarity index 97% rename from lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart rename to lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart index 5f8fcab5..6824d385 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/logic/providers/server_providers/server_provider_factory.dart b/lib/logic/providers/server_providers/server_provider_factory.dart new file mode 100644 index 00000000..669ffbd6 --- /dev/null +++ b/lib/logic/providers/server_providers/server_provider_factory.dart @@ -0,0 +1,14 @@ +class ServerProviderFactory { + static ServerProvider createServerProviderApiFactory( + final ServerProviderApiFactorySettings settings, + ) { + switch (settings.provider) { + case ServerProvider.hetzner: + return HetznerApiFactory(region: settings.location); + case ServerProvider.digitalOcean: + return DigitalOceanApiFactory(region: settings.location); + case ServerProvider.unknown: + throw UnknownApiProviderException('Unknown server provider'); + } + } +} From 4e1659cfdc1c757ffa8da72efb107b25e5c930ef Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 27 Jan 2023 15:59:45 +0200 Subject: [PATCH 340/732] Updated translations 2023-01-24 (#189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * French * FoxMeste (30) * Ukrainian * CaminoConDios (9) * FoxMeste (11) * SomeUsername (46) * Illia (78) * Spanish * CaminoConDios (70) * Russian * Inex Code (3) * def (7) * German * FoxMeste (63) * Polish * CaminoConDios (38) * selfprivacy_weblate2 (151) * Czech * Pavel Novák (34) * Thai * Shitsanupong Raksat (4) * FoxMeste (156) Co-authored-by: selfprivacy_weblate1 Co-authored-by: Illia Co-authored-by: selfprivacy_weblate2 Co-authored-by: def Co-authored-by: CaminoConDios Co-authored-by: FoxMeste Co-authored-by: Shitsanupong Raksat Reviewed-on: https://git.selfprivacy.org/kherel/selfprivacy.org.app/pulls/189 Reviewed-by: NaiJi ✨ --- assets/markdown/about-uk.md | 14 +- assets/markdown/how_backblaze-ru.md | 2 +- assets/markdown/how_backblaze-uk.md | 14 +- assets/markdown/how_cloudflare-uk.md | 2 +- assets/markdown/how_digital_ocean-ru.md | 20 +- assets/markdown/how_fallback_old-uk.md | 4 +- assets/markdown/how_fallback_ssh-uk.md | 6 +- assets/markdown/how_fallback_terminal-uk.md | 10 +- assets/markdown/how_hetzner-uk.md | 44 +- assets/translations/be.json | 1 + assets/translations/cs.json | 37 ++ assets/translations/de.json | 79 ++++ assets/translations/en.json | 3 +- assets/translations/es.json | 87 ++++ assets/translations/fr.json | 34 ++ assets/translations/id.json | 1 + assets/translations/it.json | 1 + assets/translations/ja.json | 1 + assets/translations/ka.json | 1 + assets/translations/kk.json | 1 + assets/translations/nl.json | 1 + assets/translations/pl.json | 170 +++++++ assets/translations/ru.json | 18 +- assets/translations/sk.json | 1 + assets/translations/th.json | 182 ++++++++ assets/translations/uk.json | 479 ++++++++++++++++++++ assets/translations/uz.json | 1 + 27 files changed, 1145 insertions(+), 69 deletions(-) create mode 100644 assets/translations/be.json create mode 100644 assets/translations/cs.json create mode 100644 assets/translations/de.json create mode 100644 assets/translations/es.json create mode 100644 assets/translations/fr.json create mode 100644 assets/translations/id.json create mode 100644 assets/translations/it.json create mode 100644 assets/translations/ja.json create mode 100644 assets/translations/ka.json create mode 100644 assets/translations/kk.json create mode 100644 assets/translations/nl.json create mode 100644 assets/translations/pl.json create mode 100644 assets/translations/sk.json create mode 100644 assets/translations/th.json create mode 100644 assets/translations/uk.json create mode 100644 assets/translations/uz.json diff --git a/assets/markdown/about-uk.md b/assets/markdown/about-uk.md index 3963aa6e..fee81d64 100644 --- a/assets/markdown/about-uk.md +++ b/assets/markdown/about-uk.md @@ -1,12 +1,12 @@ -### About us +### Про нас -More and more corporations want to control our data. -We want to have full control of our **data** on our own. +Все більше корпорацій хочуть контролювати свої дані. +Ми хочемо мати повний контроль над нашими. -### Our mission +### Наша місія -Digital independence and privacy, available to everyone +Цифрова незалежність і конфіденційність доступні кожному -### Target +### Ціль -Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file +Розробити програму, яка дозволить кожному розгорнути свої приватні послуги для себе та їх сусідів. \ No newline at end of file diff --git a/assets/markdown/how_backblaze-ru.md b/assets/markdown/how_backblaze-ru.md index 2938f1cb..27beb7e7 100644 --- a/assets/markdown/how_backblaze-ru.md +++ b/assets/markdown/how_backblaze-ru.md @@ -5,4 +5,4 @@ 4. Во всплывающем окне подтверждаем генерацию. 5. Сохраняем _keyID_ и _applicationKey_ в надёжном месте. Например в менеджере паролей. -![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) +![Получение токена Backblaze](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_backblaze-uk.md b/assets/markdown/how_backblaze-uk.md index b1e341d1..115aeec9 100644 --- a/assets/markdown/how_backblaze-uk.md +++ b/assets/markdown/how_backblaze-uk.md @@ -1,8 +1,8 @@ -### How to get Backblaze API Token -1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm -2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. -3. Click on the blue **Generate New Master Application Key** button. -4. In the appeared pop-up window confirm the generation. -5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. +## Як отримати Backblaze API токен +1. Перейдіть за посиланням і авторизуйте: https://secure.backblaze.com/user_signin.htm +2. У лівій частині інтерфейсу виберіть **App Keys** у підкатегорії **B2 Cloud Storage**. +3. Натисніть кнопку синій **Створити новий майстер-ключ програми**. +4. У з'явилось спливаюче вікно підтверджують покоління. +5. Save _KeyID_ and _applicationKey_ in the safe place. Наприклад, в менеджері паролів. -![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) +![Backblaze токен налаштування](resource:assets/images/gifs/Backblaze.gif) diff --git a/assets/markdown/how_cloudflare-uk.md b/assets/markdown/how_cloudflare-uk.md index 61fb4b4e..2f8880cb 100644 --- a/assets/markdown/how_cloudflare-uk.md +++ b/assets/markdown/how_cloudflare-uk.md @@ -14,4 +14,4 @@ 13. Click on **Create Token**. 14. We copy the created token, and save it in a reliable place (preferably in the password manager). -![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) +![Cloudflare настройка токена](resource:assets/images/gifs/CloudFlare.gif) diff --git a/assets/markdown/how_digital_ocean-ru.md b/assets/markdown/how_digital_ocean-ru.md index a4795811..67ff04ff 100644 --- a/assets/markdown/how_digital_ocean-ru.md +++ b/assets/markdown/how_digital_ocean-ru.md @@ -1,10 +1,10 @@ -### How to get Digital Ocean API Token -1. Перейдите по [ссылке](https://cloud.digitalocean.com/) и войдите в ваш аккаунт. -2. Перейдите в новый проект, либо создайте проект, если ещё этого не сделали. -3. Перейдите в "API" раздел в меню слева. -4. Нажмите на "Generate New Token". -5. Введите какое-нибудь имя для токена. -6. Установите время истощения на "No expiry". -7. Проставьте галочку в пункте "Write (optional)". -8. Теперь нажмите на "Generate Token" кнопку внизу. -9. После этого появится ваш токен. Скопируйте его в надёжное место, лучше в ваш собственный менеджер паролей. \ No newline at end of file +### Как получить токен Digital Ocean API +1. Переходим по [ссылке](https://console.hetzner.cloud/) и авторизуемся в ранее созданном аккаунте. +2. Заходим в созданный нами проект. Если такового нет — значит создаём. +3. *Наводим мышкой на боковую панель.* Она должна раскрыться, показав нам пункты меню. Нас интересует последний — **Security** (с иконкой ключика). +4. Далее, в верхней части интерфейса видим примерно такой список: **SSH KEYS, API TOKENS, CERTIFICATES, MEMBERS.** Нам нужен **API TOKENS**. Переходим по нему. +5. По середине в интерфейсе, нас будет ожидать кнопка **GENERATE API TOKEN**. Нажимаем на эту кнопку. +6. В поле **Description** даём нашему токену название (это может быть любое название, которое Вам нравится, сути оно не меняет). +7. Под полем **Description** видим возможность выбрать разрешения **PERMISSIONS**. Выбираем **Read & Write**. +8. Нажимаем **GENERATE API TOKEN**. +9. После этого, появиться окно с вашим токеном. \ No newline at end of file diff --git a/assets/markdown/how_fallback_old-uk.md b/assets/markdown/how_fallback_old-uk.md index c12504e7..2d02d3fe 100644 --- a/assets/markdown/how_fallback_old-uk.md +++ b/assets/markdown/how_fallback_old-uk.md @@ -1,3 +1,3 @@ -In the next window, enter the token obtained from the console of the previous version of the application. +У наступне вікно введіть токен, отриманий з консолі попередньої версії програми. -Enter it without the word *Bearer*. +Введіть його без слова *bearer*. diff --git a/assets/markdown/how_fallback_ssh-uk.md b/assets/markdown/how_fallback_ssh-uk.md index ce90e76a..568d3264 100644 --- a/assets/markdown/how_fallback_ssh-uk.md +++ b/assets/markdown/how_fallback_ssh-uk.md @@ -1,10 +1,10 @@ -Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` +Увійдіть від користувача root до вашого сервера і подивіться на вміст файла`/etc/nixos/userdata/tokens.json` ```sh cat /etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Цей файл буде мати подібну конструкцію: ```json { @@ -16,4 +16,4 @@ This file will have a similar construction: } ``` -Copy the token from the file and paste it in the next window. +Скопіюйте токен з файла і вставте його в наступне вікно. diff --git a/assets/markdown/how_fallback_terminal-uk.md b/assets/markdown/how_fallback_terminal-uk.md index 77c97efa..6d762e67 100644 --- a/assets/markdown/how_fallback_terminal-uk.md +++ b/assets/markdown/how_fallback_terminal-uk.md @@ -1,17 +1,17 @@ -In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. +На панелі керування сервером Hetzner перейдіть на вкладку **Rescue**. Після цього натисніть кнопку **увімкнути цикл порятунку та живлення**. In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. -Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. +Натисніть **Enable rescue & power cycle** і зачекайте, поки сервер перезавантажить. На екрані з'явиться логін і пароль. Увійдіть до користувача root за допомогою вашої реєстраційних даних і паролів. -Mount your server file system and see the contents of the token file: +Змонтувати файлову систему вашого сервера і переглянути вміст файла токенів: ```sh mount /dev/sda1 /mnt cat /mnt/etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Цей файл буде мати подібну конструкцію: ```json { @@ -23,4 +23,4 @@ This file will have a similar construction: } ``` -Copy the token from the file and paste it in the next window. +Скопіюйте токен з файла і вставте його в наступне вікно. diff --git a/assets/markdown/how_hetzner-uk.md b/assets/markdown/how_hetzner-uk.md index 6f859c18..82f15ce9 100644 --- a/assets/markdown/how_hetzner-uk.md +++ b/assets/markdown/how_hetzner-uk.md @@ -1,23 +1,23 @@ -### How to get Hetzner API Token -1. Visit the following [link](https://console.hetzner.cloud/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Hover side panel with mouse cursor. Panel should expand and show us - a menu. We're interested in the last one — **Security** (icon of a - key). -4. Next, in the upper part of an interface, we can see approximately - the following: **SSH Keys, API Tokens, Certificates, Members.** You - need **API Tokens**. Click on it. -5. In the right part of the interface, there should be **Generate API - token** button. If you're using mobile version og a webpage, in the - lower right corner you'll see **red cross**. Push that button. -6. In the **Description** field, give our token a name (this can be any - name that you like. It doesn't influence the essence. -7. Under the **Description** field we can see a possibility to choose - **permissions**. Pick **Read & Write**. -8. Click **Generate API Token.** -9. After that, our key will be shown. Store it in the reliable place, - or in the password manager, which is better. +## як отримати Hetzner API токен +1. Завітайте на наступний [посилання](https://console.hetzner.cloud/) і підпишіться +на новостворений рахунок. +2. Введіть раніше створений проект. Якщо ви не створили його, +тоді, будь ласка, продовжуйте. +3. Наведіть вказівник на бічну панель з курсором миші. Панель повинна розгорнути і показати нам +меню. Нас цікавить останній — **БЕЗПЕКА** (значок а +ключ). +4. Далі, у верхній частині інтерфейсу, ми можемо побачити приблизно +Нижче наведено **ключі SSH, ключі API, сертифікати, члени.** Ви +Потрібно **API-Токени**. Клікніть на нього. +5. У правій частині інтерфейсу має бути **Generate API + токен**. Якщо ви користуєтеся мобільною версією, або веб-сторінкою, в +у нижньому правому куті ви побачите **червоний хрест**. Натисніть цю кнопку. +6. У полі **Опис** надайте нашому жетону назву (це може бути будь-яка +ім'я, яке тобі подобається. Це не впливає на суть. +7. У полі **Опис** ми можемо побачити можливість вибору +**дозволи**. Виберіть **Читати і писати**. +8. Натисніть **Створити ключ API.** +9. Після цього буде показано наш ключ. Зберігайте його в надійному місці, +або в менеджері паролів, що краще. -![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) +![Hetzner токен налаштування](resource:assets/images/gifs/Hetzner.gif) diff --git a/assets/translations/be.json b/assets/translations/be.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/be.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/cs.json b/assets/translations/cs.json new file mode 100644 index 00000000..5b56fbd8 --- /dev/null +++ b/assets/translations/cs.json @@ -0,0 +1,37 @@ +{ + "test": "cz-test", + "locale": "cz", + "basis": { + "providers": "Poskytovatelé", + "providers_title": "Vaše Datové Centrum", + "select": "Vybrat", + "services": "Služby", + "services_title": "Vaše osobní, soukromé a nezávislé služby.", + "users": "Uživatelé", + "more": "Více", + "next": "Další", + "got_it": "Mám to", + "settings": "Nastavení", + "password": "Heslo", + "create": "Přidat nový", + "confirmation": "Potvrzení", + "cancel": "Zrušit", + "delete": "Vymazat", + "close": "Zavřít", + "connect": "Připojit", + "domain": "Doména", + "saving": "Ukládání…", + "username": "Uživatelské Jméno", + "loading": "Načítání…", + "connect_to_existing": "Připojte se k existujícímu serveru", + "reset": "Resetovat", + "details": "Podrobnosti", + "no_data": "Žádná data", + "wait": "Počkat", + "remove": "Vymazat", + "apply": "Použít", + "done": "Hotovo", + "continue": "Pokračovat", + "alert": "Upozornění" + } +} diff --git a/assets/translations/de.json b/assets/translations/de.json new file mode 100644 index 00000000..77e99a20 --- /dev/null +++ b/assets/translations/de.json @@ -0,0 +1,79 @@ +{ + "test": "de-test", + "locale": "de", + "basis": { + "providers": "Provider", + "password": "Passwort", + "create": "Hinzufügen", + "confirmation": "Bestätigung", + "providers_title": "Ihr Rechenzentrum", + "select": "Auswählen", + "services": "Dienste", + "users": "Benutzer", + "more": "Mehr", + "next": "Weiter", + "got_it": "Verstanden", + "settings": "Einstellungen", + "cancel": "Abbrechen", + "delete": "Löschen", + "close": "Schließen", + "connect": "Verbinden", + "domain": "Domäne", + "saving": "Speichern…", + "username": "Benutzername", + "loading": "Laden…", + "later": "Überspringen und später einstellen", + "connect_to_existing": "Mit einem existierenden Server verbinden", + "reset": "Zurücksetzen", + "details": "Einzelheiten", + "no_data": "Keine Daten", + "wait": "Warten", + "remove": "Entfernen", + "done": "Fertig", + "continue": "Fortfahren", + "alert": "Alarm", + "services_title": "Ihre persönliche, private und unabhängige Dienste.", + "apply": "Anwenden" + }, + "more_page": { + "configuration_wizard": "Setup-Assistent", + "about_project": "Über uns", + "about_application": "Über", + "onboarding": "Onboarding", + "create_ssh_key": "Superuser SSH Schlüssel", + "console": "Konsole", + "application_settings": "Anwendungseinstellungen" + }, + "console_page": { + "title": "Konsole", + "waiting": "Warten auf Initialisierung…" + }, + "about_us_page": { + "title": "Über uns" + }, + "about_application_page": { + "title": "Über", + "application_version_text": "Anwendungsversion v.{}", + "api_version_text": "Server API Version v.{}", + "privacy_policy": "Datenschutzerklärung" + }, + "application_settings": { + "title": "Anwendungseinstellungen", + "dark_theme_title": "Dunkles Thema", + "dark_theme_description": "Ihr Anwendungsdesign wechseln", + "reset_config_title": "Anwendungseinstellungen zurücksetzen", + "reset_config_description": "API Sclüssel und root Benutzer zurücksetzen", + "delete_server_title": "Server löschen", + "delete_server_description": "Das wird Ihren Server löschen. Es wird nicht mehr zugänglich sein." + }, + "ssh": { + "title": "SSH Schlüssel", + "create": "SSH Schlüssel erstellen", + "delete": "SSH Schlüssel entfernen", + "delete_confirm_question": "Sind Sie sicher, dass Sie SSH SChlüssel entfernen wollen?", + "subtitle_with_keys": "{} Schlüssel", + "subtitle_without_keys": "Keine Slüssel", + "no_key_name": "Unbennanter Schlüssel", + "root_title": "Das sind superuser Schlüsseln" + } +} diff --git a/assets/translations/en.json b/assets/translations/en.json index 0f5f1c99..08967745 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -303,7 +303,7 @@ "no_locations_found": "No available locations found, make sure your account is accessible", "choose_server_type": "What type of server do you need?", "choose_server_type_text": "Different resource capabilities support different services. Don't worry, you can expand your server anytime", - "choose_server_type_notice": "The important things to look at are the CPU and RAM. The data of your services will be stored on a mounted volume which is easily explandable and gets paid for separately.", + "choose_server_type_notice": "The important things to look at are the CPU and RAM. The data of your services will be stored on a mounted volume which is easily expandable and gets paid for separately.", "choose_server_type_ram": "{} GB of RAM", "choose_server_type_storage": "{} GB of system storage", "choose_server_type_payment_per_month": "{} per month", @@ -311,7 +311,6 @@ "cloudflare_bad_key_error": "Cloudflare API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", "select_dns": "Now let's select a DNS provider", - "select_dns_text": "", "manage_domain_dns": "To manage your domain's DNS", "use_this_domain": "Use this domain?", "use_this_domain_text": "The token you provided gives access to the following domain", diff --git a/assets/translations/es.json b/assets/translations/es.json new file mode 100644 index 00000000..1cf786a4 --- /dev/null +++ b/assets/translations/es.json @@ -0,0 +1,87 @@ +{ + "basis": { + "providers_title": "Su Centro de Datos", + "select": "Seleccione", + "services": "Servicios", + "providers": "Proveedores", + "users": "Usuarios", + "more": "Más", + "next": "Próximo", + "got_it": "Entendido", + "settings": "Ajustes", + "password": "Contraseña", + "create": "Añadir nuevo", + "confirmation": "Confirmación", + "cancel": "Anular", + "delete": "Eliminar", + "services_title": "Tus servicios personales, privados e independientes.", + "connect": "Conecte", + "saving": "Ahorrar…", + "username": "Nombre de usuario", + "loading": "Cargando…", + "later": "Saltar a la configuración posterior", + "reset": "Restablecer", + "details": "Detalles", + "no_data": "Sin datos", + "wait": "Espere", + "alert": "Alerta", + "continue": "Continuar", + "close": "Cerrar", + "domain": "Dominio", + "remove": "Eliminar", + "apply": "Solicitar", + "done": "Hecho", + "connect_to_existing": "Conectarse a un servidor existente" + }, + "test": "es-test", + "locale": "es", + "application_settings": { + "reset_config_title": "Restablecer la configuración de la aplicación", + "dark_theme_description": "Cambia el tema de tu aplicación", + "reset_config_description": "Restablecer claves api y usuario root", + "delete_server_title": "Eliminar servidor", + "delete_server_description": "Esto elimina su servidor. Ya no será accesible.", + "title": "Ajustes de la aplicación", + "dark_theme_title": "Tema oscuro" + }, + "ssh": { + "delete_confirm_question": "¿Está seguro de que desea eliminar la clave SSH?", + "root_subtitle": "Los propietarios de estas claves tienen acceso total al servidor y pueden hacer cualquier cosa en él. Añade sólo tus propias claves al servidor.", + "title": "SSH Claves", + "create": "Crear clave SSH", + "delete": "Eliminar clave SSH", + "subtitle_with_keys": "{} claves", + "subtitle_without_keys": "Sin llaves", + "no_key_name": "Clave sin nombre", + "root_title": "Estas son las claves de superusuario", + "input_label": "Clave pública ED25519 o RSA" + }, + "about_application_page": { + "application_version_text": "Versión de la aplicación v.{}", + "title": "Sobre", + "api_version_text": "Versión API del servidor v.{}", + "privacy_policy": "Política de privacidad" + }, + "onboarding": { + "page2_text": "SelfPrivacy sólo trabaja con los proveedores que usted elija. Si no tiene cuentas obligatorias en ellos, le ayudaremos a crearlas.", + "page1_title": "La independencia digital, al alcance de todos", + "page1_text": "Correo, VPN, Messenger, red social y mucho más en tu servidor privado, bajo tu control.", + "page2_title": "SelfPrivacy no es una nube, es tu centro de datos personal" + }, + "more_page": { + "configuration_wizard": "Asistente de configuración", + "about_project": "Sobre nosotros", + "about_application": "Sobre", + "onboarding": "Incorporación", + "create_ssh_key": "Claves SSH de superusuario", + "console": "Consola", + "application_settings": "Ajustes de la aplicación" + }, + "console_page": { + "title": "Consola", + "waiting": "Esperando la inicialización…" + }, + "about_us_page": { + "title": "Sobre nosotros" + } +} diff --git a/assets/translations/fr.json b/assets/translations/fr.json new file mode 100644 index 00000000..622a9ea5 --- /dev/null +++ b/assets/translations/fr.json @@ -0,0 +1,34 @@ +{ + "test": "fr-test", + "locale": "fr", + "basis": { + "providers": "Fournisseurs", + "providers_title": "Ton Centre de Données", + "select": "Sélectionner", + "services": "Services", + "services_title": "Tes services personnels, privés et indépendants.", + "users": "Utilisateurs", + "more": "Plus", + "next": "Suivant", + "got_it": "Compris", + "settings": "Paramètres", + "password": "Mot de passe", + "create": "Ajouter nouveau", + "confirmation": "Confirmation", + "cancel": "Annuler", + "delete": "Supprimer", + "close": "Fermer", + "connect": "Connecter", + "domain": "Domaine", + "saving": "Enregistrement…", + "username": "Nom d'utilisateur", + "loading": "Chargement…", + "later": "Passer à la configuration plus tard", + "connect_to_existing": "Se connecter à un server existant", + "reset": "Réinitialiser", + "details": "Détails", + "no_data": "Pas de données", + "wait": "Attendez", + "remove": "Supprimer" + } +} diff --git a/assets/translations/id.json b/assets/translations/id.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/id.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/it.json b/assets/translations/it.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/it.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/ja.json b/assets/translations/ja.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/ja.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/ka.json b/assets/translations/ka.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/ka.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/kk.json b/assets/translations/kk.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/kk.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/nl.json b/assets/translations/nl.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/nl.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/pl.json b/assets/translations/pl.json new file mode 100644 index 00000000..ddea4932 --- /dev/null +++ b/assets/translations/pl.json @@ -0,0 +1,170 @@ +{ + "basis": { + "services_title": "Twoje osobiste, prywatne i niezależne usługi.", + "cancel": "Anuluj", + "providers": "Dostawca usług internetowych", + "providers_title": "Twoje centrum danych", + "select": "Wybierz to", + "services": "Usługi", + "users": "Użytkownicy", + "more": "Jeszcze więcej", + "next": "Dalej", + "got_it": "Zrozumiałem", + "settings": "Ustawienia", + "password": "Hasło", + "create": "Utwórz nowy", + "confirmation": "Potwierdzenie", + "later": "Pomiń i dostosuj później", + "delete": "Usunąć", + "close": "Zamknij to", + "connect": "Podłączyć", + "domain": "Domena", + "saving": "Zapisywanie…", + "username": "Nazwa użytkownika", + "loading": "Ładowanie…", + "connect_to_existing": "Podłącz do istniejącego serwera", + "reset": "Zresetuj to", + "details": "Dokładna informacja", + "no_data": "Brak danych", + "wait": "Ładowanie", + "remove": "Usunąć", + "apply": "Zastosuj to", + "done": "Gotowe", + "continue": "Kontynuować", + "alert": "Powiadomienie" + }, + "test": "pl-test", + "locale": "pl", + "more_page": { + "about_project": "O projekcie \"SelfPrivacy\"", + "about_application": "O aplikacji", + "create_ssh_key": "SSH klucze administratora", + "console": "Konsola", + "configuration_wizard": "Kreator konfiguracji", + "application_settings": "Ustawienia aplikacji" + }, + "console_page": { + "title": "Konsola", + "waiting": "Oczekiwanie na inicjalizację…" + }, + "about_us_page": { + "title": "O projekcie \"SelfPrivacy\"" + }, + "about_application_page": { + "title": "O aplikacji", + "application_version_text": "Wersja aplikacji v.{}", + "api_version_text": "Wersja API serwera v.{}", + "privacy_policy": "Polityka prywatności" + }, + "application_settings": { + "title": "Ustawienia aplikacji", + "dark_theme_title": "Ciemny motyw aplikacji", + "dark_theme_description": "Zmień kolor motywu aplikacji", + "reset_config_title": "Resetowanie", + "reset_config_description": "Zresetuj klucze API i użytkownika root", + "delete_server_title": "Usuń serwer", + "delete_server_description": "Ta czynność usunie serwer. Po tym będzie niedostępny." + }, + "ssh": { + "title": "klucze SSH", + "delete": "Usuń klucz SSH", + "subtitle_with_keys": "Klucze: {}", + "subtitle_without_keys": "Brak kluczy", + "no_key_name": "Bezimienny klucz", + "root_title": "To są klucze superużytkownika", + "input_label": "Publiczny klucz ED25519 lub RSA", + "create": "Dodaj klucz SSH", + "delete_confirm_question": "Czy na pewno chcesz usunąć następny klucz?", + "root_subtitle": "Właściciele określonych tutaj kluczy uzyskują pełny dostęp do danych i ustawień serwera. Dodaj tylko swoje klucze." + }, + "onboarding": { + "page1_title": "Cyfrowa niezależność jest dostępna dla każdego", + "page1_text": "Poczta, VPN, Messenger, sieć społecznościowa i wiele więcej na Twoim osobistym serwerze, pod Twoją pełną kontrolą.", + "page2_title": "SelfPrivacy — to nie przechowywanie w chmurze, a tylko Twój osobisty centrum danych", + "page2_server_provider_title": "Dostawca-serwer", + "page2_server_provider_text": "Dostawca-serwer będzie obsługiwał Twój serwer w swoim centrum danych. SelfPrivacy automatycznie połączy się z nim i skonfiguruje dla Ciebie serwer.", + "page2_dns_provider_title": "Dostawca DNS", + "page2_backup_provider_title": "Dostawca kopii zapasowych", + "page2_text": "SelfPrivacy współpracuje tylko z wybranymi przez Ciebie dostawcami usług. Jeśli nie masz kont, pomożemy Ci ich założyć.", + "page2_dns_provider_text": "Aby być w Internecie, potrzebujesz domeny. Aby domena wskazywała na Twój serwer, potrzebujesz niezawodnego serwera DNS. Poprosimy Cię o wybranie jednego z obsługiwanych serwerów DNS i automatyczne skonfigurowanie wszystkich rekordów. Chcesz skonfigurować je ręcznie? To też jest możliwe.", + "page2_backup_provider_text": "A co jeśli coś się stanie z serwerem? Atak hakerski, odmowa usługi, a może po prostu przypadkowe usunięcie danych? Twoje dane będą bezpieczne gdzie indziej, u dostawcy magazynu kopii zapasowych. Wszystkie są bezpiecznie zaszyfrowane i możesz przywrócić swój serwer." + }, + "resource_chart": { + "month": "Miesiąc", + "day": "Dzień", + "hour": "Godzina", + "cpu_title": "Wykorzystanie procesora", + "network_title": "Wykorzystanie sieci", + "in": "Odebrane", + "out": "Wysłano" + }, + "server": { + "card_title": "Serwer", + "description": "To wirtualny komputer, na którym działają wszystkie Twoje usługi", + "resource_usage": "Zużycie środków", + "allow_autoupgrade_hint": "Zezwól na automatyczną instalację aktualizacji na serwerze", + "reboot_after_upgrade": "Uruchom ponownie po aktualizacjach", + "server_timezone": "Strefa czasowa serwera", + "server_id": "ID serwera", + "status": "Status", + "cpu": "procesor", + "ram": "Pamięć RAM", + "disk": "Dysk lokalny", + "monthly_cost": "Koszt miesięczny", + "location": "Lokalizacja danych", + "provider": "Dostawca", + "core_count": { + "one": "{} jądro", + "two": "{} jądra", + "many": "{} rdzeni", + "few": "{} jądra", + "other": "{} rdzeni" + }, + "general_information": "Ogólna informacja", + "allow_autoupgrade": "Zezwalaj na automatyczne aktualizacje", + "reboot_after_upgrade_hint": "Automatycznie uruchom ponownie serwer po zastosowaniu aktualizacji", + "select_timezone": "Wybierz swoją strefę czasową", + "timezone_search_bar": "Nazwa strefy czasowej lub wartość przesunięcia czasu" + }, + "record": { + "root": "Domena główna", + "cloud": "Chmura plików", + "git": "Git serwer", + "meet": "Wideokonferencje", + "social": "Serwis społecznościowy", + "password": "Menedżer haseł", + "vpn": "VPN", + "dmarc": "Zapisywanie rekord", + "spf": "Zapisywanie SPF", + "dkim": "DKIM klucz", + "api": "SelfPrivacy API", + "mx": "Zapisywanie MX" + }, + "domain": { + "card_title": "Domena", + "screen_title": "Domena i DNS", + "error": "Znaleziono problemy", + "refreshing": "Aktualizowanie danych…", + "uninitialized": "Dane jeszcze nie otrzymane", + "services_title": "Usługi", + "services_subtitle": "Rekordy „A” są wymagane do działania usług.", + "email_title": "Email", + "update_list": "Zaktualizuj listę", + "ok": "Zapisy są w porządku", + "error_subtitle": "Kliknij tutaj, aby naprawić", + "email_subtitle": "Zapisy wymagane do bezpiecznej wymiany poczty elektronicznej." + }, + "backup": { + "card_title": "Utworzyć kopię zapasową", + "description": "Pomoże Ci w każdej sytuacji: atak hakerski, usunięcie serwera, itp.", + "reupload_key": "Wymuś aktualizację klucza", + "reuploaded_key": "Zaktualizowano klucz na serwerze", + "initialize": "Inicjalizacja", + "restore": "Przywróć z kopii", + "no_backups": "Nie ma jeszcze żadnych kopii zapasowych", + "create_new": "Utwórz nową kopię", + "creating": "Tworzenie kopii: {}%", + "restoring": "Przywracanie z kopii", + "waiting_for_rebuild": "Po kilku minutach będziesz mógł utworzyć pierwszą kopię." + } +} diff --git a/assets/translations/ru.json b/assets/translations/ru.json index f960a85d..23a388e9 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -81,7 +81,7 @@ "onboarding": { "page1_title": "Цифровая независимость доступна каждому", "page1_text": "Почта, VPN, Мессенджер, социальная сеть и многое другое на Вашем личном сервере, под Вашим полным контролем.", - "page2_title": "SelfPrivacy — это не облако, а Ваш личный дата-центр", + "page2_title": "SelfPrivacy — это не облако, а ваш личный дата-центр", "page2_text": "SelfPrivacy работает только с сервис-провайдерами на ваш выбор. Если у Вас нет учётных записей, мы поможем их создать.", "page2_server_provider_title": "Сервер-провайдер", "page2_server_provider_text": "Сервер-провайдер будет обслуживать ваш сервер в своём дата-центре. SelfPrivacy автоматически подключится к нему и настроит вам сервер.", @@ -300,10 +300,10 @@ "locations_not_found": "Упс!", "locations_not_found_text": "В этом месте не оказалось доступных серверов для аренды", "back_to_locations": "Выберем другой", - "no_locations_found": "Не найдено локаций. Убедитесь, что ваш аккаунт доступен.", + "no_locations_found": "Не найдено локаций, убедитесь, что ваш аккаунт доступен", "choose_server_type": "Какой выбрать тип сервера?", "choose_server_type_text": "От ресурсов сервера зависит, какие сервисы смогут запуститься. Расширить сервер можно будет в любое время", - "choose_server_type_notice": "Главное, на что стоит обратить внимание — количество потоков процессора и объём оперативной памяти. Данные сервисов будут размещены на отдельном диске, который оплачивается отдельно и легко расширяем!", + "choose_server_type_notice": "Главное, на что стоит обратить внимание — количество потоков процессора и объём оперативной памяти. Данные сервисов будут размещены на отдельном диске, который оплачивается отдельно и легко расширяем.", "choose_server_type_ram": "{} GB у RAM", "choose_server_type_storage": "{} GB системного хранилища", "choose_server_type_payment_per_month": "{} в месяц", @@ -331,7 +331,8 @@ "create_master_account": "Создайте главную учетную запись", "enter_username_and_password": "Введите имя пользователя и сложный пароль", "finish": "Всё инициализировано", - "checks": "Проверок выполнено: \n{} / {}" + "checks": "Проверок выполнено: \n{} / {}", + "select_dns": "Теперь давайте выберем DNS-провайдера" }, "recovering": { "generic_error": "Ошибка проведения операции, попробуйте ещё раз.", @@ -354,9 +355,6 @@ "fallback_select_provider_console": "Доступ к консоли хостинга.", "authorization_failed": "Не удалось войти с этим ключом", "fallback_select_provider_console_hint": "Например, Hetzner.", - "hetzner_connected": "Подключение к Hetzner", - "hetzner_connected_description": "Связь с сервером установлена. Введите токен Hetzner с доступом к {}:", - "hetzner_connected_placeholder": "Hetzner токен", "confirm_server": "Подтвердите сервер", "confirm_server_description": "Нашли сервер! Подтвердите, что это он:", "confirm_server_accept": "Да, это он", @@ -373,9 +371,11 @@ "modal_confirmation_ip_invalid": "IP не совпадает с указанным в DNS записи", "confirm_cloudflare": "Подключение к Cloudflare", "confirm_cloudflare_description": "Введите токен Cloudflare, который имеет права на {}:", - "confirm_backblze": "Подключение к Backblaze", "confirm_backblaze_description": "Введите токен Backblaze, который имеет права на хранилище резервных копий:", - "confirm_backblaze": "Подключение к Backblaze" + "confirm_backblaze": "Подключение к Backblaze", + "server_provider_connected": "Подключение к вашему серверному провайдеру", + "server_provider_connected_description": "Связь установлена. Введите свой токен с доступом к {}:", + "server_provider_connected_placeholder": "Токен серверного провайдера" }, "devices": { "main_screen": { diff --git a/assets/translations/sk.json b/assets/translations/sk.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/sk.json @@ -0,0 +1 @@ +{} diff --git a/assets/translations/th.json b/assets/translations/th.json new file mode 100644 index 00000000..1f56a51e --- /dev/null +++ b/assets/translations/th.json @@ -0,0 +1,182 @@ +{ + "test": "th-test", + "locale": "th", + "basis": { + "later": "ข้ามไปที่การติดตั้งทีหลัง", + "no_data": "ไม่พบข้อมูล", + "providers_title": "ศูนย์กลางข้อมูล", + "select": "เลือก", + "services": "บริการ", + "users": "ผู้ใช้บริการ", + "more": "มาก", + "next": "ถัดไป", + "got_it": "ได้มา", + "settings": "ตั้งค่า", + "password": "รหัสผ่าน", + "create": "เพิ่มใหม่", + "confirmation": "การยืนยัน", + "cancel": "ยกเลิก", + "delete": "ลบ", + "close": "ปิด", + "domain": "โดเมน", + "saving": "กำลังบันทึก…", + "username": "ชื่อผู้ใช้", + "loading": "กำลังโหลด…", + "connect_to_existing": "เชื่อมต่อไปยังเซริฟเวอร์ที่มีอยู่แล้ว", + "reset": "รีเซ็ต", + "details": "รายละเอียด", + "wait": "รอ", + "remove": "ลบ", + "apply": "นำมาใช้", + "done": "เสร็จสิ้น", + "continue": "ต่อไป", + "alert": "แจ้งเตือน", + "providers": "ผู้ให้บริการ", + "services_title": "ความเป็นส่วนตัวของคุณและอิสระ", + "connect": "เชื่อมต่อ" + }, + "more_page": { + "configuration_wizard": "การติดตั้งอย่างง่าย", + "create_ssh_key": "กุญแจ SSH ของผู้ใช้ระดับสูงสุด", + "about_project": "เกี่ยวกับพวกเรา", + "about_application": "เกี่ยวกับ", + "onboarding": "ออนบอร์ด", + "console": "คอนโซล", + "application_settings": "การตั้งค่าของแอพลิเคชั่น" + }, + "about_us_page": { + "title": "เกี่ยวกับพวกเรา" + }, + "about_application_page": { + "api_version_text": "API เซิฟเวอร์เวอร์ชั้น v.{}", + "title": "เกี่ยวกับ", + "application_version_text": "แอปพลิเคชั่น เวอร์ชั่น v.{}", + "privacy_policy": "นโยบายความเป็นส่วนตัว" + }, + "application_settings": { + "dark_theme_description": "สลับธีมแอปพลิเคชั่นของคุณ", + "delete_server_description": "การกระทำนี้จะลบเซิฟเวอร์ของคุณทิ้งและคุณจะไม่สามารถเข้าถึงมันได้อีก", + "title": "การตั้งค่าแอปพลิเคชัน", + "dark_theme_title": "ธีมมืด", + "reset_config_title": "รีเซ็ตค่าดั้งเดิมการตั้งค่าของแอปพลิเคชั่น", + "reset_config_description": "รีเซ็ต api key และผู้ใช้งาน root", + "delete_server_title": "ลบเซิฟเวอร์" + }, + "ssh": { + "create": "สร้างกุญแจ SSH", + "delete_confirm_question": "คุณแน่ใจนะว่าจะลบกุญแจ SSH นี้?", + "root_subtitle": "เจ้าของกุญแจเหล่านี้จะสามารถเข้าถึงเซิฟเวอร์และทำอะไรกับเซิฟเวอร์ก็ได้. โปรดเพิ่มกุญแจนี้ไปที่เซิฟเวอร์ของคุณเท่านั้น", + "title": "กุญแจ SSH", + "delete": "ลบกุญแจ SSH", + "subtitle_with_keys": "{} กุญแจ", + "subtitle_without_keys": "ไม่มีกุญแจ", + "no_key_name": "กุญแจไม่มีชื่อ", + "root_title": "นี่คือกุญแจของผู้ใช้สูงสุด", + "input_label": "กุญแจสาธารณะของ ED25519 หรือ RSA" + }, + "console_page": { + "title": "คอนโซล", + "waiting": "กำลังรอการเริ่มตั้น…" + }, + "domain": { + "services_subtitle": "ระเบียน A จำเป็นสำหรับแต่ละเซิร์ฟเวอร์", + "email_subtitle": "ระเบียนนั้นจำเป็นสำหรับการเปลี่ยนอีเมลอย่างปลอดภัย", + "card_title": "โดเมน", + "screen_title": "โดเมนและDNS", + "ok": "ระเบียนถูกต้อง", + "error": "พบเจอปัญหา", + "refreshing": "สถานะการรีเฟรช…", + "uninitialized": "ยังไม่ได้รับข้อมูล", + "services_title": "บริการ", + "email_title": "อีเมล", + "update_list": "รายการอัปเดต", + "error_subtitle": "กดตรงนี้เพื่อแก้ไขปัญหา" + }, + "backup": { + "reuploaded_key": "กุญแจถูกอัปโหลดอีกครั้งเรียบร้อย", + "waiting_for_rebuild": "คุณจะสามารถสร้างข้อมูลสำรองของคุณได้ในไม่กี่นาที", + "restoring": "การกู้คืนจากการสำรองข้อมูง", + "restore_alert": "คุณกำลังที่จะคืนค่าจากข้อมูลสำรองที่สร้างใน {}. ข้อมูลทั้งหมดตอนนี้จะหายไป คุณแน่ใจไหม?", + "refetching_list": "ในไม่กี่นาทีรายการจะอัปเดต", + "card_title": "สำรอง", + "description": "นี่จะช่วยคุณในวันที่เซิร์ฟเวอร์ของคุณถูกโจมตีด้วยวิธีต่างๆ", + "reupload_key": "บังคับการอัปโหลดอีกครั้งของกุญแจ", + "initialize": "เริ่มตั้น", + "restore": "คืนค่าจากการสำรอง", + "no_backups": "ยังไม่มีการสำรองข้อมูลในตอนนี้", + "create_new": "สร้างข้อมูลสำรองใหม่", + "creating": "กำลังสร้างข้อมูลสำรอง: {}%", + "error_pending": "เซิร์ฟเวอร์ส่งคืนข้อผิดพลาดตรวจสอบด้านล่าง", + "refresh": "สถานะการรีเฟรช", + "refetch_backups": "ดึงข้อมูลรายการสํารองข้อมูลอีกครั้ง" + }, + "onboarding": { + "page2_backup_provider_text": "เกิดอะไรขึ้นถ้ามีอะไรเกิดขึ้นกับเซิร์ฟเวอร์ของคุณ? ลองนึกภาพการโจมตีของแฮ็กเกอร์การลบข้อมูลโดยไม่ตั้งใจหรือการปฏิเสธการให้บริการ? แต่ไม่ต้องห่วง ข้อมูลของคุณจะถูกเก็บไว้อย่างปลอดภัยในผู้ให้บริการสํารองข้อมูลของคุณ พวกเขาจะถูกเข้ารหัสอย่างปลอดภัยและสามารถเข้าถึงได้ตลอดเวลาเพื่อกู้คืนเซิร์ฟเวอร์ของคุณด้วย", + "page1_title": "ความเป็นอิสระทางดิจิทัลมีให้สําหรับเราทุกคน", + "page1_text": "อีเมล,วีพีเอ็น(vpn),การส่งข้อความ,โซเชียลเน็ตเวิร์กและอื่นๆอีกมากมาย ซึ่งอยู่ภายใต้การควบคุมของคุณ", + "page2_title": "SelfPrivacy นั้นไม่ใช่คลาวด์, แต่เป็นศูนย์ข้อมูลส่วนบุคคลของคุณเท่านั้น", + "page2_server_provider_title": "ผู้ให้บริการเซิร์ฟเวอร์", + "page2_dns_provider_title": "ผู้ให้บริการ DNS", + "page2_backup_provider_title": "ผู้ให้บริการการกู้คืนระบบ", + "page2_text": "SelfPrivacy นั้นจะทำงานกับผู้ให้บริการที่คุณเลือกเท่านั้นและหากคุณไม่มีผู้ใช้งานของผู้ให้บริการนั้นๆ, เราจะช่วยคุณสร้างมันขึ้นมาเอง", + "page2_server_provider_text": "ผู้ให้บริการจะดูแลเซิร์ฟเวอร์ของคุณและ SelfPrivacy จะช่วยเชื่อมต่อและติดตั้งสิ่งจำเป็นกับผู้ให้บริการของคุณแบบอัตโนมัติ", + "page2_dns_provider_text": "คุณต้องมีโดเมนเพื่อให้มีสถานที่ของคุณในอินเทอร์เน็ต และคุณต้องมีผู้ให้บริการ DNS ที่เชื่อถือได้เพื่อให้โดเมนชี้ไปที่เซิร์ฟเวอร์ของคุณ เราขอแนะนําให้คุณเลือกผู้ให้บริการ DNS ที่รองรับเพื่อตั้งค่าเครือข่ายโดยอัตโนมัติ" + }, + "resource_chart": { + "month": "เดือน", + "day": "วัน", + "hour": "ชั่วโมง", + "cpu_title": "ค่าการใช้งานของ CPU", + "network_title": "ค่าการใช้งานของระบบเครือข่าย", + "in": "ใน", + "out": "ออก" + }, + "server": { + "card_title": "เซิร์ฟเวอร์", + "description": "บริการของคุณทั้งหมดจะแสดงอยู่ตรงนี้", + "general_information": "ข้อมูลทั่วไป", + "resource_usage": "การใช้ว่าทรัพยากร", + "reboot_after_upgrade": "รีบูตหลังจากอัพเกรด", + "allow_autoupgrade": "ให้อนุญาตการอัพเกรดแบบอัตโนมัติ", + "allow_autoupgrade_hint": "อนุญาตให้มีการอัพเกรดแพคเกจต่างๆบนเซิร์ฟเวอร์", + "reboot_after_upgrade_hint": "รีบูตโดยไม่ต้องขออนุญาตหลังจากเสร็จสิ้นการเปลี่ยนแปลงบนเซิร์ฟเวอร์", + "server_timezone": "เขตเวลาของเซิร์ฟเวอร์", + "select_timezone": "เลือกเขตเวลา", + "timezone_search_bar": "ชื่อเขตเวลาหรือค่ากะเวลา", + "server_id": "ไอดีของเซิร์ฟเวอร์", + "status": "สถานะ", + "cpu": "CPU", + "ram": "หน่วยความจำ", + "monthly_cost": "รายจ่ายต่อเดือน", + "location": "สถานที่", + "provider": "ผู้ให้บริการ", + "core_count": { + "one": "{} core", + "two": "{} จำนวนคอร์", + "many": "{} จำนวนคอร์", + "other": "{} จำนวนคอร์", + "few": "{} จำนวนคอร์" + }, + "disk": "ดิสก์ภายในเครื่อง" + }, + "record": { + "api": "API ของ SelfPrivacy", + "cloud": "ไฟล์คลาวด์", + "git": "Git server", + "meet": "การประชุมแบบใช้วิดีโอ", + "password": "จัดการกับรหัสผ่าน", + "vpn": "VPN", + "mx": "ระเบียน MX", + "dmarc": "ระเบียน DMARC", + "spf": "ระเบียน SPF", + "root": "โดเมนหลัก", + "social": "เครือข่ายสังคมออนไลน์", + "dkim": "กุญแจ DKIM" + }, + "storage": { + "card_title": "พื้นที่ของเซิฟร์เวอร์", + "status_ok": "การใช้งานดิสก์ปกติ", + "status_error": "พื้นที่ว่างดิสก์ต่ำ", + "disk_usage": "{} ใช้แล้ว" + } +} diff --git a/assets/translations/uk.json b/assets/translations/uk.json new file mode 100644 index 00000000..904932ba --- /dev/null +++ b/assets/translations/uk.json @@ -0,0 +1,479 @@ +{ + "test": "ua-test", + "basis": { + "services_title": "Ваші особисті, приватні та незалежні послуги.", + "providers_title": "Ваш дата центр", + "select": "Обрати", + "services": "Сервіси", + "users": "Користувачі", + "providers": "Провайдери", + "domain": "Домен", + "saving": "Збереження…", + "username": "І'мя користовача", + "loading": "Завантаження…", + "later": "Перейти до налаштувати пізніше", + "connect_to_existing": "Підключитись до існуючого серверу", + "reset": "Скинути", + "details": "Подробиці", + "no_data": "Немає данних", + "wait": "Зачекайте", + "remove": "Видалити", + "apply": "Застосувати", + "done": "Готово", + "continue": "Продовжити", + "alert": "Оповіщення", + "more": "Більше", + "next": "Наступний", + "got_it": "Зрозумів", + "settings": "Налаштування", + "password": "Пароль", + "create": "Додати новий", + "confirmation": "Підтвердження", + "cancel": "Відмінити", + "delete": "Видалити", + "close": "Закрити", + "connect": "Підключіться" + }, + "locale": "ua", + "application_settings": { + "title": "Налаштування додатка", + "reset_config_title": "Скинути налаштування", + "dark_theme_title": "Темна тема", + "dark_theme_description": "Змінити тему додатка", + "reset_config_description": "Скинути API ключі та root користувача", + "delete_server_title": "Видалити сервер", + "delete_server_description": "Це видалить ваш сервер. Він більше не буде доступний." + }, + "ssh": { + "delete_confirm_question": "Ви впевнені, що хочете видалити SSH-ключ?", + "root_subtitle": "Власники цих ключів отримують повний доступ до сервера та даних. Додавайте лише свої ключі.", + "title": "SSH-ключі", + "create": "Створити SSH-ключ", + "delete": "Видалити SSH-ключ", + "subtitle_with_keys": "{} ключів", + "subtitle_without_keys": "Ключів немає", + "no_key_name": "Безіменний ключ", + "root_title": "Це ключі суперкористувача", + "input_label": "Публічний ED25519 або RSA ключ" + }, + "more_page": { + "about_project": "Про нас", + "create_ssh_key": "SSH-ключі суперкористовача", + "console": "Консоль", + "application_settings": "Налаштування додатка", + "configuration_wizard": "Майстер установки", + "about_application": "Про нас", + "onboarding": "Адаптація" + }, + "console_page": { + "title": "Консоль", + "waiting": "Очікування ініціалізації…" + }, + "about_us_page": { + "title": "Про нас" + }, + "about_application_page": { + "application_version_text": "Версія додатку v.{}", + "api_version_text": "Версія API сервера v.{}", + "privacy_policy": "Політика конфіденційності", + "title": "Про нас" + }, + "onboarding": { + "page1_title": "Цифрова незалежність, доступна кожному", + "page2_server_provider_title": "Сервер-провайдер", + "page2_title": "Політика конфіденційності-це не хмара, це твій персональний центр обробки даних", + "page1_text": "Пошта, ВПН, Месенджер, соціальна мережа і багато іншого на твоєму приватному сервері, під твоїм контролем.", + "page2_dns_provider_title": "DNS-провайдер", + "page2_dns_provider_text": "Тобі потрібен домен, щоб мати місце в інтернеті. Вам також потрібен надійний DNS-провайдер, щоб вказати домен вашого серверу. Ми запромпонуємо вам вибрати підтримуваного DNS-провайдера для автоматичного налаштування мережі.", + "page2_backup_provider_title": "Backup-провайдер", + "page2_server_provider_text": "Сервер-провайдер обслуговує ваш сервер у власному Data-центрі. Політика конфіденційності буде автоматично зв'язана з провайдером і налаштує все необхідне.", + "page2_text": "Політика конфіденційності працює лише з тим провайдром, якого ви вибрали. Якщо ви не маєте потрібних облікових записів, ми допоможемо їх вам створити.", + "page2_backup_provider_text": "Що якщо з вашим сервером щось трапиться? Уявіть собі атаку хакерів, випадкове видалення даних або відмову в обслуговуванні? Ваші дані будуть у безпеці у резервних копіях вашого провайдера. Вони будуть надійно зашифровані та у будь-який час доступні для відновлення вашого сервера." + }, + "initializing": { + "select_provider_notice": "За 'Відносно невеликим' ми маємо на увазі машину з 2 ядрами CPU і 2 гігабайтами оперативної пам'яті.", + "select_provider_price_text_do": "$ 17 на місяць для порівняно невеликого сервера і 50Гб дискового сховища", + "select_provider_email_notice": "Хостинг електронної пошти не буде доступний для нових клієнтів. Проте, вона буде розблокована, як тільки ви зробите вашу першу оплату.", + "choose_server_type_notice": "Важливими речами, на які слід дивитися, є процесор і оперативна пам'ять. Дані ваших послуг буде збережено.", + "use_this_domain_text": "Токен, який ви надали, надає доступ до наступного домену", + "loading_domain_list": "Завантаження списку доменів", + "found_more_domains": "Знайдено більше одного домену. Для власної безпеки просимо видалити непотрібні домени", + "server_created": "Сервер створений. DNS перевірений і завантаження серверу у прогресі…", + "enter_username_and_password": "Введіть ім’ я користувача і надійний пароль", + "connect_to_server": "Почнемо з сервера.", + "select_provider": "Оберіть будь-якого провайдера з наведеного нижче списку, всі вони підтримують політику конфіденційності", + "select_provider_countries_title": "Доступні країни", + "select_provider_countries_text_hetzner": "Німеччина, Фінляндія, США", + "select_provider_countries_text_do": "США, Нідерланди, Сінгапур, Велика Британія, НІмеччина, Канада, Індія, Австралія", + "select_provider_price_title": "Середня ціна", + "select_provider_price_text_hetzner": "€ 8 на місяць за відносно невеликий сервер і 50 Гб дискового сховища", + "select_provider_payment_title": "Способи оплати", + "select_provider_payment_text_hetzner": "Картка, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Картка, Google Pay, PayPal", + "select_provider_site_button": "Відвідати сайт", + "connect_to_server_provider": "Авторизуйтеся зараз ", + "locations_not_found_text": "Немає доступних серверів для оренди", + "connect_to_server_provider_text": "З токеном API SelfPrivacy зможе орендувати техніку і налаштувати на неї ваш сервер", + "how": "Як отримати токен API", + "provider_bad_key_error": "Некоректний ключ API провайдера", + "could_not_connect": "Не зміг підключитися до провайдера.", + "choose_location_type": "Де ви хочете забронювати свій сервер?", + "choose_location_type_text": "Різні локації забезпечують різні конфігурації серверів, ціни і швидкість з'єднання.", + "locations_not_found": "Упс!", + "back_to_locations": "Оберіть щось інше", + "no_locations_found": "Не знайдено доступних місць, перевірте, чи ваш обліковий запис доступний", + "choose_server_type": "Який тип сервера вам потрібен?", + "choose_server_type_text": "Різні ресурсні можливості підтримують різні сервіси. Не хвилюйся, ти можеш розширити свій сервер коли завгодно", + "choose_server_type_ram": "{} ГБ ОЗУ", + "choose_server_type_storage": "{} ГБ системного сховища", + "choose_server_type_payment_per_month": "{} щомісячно", + "no_server_types_found": "Не знайдено доступних типів серверів. Переконайтеся, що ваш обліковий запис доступний і спробуйте змінити розташування вашого сервера.", + "cloudflare_bad_key_error": "Некоректний ключ API CloudFlare", + "backblaze_bad_key_error": "Інформація про зберігання Backblaze є недійсною", + "select_dns": "Тепер давайте оберемо DNS-провайдера", + "manage_domain_dns": "Для управління DNS домену", + "use_this_domain": "Скористатися цим доменом?", + "cloudflare_api_token": "CloudFlare API токен", + "connect_backblaze_storage": "Підключити Backblaze сховище", + "no_connected_domains": "Наразі немає пов'язаних доменів", + "save_domain": "Зберегти домен", + "final": "Останній крок", + "create_server": "Створити сервер", + "what": "Що це значить?", + "server_rebooted": "Сервер перезавантажено. Чекаю останньої перевірки…", + "server_started": "Сервер запущено. Його буде перевірено і перезавантажено…", + "until_the_next_check": "До наступної перевірки: ", + "check": "Перевірка", + "one_more_restart": "Ще один перезапуск, щоб застосувати сертифікати безпеки.", + "create_master_account": "Створити внутрішній рахунок", + "finish": "Усе ініціалізовано", + "checks": "Перевірка була завершена\n{} з {}" + }, + "recovering": { + "recovery_main_header": "З’ єднатися з існуючим сервером", + "generic_error": "Операція зазнала невдачі, будь ласка, спробуйте ще раз.", + "domain_recovery_description": "Введіть домен сервера, до якого ви бажаєте отримати доступ:", + "domain_recover_placeholder": "Ваш домен", + "domain_recover_error": "Сервера з таким доменом не знайдено", + "method_select_description": "Виберіть спосіб відновлення:", + "method_select_other_device": "У мене є доступ до іншого пристрою", + "method_select_recovery_key": "Я маю ключ відновлення", + "method_select_nothing": "Я не маю нічого з цього", + "method_device_description": "Відкрийте програму на іншому пристрої та перейдіть на сторінку пристроїв. Натисніть \"Додати пристрій\", щоб отримати свій токен.", + "method_device_button": "Я отримав свій токен", + "method_device_input_description": "Введіть токен авторизації", + "method_device_input_placeholder": "Токен", + "method_recovery_input_description": "Введіть ключ відновлення", + "fallback_select_description": "Що у вас є? Виберіть перший доступний варіант:", + "fallback_select_token_copy": "Копія токена автентифікації з іншої версії застосунку.", + "fallback_select_root_ssh": "Root SSH доступ до сервера.", + "fallback_select_provider_console": "Доступ до серверної консолі мого продiвера.", + "authorization_failed": "Не можу авторизуватись за цим ключем", + "fallback_select_provider_console_hint": "Наприклад: Hetzner.", + "server_provider_connected": "Підключіться до провайдера сервера", + "server_provider_connected_description": "Зв'язок встановлений. Введіть свій токен з доступом до {}:", + "server_provider_connected_placeholder": "Токен провайдера сервера", + "confirm_server": "Підтвердити сервер", + "confirm_server_description": "Знайдено ваш сервер! Підтвердіть, що він правильний:", + "confirm_server_accept": "Так! Це воно", + "confirm_server_decline": "Вибрати інший сервер", + "choose_server": "Виберіть ваш сервер", + "no_servers": "На вашому обліковому записі немає доступних серверів.", + "choose_server_description": "Ми не змогли з'ясувати, до якого сервера ви намагаєтесь підключитися.", + "domain_not_available_on_token": "Вибраний домен недоступний на цьому токені.", + "modal_confirmation_title": "Це насправді ваш сервер?", + "modal_confirmation_description": "Якщо ви підключаєтеся до невірного сервера, ви можете втратити всі ваші дані.", + "modal_confirmation_dns_valid": "Зворотна DNS дійсна", + "modal_confirmation_dns_invalid": "Зворотна DNS вказує на інший домен", + "modal_confirmation_ip_valid": "IP той же, що і в записі DNS", + "modal_confirmation_ip_invalid": "IP не такий, як в DNS-записі", + "confirm_cloudflare": "Підключення до CloudFlare", + "confirm_cloudflare_description": "Введіть токен CloudFlare з доступом до {}:", + "confirm_backblaze": "Підкючитися до Backblaze", + "confirm_backblaze_description": "Введіть токен Backblaze із доступом до сховища резервних копій:" + }, + "resource_chart": { + "month": "Місяць", + "day": "День", + "hour": "Година", + "cpu_title": "Використання CPU", + "network_title": "Використання мережі", + "in": "В", + "out": "Вийти" + }, + "server": { + "card_title": "Сервер", + "description": "Усі твої сервіси тут", + "general_information": "Загальна інформація", + "resource_usage": "Використання ресурсів", + "allow_autoupgrade": "Дозволити авто-оновлення", + "allow_autoupgrade_hint": "Дозволити автоматичне покращення пакетів на сервері", + "select_timezone": "Вибрати часовий пояс", + "status": "Статус", + "server_id": "Сервер ID", + "cpu": "Процессор", + "ram": "Пам'ять", + "provider": "Провайдер", + "core_count": { + "one": "{} ядро", + "few": "{} ядра", + "many": "{} ядер", + "other": "{} ядра", + "two": "{} ядра" + }, + "disk": "Локальний диск", + "reboot_after_upgrade": "Перезавантаження після оновлення", + "reboot_after_upgrade_hint": "Перезавантаження без запиту після застосування змін на сервері", + "server_timezone": "Часовий пояс сервера", + "timezone_search_bar": "Ім'я часового поясу або значення зсуву часу", + "monthly_cost": "Щомісячна вартість", + "location": "Місцезнаходження" + }, + "record": { + "api": "SelfPrivacy API", + "cloud": "Файлове сховище", + "git": "Git-сервер", + "social": "Соціальна мережа", + "password": "Менеджер паролів", + "vpn": "VPN", + "mx": "MX-запис", + "dmarc": "DMARC-запис", + "spf": "SPF-запис", + "meet": "Відео конференція", + "dkim": "DKIM ключі", + "root": "Кореневий домен" + }, + "domain": { + "card_title": "Домен", + "screen_title": "Домен та DNS", + "ok": "Записи в порядку", + "error": "Знайдені проблеми", + "refreshing": "Статус оновлення…", + "uninitialized": "Дані ще не відновлено", + "services_title": "Сервіси", + "email_title": "Електронна пошта", + "email_subtitle": "Записи, необхідні для безпечного обміну електронною поштою.", + "update_list": "Лист оновлень", + "error_subtitle": "Нажміть сюди, щоб виправити їх", + "services_subtitle": "Введіть \"А\" записи, необхідні для кожної служби." + }, + "backup": { + "card_title": "Резервне копіювання", + "reupload_key": "Примусове повторне завантаження ключа", + "reuploaded_key": "Ключ повторно завантажений", + "initialize": "Ініціалізація", + "restore": "Відновити з резервної копії", + "no_backups": "Ще немає резервних копій", + "create_new": "Створити нову резервну копію", + "creating": "Створення нової резервної копії: {}%", + "error_pending": "Помилка відновлення сервера, перевірте це нижче", + "refresh": "Оновити статус", + "refetch_backups": "Повторно отримати список резервних копій", + "refetching_list": "За кілька хвилин список буде оновлений", + "description": "Врятує ваш день у разі аварії: хакерська атака, видаленя серверу, тощо.", + "waiting_for_rebuild": "Ви зможете створити свою першу резервну копію через кілька хвилин.", + "restoring": "Відновлення з резервної копії", + "restore_alert": "Ви збираєтеся відновити з резервної копії. створеної на {}. Усі поточні дані будуть втрачені. Ви згодні?" + }, + "storage": { + "card_title": "Серверне сховище", + "status_error": "Мало місця на диску", + "disk_usage": "{} використано", + "disk_total": "{} всього · {}", + "gb": "{} ГБ", + "mb": "{} МБ", + "kb": "{} КБ", + "bytes": "Байти", + "extend_volume_button": "Збільшити обсяг", + "extending_volume_price_info": "Ціна включає ПДВ і оцінюється з даних ціноутворення, наданих Hetzner. Сервер буде перезавантажений після зміни розміру.", + "extending_volume_error": "Не вдалося ініціалізувати розширення обсягу.", + "size": "Розмір", + "euro": "Євро", + "data_migration_title": "Перенесення даних", + "start_migration_button": "Почати перенос", + "migration_process": "Перенос…", + "migration_done": "Закінчити", + "status_ok": "Використання диска нормальне", + "extending_volume_title": "Збільшення обсягу", + "extending_volume_description": "Зміна обсягу дозволить зберігати більше даних на вашому сервері без розширення сервера. Обсяг може бути тільки збільшеним: зменшення неможливе.", + "data_migration_notice": "Під час переносу всі послуги будуть вимкнені." + }, + "not_ready_card": { + "begin": "Будь ласка, завершіть налаштування програми ", + "insertion": "Майстер налаштувань", + "end": " Для подальшої роботи", + "in_menu": "Сервер ще не налаштовано. Будь ласка, завершіть налаштування за допомогою майстра налаштування для подальшої роботи." + }, + "service_page": { + "open_in_browser": "Відкрити у браузері", + "restart": "Перезавантажити сервіс", + "disable": "Викнути сервіс", + "enable": "Увімкнути сервіс", + "move": "Перейти до іншого об'єму", + "status": { + "active": "Створювати і запускати", + "inactive": "Зупинено", + "failed": "Не вдалося запустити", + "off": "Вимкнено", + "activating": "Активація", + "deactivating": "Деактивація", + "reloading": "Перезапуск" + }, + "uses": "Використовує {usage} на {volume}" + }, + "mail": { + "subtitle": "E-Mail для компанії та сім'ї.", + "title": "E-Mail", + "login_info": "Використовувати ім’ я користувача і пароль з вкладки « користувач ». Порт IMAP — 143 з STARTTLS, порт SMTP — 587." + }, + "password_manager": { + "title": "Менеджер паролів", + "login_info": "Вам доведеться створити обліковий запис на веб-сайті.", + "subtitle": "Основа вашої безпеки. Bitwarden допоможе вам створювати, зберігати і переміщати паролі між пристроями, а також вводити їх за запитом за допомогою автозаповнення." + }, + "video": { + "title": "Відеозустріч", + "subtitle": "Zoom і Google Meet хороші, але Jitsi meet є вартою альтернативи, яка також дає вам впевненість, що вас не слухають.", + "login_info": "Обліковий запис не потрібен." + }, + "cloud": { + "title": "Хмарне сховище", + "subtitle": "Не дозволяйте хмарним службам читати ваші дані, за допомогою NextCloud.", + "login_info": "Вхід адміністратора, пароль такий самий, як і у вашого головного користувача. Створити нові аккаунти у Nextcloud." + }, + "social_network": { + "title": "Соціальна мережа", + "login_info": "Вам доведеться створити обліковий запис на веб-сайті.", + "subtitle": "Важко повірити, але стало можливим створити власну соціальну мережу, з твоїми власними правилами та цільовою аудиторією." + }, + "git": { + "title": "Git-сервер", + "subtitle": "Приватна альтернатива Github, яка належить вам, а не Microsoft.", + "login_info": "Вам доведеться створити обліковий запис на веб-сайті. Першим користувачем стане адміністратор." + }, + "vpn": { + "title": "VPN-сервер", + "subtitle": "Приватний VPN-сервер" + }, + "users": { + "add_new_user": "Додати першого користувача", + "new_user": "Новий користувач", + "delete_user": "Видалити користувача", + "nobody_here": "Нікого немає", + "login": "Логін", + "new_user_info_note": "Новий користувач автоматично отримає доступ до всіх послуг", + "delete_confirm_question": "Ви згодні?", + "reset_password": "Скинути пароль", + "account": "Аккаунт", + "send_registration_data": "Поділитися реєстраційними даними", + "could_not_fetch_users": "Не вдалося отримати список користувачів", + "refresh_users": "Оновити список користувачів", + "could_not_create_user": "Не зміг створити користувача", + "could_not_delete_user": "Не зміг видалити користувача", + "could_not_add_ssh_key": "Не зміг додати SSH-ключ", + "email_login": "Увійти через Email", + "not_ready": "Будь ласка, підключіть сервер, домен і DNS на вкладці \"Сервери\", щоб мати можливість додати першого користувача", + "could_not_fetch_description": "Перевірте підключення до Інтернету і спробуйте ще раз", + "username_rule": "Ім'я користувача має містити лише малі латинські літери, цифри і підкреслення, не слід починати з цифри", + "no_ssh_notice": "Для цього користувача створюються тільки поштові та SSH-акаунти. Єдина реєстрація для всіх сервісів незабаром." + }, + "devices": { + "main_screen": { + "header": "Пристрої", + "description": "Ці пристрої мають повний доступ до сервера через додаток SelfPrivacy.", + "this_device": "Цей пристрій", + "other_devices": "Інші пристрої", + "authorize_new_device": "Авторизація нового пристрою", + "access_granted_on": "Доступ надано на {}", + "tip": "Натисніть на пристрої, щоб скасувати доступ." + }, + "add_new_device_screen": { + "header": "Авторизація нового пристрою", + "description": "Введіть ключ пристрою, який ви бажаєте авторизувати:", + "please_wait": "Будь ласка зачекайте", + "tip": "Ключ дійсний протягом 10 хвилин.", + "expired": "Термін дії ключа минув.", + "get_new_key": "Отримати новий ключ" + }, + "revoke_device_alert": { + "header": "Відкликати доступ?", + "description": "Пристрій {} більше не матиме доступу до сервера.", + "yes": "Відкликати", + "no": "Скасувати" + } + }, + "recovery_key": { + "key_connection_error": "Не вдалося підключитися до сервера.", + "key_synchronizing": "Синхронізація…", + "key_main_header": "Ключ відновлення", + "key_main_description": "Необхідно авторизувати SelfPrivacy, коли всі інші авторизовані пристрої недоступні.", + "key_amount_toggle": "Обмеження за кількістю використань", + "key_amount_field_title": "Максимальна кількість використань", + "key_duedate_toggle": "Обмеження за часом", + "key_duedate_field_title": "Дата закінчення терміну дії", + "key_receive_button": "Ключ прийому", + "key_valid": "Ваш ключ дійсний", + "key_invalid": "Ваш ключ більше не дійсний", + "key_valid_until": "Діє до {}", + "key_valid_for": "Дійсний для використання {}", + "key_creation_date": "Створено на {}", + "key_replace_button": "Сгенерувати новий ключ", + "key_receiving_description": "Запишіть цей ключ і сховайте у безпечне місце. Використовується для відновлення повного доступу до вашого сервера:", + "key_receiving_info": "Ключ ніколи більше не відображатиметься, але ви зможете замінити його іншим.", + "key_receiving_done": "Готово!", + "generation_error": "Не вдалося створити ключ відновлення. {}" + }, + "modals": { + "dns_removal_error": "Не вдалося видалити DNS-записи.", + "server_deletion_error": "Не вдалося видалити активний сервер.", + "server_validators_error": "Не вдалося отримати доступні сервери.", + "already_exists": "Такий сервер вже існує.", + "unexpected_error": "Неочікувана помилка під час розміщення з боку провайдера.", + "destroy_server": "Знищити сервер і створити новий?", + "try_again": "Спробувати ще раз?", + "are_you_sure": "Ви впевнені?", + "purge_all_keys": "Очистити всі ключі автентифікації?", + "purge_all_keys_confirm": "Так, очистити всі мої токени", + "delete_server_volume": "Видалити сервер і сховище?", + "reboot": "Перезавантажити", + "you_cant_use_this_api": "Не можна використовувати цей API для доменів з таким TLD.", + "yes": "Так", + "no": "Ні" + }, + "timer": { + "sec": "{} сек" + }, + "jobs": { + "title": "Задачі", + "start": "Початок", + "empty": "Задач немає", + "create_user": "Створити користувача", + "delete_user": "Видалити користувача", + "service_turn_off": "Вимкнути", + "service_turn_on": "Увімкнути", + "job_added": "Завдання додано", + "run_jobs": "Запустіть завдання", + "reboot_success": "Сервер перезавантажується", + "reboot_failed": "Не зміг перезавантажити сервер. Перевірте журнали додатків.", + "config_pull_failed": "Не вдалося виконати оновлення налаштувань. Запустили оновлення програмного забезпечення в будь-якому випадку.", + "upgrade_success": "Почалося оновлення сервера", + "upgrade_failed": "Не вдалося оновити сервер", + "upgrade_server": "Покращити сервер", + "reboot_server": "Перезавантажити сервер", + "create_ssh_key": "Створити SSH-ключ для {}", + "delete_ssh_key": "Видалити SSH-ключ для {}", + "server_jobs": "Задачі на сервері", + "reset_user_password": "Скинути пароль користувача", + "generic_error": "Не вдалося підключитись до сервера!" + }, + "validations": { + "required": "Потрібно", + "already_exist": "Вже існує", + "invalid_format": "Неприпустимий формат", + "invalid_format_password": "Не повинен містити порожніх символів", + "length_longer": "Довжина [] повинна бути коротшою або дорівнює {}", + "invalid_format_ssh": "Повинен відповідати формату ключа SSH", + "root_name": "Не може бути 'root'", + "length_not_equal": "Довжина [], має бути {}" + } +} diff --git a/assets/translations/uz.json b/assets/translations/uz.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/uz.json @@ -0,0 +1 @@ +{} From 9cbe3b2abb459f67a06d16baefe34532bad3f4d2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 29 Jan 2023 08:31:40 +0400 Subject: [PATCH 341/732] fix: Improve dns checking on recovery No special case for when a user only has one server --- lib/ui/pages/setup/recovering/recovery_confirm_server.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 969e3d39..6ac0e127 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -55,8 +55,7 @@ class _RecoveryConfirmServerState extends State { if (servers != null && servers.isNotEmpty) Column( children: [ - if (servers.length == 1 || - (!_isExtended && _isServerFound(servers))) + if (!_isExtended && _isServerFound(servers)) confirmServer( context, _firstValidServer(servers), From 9929cdd1a3cd3fbefa8733656c8207670621ae85 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 29 Jan 2023 08:41:59 +0400 Subject: [PATCH 342/732] fix: Remove double protocol on opening a service link --- lib/ui/pages/services/services.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index fc00922b..606fc9d7 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -146,7 +146,7 @@ class _Card extends StatelessWidget { children: [ GestureDetector( onTap: () => _launchURL( - 'https://${service.url}', + service.url, ), child: Text( '${service.url}', From fcd1c2960689a13b124206cd9823c8fb274d8697 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 29 Jan 2023 08:56:51 +0400 Subject: [PATCH 343/732] fix: Remove breaking underscore from a launchURL call In services.dart --- lib/ui/pages/services/services.dart | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 8295df27..c7c01daa 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -133,13 +133,8 @@ class _Card extends StatelessWidget { Column( children: [ GestureDetector( -<<<<<<< HEAD onTap: () => launchURL( - 'https://${service.url}', -======= - onTap: () => _launchURL( service.url, ->>>>>>> master ), child: Text( '${service.url}', From a270f3dfbb951fc3ccc43ca574813cafb289eef2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 30 Jan 2023 19:44:52 +0400 Subject: [PATCH 344/732] feat: Implement general server provider and its factory --- .../graphql_maps/server_api/server_api.dart | 12 ++-- .../api_maps/rest_maps/api_controller.dart | 8 +-- .../rest_maps/api_factory_creator.dart | 26 ++++----- .../digital_ocean/digital_ocean_api.dart | 4 +- .../server_providers/hetzner/hetzner_api.dart | 6 +- .../server_providers/server_provider.dart | 8 +-- .../initializing/domain_setup_cubit.dart | 2 +- .../server_installation_cubit.dart | 55 +++++++------------ .../server_installation_repository.dart | 32 +++++------ lib/logic/get_it/api_config.dart | 12 ++-- lib/logic/models/hive/server_details.dart | 12 ++-- lib/logic/models/hive/server_domain.dart | 8 +-- .../provider_settings.dart} | 12 ++-- lib/logic/providers/providers_controller.dart | 20 +++++++ lib/logic/providers/server_provider.dart | 5 ++ .../server_providers/digital_ocean.dart | 3 + .../providers/server_providers/hetzner.dart | 3 + .../server_provider_factory.dart | 27 ++++++--- .../initializing/dns_provider_picker.dart | 24 ++++---- .../initializing/server_provider_picker.dart | 26 ++++----- 20 files changed, 166 insertions(+), 139 deletions(-) rename lib/logic/{api_maps/rest_maps/api_factory_settings.dart => providers/provider_settings.dart} (54%) create mode 100644 lib/logic/providers/providers_controller.dart create mode 100644 lib/logic/providers/server_provider.dart create mode 100644 lib/logic/providers/server_providers/digital_ocean.dart diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 51da63ac..9f863b1f 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -69,9 +69,9 @@ class ServerApi extends ApiMap return apiVersion; } - Future getServerProviderType() async { + Future getServerProviderType() async { QueryResult response; - ServerProvider providerType = ServerProvider.unknown; + ServerProviderType providerType = ServerProviderType.unknown; try { final GraphQLClient client = await getClient(); @@ -79,7 +79,7 @@ class ServerApi extends ApiMap if (response.hasException) { print(response.exception.toString()); } - providerType = ServerProvider.fromGraphQL( + providerType = ServerProviderType.fromGraphQL( response.parsedData!.system.provider.provider, ); } catch (e) { @@ -88,9 +88,9 @@ class ServerApi extends ApiMap return providerType; } - Future getDnsProviderType() async { + Future getDnsProviderType() async { QueryResult response; - DnsProvider providerType = DnsProvider.unknown; + DnsProviderType providerType = DnsProviderType.unknown; try { final GraphQLClient client = await getClient(); @@ -98,7 +98,7 @@ class ServerApi extends ApiMap if (response.hasException) { print(response.exception.toString()); } - providerType = DnsProvider.fromGraphQL( + providerType = DnsProviderType.fromGraphQL( response.parsedData!.system.domainInfo.provider, ); } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/api_controller.dart b/lib/logic/api_maps/rest_maps/api_controller.dart index 440d25af..73fd8e5c 100644 --- a/lib/logic/api_maps/rest_maps/api_controller.dart +++ b/lib/logic/api_maps/rest_maps/api_controller.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; @@ -12,21 +12,21 @@ class ApiController { _serverProviderApiFactory; static void initVolumeProviderApiFactory( - final ServerProviderApiFactorySettings settings, + final ServerProviderSettings settings, ) { _volumeProviderApiFactory = VolumeApiFactoryCreator.createVolumeProviderApiFactory(settings); } static void initDnsProviderApiFactory( - final DnsProviderApiFactorySettings settings, + final DnsProviderFactorySettings settings, ) { _dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory(settings); } static void initServerProviderApiFactory( - final ServerProviderApiFactorySettings settings, + final ServerProviderSettings settings, ) { _serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory(settings); diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 662dd4f8..97bb3acd 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; @@ -15,27 +15,27 @@ class UnknownApiProviderException implements Exception { class ApiFactoryCreator { static ServerProviderApiFactory createServerProviderApiFactory( - final ServerProviderApiFactorySettings settings, + final ServerProviderSettings settings, ) { switch (settings.provider) { - case ServerProvider.hetzner: + case ServerProviderType.hetzner: return HetznerApiFactory(region: settings.location); - case ServerProvider.digitalOcean: + case ServerProviderType.digitalOcean: return DigitalOceanApiFactory(region: settings.location); - case ServerProvider.unknown: + case ServerProviderType.unknown: throw UnknownApiProviderException('Unknown server provider'); } } static DnsProviderApiFactory createDnsProviderApiFactory( - final DnsProviderApiFactorySettings settings, + final DnsProviderFactorySettings settings, ) { switch (settings.provider) { - case DnsProvider.cloudflare: + case DnsProviderType.cloudflare: return CloudflareApiFactory(); - case DnsProvider.digitalOcean: + case DnsProviderType.digitalOcean: return DigitalOceanDnsApiFactory(); - case DnsProvider.unknown: + case DnsProviderType.unknown: throw UnknownApiProviderException('Unknown DNS provider'); } } @@ -43,14 +43,14 @@ class ApiFactoryCreator { class VolumeApiFactoryCreator { static VolumeProviderApiFactory createVolumeProviderApiFactory( - final ServerProviderApiFactorySettings settings, + final ServerProviderSettings settings, ) { switch (settings.provider) { - case ServerProvider.hetzner: + case ServerProviderType.hetzner: return HetznerApiFactory(); - case ServerProvider.digitalOcean: + case ServerProviderType.digitalOcean: return DigitalOceanApiFactory(); - case ServerProvider.unknown: + case ServerProviderType.unknown: throw UnknownApiProviderException('Unknown volume provider'); } } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 438e92bf..540b39c5 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -332,7 +332,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, - required final DnsProvider dnsProvider, + required final DnsProviderType dnsProvider, }) async { ServerHostingDetails? serverDetails; @@ -394,7 +394,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { createTime: DateTime.now(), volume: newVolume, apiToken: apiToken, - provider: ServerProvider.digitalOcean, + provider: ServerProviderType.digitalOcean, ); } } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index b9761133..cfd9eb40 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -356,7 +356,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, - required final DnsProvider dnsProvider, + required final DnsProviderType dnsProvider, }) async { final APIGenericResult newVolumeResponse = await createVolume(); @@ -385,7 +385,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String domainName, required final ServerVolume volume, required final String serverType, - required final DnsProvider dnsProvider, + required final DnsProviderType dnsProvider, }) async { final Dio client = await getClient(); @@ -434,7 +434,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { createTime: DateTime.now(), volume: volume, apiToken: apiToken, - provider: ServerProvider.hetzner, + provider: ServerProviderType.hetzner, ); success = true; } on DioError catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 32d31764..99516535 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -39,7 +39,7 @@ abstract class ServerProviderApi extends ApiMap { required final User rootUser, required final String domainName, required final String serverType, - required final DnsProvider dnsProvider, + required final DnsProviderType dnsProvider, }); Future> createReverseDns({ required final ServerHostingDetails serverDetails, @@ -55,13 +55,13 @@ abstract class ServerProviderApi extends ApiMap { final DateTime end, ); - String dnsProviderToInfectName(final DnsProvider dnsProvider) { + String dnsProviderToInfectName(final DnsProviderType dnsProvider) { String dnsProviderType; switch (dnsProvider) { - case DnsProvider.digitalOcean: + case DnsProviderType.digitalOcean: dnsProviderType = 'DIGITALOCEAN'; break; - case DnsProvider.cloudflare: + case DnsProviderType.cloudflare: default: dnsProviderType = 'CLOUDFLARE'; break; diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index 62fc1050..c4c8a22f 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -39,7 +39,7 @@ class DomainSetupCubit extends Cubit { final ServerDomain domain = ServerDomain( domainName: domainName, zoneId: zoneId, - provider: DnsProvider.cloudflare, + provider: DnsProviderType.cloudflare, ); serverInstallationCubit.setDomain(domain); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 60a801fd..e6ad9be1 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -6,8 +6,9 @@ import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; +import 'package:selfprivacy/logic/providers/providers_controller.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; @@ -57,45 +58,29 @@ class ServerInstallationCubit extends Cubit { } } - void setServerProviderType(final ServerProvider providerType) async { + void setServerProviderType(final ServerProviderType providerType) async { await repository.saveServerProviderType(providerType); - ApiController.initServerProviderApiFactory( - ServerProviderApiFactorySettings( - provider: providerType, - ), + ProvidersController.initServerProvider( + ServerProviderSettings(provider: providerType), ); } - void setDnsProviderType(final DnsProvider providerType) async { + void setDnsProviderType(final DnsProviderType providerType) async { await repository.saveDnsProviderType(providerType); ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( + DnsProviderFactorySettings( provider: providerType, ), ); } - ProviderApiTokenValidation serverProviderApiTokenValidation() => - ApiController.currentServerProviderApiFactory! - .getServerProvider() - .getApiTokenValidation(); - - RegExp getDnsProviderApiTokenValidation() => - ApiController.currentDnsProviderApiFactory! - .getDnsProvider() - .getApiTokenValidation(); - Future isServerProviderApiTokenValid( final String providerToken, ) async { final APIGenericResult apiResponse = - await ApiController.currentServerProviderApiFactory! - .getServerProvider( - settings: const ServerProviderApiSettings( - isWithToken: false, - ), - ) - .isApiTokenValid(providerToken); + await ProvidersController.currentServerProvider!.isApiTokenValid( + providerToken, + ); if (!apiResponse.success) { getIt().showSnackBar( @@ -191,7 +176,7 @@ class ServerInstallationCubit extends Cubit { await repository.saveServerType(serverType); ApiController.initServerProviderApiFactory( - ServerProviderApiFactorySettings( + ServerProviderSettings( provider: getIt().serverProvider!, location: serverType.location.identifier, ), @@ -200,7 +185,7 @@ class ServerInstallationCubit extends Cubit { // All server providers support volumes for now, // so it's safe to initialize. ApiController.initVolumeProviderApiFactory( - ServerProviderApiFactorySettings( + ServerProviderSettings( provider: getIt().serverProvider!, location: serverType.location.identifier, ), @@ -485,7 +470,7 @@ class ServerInstallationCubit extends Cubit { void submitDomainForAccessRecovery(final String domain) async { final ServerDomain serverDomain = ServerDomain( domainName: domain, - provider: DnsProvider.unknown, + provider: DnsProviderType.unknown, zoneId: '', ); final ServerRecoveryCapabilities recoveryCapabilities = @@ -537,20 +522,20 @@ class ServerInstallationCubit extends Cubit { token, dataState.recoveryCapabilities, ); - final ServerProvider serverProvider = await ServerApi( + final ServerProviderType serverProvider = await ServerApi( customToken: serverDetails.apiToken, isWithToken: true, ).getServerProviderType(); - final DnsProvider dnsProvider = await ServerApi( + final DnsProviderType dnsProvider = await ServerApi( customToken: serverDetails.apiToken, isWithToken: true, ).getDnsProviderType(); - if (serverProvider == ServerProvider.unknown) { + if (serverProvider == ServerProviderType.unknown) { getIt() .showSnackBar('recovering.generic_error'.tr()); return; } - if (dnsProvider == DnsProvider.unknown) { + if (dnsProvider == DnsProviderType.unknown) { getIt() .showSnackBar('recovering.generic_error'.tr()); return; @@ -684,7 +669,7 @@ class ServerInstallationCubit extends Cubit { linuxDevice: '', ), apiToken: dataState.serverDetails!.apiToken, - provider: ServerProvider.hetzner, + provider: ServerProviderType.hetzner, ); await repository.saveDomain(serverDomain); await repository.saveServerDetails(serverDetails); @@ -714,7 +699,7 @@ class ServerInstallationCubit extends Cubit { ServerDomain( domainName: serverDomain.domainName, zoneId: zoneId, - provider: DnsProvider.cloudflare, + provider: DnsProviderType.cloudflare, ), ); await repository.setDnsApiToken(token); @@ -723,7 +708,7 @@ class ServerInstallationCubit extends Cubit { serverDomain: ServerDomain( domainName: serverDomain.domainName, zoneId: zoneId, - provider: DnsProvider.cloudflare, + provider: DnsProviderType.cloudflare, ), dnsApiToken: token, currentStep: RecoveryStep.backblazeToken, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 3b787a70..50eb7998 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -10,7 +10,7 @@ import 'package:pub_semver/pub_semver.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; +import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; @@ -48,8 +48,8 @@ class ServerInstallationRepository { final String? cloudflareToken = getIt().dnsProviderKey; final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; - final DnsProvider? dnsProvider = getIt().dnsProvider; - final ServerProvider? serverProvider = + final DnsProviderType? dnsProvider = getIt().dnsProvider; + final ServerProviderType? serverProvider = getIt().serverProvider; final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; @@ -58,9 +58,9 @@ class ServerInstallationRepository { if (serverProvider != null || (serverDetails != null && - serverDetails.provider != ServerProvider.unknown)) { + serverDetails.provider != ServerProviderType.unknown)) { ApiController.initServerProviderApiFactory( - ServerProviderApiFactorySettings( + ServerProviderSettings( provider: serverProvider ?? serverDetails!.provider, location: location, ), @@ -69,7 +69,7 @@ class ServerInstallationRepository { // All current providers support volumes // so it's safe to hardcode for now ApiController.initVolumeProviderApiFactory( - ServerProviderApiFactorySettings( + ServerProviderSettings( provider: serverProvider ?? serverDetails!.provider, location: location, ), @@ -78,9 +78,9 @@ class ServerInstallationRepository { if (dnsProvider != null || (serverDomain != null && - serverDomain.provider != ServerProvider.unknown)) { + serverDomain.provider != ServerProviderType.unknown)) { ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( + DnsProviderFactorySettings( provider: dnsProvider ?? serverDomain!.provider, ), ); @@ -147,8 +147,8 @@ class ServerInstallationRepository { ) { if (serverDetails != null) { if (serverProviderToken != null) { - if (serverDetails.provider != ServerProvider.unknown) { - if (serverDomain.provider != DnsProvider.unknown) { + if (serverDetails.provider != ServerProviderType.unknown) { + if (serverDomain.provider != DnsProviderType.unknown) { return RecoveryStep.backblazeToken; } return RecoveryStep.dnsProviderToken; @@ -534,7 +534,7 @@ class ServerInstallationRepository { serverId: 0, linuxDevice: '', ), - provider: ServerProvider.unknown, + provider: ServerProviderType.unknown, id: 0, ip4: serverIp, startTime: null, @@ -571,7 +571,7 @@ class ServerInstallationRepository { serverId: 0, linuxDevice: '', ), - provider: ServerProvider.unknown, + provider: ServerProviderType.unknown, id: 0, ip4: serverIp, startTime: null, @@ -606,7 +606,7 @@ class ServerInstallationRepository { sizeByte: 0, linuxDevice: '', ), - provider: ServerProvider.unknown, + provider: ServerProviderType.unknown, id: 0, ip4: serverIp, startTime: null, @@ -634,7 +634,7 @@ class ServerInstallationRepository { serverId: 0, linuxDevice: '', ), - provider: ServerProvider.unknown, + provider: ServerProviderType.unknown, id: 0, ip4: serverIp, startTime: null, @@ -691,11 +691,11 @@ class ServerInstallationRepository { getIt().init(); } - Future saveServerProviderType(final ServerProvider type) async { + Future saveServerProviderType(final ServerProviderType type) async { await getIt().storeServerProviderType(type); } - Future saveDnsProviderType(final DnsProvider type) async { + Future saveDnsProviderType(final DnsProviderType type) async { await getIt().storeDnsProviderType(type); } diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 2ca9d53b..b93105d3 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -13,8 +13,8 @@ class ApiConfigModel { String? get serverLocation => _serverLocation; String? get serverType => _serverType; String? get dnsProviderKey => _dnsProviderKey; - ServerProvider? get serverProvider => _serverProvider; - DnsProvider? get dnsProvider => _dnsProvider; + ServerProviderType? get serverProvider => _serverProvider; + DnsProviderType? get dnsProvider => _dnsProvider; BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; @@ -23,19 +23,19 @@ class ApiConfigModel { String? _serverLocation; String? _dnsProviderKey; String? _serverType; - ServerProvider? _serverProvider; - DnsProvider? _dnsProvider; + ServerProviderType? _serverProvider; + DnsProviderType? _dnsProvider; ServerHostingDetails? _serverDetails; BackblazeCredential? _backblazeCredential; ServerDomain? _serverDomain; BackblazeBucket? _backblazeBucket; - Future storeServerProviderType(final ServerProvider value) async { + Future storeServerProviderType(final ServerProviderType value) async { await _box.put(BNames.serverProvider, value); _serverProvider = value; } - Future storeDnsProviderType(final DnsProvider value) async { + Future storeDnsProviderType(final DnsProviderType value) async { await _box.put(BNames.dnsProvider, value); _dnsProvider = value; } diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index 54ec257f..e746dd75 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -33,8 +33,8 @@ class ServerHostingDetails { @HiveField(5) final String apiToken; - @HiveField(6, defaultValue: ServerProvider.hetzner) - final ServerProvider provider; + @HiveField(6, defaultValue: ServerProviderType.hetzner) + final ServerProviderType provider; ServerHostingDetails copyWith({final DateTime? startTime}) => ServerHostingDetails( @@ -77,7 +77,7 @@ class ServerVolume { } @HiveType(typeId: 101) -enum ServerProvider { +enum ServerProviderType { @HiveField(0) unknown, @HiveField(1) @@ -85,7 +85,7 @@ enum ServerProvider { @HiveField(2) digitalOcean; - factory ServerProvider.fromGraphQL(final Enum$ServerProvider provider) { + factory ServerProviderType.fromGraphQL(final Enum$ServerProvider provider) { switch (provider) { case Enum$ServerProvider.HETZNER: return hetzner; @@ -98,9 +98,9 @@ enum ServerProvider { String get displayName { switch (this) { - case ServerProvider.hetzner: + case ServerProviderType.hetzner: return 'Hetzner Cloud'; - case ServerProvider.digitalOcean: + case ServerProviderType.digitalOcean: return 'Digital Ocean'; default: return 'Unknown'; diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index 0b8a5bc8..2d9a554b 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -17,15 +17,15 @@ class ServerDomain { @HiveField(1) final String zoneId; - @HiveField(2, defaultValue: DnsProvider.cloudflare) - final DnsProvider provider; + @HiveField(2, defaultValue: DnsProviderType.cloudflare) + final DnsProviderType provider; @override String toString() => '$domainName: $zoneId'; } @HiveType(typeId: 100) -enum DnsProvider { +enum DnsProviderType { @HiveField(0) unknown, @HiveField(1) @@ -33,7 +33,7 @@ enum DnsProvider { @HiveField(2) digitalOcean; - factory DnsProvider.fromGraphQL(final Enum$DnsProvider provider) { + factory DnsProviderType.fromGraphQL(final Enum$DnsProvider provider) { switch (provider) { case Enum$DnsProvider.CLOUDFLARE: return cloudflare; diff --git a/lib/logic/api_maps/rest_maps/api_factory_settings.dart b/lib/logic/providers/provider_settings.dart similarity index 54% rename from lib/logic/api_maps/rest_maps/api_factory_settings.dart rename to lib/logic/providers/provider_settings.dart index 438b92d5..8145cff7 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_settings.dart +++ b/lib/logic/providers/provider_settings.dart @@ -1,20 +1,20 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -class ServerProviderApiFactorySettings { - ServerProviderApiFactorySettings({ +class ServerProviderSettings { + ServerProviderSettings({ required this.provider, this.location, }); - final ServerProvider provider; + final ServerProviderType provider; final String? location; } -class DnsProviderApiFactorySettings { - DnsProviderApiFactorySettings({ +class DnsProviderFactorySettings { + DnsProviderFactorySettings({ required this.provider, }); - final DnsProvider provider; + final DnsProviderType provider; } diff --git a/lib/logic/providers/providers_controller.dart b/lib/logic/providers/providers_controller.dart new file mode 100644 index 00000000..bd72a59e --- /dev/null +++ b/lib/logic/providers/providers_controller.dart @@ -0,0 +1,20 @@ +import 'package:selfprivacy/logic/providers/provider_settings.dart'; +import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/logic/providers/server_providers/server_provider_factory.dart'; + +class ProvidersController { + static ServerProvider? get currentServerProvider => _serverProvider; + + static void initServerProvider( + final ServerProviderSettings settings, + ) { + _serverProvider = + ServerProviderFactory.createServerProviderInterface(settings); + } + + static void clearProviders() { + _serverProvider = null; + } + + static ServerProvider? _serverProvider; +} diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart new file mode 100644 index 00000000..15475715 --- /dev/null +++ b/lib/logic/providers/server_provider.dart @@ -0,0 +1,5 @@ +import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; + +abstract class ServerProvider { + Future> isApiTokenValid(final String apiToken); +} diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart new file mode 100644 index 00000000..4a26c49e --- /dev/null +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -0,0 +1,3 @@ +import 'package:selfprivacy/logic/providers/server_provider.dart'; + +class DigitalOceanServerProvider extends ServerProvider {} diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index e69de29b..2e4ff1e8 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -0,0 +1,3 @@ +import 'package:selfprivacy/logic/providers/server_provider.dart'; + +class HetznerServerProvider extends ServerProvider {} diff --git a/lib/logic/providers/server_providers/server_provider_factory.dart b/lib/logic/providers/server_providers/server_provider_factory.dart index 669ffbd6..2d35ecba 100644 --- a/lib/logic/providers/server_providers/server_provider_factory.dart +++ b/lib/logic/providers/server_providers/server_provider_factory.dart @@ -1,14 +1,25 @@ +import 'package:selfprivacy/logic/providers/provider_settings.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/logic/providers/server_providers/digital_ocean.dart'; +import 'package:selfprivacy/logic/providers/server_providers/hetzner.dart'; + +class UnknownProviderException implements Exception { + UnknownProviderException(this.message); + final String message; +} + class ServerProviderFactory { - static ServerProvider createServerProviderApiFactory( - final ServerProviderApiFactorySettings settings, + static ServerProvider createServerProviderInterface( + final ServerProviderSettings settings, ) { switch (settings.provider) { - case ServerProvider.hetzner: - return HetznerApiFactory(region: settings.location); - case ServerProvider.digitalOcean: - return DigitalOceanApiFactory(region: settings.location); - case ServerProvider.unknown: - throw UnknownApiProviderException('Unknown server provider'); + case ServerProviderType.hetzner: + return HetznerServerProvider(); + case ServerProviderType.digitalOcean: + return DigitalOceanServerProvider(); + case ServerProviderType.unknown: + throw UnknownProviderException('Unknown server provider'); } } } diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index e72d8203..a5917b10 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -28,9 +28,9 @@ class DnsProviderPicker extends StatefulWidget { } class _DnsProviderPickerState extends State { - DnsProvider selectedProvider = DnsProvider.unknown; + DnsProviderType selectedProvider = DnsProviderType.unknown; - void setProvider(final DnsProvider provider) { + void setProvider(final DnsProviderType provider) { setState(() { selectedProvider = provider; }); @@ -39,17 +39,17 @@ class _DnsProviderPickerState extends State { @override Widget build(final BuildContext context) { switch (selectedProvider) { - case DnsProvider.unknown: + case DnsProviderType.unknown: return ProviderSelectionPage( serverInstallationCubit: widget.serverInstallationCubit, callback: setProvider, ); - case DnsProvider.cloudflare: + case DnsProviderType.cloudflare: return ProviderInputDataPage( providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( - providerType: DnsProvider.cloudflare, + providerType: DnsProviderType.cloudflare, pathToHow: 'how_cloudflare', image: Image.asset( 'assets/images/logos/cloudflare.png', @@ -58,11 +58,11 @@ class _DnsProviderPickerState extends State { ), ); - case DnsProvider.digitalOcean: + case DnsProviderType.digitalOcean: return ProviderInputDataPage( providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( - providerType: DnsProvider.digitalOcean, + providerType: DnsProviderType.digitalOcean, pathToHow: 'how_digital_ocean_dns', image: Image.asset( 'assets/images/logos/digital_ocean.png', @@ -83,7 +83,7 @@ class ProviderPageInfo { final String pathToHow; final Image image; - final DnsProvider providerType; + final DnsProviderType providerType; } class ProviderInputDataPage extends StatelessWidget { @@ -227,8 +227,8 @@ class ProviderSelectionPage extends StatelessWidget { title: 'basis.select'.tr(), onPressed: () { serverInstallationCubit - .setDnsProviderType(DnsProvider.cloudflare); - callback(DnsProvider.cloudflare); + .setDnsProviderType(DnsProviderType.cloudflare); + callback(DnsProviderType.cloudflare); }, ), // Outlined button that will open website @@ -292,8 +292,8 @@ class ProviderSelectionPage extends StatelessWidget { title: 'basis.select'.tr(), onPressed: () { serverInstallationCubit - .setDnsProviderType(DnsProvider.digitalOcean); - callback(DnsProvider.digitalOcean); + .setDnsProviderType(DnsProviderType.digitalOcean); + callback(DnsProviderType.digitalOcean); }, ), // Outlined button that will open website diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index a7f551f1..f096a5e1 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -29,9 +29,9 @@ class ServerProviderPicker extends StatefulWidget { } class _ServerProviderPickerState extends State { - ServerProvider selectedProvider = ServerProvider.unknown; + ServerProviderType selectedProvider = ServerProviderType.unknown; - void setProvider(final ServerProvider provider) { + void setProvider(final ServerProviderType provider) { setState(() { selectedProvider = provider; }); @@ -40,17 +40,17 @@ class _ServerProviderPickerState extends State { @override Widget build(final BuildContext context) { switch (selectedProvider) { - case ServerProvider.unknown: + case ServerProviderType.unknown: return ProviderSelectionPage( serverInstallationCubit: widget.serverInstallationCubit, callback: setProvider, ); - case ServerProvider.hetzner: + case ServerProviderType.hetzner: return ProviderInputDataPage( providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( - providerType: ServerProvider.hetzner, + providerType: ServerProviderType.hetzner, pathToHow: 'how_hetzner', image: Image.asset( 'assets/images/logos/hetzner.png', @@ -59,11 +59,11 @@ class _ServerProviderPickerState extends State { ), ); - case ServerProvider.digitalOcean: + case ServerProviderType.digitalOcean: return ProviderInputDataPage( providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( - providerType: ServerProvider.digitalOcean, + providerType: ServerProviderType.digitalOcean, pathToHow: 'how_digital_ocean', image: Image.asset( 'assets/images/logos/digital_ocean.png', @@ -84,7 +84,7 @@ class ProviderPageInfo { final String pathToHow; final Image image; - final ServerProvider providerType; + final ServerProviderType providerType; } class ProviderInputDataPage extends StatelessWidget { @@ -242,8 +242,8 @@ class ProviderSelectionPage extends StatelessWidget { title: 'basis.select'.tr(), onPressed: () { serverInstallationCubit - .setServerProviderType(ServerProvider.hetzner); - callback(ServerProvider.hetzner); + .setServerProviderType(ServerProviderType.hetzner); + callback(ServerProviderType.hetzner); }, ), // Outlined button that will open website @@ -315,9 +315,9 @@ class ProviderSelectionPage extends StatelessWidget { FilledButton( title: 'basis.select'.tr(), onPressed: () { - serverInstallationCubit - .setServerProviderType(ServerProvider.digitalOcean); - callback(ServerProvider.digitalOcean); + serverInstallationCubit.setServerProviderType( + ServerProviderType.digitalOcean); + callback(ServerProviderType.digitalOcean); }, ), // Outlined button that will open website From 2cd564c38d7cf3380357d2f1f18b778a05bf57b7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 31 Jan 2023 21:48:02 +0300 Subject: [PATCH 345/732] build(ios): Fix ios builds --- ios/Flutter/Debug.xcconfig | 1 + ios/Flutter/Release.xcconfig | 1 + ios/Podfile | 41 +++++++++ ios/Podfile.lock | 83 +++++++++++++++++++ ios/Runner.xcodeproj/project.pbxproj | 79 +++++++++++++++++- .../contents.xcworkspacedata | 3 + ios/Runner/Runner.entitlements | 10 +++ macos/Flutter/Flutter-Debug.xcconfig | 1 + macos/Flutter/Flutter-Release.xcconfig | 1 + macos/Flutter/GeneratedPluginRegistrant.swift | 2 +- macos/Podfile | 43 ++++++++++ macos/Podfile.lock | 83 +++++++++++++++++++ macos/Runner.xcodeproj/project.pbxproj | 82 +++++++++++++++++- .../contents.xcworkspacedata | 3 + macos/Runner/DebugProfile.entitlements | 6 ++ macos/Runner/Release.entitlements | 8 ++ pubspec.lock | 12 +-- pubspec.yaml | 2 +- 18 files changed, 448 insertions(+), 13 deletions(-) create mode 100644 ios/Podfile create mode 100644 ios/Podfile.lock create mode 100644 ios/Runner/Runner.entitlements create mode 100644 macos/Podfile create mode 100644 macos/Podfile.lock diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee8..ec97fc6f 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee8..c4855bfe 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 00000000..88359b22 --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '11.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 00000000..ac765d6c --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,83 @@ +PODS: + - connectivity_plus (0.0.1): + - Flutter + - ReachabilitySwift + - device_info_plus (0.0.1): + - Flutter + - Flutter (1.0.0) + - flutter_secure_storage (6.0.0): + - Flutter + - local_auth_ios (0.0.1): + - Flutter + - package_info (0.0.1): + - Flutter + - path_provider_ios (0.0.1): + - Flutter + - ReachabilitySwift (5.0.0) + - share_plus (0.0.1): + - Flutter + - shared_preferences_ios (0.0.1): + - Flutter + - url_launcher_ios (0.0.1): + - Flutter + - wakelock (0.0.1): + - Flutter + +DEPENDENCIES: + - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) + - Flutter (from `Flutter`) + - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) + - local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`) + - package_info (from `.symlinks/plugins/package_info/ios`) + - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - share_plus (from `.symlinks/plugins/share_plus/ios`) + - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + - wakelock (from `.symlinks/plugins/wakelock/ios`) + +SPEC REPOS: + trunk: + - ReachabilitySwift + +EXTERNAL SOURCES: + connectivity_plus: + :path: ".symlinks/plugins/connectivity_plus/ios" + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" + Flutter: + :path: Flutter + flutter_secure_storage: + :path: ".symlinks/plugins/flutter_secure_storage/ios" + local_auth_ios: + :path: ".symlinks/plugins/local_auth_ios/ios" + package_info: + :path: ".symlinks/plugins/package_info/ios" + path_provider_ios: + :path: ".symlinks/plugins/path_provider_ios/ios" + share_plus: + :path: ".symlinks/plugins/share_plus/ios" + shared_preferences_ios: + :path: ".symlinks/plugins/shared_preferences_ios/ios" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" + wakelock: + :path: ".symlinks/plugins/wakelock/ios" + +SPEC CHECKSUMS: + connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e + device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be + local_auth_ios: 0d333dde7780f669e66f19d2ff6005f3ea84008d + package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 + path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 + share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 + shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad + url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de + wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f + +PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 + +COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c6d1ec07..ad268014 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,11 +3,12 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 157C97814E2B6EE2FC34CDB1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 257F298CD626562B3A0BE8BC /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -31,10 +32,15 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 257F298CD626562B3A0BE8BC /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 32ED047D2988556F00CEC6F8 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; + 32ED047E298857FA00CEC6F8 /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = lib; path = ../lib; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 76C01250B18E06E028B2A21D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 88863573AD2094F1791C05BE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -42,6 +48,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + FAE3312046B1506D10D287F2 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,15 +56,25 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 157C97814E2B6EE2FC34CDB1 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1725124A7D564E6014199E7A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 257F298CD626562B3A0BE8BC /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( + 32ED047E298857FA00CEC6F8 /* lib */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, @@ -72,6 +89,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + BAF4554E70AEB98F4DF5B768 /* Pods */, + 1725124A7D564E6014199E7A /* Frameworks */, ); sourceTree = ""; }; @@ -86,6 +105,7 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( + 32ED047D2988556F00CEC6F8 /* Runner.entitlements */, 97C146FA1CF9000F007C117D /* Main.storyboard */, 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, @@ -98,6 +118,16 @@ path = Runner; sourceTree = ""; }; + BAF4554E70AEB98F4DF5B768 /* Pods */ = { + isa = PBXGroup; + children = ( + FAE3312046B1506D10D287F2 /* Pods-Runner.debug.xcconfig */, + 88863573AD2094F1791C05BE /* Pods-Runner.release.xcconfig */, + 76C01250B18E06E028B2A21D /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -105,12 +135,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 70552AB84A03C7D8459451CE /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + C3CADDF8A29BE6F206C19D86 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -183,6 +215,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 70552AB84A03C7D8459451CE /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -197,6 +251,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + C3CADDF8A29BE6F206C19D86 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -287,7 +358,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 46723VZHWZ; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -415,7 +488,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 46723VZHWZ; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -437,7 +512,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 46723VZHWZ; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16..21a3cc14 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements new file mode 100644 index 00000000..ccfa3da0 --- /dev/null +++ b/ios/Runner/Runner.entitlements @@ -0,0 +1,10 @@ + + + + + keychain-access-groups + + $(AppIdentifierPrefix)* + + + diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b6..4b81f9b2 100644 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig index c2efd0b6..5caa9d15 100644 --- a/macos/Flutter/Flutter-Release.xcconfig +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 349902c3..93ab6ccb 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -20,7 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) - FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin")) + FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) diff --git a/macos/Podfile b/macos/Podfile new file mode 100644 index 00000000..de1123e8 --- /dev/null +++ b/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.13' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + target.build_configurations.each do |config| + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.13' + end + end +end diff --git a/macos/Podfile.lock b/macos/Podfile.lock new file mode 100644 index 00000000..7bd65a88 --- /dev/null +++ b/macos/Podfile.lock @@ -0,0 +1,83 @@ +PODS: + - connectivity_plus_macos (0.0.1): + - FlutterMacOS + - ReachabilitySwift + - device_info_plus_macos (0.0.1): + - FlutterMacOS + - dynamic_color (0.0.2): + - FlutterMacOS + - flutter_secure_storage_macos (6.1.1): + - FlutterMacOS + - FlutterMacOS (1.0.0) + - package_info (0.0.1): + - FlutterMacOS + - path_provider_macos (0.0.1): + - FlutterMacOS + - ReachabilitySwift (5.0.0) + - share_plus_macos (0.0.1): + - FlutterMacOS + - shared_preferences_macos (0.0.1): + - FlutterMacOS + - url_launcher_macos (0.0.1): + - FlutterMacOS + - wakelock_macos (0.0.1): + - FlutterMacOS + +DEPENDENCIES: + - connectivity_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos`) + - device_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`) + - dynamic_color (from `Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos`) + - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) + - FlutterMacOS (from `Flutter/ephemeral`) + - package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`) + - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) + - share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`) + - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) + - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) + - wakelock_macos (from `Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos`) + +SPEC REPOS: + trunk: + - ReachabilitySwift + +EXTERNAL SOURCES: + connectivity_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos + device_info_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos + dynamic_color: + :path: Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos + flutter_secure_storage_macos: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos + FlutterMacOS: + :path: Flutter/ephemeral + package_info: + :path: Flutter/ephemeral/.symlinks/plugins/package_info/macos + path_provider_macos: + :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos + share_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos + shared_preferences_macos: + :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos + url_launcher_macos: + :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos + wakelock_macos: + :path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos + +SPEC CHECKSUMS: + connectivity_plus_macos: f6e86fd000e971d361e54b5afcadc8c8fa773308 + device_info_plus_macos: 1ad388a1ef433505c4038e7dd9605aadd1e2e9c7 + dynamic_color: 394d6a888650f8534e029b27d2f8bc5c64e44008 + flutter_secure_storage_macos: 75c8cadfdba05ca007c0fa4ea0c16e5cf85e521b + FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 + package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2 + path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 + share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 + shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727 + url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3 + wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9 + +PODFILE CHECKSUM: 69608711ca93a0af5aac7e2f834b34cf2422afce + +COCOAPODS: 1.11.3 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 04d55ad6..ce134fe4 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + CE333BC2BFA23F98DF817C09 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0609448D29F0321D616C7454 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -52,9 +53,11 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0609448D29F0321D616C7454 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0DE40E103CF4B2BD09F1A074 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* selfprivacy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "selfprivacy.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* selfprivacy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = selfprivacy.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -66,8 +69,10 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 481A265FF1547C7E1F902035 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + DCFB3422A901A681B822A004 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -75,12 +80,23 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + CE333BC2BFA23F98DF817C09 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 32F2223E51A4F9B1A6E798D8 /* Pods */ = { + isa = PBXGroup; + children = ( + 0DE40E103CF4B2BD09F1A074 /* Pods-Runner.debug.xcconfig */, + DCFB3422A901A681B822A004 /* Pods-Runner.release.xcconfig */, + 481A265FF1547C7E1F902035 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; 33BA886A226E78AF003329D5 /* Configs */ = { isa = PBXGroup; children = ( @@ -99,6 +115,7 @@ 33CEB47122A05771004F2AC0 /* Flutter */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, + 32F2223E51A4F9B1A6E798D8 /* Pods */, ); sourceTree = ""; }; @@ -148,6 +165,7 @@ D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( + 0609448D29F0321D616C7454 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -159,11 +177,13 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + C9AFDA92EDCDEAF3FC96A0A3 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, + B270A3A9AFF6A3D0E129954A /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -270,6 +290,45 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; + B270A3A9AFF6A3D0E129954A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + C9AFDA92EDCDEAF3FC96A0A3 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -344,7 +403,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -361,11 +420,16 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 46723VZHWZ; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = SelfPrivacy; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.13; + MARKETING_VERSION = 0.8.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; @@ -423,7 +487,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -470,7 +534,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -487,11 +551,16 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 46723VZHWZ; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = SelfPrivacy; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.13; + MARKETING_VERSION = 0.8.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -507,11 +576,16 @@ CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 46723VZHWZ; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = SelfPrivacy; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.13; + MARKETING_VERSION = 0.8.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16..21a3cc14 100644 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index dddb8a30..31be9762 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -6,7 +6,13 @@ com.apple.security.cs.allow-jit + com.apple.security.network.client + com.apple.security.network.server + keychain-access-groups + + $(AppIdentifierPrefix)* + diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index 852fa1a4..041bc9d9 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -4,5 +4,13 @@ com.apple.security.app-sandbox + com.apple.security.network.client + + com.apple.security.network.server + + keychain-access-groups + + $(AppIdentifierPrefix)* + diff --git a/pubspec.lock b/pubspec.lock index cb43c377..4ad04ddc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -437,42 +437,42 @@ packages: name: flutter_secure_storage url: "https://pub.dartlang.org" source: hosted - version: "5.0.2" + version: "7.0.1" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.2" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "2.0.1" flutter_secure_storage_platform_interface: dependency: transitive description: name: flutter_secure_storage_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" flutter_secure_storage_web: dependency: transitive description: name: flutter_secure_storage_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.1" flutter_secure_storage_windows: dependency: transitive description: name: flutter_secure_storage_windows url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" flutter_svg: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index d47daac7..07eec1c4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: sdk: flutter flutter_bloc: ^8.0.1 flutter_markdown: ^0.6.9 - flutter_secure_storage: ^5.0.2 + flutter_secure_storage: ^7.0.1 flutter_svg: ^1.1.4 get_it: ^7.2.0 gql: ^0.13.1 From e186dac39f03409597e53b30aa2fdf5f913ec9c1 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 17 Jan 2023 16:23:26 +0300 Subject: [PATCH 346/732] fix(ui): Deduplicated launch_url functions Also fixed issue of calling URI with duplicate protocol Closes: #184 --- lib/ui/pages/services/service_page.dart | 16 ++-------------- lib/ui/pages/services/services.dart | 16 ++-------------- .../initializing/server_provider_picker.dart | 18 +++--------------- lib/utils/launch_url.dart | 13 +++++++++++++ 4 files changed, 20 insertions(+), 43 deletions(-) create mode 100644 lib/utils/launch_url.dart diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index d923a5b0..22db2bf6 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -9,8 +9,8 @@ import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; +import 'package:selfprivacy/utils/launch_url.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; -import 'package:url_launcher/url_launcher.dart'; class ServicePage extends StatefulWidget { const ServicePage({required this.serviceId, super.key}); @@ -59,7 +59,7 @@ class _ServicePageState extends State { if (service.url != null) ListTile( iconColor: Theme.of(context).colorScheme.onBackground, - onTap: () => _launchURL(service.url), + onTap: () => launchURL(service.url), leading: const Icon(Icons.open_in_browser), title: Text( 'service_page.open_in_browser'.tr(), @@ -232,15 +232,3 @@ class ServiceStatusCard extends StatelessWidget { } } } - -void _launchURL(final url) async { - try { - final Uri uri = Uri.parse(url); - await launchUrl( - uri, - mode: LaunchMode.externalApplication, - ); - } catch (e) { - print(e); - } -} diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 606fc9d7..54192367 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -12,9 +12,9 @@ import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/pages/services/service_page.dart'; +import 'package:selfprivacy/utils/launch_url.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; -import 'package:url_launcher/url_launcher.dart'; class ServicesPage extends StatefulWidget { const ServicesPage({super.key}); @@ -23,18 +23,6 @@ class ServicesPage extends StatefulWidget { State createState() => _ServicesPageState(); } -void _launchURL(final url) async { - try { - final Uri uri = Uri.parse(url); - await launchUrl( - uri, - mode: LaunchMode.externalApplication, - ); - } catch (e) { - print(e); - } -} - class _ServicesPageState extends State { @override Widget build(final BuildContext context) { @@ -145,7 +133,7 @@ class _Card extends StatelessWidget { Column( children: [ GestureDetector( - onTap: () => _launchURL( + onTap: () => launchURL( service.url, ), child: Text( diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 9775a945..48f2590e 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:selfprivacy/utils/launch_url.dart'; class ServerProviderPicker extends StatefulWidget { const ServerProviderPicker({ @@ -249,7 +249,7 @@ class ProviderSelectionPage extends StatelessWidget { // Outlined button that will open website BrandOutlinedButton( onPressed: () => - _launchURL('https://www.hetzner.com/cloud'), + launchURL('https://www.hetzner.com/cloud'), title: 'initializing.select_provider_site_button'.tr(), ), ], @@ -323,7 +323,7 @@ class ProviderSelectionPage extends StatelessWidget { // Outlined button that will open website BrandOutlinedButton( onPressed: () => - _launchURL('https://www.digitalocean.com'), + launchURL('https://www.digitalocean.com'), title: 'initializing.select_provider_site_button'.tr(), ), ], @@ -336,15 +336,3 @@ class ProviderSelectionPage extends StatelessWidget { ), ); } - -void _launchURL(final url) async { - try { - final Uri uri = Uri.parse(url); - await launchUrl( - uri, - mode: LaunchMode.externalApplication, - ); - } catch (e) { - print(e); - } -} diff --git a/lib/utils/launch_url.dart b/lib/utils/launch_url.dart new file mode 100644 index 00000000..d7ccd0fa --- /dev/null +++ b/lib/utils/launch_url.dart @@ -0,0 +1,13 @@ +import 'package:url_launcher/url_launcher.dart'; + +void launchURL(final url) async { + try { + final Uri uri = Uri.parse(url); + await launchUrl( + uri, + mode: LaunchMode.externalApplication, + ); + } catch (e) { + print(e); + } +} From c8bc75d4226a988695d403f0c062dd9ced9b2029 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 1 Feb 2023 00:56:19 +0300 Subject: [PATCH 347/732] fix(ui): Make onboarding screen more adaptive --- lib/ui/pages/onboarding/onboarding.dart | 134 +++++++++++++----------- 1 file changed, 72 insertions(+), 62 deletions(-) diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index c00b4f12..0247f0eb 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -45,29 +45,34 @@ class _OnboardingPageState extends State { maxHeight: MediaQuery.of(context).size.height, ), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 30), - Text( - 'onboarding.page1_title'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'onboarding.page1_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 16), - Flexible( - child: Center( - child: Image.asset( - _fileName( - context: context, - path: 'assets/images/onboarding', - fileExtention: 'png', - fileName: 'onboarding1', + Expanded( + child: ListView( + children: [ + const SizedBox(height: 30), + Text( + 'onboarding.page1_title'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), - ), + const SizedBox(height: 16), + Text( + 'onboarding.page1_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 32), + Flexible( + child: Center( + child: Image.asset( + _fileName( + context: context, + path: 'assets/images/onboarding', + fileExtention: 'png', + fileName: 'onboarding1', + ), + ), + ), + ), + ], ), ), BrandButton.rised( @@ -90,49 +95,54 @@ class _OnboardingPageState extends State { maxHeight: MediaQuery.of(context).size.height, ), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 30), - Text( - 'onboarding.page2_title'.tr(), - style: Theme.of(context).textTheme.headlineSmall, + Expanded( + child: ListView( + children: [ + const SizedBox(height: 30), + Text( + 'onboarding.page2_title'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_server_provider_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_server_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_dns_provider_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_dns_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_backup_provider_title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), + Text( + 'onboarding.page2_backup_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), + ], + ), ), - const SizedBox(height: 16), - Text( - 'onboarding.page2_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 16), - Text( - 'onboarding.page2_server_provider_title'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - const SizedBox(height: 16), - Text( - 'onboarding.page2_server_provider_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 16), - Text( - 'onboarding.page2_dns_provider_title'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - const SizedBox(height: 16), - Text( - 'onboarding.page2_dns_provider_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 16), - Text( - 'onboarding.page2_backup_provider_title'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - const SizedBox(height: 16), - Text( - 'onboarding.page2_backup_provider_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 16), BrandButton.rised( onPressed: () { context.read().turnOffOnboarding(); From 44553eaf85b60b9732b853efacb845e73f757a58 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 1 Feb 2023 01:13:06 +0300 Subject: [PATCH 348/732] fix(ui): Add a title to setup wizard --- lib/ui/pages/setup/initializing/initializing.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 72d82520..ca502b65 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -67,6 +67,9 @@ class InitializingPage extends StatelessWidget { }, ) ], + title: Text( + 'more_page.configuration_wizard'.tr(), + ), bottom: PreferredSize( preferredSize: const Size.fromHeight(28), child: Padding( From 80547785d34edf10e8acc7906cb86ae2f1e7f90c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 1 Feb 2023 01:29:17 +0300 Subject: [PATCH 349/732] refactor(ui): Change the styling of "Server is not ready" card --- assets/translations/en.json | 3 - assets/translations/ru.json | 3 - assets/translations/uk.json | 3 - .../not_ready_card/not_ready_card.dart | 60 +++++++------------ lib/ui/pages/providers/providers.dart | 2 +- 5 files changed, 21 insertions(+), 50 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 08967745..893d5884 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -197,9 +197,6 @@ "migration_done": "Finish" }, "not_ready_card": { - "begin": "Please finish application setup using ", - "insertion": "Setup Wizard", - "end": " for further work", "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." }, "service_page": { diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 23a388e9..a26808ed 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -197,9 +197,6 @@ "migration_done": "Завершить" }, "not_ready_card": { - "begin": "Завершите настройку приложения используя ", - "insertion": "Мастер Настройки", - "end": " для продолжения работы", "in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения." }, "service_page": { diff --git a/assets/translations/uk.json b/assets/translations/uk.json index 904932ba..00d76b50 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -299,9 +299,6 @@ "data_migration_notice": "Під час переносу всі послуги будуть вимкнені." }, "not_ready_card": { - "begin": "Будь ласка, завершіть налаштування програми ", - "insertion": "Майстер налаштувань", - "end": " Для подальшої роботи", "in_menu": "Сервер ще не налаштовано. Будь ласка, завершіть налаштування за допомогою майстра налаштування для подальшої роботи." }, "service_page": { diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index e161e8d3..379abf27 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/text_themes.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -9,45 +8,26 @@ class NotReadyCard extends StatelessWidget { const NotReadyCard({super.key}); @override - Widget build(final BuildContext context) => Container( - padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15), - color: BrandColors.gray6, - ), - child: RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'not_ready_card.begin'.tr(), - style: const TextStyle(color: BrandColors.white), - ), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.5), - child: GestureDetector( - onTap: () => Navigator.of(context).push( - materialRoute( - const InitializingPage(), - ), - ), - child: Text( - 'not_ready_card.insertion'.tr(), - style: body1Style.copyWith( - color: Colors.white, - fontWeight: FontWeight.bold, - decoration: TextDecoration.underline, - // height: 1.1, - ), - ), - ), + Widget build(final BuildContext context) => FilledCard( + tertiary: true, + child: ListTile( + contentPadding: + const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + onTap: () => Navigator.of(context).push( + materialRoute( + const InitializingPage(), + ), + ), + title: Text( + 'not_ready_card.in_menu'.tr(), + style: Theme.of(context).textTheme.titleSmall?.copyWith( + color: Theme.of(context).colorScheme.onTertiaryContainer, ), - ), - TextSpan( - text: 'not_ready_card.end'.tr(), - style: const TextStyle(color: BrandColors.white), - ), - ], + ), + trailing: Icon( + Icons.arrow_forward_ios_outlined, + size: 16, + color: Theme.of(context).colorScheme.onTertiaryContainer, ), ), ); diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index ee01085e..d234c984 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -72,7 +72,7 @@ class _ProvidersPageState extends State { children: [ if (!isReady) ...[ const NotReadyCard(), - const SizedBox(height: 24), + const SizedBox(height: 16), ], _Card( state: getServerStatus(), From c271331f29f8f422ade2f054301af82823f5c385 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 1 Feb 2023 01:40:42 +0300 Subject: [PATCH 350/732] refactor(ui): Remove SafeArea where they are not needed --- lib/ui/pages/onboarding/onboarding.dart | 36 +++++++------- lib/ui/pages/root_route.dart | 64 ++++++++++++------------- 2 files changed, 47 insertions(+), 53 deletions(-) diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index 0247f0eb..ac865b11 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -21,17 +21,15 @@ class _OnboardingPageState extends State { } @override - Widget build(final BuildContext context) => SafeArea( - child: Scaffold( - body: PageView( - controller: pageController, - children: [ - _withPadding(firstPage()), - _withPadding(secondPage()), - ], - ), - ), - ); + Widget build(final BuildContext context) => Scaffold( + body: PageView( + controller: pageController, + children: [ + _withPadding(firstPage()), + _withPadding(secondPage()), + ], + ), + ); Widget _withPadding(final Widget child) => Padding( padding: const EdgeInsets.symmetric( @@ -60,15 +58,13 @@ class _OnboardingPageState extends State { style: Theme.of(context).textTheme.bodyMedium, ), const SizedBox(height: 32), - Flexible( - child: Center( - child: Image.asset( - _fileName( - context: context, - path: 'assets/images/onboarding', - fileExtention: 'png', - fileName: 'onboarding1', - ), + Center( + child: Image.asset( + _fileName( + context: context, + path: 'assets/images/onboarding', + fileExtention: 'png', + fileName: 'onboarding1', ), ), ), diff --git a/lib/ui/pages/root_route.dart b/lib/ui/pages/root_route.dart index 9b62dae0..ce1f344c 100644 --- a/lib/ui/pages/root_route.dart +++ b/lib/ui/pages/root_route.dart @@ -52,40 +52,38 @@ class _RootPageState extends State with TickerProviderStateMixin { final bool isReady = context.watch().state is ServerInstallationFinished; - return SafeArea( - child: Provider( - create: (final _) => ChangeTab(tabController.animateTo), - child: Scaffold( - body: TabBarView( - controller: tabController, - children: const [ - ProvidersPage(), - ServicesPage(), - UsersPage(), - MorePage(), - ], - ), - bottomNavigationBar: BrandTabBar( - controller: tabController, - ), - floatingActionButton: isReady - ? SizedBox( - height: 104 + 16, - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - ScaleTransition( - scale: _animation, - child: const AddUserFab(), - ), - const SizedBox(height: 16), - const BrandFab(), - ], - ), - ) - : null, + return Provider( + create: (final _) => ChangeTab(tabController.animateTo), + child: Scaffold( + body: TabBarView( + controller: tabController, + children: const [ + ProvidersPage(), + ServicesPage(), + UsersPage(), + MorePage(), + ], ), + bottomNavigationBar: BrandTabBar( + controller: tabController, + ), + floatingActionButton: isReady + ? SizedBox( + height: 104 + 16, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + ScaleTransition( + scale: _animation, + child: const AddUserFab(), + ), + const SizedBox(height: 16), + const BrandFab(), + ], + ), + ) + : null, ), ); } From 1bde176612bb0c62a1782c78230875c9732361f0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 1 Feb 2023 01:57:55 +0300 Subject: [PATCH 351/732] feat(translations): Activate support for some languages Languages being activated are: - Ukrainian - German - French - Spanish - Czech - Polish - Thai Translation which are not finished will fall back to English. --- lib/config/localization.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/config/localization.dart b/lib/config/localization.dart index 297928ed..fb50b58e 100644 --- a/lib/config/localization.dart +++ b/lib/config/localization.dart @@ -10,7 +10,17 @@ class Localization extends StatelessWidget { final Widget? child; @override Widget build(final BuildContext context) => EasyLocalization( - supportedLocales: const [Locale('ru'), Locale('en')], + supportedLocales: const [ + Locale('ru'), + Locale('en'), + Locale('uk'), + Locale('de'), + Locale('fr'), + Locale('es'), + Locale('cs'), + Locale('pl'), + Locale('th'), + ], path: 'assets/translations', fallbackLocale: const Locale('en'), useFallbackTranslations: true, From cd552616bd2f5d079a17d7b6d66bb890f734df93 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 2 Feb 2023 12:46:08 +0300 Subject: [PATCH 352/732] docs(changelog): Add localizations to changelog --- fastlane/metadata/android/en-US/changelogs/0.8.0.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fastlane/metadata/android/en-US/changelogs/0.8.0.txt b/fastlane/metadata/android/en-US/changelogs/0.8.0.txt index e7d8dbad..b03a63d2 100644 --- a/fastlane/metadata/android/en-US/changelogs/0.8.0.txt +++ b/fastlane/metadata/android/en-US/changelogs/0.8.0.txt @@ -31,3 +31,7 @@ For developers: - App now only uses GraphQL API to communicate with the server. All REST API calls have been removed. - Server can now be deployed with staging ACME certificates - Language assets have been reorganized + +Translations: +- Added translation for Ukrainian +- Also activated unfinished translations for German, French, Spanish, Czech, Polish, Thai From 6b90c5aa3b84208a4d132b1a399306939b56c2ae Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 5 Feb 2023 16:24:37 +0300 Subject: [PATCH 353/732] refactor: Migrate to Flutter 3.7 --- analysis_options.yaml | 1 - lib/config/brand_theme.dart | 85 -- .../components/brand_button/brand_button.dart | 25 +- .../brand_button/filled_button.dart | 41 - .../brand_button/outlined_button.dart | 2 +- .../pages/backup_details/backup_details.dart | 10 +- lib/ui/pages/devices/new_device.dart | 4 +- lib/ui/pages/recovery_key/recovery_key.dart | 12 +- .../recovery_key/recovery_key_receiving.dart | 6 +- .../migration_process_page.dart | 6 +- .../binds_migration/services_migration.dart | 6 +- .../server_storage/extending_volume.dart | 9 +- .../initializing/server_provider_picker.dart | 14 +- .../recovering/recover_by_new_device_key.dart | 8 +- .../recovering/recover_by_old_token.dart | 10 +- .../recovering/recover_by_recovery_key.dart | 6 +- .../recovering/recovery_confirm_server.dart | 7 +- .../setup/recovering/recovery_routing.dart | 6 +- .../recovery_server_provider_connected.dart | 5 +- macos/Flutter/GeneratedPluginRegistrant.swift | 10 +- pubspec.lock | 965 ++++++++++-------- pubspec.yaml | 56 +- .../flutter/generated_plugin_registrant.cc | 8 +- windows/flutter/generated_plugins.cmake | 4 +- 24 files changed, 650 insertions(+), 656 deletions(-) delete mode 100644 lib/ui/components/brand_button/filled_button.dart diff --git a/analysis_options.yaml b/analysis_options.yaml index aa344a69..72343f80 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -31,7 +31,6 @@ linter: avoid_print: false # Uncomment to disable the `avoid_print` rule prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule always_use_package_imports: true - invariant_booleans: true no_adjacent_strings_in_list: true unnecessary_statements: true always_declare_return_types: true diff --git a/lib/config/brand_theme.dart b/lib/config/brand_theme.dart index 3ad0623c..aa94a8ec 100644 --- a/lib/config/brand_theme.dart +++ b/lib/config/brand_theme.dart @@ -1,88 +1,3 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/text_themes.dart'; - -import 'package:selfprivacy/config/brand_colors.dart'; - -final ThemeData lightTheme = ThemeData( - useMaterial3: true, - primaryColor: BrandColors.primary, - fontFamily: 'Inter', - brightness: Brightness.light, - scaffoldBackgroundColor: BrandColors.scaffoldBackground, - inputDecorationTheme: const InputDecorationTheme( - border: InputBorder.none, - contentPadding: EdgeInsets.all(16), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(4)), - borderSide: BorderSide(color: BrandColors.inputInactive), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(4)), - borderSide: BorderSide(color: BrandColors.blue), - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(4)), - borderSide: BorderSide( - width: 1, - color: BrandColors.red1, - ), - ), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(4)), - borderSide: BorderSide( - width: 1, - color: BrandColors.red1, - ), - ), - errorStyle: TextStyle( - fontSize: 12, - color: BrandColors.red1, - ), - ), - listTileTheme: const ListTileThemeData( - minLeadingWidth: 24.0, - ), - textTheme: TextTheme( - headline1: headline1Style, - headline2: headline2Style, - headline3: headline3Style, - headline4: headline4Style, - bodyText1: body1Style, - subtitle1: const TextStyle(fontSize: 15, height: 1.6), // text input style - ), -); - -ThemeData darkTheme = lightTheme.copyWith( - brightness: Brightness.dark, - scaffoldBackgroundColor: const Color(0xFF202120), - iconTheme: const IconThemeData(color: BrandColors.gray3), - cardColor: BrandColors.gray1, - dialogBackgroundColor: const Color(0xFF202120), - textTheme: TextTheme( - headline1: headline1Style.copyWith(color: BrandColors.white), - headline2: headline2Style.copyWith(color: BrandColors.white), - headline3: headline3Style.copyWith(color: BrandColors.white), - headline4: headline4Style.copyWith(color: BrandColors.white), - bodyText1: body1Style.copyWith(color: BrandColors.white), - subtitle1: const TextStyle(fontSize: 15, height: 1.6), // text input style - ), - inputDecorationTheme: const InputDecorationTheme( - labelStyle: TextStyle(color: BrandColors.white), - hintStyle: TextStyle(color: BrandColors.white), - border: OutlineInputBorder( - borderSide: BorderSide( - color: BrandColors.white, - ), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide( - color: BrandColors.white, - ), - ), - ), -); - -const EdgeInsets paddingH15V30 = - EdgeInsets.symmetric(horizontal: 15, vertical: 30); const EdgeInsets paddingH15V0 = EdgeInsets.symmetric(horizontal: 15); diff --git a/lib/ui/components/brand_button/brand_button.dart b/lib/ui/components/brand_button/brand_button.dart index c56fad37..28edd6b8 100644 --- a/lib/ui/components/brand_button/brand_button.dart +++ b/lib/ui/components/brand_button/brand_button.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; enum BrandButtonTypes { rised, text, iconText } @@ -20,9 +19,29 @@ class BrandButton { ), child: FilledButton( key: key, - title: text, onPressed: onPressed, - child: child, + child: child ?? Text(text ?? ''), + ), + ); + } + + static ConstrainedBox filled({ + required final VoidCallback? onPressed, + final Key? key, + final String? text, + final Widget? child, + }) { + assert(text == null || child == null, 'required title or child'); + assert(text != null || child != null, 'required title or child'); + return ConstrainedBox( + constraints: const BoxConstraints( + minHeight: 40, + minWidth: double.infinity, + ), + child: FilledButton( + key: key, + onPressed: onPressed, + child: child ?? Text(text ?? ''), ), ); } diff --git a/lib/ui/components/brand_button/filled_button.dart b/lib/ui/components/brand_button/filled_button.dart deleted file mode 100644 index 93f8e467..00000000 --- a/lib/ui/components/brand_button/filled_button.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:flutter/material.dart'; - -class FilledButton extends StatelessWidget { - const FilledButton({ - super.key, - this.onPressed, - this.title, - this.child, - this.disabled = false, - }); - - final VoidCallback? onPressed; - final String? title; - final Widget? child; - final bool disabled; - - @override - Widget build(final BuildContext context) { - final ButtonStyle enabledStyle = ElevatedButton.styleFrom( - foregroundColor: Theme.of(context).colorScheme.onPrimary, - backgroundColor: Theme.of(context).colorScheme.primary, - ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)); - - final ButtonStyle disabledStyle = ElevatedButton.styleFrom( - foregroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(30), - backgroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(98), - ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)); - - return ConstrainedBox( - constraints: const BoxConstraints( - minHeight: 40, - minWidth: double.infinity, - ), - child: ElevatedButton( - onPressed: onPressed, - style: disabled ? disabledStyle : enabledStyle, - child: child ?? Text(title ?? ''), - ), - ); - } -} diff --git a/lib/ui/components/brand_button/outlined_button.dart b/lib/ui/components/brand_button/outlined_button.dart index 260de23a..22a954e1 100644 --- a/lib/ui/components/brand_button/outlined_button.dart +++ b/lib/ui/components/brand_button/outlined_button.dart @@ -25,7 +25,7 @@ class BrandOutlinedButton extends StatelessWidget { child: child ?? Text( title ?? '', - style: Theme.of(context).textTheme.button?.copyWith( + style: Theme.of(context).textTheme.labelLarge?.copyWith( color: Theme.of(context).colorScheme.primary, ), ), diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 268b0870..93cb0139 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -76,7 +76,7 @@ class _BackupDetailsState extends State ), title: Text( 'backup.create_new'.tr(), - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), ), if (backupStatus == BackupStatusEnum.backingUp) @@ -85,7 +85,7 @@ class _BackupDetailsState extends State 'backup.creating'.tr( args: [(backupProgress * 100).round().toString()], ), - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), subtitle: LinearProgressIndicator( value: backupProgress, @@ -98,7 +98,7 @@ class _BackupDetailsState extends State 'backup.restoring'.tr( args: [(backupProgress * 100).round().toString()], ), - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), subtitle: LinearProgressIndicator( backgroundColor: Colors.grey.withOpacity(0.2), @@ -112,7 +112,7 @@ class _BackupDetailsState extends State ), title: Text( 'backup.error_pending'.tr(), - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), ), ], @@ -134,7 +134,7 @@ class _BackupDetailsState extends State ), title: Text( 'backup.restore'.tr(), - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), ), const Divider( diff --git a/lib/ui/pages/devices/new_device.dart b/lib/ui/pages/devices/new_device.dart index d85ac145..8310b127 100644 --- a/lib/ui/pages/devices/new_device.dart +++ b/lib/ui/pages/devices/new_device.dart @@ -3,7 +3,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class NewDeviceScreen extends StatelessWidget { @@ -71,7 +71,7 @@ class _KeyDisplay extends StatelessWidget { ], ), const SizedBox(height: 16), - FilledButton( + BrandButton.filled( child: Text( 'basis.done'.tr(), ), diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index abec4663..02a7ed9a 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -7,7 +7,6 @@ import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; @@ -104,8 +103,8 @@ class _RecoveryKeyContentState extends State { }, ), if (!_isConfigurationVisible && !keyStatus.isValid && keyStatus.exists) - FilledButton( - title: 'recovery_key.key_replace_button'.tr(), + BrandButton.filled( + child: Text('recovery_key.key_replace_button'.tr()), onPressed: () { setState(() { _isConfigurationVisible = true; @@ -393,12 +392,11 @@ class _RecoveryKeyConfigurationState extends State { secondChild: Container(), ), const SizedBox(height: 16), - FilledButton( - title: 'recovery_key.key_receive_button'.tr(), - disabled: _isAmountError || _isExpirationError || _isLoading, - onPressed: !_isAmountError && !_isExpirationError + BrandButton.filled( + onPressed: !_isAmountError && !_isExpirationError && !_isLoading ? _generateRecoveryToken : null, + child: Text('recovery_key.key_receive_button'.tr()), ), ], ); diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index 22e07119..afca6d20 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -1,6 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; @@ -33,8 +33,8 @@ class RecoveryKeyReceiving extends StatelessWidget { text: 'recovery_key.key_receiving_info'.tr(), ), const SizedBox(height: 16), - FilledButton( - title: 'recovery_key.key_receiving_done'.tr(), + BrandButton.filled( + child: Text('recovery_key.key_receiving_done'.tr()), onPressed: () { Navigator.of(context).popUntil((final route) => route.isFirst); }, diff --git a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index 704e4846..2f896673 100644 --- a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; @@ -50,8 +50,8 @@ class _MigrationProcessPageState extends State { ), if (job.finishedAt != null) const SizedBox(height: 16), if (job.finishedAt != null) - FilledButton( - title: 'storage.migration_done'.tr(), + BrandButton.filled( + child: Text('storage.migration_done'.tr()), onPressed: () { Navigator.of(context).pushAndRemoveUntil( materialRoute(const RootPage()), diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index ff36a2b9..bb95ae94 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; @@ -163,8 +163,8 @@ class _ServicesMigrationPageState extends State { ), ), const SizedBox(height: 16), - FilledButton( - title: 'storage.start_migration_button'.tr(), + BrandButton.filled( + child: Text('storage.start_migration_button'.tr()), onPressed: () { if (widget.isMigration) { context.read().migrateToBinds( diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index e16544b5..d40c628c 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.d import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/price.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; @@ -146,9 +146,8 @@ class _ExtendingVolumePageState extends State { }, ), const SizedBox(height: 16), - FilledButton( - title: 'storage.extend_volume_button.title'.tr(), - onPressed: _isError + BrandButton.filled( + onPressed: _isError || isAlreadyResizing ? null : () { context.read().resizeVolume( @@ -161,7 +160,7 @@ class _ExtendingVolumePageState extends State { (final predicate) => false, ); }, - disabled: _isError || isAlreadyResizing, + child: Text('storage.extend_volume_button.title'.tr()), ), const SizedBox(height: 16), const Divider( diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 48f2590e..dfec01b9 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; @@ -120,8 +120,8 @@ class ProviderInputDataPage extends StatelessWidget { ), ), const SizedBox(height: 32), - FilledButton( - title: 'basis.connect'.tr(), + BrandButton.filled( + child: Text('basis.connect'.tr()), onPressed: () => providerCubit.trySubmit(), ), const SizedBox(height: 10), @@ -238,8 +238,8 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), - FilledButton( - title: 'basis.select'.tr(), + BrandButton.filled( + child: Text('basis.select'.tr()), onPressed: () { serverInstallationCubit .setServerProviderType(ServerProvider.hetzner); @@ -312,8 +312,8 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), - FilledButton( - title: 'basis.select'.tr(), + BrandButton.filled( + child: Text('basis.select'.tr()), onPressed: () { serverInstallationCubit .setServerProviderType(ServerProvider.digitalOcean); diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index a3f366ad..bb2ebbf0 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:cubit_form/cubit_form.dart'; @@ -20,8 +20,8 @@ class RecoverByNewDeviceKeyInstruction extends StatelessWidget { onBackButtonPressed: context.read().revertRecoveryStep, children: [ - FilledButton( - title: 'recovering.method_device_button'.tr(), + BrandButton.filled( + child: Text('recovering.method_device_button'.tr()), onPressed: () => Navigator.of(context) .push(materialRoute(const RecoverByNewDeviceKeyInput())), ) @@ -73,11 +73,11 @@ class RecoverByNewDeviceKeyInput extends StatelessWidget { ), const SizedBox(height: 16), FilledButton( - title: 'basis.continue'.tr(), onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), + child: Text('basis.continue'.tr()), ) ], ); diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index 667f6cce..2b65ba8b 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:cubit_form/cubit_form.dart'; @@ -35,8 +35,8 @@ class RecoverByOldTokenInstruction extends StatelessWidget { fileName: instructionFilename, ), const SizedBox(height: 16), - FilledButton( - title: 'recovering.method_device_button'.tr(), + BrandButton.filled( + child: Text('recovering.method_device_button'.tr()), onPressed: () => context .read() .selectRecoveryMethod(ServerRecoveryMethods.oldToken), @@ -82,11 +82,11 @@ class RecoverByOldToken extends StatelessWidget { ), ), const SizedBox(height: 16), - FilledButton( - title: 'basis.continue'.tr(), + BrandButton.filled( onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), + child: Text('basis.continue'.tr()), ) ], ); diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index 45152e30..c47b924f 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class RecoverByRecoveryKey extends StatelessWidget { @@ -43,11 +43,11 @@ class RecoverByRecoveryKey extends StatelessWidget { ), ), const SizedBox(height: 16), - FilledButton( - title: 'basis.continue'.tr(), + BrandButton.filled( onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), + child: Text('basis.continue'.tr()), ) ], ); diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 6ac0e127..3b47cc76 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -2,7 +2,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; @@ -70,7 +69,7 @@ class _RecoveryConfirmServerState extends State { Center( child: Text( 'recovering.no_servers'.tr(), - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), ), ], @@ -97,8 +96,8 @@ class _RecoveryConfirmServerState extends State { server: server, ), const SizedBox(height: 16), - FilledButton( - title: 'recovering.confirm_server_accept'.tr(), + BrandButton.filled( + child: Text('recovering.confirm_server_accept'.tr()), onPressed: () => _showConfirmationDialog(context, server), ), const SizedBox(height: 16), diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index c2fb1d13..68108214 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; @@ -126,12 +126,12 @@ class SelectDomainToRecover extends StatelessWidget { ), ), const SizedBox(height: 16), - FilledButton( - title: 'basis.continue'.tr(), + BrandButton.filled( onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), + child: Text('basis.continue'.tr()), ) ], ), diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 152e4308..f850cde7 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:cubit_form/cubit_form.dart'; @@ -45,11 +44,11 @@ class RecoveryServerProviderConnected extends StatelessWidget { ), ), const SizedBox(height: 16), - FilledButton( - title: 'basis.continue'.tr(), + BrandButton.filled( onPressed: formCubitState.isSubmitting ? null : () => context.read().trySubmit(), + child: Text('basis.continue'.tr()), ), const SizedBox(height: 16), BrandButton.text( diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 93ab6ccb..b3e22002 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,14 +5,14 @@ import FlutterMacOS import Foundation -import connectivity_plus_macos -import device_info_plus_macos +import connectivity_plus +import device_info_plus import dynamic_color import flutter_secure_storage_macos import package_info -import path_provider_macos -import share_plus_macos -import shared_preferences_macos +import path_provider_foundation +import share_plus +import shared_preferences_foundation import url_launcher_macos import wakelock_macos diff --git a/pubspec.lock b/pubspec.lock index 4ad04ddc..4ffd3c72 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,380 +5,370 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "0c80aeab9bc807ab10022cd3b2f4cf2ecdf231949dc1ddd9442406a003f19201" + url: "https://pub.dev" source: hosted - version: "38.0.0" + version: "52.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: cd8ee83568a77f3ae6b913a36093a1c9b1264e7cb7f834d9ddd2311dade9c1f4 + url: "https://pub.dev" source: hosted - version: "3.4.1" + version: "5.4.0" archive: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.6" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611" + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" auto_size_text: dependency: "direct main" description: name: auto_size_text - url: "https://pub.dartlang.org" + sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" + url: "https://pub.dev" source: hosted version: "3.0.0" basic_utils: dependency: "direct main" description: name: basic_utils - url: "https://pub.dartlang.org" + sha256: "3e86a17d2aafbd52ef69c0dc8936b1bc7bd91bcd8fa1c0d222d13ca2f6d000bb" + url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "5.4.2" bloc: dependency: transitive description: name: bloc - url: "https://pub.dartlang.org" + sha256: bd4f8027bfa60d96c8046dec5ce74c463b2c918dce1b0d36593575995344534a + url: "https://pub.dev" source: hosted - version: "8.0.3" + version: "8.1.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.1" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" + url: "https://pub.dev" source: hosted version: "3.1.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: "7c35a3a7868626257d8aee47b51c26b9dba11eaddf3431117ed2744951416aab" + url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.1.0" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.3" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + url: "https://pub.dev" source: hosted - version: "7.2.3" + version: "7.2.7" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725" + url: "https://pub.dev" source: hosted - version: "8.3.0" + version: "8.4.3" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.4.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" connectivity_plus: dependency: transitive description: name: connectivity_plus - url: "https://pub.dartlang.org" + sha256: "745ebcccb1ef73768386154428a55250bc8d44059c19fd27aecda2a6dc013a22" + url: "https://pub.dev" source: hosted - version: "2.1.0" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.4" + version: "3.0.2" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: b8795b9238bf83b64375f63492034cb3d8e222af4d9ce59dda085edf038fa06f + url: "https://pub.dev" source: hosted - version: "1.2.1" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" + version: "1.2.3" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.1" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "961c4aebd27917269b1896382c7cb1b1ba81629ba669ba09c27a7e5710ec9040" + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.6.2" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + url: "https://pub.dev" + source: hosted + version: "0.3.3+4" crypt: dependency: "direct main" description: name: crypt - url: "https://pub.dartlang.org" + sha256: c12682393cc6aae221e278692d8a433e188db2064b7de5daa253fd62ccfa096f + url: "https://pub.dev" source: hosted version: "4.2.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted version: "3.0.2" cubit_form: dependency: "direct main" description: name: cubit_form - url: "https://pub.dartlang.org" + sha256: "3e01bb30b0b9fc9c0807536b08865714487d26256566bdbb31e780f51d9a8932" + url: "https://pub.dev" source: hosted version: "2.0.1" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.2.4" dbus: dependency: transitive description: name: dbus - url: "https://pub.dartlang.org" + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + url: "https://pub.dev" source: hosted version: "0.7.8" device_info_plus: dependency: "direct main" description: name: device_info_plus - url: "https://pub.dartlang.org" + sha256: "7ff671ed0a6356fa8f2e1ae7d3558d3fb7b6a41e24455e4f8df75b811fb8e4ab" + url: "https://pub.dev" source: hosted - version: "4.1.2" - device_info_plus_linux: - dependency: transitive - description: - name: device_info_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - device_info_plus_macos: - dependency: transitive - description: - name: device_info_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" + version: "8.0.0" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + url: "https://pub.dev" source: hosted - version: "3.0.0" - device_info_plus_web: - dependency: transitive - description: - name: device_info_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - device_info_plus_windows: - dependency: transitive - description: - name: device_info_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" + version: "7.0.0" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + url: "https://pub.dev" source: hosted version: "4.0.6" dynamic_color: dependency: "direct main" description: name: dynamic_color - url: "https://pub.dartlang.org" + sha256: c4a508284b14ec4dda5adba2c28b2cdd34fbae1afead7e8c52cad87d51c5405b + url: "https://pub.dev" source: hosted - version: "1.5.4" + version: "1.6.2" easy_localization: dependency: "direct main" description: name: easy_localization - url: "https://pub.dartlang.org" + sha256: "6a2e99fa0bfe5765bf4c6ca9b137d5de2c75593007178c5e4cd2ae985f870080" + url: "https://pub.dev" source: hosted version: "3.0.1" easy_logger: dependency: transitive description: name: easy_logger - url: "https://pub.dartlang.org" + sha256: c764a6e024846f33405a2342caf91c62e357c24b02c04dbc712ef232bf30ffb7 + url: "https://pub.dev" source: hosted version: "0.0.2" either_option: dependency: "direct main" description: name: either_option - url: "https://pub.dartlang.org" + sha256: "08f6ddfe95346ad2182dcd11ea6a47a75702229cb4842fdfc75736541d12df3e" + url: "https://pub.dev" source: hosted version: "2.0.1-dev.1" email_validator: dependency: transitive description: name: email_validator - url: "https://pub.dartlang.org" + sha256: e9a90f27ab2b915a27d7f9c2a7ddda5dd752d6942616ee83529b686fc086221b + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.17" equatable: dependency: "direct main" description: name: equatable - url: "https://pub.dartlang.org" + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.5" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" source: hosted version: "2.0.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.4" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" fl_chart: dependency: "direct main" description: name: fl_chart - url: "https://pub.dartlang.org" + sha256: "29da130cdef13f47e1798a66e99fd119e557c293b98be8ebaf6fed2cbc43bf29" + url: "https://pub.dev" source: hosted - version: "0.50.5" + version: "0.50.6" flutter: dependency: "direct main" description: flutter @@ -388,28 +378,32 @@ packages: dependency: "direct main" description: name: flutter_bloc - url: "https://pub.dartlang.org" + sha256: "890c51c8007f0182360e523518a0c732efb89876cb4669307af7efada5b55557" + url: "https://pub.dev" source: hosted - version: "8.0.1" + version: "8.1.1" flutter_hooks: dependency: transitive description: name: flutter_hooks - url: "https://pub.dartlang.org" + sha256: "2b202559a4ed3656bbb7aae9d8b335fb0037b23acc7ae3f377d1ba0b95c21aec" + url: "https://pub.dev" source: hosted version: "0.18.5+1" flutter_launcher_icons: dependency: "direct dev" description: name: flutter_launcher_icons - url: "https://pub.dartlang.org" + sha256: "559c600f056e7c704bd843723c21e01b5fba47e8824bd02422165bcc02a5de1d" + url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.3" flutter_lints: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_localizations: @@ -421,65 +415,74 @@ packages: dependency: "direct main" description: name: flutter_markdown - url: "https://pub.dartlang.org" + sha256: "818cf6c28377ba2c91ed283c96fd712e9c175dd2d2488eb7fc93b6afb9ad2e08" + url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "0.6.13+1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b" + url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.0.7" flutter_secure_storage: dependency: "direct main" description: name: flutter_secure_storage - url: "https://pub.dartlang.org" + sha256: f2afec1f1762c040a349ea2a588e32f442da5d0db3494a52a929a97c9e550bc5 + url: "https://pub.dev" source: hosted version: "7.0.1" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - url: "https://pub.dartlang.org" + sha256: "736436adaf91552433823f51ce22e098c2f0551db06b6596f58597a25b8ea797" + url: "https://pub.dev" source: hosted version: "1.1.2" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - url: "https://pub.dartlang.org" + sha256: ff0768a6700ea1d9620e03518e2e25eac86a8bd07ca3556e9617bfa5ace4bd00 + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_secure_storage_platform_interface: dependency: transitive description: name: flutter_secure_storage_platform_interface - url: "https://pub.dartlang.org" + sha256: b3773190e385a3c8a382007893d678ae95462b3c2279e987b55d140d3b0cb81b + url: "https://pub.dev" source: hosted version: "1.0.1" flutter_secure_storage_web: dependency: transitive description: name: flutter_secure_storage_web - url: "https://pub.dartlang.org" + sha256: "42938e70d4b872e856e678c423cc0e9065d7d294f45bc41fc1981a4eb4beaffe" + url: "https://pub.dev" source: hosted version: "1.1.1" flutter_secure_storage_windows: dependency: transitive description: name: flutter_secure_storage_windows - url: "https://pub.dartlang.org" + sha256: ca89c8059cf439985aa83c59619b3674c7ef6cc2e86943d169a7369d6a69cab5 + url: "https://pub.dev" source: hosted version: "1.1.3" flutter_svg: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + sha256: f999d84ad2efda1c4c3956e7968b713b3a24b06f0a0e4798e844e16bbb9bb70b + url: "https://pub.dev" source: hosted - version: "1.1.4" + version: "2.0.0+1" flutter_test: dependency: "direct dev" description: flutter @@ -494,625 +497,658 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "3.2.0" get_it: dependency: "direct main" description: name: get_it - url: "https://pub.dartlang.org" + sha256: "290fde3a86072e4b37dbb03c07bec6126f0ecc28dad403c12ffe2e5a2d751ab7" + url: "https://pub.dev" source: hosted version: "7.2.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.1" gql: dependency: "direct main" description: name: gql - url: "https://pub.dartlang.org" + sha256: "0db9fcebe50d919ff7d872b70f035722771b0789cdee17c8aa27e850445592a9" + url: "https://pub.dev" source: hosted - version: "0.13.1" + version: "0.14.1-alpha+1672756470474" gql_code_builder: dependency: transitive description: name: gql_code_builder - url: "https://pub.dartlang.org" + sha256: "654fc5f455938d721f88631ce2e0d9350058bc6e965a22df6dd5668c72cd19c0" + url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.1-alpha+1667318637890" gql_dedupe_link: dependency: transitive description: name: gql_dedupe_link - url: "https://pub.dartlang.org" + sha256: "89681048cf956348e865da872a40081499b8c087fc84dd4d4b9c134bd70d27b3" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3+1" gql_error_link: dependency: transitive description: name: gql_error_link - url: "https://pub.dartlang.org" + sha256: e7bfdd2b6232f3e15861cd96c2ad6b7c9c94693843b3dea18295136a5fb5b534 + url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "0.2.3+1" gql_exec: dependency: transitive description: name: gql_exec - url: "https://pub.dartlang.org" + sha256: "0d1fdb2e4154efbfc1dcf3f35ec36d19c8428ff0d560eb4c45b354f8f871dc50" + url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.4.3" gql_http_link: dependency: transitive description: name: gql_http_link - url: "https://pub.dartlang.org" + sha256: "89ef87b32947acf4189f564c095f1148b0ab9bb9996fe518716dbad66708b834" + url: "https://pub.dev" source: hosted - version: "0.4.2" + version: "0.4.5" gql_link: dependency: transitive description: name: gql_link - url: "https://pub.dartlang.org" + sha256: f7973279126bc922d465c4f4da6ed93d187085e597b3480f5e14e74d28fe14bd + url: "https://pub.dev" source: hosted - version: "0.4.2" + version: "0.5.1" gql_transform_link: dependency: transitive description: name: gql_transform_link - url: "https://pub.dartlang.org" + sha256: b1735a9a92d25a92960002a8b40dfaede95ec1e5ed848906125d69efd878661f + url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "0.2.2+1" graphql: dependency: "direct main" description: name: graphql - url: "https://pub.dartlang.org" + sha256: b061201579040e9548cec2bae17bbdea0ab30666cb4e7ba48b9675f14d982199 + url: "https://pub.dev" source: hosted - version: "5.1.1" + version: "5.1.3" graphql_codegen: dependency: "direct main" description: name: graphql_codegen - url: "https://pub.dartlang.org" + sha256: d8b5b70f3d0c6db6eec6e610185604a128fb275943543036cbce3f606d49cd77 + url: "https://pub.dev" source: hosted - version: "0.10.3" - graphql_codegen_config: - dependency: transitive - description: - name: graphql_codegen_config - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.6" + version: "0.12.0-beta.7" graphql_flutter: dependency: "direct main" description: name: graphql_flutter - url: "https://pub.dartlang.org" + sha256: "06059ac9e8417c71582f05e28a59b1416d43959d34a6a0d9565341e3a362e117" + url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.1.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.0" hive: dependency: "direct main" description: name: hive - url: "https://pub.dartlang.org" + sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" + url: "https://pub.dev" source: hosted version: "2.2.3" hive_flutter: dependency: "direct main" description: name: hive_flutter - url: "https://pub.dartlang.org" + sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc + url: "https://pub.dev" source: hosted version: "1.1.0" hive_generator: dependency: "direct dev" description: name: hive_generator - url: "https://pub.dartlang.org" + sha256: "65998cc4d2cd9680a3d9709d893d2f6bb15e6c1f92626c3f1fa650b4b3281521" + url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "2.0.0" http: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" source: hosted version: "0.13.5" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" image: dependency: transitive description: name: image - url: "https://pub.dartlang.org" + sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.3.0" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" ionicons: dependency: "direct main" description: name: ionicons - url: "https://pub.dartlang.org" + sha256: "5496bc65a16115ecf05b15b78f494ee4a8869504357668f0a11d689e970523cf" + url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "0.2.2" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" source: hosted - version: "4.6.0" + version: "4.8.0" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.dartlang.org" + sha256: dadc08bd61f72559f938dd08ec20dbfec6c709bba83515085ea943d2078d187a + url: "https://pub.dev" source: hosted - version: "6.3.1" + version: "6.6.1" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" local_auth: dependency: "direct main" description: name: local_auth - url: "https://pub.dartlang.org" + sha256: "8cea55dca20d1e0efa5480df2d47ae30851e7a24cb8e7d225be7e67ae8485aa4" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.3" local_auth_android: dependency: transitive description: name: local_auth_android - url: "https://pub.dartlang.org" + sha256: ba48fe0e1cae140a0813ce68c2540250d7f573a8ae4d4b6c681b2d2583584953 + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.17" local_auth_ios: dependency: transitive description: name: local_auth_ios - url: "https://pub.dartlang.org" + sha256: aa32478d7513066564139af57e11e2cad1bbd535c1efd224a88a8764c5665e3b + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.12" local_auth_platform_interface: dependency: transitive description: name: local_auth_platform_interface - url: "https://pub.dartlang.org" + sha256: fbb6973f2fd088e2677f39a5ab550aa1cfbc00997859d5e865569872499d6d61 + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.6" + local_auth_windows: + dependency: transitive + description: + name: local_auth_windows + sha256: "888482e4f9ca3560e00bc227ce2badeb4857aad450c42a31c6cfc9dc21e0ccbc" + url: "https://pub.dev" + source: hosted + version: "1.0.5" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.1" markdown: dependency: transitive description: name: markdown - url: "https://pub.dartlang.org" + sha256: c2b81e184067b41d0264d514f7cdaa2c02d38511e39d6521a1ccc238f6d7b3f2 + url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.0.1" mask_text_input_formatter: dependency: transitive description: name: mask_text_input_formatter - url: "https://pub.dartlang.org" + sha256: "19bb7809c3c2559277e95521b3ee421e1409eb2cc85efd2feb191696c92490f4" + url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: "direct main" description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" modal_bottom_sheet: dependency: "direct main" description: name: modal_bottom_sheet - url: "https://pub.dartlang.org" + sha256: "3bba63c62d35c931bce7f8ae23a47f9a05836d8cb3c11122ada64e0b2f3d718f" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.0-pre" nanoid: dependency: "direct main" description: name: nanoid - url: "https://pub.dartlang.org" + sha256: be3f8752d9046c825df2f3914195151eb876f3ad64b9d833dd0b799b77b8759e + url: "https://pub.dev" source: hosted version: "1.0.0" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" nm: dependency: transitive description: name: nm - url: "https://pub.dartlang.org" + sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" + url: "https://pub.dev" source: hosted version: "0.5.0" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d" + url: "https://pub.dev" source: hosted version: "2.0.1" normalize: dependency: transitive description: name: normalize - url: "https://pub.dartlang.org" + sha256: baf8caf2d8b745af5737cca6c24f7fe3cf3158897fdbcde9a909b9c8d3e2e5af + url: "https://pub.dev" source: hosted - version: "0.6.0+1" + version: "0.7.2" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.0" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.dartlang.org" + sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" + url: "https://pub.dev" source: hosted version: "2.0.2" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted version: "1.8.2" - path_drawing: - dependency: transitive - description: - name: path_drawing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" source: hosted version: "1.0.1" path_provider: dependency: transitive description: name: path_provider - url: "https://pub.dartlang.org" + sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 + url: "https://pub.dev" source: hosted - version: "2.0.10" + version: "2.0.12" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + url: "https://pub.dev" source: hosted - version: "2.0.14" - path_provider_ios: + version: "2.0.22" + path_provider_foundation: dependency: transitive description: - name: path_provider_ios - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74" + url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.1.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379 + url: "https://pub.dev" source: hosted version: "2.1.7" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" pointycastle: dependency: transitive description: name: pointycastle - url: "https://pub.dartlang.org" + sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.2" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.5.1" pretty_dio_logger: dependency: "direct main" description: name: pretty_dio_logger - url: "https://pub.dartlang.org" + sha256: "948f7eeb36e7aa0760b51c1a8e3331d4b21e36fabd39efca81f585ed93893544" + url: "https://pub.dev" source: hosted version: "1.2.0-beta-1" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" provider: dependency: "direct main" description: name: provider - url: "https://pub.dartlang.org" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.0.5" pub_semver: dependency: "direct main" description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" recase: dependency: transitive description: name: recase - url: "https://pub.dartlang.org" + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.1.0" rxdart: dependency: transitive description: name: rxdart - url: "https://pub.dartlang.org" + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" source: hosted - version: "0.27.4" + version: "0.27.7" share_plus: dependency: "direct main" description: name: share_plus - url: "https://pub.dartlang.org" + sha256: e387077716f80609bb979cd199331033326033ecd1c8f200a90c5f57b1c9f55e + url: "https://pub.dev" source: hosted - version: "4.0.4" - share_plus_linux: - dependency: transitive - description: - name: share_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - share_plus_macos: - dependency: transitive - description: - name: share_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" + version: "6.3.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: "82ddd4ab9260c295e6e39612d4ff00390b9a7a21f1bb1da771e2f232d80ab8a1" + url: "https://pub.dev" source: hosted - version: "3.0.2" - share_plus_web: - dependency: transitive - description: - name: share_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - share_plus_windows: - dependency: transitive - description: - name: share_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" + version: "3.2.0" shared_preferences: dependency: transitive description: name: shared_preferences - url: "https://pub.dartlang.org" + sha256: "5949029e70abe87f75cfe59d17bf5c397619c4b74a099b10116baeb34786fad9" + url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.0.17" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - url: "https://pub.dartlang.org" + sha256: "955e9736a12ba776bdd261cf030232b30eadfcd9c79b32a3250dd4a494e8c8f7" + url: "https://pub.dev" source: hosted - version: "2.0.12" - shared_preferences_ios: + version: "2.0.15" + shared_preferences_foundation: dependency: transitive description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" + name: shared_preferences_foundation + sha256: "2b55c18636a4edc529fa5cd44c03d3f3100c00513f518c5127c951978efcccd0" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" + sha256: f8ea038aa6da37090093974ebdcf4397010605fd2ff65c37a66f9d28394cb874 + url: "https://pub.dev" source: hosted - version: "2.1.1" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" + version: "2.1.3" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3 + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958 + url: "https://pub.dev" source: hosted version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + sha256: "5eaf05ae77658d3521d0e993ede1af962d4b326cd2153d312df716dc250f00c9" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: aef74dc9195746a384843102142ab65b6a4735bb3beea791e63527b88cc83306 + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.3" sky_engine: dependency: transitive description: flutter @@ -1122,275 +1158,338 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.2.7" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.dartlang.org" + sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "490098075234dcedb83c5d949b4c93dad5e6b7702748de000be2b57b8e6b2427" + url: "https://pub.dev" source: hosted - version: "0.10.10" + version: "0.10.11" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test: dependency: transitive description: name: test - url: "https://pub.dartlang.org" + sha256: a5fcd2d25eeadbb6589e80198a47d6a464ba3e2049da473943b8af9797900c2d + url: "https://pub.dev" source: hosted - version: "1.21.4" + version: "1.22.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: "0ef9755ec6d746951ba0aabe62f874b707690b5ede0fecc818b138fcc9b14888" + url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.4.20" timezone: dependency: "direct main" description: name: timezone - url: "https://pub.dartlang.org" + sha256: "24c8fcdd49a805d95777a39064862133ff816ebfffe0ceff110fb5960e557964" + url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.9.1" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" source: hosted version: "1.3.1" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.dartlang.org" + sha256: "698fa0b4392effdc73e9e184403b627362eb5fbf904483ac9defbb1c2191d809" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.8" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.dartlang.org" + sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1" + url: "https://pub.dev" source: hosted - version: "6.0.17" + version: "6.0.23" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.dartlang.org" + sha256: bb328b24d3bccc20bdf1024a0990ac4f869d57663660de9c936fb8c043edefe3 + url: "https://pub.dev" source: hosted - version: "6.0.16" + version: "6.0.18" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.dartlang.org" + sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.dartlang.org" + sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.dartlang.org" + sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6" + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.1.1" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.dartlang.org" + sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0" + url: "https://pub.dev" source: hosted - version: "2.0.11" + version: "2.0.14" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.dartlang.org" + sha256: b6217370f8eb1fd85c8890c539f5a639a01ab209a36db82c921ebeacefc7a615 + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.3" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.0.7" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "09562ef5f47aa84f6567495adb6b9cb2a3192b82c352623b8bd00b300d62603b" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "886e57742644ebed024dc3ade29712e37eea1b03d294fb314c0a3386243fe5a6" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "5d9010c4a292766c55395b2288532579a85673f8148460d1e233d98ffe10d24e" + url: "https://pub.dev" + source: hosted + version: "1.0.1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7 + url: "https://pub.dev" source: hosted - version: "8.3.0" + version: "9.4.0" wakelock: dependency: "direct main" description: name: wakelock - url: "https://pub.dartlang.org" + sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" + url: "https://pub.dev" source: hosted - version: "0.6.1+2" + version: "0.6.2" wakelock_macos: dependency: transitive description: name: wakelock_macos - url: "https://pub.dartlang.org" + sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.dartlang.org" + sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" + url: "https://pub.dev" source: hosted version: "0.3.0" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.dartlang.org" + sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_windows: dependency: transitive description: name: wakelock_windows - url: "https://pub.dartlang.org" + sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" + url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.2.1" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: "3a969ddcc204a3e34e863d204b29c0752716f78b6f9cc8235083208d268a4ccd" + url: "https://pub.dev" source: hosted version: "2.2.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.2.0" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + url: "https://pub.dev" source: hosted - version: "0.2.0+1" + version: "0.2.0+3" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.2" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + url: "https://pub.dev" source: hosted version: "3.1.1" sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=2.19.0 <3.0.0" + flutter: ">=3.7.0" diff --git a/pubspec.yaml b/pubspec.yaml index 07eec1c4..407089e8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,58 +4,58 @@ publish_to: 'none' version: 0.8.0+17 environment: - sdk: '>=2.17.0 <3.0.0' - flutter: ">=3.0.0" + sdk: '>=2.19.0 <3.0.0' + flutter: ">=3.7.0" dependencies: auto_size_text: ^3.0.0 - basic_utils: ^4.2.0 + basic_utils: ^5.4.2 crypt: ^4.2.1 cubit_form: ^2.0.1 - device_info_plus: ^4.0.1 + device_info_plus: ^8.0.0 dio: ^4.0.4 - dynamic_color: ^1.5.4 - easy_localization: ^3.0.0 + dynamic_color: ^1.6.2 + easy_localization: ^3.0.1 either_option: ^2.0.1-dev.1 - equatable: ^2.0.3 + equatable: ^2.0.5 fl_chart: ^0.50.1 flutter: sdk: flutter - flutter_bloc: ^8.0.1 - flutter_markdown: ^0.6.9 + flutter_bloc: ^8.1.1 + flutter_markdown: ^0.6.13+1 flutter_secure_storage: ^7.0.1 - flutter_svg: ^1.1.4 + flutter_svg: ^2.0.0+1 get_it: ^7.2.0 - gql: ^0.13.1 - graphql: ^5.1.1 - graphql_codegen: ^0.10.2 - graphql_flutter: ^5.1.0 + gql: ^0.14.0 + graphql: ^5.1.2 + graphql_codegen: ^0.12.0-beta.7 + graphql_flutter: ^5.1.2 hive: ^2.2.3 hive_flutter: ^1.1.0 http: ^0.13.5 intl: ^0.17.0 - ionicons: ^0.1.2 - json_annotation: ^4.6.0 - local_auth: ^2.0.2 - material_color_utilities: ^0.1.5 - modal_bottom_sheet: ^2.0.1 + ionicons: ^0.2.2 + json_annotation: ^4.8.0 + local_auth: ^2.1.3 + material_color_utilities: ^0.2.0 + modal_bottom_sheet: ^3.0.0-pre nanoid: ^1.0.0 package_info: ^2.0.2 pretty_dio_logger: ^1.2.0-beta-1 - provider: ^6.0.2 - pub_semver: ^2.1.1 - share_plus: ^4.0.4 - timezone: ^0.8.0 - url_launcher: ^6.0.20 - wakelock: ^0.6.1+1 + provider: ^6.0.5 + pub_semver: ^2.1.3 + share_plus: ^6.3.0 + timezone: ^0.9.1 + url_launcher: ^6.1.8 + wakelock: ^0.6.2 dev_dependencies: flutter_test: sdk: flutter - build_runner: ^2.2.0 + build_runner: ^2.3.3 flutter_launcher_icons: ^0.9.2 - hive_generator: ^1.1.3 - json_serializable: ^6.3.1 + hive_generator: ^2.0.0 + json_serializable: ^6.6.1 flutter_lints: ^2.0.1 flutter_icons: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 9c422c29..2d280636 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,9 +6,11 @@ #include "generated_plugin_registrant.h" -#include +#include #include #include +#include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { @@ -18,6 +20,10 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); FlutterSecureStorageWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); + LocalAuthPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("LocalAuthPlugin")); + SharePlusWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 0039d570..b4df792f 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,9 +3,11 @@ # list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus_windows + connectivity_plus dynamic_color flutter_secure_storage_windows + local_auth_windows + share_plus url_launcher_windows ) From c1738ec875c22bc3cc0219b00b81ae1864281369 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 6 Feb 2023 13:28:30 +0400 Subject: [PATCH 354/732] chore: Add build runner results --- .../schema/disk_volumes.graphql.dart | 5923 +++++--- .../schema/disk_volumes.graphql.g.dart | 376 - .../graphql_maps/schema/schema.graphql.dart | 1681 ++- .../graphql_maps/schema/schema.graphql.g.dart | 147 - .../schema/server_api.graphql.dart | 11427 +++++++++++----- .../schema/server_api.graphql.g.dart | 849 -- .../schema/server_settings.graphql.dart | 5117 +++++-- .../schema/server_settings.graphql.g.dart | 316 - .../graphql_maps/schema/services.graphql.dart | 6803 ++++++--- .../schema/services.graphql.g.dart | 458 - .../graphql_maps/schema/users.graphql.dart | 6019 +++++--- .../graphql_maps/schema/users.graphql.g.dart | 366 - .../digital_ocean/digital_ocean.dart | 2 +- 13 files changed, 26210 insertions(+), 13274 deletions(-) delete mode 100644 lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 2464c561..9ffbfe0b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -1,24 +1,70 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; import 'services.graphql.dart'; -part 'disk_volumes.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -26,36 +72,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -64,25 +138,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -90,24 +174,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -116,43 +201,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -160,65 +256,1719 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumes { - Query$GetServerDiskVolumes( - {required this.storage, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$GetServerDiskVolumes.fromJson(Map json) => - _$Query$GetServerDiskVolumesFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$GetServerDiskVolumes$storage storage; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetServerDiskVolumesToJson(this); - int get hashCode { - final l$storage = storage; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$storage, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumes) || - runtimeType != other.runtimeType) return false; - final l$storage = storage; - final lOther$storage = other.storage; - if (l$storage != lOther$storage) return false; + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$GetServerDiskVolumes { + Query$GetServerDiskVolumes({ + required this.storage, + required this.$__typename, + }); + + factory Query$GetServerDiskVolumes.fromJson(Map json) { + final l$storage = json['storage']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes( + storage: Query$GetServerDiskVolumes$storage.fromJson( + (l$storage as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$GetServerDiskVolumes$storage storage; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$storage = storage; + _resultData['storage'] = l$storage.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$storage = storage; + final l$$__typename = $__typename; + return Object.hashAll([ + l$storage, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetServerDiskVolumes) || + runtimeType != other.runtimeType) { + return false; + } + final l$storage = storage; + final lOther$storage = other.storage; + if (l$storage != lOther$storage) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -226,25 +1976,34 @@ class Query$GetServerDiskVolumes { extension UtilityExtension$Query$GetServerDiskVolumes on Query$GetServerDiskVolumes { CopyWith$Query$GetServerDiskVolumes - get copyWith => CopyWith$Query$GetServerDiskVolumes(this, (i) => i); + get copyWith => CopyWith$Query$GetServerDiskVolumes( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes { factory CopyWith$Query$GetServerDiskVolumes( - Query$GetServerDiskVolumes instance, - TRes Function(Query$GetServerDiskVolumes) then) = - _CopyWithImpl$Query$GetServerDiskVolumes; + Query$GetServerDiskVolumes instance, + TRes Function(Query$GetServerDiskVolumes) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes; factory CopyWith$Query$GetServerDiskVolumes.stub(TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes; - TRes call({Query$GetServerDiskVolumes$storage? storage, String? $__typename}); + TRes call({ + Query$GetServerDiskVolumes$storage? storage, + String? $__typename, + }); CopyWith$Query$GetServerDiskVolumes$storage get storage; } class _CopyWithImpl$Query$GetServerDiskVolumes implements CopyWith$Query$GetServerDiskVolumes { - _CopyWithImpl$Query$GetServerDiskVolumes(this._instance, this._then); + _CopyWithImpl$Query$GetServerDiskVolumes( + this._instance, + this._then, + ); final Query$GetServerDiskVolumes _instance; @@ -252,14 +2011,18 @@ class _CopyWithImpl$Query$GetServerDiskVolumes static const _undefined = {}; - TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? storage = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes( - storage: storage == _undefined || storage == null - ? _instance.storage - : (storage as Query$GetServerDiskVolumes$storage), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + storage: storage == _undefined || storage == null + ? _instance.storage + : (storage as Query$GetServerDiskVolumes$storage), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetServerDiskVolumes$storage get storage { final local$storage = _instance.storage; return CopyWith$Query$GetServerDiskVolumes$storage( @@ -273,7 +2036,10 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes TRes _res; - call({Query$GetServerDiskVolumes$storage? storage, String? $__typename}) => + call({ + Query$GetServerDiskVolumes$storage? storage, + String? $__typename, + }) => _res; CopyWith$Query$GetServerDiskVolumes$storage get storage => CopyWith$Query$GetServerDiskVolumes$storage.stub(_res); @@ -281,163 +2047,188 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes const documentNodeQueryGetServerDiskVolumes = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetServerDiskVolumes'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'storage'), + type: OperationType.query, + name: NameNode(value: 'GetServerDiskVolumes'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'storage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'volumes'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'volumes'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'freeSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'model'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'root'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'serial'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'totalSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'type'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'usages'), + name: NameNode(value: 'freeSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'model'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'root'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'serial'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'totalSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'type'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usages'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + InlineFragmentNode( + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'ServiceStorageUsage'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'service'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'title'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: 'usedSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - InlineFragmentNode( - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode( - value: 'ServiceStorageUsage'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'service'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'id'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isMovable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'displayName'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])) - ])), - FieldNode( - name: NameNode(value: 'usedSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + ]), + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes( Map data) => @@ -445,52 +2236,54 @@ Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes( class Options$Query$GetServerDiskVolumes extends graphql.QueryOptions { - Options$Query$GetServerDiskVolumes( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetServerDiskVolumes, - parserFn: _parserFn$Query$GetServerDiskVolumes); + Options$Query$GetServerDiskVolumes({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetServerDiskVolumes, + parserFn: _parserFn$Query$GetServerDiskVolumes, + ); } class WatchOptions$Query$GetServerDiskVolumes extends graphql.WatchQueryOptions { - WatchOptions$Query$GetServerDiskVolumes( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetServerDiskVolumes, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetServerDiskVolumes); + WatchOptions$Query$GetServerDiskVolumes({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetServerDiskVolumes, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetServerDiskVolumes, + ); } class FetchMoreOptions$Query$GetServerDiskVolumes @@ -498,8 +2291,9 @@ class FetchMoreOptions$Query$GetServerDiskVolumes FetchMoreOptions$Query$GetServerDiskVolumes( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQueryGetServerDiskVolumes); + updateQuery: updateQuery, + document: documentNodeQueryGetServerDiskVolumes, + ); } extension ClientExtension$Query$GetServerDiskVolumes on graphql.GraphQLClient { @@ -511,66 +2305,97 @@ extension ClientExtension$Query$GetServerDiskVolumes on graphql.GraphQLClient { watchQuery$GetServerDiskVolumes( [WatchOptions$Query$GetServerDiskVolumes? options]) => this.watchQuery(options ?? WatchOptions$Query$GetServerDiskVolumes()); - void writeQuery$GetServerDiskVolumes( - {required Query$GetServerDiskVolumes data, bool broadcast = true}) => + void writeQuery$GetServerDiskVolumes({ + required Query$GetServerDiskVolumes data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumes)), - data: data.toJson(), - broadcast: broadcast); - Query$GetServerDiskVolumes? readQuery$GetServerDiskVolumes( - {bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation( document: documentNodeQueryGetServerDiskVolumes)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetServerDiskVolumes? readQuery$GetServerDiskVolumes( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetServerDiskVolumes)), + optimistic: optimistic, + ); return result == null ? null : Query$GetServerDiskVolumes.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage { - Query$GetServerDiskVolumes$storage( - {required this.volumes, required this.$__typename}); + Query$GetServerDiskVolumes$storage({ + required this.volumes, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storageFromJson(json); + Map json) { + final l$volumes = json['volumes']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage( + volumes: (l$volumes as List) + .map((e) => Query$GetServerDiskVolumes$storage$volumes.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List volumes; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storageToJson(this); + Map toJson() { + final _resultData = {}; + final l$volumes = volumes; + _resultData['volumes'] = l$volumes.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$volumes = volumes; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$volumes.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$volumes.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$volumes = volumes; final lOther$volumes = other.volumes; - if (l$volumes.length != lOther$volumes.length) return false; + if (l$volumes.length != lOther$volumes.length) { + return false; + } for (int i = 0; i < l$volumes.length; i++) { final l$volumes$entry = l$volumes[i]; final lOther$volumes$entry = lOther$volumes[i]; - if (l$volumes$entry != lOther$volumes$entry) return false; + if (l$volumes$entry != lOther$volumes$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -579,22 +2404,25 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage on Query$GetServerDiskVolumes$storage { CopyWith$Query$GetServerDiskVolumes$storage< Query$GetServerDiskVolumes$storage> - get copyWith => - CopyWith$Query$GetServerDiskVolumes$storage(this, (i) => i); + get copyWith => CopyWith$Query$GetServerDiskVolumes$storage( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage { factory CopyWith$Query$GetServerDiskVolumes$storage( - Query$GetServerDiskVolumes$storage instance, - TRes Function(Query$GetServerDiskVolumes$storage) then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage; + Query$GetServerDiskVolumes$storage instance, + TRes Function(Query$GetServerDiskVolumes$storage) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage; factory CopyWith$Query$GetServerDiskVolumes$storage.stub(TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage; - TRes call( - {List? volumes, - String? $__typename}); + TRes call({ + List? volumes, + String? $__typename, + }); TRes volumes( Iterable Function( Iterable< @@ -605,7 +2433,10 @@ abstract class CopyWith$Query$GetServerDiskVolumes$storage { class _CopyWithImpl$Query$GetServerDiskVolumes$storage implements CopyWith$Query$GetServerDiskVolumes$storage { - _CopyWithImpl$Query$GetServerDiskVolumes$storage(this._instance, this._then); + _CopyWithImpl$Query$GetServerDiskVolumes$storage( + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage _instance; @@ -613,14 +2444,18 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage static const _undefined = {}; - TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? volumes = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes$storage( - volumes: volumes == _undefined || volumes == null - ? _instance.volumes - : (volumes as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + volumes: volumes == _undefined || volumes == null + ? _instance.volumes + : (volumes as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes volumes( Iterable Function( Iterable< @@ -628,9 +2463,11 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage Query$GetServerDiskVolumes$storage$volumes>>) _fn) => call( - volumes: _fn(_instance.volumes.map((e) => - CopyWith$Query$GetServerDiskVolumes$storage$volumes( - e, (i) => i))).toList()); + volumes: _fn(_instance.volumes + .map((e) => CopyWith$Query$GetServerDiskVolumes$storage$volumes( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage @@ -639,31 +2476,57 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage TRes _res; - call( - {List? volumes, - String? $__typename}) => + call({ + List? volumes, + String? $__typename, + }) => _res; volumes(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes { - Query$GetServerDiskVolumes$storage$volumes( - {required this.freeSpace, - this.model, - required this.name, - required this.root, - this.serial, - required this.totalSpace, - required this.type, - required this.usages, - required this.usedSpace, - required this.$__typename}); + Query$GetServerDiskVolumes$storage$volumes({ + required this.freeSpace, + this.model, + required this.name, + required this.root, + this.serial, + required this.totalSpace, + required this.type, + required this.usages, + required this.usedSpace, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storage$volumesFromJson(json); + Map json) { + final l$freeSpace = json['freeSpace']; + final l$model = json['model']; + final l$name = json['name']; + final l$root = json['root']; + final l$serial = json['serial']; + final l$totalSpace = json['totalSpace']; + final l$type = json['type']; + final l$usages = json['usages']; + final l$usedSpace = json['usedSpace']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage$volumes( + freeSpace: (l$freeSpace as String), + model: (l$model as String?), + name: (l$name as String), + root: (l$root as bool), + serial: (l$serial as String?), + totalSpace: (l$totalSpace as String), + type: (l$type as String), + usages: (l$usages as List) + .map((e) => + Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( + (e as Map))) + .toList(), + usedSpace: (l$usedSpace as String), + $__typename: (l$$__typename as String), + ); + } final String freeSpace; @@ -683,11 +2546,34 @@ class Query$GetServerDiskVolumes$storage$volumes { final String usedSpace; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumesToJson(this); + Map toJson() { + final _resultData = {}; + final l$freeSpace = freeSpace; + _resultData['freeSpace'] = l$freeSpace; + final l$model = model; + _resultData['model'] = l$model; + final l$name = name; + _resultData['name'] = l$name; + final l$root = root; + _resultData['root'] = l$root; + final l$serial = serial; + _resultData['serial'] = l$serial; + final l$totalSpace = totalSpace; + _resultData['totalSpace'] = l$totalSpace; + final l$type = type; + _resultData['type'] = l$type; + final l$usages = usages; + _resultData['usages'] = l$usages.map((e) => e.toJson()).toList(); + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$freeSpace = freeSpace; final l$model = model; @@ -709,51 +2595,76 @@ class Query$GetServerDiskVolumes$storage$volumes { l$type, Object.hashAll(l$usages.map((v) => v)), l$usedSpace, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$freeSpace = freeSpace; final lOther$freeSpace = other.freeSpace; - if (l$freeSpace != lOther$freeSpace) return false; + if (l$freeSpace != lOther$freeSpace) { + return false; + } final l$model = model; final lOther$model = other.model; - if (l$model != lOther$model) return false; + if (l$model != lOther$model) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$root = root; final lOther$root = other.root; - if (l$root != lOther$root) return false; + if (l$root != lOther$root) { + return false; + } final l$serial = serial; final lOther$serial = other.serial; - if (l$serial != lOther$serial) return false; + if (l$serial != lOther$serial) { + return false; + } final l$totalSpace = totalSpace; final lOther$totalSpace = other.totalSpace; - if (l$totalSpace != lOther$totalSpace) return false; + if (l$totalSpace != lOther$totalSpace) { + return false; + } final l$type = type; final lOther$type = other.type; - if (l$type != lOther$type) return false; + if (l$type != lOther$type) { + return false; + } final l$usages = usages; final lOther$usages = other.usages; - if (l$usages.length != lOther$usages.length) return false; + if (l$usages.length != lOther$usages.length) { + return false; + } for (int i = 0; i < l$usages.length; i++) { final l$usages$entry = l$usages[i]; final lOther$usages$entry = lOther$usages[i]; - if (l$usages$entry != lOther$usages$entry) return false; + if (l$usages$entry != lOther$usages$entry) { + return false; + } } - final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; + if (l$usedSpace != lOther$usedSpace) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -762,30 +2673,33 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes on Query$GetServerDiskVolumes$storage$volumes { CopyWith$Query$GetServerDiskVolumes$storage$volumes< Query$GetServerDiskVolumes$storage$volumes> - get copyWith => - CopyWith$Query$GetServerDiskVolumes$storage$volumes(this, (i) => i); + get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes( - Query$GetServerDiskVolumes$storage$volumes instance, - TRes Function(Query$GetServerDiskVolumes$storage$volumes) then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes; + Query$GetServerDiskVolumes$storage$volumes instance, + TRes Function(Query$GetServerDiskVolumes$storage$volumes) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes.stub(TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes; - TRes call( - {String? freeSpace, - String? model, - String? name, - bool? root, - String? serial, - String? totalSpace, - String? type, - List? usages, - String? usedSpace, - String? $__typename}); + TRes call({ + String? freeSpace, + String? model, + String? name, + bool? root, + String? serial, + String? totalSpace, + String? type, + List? usages, + String? usedSpace, + String? $__typename, + }); TRes usages( Iterable Function( Iterable< @@ -797,7 +2711,9 @@ abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes { class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes implements CopyWith$Query$GetServerDiskVolumes$storage$volumes { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes _instance; @@ -805,45 +2721,47 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes static const _undefined = {}; - TRes call( - {Object? freeSpace = _undefined, - Object? model = _undefined, - Object? name = _undefined, - Object? root = _undefined, - Object? serial = _undefined, - Object? totalSpace = _undefined, - Object? type = _undefined, - Object? usages = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? freeSpace = _undefined, + Object? model = _undefined, + Object? name = _undefined, + Object? root = _undefined, + Object? serial = _undefined, + Object? totalSpace = _undefined, + Object? type = _undefined, + Object? usages = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes$storage$volumes( - freeSpace: freeSpace == _undefined || freeSpace == null - ? _instance.freeSpace - : (freeSpace as String), - model: model == _undefined ? _instance.model : (model as String?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - root: root == _undefined || root == null - ? _instance.root - : (root as bool), - serial: serial == _undefined ? _instance.serial : (serial as String?), - totalSpace: totalSpace == _undefined || totalSpace == null - ? _instance.totalSpace - : (totalSpace as String), - type: type == _undefined || type == null - ? _instance.type - : (type as String), - usages: usages == _undefined || usages == null - ? _instance.usages - : (usages - as List), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + freeSpace: freeSpace == _undefined || freeSpace == null + ? _instance.freeSpace + : (freeSpace as String), + model: model == _undefined ? _instance.model : (model as String?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + root: root == _undefined || root == null + ? _instance.root + : (root as bool), + serial: serial == _undefined ? _instance.serial : (serial as String?), + totalSpace: totalSpace == _undefined || totalSpace == null + ? _instance.totalSpace + : (totalSpace as String), + type: type == _undefined || type == null + ? _instance.type + : (type as String), + usages: usages == _undefined || usages == null + ? _instance.usages + : (usages + as List), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes usages( Iterable Function( Iterable< @@ -851,9 +2769,11 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes Query$GetServerDiskVolumes$storage$volumes$usages>>) _fn) => call( - usages: _fn(_instance.usages.map((e) => - CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( - e, (i) => i))).toList()); + usages: _fn(_instance.usages.map( + (e) => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes @@ -862,38 +2782,45 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes TRes _res; - call( - {String? freeSpace, - String? model, - String? name, - bool? root, - String? serial, - String? totalSpace, - String? type, - List? usages, - String? usedSpace, - String? $__typename}) => + call({ + String? freeSpace, + String? model, + String? name, + bool? root, + String? serial, + String? totalSpace, + String? type, + List? usages, + String? usedSpace, + String? $__typename, + }) => _res; usages(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes$usages { - Query$GetServerDiskVolumes$storage$volumes$usages( - {required this.title, - required this.usedSpace, - required this.$__typename}); + Query$GetServerDiskVolumes$storage$volumes$usages({ + required this.title, + required this.usedSpace, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( Map json) { switch (json["__typename"] as String) { case "ServiceStorageUsage": return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage .fromJson(json); + default: - return _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( - json); + final l$title = json['title']; + final l$usedSpace = json['usedSpace']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage$volumes$usages( + title: (l$title as String), + usedSpace: (l$usedSpace as String), + $__typename: (l$$__typename as String), + ); } } @@ -901,32 +2828,55 @@ class Query$GetServerDiskVolumes$storage$volumes$usages { final String usedSpace; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson(this); + Map toJson() { + final _resultData = {}; + final l$title = title; + _resultData['title'] = l$title; + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$title = title; final l$usedSpace = usedSpace; final l$$__typename = $__typename; - return Object.hashAll([l$title, l$usedSpace, l$$__typename]); + return Object.hashAll([ + l$title, + l$usedSpace, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$title = title; final lOther$title = other.title; - if (l$title != lOther$title) return false; + if (l$title != lOther$title) { + return false; + } final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; + if (l$usedSpace != lOther$usedSpace) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -937,29 +2887,36 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages Query$GetServerDiskVolumes$storage$volumes$usages> get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages< TRes> { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( - Query$GetServerDiskVolumes$storage$volumes$usages instance, - TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) - then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages; + Query$GetServerDiskVolumes$storage$volumes$usages instance, + TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages.stub( TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages; - TRes call({String? title, String? usedSpace, String? $__typename}); + TRes call({ + String? title, + String? usedSpace, + String? $__typename, + }); } class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages implements CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes$usages _instance; @@ -967,20 +2924,22 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages static const _undefined = {}; - TRes call( - {Object? title = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? title = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes$storage$volumes$usages( - title: title == _undefined || title == null - ? _instance.title - : (title as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages @@ -991,63 +2950,106 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages TRes _res; - call({String? title, String? usedSpace, String? $__typename}) => _res; + call({ + String? title, + String? usedSpace, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage implements Query$GetServerDiskVolumes$storage$volumes$usages { - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - {required this.title, - required this.usedSpace, - required this.$__typename, - this.service}); + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage({ + this.service, + required this.$__typename, + required this.title, + required this.usedSpace, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( - json); + Map json) { + final l$service = json['service']; + final l$$__typename = json['__typename']; + final l$title = json['title']; + final l$usedSpace = json['usedSpace']; + return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + service: l$service == null + ? null + : Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + .fromJson((l$service as Map)), + $__typename: (l$$__typename as String), + title: (l$title as String), + usedSpace: (l$usedSpace as String), + ); + } + + final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service; + + final String $__typename; final String title; final String usedSpace; - @JsonKey(name: '__typename') - final String $__typename; + Map toJson() { + final _resultData = {}; + final l$service = service; + _resultData['service'] = l$service?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$title = title; + _resultData['title'] = l$title; + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + return _resultData; + } - final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? - service; - - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( - this); + @override int get hashCode { + final l$service = service; + final l$$__typename = $__typename; final l$title = title; final l$usedSpace = usedSpace; - final l$$__typename = $__typename; - final l$service = service; - return Object.hashAll([l$title, l$usedSpace, l$$__typename, l$service]); + return Object.hashAll([ + l$service, + l$$__typename, + l$title, + l$usedSpace, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) || - runtimeType != other.runtimeType) return false; - final l$title = title; - final lOther$title = other.title; - if (l$title != lOther$title) return false; - final l$usedSpace = usedSpace; - final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + runtimeType != other.runtimeType) { + return false; + } final l$service = service; final lOther$service = other.service; - if (l$service != lOther$service) return false; + if (l$service != lOther$service) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) { + return false; + } + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) { + return false; + } return true; } } @@ -1058,29 +3060,32 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$Se Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage> get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< TRes> { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage - instance, - TRes Function( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) - then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + instance, + TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) + then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage.stub( TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; - TRes call( - {String? title, - String? usedSpace, - String? $__typename, - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? - service}); + TRes call({ + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service, + String? $__typename, + String? title, + String? usedSpace, + }); CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> get service; } @@ -1091,7 +3096,9 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< TRes> { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage _instance; @@ -1102,25 +3109,28 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt static const _undefined = {}; - TRes call( - {Object? title = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined, - Object? service = _undefined}) => - _then(Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - title: title == _undefined || title == null - ? _instance.title - : (title as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - service: service == _undefined - ? _instance.service - : (service - as Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service?))); + TRes call({ + Object? service = _undefined, + Object? $__typename = _undefined, + Object? title = _undefined, + Object? usedSpace = _undefined, + }) => + _then( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + service: service == _undefined + ? _instance.service + : (service + as Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + )); CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> get service { final local$service = _instance.service; @@ -1142,12 +3152,13 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$Servi TRes _res; - call( - {String? title, - String? usedSpace, - String? $__typename, - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? - service}) => + call({ + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service, + String? $__typename, + String? title, + String? usedSpace, + }) => _res; CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> @@ -1156,19 +3167,27 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$Servi .stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service { - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - {required this.id, - required this.isMovable, - required this.displayName, - required this.$__typename}); + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service({ + required this.id, + required this.isMovable, + required this.displayName, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( - json); + Map json) { + final l$id = json['id']; + final l$isMovable = json['isMovable']; + final l$displayName = json['displayName']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + id: (l$id as String), + isMovable: (l$isMovable as bool), + displayName: (l$displayName as String), + $__typename: (l$$__typename as String), + ); + } final String id; @@ -1176,38 +3195,65 @@ class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$ser final String displayName; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( - this); + Map toJson() { + final _resultData = {}; + final l$id = id; + _resultData['id'] = l$id; + final l$isMovable = isMovable; + _resultData['isMovable'] = l$isMovable; + final l$displayName = displayName; + _resultData['displayName'] = l$displayName; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$id = id; final l$isMovable = isMovable; final l$displayName = displayName; final l$$__typename = $__typename; - return Object.hashAll([l$id, l$isMovable, l$displayName, l$$__typename]); + return Object.hashAll([ + l$id, + l$isMovable, + l$displayName, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$id = id; final lOther$id = other.id; - if (l$id != lOther$id) return false; + if (l$id != lOther$id) { + return false; + } final l$isMovable = isMovable; final lOther$isMovable = other.isMovable; - if (l$isMovable != lOther$isMovable) return false; + if (l$isMovable != lOther$isMovable) { + return false; + } final l$displayName = displayName; final lOther$displayName = other.displayName; - if (l$displayName != lOther$displayName) return false; + if (l$displayName != lOther$displayName) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1218,25 +3264,31 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$Se Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service> get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - instance, - TRes Function( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) - then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + instance, + TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) + then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.stub( TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; - TRes call( - {String? id, bool? isMovable, String? displayName, String? $__typename}); + TRes call({ + String? id, + bool? isMovable, + String? displayName, + String? $__typename, + }); } class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< @@ -1245,7 +3297,9 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service _instance; @@ -1256,25 +3310,25 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt static const _undefined = {}; - TRes call( - {Object? id = _undefined, - Object? isMovable = _undefined, - Object? displayName = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? id = _undefined, + Object? isMovable = _undefined, + Object? displayName = _undefined, + Object? $__typename = _undefined, + }) => _then( Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - id: id == _undefined || id == null - ? _instance.id - : (id as String), - isMovable: isMovable == _undefined || isMovable == null - ? _instance.isMovable - : (isMovable as bool), - displayName: displayName == _undefined || displayName == null - ? _instance.displayName - : (displayName as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + id: id == _undefined || id == null ? _instance.id : (id as String), + isMovable: isMovable == _undefined || isMovable == null + ? _instance.isMovable + : (isMovable as bool), + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< @@ -1287,50 +3341,74 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$Servi TRes _res; - call( - {String? id, - bool? isMovable, - String? displayName, - String? $__typename}) => + call({ + String? id, + bool? isMovable, + String? displayName, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$MountVolume { - Variables$Mutation$MountVolume({required this.name}); + factory Variables$Mutation$MountVolume({required String name}) => + Variables$Mutation$MountVolume._({ + r'name': name, + }); + + Variables$Mutation$MountVolume._(this._$data); + + factory Variables$Mutation$MountVolume.fromJson(Map data) { + final result$data = {}; + final l$name = data['name']; + result$data['name'] = (l$name as String); + return Variables$Mutation$MountVolume._(result$data); + } + + Map _$data; + + String get name => (_$data['name'] as String); + Map toJson() { + final result$data = {}; + final l$name = name; + result$data['name'] = l$name; + return result$data; + } + + CopyWith$Variables$Mutation$MountVolume + get copyWith => CopyWith$Variables$Mutation$MountVolume( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$MountVolume) || + runtimeType != other.runtimeType) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + return true; + } @override - factory Variables$Mutation$MountVolume.fromJson(Map json) => - _$Variables$Mutation$MountVolumeFromJson(json); - - final String name; - - Map toJson() => _$Variables$Mutation$MountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MountVolume) || - runtimeType != other.runtimeType) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - return true; - } - - CopyWith$Variables$Mutation$MountVolume - get copyWith => CopyWith$Variables$Mutation$MountVolume(this, (i) => i); } abstract class CopyWith$Variables$Mutation$MountVolume { factory CopyWith$Variables$Mutation$MountVolume( - Variables$Mutation$MountVolume instance, - TRes Function(Variables$Mutation$MountVolume) then) = - _CopyWithImpl$Variables$Mutation$MountVolume; + Variables$Mutation$MountVolume instance, + TRes Function(Variables$Mutation$MountVolume) then, + ) = _CopyWithImpl$Variables$Mutation$MountVolume; factory CopyWith$Variables$Mutation$MountVolume.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$MountVolume; @@ -1340,7 +3418,10 @@ abstract class CopyWith$Variables$Mutation$MountVolume { class _CopyWithImpl$Variables$Mutation$MountVolume implements CopyWith$Variables$Mutation$MountVolume { - _CopyWithImpl$Variables$Mutation$MountVolume(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$MountVolume( + this._instance, + this._then, + ); final Variables$Mutation$MountVolume _instance; @@ -1349,10 +3430,10 @@ class _CopyWithImpl$Variables$Mutation$MountVolume static const _undefined = {}; TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$MountVolume( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); + _then(Variables$Mutation$MountVolume._({ + ..._instance._$data, + if (name != _undefined && name != null) 'name': (name as String), + })); } class _CopyWithStubImpl$Variables$Mutation$MountVolume @@ -1364,62 +3445,97 @@ class _CopyWithStubImpl$Variables$Mutation$MountVolume call({String? name}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$MountVolume { - Mutation$MountVolume({required this.mountVolume, required this.$__typename}); + Mutation$MountVolume({ + required this.mountVolume, + required this.$__typename, + }); - @override - factory Mutation$MountVolume.fromJson(Map json) => - _$Mutation$MountVolumeFromJson(json); + factory Mutation$MountVolume.fromJson(Map json) { + final l$mountVolume = json['mountVolume']; + final l$$__typename = json['__typename']; + return Mutation$MountVolume( + mountVolume: Mutation$MountVolume$mountVolume.fromJson( + (l$mountVolume as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$MountVolume$mountVolume mountVolume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$mountVolume = mountVolume; + _resultData['mountVolume'] = l$mountVolume.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$mountVolume = mountVolume; final l$$__typename = $__typename; - return Object.hashAll([l$mountVolume, l$$__typename]); + return Object.hashAll([ + l$mountVolume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$MountVolume) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$MountVolume) || runtimeType != other.runtimeType) { return false; + } final l$mountVolume = mountVolume; final lOther$mountVolume = other.mountVolume; - if (l$mountVolume != lOther$mountVolume) return false; + if (l$mountVolume != lOther$mountVolume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$MountVolume on Mutation$MountVolume { CopyWith$Mutation$MountVolume get copyWith => - CopyWith$Mutation$MountVolume(this, (i) => i); + CopyWith$Mutation$MountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MountVolume { - factory CopyWith$Mutation$MountVolume(Mutation$MountVolume instance, - TRes Function(Mutation$MountVolume) then) = - _CopyWithImpl$Mutation$MountVolume; + factory CopyWith$Mutation$MountVolume( + Mutation$MountVolume instance, + TRes Function(Mutation$MountVolume) then, + ) = _CopyWithImpl$Mutation$MountVolume; factory CopyWith$Mutation$MountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$MountVolume; - TRes call( - {Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}); + TRes call({ + Mutation$MountVolume$mountVolume? mountVolume, + String? $__typename, + }); CopyWith$Mutation$MountVolume$mountVolume get mountVolume; } class _CopyWithImpl$Mutation$MountVolume implements CopyWith$Mutation$MountVolume { - _CopyWithImpl$Mutation$MountVolume(this._instance, this._then); + _CopyWithImpl$Mutation$MountVolume( + this._instance, + this._then, + ); final Mutation$MountVolume _instance; @@ -1427,16 +3543,18 @@ class _CopyWithImpl$Mutation$MountVolume static const _undefined = {}; - TRes call( - {Object? mountVolume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? mountVolume = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MountVolume( - mountVolume: mountVolume == _undefined || mountVolume == null - ? _instance.mountVolume - : (mountVolume as Mutation$MountVolume$mountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + mountVolume: mountVolume == _undefined || mountVolume == null + ? _instance.mountVolume + : (mountVolume as Mutation$MountVolume$mountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$MountVolume$mountVolume get mountVolume { final local$mountVolume = _instance.mountVolume; return CopyWith$Mutation$MountVolume$mountVolume( @@ -1450,7 +3568,10 @@ class _CopyWithStubImpl$Mutation$MountVolume TRes _res; - call({Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}) => + call({ + Mutation$MountVolume$mountVolume? mountVolume, + String? $__typename, + }) => _res; CopyWith$Mutation$MountVolume$mountVolume get mountVolume => CopyWith$Mutation$MountVolume$mountVolume.stub(_res); @@ -1458,83 +3579,97 @@ class _CopyWithStubImpl$Mutation$MountVolume const documentNodeMutationMountVolume = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'MountVolume'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'name')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'mountVolume'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'name'), - value: VariableNode(name: NameNode(value: 'name'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'MountVolume'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'mountVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$MountVolume _parserFn$Mutation$MountVolume( Map data) => Mutation$MountVolume.fromJson(data); typedef OnMutationCompleted$Mutation$MountVolume = FutureOr Function( - dynamic, Mutation$MountVolume?); + dynamic, + Mutation$MountVolume?, +); class Options$Mutation$MountVolume extends graphql.MutationOptions { - Options$Mutation$MountVolume( - {String? operationName, - required Variables$Mutation$MountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$MountVolume? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$MountVolume({ + String? operationName, + required Variables$Mutation$MountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MountVolume? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$MountVolume(data)), - update: update, - onError: onError, - document: documentNodeMutationMountVolume, - parserFn: _parserFn$Mutation$MountVolume); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$MountVolume(data), + ), + update: update, + onError: onError, + document: documentNodeMutationMountVolume, + parserFn: _parserFn$Mutation$MountVolume, + ); final OnMutationCompleted$Mutation$MountVolume? onCompletedWithParsed; @@ -1543,38 +3678,39 @@ class Options$Mutation$MountVolume ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$MountVolume extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MountVolume( - {String? operationName, - required Variables$Mutation$MountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationMountVolume, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MountVolume); + WatchOptions$Mutation$MountVolume({ + String? operationName, + required Variables$Mutation$MountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMountVolume, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MountVolume, + ); } extension ClientExtension$Mutation$MountVolume on graphql.GraphQLClient { @@ -1586,19 +3722,27 @@ extension ClientExtension$Mutation$MountVolume on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$MountVolume$mountVolume - implements Fragment$basicMutationReturnFields { - Mutation$MountVolume$mountVolume( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$MountVolume$mountVolume({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$MountVolume$mountVolume.fromJson( - Map json) => - _$Mutation$MountVolume$mountVolumeFromJson(json); + factory Mutation$MountVolume$mountVolume.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$MountVolume$mountVolume( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1606,36 +3750,64 @@ class Mutation$MountVolume$mountVolume final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$MountVolume$mountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MountVolume$mountVolume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1643,24 +3815,35 @@ class Mutation$MountVolume$mountVolume extension UtilityExtension$Mutation$MountVolume$mountVolume on Mutation$MountVolume$mountVolume { CopyWith$Mutation$MountVolume$mountVolume - get copyWith => CopyWith$Mutation$MountVolume$mountVolume(this, (i) => i); + get copyWith => CopyWith$Mutation$MountVolume$mountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MountVolume$mountVolume { factory CopyWith$Mutation$MountVolume$mountVolume( - Mutation$MountVolume$mountVolume instance, - TRes Function(Mutation$MountVolume$mountVolume) then) = - _CopyWithImpl$Mutation$MountVolume$mountVolume; + Mutation$MountVolume$mountVolume instance, + TRes Function(Mutation$MountVolume$mountVolume) then, + ) = _CopyWithImpl$Mutation$MountVolume$mountVolume; factory CopyWith$Mutation$MountVolume$mountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$MountVolume$mountVolume; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$MountVolume$mountVolume implements CopyWith$Mutation$MountVolume$mountVolume { - _CopyWithImpl$Mutation$MountVolume$mountVolume(this._instance, this._then); + _CopyWithImpl$Mutation$MountVolume$mountVolume( + this._instance, + this._then, + ); final Mutation$MountVolume$mountVolume _instance; @@ -1668,24 +3851,25 @@ class _CopyWithImpl$Mutation$MountVolume$mountVolume static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MountVolume$mountVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$MountVolume$mountVolume @@ -1694,47 +3878,74 @@ class _CopyWithStubImpl$Mutation$MountVolume$mountVolume TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$ResizeVolume { - Variables$Mutation$ResizeVolume({required this.name}); + factory Variables$Mutation$ResizeVolume({required String name}) => + Variables$Mutation$ResizeVolume._({ + r'name': name, + }); + + Variables$Mutation$ResizeVolume._(this._$data); + + factory Variables$Mutation$ResizeVolume.fromJson(Map data) { + final result$data = {}; + final l$name = data['name']; + result$data['name'] = (l$name as String); + return Variables$Mutation$ResizeVolume._(result$data); + } + + Map _$data; + + String get name => (_$data['name'] as String); + Map toJson() { + final result$data = {}; + final l$name = name; + result$data['name'] = l$name; + return result$data; + } + + CopyWith$Variables$Mutation$ResizeVolume + get copyWith => CopyWith$Variables$Mutation$ResizeVolume( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$ResizeVolume) || + runtimeType != other.runtimeType) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + return true; + } @override - factory Variables$Mutation$ResizeVolume.fromJson(Map json) => - _$Variables$Mutation$ResizeVolumeFromJson(json); - - final String name; - - Map toJson() => - _$Variables$Mutation$ResizeVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ResizeVolume) || - runtimeType != other.runtimeType) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - return true; - } - - CopyWith$Variables$Mutation$ResizeVolume - get copyWith => CopyWith$Variables$Mutation$ResizeVolume(this, (i) => i); } abstract class CopyWith$Variables$Mutation$ResizeVolume { factory CopyWith$Variables$Mutation$ResizeVolume( - Variables$Mutation$ResizeVolume instance, - TRes Function(Variables$Mutation$ResizeVolume) then) = - _CopyWithImpl$Variables$Mutation$ResizeVolume; + Variables$Mutation$ResizeVolume instance, + TRes Function(Variables$Mutation$ResizeVolume) then, + ) = _CopyWithImpl$Variables$Mutation$ResizeVolume; factory CopyWith$Variables$Mutation$ResizeVolume.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$ResizeVolume; @@ -1744,7 +3955,10 @@ abstract class CopyWith$Variables$Mutation$ResizeVolume { class _CopyWithImpl$Variables$Mutation$ResizeVolume implements CopyWith$Variables$Mutation$ResizeVolume { - _CopyWithImpl$Variables$Mutation$ResizeVolume(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$ResizeVolume( + this._instance, + this._then, + ); final Variables$Mutation$ResizeVolume _instance; @@ -1753,10 +3967,10 @@ class _CopyWithImpl$Variables$Mutation$ResizeVolume static const _undefined = {}; TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$ResizeVolume( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); + _then(Variables$Mutation$ResizeVolume._({ + ..._instance._$data, + if (name != _undefined && name != null) 'name': (name as String), + })); } class _CopyWithStubImpl$Variables$Mutation$ResizeVolume @@ -1768,63 +3982,97 @@ class _CopyWithStubImpl$Variables$Mutation$ResizeVolume call({String? name}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$ResizeVolume { - Mutation$ResizeVolume( - {required this.resizeVolume, required this.$__typename}); + Mutation$ResizeVolume({ + required this.resizeVolume, + required this.$__typename, + }); - @override - factory Mutation$ResizeVolume.fromJson(Map json) => - _$Mutation$ResizeVolumeFromJson(json); + factory Mutation$ResizeVolume.fromJson(Map json) { + final l$resizeVolume = json['resizeVolume']; + final l$$__typename = json['__typename']; + return Mutation$ResizeVolume( + resizeVolume: Mutation$ResizeVolume$resizeVolume.fromJson( + (l$resizeVolume as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$ResizeVolume$resizeVolume resizeVolume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$ResizeVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$resizeVolume = resizeVolume; + _resultData['resizeVolume'] = l$resizeVolume.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$resizeVolume = resizeVolume; final l$$__typename = $__typename; - return Object.hashAll([l$resizeVolume, l$$__typename]); + return Object.hashAll([ + l$resizeVolume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$ResizeVolume) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ResizeVolume) || runtimeType != other.runtimeType) { return false; + } final l$resizeVolume = resizeVolume; final lOther$resizeVolume = other.resizeVolume; - if (l$resizeVolume != lOther$resizeVolume) return false; + if (l$resizeVolume != lOther$resizeVolume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$ResizeVolume on Mutation$ResizeVolume { CopyWith$Mutation$ResizeVolume get copyWith => - CopyWith$Mutation$ResizeVolume(this, (i) => i); + CopyWith$Mutation$ResizeVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ResizeVolume { - factory CopyWith$Mutation$ResizeVolume(Mutation$ResizeVolume instance, - TRes Function(Mutation$ResizeVolume) then) = - _CopyWithImpl$Mutation$ResizeVolume; + factory CopyWith$Mutation$ResizeVolume( + Mutation$ResizeVolume instance, + TRes Function(Mutation$ResizeVolume) then, + ) = _CopyWithImpl$Mutation$ResizeVolume; factory CopyWith$Mutation$ResizeVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$ResizeVolume; - TRes call( - {Mutation$ResizeVolume$resizeVolume? resizeVolume, String? $__typename}); + TRes call({ + Mutation$ResizeVolume$resizeVolume? resizeVolume, + String? $__typename, + }); CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume; } class _CopyWithImpl$Mutation$ResizeVolume implements CopyWith$Mutation$ResizeVolume { - _CopyWithImpl$Mutation$ResizeVolume(this._instance, this._then); + _CopyWithImpl$Mutation$ResizeVolume( + this._instance, + this._then, + ); final Mutation$ResizeVolume _instance; @@ -1832,16 +4080,18 @@ class _CopyWithImpl$Mutation$ResizeVolume static const _undefined = {}; - TRes call( - {Object? resizeVolume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? resizeVolume = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ResizeVolume( - resizeVolume: resizeVolume == _undefined || resizeVolume == null - ? _instance.resizeVolume - : (resizeVolume as Mutation$ResizeVolume$resizeVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + resizeVolume: resizeVolume == _undefined || resizeVolume == null + ? _instance.resizeVolume + : (resizeVolume as Mutation$ResizeVolume$resizeVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume { final local$resizeVolume = _instance.resizeVolume; return CopyWith$Mutation$ResizeVolume$resizeVolume( @@ -1855,9 +4105,10 @@ class _CopyWithStubImpl$Mutation$ResizeVolume TRes _res; - call( - {Mutation$ResizeVolume$resizeVolume? resizeVolume, - String? $__typename}) => + call({ + Mutation$ResizeVolume$resizeVolume? resizeVolume, + String? $__typename, + }) => _res; CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume => CopyWith$Mutation$ResizeVolume$resizeVolume.stub(_res); @@ -1865,86 +4116,97 @@ class _CopyWithStubImpl$Mutation$ResizeVolume const documentNodeMutationResizeVolume = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'ResizeVolume'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'name')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'resizeVolume'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'name'), - value: VariableNode(name: NameNode(value: 'name'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'ResizeVolume'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'resizeVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$ResizeVolume _parserFn$Mutation$ResizeVolume( Map data) => Mutation$ResizeVolume.fromJson(data); typedef OnMutationCompleted$Mutation$ResizeVolume = FutureOr Function( - dynamic, Mutation$ResizeVolume?); + dynamic, + Mutation$ResizeVolume?, +); class Options$Mutation$ResizeVolume extends graphql.MutationOptions { - Options$Mutation$ResizeVolume( - {String? operationName, - required Variables$Mutation$ResizeVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$ResizeVolume? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$ResizeVolume({ + String? operationName, + required Variables$Mutation$ResizeVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ResizeVolume? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$ResizeVolume(data)), - update: update, - onError: onError, - document: documentNodeMutationResizeVolume, - parserFn: _parserFn$Mutation$ResizeVolume); + data == null ? null : _parserFn$Mutation$ResizeVolume(data), + ), + update: update, + onError: onError, + document: documentNodeMutationResizeVolume, + parserFn: _parserFn$Mutation$ResizeVolume, + ); final OnMutationCompleted$Mutation$ResizeVolume? onCompletedWithParsed; @@ -1953,38 +4215,39 @@ class Options$Mutation$ResizeVolume ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$ResizeVolume extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ResizeVolume( - {String? operationName, - required Variables$Mutation$ResizeVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationResizeVolume, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ResizeVolume); + WatchOptions$Mutation$ResizeVolume({ + String? operationName, + required Variables$Mutation$ResizeVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationResizeVolume, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ResizeVolume, + ); } extension ClientExtension$Mutation$ResizeVolume on graphql.GraphQLClient { @@ -1996,19 +4259,28 @@ extension ClientExtension$Mutation$ResizeVolume on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$ResizeVolume$resizeVolume - implements Fragment$basicMutationReturnFields { - Mutation$ResizeVolume$resizeVolume( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$ResizeVolume$resizeVolume({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$ResizeVolume$resizeVolume.fromJson( - Map json) => - _$Mutation$ResizeVolume$resizeVolumeFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$ResizeVolume$resizeVolume( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2016,36 +4288,64 @@ class Mutation$ResizeVolume$resizeVolume final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$ResizeVolume$resizeVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ResizeVolume$resizeVolume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2054,25 +4354,35 @@ extension UtilityExtension$Mutation$ResizeVolume$resizeVolume on Mutation$ResizeVolume$resizeVolume { CopyWith$Mutation$ResizeVolume$resizeVolume< Mutation$ResizeVolume$resizeVolume> - get copyWith => - CopyWith$Mutation$ResizeVolume$resizeVolume(this, (i) => i); + get copyWith => CopyWith$Mutation$ResizeVolume$resizeVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ResizeVolume$resizeVolume { factory CopyWith$Mutation$ResizeVolume$resizeVolume( - Mutation$ResizeVolume$resizeVolume instance, - TRes Function(Mutation$ResizeVolume$resizeVolume) then) = - _CopyWithImpl$Mutation$ResizeVolume$resizeVolume; + Mutation$ResizeVolume$resizeVolume instance, + TRes Function(Mutation$ResizeVolume$resizeVolume) then, + ) = _CopyWithImpl$Mutation$ResizeVolume$resizeVolume; factory CopyWith$Mutation$ResizeVolume$resizeVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$ResizeVolume$resizeVolume implements CopyWith$Mutation$ResizeVolume$resizeVolume { - _CopyWithImpl$Mutation$ResizeVolume$resizeVolume(this._instance, this._then); + _CopyWithImpl$Mutation$ResizeVolume$resizeVolume( + this._instance, + this._then, + ); final Mutation$ResizeVolume$resizeVolume _instance; @@ -2080,24 +4390,25 @@ class _CopyWithImpl$Mutation$ResizeVolume$resizeVolume static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ResizeVolume$resizeVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume @@ -2106,48 +4417,74 @@ class _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$UnmountVolume { - Variables$Mutation$UnmountVolume({required this.name}); + factory Variables$Mutation$UnmountVolume({required String name}) => + Variables$Mutation$UnmountVolume._({ + r'name': name, + }); + + Variables$Mutation$UnmountVolume._(this._$data); + + factory Variables$Mutation$UnmountVolume.fromJson(Map data) { + final result$data = {}; + final l$name = data['name']; + result$data['name'] = (l$name as String); + return Variables$Mutation$UnmountVolume._(result$data); + } + + Map _$data; + + String get name => (_$data['name'] as String); + Map toJson() { + final result$data = {}; + final l$name = name; + result$data['name'] = l$name; + return result$data; + } + + CopyWith$Variables$Mutation$UnmountVolume + get copyWith => CopyWith$Variables$Mutation$UnmountVolume( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$UnmountVolume) || + runtimeType != other.runtimeType) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + return true; + } @override - factory Variables$Mutation$UnmountVolume.fromJson( - Map json) => - _$Variables$Mutation$UnmountVolumeFromJson(json); - - final String name; - - Map toJson() => - _$Variables$Mutation$UnmountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UnmountVolume) || - runtimeType != other.runtimeType) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - return true; - } - - CopyWith$Variables$Mutation$UnmountVolume - get copyWith => CopyWith$Variables$Mutation$UnmountVolume(this, (i) => i); } abstract class CopyWith$Variables$Mutation$UnmountVolume { factory CopyWith$Variables$Mutation$UnmountVolume( - Variables$Mutation$UnmountVolume instance, - TRes Function(Variables$Mutation$UnmountVolume) then) = - _CopyWithImpl$Variables$Mutation$UnmountVolume; + Variables$Mutation$UnmountVolume instance, + TRes Function(Variables$Mutation$UnmountVolume) then, + ) = _CopyWithImpl$Variables$Mutation$UnmountVolume; factory CopyWith$Variables$Mutation$UnmountVolume.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UnmountVolume; @@ -2157,7 +4494,10 @@ abstract class CopyWith$Variables$Mutation$UnmountVolume { class _CopyWithImpl$Variables$Mutation$UnmountVolume implements CopyWith$Variables$Mutation$UnmountVolume { - _CopyWithImpl$Variables$Mutation$UnmountVolume(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$UnmountVolume( + this._instance, + this._then, + ); final Variables$Mutation$UnmountVolume _instance; @@ -2166,10 +4506,10 @@ class _CopyWithImpl$Variables$Mutation$UnmountVolume static const _undefined = {}; TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$UnmountVolume( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); + _then(Variables$Mutation$UnmountVolume._({ + ..._instance._$data, + if (name != _undefined && name != null) 'name': (name as String), + })); } class _CopyWithStubImpl$Variables$Mutation$UnmountVolume @@ -2181,64 +4521,98 @@ class _CopyWithStubImpl$Variables$Mutation$UnmountVolume call({String? name}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$UnmountVolume { - Mutation$UnmountVolume( - {required this.unmountVolume, required this.$__typename}); + Mutation$UnmountVolume({ + required this.unmountVolume, + required this.$__typename, + }); - @override - factory Mutation$UnmountVolume.fromJson(Map json) => - _$Mutation$UnmountVolumeFromJson(json); + factory Mutation$UnmountVolume.fromJson(Map json) { + final l$unmountVolume = json['unmountVolume']; + final l$$__typename = json['__typename']; + return Mutation$UnmountVolume( + unmountVolume: Mutation$UnmountVolume$unmountVolume.fromJson( + (l$unmountVolume as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$UnmountVolume$unmountVolume unmountVolume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UnmountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$unmountVolume = unmountVolume; + _resultData['unmountVolume'] = l$unmountVolume.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$unmountVolume = unmountVolume; final l$$__typename = $__typename; - return Object.hashAll([l$unmountVolume, l$$__typename]); + return Object.hashAll([ + l$unmountVolume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$UnmountVolume) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$UnmountVolume) || + runtimeType != other.runtimeType) { return false; + } final l$unmountVolume = unmountVolume; final lOther$unmountVolume = other.unmountVolume; - if (l$unmountVolume != lOther$unmountVolume) return false; + if (l$unmountVolume != lOther$unmountVolume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$UnmountVolume on Mutation$UnmountVolume { CopyWith$Mutation$UnmountVolume get copyWith => - CopyWith$Mutation$UnmountVolume(this, (i) => i); + CopyWith$Mutation$UnmountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UnmountVolume { - factory CopyWith$Mutation$UnmountVolume(Mutation$UnmountVolume instance, - TRes Function(Mutation$UnmountVolume) then) = - _CopyWithImpl$Mutation$UnmountVolume; + factory CopyWith$Mutation$UnmountVolume( + Mutation$UnmountVolume instance, + TRes Function(Mutation$UnmountVolume) then, + ) = _CopyWithImpl$Mutation$UnmountVolume; factory CopyWith$Mutation$UnmountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$UnmountVolume; - TRes call( - {Mutation$UnmountVolume$unmountVolume? unmountVolume, - String? $__typename}); + TRes call({ + Mutation$UnmountVolume$unmountVolume? unmountVolume, + String? $__typename, + }); CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume; } class _CopyWithImpl$Mutation$UnmountVolume implements CopyWith$Mutation$UnmountVolume { - _CopyWithImpl$Mutation$UnmountVolume(this._instance, this._then); + _CopyWithImpl$Mutation$UnmountVolume( + this._instance, + this._then, + ); final Mutation$UnmountVolume _instance; @@ -2246,16 +4620,18 @@ class _CopyWithImpl$Mutation$UnmountVolume static const _undefined = {}; - TRes call( - {Object? unmountVolume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? unmountVolume = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UnmountVolume( - unmountVolume: unmountVolume == _undefined || unmountVolume == null - ? _instance.unmountVolume - : (unmountVolume as Mutation$UnmountVolume$unmountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + unmountVolume: unmountVolume == _undefined || unmountVolume == null + ? _instance.unmountVolume + : (unmountVolume as Mutation$UnmountVolume$unmountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume { final local$unmountVolume = _instance.unmountVolume; return CopyWith$Mutation$UnmountVolume$unmountVolume( @@ -2269,9 +4645,10 @@ class _CopyWithStubImpl$Mutation$UnmountVolume TRes _res; - call( - {Mutation$UnmountVolume$unmountVolume? unmountVolume, - String? $__typename}) => + call({ + Mutation$UnmountVolume$unmountVolume? unmountVolume, + String? $__typename, + }) => _res; CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume => CopyWith$Mutation$UnmountVolume$unmountVolume.stub(_res); @@ -2279,86 +4656,99 @@ class _CopyWithStubImpl$Mutation$UnmountVolume const documentNodeMutationUnmountVolume = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'UnmountVolume'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'name')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'unmountVolume'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'name'), - value: VariableNode(name: NameNode(value: 'name'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'UnmountVolume'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'unmountVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$UnmountVolume _parserFn$Mutation$UnmountVolume( Map data) => Mutation$UnmountVolume.fromJson(data); typedef OnMutationCompleted$Mutation$UnmountVolume = FutureOr Function( - dynamic, Mutation$UnmountVolume?); + dynamic, + Mutation$UnmountVolume?, +); class Options$Mutation$UnmountVolume extends graphql.MutationOptions { - Options$Mutation$UnmountVolume( - {String? operationName, - required Variables$Mutation$UnmountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$UnmountVolume? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$UnmountVolume({ + String? operationName, + required Variables$Mutation$UnmountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UnmountVolume? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$UnmountVolume(data)), - update: update, - onError: onError, - document: documentNodeMutationUnmountVolume, - parserFn: _parserFn$Mutation$UnmountVolume); + : _parserFn$Mutation$UnmountVolume(data), + ), + update: update, + onError: onError, + document: documentNodeMutationUnmountVolume, + parserFn: _parserFn$Mutation$UnmountVolume, + ); final OnMutationCompleted$Mutation$UnmountVolume? onCompletedWithParsed; @@ -2367,38 +4757,39 @@ class Options$Mutation$UnmountVolume ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$UnmountVolume extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UnmountVolume( - {String? operationName, - required Variables$Mutation$UnmountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationUnmountVolume, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UnmountVolume); + WatchOptions$Mutation$UnmountVolume({ + String? operationName, + required Variables$Mutation$UnmountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUnmountVolume, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UnmountVolume, + ); } extension ClientExtension$Mutation$UnmountVolume on graphql.GraphQLClient { @@ -2410,19 +4801,28 @@ extension ClientExtension$Mutation$UnmountVolume on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$UnmountVolume$unmountVolume - implements Fragment$basicMutationReturnFields { - Mutation$UnmountVolume$unmountVolume( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$UnmountVolume$unmountVolume({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$UnmountVolume$unmountVolume.fromJson( - Map json) => - _$Mutation$UnmountVolume$unmountVolumeFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$UnmountVolume$unmountVolume( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2430,36 +4830,64 @@ class Mutation$UnmountVolume$unmountVolume final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$UnmountVolume$unmountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UnmountVolume$unmountVolume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2468,26 +4896,35 @@ extension UtilityExtension$Mutation$UnmountVolume$unmountVolume on Mutation$UnmountVolume$unmountVolume { CopyWith$Mutation$UnmountVolume$unmountVolume< Mutation$UnmountVolume$unmountVolume> - get copyWith => - CopyWith$Mutation$UnmountVolume$unmountVolume(this, (i) => i); + get copyWith => CopyWith$Mutation$UnmountVolume$unmountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UnmountVolume$unmountVolume { factory CopyWith$Mutation$UnmountVolume$unmountVolume( - Mutation$UnmountVolume$unmountVolume instance, - TRes Function(Mutation$UnmountVolume$unmountVolume) then) = - _CopyWithImpl$Mutation$UnmountVolume$unmountVolume; + Mutation$UnmountVolume$unmountVolume instance, + TRes Function(Mutation$UnmountVolume$unmountVolume) then, + ) = _CopyWithImpl$Mutation$UnmountVolume$unmountVolume; factory CopyWith$Mutation$UnmountVolume$unmountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$UnmountVolume$unmountVolume implements CopyWith$Mutation$UnmountVolume$unmountVolume { _CopyWithImpl$Mutation$UnmountVolume$unmountVolume( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$UnmountVolume$unmountVolume _instance; @@ -2495,24 +4932,25 @@ class _CopyWithImpl$Mutation$UnmountVolume$unmountVolume static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UnmountVolume$unmountVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume @@ -2521,49 +4959,78 @@ class _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$MigrateToBinds { - Variables$Mutation$MigrateToBinds({required this.input}); + factory Variables$Mutation$MigrateToBinds( + {required Input$MigrateToBindsInput input}) => + Variables$Mutation$MigrateToBinds._({ + r'input': input, + }); + + Variables$Mutation$MigrateToBinds._(this._$data); + + factory Variables$Mutation$MigrateToBinds.fromJson( + Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$MigrateToBindsInput.fromJson((l$input as Map)); + return Variables$Mutation$MigrateToBinds._(result$data); + } + + Map _$data; + + Input$MigrateToBindsInput get input => + (_$data['input'] as Input$MigrateToBindsInput); + Map toJson() { + final result$data = {}; + final l$input = input; + result$data['input'] = l$input.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$MigrateToBinds + get copyWith => CopyWith$Variables$Mutation$MigrateToBinds( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$MigrateToBinds) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } @override - factory Variables$Mutation$MigrateToBinds.fromJson( - Map json) => - _$Variables$Mutation$MigrateToBindsFromJson(json); - - final Input$MigrateToBindsInput input; - - Map toJson() => - _$Variables$Mutation$MigrateToBindsToJson(this); int get hashCode { final l$input = input; return Object.hashAll([l$input]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MigrateToBinds) || - runtimeType != other.runtimeType) return false; - final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; - } - - CopyWith$Variables$Mutation$MigrateToBinds - get copyWith => - CopyWith$Variables$Mutation$MigrateToBinds(this, (i) => i); } abstract class CopyWith$Variables$Mutation$MigrateToBinds { factory CopyWith$Variables$Mutation$MigrateToBinds( - Variables$Mutation$MigrateToBinds instance, - TRes Function(Variables$Mutation$MigrateToBinds) then) = - _CopyWithImpl$Variables$Mutation$MigrateToBinds; + Variables$Mutation$MigrateToBinds instance, + TRes Function(Variables$Mutation$MigrateToBinds) then, + ) = _CopyWithImpl$Variables$Mutation$MigrateToBinds; factory CopyWith$Variables$Mutation$MigrateToBinds.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$MigrateToBinds; @@ -2573,7 +5040,10 @@ abstract class CopyWith$Variables$Mutation$MigrateToBinds { class _CopyWithImpl$Variables$Mutation$MigrateToBinds implements CopyWith$Variables$Mutation$MigrateToBinds { - _CopyWithImpl$Variables$Mutation$MigrateToBinds(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$MigrateToBinds( + this._instance, + this._then, + ); final Variables$Mutation$MigrateToBinds _instance; @@ -2582,10 +5052,11 @@ class _CopyWithImpl$Variables$Mutation$MigrateToBinds static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$MigrateToBinds( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$MigrateToBindsInput))); + _then(Variables$Mutation$MigrateToBinds._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$MigrateToBindsInput), + })); } class _CopyWithStubImpl$Variables$Mutation$MigrateToBinds @@ -2597,64 +5068,98 @@ class _CopyWithStubImpl$Variables$Mutation$MigrateToBinds call({Input$MigrateToBindsInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$MigrateToBinds { - Mutation$MigrateToBinds( - {required this.migrateToBinds, required this.$__typename}); + Mutation$MigrateToBinds({ + required this.migrateToBinds, + required this.$__typename, + }); - @override - factory Mutation$MigrateToBinds.fromJson(Map json) => - _$Mutation$MigrateToBindsFromJson(json); + factory Mutation$MigrateToBinds.fromJson(Map json) { + final l$migrateToBinds = json['migrateToBinds']; + final l$$__typename = json['__typename']; + return Mutation$MigrateToBinds( + migrateToBinds: Mutation$MigrateToBinds$migrateToBinds.fromJson( + (l$migrateToBinds as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$MigrateToBinds$migrateToBinds migrateToBinds; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MigrateToBindsToJson(this); + Map toJson() { + final _resultData = {}; + final l$migrateToBinds = migrateToBinds; + _resultData['migrateToBinds'] = l$migrateToBinds.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$migrateToBinds = migrateToBinds; final l$$__typename = $__typename; - return Object.hashAll([l$migrateToBinds, l$$__typename]); + return Object.hashAll([ + l$migrateToBinds, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$MigrateToBinds) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$MigrateToBinds) || + runtimeType != other.runtimeType) { return false; + } final l$migrateToBinds = migrateToBinds; final lOther$migrateToBinds = other.migrateToBinds; - if (l$migrateToBinds != lOther$migrateToBinds) return false; + if (l$migrateToBinds != lOther$migrateToBinds) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$MigrateToBinds on Mutation$MigrateToBinds { CopyWith$Mutation$MigrateToBinds get copyWith => - CopyWith$Mutation$MigrateToBinds(this, (i) => i); + CopyWith$Mutation$MigrateToBinds( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MigrateToBinds { - factory CopyWith$Mutation$MigrateToBinds(Mutation$MigrateToBinds instance, - TRes Function(Mutation$MigrateToBinds) then) = - _CopyWithImpl$Mutation$MigrateToBinds; + factory CopyWith$Mutation$MigrateToBinds( + Mutation$MigrateToBinds instance, + TRes Function(Mutation$MigrateToBinds) then, + ) = _CopyWithImpl$Mutation$MigrateToBinds; factory CopyWith$Mutation$MigrateToBinds.stub(TRes res) = _CopyWithStubImpl$Mutation$MigrateToBinds; - TRes call( - {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, - String? $__typename}); + TRes call({ + Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, + String? $__typename, + }); CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds; } class _CopyWithImpl$Mutation$MigrateToBinds implements CopyWith$Mutation$MigrateToBinds { - _CopyWithImpl$Mutation$MigrateToBinds(this._instance, this._then); + _CopyWithImpl$Mutation$MigrateToBinds( + this._instance, + this._then, + ); final Mutation$MigrateToBinds _instance; @@ -2662,16 +5167,18 @@ class _CopyWithImpl$Mutation$MigrateToBinds static const _undefined = {}; - TRes call( - {Object? migrateToBinds = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? migrateToBinds = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MigrateToBinds( - migrateToBinds: migrateToBinds == _undefined || migrateToBinds == null - ? _instance.migrateToBinds - : (migrateToBinds as Mutation$MigrateToBinds$migrateToBinds), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + migrateToBinds: migrateToBinds == _undefined || migrateToBinds == null + ? _instance.migrateToBinds + : (migrateToBinds as Mutation$MigrateToBinds$migrateToBinds), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds { final local$migrateToBinds = _instance.migrateToBinds; return CopyWith$Mutation$MigrateToBinds$migrateToBinds( @@ -2685,9 +5192,10 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds TRes _res; - call( - {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, - String? $__typename}) => + call({ + Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, + String? $__typename, + }) => _res; CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds => CopyWith$Mutation$MigrateToBinds$migrateToBinds.stub(_res); @@ -2695,165 +5203,191 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'MigrateToBinds'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'MigrateToBindsInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'migrateToBinds'), + type: OperationType.mutation, + name: NameNode(value: 'MigrateToBinds'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MigrateToBindsInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'migrateToBinds'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'job'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), FieldNode( - name: NameNode(value: 'job'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds( Map data) => Mutation$MigrateToBinds.fromJson(data); typedef OnMutationCompleted$Mutation$MigrateToBinds = FutureOr Function( - dynamic, Mutation$MigrateToBinds?); + dynamic, + Mutation$MigrateToBinds?, +); class Options$Mutation$MigrateToBinds extends graphql.MutationOptions { - Options$Mutation$MigrateToBinds( - {String? operationName, - required Variables$Mutation$MigrateToBinds variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$MigrateToBinds? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$MigrateToBinds({ + String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MigrateToBinds? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$MigrateToBinds(data)), - update: update, - onError: onError, - document: documentNodeMutationMigrateToBinds, - parserFn: _parserFn$Mutation$MigrateToBinds); + : _parserFn$Mutation$MigrateToBinds(data), + ), + update: update, + onError: onError, + document: documentNodeMutationMigrateToBinds, + parserFn: _parserFn$Mutation$MigrateToBinds, + ); final OnMutationCompleted$Mutation$MigrateToBinds? onCompletedWithParsed; @@ -2862,38 +5396,39 @@ class Options$Mutation$MigrateToBinds ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$MigrateToBinds extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MigrateToBinds( - {String? operationName, - required Variables$Mutation$MigrateToBinds variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationMigrateToBinds, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MigrateToBinds); + WatchOptions$Mutation$MigrateToBinds({ + String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMigrateToBinds, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MigrateToBinds, + ); } extension ClientExtension$Mutation$MigrateToBinds on graphql.GraphQLClient { @@ -2905,20 +5440,34 @@ extension ClientExtension$Mutation$MigrateToBinds on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$MigrateToBinds$migrateToBinds - implements Fragment$basicMutationReturnFields { - Mutation$MigrateToBinds$migrateToBinds( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.job}); + implements Fragment$basicMutationReturnFields$$GenericJobButationReturn { + Mutation$MigrateToBinds$migrateToBinds({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job, + }); - @override factory Mutation$MigrateToBinds$migrateToBinds.fromJson( - Map json) => - _$Mutation$MigrateToBinds$migrateToBindsFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$job = json['job']; + return Mutation$MigrateToBinds$migrateToBinds( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + job: l$job == null + ? null + : Mutation$MigrateToBinds$migrateToBinds$job.fromJson( + (l$job as Map)), + ); + } final int code; @@ -2926,42 +5475,75 @@ class Mutation$MigrateToBinds$migrateToBinds final bool success; - @JsonKey(name: '__typename') final String $__typename; final Mutation$MigrateToBinds$migrateToBinds$job? job; - Map toJson() => - _$Mutation$MigrateToBinds$migrateToBindsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$job = job; + _resultData['job'] = l$job?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$job = job; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$job, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MigrateToBinds$migrateToBinds) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$job = job; final lOther$job = other.job; - if (l$job != lOther$job) return false; + if (l$job != lOther$job) { + return false; + } return true; } } @@ -2970,32 +5552,37 @@ extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds on Mutation$MigrateToBinds$migrateToBinds { CopyWith$Mutation$MigrateToBinds$migrateToBinds< Mutation$MigrateToBinds$migrateToBinds> - get copyWith => - CopyWith$Mutation$MigrateToBinds$migrateToBinds(this, (i) => i); + get copyWith => CopyWith$Mutation$MigrateToBinds$migrateToBinds( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds { factory CopyWith$Mutation$MigrateToBinds$migrateToBinds( - Mutation$MigrateToBinds$migrateToBinds instance, - TRes Function(Mutation$MigrateToBinds$migrateToBinds) then) = - _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds; + Mutation$MigrateToBinds$migrateToBinds instance, + TRes Function(Mutation$MigrateToBinds$migrateToBinds) then, + ) = _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds; factory CopyWith$Mutation$MigrateToBinds$migrateToBinds.stub(TRes res) = _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MigrateToBinds$migrateToBinds$job? job}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MigrateToBinds$migrateToBinds$job? job, + }); CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job; } class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds implements CopyWith$Mutation$MigrateToBinds$migrateToBinds { _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$MigrateToBinds$migrateToBinds _instance; @@ -3003,28 +5590,29 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? job = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? job = _undefined, + }) => _then(Mutation$MigrateToBinds$migrateToBinds( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - job: job == _undefined - ? _instance.job - : (job as Mutation$MigrateToBinds$migrateToBinds$job?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Mutation$MigrateToBinds$migrateToBinds$job?), + )); CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job { final local$job = _instance.job; return local$job == null @@ -3041,47 +5629,70 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MigrateToBinds$migrateToBinds$job? job}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MigrateToBinds$migrateToBinds$job? job, + }) => _res; CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job => CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(_res); } -@JsonSerializable(explicitToJson: true) class Mutation$MigrateToBinds$migrateToBinds$job { - Mutation$MigrateToBinds$migrateToBinds$job( - {required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - required this.$__typename}); + Mutation$MigrateToBinds$migrateToBinds$job({ + required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename, + }); - @override factory Mutation$MigrateToBinds$migrateToBinds$job.fromJson( - Map json) => - _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson(json); + Map json) { + final l$createdAt = json['createdAt']; + final l$description = json['description']; + final l$error = json['error']; + final l$finishedAt = json['finishedAt']; + final l$name = json['name']; + final l$progress = json['progress']; + final l$result = json['result']; + final l$status = json['status']; + final l$statusText = json['statusText']; + final l$uid = json['uid']; + final l$updatedAt = json['updatedAt']; + final l$$__typename = json['__typename']; + return Mutation$MigrateToBinds$migrateToBinds$job( + createdAt: dateTimeFromJson(l$createdAt), + description: (l$description as String), + error: (l$error as String?), + finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), + name: (l$name as String), + progress: (l$progress as int?), + result: (l$result as String?), + status: (l$status as String), + statusText: (l$statusText as String?), + uid: (l$uid as String), + updatedAt: dateTimeFromJson(l$updatedAt), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime createdAt; final String description; final String? error; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? finishedAt; final String name; @@ -3096,14 +5707,41 @@ class Mutation$MigrateToBinds$migrateToBinds$job { final String uid; - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime updatedAt; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$MigrateToBinds$migrateToBinds$jobToJson(this); + Map toJson() { + final _resultData = {}; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$description = description; + _resultData['description'] = l$description; + final l$error = error; + _resultData['error'] = l$error; + final l$finishedAt = finishedAt; + _resultData['finishedAt'] = + l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); + final l$name = name; + _resultData['name'] = l$name; + final l$progress = progress; + _resultData['progress'] = l$progress; + final l$result = result; + _resultData['result'] = l$result; + final l$status = status; + _resultData['status'] = l$status; + final l$statusText = statusText; + _resultData['statusText'] = l$statusText; + final l$uid = uid; + _resultData['uid'] = l$uid; + final l$updatedAt = updatedAt; + _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createdAt = createdAt; final l$description = description; @@ -3129,51 +5767,79 @@ class Mutation$MigrateToBinds$migrateToBinds$job { l$statusText, l$uid, l$updatedAt, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MigrateToBinds$migrateToBinds$job) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$createdAt = createdAt; final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) return false; + if (l$createdAt != lOther$createdAt) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$error = error; final lOther$error = other.error; - if (l$error != lOther$error) return false; + if (l$error != lOther$error) { + return false; + } final l$finishedAt = finishedAt; final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) return false; + if (l$finishedAt != lOther$finishedAt) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$progress = progress; final lOther$progress = other.progress; - if (l$progress != lOther$progress) return false; + if (l$progress != lOther$progress) { + return false; + } final l$result = result; final lOther$result = other.result; - if (l$result != lOther$result) return false; + if (l$result != lOther$result) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$statusText = statusText; final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) return false; + if (l$statusText != lOther$statusText) { + return false; + } final l$uid = uid; final lOther$uid = other.uid; - if (l$uid != lOther$uid) return false; + if (l$uid != lOther$uid) { + return false; + } final l$updatedAt = updatedAt; final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) return false; + if (l$updatedAt != lOther$updatedAt) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3182,38 +5848,43 @@ extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds$job on Mutation$MigrateToBinds$migrateToBinds$job { CopyWith$Mutation$MigrateToBinds$migrateToBinds$job< Mutation$MigrateToBinds$migrateToBinds$job> - get copyWith => - CopyWith$Mutation$MigrateToBinds$migrateToBinds$job(this, (i) => i); + get copyWith => CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( - Mutation$MigrateToBinds$migrateToBinds$job instance, - TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) then) = - _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job; + Mutation$MigrateToBinds$migrateToBinds$job instance, + TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) then, + ) = _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job; factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(TRes res) = _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job; - TRes call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}); + TRes call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }); } class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$MigrateToBinds$migrateToBinds$job _instance; @@ -3221,51 +5892,51 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job static const _undefined = {}; - TRes call( - {Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MigrateToBinds$migrateToBinds$job( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null - ? _instance.uid - : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job @@ -3274,23 +5945,19 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job TRes _res; - call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}) => + call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }) => _res; } - -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart deleted file mode 100644 index c1ab4fba..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart +++ /dev/null @@ -1,376 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'disk_volumes.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes _$Query$GetServerDiskVolumesFromJson( - Map json) => - Query$GetServerDiskVolumes( - storage: Query$GetServerDiskVolumes$storage.fromJson( - json['storage'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumesToJson( - Query$GetServerDiskVolumes instance) => - { - 'storage': instance.storage.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage _$Query$GetServerDiskVolumes$storageFromJson( - Map json) => - Query$GetServerDiskVolumes$storage( - volumes: (json['volumes'] as List) - .map((e) => Query$GetServerDiskVolumes$storage$volumes.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumes$storageToJson( - Query$GetServerDiskVolumes$storage instance) => - { - 'volumes': instance.volumes.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage$volumes - _$Query$GetServerDiskVolumes$storage$volumesFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes( - freeSpace: json['freeSpace'] as String, - model: json['model'] as String?, - name: json['name'] as String, - root: json['root'] as bool, - serial: json['serial'] as String?, - totalSpace: json['totalSpace'] as String, - type: json['type'] as String, - usages: (json['usages'] as List) - .map((e) => - Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( - e as Map)) - .toList(), - usedSpace: json['usedSpace'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumes$storage$volumesToJson( - Query$GetServerDiskVolumes$storage$volumes instance) => - { - 'freeSpace': instance.freeSpace, - 'model': instance.model, - 'name': instance.name, - 'root': instance.root, - 'serial': instance.serial, - 'totalSpace': instance.totalSpace, - 'type': instance.type, - 'usages': instance.usages.map((e) => e.toJson()).toList(), - 'usedSpace': instance.usedSpace, - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage$volumes$usages - _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes$usages( - title: json['title'] as String, - usedSpace: json['usedSpace'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson( - Query$GetServerDiskVolumes$storage$volumes$usages instance) => - { - 'title': instance.title, - 'usedSpace': instance.usedSpace, - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - title: json['title'] as String, - usedSpace: json['usedSpace'] as String, - $__typename: json['__typename'] as String, - service: json['service'] == null - ? null - : Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - .fromJson(json['service'] as Map), - ); - -Map - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage - instance) => - { - 'title': instance.title, - 'usedSpace': instance.usedSpace, - '__typename': instance.$__typename, - 'service': instance.service?.toJson(), - }; - -Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - id: json['id'] as String, - isMovable: json['isMovable'] as bool, - displayName: json['displayName'] as String, - $__typename: json['__typename'] as String, - ); - -Map - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - instance) => - { - 'id': instance.id, - 'isMovable': instance.isMovable, - 'displayName': instance.displayName, - '__typename': instance.$__typename, - }; - -Variables$Mutation$MountVolume _$Variables$Mutation$MountVolumeFromJson( - Map json) => - Variables$Mutation$MountVolume( - name: json['name'] as String, - ); - -Map _$Variables$Mutation$MountVolumeToJson( - Variables$Mutation$MountVolume instance) => - { - 'name': instance.name, - }; - -Mutation$MountVolume _$Mutation$MountVolumeFromJson( - Map json) => - Mutation$MountVolume( - mountVolume: Mutation$MountVolume$mountVolume.fromJson( - json['mountVolume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MountVolumeToJson( - Mutation$MountVolume instance) => - { - 'mountVolume': instance.mountVolume.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$MountVolume$mountVolume _$Mutation$MountVolume$mountVolumeFromJson( - Map json) => - Mutation$MountVolume$mountVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MountVolume$mountVolumeToJson( - Mutation$MountVolume$mountVolume instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$ResizeVolume _$Variables$Mutation$ResizeVolumeFromJson( - Map json) => - Variables$Mutation$ResizeVolume( - name: json['name'] as String, - ); - -Map _$Variables$Mutation$ResizeVolumeToJson( - Variables$Mutation$ResizeVolume instance) => - { - 'name': instance.name, - }; - -Mutation$ResizeVolume _$Mutation$ResizeVolumeFromJson( - Map json) => - Mutation$ResizeVolume( - resizeVolume: Mutation$ResizeVolume$resizeVolume.fromJson( - json['resizeVolume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ResizeVolumeToJson( - Mutation$ResizeVolume instance) => - { - 'resizeVolume': instance.resizeVolume.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$ResizeVolume$resizeVolume _$Mutation$ResizeVolume$resizeVolumeFromJson( - Map json) => - Mutation$ResizeVolume$resizeVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ResizeVolume$resizeVolumeToJson( - Mutation$ResizeVolume$resizeVolume instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$UnmountVolume _$Variables$Mutation$UnmountVolumeFromJson( - Map json) => - Variables$Mutation$UnmountVolume( - name: json['name'] as String, - ); - -Map _$Variables$Mutation$UnmountVolumeToJson( - Variables$Mutation$UnmountVolume instance) => - { - 'name': instance.name, - }; - -Mutation$UnmountVolume _$Mutation$UnmountVolumeFromJson( - Map json) => - Mutation$UnmountVolume( - unmountVolume: Mutation$UnmountVolume$unmountVolume.fromJson( - json['unmountVolume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UnmountVolumeToJson( - Mutation$UnmountVolume instance) => - { - 'unmountVolume': instance.unmountVolume.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$UnmountVolume$unmountVolume - _$Mutation$UnmountVolume$unmountVolumeFromJson(Map json) => - Mutation$UnmountVolume$unmountVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UnmountVolume$unmountVolumeToJson( - Mutation$UnmountVolume$unmountVolume instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$MigrateToBinds _$Variables$Mutation$MigrateToBindsFromJson( - Map json) => - Variables$Mutation$MigrateToBinds( - input: Input$MigrateToBindsInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$MigrateToBindsToJson( - Variables$Mutation$MigrateToBinds instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$MigrateToBinds _$Mutation$MigrateToBindsFromJson( - Map json) => - Mutation$MigrateToBinds( - migrateToBinds: Mutation$MigrateToBinds$migrateToBinds.fromJson( - json['migrateToBinds'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MigrateToBindsToJson( - Mutation$MigrateToBinds instance) => - { - 'migrateToBinds': instance.migrateToBinds.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$MigrateToBinds$migrateToBinds - _$Mutation$MigrateToBinds$migrateToBindsFromJson( - Map json) => - Mutation$MigrateToBinds$migrateToBinds( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - job: json['job'] == null - ? null - : Mutation$MigrateToBinds$migrateToBinds$job.fromJson( - json['job'] as Map), - ); - -Map _$Mutation$MigrateToBinds$migrateToBindsToJson( - Mutation$MigrateToBinds$migrateToBinds instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'job': instance.job?.toJson(), - }; - -Mutation$MigrateToBinds$migrateToBinds$job - _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson( - Map json) => - Mutation$MigrateToBinds$migrateToBinds$job( - createdAt: dateTimeFromJson(json['createdAt']), - description: json['description'] as String, - error: json['error'] as String?, - finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), - name: json['name'] as String, - progress: json['progress'] as int?, - result: json['result'] as String?, - status: json['status'] as String, - statusText: json['statusText'] as String?, - uid: json['uid'] as String, - updatedAt: dateTimeFromJson(json['updatedAt']), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MigrateToBinds$migrateToBinds$jobToJson( - Mutation$MigrateToBinds$migrateToBinds$job instance) => - { - 'createdAt': dateTimeToJson(instance.createdAt), - 'description': instance.description, - 'error': instance.error, - 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), - 'name': instance.name, - 'progress': instance.progress, - 'result': instance.result, - 'status': instance.status, - 'statusText': instance.statusText, - 'uid': instance.uid, - 'updatedAt': dateTimeToJson(instance.updatedAt), - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 305ca781..a8318d9f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1,61 +1,116 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; -part 'schema.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Input$AutoUpgradeSettingsInput { - Input$AutoUpgradeSettingsInput({this.enableAutoUpgrade, this.allowReboot}); + factory Input$AutoUpgradeSettingsInput({ + bool? enableAutoUpgrade, + bool? allowReboot, + }) => + Input$AutoUpgradeSettingsInput._({ + if (enableAutoUpgrade != null) r'enableAutoUpgrade': enableAutoUpgrade, + if (allowReboot != null) r'allowReboot': allowReboot, + }); - @override - factory Input$AutoUpgradeSettingsInput.fromJson(Map json) => - _$Input$AutoUpgradeSettingsInputFromJson(json); + Input$AutoUpgradeSettingsInput._(this._$data); - final bool? enableAutoUpgrade; - - final bool? allowReboot; - - Map toJson() => _$Input$AutoUpgradeSettingsInputToJson(this); - int get hashCode { - final l$enableAutoUpgrade = enableAutoUpgrade; - final l$allowReboot = allowReboot; - return Object.hashAll([l$enableAutoUpgrade, l$allowReboot]); + factory Input$AutoUpgradeSettingsInput.fromJson(Map data) { + final result$data = {}; + if (data.containsKey('enableAutoUpgrade')) { + final l$enableAutoUpgrade = data['enableAutoUpgrade']; + result$data['enableAutoUpgrade'] = (l$enableAutoUpgrade as bool?); + } + if (data.containsKey('allowReboot')) { + final l$allowReboot = data['allowReboot']; + result$data['allowReboot'] = (l$allowReboot as bool?); + } + return Input$AutoUpgradeSettingsInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$AutoUpgradeSettingsInput) || - runtimeType != other.runtimeType) return false; - final l$enableAutoUpgrade = enableAutoUpgrade; - final lOther$enableAutoUpgrade = other.enableAutoUpgrade; - if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; - final l$allowReboot = allowReboot; - final lOther$allowReboot = other.allowReboot; - if (l$allowReboot != lOther$allowReboot) return false; - return true; + Map _$data; + + bool? get enableAutoUpgrade => (_$data['enableAutoUpgrade'] as bool?); + bool? get allowReboot => (_$data['allowReboot'] as bool?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('enableAutoUpgrade')) { + final l$enableAutoUpgrade = enableAutoUpgrade; + result$data['enableAutoUpgrade'] = l$enableAutoUpgrade; + } + if (_$data.containsKey('allowReboot')) { + final l$allowReboot = allowReboot; + result$data['allowReboot'] = l$allowReboot; + } + return result$data; } CopyWith$Input$AutoUpgradeSettingsInput - get copyWith => CopyWith$Input$AutoUpgradeSettingsInput(this, (i) => i); + get copyWith => CopyWith$Input$AutoUpgradeSettingsInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$AutoUpgradeSettingsInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$enableAutoUpgrade = enableAutoUpgrade; + final lOther$enableAutoUpgrade = other.enableAutoUpgrade; + if (_$data.containsKey('enableAutoUpgrade') != + other._$data.containsKey('enableAutoUpgrade')) { + return false; + } + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) { + return false; + } + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (_$data.containsKey('allowReboot') != + other._$data.containsKey('allowReboot')) { + return false; + } + if (l$allowReboot != lOther$allowReboot) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$enableAutoUpgrade = enableAutoUpgrade; + final l$allowReboot = allowReboot; + return Object.hashAll([ + _$data.containsKey('enableAutoUpgrade') ? l$enableAutoUpgrade : const {}, + _$data.containsKey('allowReboot') ? l$allowReboot : const {}, + ]); + } } abstract class CopyWith$Input$AutoUpgradeSettingsInput { factory CopyWith$Input$AutoUpgradeSettingsInput( - Input$AutoUpgradeSettingsInput instance, - TRes Function(Input$AutoUpgradeSettingsInput) then) = - _CopyWithImpl$Input$AutoUpgradeSettingsInput; + Input$AutoUpgradeSettingsInput instance, + TRes Function(Input$AutoUpgradeSettingsInput) then, + ) = _CopyWithImpl$Input$AutoUpgradeSettingsInput; factory CopyWith$Input$AutoUpgradeSettingsInput.stub(TRes res) = _CopyWithStubImpl$Input$AutoUpgradeSettingsInput; - TRes call({bool? enableAutoUpgrade, bool? allowReboot}); + TRes call({ + bool? enableAutoUpgrade, + bool? allowReboot, + }); } class _CopyWithImpl$Input$AutoUpgradeSettingsInput implements CopyWith$Input$AutoUpgradeSettingsInput { - _CopyWithImpl$Input$AutoUpgradeSettingsInput(this._instance, this._then); + _CopyWithImpl$Input$AutoUpgradeSettingsInput( + this._instance, + this._then, + ); final Input$AutoUpgradeSettingsInput _instance; @@ -63,16 +118,16 @@ class _CopyWithImpl$Input$AutoUpgradeSettingsInput static const _undefined = {}; - TRes call( - {Object? enableAutoUpgrade = _undefined, - Object? allowReboot = _undefined}) => - _then(Input$AutoUpgradeSettingsInput( - enableAutoUpgrade: enableAutoUpgrade == _undefined - ? _instance.enableAutoUpgrade - : (enableAutoUpgrade as bool?), - allowReboot: allowReboot == _undefined - ? _instance.allowReboot - : (allowReboot as bool?))); + TRes call({ + Object? enableAutoUpgrade = _undefined, + Object? allowReboot = _undefined, + }) => + _then(Input$AutoUpgradeSettingsInput._({ + ..._instance._$data, + if (enableAutoUpgrade != _undefined) + 'enableAutoUpgrade': (enableAutoUpgrade as bool?), + if (allowReboot != _undefined) 'allowReboot': (allowReboot as bool?), + })); } class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput @@ -81,33 +136,111 @@ class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput TRes _res; - call({bool? enableAutoUpgrade, bool? allowReboot}) => _res; + call({ + bool? enableAutoUpgrade, + bool? allowReboot, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$MigrateToBindsInput { - Input$MigrateToBindsInput( - {required this.emailBlockDevice, - required this.bitwardenBlockDevice, - required this.giteaBlockDevice, - required this.nextcloudBlockDevice, - required this.pleromaBlockDevice}); + factory Input$MigrateToBindsInput({ + required String emailBlockDevice, + required String bitwardenBlockDevice, + required String giteaBlockDevice, + required String nextcloudBlockDevice, + required String pleromaBlockDevice, + }) => + Input$MigrateToBindsInput._({ + r'emailBlockDevice': emailBlockDevice, + r'bitwardenBlockDevice': bitwardenBlockDevice, + r'giteaBlockDevice': giteaBlockDevice, + r'nextcloudBlockDevice': nextcloudBlockDevice, + r'pleromaBlockDevice': pleromaBlockDevice, + }); + + Input$MigrateToBindsInput._(this._$data); + + factory Input$MigrateToBindsInput.fromJson(Map data) { + final result$data = {}; + final l$emailBlockDevice = data['emailBlockDevice']; + result$data['emailBlockDevice'] = (l$emailBlockDevice as String); + final l$bitwardenBlockDevice = data['bitwardenBlockDevice']; + result$data['bitwardenBlockDevice'] = (l$bitwardenBlockDevice as String); + final l$giteaBlockDevice = data['giteaBlockDevice']; + result$data['giteaBlockDevice'] = (l$giteaBlockDevice as String); + final l$nextcloudBlockDevice = data['nextcloudBlockDevice']; + result$data['nextcloudBlockDevice'] = (l$nextcloudBlockDevice as String); + final l$pleromaBlockDevice = data['pleromaBlockDevice']; + result$data['pleromaBlockDevice'] = (l$pleromaBlockDevice as String); + return Input$MigrateToBindsInput._(result$data); + } + + Map _$data; + + String get emailBlockDevice => (_$data['emailBlockDevice'] as String); + String get bitwardenBlockDevice => (_$data['bitwardenBlockDevice'] as String); + String get giteaBlockDevice => (_$data['giteaBlockDevice'] as String); + String get nextcloudBlockDevice => (_$data['nextcloudBlockDevice'] as String); + String get pleromaBlockDevice => (_$data['pleromaBlockDevice'] as String); + Map toJson() { + final result$data = {}; + final l$emailBlockDevice = emailBlockDevice; + result$data['emailBlockDevice'] = l$emailBlockDevice; + final l$bitwardenBlockDevice = bitwardenBlockDevice; + result$data['bitwardenBlockDevice'] = l$bitwardenBlockDevice; + final l$giteaBlockDevice = giteaBlockDevice; + result$data['giteaBlockDevice'] = l$giteaBlockDevice; + final l$nextcloudBlockDevice = nextcloudBlockDevice; + result$data['nextcloudBlockDevice'] = l$nextcloudBlockDevice; + final l$pleromaBlockDevice = pleromaBlockDevice; + result$data['pleromaBlockDevice'] = l$pleromaBlockDevice; + return result$data; + } + + CopyWith$Input$MigrateToBindsInput get copyWith => + CopyWith$Input$MigrateToBindsInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$MigrateToBindsInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$emailBlockDevice = emailBlockDevice; + final lOther$emailBlockDevice = other.emailBlockDevice; + if (l$emailBlockDevice != lOther$emailBlockDevice) { + return false; + } + final l$bitwardenBlockDevice = bitwardenBlockDevice; + final lOther$bitwardenBlockDevice = other.bitwardenBlockDevice; + if (l$bitwardenBlockDevice != lOther$bitwardenBlockDevice) { + return false; + } + final l$giteaBlockDevice = giteaBlockDevice; + final lOther$giteaBlockDevice = other.giteaBlockDevice; + if (l$giteaBlockDevice != lOther$giteaBlockDevice) { + return false; + } + final l$nextcloudBlockDevice = nextcloudBlockDevice; + final lOther$nextcloudBlockDevice = other.nextcloudBlockDevice; + if (l$nextcloudBlockDevice != lOther$nextcloudBlockDevice) { + return false; + } + final l$pleromaBlockDevice = pleromaBlockDevice; + final lOther$pleromaBlockDevice = other.pleromaBlockDevice; + if (l$pleromaBlockDevice != lOther$pleromaBlockDevice) { + return false; + } + return true; + } @override - factory Input$MigrateToBindsInput.fromJson(Map json) => - _$Input$MigrateToBindsInputFromJson(json); - - final String emailBlockDevice; - - final String bitwardenBlockDevice; - - final String giteaBlockDevice; - - final String nextcloudBlockDevice; - - final String pleromaBlockDevice; - - Map toJson() => _$Input$MigrateToBindsInputToJson(this); int get hashCode { final l$emailBlockDevice = emailBlockDevice; final l$bitwardenBlockDevice = bitwardenBlockDevice; @@ -119,56 +252,35 @@ class Input$MigrateToBindsInput { l$bitwardenBlockDevice, l$giteaBlockDevice, l$nextcloudBlockDevice, - l$pleromaBlockDevice + l$pleromaBlockDevice, ]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$MigrateToBindsInput) || - runtimeType != other.runtimeType) return false; - final l$emailBlockDevice = emailBlockDevice; - final lOther$emailBlockDevice = other.emailBlockDevice; - if (l$emailBlockDevice != lOther$emailBlockDevice) return false; - final l$bitwardenBlockDevice = bitwardenBlockDevice; - final lOther$bitwardenBlockDevice = other.bitwardenBlockDevice; - if (l$bitwardenBlockDevice != lOther$bitwardenBlockDevice) return false; - final l$giteaBlockDevice = giteaBlockDevice; - final lOther$giteaBlockDevice = other.giteaBlockDevice; - if (l$giteaBlockDevice != lOther$giteaBlockDevice) return false; - final l$nextcloudBlockDevice = nextcloudBlockDevice; - final lOther$nextcloudBlockDevice = other.nextcloudBlockDevice; - if (l$nextcloudBlockDevice != lOther$nextcloudBlockDevice) return false; - final l$pleromaBlockDevice = pleromaBlockDevice; - final lOther$pleromaBlockDevice = other.pleromaBlockDevice; - if (l$pleromaBlockDevice != lOther$pleromaBlockDevice) return false; - return true; - } - - CopyWith$Input$MigrateToBindsInput get copyWith => - CopyWith$Input$MigrateToBindsInput(this, (i) => i); } abstract class CopyWith$Input$MigrateToBindsInput { - factory CopyWith$Input$MigrateToBindsInput(Input$MigrateToBindsInput instance, - TRes Function(Input$MigrateToBindsInput) then) = - _CopyWithImpl$Input$MigrateToBindsInput; + factory CopyWith$Input$MigrateToBindsInput( + Input$MigrateToBindsInput instance, + TRes Function(Input$MigrateToBindsInput) then, + ) = _CopyWithImpl$Input$MigrateToBindsInput; factory CopyWith$Input$MigrateToBindsInput.stub(TRes res) = _CopyWithStubImpl$Input$MigrateToBindsInput; - TRes call( - {String? emailBlockDevice, - String? bitwardenBlockDevice, - String? giteaBlockDevice, - String? nextcloudBlockDevice, - String? pleromaBlockDevice}); + TRes call({ + String? emailBlockDevice, + String? bitwardenBlockDevice, + String? giteaBlockDevice, + String? nextcloudBlockDevice, + String? pleromaBlockDevice, + }); } class _CopyWithImpl$Input$MigrateToBindsInput implements CopyWith$Input$MigrateToBindsInput { - _CopyWithImpl$Input$MigrateToBindsInput(this._instance, this._then); + _CopyWithImpl$Input$MigrateToBindsInput( + this._instance, + this._then, + ); final Input$MigrateToBindsInput _instance; @@ -176,33 +288,26 @@ class _CopyWithImpl$Input$MigrateToBindsInput static const _undefined = {}; - TRes call( - {Object? emailBlockDevice = _undefined, - Object? bitwardenBlockDevice = _undefined, - Object? giteaBlockDevice = _undefined, - Object? nextcloudBlockDevice = _undefined, - Object? pleromaBlockDevice = _undefined}) => - _then(Input$MigrateToBindsInput( - emailBlockDevice: - emailBlockDevice == _undefined || emailBlockDevice == null - ? _instance.emailBlockDevice - : (emailBlockDevice as String), - bitwardenBlockDevice: - bitwardenBlockDevice == _undefined || bitwardenBlockDevice == null - ? _instance.bitwardenBlockDevice - : (bitwardenBlockDevice as String), - giteaBlockDevice: - giteaBlockDevice == _undefined || giteaBlockDevice == null - ? _instance.giteaBlockDevice - : (giteaBlockDevice as String), - nextcloudBlockDevice: - nextcloudBlockDevice == _undefined || nextcloudBlockDevice == null - ? _instance.nextcloudBlockDevice - : (nextcloudBlockDevice as String), - pleromaBlockDevice: - pleromaBlockDevice == _undefined || pleromaBlockDevice == null - ? _instance.pleromaBlockDevice - : (pleromaBlockDevice as String))); + TRes call({ + Object? emailBlockDevice = _undefined, + Object? bitwardenBlockDevice = _undefined, + Object? giteaBlockDevice = _undefined, + Object? nextcloudBlockDevice = _undefined, + Object? pleromaBlockDevice = _undefined, + }) => + _then(Input$MigrateToBindsInput._({ + ..._instance._$data, + if (emailBlockDevice != _undefined && emailBlockDevice != null) + 'emailBlockDevice': (emailBlockDevice as String), + if (bitwardenBlockDevice != _undefined && bitwardenBlockDevice != null) + 'bitwardenBlockDevice': (bitwardenBlockDevice as String), + if (giteaBlockDevice != _undefined && giteaBlockDevice != null) + 'giteaBlockDevice': (giteaBlockDevice as String), + if (nextcloudBlockDevice != _undefined && nextcloudBlockDevice != null) + 'nextcloudBlockDevice': (nextcloudBlockDevice as String), + if (pleromaBlockDevice != _undefined && pleromaBlockDevice != null) + 'pleromaBlockDevice': (pleromaBlockDevice as String), + })); } class _CopyWithStubImpl$Input$MigrateToBindsInput @@ -211,66 +316,109 @@ class _CopyWithStubImpl$Input$MigrateToBindsInput TRes _res; - call( - {String? emailBlockDevice, - String? bitwardenBlockDevice, - String? giteaBlockDevice, - String? nextcloudBlockDevice, - String? pleromaBlockDevice}) => + call({ + String? emailBlockDevice, + String? bitwardenBlockDevice, + String? giteaBlockDevice, + String? nextcloudBlockDevice, + String? pleromaBlockDevice, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Input$MoveServiceInput { - Input$MoveServiceInput({required this.serviceId, required this.location}); + factory Input$MoveServiceInput({ + required String serviceId, + required String location, + }) => + Input$MoveServiceInput._({ + r'serviceId': serviceId, + r'location': location, + }); - @override - factory Input$MoveServiceInput.fromJson(Map json) => - _$Input$MoveServiceInputFromJson(json); + Input$MoveServiceInput._(this._$data); - final String serviceId; - - final String location; - - Map toJson() => _$Input$MoveServiceInputToJson(this); - int get hashCode { - final l$serviceId = serviceId; - final l$location = location; - return Object.hashAll([l$serviceId, l$location]); + factory Input$MoveServiceInput.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + final l$location = data['location']; + result$data['location'] = (l$location as String); + return Input$MoveServiceInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$MoveServiceInput) || runtimeType != other.runtimeType) - return false; + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + String get location => (_$data['location'] as String); + Map toJson() { + final result$data = {}; final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; + result$data['serviceId'] = l$serviceId; final l$location = location; - final lOther$location = other.location; - if (l$location != lOther$location) return false; - return true; + result$data['location'] = l$location; + return result$data; } CopyWith$Input$MoveServiceInput get copyWith => - CopyWith$Input$MoveServiceInput(this, (i) => i); + CopyWith$Input$MoveServiceInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$MoveServiceInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + final l$location = location; + final lOther$location = other.location; + if (l$location != lOther$location) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$serviceId = serviceId; + final l$location = location; + return Object.hashAll([ + l$serviceId, + l$location, + ]); + } } abstract class CopyWith$Input$MoveServiceInput { - factory CopyWith$Input$MoveServiceInput(Input$MoveServiceInput instance, - TRes Function(Input$MoveServiceInput) then) = - _CopyWithImpl$Input$MoveServiceInput; + factory CopyWith$Input$MoveServiceInput( + Input$MoveServiceInput instance, + TRes Function(Input$MoveServiceInput) then, + ) = _CopyWithImpl$Input$MoveServiceInput; factory CopyWith$Input$MoveServiceInput.stub(TRes res) = _CopyWithStubImpl$Input$MoveServiceInput; - TRes call({String? serviceId, String? location}); + TRes call({ + String? serviceId, + String? location, + }); } class _CopyWithImpl$Input$MoveServiceInput implements CopyWith$Input$MoveServiceInput { - _CopyWithImpl$Input$MoveServiceInput(this._instance, this._then); + _CopyWithImpl$Input$MoveServiceInput( + this._instance, + this._then, + ); final Input$MoveServiceInput _instance; @@ -278,14 +426,17 @@ class _CopyWithImpl$Input$MoveServiceInput static const _undefined = {}; - TRes call({Object? serviceId = _undefined, Object? location = _undefined}) => - _then(Input$MoveServiceInput( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String), - location: location == _undefined || location == null - ? _instance.location - : (location as String))); + TRes call({ + Object? serviceId = _undefined, + Object? location = _undefined, + }) => + _then(Input$MoveServiceInput._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + if (location != _undefined && location != null) + 'location': (location as String), + })); } class _CopyWithStubImpl$Input$MoveServiceInput @@ -294,63 +445,123 @@ class _CopyWithStubImpl$Input$MoveServiceInput TRes _res; - call({String? serviceId, String? location}) => _res; + call({ + String? serviceId, + String? location, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$RecoveryKeyLimitsInput { - Input$RecoveryKeyLimitsInput({this.expirationDate, this.uses}); + factory Input$RecoveryKeyLimitsInput({ + DateTime? expirationDate, + int? uses, + }) => + Input$RecoveryKeyLimitsInput._({ + if (expirationDate != null) r'expirationDate': expirationDate, + if (uses != null) r'uses': uses, + }); - @override - factory Input$RecoveryKeyLimitsInput.fromJson(Map json) => - _$Input$RecoveryKeyLimitsInputFromJson(json); + Input$RecoveryKeyLimitsInput._(this._$data); - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) - final DateTime? expirationDate; - - final int? uses; - - Map toJson() => _$Input$RecoveryKeyLimitsInputToJson(this); - int get hashCode { - final l$expirationDate = expirationDate; - final l$uses = uses; - return Object.hashAll([l$expirationDate, l$uses]); + factory Input$RecoveryKeyLimitsInput.fromJson(Map data) { + final result$data = {}; + if (data.containsKey('expirationDate')) { + final l$expirationDate = data['expirationDate']; + result$data['expirationDate'] = + l$expirationDate == null ? null : dateTimeFromJson(l$expirationDate); + } + if (data.containsKey('uses')) { + final l$uses = data['uses']; + result$data['uses'] = (l$uses as int?); + } + return Input$RecoveryKeyLimitsInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$RecoveryKeyLimitsInput) || - runtimeType != other.runtimeType) return false; - final l$expirationDate = expirationDate; - final lOther$expirationDate = other.expirationDate; - if (l$expirationDate != lOther$expirationDate) return false; - final l$uses = uses; - final lOther$uses = other.uses; - if (l$uses != lOther$uses) return false; - return true; + Map _$data; + + DateTime? get expirationDate => (_$data['expirationDate'] as DateTime?); + int? get uses => (_$data['uses'] as int?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('expirationDate')) { + final l$expirationDate = expirationDate; + result$data['expirationDate'] = + l$expirationDate == null ? null : dateTimeToJson(l$expirationDate); + } + if (_$data.containsKey('uses')) { + final l$uses = uses; + result$data['uses'] = l$uses; + } + return result$data; } CopyWith$Input$RecoveryKeyLimitsInput - get copyWith => CopyWith$Input$RecoveryKeyLimitsInput(this, (i) => i); + get copyWith => CopyWith$Input$RecoveryKeyLimitsInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$RecoveryKeyLimitsInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$expirationDate = expirationDate; + final lOther$expirationDate = other.expirationDate; + if (_$data.containsKey('expirationDate') != + other._$data.containsKey('expirationDate')) { + return false; + } + if (l$expirationDate != lOther$expirationDate) { + return false; + } + final l$uses = uses; + final lOther$uses = other.uses; + if (_$data.containsKey('uses') != other._$data.containsKey('uses')) { + return false; + } + if (l$uses != lOther$uses) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$expirationDate = expirationDate; + final l$uses = uses; + return Object.hashAll([ + _$data.containsKey('expirationDate') ? l$expirationDate : const {}, + _$data.containsKey('uses') ? l$uses : const {}, + ]); + } } abstract class CopyWith$Input$RecoveryKeyLimitsInput { factory CopyWith$Input$RecoveryKeyLimitsInput( - Input$RecoveryKeyLimitsInput instance, - TRes Function(Input$RecoveryKeyLimitsInput) then) = - _CopyWithImpl$Input$RecoveryKeyLimitsInput; + Input$RecoveryKeyLimitsInput instance, + TRes Function(Input$RecoveryKeyLimitsInput) then, + ) = _CopyWithImpl$Input$RecoveryKeyLimitsInput; factory CopyWith$Input$RecoveryKeyLimitsInput.stub(TRes res) = _CopyWithStubImpl$Input$RecoveryKeyLimitsInput; - TRes call({DateTime? expirationDate, int? uses}); + TRes call({ + DateTime? expirationDate, + int? uses, + }); } class _CopyWithImpl$Input$RecoveryKeyLimitsInput implements CopyWith$Input$RecoveryKeyLimitsInput { - _CopyWithImpl$Input$RecoveryKeyLimitsInput(this._instance, this._then); + _CopyWithImpl$Input$RecoveryKeyLimitsInput( + this._instance, + this._then, + ); final Input$RecoveryKeyLimitsInput _instance; @@ -358,12 +569,16 @@ class _CopyWithImpl$Input$RecoveryKeyLimitsInput static const _undefined = {}; - TRes call({Object? expirationDate = _undefined, Object? uses = _undefined}) => - _then(Input$RecoveryKeyLimitsInput( - expirationDate: expirationDate == _undefined - ? _instance.expirationDate - : (expirationDate as DateTime?), - uses: uses == _undefined ? _instance.uses : (uses as int?))); + TRes call({ + Object? expirationDate = _undefined, + Object? uses = _undefined, + }) => + _then(Input$RecoveryKeyLimitsInput._({ + ..._instance._$data, + if (expirationDate != _undefined) + 'expirationDate': (expirationDate as DateTime?), + if (uses != _undefined) 'uses': (uses as int?), + })); } class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput @@ -372,60 +587,106 @@ class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput TRes _res; - call({DateTime? expirationDate, int? uses}) => _res; + call({ + DateTime? expirationDate, + int? uses, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$SshMutationInput { - Input$SshMutationInput({required this.username, required this.sshKey}); + factory Input$SshMutationInput({ + required String username, + required String sshKey, + }) => + Input$SshMutationInput._({ + r'username': username, + r'sshKey': sshKey, + }); - @override - factory Input$SshMutationInput.fromJson(Map json) => - _$Input$SshMutationInputFromJson(json); + Input$SshMutationInput._(this._$data); - final String username; - - final String sshKey; - - Map toJson() => _$Input$SshMutationInputToJson(this); - int get hashCode { - final l$username = username; - final l$sshKey = sshKey; - return Object.hashAll([l$username, l$sshKey]); + factory Input$SshMutationInput.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + final l$sshKey = data['sshKey']; + result$data['sshKey'] = (l$sshKey as String); + return Input$SshMutationInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$SshMutationInput) || runtimeType != other.runtimeType) - return false; + Map _$data; + + String get username => (_$data['username'] as String); + String get sshKey => (_$data['sshKey'] as String); + Map toJson() { + final result$data = {}; final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; + result$data['username'] = l$username; final l$sshKey = sshKey; - final lOther$sshKey = other.sshKey; - if (l$sshKey != lOther$sshKey) return false; - return true; + result$data['sshKey'] = l$sshKey; + return result$data; } CopyWith$Input$SshMutationInput get copyWith => - CopyWith$Input$SshMutationInput(this, (i) => i); + CopyWith$Input$SshMutationInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$SshMutationInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + final l$sshKey = sshKey; + final lOther$sshKey = other.sshKey; + if (l$sshKey != lOther$sshKey) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$username = username; + final l$sshKey = sshKey; + return Object.hashAll([ + l$username, + l$sshKey, + ]); + } } abstract class CopyWith$Input$SshMutationInput { - factory CopyWith$Input$SshMutationInput(Input$SshMutationInput instance, - TRes Function(Input$SshMutationInput) then) = - _CopyWithImpl$Input$SshMutationInput; + factory CopyWith$Input$SshMutationInput( + Input$SshMutationInput instance, + TRes Function(Input$SshMutationInput) then, + ) = _CopyWithImpl$Input$SshMutationInput; factory CopyWith$Input$SshMutationInput.stub(TRes res) = _CopyWithStubImpl$Input$SshMutationInput; - TRes call({String? username, String? sshKey}); + TRes call({ + String? username, + String? sshKey, + }); } class _CopyWithImpl$Input$SshMutationInput implements CopyWith$Input$SshMutationInput { - _CopyWithImpl$Input$SshMutationInput(this._instance, this._then); + _CopyWithImpl$Input$SshMutationInput( + this._instance, + this._then, + ); final Input$SshMutationInput _instance; @@ -433,14 +694,17 @@ class _CopyWithImpl$Input$SshMutationInput static const _undefined = {}; - TRes call({Object? username = _undefined, Object? sshKey = _undefined}) => - _then(Input$SshMutationInput( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - sshKey: sshKey == _undefined || sshKey == null - ? _instance.sshKey - : (sshKey as String))); + TRes call({ + Object? username = _undefined, + Object? sshKey = _undefined, + }) => + _then(Input$SshMutationInput._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + if (sshKey != _undefined && sshKey != null) + 'sshKey': (sshKey as String), + })); } class _CopyWithStubImpl$Input$SshMutationInput @@ -449,61 +713,106 @@ class _CopyWithStubImpl$Input$SshMutationInput TRes _res; - call({String? username, String? sshKey}) => _res; + call({ + String? username, + String? sshKey, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$UseNewDeviceKeyInput { - Input$UseNewDeviceKeyInput({required this.key, required this.deviceName}); + factory Input$UseNewDeviceKeyInput({ + required String key, + required String deviceName, + }) => + Input$UseNewDeviceKeyInput._({ + r'key': key, + r'deviceName': deviceName, + }); - @override - factory Input$UseNewDeviceKeyInput.fromJson(Map json) => - _$Input$UseNewDeviceKeyInputFromJson(json); + Input$UseNewDeviceKeyInput._(this._$data); - final String key; - - final String deviceName; - - Map toJson() => _$Input$UseNewDeviceKeyInputToJson(this); - int get hashCode { - final l$key = key; - final l$deviceName = deviceName; - return Object.hashAll([l$key, l$deviceName]); + factory Input$UseNewDeviceKeyInput.fromJson(Map data) { + final result$data = {}; + final l$key = data['key']; + result$data['key'] = (l$key as String); + final l$deviceName = data['deviceName']; + result$data['deviceName'] = (l$deviceName as String); + return Input$UseNewDeviceKeyInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$UseNewDeviceKeyInput) || - runtimeType != other.runtimeType) return false; + Map _$data; + + String get key => (_$data['key'] as String); + String get deviceName => (_$data['deviceName'] as String); + Map toJson() { + final result$data = {}; final l$key = key; - final lOther$key = other.key; - if (l$key != lOther$key) return false; + result$data['key'] = l$key; final l$deviceName = deviceName; - final lOther$deviceName = other.deviceName; - if (l$deviceName != lOther$deviceName) return false; - return true; + result$data['deviceName'] = l$deviceName; + return result$data; } CopyWith$Input$UseNewDeviceKeyInput - get copyWith => CopyWith$Input$UseNewDeviceKeyInput(this, (i) => i); + get copyWith => CopyWith$Input$UseNewDeviceKeyInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$UseNewDeviceKeyInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) { + return false; + } + final l$deviceName = deviceName; + final lOther$deviceName = other.deviceName; + if (l$deviceName != lOther$deviceName) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$key = key; + final l$deviceName = deviceName; + return Object.hashAll([ + l$key, + l$deviceName, + ]); + } } abstract class CopyWith$Input$UseNewDeviceKeyInput { factory CopyWith$Input$UseNewDeviceKeyInput( - Input$UseNewDeviceKeyInput instance, - TRes Function(Input$UseNewDeviceKeyInput) then) = - _CopyWithImpl$Input$UseNewDeviceKeyInput; + Input$UseNewDeviceKeyInput instance, + TRes Function(Input$UseNewDeviceKeyInput) then, + ) = _CopyWithImpl$Input$UseNewDeviceKeyInput; factory CopyWith$Input$UseNewDeviceKeyInput.stub(TRes res) = _CopyWithStubImpl$Input$UseNewDeviceKeyInput; - TRes call({String? key, String? deviceName}); + TRes call({ + String? key, + String? deviceName, + }); } class _CopyWithImpl$Input$UseNewDeviceKeyInput implements CopyWith$Input$UseNewDeviceKeyInput { - _CopyWithImpl$Input$UseNewDeviceKeyInput(this._instance, this._then); + _CopyWithImpl$Input$UseNewDeviceKeyInput( + this._instance, + this._then, + ); final Input$UseNewDeviceKeyInput _instance; @@ -511,14 +820,16 @@ class _CopyWithImpl$Input$UseNewDeviceKeyInput static const _undefined = {}; - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseNewDeviceKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); + TRes call({ + Object? key = _undefined, + Object? deviceName = _undefined, + }) => + _then(Input$UseNewDeviceKeyInput._({ + ..._instance._$data, + if (key != _undefined && key != null) 'key': (key as String), + if (deviceName != _undefined && deviceName != null) + 'deviceName': (deviceName as String), + })); } class _CopyWithStubImpl$Input$UseNewDeviceKeyInput @@ -527,60 +838,106 @@ class _CopyWithStubImpl$Input$UseNewDeviceKeyInput TRes _res; - call({String? key, String? deviceName}) => _res; + call({ + String? key, + String? deviceName, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$UseRecoveryKeyInput { - Input$UseRecoveryKeyInput({required this.key, required this.deviceName}); + factory Input$UseRecoveryKeyInput({ + required String key, + required String deviceName, + }) => + Input$UseRecoveryKeyInput._({ + r'key': key, + r'deviceName': deviceName, + }); - @override - factory Input$UseRecoveryKeyInput.fromJson(Map json) => - _$Input$UseRecoveryKeyInputFromJson(json); + Input$UseRecoveryKeyInput._(this._$data); - final String key; - - final String deviceName; - - Map toJson() => _$Input$UseRecoveryKeyInputToJson(this); - int get hashCode { - final l$key = key; - final l$deviceName = deviceName; - return Object.hashAll([l$key, l$deviceName]); + factory Input$UseRecoveryKeyInput.fromJson(Map data) { + final result$data = {}; + final l$key = data['key']; + result$data['key'] = (l$key as String); + final l$deviceName = data['deviceName']; + result$data['deviceName'] = (l$deviceName as String); + return Input$UseRecoveryKeyInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$UseRecoveryKeyInput) || - runtimeType != other.runtimeType) return false; + Map _$data; + + String get key => (_$data['key'] as String); + String get deviceName => (_$data['deviceName'] as String); + Map toJson() { + final result$data = {}; final l$key = key; - final lOther$key = other.key; - if (l$key != lOther$key) return false; + result$data['key'] = l$key; final l$deviceName = deviceName; - final lOther$deviceName = other.deviceName; - if (l$deviceName != lOther$deviceName) return false; - return true; + result$data['deviceName'] = l$deviceName; + return result$data; } CopyWith$Input$UseRecoveryKeyInput get copyWith => - CopyWith$Input$UseRecoveryKeyInput(this, (i) => i); + CopyWith$Input$UseRecoveryKeyInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$UseRecoveryKeyInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) { + return false; + } + final l$deviceName = deviceName; + final lOther$deviceName = other.deviceName; + if (l$deviceName != lOther$deviceName) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$key = key; + final l$deviceName = deviceName; + return Object.hashAll([ + l$key, + l$deviceName, + ]); + } } abstract class CopyWith$Input$UseRecoveryKeyInput { - factory CopyWith$Input$UseRecoveryKeyInput(Input$UseRecoveryKeyInput instance, - TRes Function(Input$UseRecoveryKeyInput) then) = - _CopyWithImpl$Input$UseRecoveryKeyInput; + factory CopyWith$Input$UseRecoveryKeyInput( + Input$UseRecoveryKeyInput instance, + TRes Function(Input$UseRecoveryKeyInput) then, + ) = _CopyWithImpl$Input$UseRecoveryKeyInput; factory CopyWith$Input$UseRecoveryKeyInput.stub(TRes res) = _CopyWithStubImpl$Input$UseRecoveryKeyInput; - TRes call({String? key, String? deviceName}); + TRes call({ + String? key, + String? deviceName, + }); } class _CopyWithImpl$Input$UseRecoveryKeyInput implements CopyWith$Input$UseRecoveryKeyInput { - _CopyWithImpl$Input$UseRecoveryKeyInput(this._instance, this._then); + _CopyWithImpl$Input$UseRecoveryKeyInput( + this._instance, + this._then, + ); final Input$UseRecoveryKeyInput _instance; @@ -588,14 +945,16 @@ class _CopyWithImpl$Input$UseRecoveryKeyInput static const _undefined = {}; - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseRecoveryKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); + TRes call({ + Object? key = _undefined, + Object? deviceName = _undefined, + }) => + _then(Input$UseRecoveryKeyInput._({ + ..._instance._$data, + if (key != _undefined && key != null) 'key': (key as String), + if (deviceName != _undefined && deviceName != null) + 'deviceName': (deviceName as String), + })); } class _CopyWithStubImpl$Input$UseRecoveryKeyInput @@ -604,60 +963,106 @@ class _CopyWithStubImpl$Input$UseRecoveryKeyInput TRes _res; - call({String? key, String? deviceName}) => _res; + call({ + String? key, + String? deviceName, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$UserMutationInput { - Input$UserMutationInput({required this.username, required this.password}); + factory Input$UserMutationInput({ + required String username, + required String password, + }) => + Input$UserMutationInput._({ + r'username': username, + r'password': password, + }); - @override - factory Input$UserMutationInput.fromJson(Map json) => - _$Input$UserMutationInputFromJson(json); + Input$UserMutationInput._(this._$data); - final String username; - - final String password; - - Map toJson() => _$Input$UserMutationInputToJson(this); - int get hashCode { - final l$username = username; - final l$password = password; - return Object.hashAll([l$username, l$password]); + factory Input$UserMutationInput.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + final l$password = data['password']; + result$data['password'] = (l$password as String); + return Input$UserMutationInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$UserMutationInput) || runtimeType != other.runtimeType) - return false; + Map _$data; + + String get username => (_$data['username'] as String); + String get password => (_$data['password'] as String); + Map toJson() { + final result$data = {}; final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; + result$data['username'] = l$username; final l$password = password; - final lOther$password = other.password; - if (l$password != lOther$password) return false; - return true; + result$data['password'] = l$password; + return result$data; } CopyWith$Input$UserMutationInput get copyWith => - CopyWith$Input$UserMutationInput(this, (i) => i); + CopyWith$Input$UserMutationInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$UserMutationInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + final l$password = password; + final lOther$password = other.password; + if (l$password != lOther$password) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$username = username; + final l$password = password; + return Object.hashAll([ + l$username, + l$password, + ]); + } } abstract class CopyWith$Input$UserMutationInput { - factory CopyWith$Input$UserMutationInput(Input$UserMutationInput instance, - TRes Function(Input$UserMutationInput) then) = - _CopyWithImpl$Input$UserMutationInput; + factory CopyWith$Input$UserMutationInput( + Input$UserMutationInput instance, + TRes Function(Input$UserMutationInput) then, + ) = _CopyWithImpl$Input$UserMutationInput; factory CopyWith$Input$UserMutationInput.stub(TRes res) = _CopyWithStubImpl$Input$UserMutationInput; - TRes call({String? username, String? password}); + TRes call({ + String? username, + String? password, + }); } class _CopyWithImpl$Input$UserMutationInput implements CopyWith$Input$UserMutationInput { - _CopyWithImpl$Input$UserMutationInput(this._instance, this._then); + _CopyWithImpl$Input$UserMutationInput( + this._instance, + this._then, + ); final Input$UserMutationInput _instance; @@ -665,14 +1070,17 @@ class _CopyWithImpl$Input$UserMutationInput static const _undefined = {}; - TRes call({Object? username = _undefined, Object? password = _undefined}) => - _then(Input$UserMutationInput( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - password: password == _undefined || password == null - ? _instance.password - : (password as String))); + TRes call({ + Object? username = _undefined, + Object? password = _undefined, + }) => + _then(Input$UserMutationInput._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + if (password != _undefined && password != null) + 'password': (password as String), + })); } class _CopyWithStubImpl$Input$UserMutationInput @@ -681,80 +1089,204 @@ class _CopyWithStubImpl$Input$UserMutationInput TRes _res; - call({String? username, String? password}) => _res; + call({ + String? username, + String? password, + }) => + _res; } -enum Enum$DnsProvider { - @JsonValue('CLOUDFLARE') - CLOUDFLARE, - @JsonValue('DIGITALOCEAN') - DIGITALOCEAN, - $unknown +enum Enum$DnsProvider { CLOUDFLARE, DIGITALOCEAN, $unknown } + +String toJson$Enum$DnsProvider(Enum$DnsProvider e) { + switch (e) { + case Enum$DnsProvider.CLOUDFLARE: + return r'CLOUDFLARE'; + case Enum$DnsProvider.DIGITALOCEAN: + return r'DIGITALOCEAN'; + case Enum$DnsProvider.$unknown: + return r'$unknown'; + } } -enum Enum$ServerProvider { - @JsonValue('HETZNER') - HETZNER, - @JsonValue('DIGITALOCEAN') - DIGITALOCEAN, - $unknown +Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { + switch (value) { + case r'CLOUDFLARE': + return Enum$DnsProvider.CLOUDFLARE; + case r'DIGITALOCEAN': + return Enum$DnsProvider.DIGITALOCEAN; + default: + return Enum$DnsProvider.$unknown; + } +} + +enum Enum$ServerProvider { HETZNER, DIGITALOCEAN, $unknown } + +String toJson$Enum$ServerProvider(Enum$ServerProvider e) { + switch (e) { + case Enum$ServerProvider.HETZNER: + return r'HETZNER'; + case Enum$ServerProvider.DIGITALOCEAN: + return r'DIGITALOCEAN'; + case Enum$ServerProvider.$unknown: + return r'$unknown'; + } +} + +Enum$ServerProvider fromJson$Enum$ServerProvider(String value) { + switch (value) { + case r'HETZNER': + return Enum$ServerProvider.HETZNER; + case r'DIGITALOCEAN': + return Enum$ServerProvider.DIGITALOCEAN; + default: + return Enum$ServerProvider.$unknown; + } } enum Enum$ServiceStatusEnum { - @JsonValue('ACTIVATING') ACTIVATING, - @JsonValue('ACTIVE') ACTIVE, - @JsonValue('DEACTIVATING') DEACTIVATING, - @JsonValue('FAILED') FAILED, - @JsonValue('INACTIVE') INACTIVE, - @JsonValue('OFF') OFF, - @JsonValue('RELOADING') RELOADING, $unknown } -enum Enum$Severity { - @JsonValue('CRITICAL') - CRITICAL, - @JsonValue('ERROR') - ERROR, - @JsonValue('INFO') - INFO, - @JsonValue('SUCCESS') - SUCCESS, - @JsonValue('WARNING') - WARNING, - $unknown +String toJson$Enum$ServiceStatusEnum(Enum$ServiceStatusEnum e) { + switch (e) { + case Enum$ServiceStatusEnum.ACTIVATING: + return r'ACTIVATING'; + case Enum$ServiceStatusEnum.ACTIVE: + return r'ACTIVE'; + case Enum$ServiceStatusEnum.DEACTIVATING: + return r'DEACTIVATING'; + case Enum$ServiceStatusEnum.FAILED: + return r'FAILED'; + case Enum$ServiceStatusEnum.INACTIVE: + return r'INACTIVE'; + case Enum$ServiceStatusEnum.OFF: + return r'OFF'; + case Enum$ServiceStatusEnum.RELOADING: + return r'RELOADING'; + case Enum$ServiceStatusEnum.$unknown: + return r'$unknown'; + } } -enum Enum$UserType { - @JsonValue('NORMAL') - NORMAL, - @JsonValue('PRIMARY') - PRIMARY, - @JsonValue('ROOT') - ROOT, - $unknown +Enum$ServiceStatusEnum fromJson$Enum$ServiceStatusEnum(String value) { + switch (value) { + case r'ACTIVATING': + return Enum$ServiceStatusEnum.ACTIVATING; + case r'ACTIVE': + return Enum$ServiceStatusEnum.ACTIVE; + case r'DEACTIVATING': + return Enum$ServiceStatusEnum.DEACTIVATING; + case r'FAILED': + return Enum$ServiceStatusEnum.FAILED; + case r'INACTIVE': + return Enum$ServiceStatusEnum.INACTIVE; + case r'OFF': + return Enum$ServiceStatusEnum.OFF; + case r'RELOADING': + return Enum$ServiceStatusEnum.RELOADING; + default: + return Enum$ServiceStatusEnum.$unknown; + } +} + +enum Enum$Severity { CRITICAL, ERROR, INFO, SUCCESS, WARNING, $unknown } + +String toJson$Enum$Severity(Enum$Severity e) { + switch (e) { + case Enum$Severity.CRITICAL: + return r'CRITICAL'; + case Enum$Severity.ERROR: + return r'ERROR'; + case Enum$Severity.INFO: + return r'INFO'; + case Enum$Severity.SUCCESS: + return r'SUCCESS'; + case Enum$Severity.WARNING: + return r'WARNING'; + case Enum$Severity.$unknown: + return r'$unknown'; + } +} + +Enum$Severity fromJson$Enum$Severity(String value) { + switch (value) { + case r'CRITICAL': + return Enum$Severity.CRITICAL; + case r'ERROR': + return Enum$Severity.ERROR; + case r'INFO': + return Enum$Severity.INFO; + case r'SUCCESS': + return Enum$Severity.SUCCESS; + case r'WARNING': + return Enum$Severity.WARNING; + default: + return Enum$Severity.$unknown; + } +} + +enum Enum$UserType { NORMAL, PRIMARY, ROOT, $unknown } + +String toJson$Enum$UserType(Enum$UserType e) { + switch (e) { + case Enum$UserType.NORMAL: + return r'NORMAL'; + case Enum$UserType.PRIMARY: + return r'PRIMARY'; + case Enum$UserType.ROOT: + return r'ROOT'; + case Enum$UserType.$unknown: + return r'$unknown'; + } +} + +Enum$UserType fromJson$Enum$UserType(String value) { + switch (value) { + case r'NORMAL': + return Enum$UserType.NORMAL; + case r'PRIMARY': + return Enum$UserType.PRIMARY; + case r'ROOT': + return Enum$UserType.ROOT; + default: + return Enum$UserType.$unknown; + } } -@JsonSerializable(explicitToJson: true) class Fragment$dnsRecordFields { - Fragment$dnsRecordFields( - {required this.content, - required this.name, - this.priority, - required this.recordType, - required this.ttl, - required this.$__typename}); + Fragment$dnsRecordFields({ + required this.content, + required this.name, + this.priority, + required this.recordType, + required this.ttl, + required this.$__typename, + }); - @override - factory Fragment$dnsRecordFields.fromJson(Map json) => - _$Fragment$dnsRecordFieldsFromJson(json); + factory Fragment$dnsRecordFields.fromJson(Map json) { + final l$content = json['content']; + final l$name = json['name']; + final l$priority = json['priority']; + final l$recordType = json['recordType']; + final l$ttl = json['ttl']; + final l$$__typename = json['__typename']; + return Fragment$dnsRecordFields( + content: (l$content as String), + name: (l$name as String), + priority: (l$priority as int?), + recordType: (l$recordType as String), + ttl: (l$ttl as int), + $__typename: (l$$__typename as String), + ); + } final String content; @@ -766,10 +1298,26 @@ class Fragment$dnsRecordFields { final int ttl; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Fragment$dnsRecordFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$content = content; + _resultData['content'] = l$content; + final l$name = name; + _resultData['name'] = l$name; + final l$priority = priority; + _resultData['priority'] = l$priority; + final l$recordType = recordType; + _resultData['recordType'] = l$recordType; + final l$ttl = ttl; + _resultData['ttl'] = l$ttl; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$content = content; final l$name = name; @@ -777,33 +1325,55 @@ class Fragment$dnsRecordFields { final l$recordType = recordType; final l$ttl = ttl; final l$$__typename = $__typename; - return Object.hashAll( - [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); + return Object.hashAll([ + l$content, + l$name, + l$priority, + l$recordType, + l$ttl, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$dnsRecordFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$content = content; final lOther$content = other.content; - if (l$content != lOther$content) return false; + if (l$content != lOther$content) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$priority = priority; final lOther$priority = other.priority; - if (l$priority != lOther$priority) return false; + if (l$priority != lOther$priority) { + return false; + } final l$recordType = recordType; final lOther$recordType = other.recordType; - if (l$recordType != lOther$recordType) return false; + if (l$recordType != lOther$recordType) { + return false; + } final l$ttl = ttl; final lOther$ttl = other.ttl; - if (l$ttl != lOther$ttl) return false; + if (l$ttl != lOther$ttl) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -811,29 +1381,37 @@ class Fragment$dnsRecordFields { extension UtilityExtension$Fragment$dnsRecordFields on Fragment$dnsRecordFields { CopyWith$Fragment$dnsRecordFields get copyWith => - CopyWith$Fragment$dnsRecordFields(this, (i) => i); + CopyWith$Fragment$dnsRecordFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$dnsRecordFields { - factory CopyWith$Fragment$dnsRecordFields(Fragment$dnsRecordFields instance, - TRes Function(Fragment$dnsRecordFields) then) = - _CopyWithImpl$Fragment$dnsRecordFields; + factory CopyWith$Fragment$dnsRecordFields( + Fragment$dnsRecordFields instance, + TRes Function(Fragment$dnsRecordFields) then, + ) = _CopyWithImpl$Fragment$dnsRecordFields; factory CopyWith$Fragment$dnsRecordFields.stub(TRes res) = _CopyWithStubImpl$Fragment$dnsRecordFields; - TRes call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}); + TRes call({ + String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename, + }); } class _CopyWithImpl$Fragment$dnsRecordFields implements CopyWith$Fragment$dnsRecordFields { - _CopyWithImpl$Fragment$dnsRecordFields(this._instance, this._then); + _CopyWithImpl$Fragment$dnsRecordFields( + this._instance, + this._then, + ); final Fragment$dnsRecordFields _instance; @@ -841,29 +1419,31 @@ class _CopyWithImpl$Fragment$dnsRecordFields static const _undefined = {}; - TRes call( - {Object? content = _undefined, - Object? name = _undefined, - Object? priority = _undefined, - Object? recordType = _undefined, - Object? ttl = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? content = _undefined, + Object? name = _undefined, + Object? priority = _undefined, + Object? recordType = _undefined, + Object? ttl = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$dnsRecordFields( - content: content == _undefined || content == null - ? _instance.content - : (content as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - priority: - priority == _undefined ? _instance.priority : (priority as int?), - recordType: recordType == _undefined || recordType == null - ? _instance.recordType - : (recordType as String), - ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + content: content == _undefined || content == null + ? _instance.content + : (content as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + priority: + priority == _undefined ? _instance.priority : (priority as int?), + recordType: recordType == _undefined || recordType == null + ? _instance.recordType + : (recordType as String), + ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$dnsRecordFields @@ -872,86 +1452,105 @@ class _CopyWithStubImpl$Fragment$dnsRecordFields TRes _res; - call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}) => + call({ + String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename, + }) => _res; } const fragmentDefinitiondnsRecordFields = FragmentDefinitionNode( - name: NameNode(value: 'dnsRecordFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'DnsRecord'), isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'content'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'priority'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'recordType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'ttl'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'dnsRecordFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'DnsRecord'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'ttl'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentdnsRecordFields = DocumentNode(definitions: [ fragmentDefinitiondnsRecordFields, ]); extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient { - void writeFragment$dnsRecordFields( - {required Fragment$dnsRecordFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$dnsRecordFields({ + required Fragment$dnsRecordFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'dnsRecordFields', - document: documentNodeFragmentdnsRecordFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$dnsRecordFields? readFragment$dnsRecordFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'dnsRecordFields', - document: documentNodeFragmentdnsRecordFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'dnsRecordFields', + document: documentNodeFragmentdnsRecordFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$dnsRecordFields? readFragment$dnsRecordFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'dnsRecordFields', + document: documentNodeFragmentdnsRecordFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$dnsRecordFields.fromJson(result); } } @@ -966,11 +1565,7 @@ const possibleTypesMap = { 'ServiceJobMutationReturn', 'ServiceMutationReturn', 'TimezoneMutationReturn', - 'UserMutationReturn' + 'UserMutationReturn', }, - 'StorageUsageInterface': {'ServiceStorageUsage'} + 'StorageUsageInterface': {'ServiceStorageUsage'}, }; -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart deleted file mode 100644 index 7d1280c8..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart +++ /dev/null @@ -1,147 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'schema.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Input$AutoUpgradeSettingsInput _$Input$AutoUpgradeSettingsInputFromJson( - Map json) => - Input$AutoUpgradeSettingsInput( - enableAutoUpgrade: json['enableAutoUpgrade'] as bool?, - allowReboot: json['allowReboot'] as bool?, - ); - -Map _$Input$AutoUpgradeSettingsInputToJson( - Input$AutoUpgradeSettingsInput instance) => - { - 'enableAutoUpgrade': instance.enableAutoUpgrade, - 'allowReboot': instance.allowReboot, - }; - -Input$MigrateToBindsInput _$Input$MigrateToBindsInputFromJson( - Map json) => - Input$MigrateToBindsInput( - emailBlockDevice: json['emailBlockDevice'] as String, - bitwardenBlockDevice: json['bitwardenBlockDevice'] as String, - giteaBlockDevice: json['giteaBlockDevice'] as String, - nextcloudBlockDevice: json['nextcloudBlockDevice'] as String, - pleromaBlockDevice: json['pleromaBlockDevice'] as String, - ); - -Map _$Input$MigrateToBindsInputToJson( - Input$MigrateToBindsInput instance) => - { - 'emailBlockDevice': instance.emailBlockDevice, - 'bitwardenBlockDevice': instance.bitwardenBlockDevice, - 'giteaBlockDevice': instance.giteaBlockDevice, - 'nextcloudBlockDevice': instance.nextcloudBlockDevice, - 'pleromaBlockDevice': instance.pleromaBlockDevice, - }; - -Input$MoveServiceInput _$Input$MoveServiceInputFromJson( - Map json) => - Input$MoveServiceInput( - serviceId: json['serviceId'] as String, - location: json['location'] as String, - ); - -Map _$Input$MoveServiceInputToJson( - Input$MoveServiceInput instance) => - { - 'serviceId': instance.serviceId, - 'location': instance.location, - }; - -Input$RecoveryKeyLimitsInput _$Input$RecoveryKeyLimitsInputFromJson( - Map json) => - Input$RecoveryKeyLimitsInput( - expirationDate: _nullable$dateTimeFromJson(json['expirationDate']), - uses: json['uses'] as int?, - ); - -Map _$Input$RecoveryKeyLimitsInputToJson( - Input$RecoveryKeyLimitsInput instance) => - { - 'expirationDate': _nullable$dateTimeToJson(instance.expirationDate), - 'uses': instance.uses, - }; - -Input$SshMutationInput _$Input$SshMutationInputFromJson( - Map json) => - Input$SshMutationInput( - username: json['username'] as String, - sshKey: json['sshKey'] as String, - ); - -Map _$Input$SshMutationInputToJson( - Input$SshMutationInput instance) => - { - 'username': instance.username, - 'sshKey': instance.sshKey, - }; - -Input$UseNewDeviceKeyInput _$Input$UseNewDeviceKeyInputFromJson( - Map json) => - Input$UseNewDeviceKeyInput( - key: json['key'] as String, - deviceName: json['deviceName'] as String, - ); - -Map _$Input$UseNewDeviceKeyInputToJson( - Input$UseNewDeviceKeyInput instance) => - { - 'key': instance.key, - 'deviceName': instance.deviceName, - }; - -Input$UseRecoveryKeyInput _$Input$UseRecoveryKeyInputFromJson( - Map json) => - Input$UseRecoveryKeyInput( - key: json['key'] as String, - deviceName: json['deviceName'] as String, - ); - -Map _$Input$UseRecoveryKeyInputToJson( - Input$UseRecoveryKeyInput instance) => - { - 'key': instance.key, - 'deviceName': instance.deviceName, - }; - -Input$UserMutationInput _$Input$UserMutationInputFromJson( - Map json) => - Input$UserMutationInput( - username: json['username'] as String, - password: json['password'] as String, - ); - -Map _$Input$UserMutationInputToJson( - Input$UserMutationInput instance) => - { - 'username': instance.username, - 'password': instance.password, - }; - -Fragment$dnsRecordFields _$Fragment$dnsRecordFieldsFromJson( - Map json) => - Fragment$dnsRecordFields( - content: json['content'] as String, - name: json['name'] as String, - priority: json['priority'] as int?, - recordType: json['recordType'] as String, - ttl: json['ttl'] as int, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$dnsRecordFieldsToJson( - Fragment$dnsRecordFields instance) => - { - 'content': instance.content, - 'name': instance.name, - 'priority': instance.priority, - 'recordType': instance.recordType, - 'ttl': instance.ttl, - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 16c4a4a6..4eda2c92 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,24 +1,70 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; import 'services.graphql.dart'; -part 'server_api.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -26,36 +72,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -64,25 +138,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -90,24 +174,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -116,43 +201,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -160,88 +256,1751 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$GetApiVersion { - Query$GetApiVersion({required this.api, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$GetApiVersion.fromJson(Map json) => - _$Query$GetApiVersionFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$GetApiVersion$api api; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersionToJson(this); - int get hashCode { - final l$api = api; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$api, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiVersion) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { return false; - final l$api = api; - final lOther$api = other.api; - if (l$api != lOther$api) return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$GetApiVersion { + Query$GetApiVersion({ + required this.api, + required this.$__typename, + }); + + factory Query$GetApiVersion.fromJson(Map json) { + final l$api = json['api']; + final l$$__typename = json['__typename']; + return Query$GetApiVersion( + api: Query$GetApiVersion$api.fromJson((l$api as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$GetApiVersion$api api; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$api = api; + _resultData['api'] = l$api.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$api = api; + final l$$__typename = $__typename; + return Object.hashAll([ + l$api, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiVersion) || runtimeType != other.runtimeType) { + return false; + } + final l$api = api; + final lOther$api = other.api; + if (l$api != lOther$api) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiVersion on Query$GetApiVersion { CopyWith$Query$GetApiVersion get copyWith => - CopyWith$Query$GetApiVersion(this, (i) => i); + CopyWith$Query$GetApiVersion( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiVersion { - factory CopyWith$Query$GetApiVersion(Query$GetApiVersion instance, - TRes Function(Query$GetApiVersion) then) = - _CopyWithImpl$Query$GetApiVersion; + factory CopyWith$Query$GetApiVersion( + Query$GetApiVersion instance, + TRes Function(Query$GetApiVersion) then, + ) = _CopyWithImpl$Query$GetApiVersion; factory CopyWith$Query$GetApiVersion.stub(TRes res) = _CopyWithStubImpl$Query$GetApiVersion; - TRes call({Query$GetApiVersion$api? api, String? $__typename}); + TRes call({ + Query$GetApiVersion$api? api, + String? $__typename, + }); CopyWith$Query$GetApiVersion$api get api; } class _CopyWithImpl$Query$GetApiVersion implements CopyWith$Query$GetApiVersion { - _CopyWithImpl$Query$GetApiVersion(this._instance, this._then); + _CopyWithImpl$Query$GetApiVersion( + this._instance, + this._then, + ); final Query$GetApiVersion _instance; @@ -249,14 +2008,18 @@ class _CopyWithImpl$Query$GetApiVersion static const _undefined = {}; - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? api = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiVersion( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiVersion$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiVersion$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetApiVersion$api get api { final local$api = _instance.api; return CopyWith$Query$GetApiVersion$api(local$api, (e) => call(api: e)); @@ -269,103 +2032,116 @@ class _CopyWithStubImpl$Query$GetApiVersion TRes _res; - call({Query$GetApiVersion$api? api, String? $__typename}) => _res; + call({ + Query$GetApiVersion$api? api, + String? $__typename, + }) => + _res; CopyWith$Query$GetApiVersion$api get api => CopyWith$Query$GetApiVersion$api.stub(_res); } const documentNodeQueryGetApiVersion = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetApiVersion'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'api'), + type: OperationType.query, + name: NameNode(value: 'GetApiVersion'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'version'), alias: null, arguments: [], directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'version'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetApiVersion _parserFn$Query$GetApiVersion(Map data) => Query$GetApiVersion.fromJson(data); class Options$Query$GetApiVersion extends graphql.QueryOptions { - Options$Query$GetApiVersion( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetApiVersion, - parserFn: _parserFn$Query$GetApiVersion); + Options$Query$GetApiVersion({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiVersion, + parserFn: _parserFn$Query$GetApiVersion, + ); } class WatchOptions$Query$GetApiVersion extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiVersion( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetApiVersion, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiVersion); + WatchOptions$Query$GetApiVersion({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiVersion, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiVersion, + ); } class FetchMoreOptions$Query$GetApiVersion extends graphql.FetchMoreOptions { FetchMoreOptions$Query$GetApiVersion( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, document: documentNodeQueryGetApiVersion); + updateQuery: updateQuery, + document: documentNodeQueryGetApiVersion, + ); } extension ClientExtension$Query$GetApiVersion on graphql.GraphQLClient { @@ -375,78 +2151,118 @@ extension ClientExtension$Query$GetApiVersion on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetApiVersion( [WatchOptions$Query$GetApiVersion? options]) => this.watchQuery(options ?? WatchOptions$Query$GetApiVersion()); - void writeQuery$GetApiVersion( - {required Query$GetApiVersion data, bool broadcast = true}) => + void writeQuery$GetApiVersion({ + required Query$GetApiVersion data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryGetApiVersion)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiVersion? readQuery$GetApiVersion({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryGetApiVersion)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetApiVersion? readQuery$GetApiVersion({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiVersion)), + optimistic: optimistic, + ); return result == null ? null : Query$GetApiVersion.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetApiVersion$api { - Query$GetApiVersion$api({required this.version, required this.$__typename}); + Query$GetApiVersion$api({ + required this.version, + required this.$__typename, + }); - @override - factory Query$GetApiVersion$api.fromJson(Map json) => - _$Query$GetApiVersion$apiFromJson(json); + factory Query$GetApiVersion$api.fromJson(Map json) { + final l$version = json['version']; + final l$$__typename = json['__typename']; + return Query$GetApiVersion$api( + version: (l$version as String), + $__typename: (l$$__typename as String), + ); + } final String version; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersion$apiToJson(this); + Map toJson() { + final _resultData = {}; + final l$version = version; + _resultData['version'] = l$version; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$version = version; final l$$__typename = $__typename; - return Object.hashAll([l$version, l$$__typename]); + return Object.hashAll([ + l$version, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiVersion$api) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiVersion$api) || + runtimeType != other.runtimeType) { return false; + } final l$version = version; final lOther$version = other.version; - if (l$version != lOther$version) return false; + if (l$version != lOther$version) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiVersion$api on Query$GetApiVersion$api { CopyWith$Query$GetApiVersion$api get copyWith => - CopyWith$Query$GetApiVersion$api(this, (i) => i); + CopyWith$Query$GetApiVersion$api( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiVersion$api { - factory CopyWith$Query$GetApiVersion$api(Query$GetApiVersion$api instance, - TRes Function(Query$GetApiVersion$api) then) = - _CopyWithImpl$Query$GetApiVersion$api; + factory CopyWith$Query$GetApiVersion$api( + Query$GetApiVersion$api instance, + TRes Function(Query$GetApiVersion$api) then, + ) = _CopyWithImpl$Query$GetApiVersion$api; factory CopyWith$Query$GetApiVersion$api.stub(TRes res) = _CopyWithStubImpl$Query$GetApiVersion$api; - TRes call({String? version, String? $__typename}); + TRes call({ + String? version, + String? $__typename, + }); } class _CopyWithImpl$Query$GetApiVersion$api implements CopyWith$Query$GetApiVersion$api { - _CopyWithImpl$Query$GetApiVersion$api(this._instance, this._then); + _CopyWithImpl$Query$GetApiVersion$api( + this._instance, + this._then, + ); final Query$GetApiVersion$api _instance; @@ -454,14 +2270,18 @@ class _CopyWithImpl$Query$GetApiVersion$api static const _undefined = {}; - TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? version = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiVersion$api( - version: version == _undefined || version == null - ? _instance.version - : (version as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + version: version == _undefined || version == null + ? _instance.version + : (version as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetApiVersion$api @@ -470,64 +2290,103 @@ class _CopyWithStubImpl$Query$GetApiVersion$api TRes _res; - call({String? version, String? $__typename}) => _res; + call({ + String? version, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiJobs { - Query$GetApiJobs({required this.jobs, required this.$__typename}); + Query$GetApiJobs({ + required this.jobs, + required this.$__typename, + }); - @override - factory Query$GetApiJobs.fromJson(Map json) => - _$Query$GetApiJobsFromJson(json); + factory Query$GetApiJobs.fromJson(Map json) { + final l$jobs = json['jobs']; + final l$$__typename = json['__typename']; + return Query$GetApiJobs( + jobs: Query$GetApiJobs$jobs.fromJson((l$jobs as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$GetApiJobs$jobs jobs; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiJobsToJson(this); + Map toJson() { + final _resultData = {}; + final l$jobs = jobs; + _resultData['jobs'] = l$jobs.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$jobs = jobs; final l$$__typename = $__typename; - return Object.hashAll([l$jobs, l$$__typename]); + return Object.hashAll([ + l$jobs, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiJobs) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiJobs) || runtimeType != other.runtimeType) { return false; + } final l$jobs = jobs; final lOther$jobs = other.jobs; - if (l$jobs != lOther$jobs) return false; + if (l$jobs != lOther$jobs) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiJobs on Query$GetApiJobs { CopyWith$Query$GetApiJobs get copyWith => - CopyWith$Query$GetApiJobs(this, (i) => i); + CopyWith$Query$GetApiJobs( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiJobs { factory CopyWith$Query$GetApiJobs( - Query$GetApiJobs instance, TRes Function(Query$GetApiJobs) then) = - _CopyWithImpl$Query$GetApiJobs; + Query$GetApiJobs instance, + TRes Function(Query$GetApiJobs) then, + ) = _CopyWithImpl$Query$GetApiJobs; factory CopyWith$Query$GetApiJobs.stub(TRes res) = _CopyWithStubImpl$Query$GetApiJobs; - TRes call({Query$GetApiJobs$jobs? jobs, String? $__typename}); + TRes call({ + Query$GetApiJobs$jobs? jobs, + String? $__typename, + }); CopyWith$Query$GetApiJobs$jobs get jobs; } class _CopyWithImpl$Query$GetApiJobs implements CopyWith$Query$GetApiJobs { - _CopyWithImpl$Query$GetApiJobs(this._instance, this._then); + _CopyWithImpl$Query$GetApiJobs( + this._instance, + this._then, + ); final Query$GetApiJobs _instance; @@ -535,14 +2394,18 @@ class _CopyWithImpl$Query$GetApiJobs static const _undefined = {}; - TRes call({Object? jobs = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? jobs = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiJobs( - jobs: jobs == _undefined || jobs == null - ? _instance.jobs - : (jobs as Query$GetApiJobs$jobs), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + jobs: jobs == _undefined || jobs == null + ? _instance.jobs + : (jobs as Query$GetApiJobs$jobs), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetApiJobs$jobs get jobs { final local$jobs = _instance.jobs; return CopyWith$Query$GetApiJobs$jobs(local$jobs, (e) => call(jobs: e)); @@ -555,173 +2418,199 @@ class _CopyWithStubImpl$Query$GetApiJobs TRes _res; - call({Query$GetApiJobs$jobs? jobs, String? $__typename}) => _res; + call({ + Query$GetApiJobs$jobs? jobs, + String? $__typename, + }) => + _res; CopyWith$Query$GetApiJobs$jobs get jobs => CopyWith$Query$GetApiJobs$jobs.stub(_res); } const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetApiJobs'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'jobs'), + type: OperationType.query, + name: NameNode(value: 'GetApiJobs'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'jobs'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getJobs'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'getJobs'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetApiJobs _parserFn$Query$GetApiJobs(Map data) => Query$GetApiJobs.fromJson(data); class Options$Query$GetApiJobs extends graphql.QueryOptions { - Options$Query$GetApiJobs( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetApiJobs, - parserFn: _parserFn$Query$GetApiJobs); + Options$Query$GetApiJobs({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiJobs, + parserFn: _parserFn$Query$GetApiJobs, + ); } class WatchOptions$Query$GetApiJobs extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiJobs( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetApiJobs, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiJobs); + WatchOptions$Query$GetApiJobs({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiJobs, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiJobs, + ); } class FetchMoreOptions$Query$GetApiJobs extends graphql.FetchMoreOptions { FetchMoreOptions$Query$GetApiJobs({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryGetApiJobs); + : super( + updateQuery: updateQuery, + document: documentNodeQueryGetApiJobs, + ); } extension ClientExtension$Query$GetApiJobs on graphql.GraphQLClient { @@ -731,81 +2620,118 @@ extension ClientExtension$Query$GetApiJobs on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetApiJobs( [WatchOptions$Query$GetApiJobs? options]) => this.watchQuery(options ?? WatchOptions$Query$GetApiJobs()); - void writeQuery$GetApiJobs( - {required Query$GetApiJobs data, bool broadcast = true}) => + void writeQuery$GetApiJobs({ + required Query$GetApiJobs data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryGetApiJobs)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiJobs? readQuery$GetApiJobs({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryGetApiJobs)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetApiJobs? readQuery$GetApiJobs({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetApiJobs)), + optimistic: optimistic, + ); return result == null ? null : Query$GetApiJobs.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetApiJobs$jobs { - Query$GetApiJobs$jobs({required this.getJobs, required this.$__typename}); + Query$GetApiJobs$jobs({ + required this.getJobs, + required this.$__typename, + }); - @override - factory Query$GetApiJobs$jobs.fromJson(Map json) => - _$Query$GetApiJobs$jobsFromJson(json); + factory Query$GetApiJobs$jobs.fromJson(Map json) { + final l$getJobs = json['getJobs']; + final l$$__typename = json['__typename']; + return Query$GetApiJobs$jobs( + getJobs: (l$getJobs as List) + .map((e) => Query$GetApiJobs$jobs$getJobs.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List getJobs; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiJobs$jobsToJson(this); + Map toJson() { + final _resultData = {}; + final l$getJobs = getJobs; + _resultData['getJobs'] = l$getJobs.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getJobs = getJobs; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$getJobs.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$getJobs.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiJobs$jobs) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiJobs$jobs) || runtimeType != other.runtimeType) { return false; + } final l$getJobs = getJobs; final lOther$getJobs = other.getJobs; - if (l$getJobs.length != lOther$getJobs.length) return false; + if (l$getJobs.length != lOther$getJobs.length) { + return false; + } for (int i = 0; i < l$getJobs.length; i++) { final l$getJobs$entry = l$getJobs[i]; final lOther$getJobs$entry = lOther$getJobs[i]; - if (l$getJobs$entry != lOther$getJobs$entry) return false; + if (l$getJobs$entry != lOther$getJobs$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiJobs$jobs on Query$GetApiJobs$jobs { CopyWith$Query$GetApiJobs$jobs get copyWith => - CopyWith$Query$GetApiJobs$jobs(this, (i) => i); + CopyWith$Query$GetApiJobs$jobs( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiJobs$jobs { - factory CopyWith$Query$GetApiJobs$jobs(Query$GetApiJobs$jobs instance, - TRes Function(Query$GetApiJobs$jobs) then) = - _CopyWithImpl$Query$GetApiJobs$jobs; + factory CopyWith$Query$GetApiJobs$jobs( + Query$GetApiJobs$jobs instance, + TRes Function(Query$GetApiJobs$jobs) then, + ) = _CopyWithImpl$Query$GetApiJobs$jobs; factory CopyWith$Query$GetApiJobs$jobs.stub(TRes res) = _CopyWithStubImpl$Query$GetApiJobs$jobs; - TRes call( - {List? getJobs, String? $__typename}); + TRes call({ + List? getJobs, + String? $__typename, + }); TRes getJobs( Iterable Function( Iterable< @@ -816,7 +2742,10 @@ abstract class CopyWith$Query$GetApiJobs$jobs { class _CopyWithImpl$Query$GetApiJobs$jobs implements CopyWith$Query$GetApiJobs$jobs { - _CopyWithImpl$Query$GetApiJobs$jobs(this._instance, this._then); + _CopyWithImpl$Query$GetApiJobs$jobs( + this._instance, + this._then, + ); final Query$GetApiJobs$jobs _instance; @@ -824,14 +2753,18 @@ class _CopyWithImpl$Query$GetApiJobs$jobs static const _undefined = {}; - TRes call({Object? getJobs = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? getJobs = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiJobs$jobs( - getJobs: getJobs == _undefined || getJobs == null - ? _instance.getJobs - : (getJobs as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getJobs: getJobs == _undefined || getJobs == null + ? _instance.getJobs + : (getJobs as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes getJobs( Iterable Function( Iterable< @@ -839,9 +2772,11 @@ class _CopyWithImpl$Query$GetApiJobs$jobs Query$GetApiJobs$jobs$getJobs>>) _fn) => call( - getJobs: _fn(_instance.getJobs.map( - (e) => CopyWith$Query$GetApiJobs$jobs$getJobs(e, (i) => i))) - .toList()); + getJobs: _fn(_instance.getJobs + .map((e) => CopyWith$Query$GetApiJobs$jobs$getJobs( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetApiJobs$jobs @@ -850,40 +2785,65 @@ class _CopyWithStubImpl$Query$GetApiJobs$jobs TRes _res; - call({List? getJobs, String? $__typename}) => + call({ + List? getJobs, + String? $__typename, + }) => _res; getJobs(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiJobs$jobs$getJobs { - Query$GetApiJobs$jobs$getJobs( - {required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - required this.$__typename}); + Query$GetApiJobs$jobs$getJobs({ + required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename, + }); - @override - factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) => - _$Query$GetApiJobs$jobs$getJobsFromJson(json); + factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) { + final l$createdAt = json['createdAt']; + final l$description = json['description']; + final l$error = json['error']; + final l$finishedAt = json['finishedAt']; + final l$name = json['name']; + final l$progress = json['progress']; + final l$result = json['result']; + final l$status = json['status']; + final l$statusText = json['statusText']; + final l$uid = json['uid']; + final l$updatedAt = json['updatedAt']; + final l$$__typename = json['__typename']; + return Query$GetApiJobs$jobs$getJobs( + createdAt: dateTimeFromJson(l$createdAt), + description: (l$description as String), + error: (l$error as String?), + finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), + name: (l$name as String), + progress: (l$progress as int?), + result: (l$result as String?), + status: (l$status as String), + statusText: (l$statusText as String?), + uid: (l$uid as String), + updatedAt: dateTimeFromJson(l$updatedAt), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime createdAt; final String description; final String? error; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? finishedAt; final String name; @@ -898,13 +2858,41 @@ class Query$GetApiJobs$jobs$getJobs { final String uid; - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime updatedAt; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiJobs$jobs$getJobsToJson(this); + Map toJson() { + final _resultData = {}; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$description = description; + _resultData['description'] = l$description; + final l$error = error; + _resultData['error'] = l$error; + final l$finishedAt = finishedAt; + _resultData['finishedAt'] = + l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); + final l$name = name; + _resultData['name'] = l$name; + final l$progress = progress; + _resultData['progress'] = l$progress; + final l$result = result; + _resultData['result'] = l$result; + final l$status = status; + _resultData['status'] = l$status; + final l$statusText = statusText; + _resultData['statusText'] = l$statusText; + final l$uid = uid; + _resultData['uid'] = l$uid; + final l$updatedAt = updatedAt; + _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createdAt = createdAt; final l$description = description; @@ -930,51 +2918,79 @@ class Query$GetApiJobs$jobs$getJobs { l$statusText, l$uid, l$updatedAt, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetApiJobs$jobs$getJobs) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$createdAt = createdAt; final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) return false; + if (l$createdAt != lOther$createdAt) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$error = error; final lOther$error = other.error; - if (l$error != lOther$error) return false; + if (l$error != lOther$error) { + return false; + } final l$finishedAt = finishedAt; final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) return false; + if (l$finishedAt != lOther$finishedAt) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$progress = progress; final lOther$progress = other.progress; - if (l$progress != lOther$progress) return false; + if (l$progress != lOther$progress) { + return false; + } final l$result = result; final lOther$result = other.result; - if (l$result != lOther$result) return false; + if (l$result != lOther$result) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$statusText = statusText; final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) return false; + if (l$statusText != lOther$statusText) { + return false; + } final l$uid = uid; final lOther$uid = other.uid; - if (l$uid != lOther$uid) return false; + if (l$uid != lOther$uid) { + return false; + } final l$updatedAt = updatedAt; final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) return false; + if (l$updatedAt != lOther$updatedAt) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -982,36 +2998,43 @@ class Query$GetApiJobs$jobs$getJobs { extension UtilityExtension$Query$GetApiJobs$jobs$getJobs on Query$GetApiJobs$jobs$getJobs { CopyWith$Query$GetApiJobs$jobs$getJobs - get copyWith => CopyWith$Query$GetApiJobs$jobs$getJobs(this, (i) => i); + get copyWith => CopyWith$Query$GetApiJobs$jobs$getJobs( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiJobs$jobs$getJobs { factory CopyWith$Query$GetApiJobs$jobs$getJobs( - Query$GetApiJobs$jobs$getJobs instance, - TRes Function(Query$GetApiJobs$jobs$getJobs) then) = - _CopyWithImpl$Query$GetApiJobs$jobs$getJobs; + Query$GetApiJobs$jobs$getJobs instance, + TRes Function(Query$GetApiJobs$jobs$getJobs) then, + ) = _CopyWithImpl$Query$GetApiJobs$jobs$getJobs; factory CopyWith$Query$GetApiJobs$jobs$getJobs.stub(TRes res) = _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs; - TRes call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}); + TRes call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }); } class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs implements CopyWith$Query$GetApiJobs$jobs$getJobs { - _CopyWithImpl$Query$GetApiJobs$jobs$getJobs(this._instance, this._then); + _CopyWithImpl$Query$GetApiJobs$jobs$getJobs( + this._instance, + this._then, + ); final Query$GetApiJobs$jobs$getJobs _instance; @@ -1019,51 +3042,51 @@ class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs static const _undefined = {}; - TRes call( - {Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiJobs$jobs$getJobs( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null - ? _instance.uid - : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs @@ -1072,58 +3095,82 @@ class _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs TRes _res; - call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}) => + call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$RemoveJob { - Variables$Mutation$RemoveJob({required this.jobId}); + factory Variables$Mutation$RemoveJob({required String jobId}) => + Variables$Mutation$RemoveJob._({ + r'jobId': jobId, + }); + + Variables$Mutation$RemoveJob._(this._$data); + + factory Variables$Mutation$RemoveJob.fromJson(Map data) { + final result$data = {}; + final l$jobId = data['jobId']; + result$data['jobId'] = (l$jobId as String); + return Variables$Mutation$RemoveJob._(result$data); + } + + Map _$data; + + String get jobId => (_$data['jobId'] as String); + Map toJson() { + final result$data = {}; + final l$jobId = jobId; + result$data['jobId'] = l$jobId; + return result$data; + } + + CopyWith$Variables$Mutation$RemoveJob + get copyWith => CopyWith$Variables$Mutation$RemoveJob( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$RemoveJob) || + runtimeType != other.runtimeType) { + return false; + } + final l$jobId = jobId; + final lOther$jobId = other.jobId; + if (l$jobId != lOther$jobId) { + return false; + } + return true; + } @override - factory Variables$Mutation$RemoveJob.fromJson(Map json) => - _$Variables$Mutation$RemoveJobFromJson(json); - - final String jobId; - - Map toJson() => _$Variables$Mutation$RemoveJobToJson(this); int get hashCode { final l$jobId = jobId; return Object.hashAll([l$jobId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveJob) || - runtimeType != other.runtimeType) return false; - final l$jobId = jobId; - final lOther$jobId = other.jobId; - if (l$jobId != lOther$jobId) return false; - return true; - } - - CopyWith$Variables$Mutation$RemoveJob - get copyWith => CopyWith$Variables$Mutation$RemoveJob(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RemoveJob { factory CopyWith$Variables$Mutation$RemoveJob( - Variables$Mutation$RemoveJob instance, - TRes Function(Variables$Mutation$RemoveJob) then) = - _CopyWithImpl$Variables$Mutation$RemoveJob; + Variables$Mutation$RemoveJob instance, + TRes Function(Variables$Mutation$RemoveJob) then, + ) = _CopyWithImpl$Variables$Mutation$RemoveJob; factory CopyWith$Variables$Mutation$RemoveJob.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RemoveJob; @@ -1133,7 +3180,10 @@ abstract class CopyWith$Variables$Mutation$RemoveJob { class _CopyWithImpl$Variables$Mutation$RemoveJob implements CopyWith$Variables$Mutation$RemoveJob { - _CopyWithImpl$Variables$Mutation$RemoveJob(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$RemoveJob( + this._instance, + this._then, + ); final Variables$Mutation$RemoveJob _instance; @@ -1141,10 +3191,11 @@ class _CopyWithImpl$Variables$Mutation$RemoveJob static const _undefined = {}; - TRes call({Object? jobId = _undefined}) => _then(Variables$Mutation$RemoveJob( - jobId: jobId == _undefined || jobId == null - ? _instance.jobId - : (jobId as String))); + TRes call({Object? jobId = _undefined}) => + _then(Variables$Mutation$RemoveJob._({ + ..._instance._$data, + if (jobId != _undefined && jobId != null) 'jobId': (jobId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$RemoveJob @@ -1156,61 +3207,97 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveJob call({String? jobId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveJob { - Mutation$RemoveJob({required this.removeJob, required this.$__typename}); + Mutation$RemoveJob({ + required this.removeJob, + required this.$__typename, + }); - @override - factory Mutation$RemoveJob.fromJson(Map json) => - _$Mutation$RemoveJobFromJson(json); + factory Mutation$RemoveJob.fromJson(Map json) { + final l$removeJob = json['removeJob']; + final l$$__typename = json['__typename']; + return Mutation$RemoveJob( + removeJob: Mutation$RemoveJob$removeJob.fromJson( + (l$removeJob as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RemoveJob$removeJob removeJob; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RemoveJobToJson(this); + Map toJson() { + final _resultData = {}; + final l$removeJob = removeJob; + _resultData['removeJob'] = l$removeJob.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$removeJob = removeJob; final l$$__typename = $__typename; - return Object.hashAll([l$removeJob, l$$__typename]); + return Object.hashAll([ + l$removeJob, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RemoveJob) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RemoveJob) || runtimeType != other.runtimeType) { return false; + } final l$removeJob = removeJob; final lOther$removeJob = other.removeJob; - if (l$removeJob != lOther$removeJob) return false; + if (l$removeJob != lOther$removeJob) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RemoveJob on Mutation$RemoveJob { CopyWith$Mutation$RemoveJob get copyWith => - CopyWith$Mutation$RemoveJob(this, (i) => i); + CopyWith$Mutation$RemoveJob( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveJob { factory CopyWith$Mutation$RemoveJob( - Mutation$RemoveJob instance, TRes Function(Mutation$RemoveJob) then) = - _CopyWithImpl$Mutation$RemoveJob; + Mutation$RemoveJob instance, + TRes Function(Mutation$RemoveJob) then, + ) = _CopyWithImpl$Mutation$RemoveJob; factory CopyWith$Mutation$RemoveJob.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveJob; - TRes call({Mutation$RemoveJob$removeJob? removeJob, String? $__typename}); + TRes call({ + Mutation$RemoveJob$removeJob? removeJob, + String? $__typename, + }); CopyWith$Mutation$RemoveJob$removeJob get removeJob; } class _CopyWithImpl$Mutation$RemoveJob implements CopyWith$Mutation$RemoveJob { - _CopyWithImpl$Mutation$RemoveJob(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveJob( + this._instance, + this._then, + ); final Mutation$RemoveJob _instance; @@ -1218,15 +3305,18 @@ class _CopyWithImpl$Mutation$RemoveJob static const _undefined = {}; - TRes call( - {Object? removeJob = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? removeJob = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RemoveJob( - removeJob: removeJob == _undefined || removeJob == null - ? _instance.removeJob - : (removeJob as Mutation$RemoveJob$removeJob), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + removeJob: removeJob == _undefined || removeJob == null + ? _instance.removeJob + : (removeJob as Mutation$RemoveJob$removeJob), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RemoveJob$removeJob get removeJob { final local$removeJob = _instance.removeJob; return CopyWith$Mutation$RemoveJob$removeJob( @@ -1240,89 +3330,107 @@ class _CopyWithStubImpl$Mutation$RemoveJob TRes _res; - call({Mutation$RemoveJob$removeJob? removeJob, String? $__typename}) => _res; + call({ + Mutation$RemoveJob$removeJob? removeJob, + String? $__typename, + }) => + _res; CopyWith$Mutation$RemoveJob$removeJob get removeJob => CopyWith$Mutation$RemoveJob$removeJob.stub(_res); } const documentNodeMutationRemoveJob = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RemoveJob'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'jobId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'removeJob'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'jobId'), - value: VariableNode(name: NameNode(value: 'jobId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'RemoveJob'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'jobId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeJob'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'jobId'), + value: VariableNode(name: NameNode(value: 'jobId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RemoveJob _parserFn$Mutation$RemoveJob(Map data) => Mutation$RemoveJob.fromJson(data); typedef OnMutationCompleted$Mutation$RemoveJob = FutureOr Function( - dynamic, Mutation$RemoveJob?); + dynamic, + Mutation$RemoveJob?, +); class Options$Mutation$RemoveJob extends graphql.MutationOptions { - Options$Mutation$RemoveJob( - {String? operationName, - required Variables$Mutation$RemoveJob variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RemoveJob? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RemoveJob({ + String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveJob? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$RemoveJob(data)), - update: update, - onError: onError, - document: documentNodeMutationRemoveJob, - parserFn: _parserFn$Mutation$RemoveJob); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$RemoveJob(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRemoveJob, + parserFn: _parserFn$Mutation$RemoveJob, + ); final OnMutationCompleted$Mutation$RemoveJob? onCompletedWithParsed; @@ -1331,38 +3439,39 @@ class Options$Mutation$RemoveJob ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RemoveJob extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RemoveJob( - {String? operationName, - required Variables$Mutation$RemoveJob variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRemoveJob, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RemoveJob); + WatchOptions$Mutation$RemoveJob({ + String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveJob, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveJob, + ); } extension ClientExtension$Mutation$RemoveJob on graphql.GraphQLClient { @@ -1374,18 +3483,27 @@ extension ClientExtension$Mutation$RemoveJob on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveJob$removeJob - implements Fragment$basicMutationReturnFields { - Mutation$RemoveJob$removeJob( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RemoveJob$removeJob({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$RemoveJob$removeJob.fromJson(Map json) => - _$Mutation$RemoveJob$removeJobFromJson(json); + factory Mutation$RemoveJob$removeJob.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RemoveJob$removeJob( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1393,35 +3511,64 @@ class Mutation$RemoveJob$removeJob final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RemoveJob$removeJobToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RemoveJob$removeJob) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1429,24 +3576,35 @@ class Mutation$RemoveJob$removeJob extension UtilityExtension$Mutation$RemoveJob$removeJob on Mutation$RemoveJob$removeJob { CopyWith$Mutation$RemoveJob$removeJob - get copyWith => CopyWith$Mutation$RemoveJob$removeJob(this, (i) => i); + get copyWith => CopyWith$Mutation$RemoveJob$removeJob( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveJob$removeJob { factory CopyWith$Mutation$RemoveJob$removeJob( - Mutation$RemoveJob$removeJob instance, - TRes Function(Mutation$RemoveJob$removeJob) then) = - _CopyWithImpl$Mutation$RemoveJob$removeJob; + Mutation$RemoveJob$removeJob instance, + TRes Function(Mutation$RemoveJob$removeJob) then, + ) = _CopyWithImpl$Mutation$RemoveJob$removeJob; factory CopyWith$Mutation$RemoveJob$removeJob.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveJob$removeJob; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RemoveJob$removeJob implements CopyWith$Mutation$RemoveJob$removeJob { - _CopyWithImpl$Mutation$RemoveJob$removeJob(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveJob$removeJob( + this._instance, + this._then, + ); final Mutation$RemoveJob$removeJob _instance; @@ -1454,24 +3612,25 @@ class _CopyWithImpl$Mutation$RemoveJob$removeJob static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RemoveJob$removeJob( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RemoveJob$removeJob @@ -1480,42 +3639,73 @@ class _CopyWithStubImpl$Mutation$RemoveJob$removeJob TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRebuild { - Mutation$RunSystemRebuild( - {required this.runSystemRebuild, required this.$__typename}); + Mutation$RunSystemRebuild({ + required this.runSystemRebuild, + required this.$__typename, + }); - @override - factory Mutation$RunSystemRebuild.fromJson(Map json) => - _$Mutation$RunSystemRebuildFromJson(json); + factory Mutation$RunSystemRebuild.fromJson(Map json) { + final l$runSystemRebuild = json['runSystemRebuild']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRebuild( + runSystemRebuild: Mutation$RunSystemRebuild$runSystemRebuild.fromJson( + (l$runSystemRebuild as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RunSystemRebuild$runSystemRebuild runSystemRebuild; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RunSystemRebuildToJson(this); + Map toJson() { + final _resultData = {}; + final l$runSystemRebuild = runSystemRebuild; + _resultData['runSystemRebuild'] = l$runSystemRebuild.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$runSystemRebuild = runSystemRebuild; final l$$__typename = $__typename; - return Object.hashAll([l$runSystemRebuild, l$$__typename]); + return Object.hashAll([ + l$runSystemRebuild, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRebuild) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$runSystemRebuild = runSystemRebuild; final lOther$runSystemRebuild = other.runSystemRebuild; - if (l$runSystemRebuild != lOther$runSystemRebuild) return false; + if (l$runSystemRebuild != lOther$runSystemRebuild) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1523,27 +3713,35 @@ class Mutation$RunSystemRebuild { extension UtilityExtension$Mutation$RunSystemRebuild on Mutation$RunSystemRebuild { CopyWith$Mutation$RunSystemRebuild get copyWith => - CopyWith$Mutation$RunSystemRebuild(this, (i) => i); + CopyWith$Mutation$RunSystemRebuild( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRebuild { - factory CopyWith$Mutation$RunSystemRebuild(Mutation$RunSystemRebuild instance, - TRes Function(Mutation$RunSystemRebuild) then) = - _CopyWithImpl$Mutation$RunSystemRebuild; + factory CopyWith$Mutation$RunSystemRebuild( + Mutation$RunSystemRebuild instance, + TRes Function(Mutation$RunSystemRebuild) then, + ) = _CopyWithImpl$Mutation$RunSystemRebuild; factory CopyWith$Mutation$RunSystemRebuild.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRebuild; - TRes call( - {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, - String? $__typename}); + TRes call({ + Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, + String? $__typename, + }); CopyWith$Mutation$RunSystemRebuild$runSystemRebuild get runSystemRebuild; } class _CopyWithImpl$Mutation$RunSystemRebuild implements CopyWith$Mutation$RunSystemRebuild { - _CopyWithImpl$Mutation$RunSystemRebuild(this._instance, this._then); + _CopyWithImpl$Mutation$RunSystemRebuild( + this._instance, + this._then, + ); final Mutation$RunSystemRebuild _instance; @@ -1551,18 +3749,19 @@ class _CopyWithImpl$Mutation$RunSystemRebuild static const _undefined = {}; - TRes call( - {Object? runSystemRebuild = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? runSystemRebuild = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRebuild( - runSystemRebuild: - runSystemRebuild == _undefined || runSystemRebuild == null - ? _instance.runSystemRebuild - : (runSystemRebuild - as Mutation$RunSystemRebuild$runSystemRebuild), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + runSystemRebuild: runSystemRebuild == _undefined || + runSystemRebuild == null + ? _instance.runSystemRebuild + : (runSystemRebuild as Mutation$RunSystemRebuild$runSystemRebuild), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RunSystemRebuild$runSystemRebuild get runSystemRebuild { final local$runSystemRebuild = _instance.runSystemRebuild; @@ -1577,9 +3776,10 @@ class _CopyWithStubImpl$Mutation$RunSystemRebuild TRes _res; - call( - {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, - String? $__typename}) => + call({ + Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, + String? $__typename, + }) => _res; CopyWith$Mutation$RunSystemRebuild$runSystemRebuild get runSystemRebuild => @@ -1588,73 +3788,82 @@ class _CopyWithStubImpl$Mutation$RunSystemRebuild const documentNodeMutationRunSystemRebuild = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RunSystemRebuild'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'runSystemRebuild'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRebuild'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRebuild'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RunSystemRebuild _parserFn$Mutation$RunSystemRebuild( Map data) => Mutation$RunSystemRebuild.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemRebuild = FutureOr Function( - dynamic, Mutation$RunSystemRebuild?); + dynamic, + Mutation$RunSystemRebuild?, +); class Options$Mutation$RunSystemRebuild extends graphql.MutationOptions { - Options$Mutation$RunSystemRebuild( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RunSystemRebuild? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RunSystemRebuild({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRebuild? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RunSystemRebuild(data)), - update: update, - onError: onError, - document: documentNodeMutationRunSystemRebuild, - parserFn: _parserFn$Mutation$RunSystemRebuild); + : _parserFn$Mutation$RunSystemRebuild(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRebuild, + parserFn: _parserFn$Mutation$RunSystemRebuild, + ); final OnMutationCompleted$Mutation$RunSystemRebuild? onCompletedWithParsed; @@ -1663,36 +3872,37 @@ class Options$Mutation$RunSystemRebuild ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RunSystemRebuild extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RunSystemRebuild( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRunSystemRebuild, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RunSystemRebuild); + WatchOptions$Mutation$RunSystemRebuild({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRebuild, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRebuild, + ); } extension ClientExtension$Mutation$RunSystemRebuild on graphql.GraphQLClient { @@ -1706,19 +3916,28 @@ extension ClientExtension$Mutation$RunSystemRebuild on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRebuild()); } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRebuild$runSystemRebuild - implements Fragment$basicMutationReturnFields { - Mutation$RunSystemRebuild$runSystemRebuild( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RunSystemRebuild$runSystemRebuild({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RunSystemRebuild$runSystemRebuild.fromJson( - Map json) => - _$Mutation$RunSystemRebuild$runSystemRebuildFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRebuild$runSystemRebuild( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1726,36 +3945,64 @@ class Mutation$RunSystemRebuild$runSystemRebuild final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RunSystemRebuild$runSystemRebuildToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRebuild$runSystemRebuild) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1764,26 +4011,35 @@ extension UtilityExtension$Mutation$RunSystemRebuild$runSystemRebuild on Mutation$RunSystemRebuild$runSystemRebuild { CopyWith$Mutation$RunSystemRebuild$runSystemRebuild< Mutation$RunSystemRebuild$runSystemRebuild> - get copyWith => - CopyWith$Mutation$RunSystemRebuild$runSystemRebuild(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemRebuild$runSystemRebuild( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRebuild$runSystemRebuild { factory CopyWith$Mutation$RunSystemRebuild$runSystemRebuild( - Mutation$RunSystemRebuild$runSystemRebuild instance, - TRes Function(Mutation$RunSystemRebuild$runSystemRebuild) then) = - _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild; + Mutation$RunSystemRebuild$runSystemRebuild instance, + TRes Function(Mutation$RunSystemRebuild$runSystemRebuild) then, + ) = _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild; factory CopyWith$Mutation$RunSystemRebuild$runSystemRebuild.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild implements CopyWith$Mutation$RunSystemRebuild$runSystemRebuild { _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RunSystemRebuild$runSystemRebuild _instance; @@ -1791,24 +4047,25 @@ class _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRebuild$runSystemRebuild( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild @@ -1817,42 +4074,73 @@ class _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRollback { - Mutation$RunSystemRollback( - {required this.runSystemRollback, required this.$__typename}); + Mutation$RunSystemRollback({ + required this.runSystemRollback, + required this.$__typename, + }); - @override - factory Mutation$RunSystemRollback.fromJson(Map json) => - _$Mutation$RunSystemRollbackFromJson(json); + factory Mutation$RunSystemRollback.fromJson(Map json) { + final l$runSystemRollback = json['runSystemRollback']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRollback( + runSystemRollback: Mutation$RunSystemRollback$runSystemRollback.fromJson( + (l$runSystemRollback as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RunSystemRollback$runSystemRollback runSystemRollback; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RunSystemRollbackToJson(this); + Map toJson() { + final _resultData = {}; + final l$runSystemRollback = runSystemRollback; + _resultData['runSystemRollback'] = l$runSystemRollback.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$runSystemRollback = runSystemRollback; final l$$__typename = $__typename; - return Object.hashAll([l$runSystemRollback, l$$__typename]); + return Object.hashAll([ + l$runSystemRollback, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRollback) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$runSystemRollback = runSystemRollback; final lOther$runSystemRollback = other.runSystemRollback; - if (l$runSystemRollback != lOther$runSystemRollback) return false; + if (l$runSystemRollback != lOther$runSystemRollback) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1860,28 +4148,35 @@ class Mutation$RunSystemRollback { extension UtilityExtension$Mutation$RunSystemRollback on Mutation$RunSystemRollback { CopyWith$Mutation$RunSystemRollback - get copyWith => CopyWith$Mutation$RunSystemRollback(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemRollback( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRollback { factory CopyWith$Mutation$RunSystemRollback( - Mutation$RunSystemRollback instance, - TRes Function(Mutation$RunSystemRollback) then) = - _CopyWithImpl$Mutation$RunSystemRollback; + Mutation$RunSystemRollback instance, + TRes Function(Mutation$RunSystemRollback) then, + ) = _CopyWithImpl$Mutation$RunSystemRollback; factory CopyWith$Mutation$RunSystemRollback.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRollback; - TRes call( - {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, - String? $__typename}); + TRes call({ + Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, + String? $__typename, + }); CopyWith$Mutation$RunSystemRollback$runSystemRollback get runSystemRollback; } class _CopyWithImpl$Mutation$RunSystemRollback implements CopyWith$Mutation$RunSystemRollback { - _CopyWithImpl$Mutation$RunSystemRollback(this._instance, this._then); + _CopyWithImpl$Mutation$RunSystemRollback( + this._instance, + this._then, + ); final Mutation$RunSystemRollback _instance; @@ -1889,18 +4184,20 @@ class _CopyWithImpl$Mutation$RunSystemRollback static const _undefined = {}; - TRes call( - {Object? runSystemRollback = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? runSystemRollback = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRollback( - runSystemRollback: - runSystemRollback == _undefined || runSystemRollback == null - ? _instance.runSystemRollback - : (runSystemRollback - as Mutation$RunSystemRollback$runSystemRollback), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + runSystemRollback: + runSystemRollback == _undefined || runSystemRollback == null + ? _instance.runSystemRollback + : (runSystemRollback + as Mutation$RunSystemRollback$runSystemRollback), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RunSystemRollback$runSystemRollback get runSystemRollback { final local$runSystemRollback = _instance.runSystemRollback; @@ -1915,9 +4212,10 @@ class _CopyWithStubImpl$Mutation$RunSystemRollback TRes _res; - call( - {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, - String? $__typename}) => + call({ + Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, + String? $__typename, + }) => _res; CopyWith$Mutation$RunSystemRollback$runSystemRollback get runSystemRollback => @@ -1926,73 +4224,83 @@ class _CopyWithStubImpl$Mutation$RunSystemRollback const documentNodeMutationRunSystemRollback = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RunSystemRollback'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'runSystemRollback'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRollback'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRollback'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RunSystemRollback _parserFn$Mutation$RunSystemRollback( Map data) => Mutation$RunSystemRollback.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemRollback = FutureOr - Function(dynamic, Mutation$RunSystemRollback?); + Function( + dynamic, + Mutation$RunSystemRollback?, +); class Options$Mutation$RunSystemRollback extends graphql.MutationOptions { - Options$Mutation$RunSystemRollback( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RunSystemRollback? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RunSystemRollback({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRollback? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RunSystemRollback(data)), - update: update, - onError: onError, - document: documentNodeMutationRunSystemRollback, - parserFn: _parserFn$Mutation$RunSystemRollback); + : _parserFn$Mutation$RunSystemRollback(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRollback, + parserFn: _parserFn$Mutation$RunSystemRollback, + ); final OnMutationCompleted$Mutation$RunSystemRollback? onCompletedWithParsed; @@ -2001,36 +4309,37 @@ class Options$Mutation$RunSystemRollback ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RunSystemRollback extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RunSystemRollback( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRunSystemRollback, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RunSystemRollback); + WatchOptions$Mutation$RunSystemRollback({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRollback, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRollback, + ); } extension ClientExtension$Mutation$RunSystemRollback on graphql.GraphQLClient { @@ -2044,19 +4353,28 @@ extension ClientExtension$Mutation$RunSystemRollback on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRollback()); } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRollback$runSystemRollback - implements Fragment$basicMutationReturnFields { - Mutation$RunSystemRollback$runSystemRollback( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RunSystemRollback$runSystemRollback({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RunSystemRollback$runSystemRollback.fromJson( - Map json) => - _$Mutation$RunSystemRollback$runSystemRollbackFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRollback$runSystemRollback( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2064,36 +4382,64 @@ class Mutation$RunSystemRollback$runSystemRollback final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RunSystemRollback$runSystemRollbackToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRollback$runSystemRollback) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2102,26 +4448,35 @@ extension UtilityExtension$Mutation$RunSystemRollback$runSystemRollback on Mutation$RunSystemRollback$runSystemRollback { CopyWith$Mutation$RunSystemRollback$runSystemRollback< Mutation$RunSystemRollback$runSystemRollback> - get copyWith => - CopyWith$Mutation$RunSystemRollback$runSystemRollback(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemRollback$runSystemRollback( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRollback$runSystemRollback { factory CopyWith$Mutation$RunSystemRollback$runSystemRollback( - Mutation$RunSystemRollback$runSystemRollback instance, - TRes Function(Mutation$RunSystemRollback$runSystemRollback) then) = - _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback; + Mutation$RunSystemRollback$runSystemRollback instance, + TRes Function(Mutation$RunSystemRollback$runSystemRollback) then, + ) = _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback; factory CopyWith$Mutation$RunSystemRollback$runSystemRollback.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback implements CopyWith$Mutation$RunSystemRollback$runSystemRollback { _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RunSystemRollback$runSystemRollback _instance; @@ -2129,24 +4484,25 @@ class _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRollback$runSystemRollback( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback @@ -2155,42 +4511,73 @@ class _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemUpgrade { - Mutation$RunSystemUpgrade( - {required this.runSystemUpgrade, required this.$__typename}); + Mutation$RunSystemUpgrade({ + required this.runSystemUpgrade, + required this.$__typename, + }); - @override - factory Mutation$RunSystemUpgrade.fromJson(Map json) => - _$Mutation$RunSystemUpgradeFromJson(json); + factory Mutation$RunSystemUpgrade.fromJson(Map json) { + final l$runSystemUpgrade = json['runSystemUpgrade']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemUpgrade( + runSystemUpgrade: Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( + (l$runSystemUpgrade as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RunSystemUpgrade$runSystemUpgrade runSystemUpgrade; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RunSystemUpgradeToJson(this); + Map toJson() { + final _resultData = {}; + final l$runSystemUpgrade = runSystemUpgrade; + _resultData['runSystemUpgrade'] = l$runSystemUpgrade.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$runSystemUpgrade = runSystemUpgrade; final l$$__typename = $__typename; - return Object.hashAll([l$runSystemUpgrade, l$$__typename]); + return Object.hashAll([ + l$runSystemUpgrade, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemUpgrade) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$runSystemUpgrade = runSystemUpgrade; final lOther$runSystemUpgrade = other.runSystemUpgrade; - if (l$runSystemUpgrade != lOther$runSystemUpgrade) return false; + if (l$runSystemUpgrade != lOther$runSystemUpgrade) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2198,27 +4585,35 @@ class Mutation$RunSystemUpgrade { extension UtilityExtension$Mutation$RunSystemUpgrade on Mutation$RunSystemUpgrade { CopyWith$Mutation$RunSystemUpgrade get copyWith => - CopyWith$Mutation$RunSystemUpgrade(this, (i) => i); + CopyWith$Mutation$RunSystemUpgrade( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemUpgrade { - factory CopyWith$Mutation$RunSystemUpgrade(Mutation$RunSystemUpgrade instance, - TRes Function(Mutation$RunSystemUpgrade) then) = - _CopyWithImpl$Mutation$RunSystemUpgrade; + factory CopyWith$Mutation$RunSystemUpgrade( + Mutation$RunSystemUpgrade instance, + TRes Function(Mutation$RunSystemUpgrade) then, + ) = _CopyWithImpl$Mutation$RunSystemUpgrade; factory CopyWith$Mutation$RunSystemUpgrade.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemUpgrade; - TRes call( - {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, - String? $__typename}); + TRes call({ + Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, + String? $__typename, + }); CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade get runSystemUpgrade; } class _CopyWithImpl$Mutation$RunSystemUpgrade implements CopyWith$Mutation$RunSystemUpgrade { - _CopyWithImpl$Mutation$RunSystemUpgrade(this._instance, this._then); + _CopyWithImpl$Mutation$RunSystemUpgrade( + this._instance, + this._then, + ); final Mutation$RunSystemUpgrade _instance; @@ -2226,18 +4621,19 @@ class _CopyWithImpl$Mutation$RunSystemUpgrade static const _undefined = {}; - TRes call( - {Object? runSystemUpgrade = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? runSystemUpgrade = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemUpgrade( - runSystemUpgrade: - runSystemUpgrade == _undefined || runSystemUpgrade == null - ? _instance.runSystemUpgrade - : (runSystemUpgrade - as Mutation$RunSystemUpgrade$runSystemUpgrade), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + runSystemUpgrade: runSystemUpgrade == _undefined || + runSystemUpgrade == null + ? _instance.runSystemUpgrade + : (runSystemUpgrade as Mutation$RunSystemUpgrade$runSystemUpgrade), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade get runSystemUpgrade { final local$runSystemUpgrade = _instance.runSystemUpgrade; @@ -2252,9 +4648,10 @@ class _CopyWithStubImpl$Mutation$RunSystemUpgrade TRes _res; - call( - {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, - String? $__typename}) => + call({ + Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, + String? $__typename, + }) => _res; CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade get runSystemUpgrade => @@ -2263,73 +4660,82 @@ class _CopyWithStubImpl$Mutation$RunSystemUpgrade const documentNodeMutationRunSystemUpgrade = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RunSystemUpgrade'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'runSystemUpgrade'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RunSystemUpgrade'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RunSystemUpgrade _parserFn$Mutation$RunSystemUpgrade( Map data) => Mutation$RunSystemUpgrade.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemUpgrade = FutureOr Function( - dynamic, Mutation$RunSystemUpgrade?); + dynamic, + Mutation$RunSystemUpgrade?, +); class Options$Mutation$RunSystemUpgrade extends graphql.MutationOptions { - Options$Mutation$RunSystemUpgrade( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RunSystemUpgrade? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RunSystemUpgrade({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemUpgrade? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RunSystemUpgrade(data)), - update: update, - onError: onError, - document: documentNodeMutationRunSystemUpgrade, - parserFn: _parserFn$Mutation$RunSystemUpgrade); + : _parserFn$Mutation$RunSystemUpgrade(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRunSystemUpgrade, + parserFn: _parserFn$Mutation$RunSystemUpgrade, + ); final OnMutationCompleted$Mutation$RunSystemUpgrade? onCompletedWithParsed; @@ -2338,36 +4744,37 @@ class Options$Mutation$RunSystemUpgrade ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RunSystemUpgrade extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RunSystemUpgrade( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRunSystemUpgrade, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RunSystemUpgrade); + WatchOptions$Mutation$RunSystemUpgrade({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemUpgrade, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemUpgrade, + ); } extension ClientExtension$Mutation$RunSystemUpgrade on graphql.GraphQLClient { @@ -2381,19 +4788,28 @@ extension ClientExtension$Mutation$RunSystemUpgrade on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RunSystemUpgrade()); } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemUpgrade$runSystemUpgrade - implements Fragment$basicMutationReturnFields { - Mutation$RunSystemUpgrade$runSystemUpgrade( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RunSystemUpgrade$runSystemUpgrade({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( - Map json) => - _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemUpgrade$runSystemUpgrade( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2401,36 +4817,64 @@ class Mutation$RunSystemUpgrade$runSystemUpgrade final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemUpgrade$runSystemUpgrade) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2439,26 +4883,35 @@ extension UtilityExtension$Mutation$RunSystemUpgrade$runSystemUpgrade on Mutation$RunSystemUpgrade$runSystemUpgrade { CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade< Mutation$RunSystemUpgrade$runSystemUpgrade> - get copyWith => - CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade { factory CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade( - Mutation$RunSystemUpgrade$runSystemUpgrade instance, - TRes Function(Mutation$RunSystemUpgrade$runSystemUpgrade) then) = - _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; + Mutation$RunSystemUpgrade$runSystemUpgrade instance, + TRes Function(Mutation$RunSystemUpgrade$runSystemUpgrade) then, + ) = _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; factory CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade implements CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade { _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RunSystemUpgrade$runSystemUpgrade _instance; @@ -2466,24 +4919,25 @@ class _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemUpgrade$runSystemUpgrade( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade @@ -2492,43 +4946,75 @@ class _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$PullRepositoryChanges { - Mutation$PullRepositoryChanges( - {required this.pullRepositoryChanges, required this.$__typename}); + Mutation$PullRepositoryChanges({ + required this.pullRepositoryChanges, + required this.$__typename, + }); - @override - factory Mutation$PullRepositoryChanges.fromJson(Map json) => - _$Mutation$PullRepositoryChangesFromJson(json); + factory Mutation$PullRepositoryChanges.fromJson(Map json) { + final l$pullRepositoryChanges = json['pullRepositoryChanges']; + final l$$__typename = json['__typename']; + return Mutation$PullRepositoryChanges( + pullRepositoryChanges: + Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( + (l$pullRepositoryChanges as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$PullRepositoryChanges$pullRepositoryChanges pullRepositoryChanges; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$PullRepositoryChangesToJson(this); + Map toJson() { + final _resultData = {}; + final l$pullRepositoryChanges = pullRepositoryChanges; + _resultData['pullRepositoryChanges'] = l$pullRepositoryChanges.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$pullRepositoryChanges = pullRepositoryChanges; final l$$__typename = $__typename; - return Object.hashAll([l$pullRepositoryChanges, l$$__typename]); + return Object.hashAll([ + l$pullRepositoryChanges, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$PullRepositoryChanges) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$pullRepositoryChanges = pullRepositoryChanges; final lOther$pullRepositoryChanges = other.pullRepositoryChanges; - if (l$pullRepositoryChanges != lOther$pullRepositoryChanges) return false; + if (l$pullRepositoryChanges != lOther$pullRepositoryChanges) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2536,29 +5022,35 @@ class Mutation$PullRepositoryChanges { extension UtilityExtension$Mutation$PullRepositoryChanges on Mutation$PullRepositoryChanges { CopyWith$Mutation$PullRepositoryChanges - get copyWith => CopyWith$Mutation$PullRepositoryChanges(this, (i) => i); + get copyWith => CopyWith$Mutation$PullRepositoryChanges( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$PullRepositoryChanges { factory CopyWith$Mutation$PullRepositoryChanges( - Mutation$PullRepositoryChanges instance, - TRes Function(Mutation$PullRepositoryChanges) then) = - _CopyWithImpl$Mutation$PullRepositoryChanges; + Mutation$PullRepositoryChanges instance, + TRes Function(Mutation$PullRepositoryChanges) then, + ) = _CopyWithImpl$Mutation$PullRepositoryChanges; factory CopyWith$Mutation$PullRepositoryChanges.stub(TRes res) = _CopyWithStubImpl$Mutation$PullRepositoryChanges; - TRes call( - {Mutation$PullRepositoryChanges$pullRepositoryChanges? - pullRepositoryChanges, - String? $__typename}); + TRes call({ + Mutation$PullRepositoryChanges$pullRepositoryChanges? pullRepositoryChanges, + String? $__typename, + }); CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges get pullRepositoryChanges; } class _CopyWithImpl$Mutation$PullRepositoryChanges implements CopyWith$Mutation$PullRepositoryChanges { - _CopyWithImpl$Mutation$PullRepositoryChanges(this._instance, this._then); + _CopyWithImpl$Mutation$PullRepositoryChanges( + this._instance, + this._then, + ); final Mutation$PullRepositoryChanges _instance; @@ -2566,18 +5058,20 @@ class _CopyWithImpl$Mutation$PullRepositoryChanges static const _undefined = {}; - TRes call( - {Object? pullRepositoryChanges = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? pullRepositoryChanges = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$PullRepositoryChanges( - pullRepositoryChanges: pullRepositoryChanges == _undefined || - pullRepositoryChanges == null - ? _instance.pullRepositoryChanges - : (pullRepositoryChanges - as Mutation$PullRepositoryChanges$pullRepositoryChanges), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + pullRepositoryChanges: + pullRepositoryChanges == _undefined || pullRepositoryChanges == null + ? _instance.pullRepositoryChanges + : (pullRepositoryChanges + as Mutation$PullRepositoryChanges$pullRepositoryChanges), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges get pullRepositoryChanges { final local$pullRepositoryChanges = _instance.pullRepositoryChanges; @@ -2592,10 +5086,10 @@ class _CopyWithStubImpl$Mutation$PullRepositoryChanges TRes _res; - call( - {Mutation$PullRepositoryChanges$pullRepositoryChanges? - pullRepositoryChanges, - String? $__typename}) => + call({ + Mutation$PullRepositoryChanges$pullRepositoryChanges? pullRepositoryChanges, + String? $__typename, + }) => _res; CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges get pullRepositoryChanges => @@ -2605,73 +5099,83 @@ class _CopyWithStubImpl$Mutation$PullRepositoryChanges const documentNodeMutationPullRepositoryChanges = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'PullRepositoryChanges'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'pullRepositoryChanges'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'PullRepositoryChanges'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'pullRepositoryChanges'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$PullRepositoryChanges _parserFn$Mutation$PullRepositoryChanges( Map data) => Mutation$PullRepositoryChanges.fromJson(data); typedef OnMutationCompleted$Mutation$PullRepositoryChanges = FutureOr - Function(dynamic, Mutation$PullRepositoryChanges?); + Function( + dynamic, + Mutation$PullRepositoryChanges?, +); class Options$Mutation$PullRepositoryChanges extends graphql.MutationOptions { - Options$Mutation$PullRepositoryChanges( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$PullRepositoryChanges? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$PullRepositoryChanges({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$PullRepositoryChanges? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$PullRepositoryChanges(data)), - update: update, - onError: onError, - document: documentNodeMutationPullRepositoryChanges, - parserFn: _parserFn$Mutation$PullRepositoryChanges); + : _parserFn$Mutation$PullRepositoryChanges(data), + ), + update: update, + onError: onError, + document: documentNodeMutationPullRepositoryChanges, + parserFn: _parserFn$Mutation$PullRepositoryChanges, + ); final OnMutationCompleted$Mutation$PullRepositoryChanges? onCompletedWithParsed; @@ -2681,36 +5185,37 @@ class Options$Mutation$PullRepositoryChanges ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$PullRepositoryChanges extends graphql.WatchQueryOptions { - WatchOptions$Mutation$PullRepositoryChanges( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationPullRepositoryChanges, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$PullRepositoryChanges); + WatchOptions$Mutation$PullRepositoryChanges({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationPullRepositoryChanges, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$PullRepositoryChanges, + ); } extension ClientExtension$Mutation$PullRepositoryChanges @@ -2727,19 +5232,28 @@ extension ClientExtension$Mutation$PullRepositoryChanges options ?? WatchOptions$Mutation$PullRepositoryChanges()); } -@JsonSerializable(explicitToJson: true) class Mutation$PullRepositoryChanges$pullRepositoryChanges - implements Fragment$basicMutationReturnFields { - Mutation$PullRepositoryChanges$pullRepositoryChanges( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$PullRepositoryChanges$pullRepositoryChanges({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( - Map json) => - _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$PullRepositoryChanges$pullRepositoryChanges( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2747,36 +5261,64 @@ class Mutation$PullRepositoryChanges$pullRepositoryChanges final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$PullRepositoryChanges$pullRepositoryChanges) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2787,29 +5329,37 @@ extension UtilityExtension$Mutation$PullRepositoryChanges$pullRepositoryChanges Mutation$PullRepositoryChanges$pullRepositoryChanges> get copyWith => CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges< TRes> { factory CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges( - Mutation$PullRepositoryChanges$pullRepositoryChanges instance, - TRes Function(Mutation$PullRepositoryChanges$pullRepositoryChanges) - then) = - _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; + Mutation$PullRepositoryChanges$pullRepositoryChanges instance, + TRes Function(Mutation$PullRepositoryChanges$pullRepositoryChanges) then, + ) = _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; factory CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges.stub( TRes res) = _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges implements CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges { _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$PullRepositoryChanges$pullRepositoryChanges _instance; @@ -2818,24 +5368,25 @@ class _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$PullRepositoryChanges$pullRepositoryChanges( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges< @@ -2847,67 +5398,106 @@ class _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges< TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RebootSystem { - Mutation$RebootSystem( - {required this.rebootSystem, required this.$__typename}); + Mutation$RebootSystem({ + required this.rebootSystem, + required this.$__typename, + }); - @override - factory Mutation$RebootSystem.fromJson(Map json) => - _$Mutation$RebootSystemFromJson(json); + factory Mutation$RebootSystem.fromJson(Map json) { + final l$rebootSystem = json['rebootSystem']; + final l$$__typename = json['__typename']; + return Mutation$RebootSystem( + rebootSystem: Mutation$RebootSystem$rebootSystem.fromJson( + (l$rebootSystem as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RebootSystem$rebootSystem rebootSystem; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RebootSystemToJson(this); + Map toJson() { + final _resultData = {}; + final l$rebootSystem = rebootSystem; + _resultData['rebootSystem'] = l$rebootSystem.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$rebootSystem = rebootSystem; final l$$__typename = $__typename; - return Object.hashAll([l$rebootSystem, l$$__typename]); + return Object.hashAll([ + l$rebootSystem, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RebootSystem) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RebootSystem) || runtimeType != other.runtimeType) { return false; + } final l$rebootSystem = rebootSystem; final lOther$rebootSystem = other.rebootSystem; - if (l$rebootSystem != lOther$rebootSystem) return false; + if (l$rebootSystem != lOther$rebootSystem) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RebootSystem on Mutation$RebootSystem { CopyWith$Mutation$RebootSystem get copyWith => - CopyWith$Mutation$RebootSystem(this, (i) => i); + CopyWith$Mutation$RebootSystem( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RebootSystem { - factory CopyWith$Mutation$RebootSystem(Mutation$RebootSystem instance, - TRes Function(Mutation$RebootSystem) then) = - _CopyWithImpl$Mutation$RebootSystem; + factory CopyWith$Mutation$RebootSystem( + Mutation$RebootSystem instance, + TRes Function(Mutation$RebootSystem) then, + ) = _CopyWithImpl$Mutation$RebootSystem; factory CopyWith$Mutation$RebootSystem.stub(TRes res) = _CopyWithStubImpl$Mutation$RebootSystem; - TRes call( - {Mutation$RebootSystem$rebootSystem? rebootSystem, String? $__typename}); + TRes call({ + Mutation$RebootSystem$rebootSystem? rebootSystem, + String? $__typename, + }); CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem; } class _CopyWithImpl$Mutation$RebootSystem implements CopyWith$Mutation$RebootSystem { - _CopyWithImpl$Mutation$RebootSystem(this._instance, this._then); + _CopyWithImpl$Mutation$RebootSystem( + this._instance, + this._then, + ); final Mutation$RebootSystem _instance; @@ -2915,16 +5505,18 @@ class _CopyWithImpl$Mutation$RebootSystem static const _undefined = {}; - TRes call( - {Object? rebootSystem = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? rebootSystem = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RebootSystem( - rebootSystem: rebootSystem == _undefined || rebootSystem == null - ? _instance.rebootSystem - : (rebootSystem as Mutation$RebootSystem$rebootSystem), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + rebootSystem: rebootSystem == _undefined || rebootSystem == null + ? _instance.rebootSystem + : (rebootSystem as Mutation$RebootSystem$rebootSystem), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem { final local$rebootSystem = _instance.rebootSystem; return CopyWith$Mutation$RebootSystem$rebootSystem( @@ -2938,9 +5530,10 @@ class _CopyWithStubImpl$Mutation$RebootSystem TRes _res; - call( - {Mutation$RebootSystem$rebootSystem? rebootSystem, - String? $__typename}) => + call({ + Mutation$RebootSystem$rebootSystem? rebootSystem, + String? $__typename, + }) => _res; CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem => CopyWith$Mutation$RebootSystem$rebootSystem.stub(_res); @@ -2948,73 +5541,80 @@ class _CopyWithStubImpl$Mutation$RebootSystem const documentNodeMutationRebootSystem = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RebootSystem'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'rebootSystem'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RebootSystem'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'rebootSystem'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RebootSystem _parserFn$Mutation$RebootSystem( Map data) => Mutation$RebootSystem.fromJson(data); typedef OnMutationCompleted$Mutation$RebootSystem = FutureOr Function( - dynamic, Mutation$RebootSystem?); + dynamic, + Mutation$RebootSystem?, +); class Options$Mutation$RebootSystem extends graphql.MutationOptions { - Options$Mutation$RebootSystem( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RebootSystem? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RebootSystem({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RebootSystem? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$RebootSystem(data)), - update: update, - onError: onError, - document: documentNodeMutationRebootSystem, - parserFn: _parserFn$Mutation$RebootSystem); + data == null ? null : _parserFn$Mutation$RebootSystem(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRebootSystem, + parserFn: _parserFn$Mutation$RebootSystem, + ); final OnMutationCompleted$Mutation$RebootSystem? onCompletedWithParsed; @@ -3023,36 +5623,37 @@ class Options$Mutation$RebootSystem ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RebootSystem extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RebootSystem( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRebootSystem, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RebootSystem); + WatchOptions$Mutation$RebootSystem({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRebootSystem, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RebootSystem, + ); } extension ClientExtension$Mutation$RebootSystem on graphql.GraphQLClient { @@ -3064,19 +5665,28 @@ extension ClientExtension$Mutation$RebootSystem on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RebootSystem()); } -@JsonSerializable(explicitToJson: true) class Mutation$RebootSystem$rebootSystem - implements Fragment$basicMutationReturnFields { - Mutation$RebootSystem$rebootSystem( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RebootSystem$rebootSystem({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RebootSystem$rebootSystem.fromJson( - Map json) => - _$Mutation$RebootSystem$rebootSystemFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RebootSystem$rebootSystem( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -3084,36 +5694,64 @@ class Mutation$RebootSystem$rebootSystem final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RebootSystem$rebootSystemToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RebootSystem$rebootSystem) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3122,25 +5760,35 @@ extension UtilityExtension$Mutation$RebootSystem$rebootSystem on Mutation$RebootSystem$rebootSystem { CopyWith$Mutation$RebootSystem$rebootSystem< Mutation$RebootSystem$rebootSystem> - get copyWith => - CopyWith$Mutation$RebootSystem$rebootSystem(this, (i) => i); + get copyWith => CopyWith$Mutation$RebootSystem$rebootSystem( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RebootSystem$rebootSystem { factory CopyWith$Mutation$RebootSystem$rebootSystem( - Mutation$RebootSystem$rebootSystem instance, - TRes Function(Mutation$RebootSystem$rebootSystem) then) = - _CopyWithImpl$Mutation$RebootSystem$rebootSystem; + Mutation$RebootSystem$rebootSystem instance, + TRes Function(Mutation$RebootSystem$rebootSystem) then, + ) = _CopyWithImpl$Mutation$RebootSystem$rebootSystem; factory CopyWith$Mutation$RebootSystem$rebootSystem.stub(TRes res) = _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RebootSystem$rebootSystem implements CopyWith$Mutation$RebootSystem$rebootSystem { - _CopyWithImpl$Mutation$RebootSystem$rebootSystem(this._instance, this._then); + _CopyWithImpl$Mutation$RebootSystem$rebootSystem( + this._instance, + this._then, + ); final Mutation$RebootSystem$rebootSystem _instance; @@ -3148,24 +5796,25 @@ class _CopyWithImpl$Mutation$RebootSystem$rebootSystem static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RebootSystem$rebootSystem( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem @@ -3174,41 +5823,73 @@ class _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Query$SystemServerProvider { - Query$SystemServerProvider({required this.system, required this.$__typename}); + Query$SystemServerProvider({ + required this.system, + required this.$__typename, + }); - @override - factory Query$SystemServerProvider.fromJson(Map json) => - _$Query$SystemServerProviderFromJson(json); + factory Query$SystemServerProvider.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemServerProvider( + system: Query$SystemServerProvider$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemServerProvider$system system; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemServerProviderToJson(this); + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$system = system; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + return Object.hashAll([ + l$system, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemServerProvider) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$system = system; final lOther$system = other.system; - if (l$system != lOther$system) return false; + if (l$system != lOther$system) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3216,25 +5897,34 @@ class Query$SystemServerProvider { extension UtilityExtension$Query$SystemServerProvider on Query$SystemServerProvider { CopyWith$Query$SystemServerProvider - get copyWith => CopyWith$Query$SystemServerProvider(this, (i) => i); + get copyWith => CopyWith$Query$SystemServerProvider( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemServerProvider { factory CopyWith$Query$SystemServerProvider( - Query$SystemServerProvider instance, - TRes Function(Query$SystemServerProvider) then) = - _CopyWithImpl$Query$SystemServerProvider; + Query$SystemServerProvider instance, + TRes Function(Query$SystemServerProvider) then, + ) = _CopyWithImpl$Query$SystemServerProvider; factory CopyWith$Query$SystemServerProvider.stub(TRes res) = _CopyWithStubImpl$Query$SystemServerProvider; - TRes call({Query$SystemServerProvider$system? system, String? $__typename}); + TRes call({ + Query$SystemServerProvider$system? system, + String? $__typename, + }); CopyWith$Query$SystemServerProvider$system get system; } class _CopyWithImpl$Query$SystemServerProvider implements CopyWith$Query$SystemServerProvider { - _CopyWithImpl$Query$SystemServerProvider(this._instance, this._then); + _CopyWithImpl$Query$SystemServerProvider( + this._instance, + this._then, + ); final Query$SystemServerProvider _instance; @@ -3242,14 +5932,18 @@ class _CopyWithImpl$Query$SystemServerProvider static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemServerProvider( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$SystemServerProvider$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemServerProvider$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemServerProvider$system get system { final local$system = _instance.system; return CopyWith$Query$SystemServerProvider$system( @@ -3263,7 +5957,10 @@ class _CopyWithStubImpl$Query$SystemServerProvider TRes _res; - call({Query$SystemServerProvider$system? system, String? $__typename}) => + call({ + Query$SystemServerProvider$system? system, + String? $__typename, + }) => _res; CopyWith$Query$SystemServerProvider$system get system => CopyWith$Query$SystemServerProvider$system.stub(_res); @@ -3271,50 +5968,57 @@ class _CopyWithStubImpl$Query$SystemServerProvider const documentNodeQuerySystemServerProvider = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'SystemServerProvider'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'SystemServerProvider'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'provider'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'provider'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$SystemServerProvider _parserFn$Query$SystemServerProvider( Map data) => @@ -3322,52 +6026,54 @@ Query$SystemServerProvider _parserFn$Query$SystemServerProvider( class Options$Query$SystemServerProvider extends graphql.QueryOptions { - Options$Query$SystemServerProvider( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQuerySystemServerProvider, - parserFn: _parserFn$Query$SystemServerProvider); + Options$Query$SystemServerProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemServerProvider, + parserFn: _parserFn$Query$SystemServerProvider, + ); } class WatchOptions$Query$SystemServerProvider extends graphql.WatchQueryOptions { - WatchOptions$Query$SystemServerProvider( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQuerySystemServerProvider, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$SystemServerProvider); + WatchOptions$Query$SystemServerProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemServerProvider, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemServerProvider, + ); } class FetchMoreOptions$Query$SystemServerProvider @@ -3375,8 +6081,9 @@ class FetchMoreOptions$Query$SystemServerProvider FetchMoreOptions$Query$SystemServerProvider( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQuerySystemServerProvider); + updateQuery: updateQuery, + document: documentNodeQuerySystemServerProvider, + ); } extension ClientExtension$Query$SystemServerProvider on graphql.GraphQLClient { @@ -3388,59 +6095,88 @@ extension ClientExtension$Query$SystemServerProvider on graphql.GraphQLClient { watchQuery$SystemServerProvider( [WatchOptions$Query$SystemServerProvider? options]) => this.watchQuery(options ?? WatchOptions$Query$SystemServerProvider()); - void writeQuery$SystemServerProvider( - {required Query$SystemServerProvider data, bool broadcast = true}) => + void writeQuery$SystemServerProvider({ + required Query$SystemServerProvider data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQuerySystemServerProvider)), - data: data.toJson(), - broadcast: broadcast); - Query$SystemServerProvider? readQuery$SystemServerProvider( - {bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation( document: documentNodeQuerySystemServerProvider)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemServerProvider? readQuery$SystemServerProvider( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemServerProvider)), + optimistic: optimistic, + ); return result == null ? null : Query$SystemServerProvider.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$SystemServerProvider$system { - Query$SystemServerProvider$system( - {required this.provider, required this.$__typename}); + Query$SystemServerProvider$system({ + required this.provider, + required this.$__typename, + }); - @override factory Query$SystemServerProvider$system.fromJson( - Map json) => - _$Query$SystemServerProvider$systemFromJson(json); + Map json) { + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$SystemServerProvider$system( + provider: Query$SystemServerProvider$system$provider.fromJson( + (l$provider as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemServerProvider$system$provider provider; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemServerProvider$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = l$provider.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$provider = provider; final l$$__typename = $__typename; - return Object.hashAll([l$provider, l$$__typename]); + return Object.hashAll([ + l$provider, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemServerProvider$system) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$provider = provider; final lOther$provider = other.provider; - if (l$provider != lOther$provider) return false; + if (l$provider != lOther$provider) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3448,28 +6184,34 @@ class Query$SystemServerProvider$system { extension UtilityExtension$Query$SystemServerProvider$system on Query$SystemServerProvider$system { CopyWith$Query$SystemServerProvider$system - get copyWith => - CopyWith$Query$SystemServerProvider$system(this, (i) => i); + get copyWith => CopyWith$Query$SystemServerProvider$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemServerProvider$system { factory CopyWith$Query$SystemServerProvider$system( - Query$SystemServerProvider$system instance, - TRes Function(Query$SystemServerProvider$system) then) = - _CopyWithImpl$Query$SystemServerProvider$system; + Query$SystemServerProvider$system instance, + TRes Function(Query$SystemServerProvider$system) then, + ) = _CopyWithImpl$Query$SystemServerProvider$system; factory CopyWith$Query$SystemServerProvider$system.stub(TRes res) = _CopyWithStubImpl$Query$SystemServerProvider$system; - TRes call( - {Query$SystemServerProvider$system$provider? provider, - String? $__typename}); + TRes call({ + Query$SystemServerProvider$system$provider? provider, + String? $__typename, + }); CopyWith$Query$SystemServerProvider$system$provider get provider; } class _CopyWithImpl$Query$SystemServerProvider$system implements CopyWith$Query$SystemServerProvider$system { - _CopyWithImpl$Query$SystemServerProvider$system(this._instance, this._then); + _CopyWithImpl$Query$SystemServerProvider$system( + this._instance, + this._then, + ); final Query$SystemServerProvider$system _instance; @@ -3477,15 +6219,18 @@ class _CopyWithImpl$Query$SystemServerProvider$system static const _undefined = {}; - TRes call( - {Object? provider = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemServerProvider$system( - provider: provider == _undefined || provider == null - ? _instance.provider - : (provider as Query$SystemServerProvider$system$provider), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Query$SystemServerProvider$system$provider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemServerProvider$system$provider get provider { final local$provider = _instance.provider; return CopyWith$Query$SystemServerProvider$system$provider( @@ -3499,49 +6244,73 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system TRes _res; - call( - {Query$SystemServerProvider$system$provider? provider, - String? $__typename}) => + call({ + Query$SystemServerProvider$system$provider? provider, + String? $__typename, + }) => _res; CopyWith$Query$SystemServerProvider$system$provider get provider => CopyWith$Query$SystemServerProvider$system$provider.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemServerProvider$system$provider { - Query$SystemServerProvider$system$provider( - {required this.provider, required this.$__typename}); + Query$SystemServerProvider$system$provider({ + required this.provider, + required this.$__typename, + }); - @override factory Query$SystemServerProvider$system$provider.fromJson( - Map json) => - _$Query$SystemServerProvider$system$providerFromJson(json); + Map json) { + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$SystemServerProvider$system$provider( + provider: fromJson$Enum$ServerProvider((l$provider as String)), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(unknownEnumValue: Enum$ServerProvider.$unknown) final Enum$ServerProvider provider; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemServerProvider$system$providerToJson(this); + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$ServerProvider(l$provider); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$provider = provider; final l$$__typename = $__typename; - return Object.hashAll([l$provider, l$$__typename]); + return Object.hashAll([ + l$provider, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemServerProvider$system$provider) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$provider = provider; final lOther$provider = other.provider; - if (l$provider != lOther$provider) return false; + if (l$provider != lOther$provider) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3550,26 +6319,33 @@ extension UtilityExtension$Query$SystemServerProvider$system$provider on Query$SystemServerProvider$system$provider { CopyWith$Query$SystemServerProvider$system$provider< Query$SystemServerProvider$system$provider> - get copyWith => - CopyWith$Query$SystemServerProvider$system$provider(this, (i) => i); + get copyWith => CopyWith$Query$SystemServerProvider$system$provider( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemServerProvider$system$provider { factory CopyWith$Query$SystemServerProvider$system$provider( - Query$SystemServerProvider$system$provider instance, - TRes Function(Query$SystemServerProvider$system$provider) then) = - _CopyWithImpl$Query$SystemServerProvider$system$provider; + Query$SystemServerProvider$system$provider instance, + TRes Function(Query$SystemServerProvider$system$provider) then, + ) = _CopyWithImpl$Query$SystemServerProvider$system$provider; factory CopyWith$Query$SystemServerProvider$system$provider.stub(TRes res) = _CopyWithStubImpl$Query$SystemServerProvider$system$provider; - TRes call({Enum$ServerProvider? provider, String? $__typename}); + TRes call({ + Enum$ServerProvider? provider, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemServerProvider$system$provider implements CopyWith$Query$SystemServerProvider$system$provider { _CopyWithImpl$Query$SystemServerProvider$system$provider( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemServerProvider$system$provider _instance; @@ -3577,15 +6353,18 @@ class _CopyWithImpl$Query$SystemServerProvider$system$provider static const _undefined = {}; - TRes call( - {Object? provider = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemServerProvider$system$provider( - provider: provider == _undefined || provider == null - ? _instance.provider - : (provider as Enum$ServerProvider), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$ServerProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemServerProvider$system$provider @@ -3594,64 +6373,105 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system$provider TRes _res; - call({Enum$ServerProvider? provider, String? $__typename}) => _res; + call({ + Enum$ServerProvider? provider, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$SystemDnsProvider { - Query$SystemDnsProvider({required this.system, required this.$__typename}); + Query$SystemDnsProvider({ + required this.system, + required this.$__typename, + }); - @override - factory Query$SystemDnsProvider.fromJson(Map json) => - _$Query$SystemDnsProviderFromJson(json); + factory Query$SystemDnsProvider.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider( + system: Query$SystemDnsProvider$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemDnsProvider$system system; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemDnsProviderToJson(this); + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$system = system; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + return Object.hashAll([ + l$system, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$SystemDnsProvider) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemDnsProvider) || + runtimeType != other.runtimeType) { return false; + } final l$system = system; final lOther$system = other.system; - if (l$system != lOther$system) return false; + if (l$system != lOther$system) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$SystemDnsProvider on Query$SystemDnsProvider { CopyWith$Query$SystemDnsProvider get copyWith => - CopyWith$Query$SystemDnsProvider(this, (i) => i); + CopyWith$Query$SystemDnsProvider( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemDnsProvider { - factory CopyWith$Query$SystemDnsProvider(Query$SystemDnsProvider instance, - TRes Function(Query$SystemDnsProvider) then) = - _CopyWithImpl$Query$SystemDnsProvider; + factory CopyWith$Query$SystemDnsProvider( + Query$SystemDnsProvider instance, + TRes Function(Query$SystemDnsProvider) then, + ) = _CopyWithImpl$Query$SystemDnsProvider; factory CopyWith$Query$SystemDnsProvider.stub(TRes res) = _CopyWithStubImpl$Query$SystemDnsProvider; - TRes call({Query$SystemDnsProvider$system? system, String? $__typename}); + TRes call({ + Query$SystemDnsProvider$system? system, + String? $__typename, + }); CopyWith$Query$SystemDnsProvider$system get system; } class _CopyWithImpl$Query$SystemDnsProvider implements CopyWith$Query$SystemDnsProvider { - _CopyWithImpl$Query$SystemDnsProvider(this._instance, this._then); + _CopyWithImpl$Query$SystemDnsProvider( + this._instance, + this._then, + ); final Query$SystemDnsProvider _instance; @@ -3659,14 +6479,18 @@ class _CopyWithImpl$Query$SystemDnsProvider static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemDnsProvider( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$SystemDnsProvider$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemDnsProvider$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemDnsProvider$system get system { final local$system = _instance.system; return CopyWith$Query$SystemDnsProvider$system( @@ -3680,57 +6504,68 @@ class _CopyWithStubImpl$Query$SystemDnsProvider TRes _res; - call({Query$SystemDnsProvider$system? system, String? $__typename}) => _res; + call({ + Query$SystemDnsProvider$system? system, + String? $__typename, + }) => + _res; CopyWith$Query$SystemDnsProvider$system get system => CopyWith$Query$SystemDnsProvider$system.stub(_res); } const documentNodeQuerySystemDnsProvider = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'SystemDnsProvider'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'SystemDnsProvider'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'domainInfo'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'provider'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$SystemDnsProvider _parserFn$Query$SystemDnsProvider( Map data) => @@ -3738,52 +6573,54 @@ Query$SystemDnsProvider _parserFn$Query$SystemDnsProvider( class Options$Query$SystemDnsProvider extends graphql.QueryOptions { - Options$Query$SystemDnsProvider( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQuerySystemDnsProvider, - parserFn: _parserFn$Query$SystemDnsProvider); + Options$Query$SystemDnsProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemDnsProvider, + parserFn: _parserFn$Query$SystemDnsProvider, + ); } class WatchOptions$Query$SystemDnsProvider extends graphql.WatchQueryOptions { - WatchOptions$Query$SystemDnsProvider( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQuerySystemDnsProvider, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$SystemDnsProvider); + WatchOptions$Query$SystemDnsProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemDnsProvider, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemDnsProvider, + ); } class FetchMoreOptions$Query$SystemDnsProvider @@ -3791,8 +6628,9 @@ class FetchMoreOptions$Query$SystemDnsProvider FetchMoreOptions$Query$SystemDnsProvider( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQuerySystemDnsProvider); + updateQuery: updateQuery, + document: documentNodeQuerySystemDnsProvider, + ); } extension ClientExtension$Query$SystemDnsProvider on graphql.GraphQLClient { @@ -3802,57 +6640,87 @@ extension ClientExtension$Query$SystemDnsProvider on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$SystemDnsProvider( [WatchOptions$Query$SystemDnsProvider? options]) => this.watchQuery(options ?? WatchOptions$Query$SystemDnsProvider()); - void writeQuery$SystemDnsProvider( - {required Query$SystemDnsProvider data, bool broadcast = true}) => + void writeQuery$SystemDnsProvider({ + required Query$SystemDnsProvider data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQuerySystemDnsProvider)), - data: data.toJson(), - broadcast: broadcast); - Query$SystemDnsProvider? readQuery$SystemDnsProvider( - {bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation( document: documentNodeQuerySystemDnsProvider)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemDnsProvider? readQuery$SystemDnsProvider( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemDnsProvider)), + optimistic: optimistic, + ); return result == null ? null : Query$SystemDnsProvider.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$SystemDnsProvider$system { - Query$SystemDnsProvider$system( - {required this.domainInfo, required this.$__typename}); + Query$SystemDnsProvider$system({ + required this.domainInfo, + required this.$__typename, + }); - @override - factory Query$SystemDnsProvider$system.fromJson(Map json) => - _$Query$SystemDnsProvider$systemFromJson(json); + factory Query$SystemDnsProvider$system.fromJson(Map json) { + final l$domainInfo = json['domainInfo']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider$system( + domainInfo: Query$SystemDnsProvider$system$domainInfo.fromJson( + (l$domainInfo as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemDnsProvider$system$domainInfo domainInfo; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemDnsProvider$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$domainInfo = domainInfo; + _resultData['domainInfo'] = l$domainInfo.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$domainInfo = domainInfo; final l$$__typename = $__typename; - return Object.hashAll([l$domainInfo, l$$__typename]); + return Object.hashAll([ + l$domainInfo, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemDnsProvider$system) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$domainInfo = domainInfo; final lOther$domainInfo = other.domainInfo; - if (l$domainInfo != lOther$domainInfo) return false; + if (l$domainInfo != lOther$domainInfo) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3860,27 +6728,34 @@ class Query$SystemDnsProvider$system { extension UtilityExtension$Query$SystemDnsProvider$system on Query$SystemDnsProvider$system { CopyWith$Query$SystemDnsProvider$system - get copyWith => CopyWith$Query$SystemDnsProvider$system(this, (i) => i); + get copyWith => CopyWith$Query$SystemDnsProvider$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemDnsProvider$system { factory CopyWith$Query$SystemDnsProvider$system( - Query$SystemDnsProvider$system instance, - TRes Function(Query$SystemDnsProvider$system) then) = - _CopyWithImpl$Query$SystemDnsProvider$system; + Query$SystemDnsProvider$system instance, + TRes Function(Query$SystemDnsProvider$system) then, + ) = _CopyWithImpl$Query$SystemDnsProvider$system; factory CopyWith$Query$SystemDnsProvider$system.stub(TRes res) = _CopyWithStubImpl$Query$SystemDnsProvider$system; - TRes call( - {Query$SystemDnsProvider$system$domainInfo? domainInfo, - String? $__typename}); + TRes call({ + Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename, + }); CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo; } class _CopyWithImpl$Query$SystemDnsProvider$system implements CopyWith$Query$SystemDnsProvider$system { - _CopyWithImpl$Query$SystemDnsProvider$system(this._instance, this._then); + _CopyWithImpl$Query$SystemDnsProvider$system( + this._instance, + this._then, + ); final Query$SystemDnsProvider$system _instance; @@ -3888,16 +6763,18 @@ class _CopyWithImpl$Query$SystemDnsProvider$system static const _undefined = {}; - TRes call( - {Object? domainInfo = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? domainInfo = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemDnsProvider$system( - domainInfo: domainInfo == _undefined || domainInfo == null - ? _instance.domainInfo - : (domainInfo as Query$SystemDnsProvider$system$domainInfo), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + domainInfo: domainInfo == _undefined || domainInfo == null + ? _instance.domainInfo + : (domainInfo as Query$SystemDnsProvider$system$domainInfo), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo { final local$domainInfo = _instance.domainInfo; return CopyWith$Query$SystemDnsProvider$system$domainInfo( @@ -3911,49 +6788,73 @@ class _CopyWithStubImpl$Query$SystemDnsProvider$system TRes _res; - call( - {Query$SystemDnsProvider$system$domainInfo? domainInfo, - String? $__typename}) => + call({ + Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename, + }) => _res; CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo => CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemDnsProvider$system$domainInfo { - Query$SystemDnsProvider$system$domainInfo( - {required this.provider, required this.$__typename}); + Query$SystemDnsProvider$system$domainInfo({ + required this.provider, + required this.$__typename, + }); - @override factory Query$SystemDnsProvider$system$domainInfo.fromJson( - Map json) => - _$Query$SystemDnsProvider$system$domainInfoFromJson(json); + Map json) { + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider$system$domainInfo( + provider: fromJson$Enum$DnsProvider((l$provider as String)), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(unknownEnumValue: Enum$DnsProvider.$unknown) final Enum$DnsProvider provider; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemDnsProvider$system$domainInfoToJson(this); + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$DnsProvider(l$provider); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$provider = provider; final l$$__typename = $__typename; - return Object.hashAll([l$provider, l$$__typename]); + return Object.hashAll([ + l$provider, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemDnsProvider$system$domainInfo) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$provider = provider; final lOther$provider = other.provider; - if (l$provider != lOther$provider) return false; + if (l$provider != lOther$provider) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3962,26 +6863,33 @@ extension UtilityExtension$Query$SystemDnsProvider$system$domainInfo on Query$SystemDnsProvider$system$domainInfo { CopyWith$Query$SystemDnsProvider$system$domainInfo< Query$SystemDnsProvider$system$domainInfo> - get copyWith => - CopyWith$Query$SystemDnsProvider$system$domainInfo(this, (i) => i); + get copyWith => CopyWith$Query$SystemDnsProvider$system$domainInfo( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemDnsProvider$system$domainInfo { factory CopyWith$Query$SystemDnsProvider$system$domainInfo( - Query$SystemDnsProvider$system$domainInfo instance, - TRes Function(Query$SystemDnsProvider$system$domainInfo) then) = - _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo; + Query$SystemDnsProvider$system$domainInfo instance, + TRes Function(Query$SystemDnsProvider$system$domainInfo) then, + ) = _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo; factory CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(TRes res) = _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo; - TRes call({Enum$DnsProvider? provider, String? $__typename}); + TRes call({ + Enum$DnsProvider? provider, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo implements CopyWith$Query$SystemDnsProvider$system$domainInfo { _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemDnsProvider$system$domainInfo _instance; @@ -3989,15 +6897,18 @@ class _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo static const _undefined = {}; - TRes call( - {Object? provider = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemDnsProvider$system$domainInfo( - provider: provider == _undefined || provider == null - ? _instance.provider - : (provider as Enum$DnsProvider), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$DnsProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo @@ -4006,64 +6917,103 @@ class _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo TRes _res; - call({Enum$DnsProvider? provider, String? $__typename}) => _res; + call({ + Enum$DnsProvider? provider, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiTokens { - Query$GetApiTokens({required this.api, required this.$__typename}); + Query$GetApiTokens({ + required this.api, + required this.$__typename, + }); - @override - factory Query$GetApiTokens.fromJson(Map json) => - _$Query$GetApiTokensFromJson(json); + factory Query$GetApiTokens.fromJson(Map json) { + final l$api = json['api']; + final l$$__typename = json['__typename']; + return Query$GetApiTokens( + api: Query$GetApiTokens$api.fromJson((l$api as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$GetApiTokens$api api; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokensToJson(this); + Map toJson() { + final _resultData = {}; + final l$api = api; + _resultData['api'] = l$api.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$api = api; final l$$__typename = $__typename; - return Object.hashAll([l$api, l$$__typename]); + return Object.hashAll([ + l$api, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiTokens) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiTokens) || runtimeType != other.runtimeType) { return false; + } final l$api = api; final lOther$api = other.api; - if (l$api != lOther$api) return false; + if (l$api != lOther$api) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiTokens on Query$GetApiTokens { CopyWith$Query$GetApiTokens get copyWith => - CopyWith$Query$GetApiTokens(this, (i) => i); + CopyWith$Query$GetApiTokens( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiTokens { factory CopyWith$Query$GetApiTokens( - Query$GetApiTokens instance, TRes Function(Query$GetApiTokens) then) = - _CopyWithImpl$Query$GetApiTokens; + Query$GetApiTokens instance, + TRes Function(Query$GetApiTokens) then, + ) = _CopyWithImpl$Query$GetApiTokens; factory CopyWith$Query$GetApiTokens.stub(TRes res) = _CopyWithStubImpl$Query$GetApiTokens; - TRes call({Query$GetApiTokens$api? api, String? $__typename}); + TRes call({ + Query$GetApiTokens$api? api, + String? $__typename, + }); CopyWith$Query$GetApiTokens$api get api; } class _CopyWithImpl$Query$GetApiTokens implements CopyWith$Query$GetApiTokens { - _CopyWithImpl$Query$GetApiTokens(this._instance, this._then); + _CopyWithImpl$Query$GetApiTokens( + this._instance, + this._then, + ); final Query$GetApiTokens _instance; @@ -4071,14 +7021,18 @@ class _CopyWithImpl$Query$GetApiTokens static const _undefined = {}; - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? api = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiTokens( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiTokens$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiTokens$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetApiTokens$api get api { final local$api = _instance.api; return CopyWith$Query$GetApiTokens$api(local$api, (e) => call(api: e)); @@ -4091,128 +7045,145 @@ class _CopyWithStubImpl$Query$GetApiTokens TRes _res; - call({Query$GetApiTokens$api? api, String? $__typename}) => _res; + call({ + Query$GetApiTokens$api? api, + String? $__typename, + }) => + _res; CopyWith$Query$GetApiTokens$api get api => CopyWith$Query$GetApiTokens$api.stub(_res); } const documentNodeQueryGetApiTokens = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetApiTokens'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'api'), + type: OperationType.query, + name: NameNode(value: 'GetApiTokens'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'devices'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'devices'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'creationDate'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isCaller'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'creationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'isCaller'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetApiTokens _parserFn$Query$GetApiTokens(Map data) => Query$GetApiTokens.fromJson(data); class Options$Query$GetApiTokens extends graphql.QueryOptions { - Options$Query$GetApiTokens( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetApiTokens, - parserFn: _parserFn$Query$GetApiTokens); + Options$Query$GetApiTokens({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiTokens, + parserFn: _parserFn$Query$GetApiTokens, + ); } class WatchOptions$Query$GetApiTokens extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiTokens( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetApiTokens, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiTokens); + WatchOptions$Query$GetApiTokens({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiTokens, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiTokens, + ); } class FetchMoreOptions$Query$GetApiTokens extends graphql.FetchMoreOptions { FetchMoreOptions$Query$GetApiTokens( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, document: documentNodeQueryGetApiTokens); + updateQuery: updateQuery, + document: documentNodeQueryGetApiTokens, + ); } extension ClientExtension$Query$GetApiTokens on graphql.GraphQLClient { @@ -4222,81 +7193,120 @@ extension ClientExtension$Query$GetApiTokens on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetApiTokens( [WatchOptions$Query$GetApiTokens? options]) => this.watchQuery(options ?? WatchOptions$Query$GetApiTokens()); - void writeQuery$GetApiTokens( - {required Query$GetApiTokens data, bool broadcast = true}) => + void writeQuery$GetApiTokens({ + required Query$GetApiTokens data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryGetApiTokens)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiTokens? readQuery$GetApiTokens({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryGetApiTokens)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetApiTokens? readQuery$GetApiTokens({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiTokens)), + optimistic: optimistic, + ); return result == null ? null : Query$GetApiTokens.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetApiTokens$api { - Query$GetApiTokens$api({required this.devices, required this.$__typename}); + Query$GetApiTokens$api({ + required this.devices, + required this.$__typename, + }); - @override - factory Query$GetApiTokens$api.fromJson(Map json) => - _$Query$GetApiTokens$apiFromJson(json); + factory Query$GetApiTokens$api.fromJson(Map json) { + final l$devices = json['devices']; + final l$$__typename = json['__typename']; + return Query$GetApiTokens$api( + devices: (l$devices as List) + .map((e) => Query$GetApiTokens$api$devices.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List devices; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokens$apiToJson(this); + Map toJson() { + final _resultData = {}; + final l$devices = devices; + _resultData['devices'] = l$devices.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$devices = devices; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$devices.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$devices.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiTokens$api) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiTokens$api) || + runtimeType != other.runtimeType) { return false; + } final l$devices = devices; final lOther$devices = other.devices; - if (l$devices.length != lOther$devices.length) return false; + if (l$devices.length != lOther$devices.length) { + return false; + } for (int i = 0; i < l$devices.length; i++) { final l$devices$entry = l$devices[i]; final lOther$devices$entry = lOther$devices[i]; - if (l$devices$entry != lOther$devices$entry) return false; + if (l$devices$entry != lOther$devices$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiTokens$api on Query$GetApiTokens$api { CopyWith$Query$GetApiTokens$api get copyWith => - CopyWith$Query$GetApiTokens$api(this, (i) => i); + CopyWith$Query$GetApiTokens$api( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiTokens$api { - factory CopyWith$Query$GetApiTokens$api(Query$GetApiTokens$api instance, - TRes Function(Query$GetApiTokens$api) then) = - _CopyWithImpl$Query$GetApiTokens$api; + factory CopyWith$Query$GetApiTokens$api( + Query$GetApiTokens$api instance, + TRes Function(Query$GetApiTokens$api) then, + ) = _CopyWithImpl$Query$GetApiTokens$api; factory CopyWith$Query$GetApiTokens$api.stub(TRes res) = _CopyWithStubImpl$Query$GetApiTokens$api; - TRes call( - {List? devices, String? $__typename}); + TRes call({ + List? devices, + String? $__typename, + }); TRes devices( Iterable Function( Iterable< @@ -4307,7 +7317,10 @@ abstract class CopyWith$Query$GetApiTokens$api { class _CopyWithImpl$Query$GetApiTokens$api implements CopyWith$Query$GetApiTokens$api { - _CopyWithImpl$Query$GetApiTokens$api(this._instance, this._then); + _CopyWithImpl$Query$GetApiTokens$api( + this._instance, + this._then, + ); final Query$GetApiTokens$api _instance; @@ -4315,14 +7328,18 @@ class _CopyWithImpl$Query$GetApiTokens$api static const _undefined = {}; - TRes call({Object? devices = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? devices = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiTokens$api( - devices: devices == _undefined || devices == null - ? _instance.devices - : (devices as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + devices: devices == _undefined || devices == null + ? _instance.devices + : (devices as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes devices( Iterable Function( Iterable< @@ -4330,9 +7347,11 @@ class _CopyWithImpl$Query$GetApiTokens$api Query$GetApiTokens$api$devices>>) _fn) => call( - devices: _fn(_instance.devices.map( - (e) => CopyWith$Query$GetApiTokens$api$devices(e, (i) => i))) - .toList()); + devices: _fn(_instance.devices + .map((e) => CopyWith$Query$GetApiTokens$api$devices( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetApiTokens$api @@ -4341,59 +7360,99 @@ class _CopyWithStubImpl$Query$GetApiTokens$api TRes _res; - call({List? devices, String? $__typename}) => + call({ + List? devices, + String? $__typename, + }) => _res; devices(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiTokens$api$devices { - Query$GetApiTokens$api$devices( - {required this.creationDate, - required this.isCaller, - required this.name, - required this.$__typename}); + Query$GetApiTokens$api$devices({ + required this.creationDate, + required this.isCaller, + required this.name, + required this.$__typename, + }); - @override - factory Query$GetApiTokens$api$devices.fromJson(Map json) => - _$Query$GetApiTokens$api$devicesFromJson(json); + factory Query$GetApiTokens$api$devices.fromJson(Map json) { + final l$creationDate = json['creationDate']; + final l$isCaller = json['isCaller']; + final l$name = json['name']; + final l$$__typename = json['__typename']; + return Query$GetApiTokens$api$devices( + creationDate: dateTimeFromJson(l$creationDate), + isCaller: (l$isCaller as bool), + name: (l$name as String), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime creationDate; final bool isCaller; final String name; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokens$api$devicesToJson(this); + Map toJson() { + final _resultData = {}; + final l$creationDate = creationDate; + _resultData['creationDate'] = dateTimeToJson(l$creationDate); + final l$isCaller = isCaller; + _resultData['isCaller'] = l$isCaller; + final l$name = name; + _resultData['name'] = l$name; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$creationDate = creationDate; final l$isCaller = isCaller; final l$name = name; final l$$__typename = $__typename; - return Object.hashAll([l$creationDate, l$isCaller, l$name, l$$__typename]); + return Object.hashAll([ + l$creationDate, + l$isCaller, + l$name, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetApiTokens$api$devices) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$creationDate = creationDate; final lOther$creationDate = other.creationDate; - if (l$creationDate != lOther$creationDate) return false; + if (l$creationDate != lOther$creationDate) { + return false; + } final l$isCaller = isCaller; final lOther$isCaller = other.isCaller; - if (l$isCaller != lOther$isCaller) return false; + if (l$isCaller != lOther$isCaller) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -4401,28 +7460,35 @@ class Query$GetApiTokens$api$devices { extension UtilityExtension$Query$GetApiTokens$api$devices on Query$GetApiTokens$api$devices { CopyWith$Query$GetApiTokens$api$devices - get copyWith => CopyWith$Query$GetApiTokens$api$devices(this, (i) => i); + get copyWith => CopyWith$Query$GetApiTokens$api$devices( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiTokens$api$devices { factory CopyWith$Query$GetApiTokens$api$devices( - Query$GetApiTokens$api$devices instance, - TRes Function(Query$GetApiTokens$api$devices) then) = - _CopyWithImpl$Query$GetApiTokens$api$devices; + Query$GetApiTokens$api$devices instance, + TRes Function(Query$GetApiTokens$api$devices) then, + ) = _CopyWithImpl$Query$GetApiTokens$api$devices; factory CopyWith$Query$GetApiTokens$api$devices.stub(TRes res) = _CopyWithStubImpl$Query$GetApiTokens$api$devices; - TRes call( - {DateTime? creationDate, - bool? isCaller, - String? name, - String? $__typename}); + TRes call({ + DateTime? creationDate, + bool? isCaller, + String? name, + String? $__typename, + }); } class _CopyWithImpl$Query$GetApiTokens$api$devices implements CopyWith$Query$GetApiTokens$api$devices { - _CopyWithImpl$Query$GetApiTokens$api$devices(this._instance, this._then); + _CopyWithImpl$Query$GetApiTokens$api$devices( + this._instance, + this._then, + ); final Query$GetApiTokens$api$devices _instance; @@ -4430,24 +7496,26 @@ class _CopyWithImpl$Query$GetApiTokens$api$devices static const _undefined = {}; - TRes call( - {Object? creationDate = _undefined, - Object? isCaller = _undefined, - Object? name = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? creationDate = _undefined, + Object? isCaller = _undefined, + Object? name = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiTokens$api$devices( - creationDate: creationDate == _undefined || creationDate == null - ? _instance.creationDate - : (creationDate as DateTime), - isCaller: isCaller == _undefined || isCaller == null - ? _instance.isCaller - : (isCaller as bool), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + creationDate: creationDate == _undefined || creationDate == null + ? _instance.creationDate + : (creationDate as DateTime), + isCaller: isCaller == _undefined || isCaller == null + ? _instance.isCaller + : (isCaller as bool), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetApiTokens$api$devices @@ -4456,69 +7524,105 @@ class _CopyWithStubImpl$Query$GetApiTokens$api$devices TRes _res; - call( - {DateTime? creationDate, - bool? isCaller, - String? name, - String? $__typename}) => + call({ + DateTime? creationDate, + bool? isCaller, + String? name, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Query$RecoveryKey { - Query$RecoveryKey({required this.api, required this.$__typename}); + Query$RecoveryKey({ + required this.api, + required this.$__typename, + }); - @override - factory Query$RecoveryKey.fromJson(Map json) => - _$Query$RecoveryKeyFromJson(json); + factory Query$RecoveryKey.fromJson(Map json) { + final l$api = json['api']; + final l$$__typename = json['__typename']; + return Query$RecoveryKey( + api: Query$RecoveryKey$api.fromJson((l$api as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$RecoveryKey$api api; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$RecoveryKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$api = api; + _resultData['api'] = l$api.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$api = api; final l$$__typename = $__typename; - return Object.hashAll([l$api, l$$__typename]); + return Object.hashAll([ + l$api, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$RecoveryKey) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$RecoveryKey) || runtimeType != other.runtimeType) { return false; + } final l$api = api; final lOther$api = other.api; - if (l$api != lOther$api) return false; + if (l$api != lOther$api) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$RecoveryKey on Query$RecoveryKey { CopyWith$Query$RecoveryKey get copyWith => - CopyWith$Query$RecoveryKey(this, (i) => i); + CopyWith$Query$RecoveryKey( + this, + (i) => i, + ); } abstract class CopyWith$Query$RecoveryKey { factory CopyWith$Query$RecoveryKey( - Query$RecoveryKey instance, TRes Function(Query$RecoveryKey) then) = - _CopyWithImpl$Query$RecoveryKey; + Query$RecoveryKey instance, + TRes Function(Query$RecoveryKey) then, + ) = _CopyWithImpl$Query$RecoveryKey; factory CopyWith$Query$RecoveryKey.stub(TRes res) = _CopyWithStubImpl$Query$RecoveryKey; - TRes call({Query$RecoveryKey$api? api, String? $__typename}); + TRes call({ + Query$RecoveryKey$api? api, + String? $__typename, + }); CopyWith$Query$RecoveryKey$api get api; } class _CopyWithImpl$Query$RecoveryKey implements CopyWith$Query$RecoveryKey { - _CopyWithImpl$Query$RecoveryKey(this._instance, this._then); + _CopyWithImpl$Query$RecoveryKey( + this._instance, + this._then, + ); final Query$RecoveryKey _instance; @@ -4526,14 +7630,18 @@ class _CopyWithImpl$Query$RecoveryKey static const _undefined = {}; - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? api = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$RecoveryKey( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$RecoveryKey$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + api: api == _undefined || api == null + ? _instance.api + : (api as Query$RecoveryKey$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$RecoveryKey$api get api { final local$api = _instance.api; return CopyWith$Query$RecoveryKey$api(local$api, (e) => call(api: e)); @@ -4546,138 +7654,158 @@ class _CopyWithStubImpl$Query$RecoveryKey TRes _res; - call({Query$RecoveryKey$api? api, String? $__typename}) => _res; + call({ + Query$RecoveryKey$api? api, + String? $__typename, + }) => + _res; CopyWith$Query$RecoveryKey$api get api => CopyWith$Query$RecoveryKey$api.stub(_res); } const documentNodeQueryRecoveryKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'RecoveryKey'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'api'), + type: OperationType.query, + name: NameNode(value: 'RecoveryKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'recoveryKey'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'recoveryKey'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'creationDate'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'exists'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'expirationDate'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'usesLeft'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'valid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'creationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'exists'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'expirationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usesLeft'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'valid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$RecoveryKey _parserFn$Query$RecoveryKey(Map data) => Query$RecoveryKey.fromJson(data); class Options$Query$RecoveryKey extends graphql.QueryOptions { - Options$Query$RecoveryKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryRecoveryKey, - parserFn: _parserFn$Query$RecoveryKey); + Options$Query$RecoveryKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryRecoveryKey, + parserFn: _parserFn$Query$RecoveryKey, + ); } class WatchOptions$Query$RecoveryKey extends graphql.WatchQueryOptions { - WatchOptions$Query$RecoveryKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryRecoveryKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$RecoveryKey); + WatchOptions$Query$RecoveryKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryRecoveryKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$RecoveryKey, + ); } class FetchMoreOptions$Query$RecoveryKey extends graphql.FetchMoreOptions { FetchMoreOptions$Query$RecoveryKey({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryRecoveryKey); + : super( + updateQuery: updateQuery, + document: documentNodeQueryRecoveryKey, + ); } extension ClientExtension$Query$RecoveryKey on graphql.GraphQLClient { @@ -4687,80 +7815,118 @@ extension ClientExtension$Query$RecoveryKey on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$RecoveryKey( [WatchOptions$Query$RecoveryKey? options]) => this.watchQuery(options ?? WatchOptions$Query$RecoveryKey()); - void writeQuery$RecoveryKey( - {required Query$RecoveryKey data, bool broadcast = true}) => + void writeQuery$RecoveryKey({ + required Query$RecoveryKey data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryRecoveryKey)), - data: data.toJson(), - broadcast: broadcast); - Query$RecoveryKey? readQuery$RecoveryKey({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryRecoveryKey)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$RecoveryKey? readQuery$RecoveryKey({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryRecoveryKey)), + optimistic: optimistic, + ); return result == null ? null : Query$RecoveryKey.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$RecoveryKey$api { - Query$RecoveryKey$api({required this.recoveryKey, required this.$__typename}); + Query$RecoveryKey$api({ + required this.recoveryKey, + required this.$__typename, + }); - @override - factory Query$RecoveryKey$api.fromJson(Map json) => - _$Query$RecoveryKey$apiFromJson(json); + factory Query$RecoveryKey$api.fromJson(Map json) { + final l$recoveryKey = json['recoveryKey']; + final l$$__typename = json['__typename']; + return Query$RecoveryKey$api( + recoveryKey: Query$RecoveryKey$api$recoveryKey.fromJson( + (l$recoveryKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$RecoveryKey$api$recoveryKey recoveryKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$RecoveryKey$apiToJson(this); + Map toJson() { + final _resultData = {}; + final l$recoveryKey = recoveryKey; + _resultData['recoveryKey'] = l$recoveryKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$recoveryKey = recoveryKey; final l$$__typename = $__typename; - return Object.hashAll([l$recoveryKey, l$$__typename]); + return Object.hashAll([ + l$recoveryKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$RecoveryKey$api) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$RecoveryKey$api) || runtimeType != other.runtimeType) { return false; + } final l$recoveryKey = recoveryKey; final lOther$recoveryKey = other.recoveryKey; - if (l$recoveryKey != lOther$recoveryKey) return false; + if (l$recoveryKey != lOther$recoveryKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$RecoveryKey$api on Query$RecoveryKey$api { CopyWith$Query$RecoveryKey$api get copyWith => - CopyWith$Query$RecoveryKey$api(this, (i) => i); + CopyWith$Query$RecoveryKey$api( + this, + (i) => i, + ); } abstract class CopyWith$Query$RecoveryKey$api { - factory CopyWith$Query$RecoveryKey$api(Query$RecoveryKey$api instance, - TRes Function(Query$RecoveryKey$api) then) = - _CopyWithImpl$Query$RecoveryKey$api; + factory CopyWith$Query$RecoveryKey$api( + Query$RecoveryKey$api instance, + TRes Function(Query$RecoveryKey$api) then, + ) = _CopyWithImpl$Query$RecoveryKey$api; factory CopyWith$Query$RecoveryKey$api.stub(TRes res) = _CopyWithStubImpl$Query$RecoveryKey$api; - TRes call( - {Query$RecoveryKey$api$recoveryKey? recoveryKey, String? $__typename}); + TRes call({ + Query$RecoveryKey$api$recoveryKey? recoveryKey, + String? $__typename, + }); CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey; } class _CopyWithImpl$Query$RecoveryKey$api implements CopyWith$Query$RecoveryKey$api { - _CopyWithImpl$Query$RecoveryKey$api(this._instance, this._then); + _CopyWithImpl$Query$RecoveryKey$api( + this._instance, + this._then, + ); final Query$RecoveryKey$api _instance; @@ -4768,16 +7934,18 @@ class _CopyWithImpl$Query$RecoveryKey$api static const _undefined = {}; - TRes call( - {Object? recoveryKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? recoveryKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$RecoveryKey$api( - recoveryKey: recoveryKey == _undefined || recoveryKey == null - ? _instance.recoveryKey - : (recoveryKey as Query$RecoveryKey$api$recoveryKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + recoveryKey: recoveryKey == _undefined || recoveryKey == null + ? _instance.recoveryKey + : (recoveryKey as Query$RecoveryKey$api$recoveryKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey { final local$recoveryKey = _instance.recoveryKey; return CopyWith$Query$RecoveryKey$api$recoveryKey( @@ -4791,46 +7959,77 @@ class _CopyWithStubImpl$Query$RecoveryKey$api TRes _res; - call({Query$RecoveryKey$api$recoveryKey? recoveryKey, String? $__typename}) => + call({ + Query$RecoveryKey$api$recoveryKey? recoveryKey, + String? $__typename, + }) => _res; CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey => CopyWith$Query$RecoveryKey$api$recoveryKey.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$RecoveryKey$api$recoveryKey { - Query$RecoveryKey$api$recoveryKey( - {this.creationDate, - required this.exists, - this.expirationDate, - this.usesLeft, - required this.valid, - required this.$__typename}); + Query$RecoveryKey$api$recoveryKey({ + this.creationDate, + required this.exists, + this.expirationDate, + this.usesLeft, + required this.valid, + required this.$__typename, + }); - @override factory Query$RecoveryKey$api$recoveryKey.fromJson( - Map json) => - _$Query$RecoveryKey$api$recoveryKeyFromJson(json); + Map json) { + final l$creationDate = json['creationDate']; + final l$exists = json['exists']; + final l$expirationDate = json['expirationDate']; + final l$usesLeft = json['usesLeft']; + final l$valid = json['valid']; + final l$$__typename = json['__typename']; + return Query$RecoveryKey$api$recoveryKey( + creationDate: + l$creationDate == null ? null : dateTimeFromJson(l$creationDate), + exists: (l$exists as bool), + expirationDate: + l$expirationDate == null ? null : dateTimeFromJson(l$expirationDate), + usesLeft: (l$usesLeft as int?), + valid: (l$valid as bool), + $__typename: (l$$__typename as String), + ); + } - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? creationDate; final bool exists; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? expirationDate; final int? usesLeft; final bool valid; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$RecoveryKey$api$recoveryKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$creationDate = creationDate; + _resultData['creationDate'] = + l$creationDate == null ? null : dateTimeToJson(l$creationDate); + final l$exists = exists; + _resultData['exists'] = l$exists; + final l$expirationDate = expirationDate; + _resultData['expirationDate'] = + l$expirationDate == null ? null : dateTimeToJson(l$expirationDate); + final l$usesLeft = usesLeft; + _resultData['usesLeft'] = l$usesLeft; + final l$valid = valid; + _resultData['valid'] = l$valid; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$creationDate = creationDate; final l$exists = exists; @@ -4844,33 +8043,49 @@ class Query$RecoveryKey$api$recoveryKey { l$expirationDate, l$usesLeft, l$valid, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$RecoveryKey$api$recoveryKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$creationDate = creationDate; final lOther$creationDate = other.creationDate; - if (l$creationDate != lOther$creationDate) return false; + if (l$creationDate != lOther$creationDate) { + return false; + } final l$exists = exists; final lOther$exists = other.exists; - if (l$exists != lOther$exists) return false; + if (l$exists != lOther$exists) { + return false; + } final l$expirationDate = expirationDate; final lOther$expirationDate = other.expirationDate; - if (l$expirationDate != lOther$expirationDate) return false; + if (l$expirationDate != lOther$expirationDate) { + return false; + } final l$usesLeft = usesLeft; final lOther$usesLeft = other.usesLeft; - if (l$usesLeft != lOther$usesLeft) return false; + if (l$usesLeft != lOther$usesLeft) { + return false; + } final l$valid = valid; final lOther$valid = other.valid; - if (l$valid != lOther$valid) return false; + if (l$valid != lOther$valid) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -4878,31 +8093,37 @@ class Query$RecoveryKey$api$recoveryKey { extension UtilityExtension$Query$RecoveryKey$api$recoveryKey on Query$RecoveryKey$api$recoveryKey { CopyWith$Query$RecoveryKey$api$recoveryKey - get copyWith => - CopyWith$Query$RecoveryKey$api$recoveryKey(this, (i) => i); + get copyWith => CopyWith$Query$RecoveryKey$api$recoveryKey( + this, + (i) => i, + ); } abstract class CopyWith$Query$RecoveryKey$api$recoveryKey { factory CopyWith$Query$RecoveryKey$api$recoveryKey( - Query$RecoveryKey$api$recoveryKey instance, - TRes Function(Query$RecoveryKey$api$recoveryKey) then) = - _CopyWithImpl$Query$RecoveryKey$api$recoveryKey; + Query$RecoveryKey$api$recoveryKey instance, + TRes Function(Query$RecoveryKey$api$recoveryKey) then, + ) = _CopyWithImpl$Query$RecoveryKey$api$recoveryKey; factory CopyWith$Query$RecoveryKey$api$recoveryKey.stub(TRes res) = _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey; - TRes call( - {DateTime? creationDate, - bool? exists, - DateTime? expirationDate, - int? usesLeft, - bool? valid, - String? $__typename}); + TRes call({ + DateTime? creationDate, + bool? exists, + DateTime? expirationDate, + int? usesLeft, + bool? valid, + String? $__typename, + }); } class _CopyWithImpl$Query$RecoveryKey$api$recoveryKey implements CopyWith$Query$RecoveryKey$api$recoveryKey { - _CopyWithImpl$Query$RecoveryKey$api$recoveryKey(this._instance, this._then); + _CopyWithImpl$Query$RecoveryKey$api$recoveryKey( + this._instance, + this._then, + ); final Query$RecoveryKey$api$recoveryKey _instance; @@ -4910,31 +8131,33 @@ class _CopyWithImpl$Query$RecoveryKey$api$recoveryKey static const _undefined = {}; - TRes call( - {Object? creationDate = _undefined, - Object? exists = _undefined, - Object? expirationDate = _undefined, - Object? usesLeft = _undefined, - Object? valid = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? creationDate = _undefined, + Object? exists = _undefined, + Object? expirationDate = _undefined, + Object? usesLeft = _undefined, + Object? valid = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$RecoveryKey$api$recoveryKey( - creationDate: creationDate == _undefined - ? _instance.creationDate - : (creationDate as DateTime?), - exists: exists == _undefined || exists == null - ? _instance.exists - : (exists as bool), - expirationDate: expirationDate == _undefined - ? _instance.expirationDate - : (expirationDate as DateTime?), - usesLeft: - usesLeft == _undefined ? _instance.usesLeft : (usesLeft as int?), - valid: valid == _undefined || valid == null - ? _instance.valid - : (valid as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + creationDate: creationDate == _undefined + ? _instance.creationDate + : (creationDate as DateTime?), + exists: exists == _undefined || exists == null + ? _instance.exists + : (exists as bool), + expirationDate: expirationDate == _undefined + ? _instance.expirationDate + : (expirationDate as DateTime?), + usesLeft: + usesLeft == _undefined ? _instance.usesLeft : (usesLeft as int?), + valid: valid == _undefined || valid == null + ? _instance.valid + : (valid as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey @@ -4943,56 +8166,90 @@ class _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey TRes _res; - call( - {DateTime? creationDate, - bool? exists, - DateTime? expirationDate, - int? usesLeft, - bool? valid, - String? $__typename}) => + call({ + DateTime? creationDate, + bool? exists, + DateTime? expirationDate, + int? usesLeft, + bool? valid, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$GetNewRecoveryApiKey { - Variables$Mutation$GetNewRecoveryApiKey({this.limits}); + factory Variables$Mutation$GetNewRecoveryApiKey( + {Input$RecoveryKeyLimitsInput? limits}) => + Variables$Mutation$GetNewRecoveryApiKey._({ + if (limits != null) r'limits': limits, + }); + + Variables$Mutation$GetNewRecoveryApiKey._(this._$data); - @override factory Variables$Mutation$GetNewRecoveryApiKey.fromJson( - Map json) => - _$Variables$Mutation$GetNewRecoveryApiKeyFromJson(json); - - final Input$RecoveryKeyLimitsInput? limits; - - Map toJson() => - _$Variables$Mutation$GetNewRecoveryApiKeyToJson(this); - int get hashCode { - final l$limits = limits; - return Object.hashAll([l$limits]); + Map data) { + final result$data = {}; + if (data.containsKey('limits')) { + final l$limits = data['limits']; + result$data['limits'] = l$limits == null + ? null + : Input$RecoveryKeyLimitsInput.fromJson( + (l$limits as Map)); + } + return Variables$Mutation$GetNewRecoveryApiKey._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$GetNewRecoveryApiKey) || - runtimeType != other.runtimeType) return false; - final l$limits = limits; - final lOther$limits = other.limits; - if (l$limits != lOther$limits) return false; - return true; + Map _$data; + + Input$RecoveryKeyLimitsInput? get limits => + (_$data['limits'] as Input$RecoveryKeyLimitsInput?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('limits')) { + final l$limits = limits; + result$data['limits'] = l$limits?.toJson(); + } + return result$data; } CopyWith$Variables$Mutation$GetNewRecoveryApiKey< Variables$Mutation$GetNewRecoveryApiKey> - get copyWith => - CopyWith$Variables$Mutation$GetNewRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$GetNewRecoveryApiKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$GetNewRecoveryApiKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$limits = limits; + final lOther$limits = other.limits; + if (_$data.containsKey('limits') != other._$data.containsKey('limits')) { + return false; + } + if (l$limits != lOther$limits) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$limits = limits; + return Object.hashAll([_$data.containsKey('limits') ? l$limits : const {}]); + } } abstract class CopyWith$Variables$Mutation$GetNewRecoveryApiKey { factory CopyWith$Variables$Mutation$GetNewRecoveryApiKey( - Variables$Mutation$GetNewRecoveryApiKey instance, - TRes Function(Variables$Mutation$GetNewRecoveryApiKey) then) = - _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey; + Variables$Mutation$GetNewRecoveryApiKey instance, + TRes Function(Variables$Mutation$GetNewRecoveryApiKey) then, + ) = _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey; factory CopyWith$Variables$Mutation$GetNewRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey; @@ -5003,7 +8260,9 @@ abstract class CopyWith$Variables$Mutation$GetNewRecoveryApiKey { class _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey implements CopyWith$Variables$Mutation$GetNewRecoveryApiKey { _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$GetNewRecoveryApiKey _instance; @@ -5012,10 +8271,11 @@ class _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey static const _undefined = {}; TRes call({Object? limits = _undefined}) => - _then(Variables$Mutation$GetNewRecoveryApiKey( - limits: limits == _undefined - ? _instance.limits - : (limits as Input$RecoveryKeyLimitsInput?))); + _then(Variables$Mutation$GetNewRecoveryApiKey._({ + ..._instance._$data, + if (limits != _undefined) + 'limits': (limits as Input$RecoveryKeyLimitsInput?), + })); } class _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey @@ -5027,38 +8287,65 @@ class _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey call({Input$RecoveryKeyLimitsInput? limits}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewRecoveryApiKey { - Mutation$GetNewRecoveryApiKey( - {required this.getNewRecoveryApiKey, required this.$__typename}); + Mutation$GetNewRecoveryApiKey({ + required this.getNewRecoveryApiKey, + required this.$__typename, + }); - @override - factory Mutation$GetNewRecoveryApiKey.fromJson(Map json) => - _$Mutation$GetNewRecoveryApiKeyFromJson(json); + factory Mutation$GetNewRecoveryApiKey.fromJson(Map json) { + final l$getNewRecoveryApiKey = json['getNewRecoveryApiKey']; + final l$$__typename = json['__typename']; + return Mutation$GetNewRecoveryApiKey( + getNewRecoveryApiKey: + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( + (l$getNewRecoveryApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey getNewRecoveryApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$GetNewRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$getNewRecoveryApiKey = getNewRecoveryApiKey; + _resultData['getNewRecoveryApiKey'] = l$getNewRecoveryApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getNewRecoveryApiKey = getNewRecoveryApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$getNewRecoveryApiKey, l$$__typename]); + return Object.hashAll([ + l$getNewRecoveryApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$getNewRecoveryApiKey = getNewRecoveryApiKey; final lOther$getNewRecoveryApiKey = other.getNewRecoveryApiKey; - if (l$getNewRecoveryApiKey != lOther$getNewRecoveryApiKey) return false; + if (l$getNewRecoveryApiKey != lOther$getNewRecoveryApiKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -5066,28 +8353,35 @@ class Mutation$GetNewRecoveryApiKey { extension UtilityExtension$Mutation$GetNewRecoveryApiKey on Mutation$GetNewRecoveryApiKey { CopyWith$Mutation$GetNewRecoveryApiKey - get copyWith => CopyWith$Mutation$GetNewRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$GetNewRecoveryApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewRecoveryApiKey { factory CopyWith$Mutation$GetNewRecoveryApiKey( - Mutation$GetNewRecoveryApiKey instance, - TRes Function(Mutation$GetNewRecoveryApiKey) then) = - _CopyWithImpl$Mutation$GetNewRecoveryApiKey; + Mutation$GetNewRecoveryApiKey instance, + TRes Function(Mutation$GetNewRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewRecoveryApiKey; factory CopyWith$Mutation$GetNewRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey; - TRes call( - {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, - String? $__typename}); + TRes call({ + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, + String? $__typename, + }); CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey get getNewRecoveryApiKey; } class _CopyWithImpl$Mutation$GetNewRecoveryApiKey implements CopyWith$Mutation$GetNewRecoveryApiKey { - _CopyWithImpl$Mutation$GetNewRecoveryApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$GetNewRecoveryApiKey( + this._instance, + this._then, + ); final Mutation$GetNewRecoveryApiKey _instance; @@ -5095,18 +8389,20 @@ class _CopyWithImpl$Mutation$GetNewRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? getNewRecoveryApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? getNewRecoveryApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$GetNewRecoveryApiKey( - getNewRecoveryApiKey: - getNewRecoveryApiKey == _undefined || getNewRecoveryApiKey == null - ? _instance.getNewRecoveryApiKey - : (getNewRecoveryApiKey - as Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getNewRecoveryApiKey: + getNewRecoveryApiKey == _undefined || getNewRecoveryApiKey == null + ? _instance.getNewRecoveryApiKey + : (getNewRecoveryApiKey + as Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey get getNewRecoveryApiKey { final local$getNewRecoveryApiKey = _instance.getNewRecoveryApiKey; @@ -5121,10 +8417,10 @@ class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey TRes _res; - call( - {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? - getNewRecoveryApiKey, - String? $__typename}) => + call({ + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey get getNewRecoveryApiKey => @@ -5134,93 +8430,107 @@ class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey const documentNodeMutationGetNewRecoveryApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'GetNewRecoveryApiKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'limits')), - type: NamedTypeNode( - name: NameNode(value: 'RecoveryKeyLimitsInput'), - isNonNull: false), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'getNewRecoveryApiKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'limits'), - value: VariableNode(name: NameNode(value: 'limits'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'GetNewRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'limits')), + type: NamedTypeNode( + name: NameNode(value: 'RecoveryKeyLimitsInput'), + isNonNull: false, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'limits'), + value: VariableNode(name: NameNode(value: 'limits')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'key'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'key'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$GetNewRecoveryApiKey _parserFn$Mutation$GetNewRecoveryApiKey( Map data) => Mutation$GetNewRecoveryApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$GetNewRecoveryApiKey = FutureOr - Function(dynamic, Mutation$GetNewRecoveryApiKey?); + Function( + dynamic, + Mutation$GetNewRecoveryApiKey?, +); class Options$Mutation$GetNewRecoveryApiKey extends graphql.MutationOptions { - Options$Mutation$GetNewRecoveryApiKey( - {String? operationName, - Variables$Mutation$GetNewRecoveryApiKey? variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$GetNewRecoveryApiKey({ + String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables?.toJson() ?? {}, - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$GetNewRecoveryApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationGetNewRecoveryApiKey, - parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); + : _parserFn$Mutation$GetNewRecoveryApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationGetNewRecoveryApiKey, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey, + ); final OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompletedWithParsed; @@ -5230,38 +8540,39 @@ class Options$Mutation$GetNewRecoveryApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$GetNewRecoveryApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$GetNewRecoveryApiKey( - {String? operationName, - Variables$Mutation$GetNewRecoveryApiKey? variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables?.toJson() ?? {}, - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationGetNewRecoveryApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); + WatchOptions$Mutation$GetNewRecoveryApiKey({ + String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey, + ); } extension ClientExtension$Mutation$GetNewRecoveryApiKey @@ -5277,20 +8588,31 @@ extension ClientExtension$Mutation$GetNewRecoveryApiKey options ?? WatchOptions$Mutation$GetNewRecoveryApiKey()); } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey - implements Fragment$basicMutationReturnFields { - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.key}); + implements Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key, + }); - @override factory Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( - Map json) => - _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$key = json['key']; + return Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + key: (l$key as String?), + ); + } final int code; @@ -5298,42 +8620,75 @@ class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? key; - Map toJson() => - _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$key = key; + _resultData['key'] = l$key; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$key = key; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$key, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$key = key; final lOther$key = other.key; - if (l$key != lOther$key) return false; + if (l$key != lOther$key) { + return false; + } return true; } } @@ -5344,34 +8699,38 @@ extension UtilityExtension$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey> get copyWith => CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey< TRes> { factory CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance, - TRes Function(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) - then) = - _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance, + TRes Function(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; factory CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }); } class _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey implements CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey { _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey _instance; @@ -5379,26 +8738,27 @@ class _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? key = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? key = _undefined, + }) => _then(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - key: key == _undefined ? _instance.key : (key as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + key: key == _undefined ? _instance.key : (key as String?), + )); } class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey @@ -5409,55 +8769,80 @@ class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$UseRecoveryApiKey { - Variables$Mutation$UseRecoveryApiKey({required this.input}); + factory Variables$Mutation$UseRecoveryApiKey( + {required Input$UseRecoveryKeyInput input}) => + Variables$Mutation$UseRecoveryApiKey._({ + r'input': input, + }); + + Variables$Mutation$UseRecoveryApiKey._(this._$data); - @override factory Variables$Mutation$UseRecoveryApiKey.fromJson( - Map json) => - _$Variables$Mutation$UseRecoveryApiKeyFromJson(json); - - final Input$UseRecoveryKeyInput input; - - Map toJson() => - _$Variables$Mutation$UseRecoveryApiKeyToJson(this); - int get hashCode { - final l$input = input; - return Object.hashAll([l$input]); + Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$UseRecoveryKeyInput.fromJson((l$input as Map)); + return Variables$Mutation$UseRecoveryApiKey._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UseRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + Map _$data; + + Input$UseRecoveryKeyInput get input => + (_$data['input'] as Input$UseRecoveryKeyInput); + Map toJson() { + final result$data = {}; final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; + result$data['input'] = l$input.toJson(); + return result$data; } CopyWith$Variables$Mutation$UseRecoveryApiKey< Variables$Mutation$UseRecoveryApiKey> - get copyWith => - CopyWith$Variables$Mutation$UseRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$UseRecoveryApiKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$UseRecoveryApiKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } } abstract class CopyWith$Variables$Mutation$UseRecoveryApiKey { factory CopyWith$Variables$Mutation$UseRecoveryApiKey( - Variables$Mutation$UseRecoveryApiKey instance, - TRes Function(Variables$Mutation$UseRecoveryApiKey) then) = - _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey; + Variables$Mutation$UseRecoveryApiKey instance, + TRes Function(Variables$Mutation$UseRecoveryApiKey) then, + ) = _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey; factory CopyWith$Variables$Mutation$UseRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey; @@ -5468,7 +8853,9 @@ abstract class CopyWith$Variables$Mutation$UseRecoveryApiKey { class _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey implements CopyWith$Variables$Mutation$UseRecoveryApiKey { _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$UseRecoveryApiKey _instance; @@ -5477,10 +8864,11 @@ class _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$UseRecoveryApiKey( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$UseRecoveryKeyInput))); + _then(Variables$Mutation$UseRecoveryApiKey._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$UseRecoveryKeyInput), + })); } class _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey @@ -5492,38 +8880,64 @@ class _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey call({Input$UseRecoveryKeyInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$UseRecoveryApiKey { - Mutation$UseRecoveryApiKey( - {required this.useRecoveryApiKey, required this.$__typename}); + Mutation$UseRecoveryApiKey({ + required this.useRecoveryApiKey, + required this.$__typename, + }); - @override - factory Mutation$UseRecoveryApiKey.fromJson(Map json) => - _$Mutation$UseRecoveryApiKeyFromJson(json); + factory Mutation$UseRecoveryApiKey.fromJson(Map json) { + final l$useRecoveryApiKey = json['useRecoveryApiKey']; + final l$$__typename = json['__typename']; + return Mutation$UseRecoveryApiKey( + useRecoveryApiKey: Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( + (l$useRecoveryApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$UseRecoveryApiKey$useRecoveryApiKey useRecoveryApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UseRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$useRecoveryApiKey = useRecoveryApiKey; + _resultData['useRecoveryApiKey'] = l$useRecoveryApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$useRecoveryApiKey = useRecoveryApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$useRecoveryApiKey, l$$__typename]); + return Object.hashAll([ + l$useRecoveryApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UseRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$useRecoveryApiKey = useRecoveryApiKey; final lOther$useRecoveryApiKey = other.useRecoveryApiKey; - if (l$useRecoveryApiKey != lOther$useRecoveryApiKey) return false; + if (l$useRecoveryApiKey != lOther$useRecoveryApiKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -5531,28 +8945,35 @@ class Mutation$UseRecoveryApiKey { extension UtilityExtension$Mutation$UseRecoveryApiKey on Mutation$UseRecoveryApiKey { CopyWith$Mutation$UseRecoveryApiKey - get copyWith => CopyWith$Mutation$UseRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$UseRecoveryApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UseRecoveryApiKey { factory CopyWith$Mutation$UseRecoveryApiKey( - Mutation$UseRecoveryApiKey instance, - TRes Function(Mutation$UseRecoveryApiKey) then) = - _CopyWithImpl$Mutation$UseRecoveryApiKey; + Mutation$UseRecoveryApiKey instance, + TRes Function(Mutation$UseRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$UseRecoveryApiKey; factory CopyWith$Mutation$UseRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$UseRecoveryApiKey; - TRes call( - {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, - String? $__typename}); + TRes call({ + Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, + String? $__typename, + }); CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey get useRecoveryApiKey; } class _CopyWithImpl$Mutation$UseRecoveryApiKey implements CopyWith$Mutation$UseRecoveryApiKey { - _CopyWithImpl$Mutation$UseRecoveryApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$UseRecoveryApiKey( + this._instance, + this._then, + ); final Mutation$UseRecoveryApiKey _instance; @@ -5560,18 +8981,20 @@ class _CopyWithImpl$Mutation$UseRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? useRecoveryApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? useRecoveryApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UseRecoveryApiKey( - useRecoveryApiKey: - useRecoveryApiKey == _undefined || useRecoveryApiKey == null - ? _instance.useRecoveryApiKey - : (useRecoveryApiKey - as Mutation$UseRecoveryApiKey$useRecoveryApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + useRecoveryApiKey: + useRecoveryApiKey == _undefined || useRecoveryApiKey == null + ? _instance.useRecoveryApiKey + : (useRecoveryApiKey + as Mutation$UseRecoveryApiKey$useRecoveryApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey get useRecoveryApiKey { final local$useRecoveryApiKey = _instance.useRecoveryApiKey; @@ -5586,9 +9009,10 @@ class _CopyWithStubImpl$Mutation$UseRecoveryApiKey TRes _res; - call( - {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, - String? $__typename}) => + call({ + Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey get useRecoveryApiKey => @@ -5597,92 +9021,107 @@ class _CopyWithStubImpl$Mutation$UseRecoveryApiKey const documentNodeMutationUseRecoveryApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'UseRecoveryApiKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'UseRecoveryKeyInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'useRecoveryApiKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'UseRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseRecoveryKeyInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'useRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'token'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'token'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$UseRecoveryApiKey _parserFn$Mutation$UseRecoveryApiKey( Map data) => Mutation$UseRecoveryApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$UseRecoveryApiKey = FutureOr - Function(dynamic, Mutation$UseRecoveryApiKey?); + Function( + dynamic, + Mutation$UseRecoveryApiKey?, +); class Options$Mutation$UseRecoveryApiKey extends graphql.MutationOptions { - Options$Mutation$UseRecoveryApiKey( - {String? operationName, - required Variables$Mutation$UseRecoveryApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$UseRecoveryApiKey({ + String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$UseRecoveryApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationUseRecoveryApiKey, - parserFn: _parserFn$Mutation$UseRecoveryApiKey); + : _parserFn$Mutation$UseRecoveryApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationUseRecoveryApiKey, + parserFn: _parserFn$Mutation$UseRecoveryApiKey, + ); final OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompletedWithParsed; @@ -5691,38 +9130,39 @@ class Options$Mutation$UseRecoveryApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$UseRecoveryApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UseRecoveryApiKey( - {String? operationName, - required Variables$Mutation$UseRecoveryApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationUseRecoveryApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UseRecoveryApiKey); + WatchOptions$Mutation$UseRecoveryApiKey({ + String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUseRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UseRecoveryApiKey, + ); } extension ClientExtension$Mutation$UseRecoveryApiKey on graphql.GraphQLClient { @@ -5736,20 +9176,32 @@ extension ClientExtension$Mutation$UseRecoveryApiKey on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$UseRecoveryApiKey$useRecoveryApiKey - implements Fragment$basicMutationReturnFields { - Mutation$UseRecoveryApiKey$useRecoveryApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.token}); + implements + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + Mutation$UseRecoveryApiKey$useRecoveryApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token, + }); - @override factory Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( - Map json) => - _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$token = json['token']; + return Mutation$UseRecoveryApiKey$useRecoveryApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + token: (l$token as String?), + ); + } final int code; @@ -5757,43 +9209,75 @@ class Mutation$UseRecoveryApiKey$useRecoveryApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? token; - Map toJson() => - _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$token = token; + _resultData['token'] = l$token; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$token = token; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$token]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$token, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UseRecoveryApiKey$useRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$token = token; final lOther$token = other.token; - if (l$token != lOther$token) return false; + if (l$token != lOther$token) { + return false; + } return true; } } @@ -5802,31 +9286,36 @@ extension UtilityExtension$Mutation$UseRecoveryApiKey$useRecoveryApiKey on Mutation$UseRecoveryApiKey$useRecoveryApiKey { CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey< Mutation$UseRecoveryApiKey$useRecoveryApiKey> - get copyWith => - CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey { factory CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey( - Mutation$UseRecoveryApiKey$useRecoveryApiKey instance, - TRes Function(Mutation$UseRecoveryApiKey$useRecoveryApiKey) then) = - _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; + Mutation$UseRecoveryApiKey$useRecoveryApiKey instance, + TRes Function(Mutation$UseRecoveryApiKey$useRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; factory CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }); } class _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey implements CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey { _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$UseRecoveryApiKey$useRecoveryApiKey _instance; @@ -5834,26 +9323,27 @@ class _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? token = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined, + }) => _then(Mutation$UseRecoveryApiKey$useRecoveryApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - token: token == _undefined ? _instance.token : (token as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?), + )); } class _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey @@ -5862,48 +9352,76 @@ class _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RefreshDeviceApiToken { - Mutation$RefreshDeviceApiToken( - {required this.refreshDeviceApiToken, required this.$__typename}); + Mutation$RefreshDeviceApiToken({ + required this.refreshDeviceApiToken, + required this.$__typename, + }); - @override - factory Mutation$RefreshDeviceApiToken.fromJson(Map json) => - _$Mutation$RefreshDeviceApiTokenFromJson(json); + factory Mutation$RefreshDeviceApiToken.fromJson(Map json) { + final l$refreshDeviceApiToken = json['refreshDeviceApiToken']; + final l$$__typename = json['__typename']; + return Mutation$RefreshDeviceApiToken( + refreshDeviceApiToken: + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( + (l$refreshDeviceApiToken as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RefreshDeviceApiToken$refreshDeviceApiToken refreshDeviceApiToken; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RefreshDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$refreshDeviceApiToken = refreshDeviceApiToken; + _resultData['refreshDeviceApiToken'] = l$refreshDeviceApiToken.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$refreshDeviceApiToken = refreshDeviceApiToken; final l$$__typename = $__typename; - return Object.hashAll([l$refreshDeviceApiToken, l$$__typename]); + return Object.hashAll([ + l$refreshDeviceApiToken, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RefreshDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$refreshDeviceApiToken = refreshDeviceApiToken; final lOther$refreshDeviceApiToken = other.refreshDeviceApiToken; - if (l$refreshDeviceApiToken != lOther$refreshDeviceApiToken) return false; + if (l$refreshDeviceApiToken != lOther$refreshDeviceApiToken) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -5911,29 +9429,35 @@ class Mutation$RefreshDeviceApiToken { extension UtilityExtension$Mutation$RefreshDeviceApiToken on Mutation$RefreshDeviceApiToken { CopyWith$Mutation$RefreshDeviceApiToken - get copyWith => CopyWith$Mutation$RefreshDeviceApiToken(this, (i) => i); + get copyWith => CopyWith$Mutation$RefreshDeviceApiToken( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RefreshDeviceApiToken { factory CopyWith$Mutation$RefreshDeviceApiToken( - Mutation$RefreshDeviceApiToken instance, - TRes Function(Mutation$RefreshDeviceApiToken) then) = - _CopyWithImpl$Mutation$RefreshDeviceApiToken; + Mutation$RefreshDeviceApiToken instance, + TRes Function(Mutation$RefreshDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$RefreshDeviceApiToken; factory CopyWith$Mutation$RefreshDeviceApiToken.stub(TRes res) = _CopyWithStubImpl$Mutation$RefreshDeviceApiToken; - TRes call( - {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? - refreshDeviceApiToken, - String? $__typename}); + TRes call({ + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? refreshDeviceApiToken, + String? $__typename, + }); CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken get refreshDeviceApiToken; } class _CopyWithImpl$Mutation$RefreshDeviceApiToken implements CopyWith$Mutation$RefreshDeviceApiToken { - _CopyWithImpl$Mutation$RefreshDeviceApiToken(this._instance, this._then); + _CopyWithImpl$Mutation$RefreshDeviceApiToken( + this._instance, + this._then, + ); final Mutation$RefreshDeviceApiToken _instance; @@ -5941,18 +9465,20 @@ class _CopyWithImpl$Mutation$RefreshDeviceApiToken static const _undefined = {}; - TRes call( - {Object? refreshDeviceApiToken = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? refreshDeviceApiToken = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RefreshDeviceApiToken( - refreshDeviceApiToken: refreshDeviceApiToken == _undefined || - refreshDeviceApiToken == null - ? _instance.refreshDeviceApiToken - : (refreshDeviceApiToken - as Mutation$RefreshDeviceApiToken$refreshDeviceApiToken), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + refreshDeviceApiToken: + refreshDeviceApiToken == _undefined || refreshDeviceApiToken == null + ? _instance.refreshDeviceApiToken + : (refreshDeviceApiToken + as Mutation$RefreshDeviceApiToken$refreshDeviceApiToken), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken get refreshDeviceApiToken { final local$refreshDeviceApiToken = _instance.refreshDeviceApiToken; @@ -5967,10 +9493,10 @@ class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken TRes _res; - call( - {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? - refreshDeviceApiToken, - String? $__typename}) => + call({ + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? refreshDeviceApiToken, + String? $__typename, + }) => _res; CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken get refreshDeviceApiToken => @@ -5980,79 +9506,90 @@ class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken const documentNodeMutationRefreshDeviceApiToken = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RefreshDeviceApiToken'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'refreshDeviceApiToken'), + type: OperationType.mutation, + name: NameNode(value: 'RefreshDeviceApiToken'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'refreshDeviceApiToken'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'token'), alias: null, arguments: [], directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'token'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RefreshDeviceApiToken _parserFn$Mutation$RefreshDeviceApiToken( Map data) => Mutation$RefreshDeviceApiToken.fromJson(data); typedef OnMutationCompleted$Mutation$RefreshDeviceApiToken = FutureOr - Function(dynamic, Mutation$RefreshDeviceApiToken?); + Function( + dynamic, + Mutation$RefreshDeviceApiToken?, +); class Options$Mutation$RefreshDeviceApiToken extends graphql.MutationOptions { - Options$Mutation$RefreshDeviceApiToken( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RefreshDeviceApiToken({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RefreshDeviceApiToken(data)), - update: update, - onError: onError, - document: documentNodeMutationRefreshDeviceApiToken, - parserFn: _parserFn$Mutation$RefreshDeviceApiToken); + : _parserFn$Mutation$RefreshDeviceApiToken(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRefreshDeviceApiToken, + parserFn: _parserFn$Mutation$RefreshDeviceApiToken, + ); final OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompletedWithParsed; @@ -6062,36 +9599,37 @@ class Options$Mutation$RefreshDeviceApiToken ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RefreshDeviceApiToken extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RefreshDeviceApiToken( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRefreshDeviceApiToken, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RefreshDeviceApiToken); + WatchOptions$Mutation$RefreshDeviceApiToken({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRefreshDeviceApiToken, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RefreshDeviceApiToken, + ); } extension ClientExtension$Mutation$RefreshDeviceApiToken @@ -6108,20 +9646,32 @@ extension ClientExtension$Mutation$RefreshDeviceApiToken options ?? WatchOptions$Mutation$RefreshDeviceApiToken()); } -@JsonSerializable(explicitToJson: true) class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken - implements Fragment$basicMutationReturnFields { - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.token}); + implements + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token, + }); - @override factory Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( - Map json) => - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$token = json['token']; + return Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + token: (l$token as String?), + ); + } final int code; @@ -6129,43 +9679,75 @@ class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? token; - Map toJson() => - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$token = token; + _resultData['token'] = l$token; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$token = token; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$token]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$token, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$token = token; final lOther$token = other.token; - if (l$token != lOther$token) return false; + if (l$token != lOther$token) { + return false; + } return true; } } @@ -6176,34 +9758,38 @@ extension UtilityExtension$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken Mutation$RefreshDeviceApiToken$refreshDeviceApiToken> get copyWith => CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< TRes> { factory CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance, - TRes Function(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) - then) = - _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance, + TRes Function(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; factory CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.stub( TRes res) = _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }); } class _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken implements CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken { _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RefreshDeviceApiToken$refreshDeviceApiToken _instance; @@ -6212,26 +9798,27 @@ class _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? token = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined, + }) => _then(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - token: token == _undefined ? _instance.token : (token as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?), + )); } class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< @@ -6243,55 +9830,77 @@ class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$DeleteDeviceApiToken { - Variables$Mutation$DeleteDeviceApiToken({required this.device}); + factory Variables$Mutation$DeleteDeviceApiToken({required String device}) => + Variables$Mutation$DeleteDeviceApiToken._({ + r'device': device, + }); + + Variables$Mutation$DeleteDeviceApiToken._(this._$data); - @override factory Variables$Mutation$DeleteDeviceApiToken.fromJson( - Map json) => - _$Variables$Mutation$DeleteDeviceApiTokenFromJson(json); - - final String device; - - Map toJson() => - _$Variables$Mutation$DeleteDeviceApiTokenToJson(this); - int get hashCode { - final l$device = device; - return Object.hashAll([l$device]); + Map data) { + final result$data = {}; + final l$device = data['device']; + result$data['device'] = (l$device as String); + return Variables$Mutation$DeleteDeviceApiToken._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DeleteDeviceApiToken) || - runtimeType != other.runtimeType) return false; + Map _$data; + + String get device => (_$data['device'] as String); + Map toJson() { + final result$data = {}; final l$device = device; - final lOther$device = other.device; - if (l$device != lOther$device) return false; - return true; + result$data['device'] = l$device; + return result$data; } CopyWith$Variables$Mutation$DeleteDeviceApiToken< Variables$Mutation$DeleteDeviceApiToken> - get copyWith => - CopyWith$Variables$Mutation$DeleteDeviceApiToken(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$DeleteDeviceApiToken( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$DeleteDeviceApiToken) || + runtimeType != other.runtimeType) { + return false; + } + final l$device = device; + final lOther$device = other.device; + if (l$device != lOther$device) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$device = device; + return Object.hashAll([l$device]); + } } abstract class CopyWith$Variables$Mutation$DeleteDeviceApiToken { factory CopyWith$Variables$Mutation$DeleteDeviceApiToken( - Variables$Mutation$DeleteDeviceApiToken instance, - TRes Function(Variables$Mutation$DeleteDeviceApiToken) then) = - _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken; + Variables$Mutation$DeleteDeviceApiToken instance, + TRes Function(Variables$Mutation$DeleteDeviceApiToken) then, + ) = _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken; factory CopyWith$Variables$Mutation$DeleteDeviceApiToken.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken; @@ -6302,7 +9911,9 @@ abstract class CopyWith$Variables$Mutation$DeleteDeviceApiToken { class _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken implements CopyWith$Variables$Mutation$DeleteDeviceApiToken { _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$DeleteDeviceApiToken _instance; @@ -6311,10 +9922,11 @@ class _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken static const _undefined = {}; TRes call({Object? device = _undefined}) => - _then(Variables$Mutation$DeleteDeviceApiToken( - device: device == _undefined || device == null - ? _instance.device - : (device as String))); + _then(Variables$Mutation$DeleteDeviceApiToken._({ + ..._instance._$data, + if (device != _undefined && device != null) + 'device': (device as String), + })); } class _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken @@ -6326,38 +9938,65 @@ class _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken call({String? device}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteDeviceApiToken { - Mutation$DeleteDeviceApiToken( - {required this.deleteDeviceApiToken, required this.$__typename}); + Mutation$DeleteDeviceApiToken({ + required this.deleteDeviceApiToken, + required this.$__typename, + }); - @override - factory Mutation$DeleteDeviceApiToken.fromJson(Map json) => - _$Mutation$DeleteDeviceApiTokenFromJson(json); + factory Mutation$DeleteDeviceApiToken.fromJson(Map json) { + final l$deleteDeviceApiToken = json['deleteDeviceApiToken']; + final l$$__typename = json['__typename']; + return Mutation$DeleteDeviceApiToken( + deleteDeviceApiToken: + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( + (l$deleteDeviceApiToken as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$DeleteDeviceApiToken$deleteDeviceApiToken deleteDeviceApiToken; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DeleteDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$deleteDeviceApiToken = deleteDeviceApiToken; + _resultData['deleteDeviceApiToken'] = l$deleteDeviceApiToken.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$deleteDeviceApiToken = deleteDeviceApiToken; final l$$__typename = $__typename; - return Object.hashAll([l$deleteDeviceApiToken, l$$__typename]); + return Object.hashAll([ + l$deleteDeviceApiToken, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DeleteDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$deleteDeviceApiToken = deleteDeviceApiToken; final lOther$deleteDeviceApiToken = other.deleteDeviceApiToken; - if (l$deleteDeviceApiToken != lOther$deleteDeviceApiToken) return false; + if (l$deleteDeviceApiToken != lOther$deleteDeviceApiToken) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -6365,28 +10004,35 @@ class Mutation$DeleteDeviceApiToken { extension UtilityExtension$Mutation$DeleteDeviceApiToken on Mutation$DeleteDeviceApiToken { CopyWith$Mutation$DeleteDeviceApiToken - get copyWith => CopyWith$Mutation$DeleteDeviceApiToken(this, (i) => i); + get copyWith => CopyWith$Mutation$DeleteDeviceApiToken( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteDeviceApiToken { factory CopyWith$Mutation$DeleteDeviceApiToken( - Mutation$DeleteDeviceApiToken instance, - TRes Function(Mutation$DeleteDeviceApiToken) then) = - _CopyWithImpl$Mutation$DeleteDeviceApiToken; + Mutation$DeleteDeviceApiToken instance, + TRes Function(Mutation$DeleteDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$DeleteDeviceApiToken; factory CopyWith$Mutation$DeleteDeviceApiToken.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteDeviceApiToken; - TRes call( - {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, - String? $__typename}); + TRes call({ + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, + String? $__typename, + }); CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken get deleteDeviceApiToken; } class _CopyWithImpl$Mutation$DeleteDeviceApiToken implements CopyWith$Mutation$DeleteDeviceApiToken { - _CopyWithImpl$Mutation$DeleteDeviceApiToken(this._instance, this._then); + _CopyWithImpl$Mutation$DeleteDeviceApiToken( + this._instance, + this._then, + ); final Mutation$DeleteDeviceApiToken _instance; @@ -6394,18 +10040,20 @@ class _CopyWithImpl$Mutation$DeleteDeviceApiToken static const _undefined = {}; - TRes call( - {Object? deleteDeviceApiToken = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? deleteDeviceApiToken = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteDeviceApiToken( - deleteDeviceApiToken: - deleteDeviceApiToken == _undefined || deleteDeviceApiToken == null - ? _instance.deleteDeviceApiToken - : (deleteDeviceApiToken - as Mutation$DeleteDeviceApiToken$deleteDeviceApiToken), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + deleteDeviceApiToken: + deleteDeviceApiToken == _undefined || deleteDeviceApiToken == null + ? _instance.deleteDeviceApiToken + : (deleteDeviceApiToken + as Mutation$DeleteDeviceApiToken$deleteDeviceApiToken), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken get deleteDeviceApiToken { final local$deleteDeviceApiToken = _instance.deleteDeviceApiToken; @@ -6420,10 +10068,10 @@ class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken TRes _res; - call( - {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? - deleteDeviceApiToken, - String? $__typename}) => + call({ + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, + String? $__typename, + }) => _res; CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken get deleteDeviceApiToken => @@ -6433,86 +10081,100 @@ class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken const documentNodeMutationDeleteDeviceApiToken = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'DeleteDeviceApiToken'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'device')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'deleteDeviceApiToken'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'device'), - value: VariableNode(name: NameNode(value: 'device'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'DeleteDeviceApiToken'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'device')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteDeviceApiToken'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'device'), + value: VariableNode(name: NameNode(value: 'device')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$DeleteDeviceApiToken _parserFn$Mutation$DeleteDeviceApiToken( Map data) => Mutation$DeleteDeviceApiToken.fromJson(data); typedef OnMutationCompleted$Mutation$DeleteDeviceApiToken = FutureOr - Function(dynamic, Mutation$DeleteDeviceApiToken?); + Function( + dynamic, + Mutation$DeleteDeviceApiToken?, +); class Options$Mutation$DeleteDeviceApiToken extends graphql.MutationOptions { - Options$Mutation$DeleteDeviceApiToken( - {String? operationName, - required Variables$Mutation$DeleteDeviceApiToken variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$DeleteDeviceApiToken({ + String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$DeleteDeviceApiToken(data)), - update: update, - onError: onError, - document: documentNodeMutationDeleteDeviceApiToken, - parserFn: _parserFn$Mutation$DeleteDeviceApiToken); + : _parserFn$Mutation$DeleteDeviceApiToken(data), + ), + update: update, + onError: onError, + document: documentNodeMutationDeleteDeviceApiToken, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken, + ); final OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompletedWithParsed; @@ -6522,38 +10184,39 @@ class Options$Mutation$DeleteDeviceApiToken ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$DeleteDeviceApiToken extends graphql.WatchQueryOptions { - WatchOptions$Mutation$DeleteDeviceApiToken( - {String? operationName, - required Variables$Mutation$DeleteDeviceApiToken variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationDeleteDeviceApiToken, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$DeleteDeviceApiToken); + WatchOptions$Mutation$DeleteDeviceApiToken({ + String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteDeviceApiToken, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken, + ); } extension ClientExtension$Mutation$DeleteDeviceApiToken @@ -6568,19 +10231,28 @@ extension ClientExtension$Mutation$DeleteDeviceApiToken this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken - implements Fragment$basicMutationReturnFields { - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( - Map json) => - _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -6588,36 +10260,64 @@ class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -6628,29 +10328,37 @@ extension UtilityExtension$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken Mutation$DeleteDeviceApiToken$deleteDeviceApiToken> get copyWith => CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken< TRes> { factory CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance, - TRes Function(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) - then) = - _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance, + TRes Function(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; factory CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.stub( TRes res) = _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken implements CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken { _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$DeleteDeviceApiToken$deleteDeviceApiToken _instance; @@ -6658,24 +10366,25 @@ class _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken @@ -6686,42 +10395,74 @@ class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewDeviceApiKey { - Mutation$GetNewDeviceApiKey( - {required this.getNewDeviceApiKey, required this.$__typename}); + Mutation$GetNewDeviceApiKey({ + required this.getNewDeviceApiKey, + required this.$__typename, + }); - @override - factory Mutation$GetNewDeviceApiKey.fromJson(Map json) => - _$Mutation$GetNewDeviceApiKeyFromJson(json); + factory Mutation$GetNewDeviceApiKey.fromJson(Map json) { + final l$getNewDeviceApiKey = json['getNewDeviceApiKey']; + final l$$__typename = json['__typename']; + return Mutation$GetNewDeviceApiKey( + getNewDeviceApiKey: + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( + (l$getNewDeviceApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$GetNewDeviceApiKey$getNewDeviceApiKey getNewDeviceApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$GetNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$getNewDeviceApiKey = getNewDeviceApiKey; + _resultData['getNewDeviceApiKey'] = l$getNewDeviceApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getNewDeviceApiKey = getNewDeviceApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$getNewDeviceApiKey, l$$__typename]); + return Object.hashAll([ + l$getNewDeviceApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$getNewDeviceApiKey = getNewDeviceApiKey; final lOther$getNewDeviceApiKey = other.getNewDeviceApiKey; - if (l$getNewDeviceApiKey != lOther$getNewDeviceApiKey) return false; + if (l$getNewDeviceApiKey != lOther$getNewDeviceApiKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -6729,28 +10470,35 @@ class Mutation$GetNewDeviceApiKey { extension UtilityExtension$Mutation$GetNewDeviceApiKey on Mutation$GetNewDeviceApiKey { CopyWith$Mutation$GetNewDeviceApiKey - get copyWith => CopyWith$Mutation$GetNewDeviceApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$GetNewDeviceApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewDeviceApiKey { factory CopyWith$Mutation$GetNewDeviceApiKey( - Mutation$GetNewDeviceApiKey instance, - TRes Function(Mutation$GetNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$GetNewDeviceApiKey; + Mutation$GetNewDeviceApiKey instance, + TRes Function(Mutation$GetNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewDeviceApiKey; factory CopyWith$Mutation$GetNewDeviceApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$GetNewDeviceApiKey; - TRes call( - {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, - String? $__typename}); + TRes call({ + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, + String? $__typename, + }); CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey get getNewDeviceApiKey; } class _CopyWithImpl$Mutation$GetNewDeviceApiKey implements CopyWith$Mutation$GetNewDeviceApiKey { - _CopyWithImpl$Mutation$GetNewDeviceApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$GetNewDeviceApiKey( + this._instance, + this._then, + ); final Mutation$GetNewDeviceApiKey _instance; @@ -6758,18 +10506,20 @@ class _CopyWithImpl$Mutation$GetNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? getNewDeviceApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? getNewDeviceApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$GetNewDeviceApiKey( - getNewDeviceApiKey: - getNewDeviceApiKey == _undefined || getNewDeviceApiKey == null - ? _instance.getNewDeviceApiKey - : (getNewDeviceApiKey - as Mutation$GetNewDeviceApiKey$getNewDeviceApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getNewDeviceApiKey: + getNewDeviceApiKey == _undefined || getNewDeviceApiKey == null + ? _instance.getNewDeviceApiKey + : (getNewDeviceApiKey + as Mutation$GetNewDeviceApiKey$getNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey get getNewDeviceApiKey { final local$getNewDeviceApiKey = _instance.getNewDeviceApiKey; @@ -6784,9 +10534,10 @@ class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey TRes _res; - call( - {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, - String? $__typename}) => + call({ + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey get getNewDeviceApiKey => @@ -6795,79 +10546,90 @@ class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey const documentNodeMutationGetNewDeviceApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'GetNewDeviceApiKey'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'getNewDeviceApiKey'), + type: OperationType.mutation, + name: NameNode(value: 'GetNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'key'), alias: null, arguments: [], directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'key'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$GetNewDeviceApiKey _parserFn$Mutation$GetNewDeviceApiKey( Map data) => Mutation$GetNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$GetNewDeviceApiKey = FutureOr - Function(dynamic, Mutation$GetNewDeviceApiKey?); + Function( + dynamic, + Mutation$GetNewDeviceApiKey?, +); class Options$Mutation$GetNewDeviceApiKey extends graphql.MutationOptions { - Options$Mutation$GetNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$GetNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$GetNewDeviceApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationGetNewDeviceApiKey, - parserFn: _parserFn$Mutation$GetNewDeviceApiKey); + : _parserFn$Mutation$GetNewDeviceApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationGetNewDeviceApiKey, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey, + ); final OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompletedWithParsed; @@ -6876,36 +10638,37 @@ class Options$Mutation$GetNewDeviceApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$GetNewDeviceApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$GetNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationGetNewDeviceApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$GetNewDeviceApiKey); + WatchOptions$Mutation$GetNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey, + ); } extension ClientExtension$Mutation$GetNewDeviceApiKey on graphql.GraphQLClient { @@ -6919,20 +10682,31 @@ extension ClientExtension$Mutation$GetNewDeviceApiKey on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$GetNewDeviceApiKey()); } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey - implements Fragment$basicMutationReturnFields { - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.key}); + implements Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key, + }); - @override factory Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$key = json['key']; + return Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + key: (l$key as String?), + ); + } final int code; @@ -6940,42 +10714,75 @@ class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? key; - Map toJson() => - _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$key = key; + _resultData['key'] = l$key; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$key = key; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$key, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$key = key; final lOther$key = other.key; - if (l$key != lOther$key) return false; + if (l$key != lOther$key) { + return false; + } return true; } } @@ -6985,31 +10792,36 @@ extension UtilityExtension$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey< Mutation$GetNewDeviceApiKey$getNewDeviceApiKey> get copyWith => CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { factory CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance, - TRes Function(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance, + TRes Function(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; factory CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }); } class _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey implements CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$GetNewDeviceApiKey$getNewDeviceApiKey _instance; @@ -7017,26 +10829,27 @@ class _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? key = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? key = _undefined, + }) => _then(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - key: key == _undefined ? _instance.key : (key as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + key: key == _undefined ? _instance.key : (key as String?), + )); } class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey @@ -7045,51 +10858,78 @@ class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$InvalidateNewDeviceApiKey { - Mutation$InvalidateNewDeviceApiKey( - {required this.invalidateNewDeviceApiKey, required this.$__typename}); + Mutation$InvalidateNewDeviceApiKey({ + required this.invalidateNewDeviceApiKey, + required this.$__typename, + }); - @override factory Mutation$InvalidateNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$InvalidateNewDeviceApiKeyFromJson(json); + Map json) { + final l$invalidateNewDeviceApiKey = json['invalidateNewDeviceApiKey']; + final l$$__typename = json['__typename']; + return Mutation$InvalidateNewDeviceApiKey( + invalidateNewDeviceApiKey: + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( + (l$invalidateNewDeviceApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey invalidateNewDeviceApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$InvalidateNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; + _resultData['invalidateNewDeviceApiKey'] = + l$invalidateNewDeviceApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$invalidateNewDeviceApiKey, l$$__typename]); + return Object.hashAll([ + l$invalidateNewDeviceApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$InvalidateNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; final lOther$invalidateNewDeviceApiKey = other.invalidateNewDeviceApiKey; - if (l$invalidateNewDeviceApiKey != lOther$invalidateNewDeviceApiKey) + if (l$invalidateNewDeviceApiKey != lOther$invalidateNewDeviceApiKey) { return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -7098,30 +10938,36 @@ extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey on Mutation$InvalidateNewDeviceApiKey { CopyWith$Mutation$InvalidateNewDeviceApiKey< Mutation$InvalidateNewDeviceApiKey> - get copyWith => - CopyWith$Mutation$InvalidateNewDeviceApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$InvalidateNewDeviceApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$InvalidateNewDeviceApiKey { factory CopyWith$Mutation$InvalidateNewDeviceApiKey( - Mutation$InvalidateNewDeviceApiKey instance, - TRes Function(Mutation$InvalidateNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey; + Mutation$InvalidateNewDeviceApiKey instance, + TRes Function(Mutation$InvalidateNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey; factory CopyWith$Mutation$InvalidateNewDeviceApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey; - TRes call( - {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? - invalidateNewDeviceApiKey, - String? $__typename}); + TRes call({ + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? + invalidateNewDeviceApiKey, + String? $__typename, + }); CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey get invalidateNewDeviceApiKey; } class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey implements CopyWith$Mutation$InvalidateNewDeviceApiKey { - _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey( + this._instance, + this._then, + ); final Mutation$InvalidateNewDeviceApiKey _instance; @@ -7129,18 +10975,20 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? invalidateNewDeviceApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? invalidateNewDeviceApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$InvalidateNewDeviceApiKey( - invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == _undefined || - invalidateNewDeviceApiKey == null - ? _instance.invalidateNewDeviceApiKey - : (invalidateNewDeviceApiKey - as Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == _undefined || + invalidateNewDeviceApiKey == null + ? _instance.invalidateNewDeviceApiKey + : (invalidateNewDeviceApiKey + as Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey get invalidateNewDeviceApiKey { final local$invalidateNewDeviceApiKey = _instance.invalidateNewDeviceApiKey; @@ -7156,10 +11004,11 @@ class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey TRes _res; - call( - {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? - invalidateNewDeviceApiKey, - String? $__typename}) => + call({ + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? + invalidateNewDeviceApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey get invalidateNewDeviceApiKey => @@ -7170,73 +11019,83 @@ class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey const documentNodeMutationInvalidateNewDeviceApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'InvalidateNewDeviceApiKey'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'invalidateNewDeviceApiKey'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'InvalidateNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'invalidateNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$InvalidateNewDeviceApiKey _parserFn$Mutation$InvalidateNewDeviceApiKey( Map data) => Mutation$InvalidateNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey = FutureOr - Function(dynamic, Mutation$InvalidateNewDeviceApiKey?); + Function( + dynamic, + Mutation$InvalidateNewDeviceApiKey?, +); class Options$Mutation$InvalidateNewDeviceApiKey extends graphql.MutationOptions { - Options$Mutation$InvalidateNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$InvalidateNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$InvalidateNewDeviceApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationInvalidateNewDeviceApiKey, - parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); + : _parserFn$Mutation$InvalidateNewDeviceApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationInvalidateNewDeviceApiKey, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey, + ); final OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompletedWithParsed; @@ -7246,36 +11105,37 @@ class Options$Mutation$InvalidateNewDeviceApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$InvalidateNewDeviceApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$InvalidateNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationInvalidateNewDeviceApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); + WatchOptions$Mutation$InvalidateNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationInvalidateNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey, + ); } extension ClientExtension$Mutation$InvalidateNewDeviceApiKey @@ -7292,20 +11152,28 @@ extension ClientExtension$Mutation$InvalidateNewDeviceApiKey options ?? WatchOptions$Mutation$InvalidateNewDeviceApiKey()); } -@JsonSerializable(explicitToJson: true) class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey - implements Fragment$basicMutationReturnFields { - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( - json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -7313,38 +11181,65 @@ class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( - this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -7355,23 +11250,29 @@ extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey$invalidateNewDevic Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey> get copyWith => CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< TRes> { factory CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey instance, - TRes Function( - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) - then) = - _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey instance, + TRes Function(Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) + then, + ) = _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; factory CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< @@ -7380,7 +11281,9 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< TRes> { _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey _instance; @@ -7389,24 +11292,25 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< @@ -7419,50 +11323,79 @@ class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceAp TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$AuthorizeWithNewDeviceApiKey { - Variables$Mutation$AuthorizeWithNewDeviceApiKey({required this.input}); + factory Variables$Mutation$AuthorizeWithNewDeviceApiKey( + {required Input$UseNewDeviceKeyInput input}) => + Variables$Mutation$AuthorizeWithNewDeviceApiKey._({ + r'input': input, + }); + + Variables$Mutation$AuthorizeWithNewDeviceApiKey._(this._$data); - @override factory Variables$Mutation$AuthorizeWithNewDeviceApiKey.fromJson( - Map json) => - _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); - - final Input$UseNewDeviceKeyInput input; - - Map toJson() => - _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); - int get hashCode { - final l$input = input; - return Object.hashAll([l$input]); + Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$UseNewDeviceKeyInput.fromJson((l$input as Map)); + return Variables$Mutation$AuthorizeWithNewDeviceApiKey._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AuthorizeWithNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + Map _$data; + + Input$UseNewDeviceKeyInput get input => + (_$data['input'] as Input$UseNewDeviceKeyInput); + Map toJson() { + final result$data = {}; final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; + result$data['input'] = l$input.toJson(); + return result$data; } CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey< Variables$Mutation$AuthorizeWithNewDeviceApiKey> get copyWith => CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$AuthorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } } abstract class CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { factory CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey( - Variables$Mutation$AuthorizeWithNewDeviceApiKey instance, - TRes Function(Variables$Mutation$AuthorizeWithNewDeviceApiKey) then) = - _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey; + Variables$Mutation$AuthorizeWithNewDeviceApiKey instance, + TRes Function(Variables$Mutation$AuthorizeWithNewDeviceApiKey) then, + ) = _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey; factory CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey.stub( TRes res) = @@ -7474,7 +11407,9 @@ abstract class CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { class _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey implements CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$AuthorizeWithNewDeviceApiKey _instance; @@ -7483,10 +11418,11 @@ class _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$AuthorizeWithNewDeviceApiKey( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$UseNewDeviceKeyInput))); + _then(Variables$Mutation$AuthorizeWithNewDeviceApiKey._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$UseNewDeviceKeyInput), + })); } class _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey @@ -7498,43 +11434,70 @@ class _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey call({Input$UseNewDeviceKeyInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$AuthorizeWithNewDeviceApiKey { - Mutation$AuthorizeWithNewDeviceApiKey( - {required this.authorizeWithNewDeviceApiKey, required this.$__typename}); + Mutation$AuthorizeWithNewDeviceApiKey({ + required this.authorizeWithNewDeviceApiKey, + required this.$__typename, + }); - @override factory Mutation$AuthorizeWithNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); + Map json) { + final l$authorizeWithNewDeviceApiKey = json['authorizeWithNewDeviceApiKey']; + final l$$__typename = json['__typename']; + return Mutation$AuthorizeWithNewDeviceApiKey( + authorizeWithNewDeviceApiKey: + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + .fromJson( + (l$authorizeWithNewDeviceApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey authorizeWithNewDeviceApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; + _resultData['authorizeWithNewDeviceApiKey'] = + l$authorizeWithNewDeviceApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$authorizeWithNewDeviceApiKey, l$$__typename]); + return Object.hashAll([ + l$authorizeWithNewDeviceApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$AuthorizeWithNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; final lOther$authorizeWithNewDeviceApiKey = other.authorizeWithNewDeviceApiKey; - if (l$authorizeWithNewDeviceApiKey != lOther$authorizeWithNewDeviceApiKey) + if (l$authorizeWithNewDeviceApiKey != lOther$authorizeWithNewDeviceApiKey) { return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -7543,23 +11506,26 @@ extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey on Mutation$AuthorizeWithNewDeviceApiKey { CopyWith$Mutation$AuthorizeWithNewDeviceApiKey< Mutation$AuthorizeWithNewDeviceApiKey> - get copyWith => - CopyWith$Mutation$AuthorizeWithNewDeviceApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$AuthorizeWithNewDeviceApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey( - Mutation$AuthorizeWithNewDeviceApiKey instance, - TRes Function(Mutation$AuthorizeWithNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey; + Mutation$AuthorizeWithNewDeviceApiKey instance, + TRes Function(Mutation$AuthorizeWithNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey; factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey; - TRes call( - {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? - authorizeWithNewDeviceApiKey, - String? $__typename}); + TRes call({ + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? + authorizeWithNewDeviceApiKey, + String? $__typename, + }); CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> get authorizeWithNewDeviceApiKey; } @@ -7567,7 +11533,9 @@ abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey implements CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$AuthorizeWithNewDeviceApiKey _instance; @@ -7575,19 +11543,21 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? authorizeWithNewDeviceApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? authorizeWithNewDeviceApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$AuthorizeWithNewDeviceApiKey( - authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == - _undefined || - authorizeWithNewDeviceApiKey == null - ? _instance.authorizeWithNewDeviceApiKey - : (authorizeWithNewDeviceApiKey - as Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == + _undefined || + authorizeWithNewDeviceApiKey == null + ? _instance.authorizeWithNewDeviceApiKey + : (authorizeWithNewDeviceApiKey + as Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> get authorizeWithNewDeviceApiKey { final local$authorizeWithNewDeviceApiKey = @@ -7604,10 +11574,11 @@ class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey TRes _res; - call( - {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? - authorizeWithNewDeviceApiKey, - String? $__typename}) => + call({ + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? + authorizeWithNewDeviceApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> @@ -7619,51 +11590,61 @@ class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey const documentNodeMutationAuthorizeWithNewDeviceApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'AuthorizeWithNewDeviceApiKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'UseNewDeviceKeyInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'authorizeWithNewDeviceApiKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'AuthorizeWithNewDeviceApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseNewDeviceKeyInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'authorizeWithNewDeviceApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'token'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'token'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$AuthorizeWithNewDeviceApiKey @@ -7671,42 +11652,46 @@ Mutation$AuthorizeWithNewDeviceApiKey Map data) => Mutation$AuthorizeWithNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey - = FutureOr Function(dynamic, Mutation$AuthorizeWithNewDeviceApiKey?); + = FutureOr Function( + dynamic, + Mutation$AuthorizeWithNewDeviceApiKey?, +); class Options$Mutation$AuthorizeWithNewDeviceApiKey extends graphql.MutationOptions { - Options$Mutation$AuthorizeWithNewDeviceApiKey( - {String? operationName, - required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$AuthorizeWithNewDeviceApiKey({ + String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$AuthorizeWithNewDeviceApiKey( - data)), - update: update, - onError: onError, - document: documentNodeMutationAuthorizeWithNewDeviceApiKey, - parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); + : _parserFn$Mutation$AuthorizeWithNewDeviceApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey, + ); final OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompletedWithParsed; @@ -7716,38 +11701,39 @@ class Options$Mutation$AuthorizeWithNewDeviceApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey( - {String? operationName, - required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationAuthorizeWithNewDeviceApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); + WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey({ + String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey, + ); } extension ClientExtension$Mutation$AuthorizeWithNewDeviceApiKey @@ -7762,21 +11748,32 @@ extension ClientExtension$Mutation$AuthorizeWithNewDeviceApiKey this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - implements Fragment$basicMutationReturnFields { - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.token}); + implements + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token, + }); - @override factory Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( - json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$token = json['token']; + return Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + token: (l$token as String?), + ); + } final int code; @@ -7784,45 +11781,76 @@ class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? token; - Map toJson() => - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( - this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$token = token; + _resultData['token'] = l$token; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$token = token; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$token]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$token, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$token = token; final lOther$token = other.token; - if (l$token != lOther$token) return false; + if (l$token != lOther$token) { + return false; + } return true; } } @@ -7833,29 +11861,31 @@ extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNe Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey> get copyWith => CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> { factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - instance, - TRes Function( - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) - then) = - _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey instance, + TRes Function( + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) + then, + ) = _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }); } class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< @@ -7864,7 +11894,9 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDevice CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> { _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey _instance; @@ -7874,26 +11906,27 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDevice static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? token = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined, + }) => _then(Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - token: token == _undefined ? _instance.token : (token as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?), + )); } class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< @@ -7906,16 +11939,12 @@ class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDe TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }) => _res; } - -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart deleted file mode 100644 index 0d658310..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart +++ /dev/null @@ -1,849 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'server_api.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$GetApiVersion _$Query$GetApiVersionFromJson(Map json) => - Query$GetApiVersion( - api: - Query$GetApiVersion$api.fromJson(json['api'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiVersionToJson( - Query$GetApiVersion instance) => - { - 'api': instance.api.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetApiVersion$api _$Query$GetApiVersion$apiFromJson( - Map json) => - Query$GetApiVersion$api( - version: json['version'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiVersion$apiToJson( - Query$GetApiVersion$api instance) => - { - 'version': instance.version, - '__typename': instance.$__typename, - }; - -Query$GetApiJobs _$Query$GetApiJobsFromJson(Map json) => - Query$GetApiJobs( - jobs: - Query$GetApiJobs$jobs.fromJson(json['jobs'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiJobsToJson(Query$GetApiJobs instance) => - { - 'jobs': instance.jobs.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetApiJobs$jobs _$Query$GetApiJobs$jobsFromJson( - Map json) => - Query$GetApiJobs$jobs( - getJobs: (json['getJobs'] as List) - .map((e) => - Query$GetApiJobs$jobs$getJobs.fromJson(e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiJobs$jobsToJson( - Query$GetApiJobs$jobs instance) => - { - 'getJobs': instance.getJobs.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$GetApiJobs$jobs$getJobs _$Query$GetApiJobs$jobs$getJobsFromJson( - Map json) => - Query$GetApiJobs$jobs$getJobs( - createdAt: dateTimeFromJson(json['createdAt']), - description: json['description'] as String, - error: json['error'] as String?, - finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), - name: json['name'] as String, - progress: json['progress'] as int?, - result: json['result'] as String?, - status: json['status'] as String, - statusText: json['statusText'] as String?, - uid: json['uid'] as String, - updatedAt: dateTimeFromJson(json['updatedAt']), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiJobs$jobs$getJobsToJson( - Query$GetApiJobs$jobs$getJobs instance) => - { - 'createdAt': dateTimeToJson(instance.createdAt), - 'description': instance.description, - 'error': instance.error, - 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), - 'name': instance.name, - 'progress': instance.progress, - 'result': instance.result, - 'status': instance.status, - 'statusText': instance.statusText, - 'uid': instance.uid, - 'updatedAt': dateTimeToJson(instance.updatedAt), - '__typename': instance.$__typename, - }; - -Variables$Mutation$RemoveJob _$Variables$Mutation$RemoveJobFromJson( - Map json) => - Variables$Mutation$RemoveJob( - jobId: json['jobId'] as String, - ); - -Map _$Variables$Mutation$RemoveJobToJson( - Variables$Mutation$RemoveJob instance) => - { - 'jobId': instance.jobId, - }; - -Mutation$RemoveJob _$Mutation$RemoveJobFromJson(Map json) => - Mutation$RemoveJob( - removeJob: Mutation$RemoveJob$removeJob.fromJson( - json['removeJob'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveJobToJson(Mutation$RemoveJob instance) => - { - 'removeJob': instance.removeJob.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RemoveJob$removeJob _$Mutation$RemoveJob$removeJobFromJson( - Map json) => - Mutation$RemoveJob$removeJob( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveJob$removeJobToJson( - Mutation$RemoveJob$removeJob instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRebuild _$Mutation$RunSystemRebuildFromJson( - Map json) => - Mutation$RunSystemRebuild( - runSystemRebuild: Mutation$RunSystemRebuild$runSystemRebuild.fromJson( - json['runSystemRebuild'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRebuildToJson( - Mutation$RunSystemRebuild instance) => - { - 'runSystemRebuild': instance.runSystemRebuild.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRebuild$runSystemRebuild - _$Mutation$RunSystemRebuild$runSystemRebuildFromJson( - Map json) => - Mutation$RunSystemRebuild$runSystemRebuild( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRebuild$runSystemRebuildToJson( - Mutation$RunSystemRebuild$runSystemRebuild instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRollback _$Mutation$RunSystemRollbackFromJson( - Map json) => - Mutation$RunSystemRollback( - runSystemRollback: Mutation$RunSystemRollback$runSystemRollback.fromJson( - json['runSystemRollback'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRollbackToJson( - Mutation$RunSystemRollback instance) => - { - 'runSystemRollback': instance.runSystemRollback.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRollback$runSystemRollback - _$Mutation$RunSystemRollback$runSystemRollbackFromJson( - Map json) => - Mutation$RunSystemRollback$runSystemRollback( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRollback$runSystemRollbackToJson( - Mutation$RunSystemRollback$runSystemRollback instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RunSystemUpgrade _$Mutation$RunSystemUpgradeFromJson( - Map json) => - Mutation$RunSystemUpgrade( - runSystemUpgrade: Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( - json['runSystemUpgrade'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemUpgradeToJson( - Mutation$RunSystemUpgrade instance) => - { - 'runSystemUpgrade': instance.runSystemUpgrade.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RunSystemUpgrade$runSystemUpgrade - _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson( - Map json) => - Mutation$RunSystemUpgrade$runSystemUpgrade( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson( - Mutation$RunSystemUpgrade$runSystemUpgrade instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$PullRepositoryChanges _$Mutation$PullRepositoryChangesFromJson( - Map json) => - Mutation$PullRepositoryChanges( - pullRepositoryChanges: - Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( - json['pullRepositoryChanges'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$PullRepositoryChangesToJson( - Mutation$PullRepositoryChanges instance) => - { - 'pullRepositoryChanges': instance.pullRepositoryChanges.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$PullRepositoryChanges$pullRepositoryChanges - _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson( - Map json) => - Mutation$PullRepositoryChanges$pullRepositoryChanges( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map - _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson( - Mutation$PullRepositoryChanges$pullRepositoryChanges instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RebootSystem _$Mutation$RebootSystemFromJson( - Map json) => - Mutation$RebootSystem( - rebootSystem: Mutation$RebootSystem$rebootSystem.fromJson( - json['rebootSystem'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RebootSystemToJson( - Mutation$RebootSystem instance) => - { - 'rebootSystem': instance.rebootSystem.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RebootSystem$rebootSystem _$Mutation$RebootSystem$rebootSystemFromJson( - Map json) => - Mutation$RebootSystem$rebootSystem( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RebootSystem$rebootSystemToJson( - Mutation$RebootSystem$rebootSystem instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$SystemServerProvider _$Query$SystemServerProviderFromJson( - Map json) => - Query$SystemServerProvider( - system: Query$SystemServerProvider$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemServerProviderToJson( - Query$SystemServerProvider instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemServerProvider$system _$Query$SystemServerProvider$systemFromJson( - Map json) => - Query$SystemServerProvider$system( - provider: Query$SystemServerProvider$system$provider.fromJson( - json['provider'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemServerProvider$systemToJson( - Query$SystemServerProvider$system instance) => - { - 'provider': instance.provider.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemServerProvider$system$provider - _$Query$SystemServerProvider$system$providerFromJson( - Map json) => - Query$SystemServerProvider$system$provider( - provider: $enumDecode(_$Enum$ServerProviderEnumMap, json['provider'], - unknownValue: Enum$ServerProvider.$unknown), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemServerProvider$system$providerToJson( - Query$SystemServerProvider$system$provider instance) => - { - 'provider': _$Enum$ServerProviderEnumMap[instance.provider]!, - '__typename': instance.$__typename, - }; - -const _$Enum$ServerProviderEnumMap = { - Enum$ServerProvider.HETZNER: 'HETZNER', - Enum$ServerProvider.DIGITALOCEAN: 'DIGITALOCEAN', - Enum$ServerProvider.$unknown: r'$unknown', -}; - -Query$SystemDnsProvider _$Query$SystemDnsProviderFromJson( - Map json) => - Query$SystemDnsProvider( - system: Query$SystemDnsProvider$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemDnsProviderToJson( - Query$SystemDnsProvider instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemDnsProvider$system _$Query$SystemDnsProvider$systemFromJson( - Map json) => - Query$SystemDnsProvider$system( - domainInfo: Query$SystemDnsProvider$system$domainInfo.fromJson( - json['domainInfo'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemDnsProvider$systemToJson( - Query$SystemDnsProvider$system instance) => - { - 'domainInfo': instance.domainInfo.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemDnsProvider$system$domainInfo - _$Query$SystemDnsProvider$system$domainInfoFromJson( - Map json) => - Query$SystemDnsProvider$system$domainInfo( - provider: $enumDecode(_$Enum$DnsProviderEnumMap, json['provider'], - unknownValue: Enum$DnsProvider.$unknown), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemDnsProvider$system$domainInfoToJson( - Query$SystemDnsProvider$system$domainInfo instance) => - { - 'provider': _$Enum$DnsProviderEnumMap[instance.provider]!, - '__typename': instance.$__typename, - }; - -const _$Enum$DnsProviderEnumMap = { - Enum$DnsProvider.CLOUDFLARE: 'CLOUDFLARE', - Enum$DnsProvider.DIGITALOCEAN: 'DIGITALOCEAN', - Enum$DnsProvider.$unknown: r'$unknown', -}; - -Query$GetApiTokens _$Query$GetApiTokensFromJson(Map json) => - Query$GetApiTokens( - api: Query$GetApiTokens$api.fromJson(json['api'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiTokensToJson(Query$GetApiTokens instance) => - { - 'api': instance.api.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetApiTokens$api _$Query$GetApiTokens$apiFromJson( - Map json) => - Query$GetApiTokens$api( - devices: (json['devices'] as List) - .map((e) => Query$GetApiTokens$api$devices.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiTokens$apiToJson( - Query$GetApiTokens$api instance) => - { - 'devices': instance.devices.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$GetApiTokens$api$devices _$Query$GetApiTokens$api$devicesFromJson( - Map json) => - Query$GetApiTokens$api$devices( - creationDate: dateTimeFromJson(json['creationDate']), - isCaller: json['isCaller'] as bool, - name: json['name'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiTokens$api$devicesToJson( - Query$GetApiTokens$api$devices instance) => - { - 'creationDate': dateTimeToJson(instance.creationDate), - 'isCaller': instance.isCaller, - 'name': instance.name, - '__typename': instance.$__typename, - }; - -Query$RecoveryKey _$Query$RecoveryKeyFromJson(Map json) => - Query$RecoveryKey( - api: Query$RecoveryKey$api.fromJson(json['api'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$RecoveryKeyToJson(Query$RecoveryKey instance) => - { - 'api': instance.api.toJson(), - '__typename': instance.$__typename, - }; - -Query$RecoveryKey$api _$Query$RecoveryKey$apiFromJson( - Map json) => - Query$RecoveryKey$api( - recoveryKey: Query$RecoveryKey$api$recoveryKey.fromJson( - json['recoveryKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$RecoveryKey$apiToJson( - Query$RecoveryKey$api instance) => - { - 'recoveryKey': instance.recoveryKey.toJson(), - '__typename': instance.$__typename, - }; - -Query$RecoveryKey$api$recoveryKey _$Query$RecoveryKey$api$recoveryKeyFromJson( - Map json) => - Query$RecoveryKey$api$recoveryKey( - creationDate: _nullable$dateTimeFromJson(json['creationDate']), - exists: json['exists'] as bool, - expirationDate: _nullable$dateTimeFromJson(json['expirationDate']), - usesLeft: json['usesLeft'] as int?, - valid: json['valid'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$RecoveryKey$api$recoveryKeyToJson( - Query$RecoveryKey$api$recoveryKey instance) => - { - 'creationDate': _nullable$dateTimeToJson(instance.creationDate), - 'exists': instance.exists, - 'expirationDate': _nullable$dateTimeToJson(instance.expirationDate), - 'usesLeft': instance.usesLeft, - 'valid': instance.valid, - '__typename': instance.$__typename, - }; - -Variables$Mutation$GetNewRecoveryApiKey - _$Variables$Mutation$GetNewRecoveryApiKeyFromJson( - Map json) => - Variables$Mutation$GetNewRecoveryApiKey( - limits: json['limits'] == null - ? null - : Input$RecoveryKeyLimitsInput.fromJson( - json['limits'] as Map), - ); - -Map _$Variables$Mutation$GetNewRecoveryApiKeyToJson( - Variables$Mutation$GetNewRecoveryApiKey instance) => - { - 'limits': instance.limits?.toJson(), - }; - -Mutation$GetNewRecoveryApiKey _$Mutation$GetNewRecoveryApiKeyFromJson( - Map json) => - Mutation$GetNewRecoveryApiKey( - getNewRecoveryApiKey: - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( - json['getNewRecoveryApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$GetNewRecoveryApiKeyToJson( - Mutation$GetNewRecoveryApiKey instance) => - { - 'getNewRecoveryApiKey': instance.getNewRecoveryApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey - _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson( - Map json) => - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - key: json['key'] as String?, - ); - -Map _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson( - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'key': instance.key, - }; - -Variables$Mutation$UseRecoveryApiKey - _$Variables$Mutation$UseRecoveryApiKeyFromJson(Map json) => - Variables$Mutation$UseRecoveryApiKey( - input: Input$UseRecoveryKeyInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$UseRecoveryApiKeyToJson( - Variables$Mutation$UseRecoveryApiKey instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$UseRecoveryApiKey _$Mutation$UseRecoveryApiKeyFromJson( - Map json) => - Mutation$UseRecoveryApiKey( - useRecoveryApiKey: Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( - json['useRecoveryApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UseRecoveryApiKeyToJson( - Mutation$UseRecoveryApiKey instance) => - { - 'useRecoveryApiKey': instance.useRecoveryApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$UseRecoveryApiKey$useRecoveryApiKey - _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson( - Map json) => - Mutation$UseRecoveryApiKey$useRecoveryApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - token: json['token'] as String?, - ); - -Map _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson( - Mutation$UseRecoveryApiKey$useRecoveryApiKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'token': instance.token, - }; - -Mutation$RefreshDeviceApiToken _$Mutation$RefreshDeviceApiTokenFromJson( - Map json) => - Mutation$RefreshDeviceApiToken( - refreshDeviceApiToken: - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( - json['refreshDeviceApiToken'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RefreshDeviceApiTokenToJson( - Mutation$RefreshDeviceApiToken instance) => - { - 'refreshDeviceApiToken': instance.refreshDeviceApiToken.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RefreshDeviceApiToken$refreshDeviceApiToken - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson( - Map json) => - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - token: json['token'] as String?, - ); - -Map - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson( - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'token': instance.token, - }; - -Variables$Mutation$DeleteDeviceApiToken - _$Variables$Mutation$DeleteDeviceApiTokenFromJson( - Map json) => - Variables$Mutation$DeleteDeviceApiToken( - device: json['device'] as String, - ); - -Map _$Variables$Mutation$DeleteDeviceApiTokenToJson( - Variables$Mutation$DeleteDeviceApiToken instance) => - { - 'device': instance.device, - }; - -Mutation$DeleteDeviceApiToken _$Mutation$DeleteDeviceApiTokenFromJson( - Map json) => - Mutation$DeleteDeviceApiToken( - deleteDeviceApiToken: - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( - json['deleteDeviceApiToken'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteDeviceApiTokenToJson( - Mutation$DeleteDeviceApiToken instance) => - { - 'deleteDeviceApiToken': instance.deleteDeviceApiToken.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$DeleteDeviceApiToken$deleteDeviceApiToken - _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson( - Map json) => - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson( - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$GetNewDeviceApiKey _$Mutation$GetNewDeviceApiKeyFromJson( - Map json) => - Mutation$GetNewDeviceApiKey( - getNewDeviceApiKey: - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( - json['getNewDeviceApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$GetNewDeviceApiKeyToJson( - Mutation$GetNewDeviceApiKey instance) => - { - 'getNewDeviceApiKey': instance.getNewDeviceApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$GetNewDeviceApiKey$getNewDeviceApiKey - _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson( - Map json) => - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - key: json['key'] as String?, - ); - -Map _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson( - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'key': instance.key, - }; - -Mutation$InvalidateNewDeviceApiKey _$Mutation$InvalidateNewDeviceApiKeyFromJson( - Map json) => - Mutation$InvalidateNewDeviceApiKey( - invalidateNewDeviceApiKey: - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( - json['invalidateNewDeviceApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$InvalidateNewDeviceApiKeyToJson( - Mutation$InvalidateNewDeviceApiKey instance) => - { - 'invalidateNewDeviceApiKey': instance.invalidateNewDeviceApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( - Map json) => - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey - instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$AuthorizeWithNewDeviceApiKey - _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( - Map json) => - Variables$Mutation$AuthorizeWithNewDeviceApiKey( - input: Input$UseNewDeviceKeyInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson( - Variables$Mutation$AuthorizeWithNewDeviceApiKey instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$AuthorizeWithNewDeviceApiKey - _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( - Map json) => - Mutation$AuthorizeWithNewDeviceApiKey( - authorizeWithNewDeviceApiKey: - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - .fromJson(json['authorizeWithNewDeviceApiKey'] - as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$AuthorizeWithNewDeviceApiKeyToJson( - Mutation$AuthorizeWithNewDeviceApiKey instance) => - { - 'authorizeWithNewDeviceApiKey': - instance.authorizeWithNewDeviceApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( - Map json) => - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - token: json['token'] as String?, - ); - -Map - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'token': instance.token, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 5d036afa..8da4e347 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,23 +1,69 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; import 'services.graphql.dart'; -part 'server_settings.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -25,36 +71,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -63,25 +137,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -89,24 +173,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -115,43 +200,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -159,88 +255,1752 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$SystemSettings { - Query$SystemSettings({required this.system, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$SystemSettings.fromJson(Map json) => - _$Query$SystemSettingsFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$SystemSettings$system system; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemSettingsToJson(this); - int get hashCode { - final l$system = system; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$SystemSettings) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { return false; - final l$system = system; - final lOther$system = other.system; - if (l$system != lOther$system) return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$SystemSettings { + Query$SystemSettings({ + required this.system, + required this.$__typename, + }); + + factory Query$SystemSettings.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemSettings( + system: Query$SystemSettings$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$SystemSettings$system system; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([ + l$system, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemSettings) || runtimeType != other.runtimeType) { + return false; + } + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$SystemSettings on Query$SystemSettings { CopyWith$Query$SystemSettings get copyWith => - CopyWith$Query$SystemSettings(this, (i) => i); + CopyWith$Query$SystemSettings( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings { - factory CopyWith$Query$SystemSettings(Query$SystemSettings instance, - TRes Function(Query$SystemSettings) then) = - _CopyWithImpl$Query$SystemSettings; + factory CopyWith$Query$SystemSettings( + Query$SystemSettings instance, + TRes Function(Query$SystemSettings) then, + ) = _CopyWithImpl$Query$SystemSettings; factory CopyWith$Query$SystemSettings.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings; - TRes call({Query$SystemSettings$system? system, String? $__typename}); + TRes call({ + Query$SystemSettings$system? system, + String? $__typename, + }); CopyWith$Query$SystemSettings$system get system; } class _CopyWithImpl$Query$SystemSettings implements CopyWith$Query$SystemSettings { - _CopyWithImpl$Query$SystemSettings(this._instance, this._then); + _CopyWithImpl$Query$SystemSettings( + this._instance, + this._then, + ); final Query$SystemSettings _instance; @@ -248,14 +2008,18 @@ class _CopyWithImpl$Query$SystemSettings static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$SystemSettings$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemSettings$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemSettings$system get system { final local$system = _instance.system; return CopyWith$Query$SystemSettings$system( @@ -269,107 +2033,126 @@ class _CopyWithStubImpl$Query$SystemSettings TRes _res; - call({Query$SystemSettings$system? system, String? $__typename}) => _res; + call({ + Query$SystemSettings$system? system, + String? $__typename, + }) => + _res; CopyWith$Query$SystemSettings$system get system => CopyWith$Query$SystemSettings$system.stub(_res); } const documentNodeQuerySystemSettings = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'SystemSettings'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'SystemSettings'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'settings'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'settings'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'autoUpgrade'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'allowReboot'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'enable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'ssh'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'enable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'passwordAuthentication'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'timezone'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'autoUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'ssh'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'passwordAuthentication'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: 'timezone'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$SystemSettings _parserFn$Query$SystemSettings( Map data) => @@ -377,60 +2160,63 @@ Query$SystemSettings _parserFn$Query$SystemSettings( class Options$Query$SystemSettings extends graphql.QueryOptions { - Options$Query$SystemSettings( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQuerySystemSettings, - parserFn: _parserFn$Query$SystemSettings); + Options$Query$SystemSettings({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemSettings, + parserFn: _parserFn$Query$SystemSettings, + ); } class WatchOptions$Query$SystemSettings extends graphql.WatchQueryOptions { - WatchOptions$Query$SystemSettings( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQuerySystemSettings, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$SystemSettings); + WatchOptions$Query$SystemSettings({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemSettings, + ); } class FetchMoreOptions$Query$SystemSettings extends graphql.FetchMoreOptions { FetchMoreOptions$Query$SystemSettings( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQuerySystemSettings); + updateQuery: updateQuery, + document: documentNodeQuerySystemSettings, + ); } extension ClientExtension$Query$SystemSettings on graphql.GraphQLClient { @@ -440,56 +2226,86 @@ extension ClientExtension$Query$SystemSettings on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$SystemSettings( [WatchOptions$Query$SystemSettings? options]) => this.watchQuery(options ?? WatchOptions$Query$SystemSettings()); - void writeQuery$SystemSettings( - {required Query$SystemSettings data, bool broadcast = true}) => + void writeQuery$SystemSettings({ + required Query$SystemSettings data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQuerySystemSettings)), - data: data.toJson(), - broadcast: broadcast); - Query$SystemSettings? readQuery$SystemSettings({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQuerySystemSettings)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemSettings? readQuery$SystemSettings({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemSettings)), + optimistic: optimistic, + ); return result == null ? null : Query$SystemSettings.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system { - Query$SystemSettings$system( - {required this.settings, required this.$__typename}); + Query$SystemSettings$system({ + required this.settings, + required this.$__typename, + }); - @override - factory Query$SystemSettings$system.fromJson(Map json) => - _$Query$SystemSettings$systemFromJson(json); + factory Query$SystemSettings$system.fromJson(Map json) { + final l$settings = json['settings']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system( + settings: Query$SystemSettings$system$settings.fromJson( + (l$settings as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemSettings$system$settings settings; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemSettings$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$settings = settings; + _resultData['settings'] = l$settings.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$settings = settings; final l$$__typename = $__typename; - return Object.hashAll([l$settings, l$$__typename]); + return Object.hashAll([ + l$settings, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$settings = settings; final lOther$settings = other.settings; - if (l$settings != lOther$settings) return false; + if (l$settings != lOther$settings) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -497,26 +2313,34 @@ class Query$SystemSettings$system { extension UtilityExtension$Query$SystemSettings$system on Query$SystemSettings$system { CopyWith$Query$SystemSettings$system - get copyWith => CopyWith$Query$SystemSettings$system(this, (i) => i); + get copyWith => CopyWith$Query$SystemSettings$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system { factory CopyWith$Query$SystemSettings$system( - Query$SystemSettings$system instance, - TRes Function(Query$SystemSettings$system) then) = - _CopyWithImpl$Query$SystemSettings$system; + Query$SystemSettings$system instance, + TRes Function(Query$SystemSettings$system) then, + ) = _CopyWithImpl$Query$SystemSettings$system; factory CopyWith$Query$SystemSettings$system.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings$system; - TRes call( - {Query$SystemSettings$system$settings? settings, String? $__typename}); + TRes call({ + Query$SystemSettings$system$settings? settings, + String? $__typename, + }); CopyWith$Query$SystemSettings$system$settings get settings; } class _CopyWithImpl$Query$SystemSettings$system implements CopyWith$Query$SystemSettings$system { - _CopyWithImpl$Query$SystemSettings$system(this._instance, this._then); + _CopyWithImpl$Query$SystemSettings$system( + this._instance, + this._then, + ); final Query$SystemSettings$system _instance; @@ -524,15 +2348,18 @@ class _CopyWithImpl$Query$SystemSettings$system static const _undefined = {}; - TRes call( - {Object? settings = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? settings = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system( - settings: settings == _undefined || settings == null - ? _instance.settings - : (settings as Query$SystemSettings$system$settings), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + settings: settings == _undefined || settings == null + ? _instance.settings + : (settings as Query$SystemSettings$system$settings), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemSettings$system$settings get settings { final local$settings = _instance.settings; return CopyWith$Query$SystemSettings$system$settings( @@ -546,24 +2373,38 @@ class _CopyWithStubImpl$Query$SystemSettings$system TRes _res; - call({Query$SystemSettings$system$settings? settings, String? $__typename}) => + call({ + Query$SystemSettings$system$settings? settings, + String? $__typename, + }) => _res; CopyWith$Query$SystemSettings$system$settings get settings => CopyWith$Query$SystemSettings$system$settings.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system$settings { - Query$SystemSettings$system$settings( - {required this.autoUpgrade, - required this.ssh, - required this.timezone, - required this.$__typename}); + Query$SystemSettings$system$settings({ + required this.autoUpgrade, + required this.ssh, + required this.timezone, + required this.$__typename, + }); - @override factory Query$SystemSettings$system$settings.fromJson( - Map json) => - _$Query$SystemSettings$system$settingsFromJson(json); + Map json) { + final l$autoUpgrade = json['autoUpgrade']; + final l$ssh = json['ssh']; + final l$timezone = json['timezone']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system$settings( + autoUpgrade: Query$SystemSettings$system$settings$autoUpgrade.fromJson( + (l$autoUpgrade as Map)), + ssh: Query$SystemSettings$system$settings$ssh.fromJson( + (l$ssh as Map)), + timezone: (l$timezone as String), + $__typename: (l$$__typename as String), + ); + } final Query$SystemSettings$system$settings$autoUpgrade autoUpgrade; @@ -571,36 +2412,64 @@ class Query$SystemSettings$system$settings { final String timezone; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemSettings$system$settingsToJson(this); + Map toJson() { + final _resultData = {}; + final l$autoUpgrade = autoUpgrade; + _resultData['autoUpgrade'] = l$autoUpgrade.toJson(); + final l$ssh = ssh; + _resultData['ssh'] = l$ssh.toJson(); + final l$timezone = timezone; + _resultData['timezone'] = l$timezone; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$autoUpgrade = autoUpgrade; final l$ssh = ssh; final l$timezone = timezone; final l$$__typename = $__typename; - return Object.hashAll([l$autoUpgrade, l$ssh, l$timezone, l$$__typename]); + return Object.hashAll([ + l$autoUpgrade, + l$ssh, + l$timezone, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system$settings) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$autoUpgrade = autoUpgrade; final lOther$autoUpgrade = other.autoUpgrade; - if (l$autoUpgrade != lOther$autoUpgrade) return false; + if (l$autoUpgrade != lOther$autoUpgrade) { + return false; + } final l$ssh = ssh; final lOther$ssh = other.ssh; - if (l$ssh != lOther$ssh) return false; + if (l$ssh != lOther$ssh) { + return false; + } final l$timezone = timezone; final lOther$timezone = other.timezone; - if (l$timezone != lOther$timezone) return false; + if (l$timezone != lOther$timezone) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -609,24 +2478,27 @@ extension UtilityExtension$Query$SystemSettings$system$settings on Query$SystemSettings$system$settings { CopyWith$Query$SystemSettings$system$settings< Query$SystemSettings$system$settings> - get copyWith => - CopyWith$Query$SystemSettings$system$settings(this, (i) => i); + get copyWith => CopyWith$Query$SystemSettings$system$settings( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system$settings { factory CopyWith$Query$SystemSettings$system$settings( - Query$SystemSettings$system$settings instance, - TRes Function(Query$SystemSettings$system$settings) then) = - _CopyWithImpl$Query$SystemSettings$system$settings; + Query$SystemSettings$system$settings instance, + TRes Function(Query$SystemSettings$system$settings) then, + ) = _CopyWithImpl$Query$SystemSettings$system$settings; factory CopyWith$Query$SystemSettings$system$settings.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings$system$settings; - TRes call( - {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, - Query$SystemSettings$system$settings$ssh? ssh, - String? timezone, - String? $__typename}); + TRes call({ + Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, + Query$SystemSettings$system$settings$ssh? ssh, + String? timezone, + String? $__typename, + }); CopyWith$Query$SystemSettings$system$settings$autoUpgrade get autoUpgrade; CopyWith$Query$SystemSettings$system$settings$ssh get ssh; @@ -635,7 +2507,9 @@ abstract class CopyWith$Query$SystemSettings$system$settings { class _CopyWithImpl$Query$SystemSettings$system$settings implements CopyWith$Query$SystemSettings$system$settings { _CopyWithImpl$Query$SystemSettings$system$settings( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemSettings$system$settings _instance; @@ -643,25 +2517,26 @@ class _CopyWithImpl$Query$SystemSettings$system$settings static const _undefined = {}; - TRes call( - {Object? autoUpgrade = _undefined, - Object? ssh = _undefined, - Object? timezone = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? autoUpgrade = _undefined, + Object? ssh = _undefined, + Object? timezone = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system$settings( - autoUpgrade: autoUpgrade == _undefined || autoUpgrade == null - ? _instance.autoUpgrade - : (autoUpgrade - as Query$SystemSettings$system$settings$autoUpgrade), - ssh: ssh == _undefined || ssh == null - ? _instance.ssh - : (ssh as Query$SystemSettings$system$settings$ssh), - timezone: timezone == _undefined || timezone == null - ? _instance.timezone - : (timezone as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + autoUpgrade: autoUpgrade == _undefined || autoUpgrade == null + ? _instance.autoUpgrade + : (autoUpgrade as Query$SystemSettings$system$settings$autoUpgrade), + ssh: ssh == _undefined || ssh == null + ? _instance.ssh + : (ssh as Query$SystemSettings$system$settings$ssh), + timezone: timezone == _undefined || timezone == null + ? _instance.timezone + : (timezone as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemSettings$system$settings$autoUpgrade get autoUpgrade { final local$autoUpgrade = _instance.autoUpgrade; @@ -682,11 +2557,12 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings TRes _res; - call( - {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, - Query$SystemSettings$system$settings$ssh? ssh, - String? timezone, - String? $__typename}) => + call({ + Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, + Query$SystemSettings$system$settings$ssh? ssh, + String? timezone, + String? $__typename, + }) => _res; CopyWith$Query$SystemSettings$system$settings$autoUpgrade get autoUpgrade => @@ -695,48 +2571,78 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings CopyWith$Query$SystemSettings$system$settings$ssh.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system$settings$autoUpgrade { - Query$SystemSettings$system$settings$autoUpgrade( - {required this.allowReboot, - required this.enable, - required this.$__typename}); + Query$SystemSettings$system$settings$autoUpgrade({ + required this.allowReboot, + required this.enable, + required this.$__typename, + }); - @override factory Query$SystemSettings$system$settings$autoUpgrade.fromJson( - Map json) => - _$Query$SystemSettings$system$settings$autoUpgradeFromJson(json); + Map json) { + final l$allowReboot = json['allowReboot']; + final l$enable = json['enable']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system$settings$autoUpgrade( + allowReboot: (l$allowReboot as bool), + enable: (l$enable as bool), + $__typename: (l$$__typename as String), + ); + } final bool allowReboot; final bool enable; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemSettings$system$settings$autoUpgradeToJson(this); + Map toJson() { + final _resultData = {}; + final l$allowReboot = allowReboot; + _resultData['allowReboot'] = l$allowReboot; + final l$enable = enable; + _resultData['enable'] = l$enable; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$allowReboot = allowReboot; final l$enable = enable; final l$$__typename = $__typename; - return Object.hashAll([l$allowReboot, l$enable, l$$__typename]); + return Object.hashAll([ + l$allowReboot, + l$enable, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system$settings$autoUpgrade) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$allowReboot = allowReboot; final lOther$allowReboot = other.allowReboot; - if (l$allowReboot != lOther$allowReboot) return false; + if (l$allowReboot != lOther$allowReboot) { + return false; + } final l$enable = enable; final lOther$enable = other.enable; - if (l$enable != lOther$enable) return false; + if (l$enable != lOther$enable) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -746,27 +2652,34 @@ extension UtilityExtension$Query$SystemSettings$system$settings$autoUpgrade CopyWith$Query$SystemSettings$system$settings$autoUpgrade< Query$SystemSettings$system$settings$autoUpgrade> get copyWith => CopyWith$Query$SystemSettings$system$settings$autoUpgrade( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system$settings$autoUpgrade { factory CopyWith$Query$SystemSettings$system$settings$autoUpgrade( - Query$SystemSettings$system$settings$autoUpgrade instance, - TRes Function(Query$SystemSettings$system$settings$autoUpgrade) - then) = - _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade; + Query$SystemSettings$system$settings$autoUpgrade instance, + TRes Function(Query$SystemSettings$system$settings$autoUpgrade) then, + ) = _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade; factory CopyWith$Query$SystemSettings$system$settings$autoUpgrade.stub( TRes res) = _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade; - TRes call({bool? allowReboot, bool? enable, String? $__typename}); + TRes call({ + bool? allowReboot, + bool? enable, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade implements CopyWith$Query$SystemSettings$system$settings$autoUpgrade { _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemSettings$system$settings$autoUpgrade _instance; @@ -774,20 +2687,22 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade static const _undefined = {}; - TRes call( - {Object? allowReboot = _undefined, - Object? enable = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? allowReboot = _undefined, + Object? enable = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system$settings$autoUpgrade( - allowReboot: allowReboot == _undefined || allowReboot == null - ? _instance.allowReboot - : (allowReboot as bool), - enable: enable == _undefined || enable == null - ? _instance.enable - : (enable as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + allowReboot: allowReboot == _undefined || allowReboot == null + ? _instance.allowReboot + : (allowReboot as bool), + enable: enable == _undefined || enable == null + ? _instance.enable + : (enable as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade @@ -796,51 +2711,86 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade TRes _res; - call({bool? allowReboot, bool? enable, String? $__typename}) => _res; + call({ + bool? allowReboot, + bool? enable, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system$settings$ssh { - Query$SystemSettings$system$settings$ssh( - {required this.enable, - required this.passwordAuthentication, - required this.$__typename}); + Query$SystemSettings$system$settings$ssh({ + required this.enable, + required this.passwordAuthentication, + required this.$__typename, + }); - @override factory Query$SystemSettings$system$settings$ssh.fromJson( - Map json) => - _$Query$SystemSettings$system$settings$sshFromJson(json); + Map json) { + final l$enable = json['enable']; + final l$passwordAuthentication = json['passwordAuthentication']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system$settings$ssh( + enable: (l$enable as bool), + passwordAuthentication: (l$passwordAuthentication as bool), + $__typename: (l$$__typename as String), + ); + } final bool enable; final bool passwordAuthentication; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemSettings$system$settings$sshToJson(this); + Map toJson() { + final _resultData = {}; + final l$enable = enable; + _resultData['enable'] = l$enable; + final l$passwordAuthentication = passwordAuthentication; + _resultData['passwordAuthentication'] = l$passwordAuthentication; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$enable = enable; final l$passwordAuthentication = passwordAuthentication; final l$$__typename = $__typename; - return Object.hashAll([l$enable, l$passwordAuthentication, l$$__typename]); + return Object.hashAll([ + l$enable, + l$passwordAuthentication, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system$settings$ssh) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$enable = enable; final lOther$enable = other.enable; - if (l$enable != lOther$enable) return false; + if (l$enable != lOther$enable) { + return false; + } final l$passwordAuthentication = passwordAuthentication; final lOther$passwordAuthentication = other.passwordAuthentication; - if (l$passwordAuthentication != lOther$passwordAuthentication) return false; + if (l$passwordAuthentication != lOther$passwordAuthentication) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -849,26 +2799,34 @@ extension UtilityExtension$Query$SystemSettings$system$settings$ssh on Query$SystemSettings$system$settings$ssh { CopyWith$Query$SystemSettings$system$settings$ssh< Query$SystemSettings$system$settings$ssh> - get copyWith => - CopyWith$Query$SystemSettings$system$settings$ssh(this, (i) => i); + get copyWith => CopyWith$Query$SystemSettings$system$settings$ssh( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system$settings$ssh { factory CopyWith$Query$SystemSettings$system$settings$ssh( - Query$SystemSettings$system$settings$ssh instance, - TRes Function(Query$SystemSettings$system$settings$ssh) then) = - _CopyWithImpl$Query$SystemSettings$system$settings$ssh; + Query$SystemSettings$system$settings$ssh instance, + TRes Function(Query$SystemSettings$system$settings$ssh) then, + ) = _CopyWithImpl$Query$SystemSettings$system$settings$ssh; factory CopyWith$Query$SystemSettings$system$settings$ssh.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh; - TRes call({bool? enable, bool? passwordAuthentication, String? $__typename}); + TRes call({ + bool? enable, + bool? passwordAuthentication, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemSettings$system$settings$ssh implements CopyWith$Query$SystemSettings$system$settings$ssh { _CopyWithImpl$Query$SystemSettings$system$settings$ssh( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemSettings$system$settings$ssh _instance; @@ -876,21 +2834,23 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$ssh static const _undefined = {}; - TRes call( - {Object? enable = _undefined, - Object? passwordAuthentication = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? enable = _undefined, + Object? passwordAuthentication = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system$settings$ssh( - enable: enable == _undefined || enable == null - ? _instance.enable - : (enable as bool), - passwordAuthentication: passwordAuthentication == _undefined || - passwordAuthentication == null - ? _instance.passwordAuthentication - : (passwordAuthentication as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + enable: enable == _undefined || enable == null + ? _instance.enable + : (enable as bool), + passwordAuthentication: passwordAuthentication == _undefined || + passwordAuthentication == null + ? _instance.passwordAuthentication + : (passwordAuthentication as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh @@ -899,41 +2859,72 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh TRes _res; - call({bool? enable, bool? passwordAuthentication, String? $__typename}) => + call({ + bool? enable, + bool? passwordAuthentication, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Query$SystemIsUsingBinds { - Query$SystemIsUsingBinds({required this.system, required this.$__typename}); + Query$SystemIsUsingBinds({ + required this.system, + required this.$__typename, + }); - @override - factory Query$SystemIsUsingBinds.fromJson(Map json) => - _$Query$SystemIsUsingBindsFromJson(json); + factory Query$SystemIsUsingBinds.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemIsUsingBinds( + system: Query$SystemIsUsingBinds$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemIsUsingBinds$system system; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemIsUsingBindsToJson(this); + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$system = system; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + return Object.hashAll([ + l$system, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemIsUsingBinds) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$system = system; final lOther$system = other.system; - if (l$system != lOther$system) return false; + if (l$system != lOther$system) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -941,24 +2932,34 @@ class Query$SystemIsUsingBinds { extension UtilityExtension$Query$SystemIsUsingBinds on Query$SystemIsUsingBinds { CopyWith$Query$SystemIsUsingBinds get copyWith => - CopyWith$Query$SystemIsUsingBinds(this, (i) => i); + CopyWith$Query$SystemIsUsingBinds( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemIsUsingBinds { - factory CopyWith$Query$SystemIsUsingBinds(Query$SystemIsUsingBinds instance, - TRes Function(Query$SystemIsUsingBinds) then) = - _CopyWithImpl$Query$SystemIsUsingBinds; + factory CopyWith$Query$SystemIsUsingBinds( + Query$SystemIsUsingBinds instance, + TRes Function(Query$SystemIsUsingBinds) then, + ) = _CopyWithImpl$Query$SystemIsUsingBinds; factory CopyWith$Query$SystemIsUsingBinds.stub(TRes res) = _CopyWithStubImpl$Query$SystemIsUsingBinds; - TRes call({Query$SystemIsUsingBinds$system? system, String? $__typename}); + TRes call({ + Query$SystemIsUsingBinds$system? system, + String? $__typename, + }); CopyWith$Query$SystemIsUsingBinds$system get system; } class _CopyWithImpl$Query$SystemIsUsingBinds implements CopyWith$Query$SystemIsUsingBinds { - _CopyWithImpl$Query$SystemIsUsingBinds(this._instance, this._then); + _CopyWithImpl$Query$SystemIsUsingBinds( + this._instance, + this._then, + ); final Query$SystemIsUsingBinds _instance; @@ -966,14 +2967,18 @@ class _CopyWithImpl$Query$SystemIsUsingBinds static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemIsUsingBinds( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$SystemIsUsingBinds$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemIsUsingBinds$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemIsUsingBinds$system get system { final local$system = _instance.system; return CopyWith$Query$SystemIsUsingBinds$system( @@ -987,57 +2992,68 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds TRes _res; - call({Query$SystemIsUsingBinds$system? system, String? $__typename}) => _res; + call({ + Query$SystemIsUsingBinds$system? system, + String? $__typename, + }) => + _res; CopyWith$Query$SystemIsUsingBinds$system get system => CopyWith$Query$SystemIsUsingBinds$system.stub(_res); } const documentNodeQuerySystemIsUsingBinds = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'SystemIsUsingBinds'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'SystemIsUsingBinds'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'info'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'info'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'usingBinds'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'usingBinds'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$SystemIsUsingBinds _parserFn$Query$SystemIsUsingBinds( Map data) => @@ -1045,52 +3061,54 @@ Query$SystemIsUsingBinds _parserFn$Query$SystemIsUsingBinds( class Options$Query$SystemIsUsingBinds extends graphql.QueryOptions { - Options$Query$SystemIsUsingBinds( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQuerySystemIsUsingBinds, - parserFn: _parserFn$Query$SystemIsUsingBinds); + Options$Query$SystemIsUsingBinds({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemIsUsingBinds, + parserFn: _parserFn$Query$SystemIsUsingBinds, + ); } class WatchOptions$Query$SystemIsUsingBinds extends graphql.WatchQueryOptions { - WatchOptions$Query$SystemIsUsingBinds( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQuerySystemIsUsingBinds, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$SystemIsUsingBinds); + WatchOptions$Query$SystemIsUsingBinds({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemIsUsingBinds, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemIsUsingBinds, + ); } class FetchMoreOptions$Query$SystemIsUsingBinds @@ -1098,8 +3116,9 @@ class FetchMoreOptions$Query$SystemIsUsingBinds FetchMoreOptions$Query$SystemIsUsingBinds( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQuerySystemIsUsingBinds); + updateQuery: updateQuery, + document: documentNodeQuerySystemIsUsingBinds, + ); } extension ClientExtension$Query$SystemIsUsingBinds on graphql.GraphQLClient { @@ -1111,58 +3130,87 @@ extension ClientExtension$Query$SystemIsUsingBinds on graphql.GraphQLClient { watchQuery$SystemIsUsingBinds( [WatchOptions$Query$SystemIsUsingBinds? options]) => this.watchQuery(options ?? WatchOptions$Query$SystemIsUsingBinds()); - void writeQuery$SystemIsUsingBinds( - {required Query$SystemIsUsingBinds data, bool broadcast = true}) => + void writeQuery$SystemIsUsingBinds({ + required Query$SystemIsUsingBinds data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQuerySystemIsUsingBinds)), - data: data.toJson(), - broadcast: broadcast); - Query$SystemIsUsingBinds? readQuery$SystemIsUsingBinds( - {bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation( document: documentNodeQuerySystemIsUsingBinds)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemIsUsingBinds? readQuery$SystemIsUsingBinds( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemIsUsingBinds)), + optimistic: optimistic, + ); return result == null ? null : Query$SystemIsUsingBinds.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$SystemIsUsingBinds$system { - Query$SystemIsUsingBinds$system( - {required this.info, required this.$__typename}); + Query$SystemIsUsingBinds$system({ + required this.info, + required this.$__typename, + }); - @override - factory Query$SystemIsUsingBinds$system.fromJson(Map json) => - _$Query$SystemIsUsingBinds$systemFromJson(json); + factory Query$SystemIsUsingBinds$system.fromJson(Map json) { + final l$info = json['info']; + final l$$__typename = json['__typename']; + return Query$SystemIsUsingBinds$system( + info: Query$SystemIsUsingBinds$system$info.fromJson( + (l$info as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemIsUsingBinds$system$info info; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemIsUsingBinds$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$info = info; + _resultData['info'] = l$info.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$info = info; final l$$__typename = $__typename; - return Object.hashAll([l$info, l$$__typename]); + return Object.hashAll([ + l$info, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemIsUsingBinds$system) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$info = info; final lOther$info = other.info; - if (l$info != lOther$info) return false; + if (l$info != lOther$info) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1170,25 +3218,34 @@ class Query$SystemIsUsingBinds$system { extension UtilityExtension$Query$SystemIsUsingBinds$system on Query$SystemIsUsingBinds$system { CopyWith$Query$SystemIsUsingBinds$system - get copyWith => CopyWith$Query$SystemIsUsingBinds$system(this, (i) => i); + get copyWith => CopyWith$Query$SystemIsUsingBinds$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemIsUsingBinds$system { factory CopyWith$Query$SystemIsUsingBinds$system( - Query$SystemIsUsingBinds$system instance, - TRes Function(Query$SystemIsUsingBinds$system) then) = - _CopyWithImpl$Query$SystemIsUsingBinds$system; + Query$SystemIsUsingBinds$system instance, + TRes Function(Query$SystemIsUsingBinds$system) then, + ) = _CopyWithImpl$Query$SystemIsUsingBinds$system; factory CopyWith$Query$SystemIsUsingBinds$system.stub(TRes res) = _CopyWithStubImpl$Query$SystemIsUsingBinds$system; - TRes call({Query$SystemIsUsingBinds$system$info? info, String? $__typename}); + TRes call({ + Query$SystemIsUsingBinds$system$info? info, + String? $__typename, + }); CopyWith$Query$SystemIsUsingBinds$system$info get info; } class _CopyWithImpl$Query$SystemIsUsingBinds$system implements CopyWith$Query$SystemIsUsingBinds$system { - _CopyWithImpl$Query$SystemIsUsingBinds$system(this._instance, this._then); + _CopyWithImpl$Query$SystemIsUsingBinds$system( + this._instance, + this._then, + ); final Query$SystemIsUsingBinds$system _instance; @@ -1196,14 +3253,18 @@ class _CopyWithImpl$Query$SystemIsUsingBinds$system static const _undefined = {}; - TRes call({Object? info = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? info = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemIsUsingBinds$system( - info: info == _undefined || info == null - ? _instance.info - : (info as Query$SystemIsUsingBinds$system$info), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + info: info == _undefined || info == null + ? _instance.info + : (info as Query$SystemIsUsingBinds$system$info), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemIsUsingBinds$system$info get info { final local$info = _instance.info; return CopyWith$Query$SystemIsUsingBinds$system$info( @@ -1217,46 +3278,73 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system TRes _res; - call({Query$SystemIsUsingBinds$system$info? info, String? $__typename}) => + call({ + Query$SystemIsUsingBinds$system$info? info, + String? $__typename, + }) => _res; CopyWith$Query$SystemIsUsingBinds$system$info get info => CopyWith$Query$SystemIsUsingBinds$system$info.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemIsUsingBinds$system$info { - Query$SystemIsUsingBinds$system$info( - {required this.usingBinds, required this.$__typename}); + Query$SystemIsUsingBinds$system$info({ + required this.usingBinds, + required this.$__typename, + }); - @override factory Query$SystemIsUsingBinds$system$info.fromJson( - Map json) => - _$Query$SystemIsUsingBinds$system$infoFromJson(json); + Map json) { + final l$usingBinds = json['usingBinds']; + final l$$__typename = json['__typename']; + return Query$SystemIsUsingBinds$system$info( + usingBinds: (l$usingBinds as bool), + $__typename: (l$$__typename as String), + ); + } final bool usingBinds; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemIsUsingBinds$system$infoToJson(this); + Map toJson() { + final _resultData = {}; + final l$usingBinds = usingBinds; + _resultData['usingBinds'] = l$usingBinds; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$usingBinds = usingBinds; final l$$__typename = $__typename; - return Object.hashAll([l$usingBinds, l$$__typename]); + return Object.hashAll([ + l$usingBinds, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemIsUsingBinds$system$info) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$usingBinds = usingBinds; final lOther$usingBinds = other.usingBinds; - if (l$usingBinds != lOther$usingBinds) return false; + if (l$usingBinds != lOther$usingBinds) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1265,26 +3353,33 @@ extension UtilityExtension$Query$SystemIsUsingBinds$system$info on Query$SystemIsUsingBinds$system$info { CopyWith$Query$SystemIsUsingBinds$system$info< Query$SystemIsUsingBinds$system$info> - get copyWith => - CopyWith$Query$SystemIsUsingBinds$system$info(this, (i) => i); + get copyWith => CopyWith$Query$SystemIsUsingBinds$system$info( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemIsUsingBinds$system$info { factory CopyWith$Query$SystemIsUsingBinds$system$info( - Query$SystemIsUsingBinds$system$info instance, - TRes Function(Query$SystemIsUsingBinds$system$info) then) = - _CopyWithImpl$Query$SystemIsUsingBinds$system$info; + Query$SystemIsUsingBinds$system$info instance, + TRes Function(Query$SystemIsUsingBinds$system$info) then, + ) = _CopyWithImpl$Query$SystemIsUsingBinds$system$info; factory CopyWith$Query$SystemIsUsingBinds$system$info.stub(TRes res) = _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info; - TRes call({bool? usingBinds, String? $__typename}); + TRes call({ + bool? usingBinds, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemIsUsingBinds$system$info implements CopyWith$Query$SystemIsUsingBinds$system$info { _CopyWithImpl$Query$SystemIsUsingBinds$system$info( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemIsUsingBinds$system$info _instance; @@ -1292,16 +3387,18 @@ class _CopyWithImpl$Query$SystemIsUsingBinds$system$info static const _undefined = {}; - TRes call( - {Object? usingBinds = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? usingBinds = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemIsUsingBinds$system$info( - usingBinds: usingBinds == _undefined || usingBinds == null - ? _instance.usingBinds - : (usingBinds as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + usingBinds: usingBinds == _undefined || usingBinds == null + ? _instance.usingBinds + : (usingBinds as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info @@ -1310,64 +3407,104 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info TRes _res; - call({bool? usingBinds, String? $__typename}) => _res; + call({ + bool? usingBinds, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$DomainInfo { - Query$DomainInfo({required this.system, required this.$__typename}); + Query$DomainInfo({ + required this.system, + required this.$__typename, + }); - @override - factory Query$DomainInfo.fromJson(Map json) => - _$Query$DomainInfoFromJson(json); + factory Query$DomainInfo.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$DomainInfo( + system: + Query$DomainInfo$system.fromJson((l$system as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$DomainInfo$system system; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$DomainInfoToJson(this); + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$system = system; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + return Object.hashAll([ + l$system, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$DomainInfo) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$DomainInfo) || runtimeType != other.runtimeType) { return false; + } final l$system = system; final lOther$system = other.system; - if (l$system != lOther$system) return false; + if (l$system != lOther$system) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$DomainInfo on Query$DomainInfo { CopyWith$Query$DomainInfo get copyWith => - CopyWith$Query$DomainInfo(this, (i) => i); + CopyWith$Query$DomainInfo( + this, + (i) => i, + ); } abstract class CopyWith$Query$DomainInfo { factory CopyWith$Query$DomainInfo( - Query$DomainInfo instance, TRes Function(Query$DomainInfo) then) = - _CopyWithImpl$Query$DomainInfo; + Query$DomainInfo instance, + TRes Function(Query$DomainInfo) then, + ) = _CopyWithImpl$Query$DomainInfo; factory CopyWith$Query$DomainInfo.stub(TRes res) = _CopyWithStubImpl$Query$DomainInfo; - TRes call({Query$DomainInfo$system? system, String? $__typename}); + TRes call({ + Query$DomainInfo$system? system, + String? $__typename, + }); CopyWith$Query$DomainInfo$system get system; } class _CopyWithImpl$Query$DomainInfo implements CopyWith$Query$DomainInfo { - _CopyWithImpl$Query$DomainInfo(this._instance, this._then); + _CopyWithImpl$Query$DomainInfo( + this._instance, + this._then, + ); final Query$DomainInfo _instance; @@ -1375,14 +3512,18 @@ class _CopyWithImpl$Query$DomainInfo static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$DomainInfo( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$DomainInfo$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$DomainInfo$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$DomainInfo$system get system { final local$system = _instance.system; return CopyWith$Query$DomainInfo$system( @@ -1396,142 +3537,163 @@ class _CopyWithStubImpl$Query$DomainInfo TRes _res; - call({Query$DomainInfo$system? system, String? $__typename}) => _res; + call({ + Query$DomainInfo$system? system, + String? $__typename, + }) => + _res; CopyWith$Query$DomainInfo$system get system => CopyWith$Query$DomainInfo$system.stub(_res); } const documentNodeQueryDomainInfo = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'DomainInfo'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'DomainInfo'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'domainInfo'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'domain'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'hostname'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'provider'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'requiredDnsRecords'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'dnsRecordFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'domain'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'hostname'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'requiredDnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'dnsRecordFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitiondnsRecordFields, ]); Query$DomainInfo _parserFn$Query$DomainInfo(Map data) => Query$DomainInfo.fromJson(data); class Options$Query$DomainInfo extends graphql.QueryOptions { - Options$Query$DomainInfo( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryDomainInfo, - parserFn: _parserFn$Query$DomainInfo); + Options$Query$DomainInfo({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryDomainInfo, + parserFn: _parserFn$Query$DomainInfo, + ); } class WatchOptions$Query$DomainInfo extends graphql.WatchQueryOptions { - WatchOptions$Query$DomainInfo( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryDomainInfo, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$DomainInfo); + WatchOptions$Query$DomainInfo({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryDomainInfo, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$DomainInfo, + ); } class FetchMoreOptions$Query$DomainInfo extends graphql.FetchMoreOptions { FetchMoreOptions$Query$DomainInfo({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryDomainInfo); + : super( + updateQuery: updateQuery, + document: documentNodeQueryDomainInfo, + ); } extension ClientExtension$Query$DomainInfo on graphql.GraphQLClient { @@ -1541,81 +3703,119 @@ extension ClientExtension$Query$DomainInfo on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$DomainInfo( [WatchOptions$Query$DomainInfo? options]) => this.watchQuery(options ?? WatchOptions$Query$DomainInfo()); - void writeQuery$DomainInfo( - {required Query$DomainInfo data, bool broadcast = true}) => + void writeQuery$DomainInfo({ + required Query$DomainInfo data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryDomainInfo)), - data: data.toJson(), - broadcast: broadcast); - Query$DomainInfo? readQuery$DomainInfo({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryDomainInfo)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$DomainInfo? readQuery$DomainInfo({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryDomainInfo)), + optimistic: optimistic, + ); return result == null ? null : Query$DomainInfo.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$DomainInfo$system { - Query$DomainInfo$system( - {required this.domainInfo, required this.$__typename}); + Query$DomainInfo$system({ + required this.domainInfo, + required this.$__typename, + }); - @override - factory Query$DomainInfo$system.fromJson(Map json) => - _$Query$DomainInfo$systemFromJson(json); + factory Query$DomainInfo$system.fromJson(Map json) { + final l$domainInfo = json['domainInfo']; + final l$$__typename = json['__typename']; + return Query$DomainInfo$system( + domainInfo: Query$DomainInfo$system$domainInfo.fromJson( + (l$domainInfo as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$DomainInfo$system$domainInfo domainInfo; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$DomainInfo$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$domainInfo = domainInfo; + _resultData['domainInfo'] = l$domainInfo.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$domainInfo = domainInfo; final l$$__typename = $__typename; - return Object.hashAll([l$domainInfo, l$$__typename]); + return Object.hashAll([ + l$domainInfo, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$DomainInfo$system) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$DomainInfo$system) || + runtimeType != other.runtimeType) { return false; + } final l$domainInfo = domainInfo; final lOther$domainInfo = other.domainInfo; - if (l$domainInfo != lOther$domainInfo) return false; + if (l$domainInfo != lOther$domainInfo) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$DomainInfo$system on Query$DomainInfo$system { CopyWith$Query$DomainInfo$system get copyWith => - CopyWith$Query$DomainInfo$system(this, (i) => i); + CopyWith$Query$DomainInfo$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$DomainInfo$system { - factory CopyWith$Query$DomainInfo$system(Query$DomainInfo$system instance, - TRes Function(Query$DomainInfo$system) then) = - _CopyWithImpl$Query$DomainInfo$system; + factory CopyWith$Query$DomainInfo$system( + Query$DomainInfo$system instance, + TRes Function(Query$DomainInfo$system) then, + ) = _CopyWithImpl$Query$DomainInfo$system; factory CopyWith$Query$DomainInfo$system.stub(TRes res) = _CopyWithStubImpl$Query$DomainInfo$system; - TRes call( - {Query$DomainInfo$system$domainInfo? domainInfo, String? $__typename}); + TRes call({ + Query$DomainInfo$system$domainInfo? domainInfo, + String? $__typename, + }); CopyWith$Query$DomainInfo$system$domainInfo get domainInfo; } class _CopyWithImpl$Query$DomainInfo$system implements CopyWith$Query$DomainInfo$system { - _CopyWithImpl$Query$DomainInfo$system(this._instance, this._then); + _CopyWithImpl$Query$DomainInfo$system( + this._instance, + this._then, + ); final Query$DomainInfo$system _instance; @@ -1623,16 +3823,18 @@ class _CopyWithImpl$Query$DomainInfo$system static const _undefined = {}; - TRes call( - {Object? domainInfo = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? domainInfo = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$DomainInfo$system( - domainInfo: domainInfo == _undefined || domainInfo == null - ? _instance.domainInfo - : (domainInfo as Query$DomainInfo$system$domainInfo), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + domainInfo: domainInfo == _undefined || domainInfo == null + ? _instance.domainInfo + : (domainInfo as Query$DomainInfo$system$domainInfo), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$DomainInfo$system$domainInfo get domainInfo { final local$domainInfo = _instance.domainInfo; return CopyWith$Query$DomainInfo$system$domainInfo( @@ -1646,40 +3848,70 @@ class _CopyWithStubImpl$Query$DomainInfo$system TRes _res; - call({Query$DomainInfo$system$domainInfo? domainInfo, String? $__typename}) => + call({ + Query$DomainInfo$system$domainInfo? domainInfo, + String? $__typename, + }) => _res; CopyWith$Query$DomainInfo$system$domainInfo get domainInfo => CopyWith$Query$DomainInfo$system$domainInfo.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$DomainInfo$system$domainInfo { - Query$DomainInfo$system$domainInfo( - {required this.domain, - required this.hostname, - required this.provider, - required this.requiredDnsRecords, - required this.$__typename}); + Query$DomainInfo$system$domainInfo({ + required this.domain, + required this.hostname, + required this.provider, + required this.requiredDnsRecords, + required this.$__typename, + }); - @override factory Query$DomainInfo$system$domainInfo.fromJson( - Map json) => - _$Query$DomainInfo$system$domainInfoFromJson(json); + Map json) { + final l$domain = json['domain']; + final l$hostname = json['hostname']; + final l$provider = json['provider']; + final l$requiredDnsRecords = json['requiredDnsRecords']; + final l$$__typename = json['__typename']; + return Query$DomainInfo$system$domainInfo( + domain: (l$domain as String), + hostname: (l$hostname as String), + provider: fromJson$Enum$DnsProvider((l$provider as String)), + requiredDnsRecords: (l$requiredDnsRecords as List) + .map((e) => + Fragment$dnsRecordFields.fromJson((e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final String domain; final String hostname; - @JsonKey(unknownEnumValue: Enum$DnsProvider.$unknown) final Enum$DnsProvider provider; final List requiredDnsRecords; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$DomainInfo$system$domainInfoToJson(this); + Map toJson() { + final _resultData = {}; + final l$domain = domain; + _resultData['domain'] = l$domain; + final l$hostname = hostname; + _resultData['hostname'] = l$hostname; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$DnsProvider(l$provider); + final l$requiredDnsRecords = requiredDnsRecords; + _resultData['requiredDnsRecords'] = + l$requiredDnsRecords.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$domain = domain; final l$hostname = hostname; @@ -1691,38 +3923,51 @@ class Query$DomainInfo$system$domainInfo { l$hostname, l$provider, Object.hashAll(l$requiredDnsRecords.map((v) => v)), - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$DomainInfo$system$domainInfo) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$domain = domain; final lOther$domain = other.domain; - if (l$domain != lOther$domain) return false; + if (l$domain != lOther$domain) { + return false; + } final l$hostname = hostname; final lOther$hostname = other.hostname; - if (l$hostname != lOther$hostname) return false; + if (l$hostname != lOther$hostname) { + return false; + } final l$provider = provider; final lOther$provider = other.provider; - if (l$provider != lOther$provider) return false; + if (l$provider != lOther$provider) { + return false; + } final l$requiredDnsRecords = requiredDnsRecords; final lOther$requiredDnsRecords = other.requiredDnsRecords; - if (l$requiredDnsRecords.length != lOther$requiredDnsRecords.length) + if (l$requiredDnsRecords.length != lOther$requiredDnsRecords.length) { return false; + } for (int i = 0; i < l$requiredDnsRecords.length; i++) { final l$requiredDnsRecords$entry = l$requiredDnsRecords[i]; final lOther$requiredDnsRecords$entry = lOther$requiredDnsRecords[i]; - if (l$requiredDnsRecords$entry != lOther$requiredDnsRecords$entry) + if (l$requiredDnsRecords$entry != lOther$requiredDnsRecords$entry) { return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1731,25 +3976,28 @@ extension UtilityExtension$Query$DomainInfo$system$domainInfo on Query$DomainInfo$system$domainInfo { CopyWith$Query$DomainInfo$system$domainInfo< Query$DomainInfo$system$domainInfo> - get copyWith => - CopyWith$Query$DomainInfo$system$domainInfo(this, (i) => i); + get copyWith => CopyWith$Query$DomainInfo$system$domainInfo( + this, + (i) => i, + ); } abstract class CopyWith$Query$DomainInfo$system$domainInfo { factory CopyWith$Query$DomainInfo$system$domainInfo( - Query$DomainInfo$system$domainInfo instance, - TRes Function(Query$DomainInfo$system$domainInfo) then) = - _CopyWithImpl$Query$DomainInfo$system$domainInfo; + Query$DomainInfo$system$domainInfo instance, + TRes Function(Query$DomainInfo$system$domainInfo) then, + ) = _CopyWithImpl$Query$DomainInfo$system$domainInfo; factory CopyWith$Query$DomainInfo$system$domainInfo.stub(TRes res) = _CopyWithStubImpl$Query$DomainInfo$system$domainInfo; - TRes call( - {String? domain, - String? hostname, - Enum$DnsProvider? provider, - List? requiredDnsRecords, - String? $__typename}); + TRes call({ + String? domain, + String? hostname, + Enum$DnsProvider? provider, + List? requiredDnsRecords, + String? $__typename, + }); TRes requiredDnsRecords( Iterable Function( Iterable< @@ -1759,7 +4007,10 @@ abstract class CopyWith$Query$DomainInfo$system$domainInfo { class _CopyWithImpl$Query$DomainInfo$system$domainInfo implements CopyWith$Query$DomainInfo$system$domainInfo { - _CopyWithImpl$Query$DomainInfo$system$domainInfo(this._instance, this._then); + _CopyWithImpl$Query$DomainInfo$system$domainInfo( + this._instance, + this._then, + ); final Query$DomainInfo$system$domainInfo _instance; @@ -1767,29 +4018,31 @@ class _CopyWithImpl$Query$DomainInfo$system$domainInfo static const _undefined = {}; - TRes call( - {Object? domain = _undefined, - Object? hostname = _undefined, - Object? provider = _undefined, - Object? requiredDnsRecords = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? domain = _undefined, + Object? hostname = _undefined, + Object? provider = _undefined, + Object? requiredDnsRecords = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$DomainInfo$system$domainInfo( - domain: domain == _undefined || domain == null - ? _instance.domain - : (domain as String), - hostname: hostname == _undefined || hostname == null - ? _instance.hostname - : (hostname as String), - provider: provider == _undefined || provider == null - ? _instance.provider - : (provider as Enum$DnsProvider), - requiredDnsRecords: - requiredDnsRecords == _undefined || requiredDnsRecords == null - ? _instance.requiredDnsRecords - : (requiredDnsRecords as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + domain: domain == _undefined || domain == null + ? _instance.domain + : (domain as String), + hostname: hostname == _undefined || hostname == null + ? _instance.hostname + : (hostname as String), + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$DnsProvider), + requiredDnsRecords: + requiredDnsRecords == _undefined || requiredDnsRecords == null + ? _instance.requiredDnsRecords + : (requiredDnsRecords as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes requiredDnsRecords( Iterable Function( Iterable< @@ -1798,8 +4051,10 @@ class _CopyWithImpl$Query$DomainInfo$system$domainInfo _fn) => call( requiredDnsRecords: _fn(_instance.requiredDnsRecords - .map((e) => CopyWith$Fragment$dnsRecordFields(e, (i) => i))) - .toList()); + .map((e) => CopyWith$Fragment$dnsRecordFields( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo @@ -1808,55 +4063,77 @@ class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo TRes _res; - call( - {String? domain, - String? hostname, - Enum$DnsProvider? provider, - List? requiredDnsRecords, - String? $__typename}) => + call({ + String? domain, + String? hostname, + Enum$DnsProvider? provider, + List? requiredDnsRecords, + String? $__typename, + }) => _res; requiredDnsRecords(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$ChangeTimezone { - Variables$Mutation$ChangeTimezone({required this.timezone}); + factory Variables$Mutation$ChangeTimezone({required String timezone}) => + Variables$Mutation$ChangeTimezone._({ + r'timezone': timezone, + }); + + Variables$Mutation$ChangeTimezone._(this._$data); + + factory Variables$Mutation$ChangeTimezone.fromJson( + Map data) { + final result$data = {}; + final l$timezone = data['timezone']; + result$data['timezone'] = (l$timezone as String); + return Variables$Mutation$ChangeTimezone._(result$data); + } + + Map _$data; + + String get timezone => (_$data['timezone'] as String); + Map toJson() { + final result$data = {}; + final l$timezone = timezone; + result$data['timezone'] = l$timezone; + return result$data; + } + + CopyWith$Variables$Mutation$ChangeTimezone + get copyWith => CopyWith$Variables$Mutation$ChangeTimezone( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$ChangeTimezone) || + runtimeType != other.runtimeType) { + return false; + } + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) { + return false; + } + return true; + } @override - factory Variables$Mutation$ChangeTimezone.fromJson( - Map json) => - _$Variables$Mutation$ChangeTimezoneFromJson(json); - - final String timezone; - - Map toJson() => - _$Variables$Mutation$ChangeTimezoneToJson(this); int get hashCode { final l$timezone = timezone; return Object.hashAll([l$timezone]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ChangeTimezone) || - runtimeType != other.runtimeType) return false; - final l$timezone = timezone; - final lOther$timezone = other.timezone; - if (l$timezone != lOther$timezone) return false; - return true; - } - - CopyWith$Variables$Mutation$ChangeTimezone - get copyWith => - CopyWith$Variables$Mutation$ChangeTimezone(this, (i) => i); } abstract class CopyWith$Variables$Mutation$ChangeTimezone { factory CopyWith$Variables$Mutation$ChangeTimezone( - Variables$Mutation$ChangeTimezone instance, - TRes Function(Variables$Mutation$ChangeTimezone) then) = - _CopyWithImpl$Variables$Mutation$ChangeTimezone; + Variables$Mutation$ChangeTimezone instance, + TRes Function(Variables$Mutation$ChangeTimezone) then, + ) = _CopyWithImpl$Variables$Mutation$ChangeTimezone; factory CopyWith$Variables$Mutation$ChangeTimezone.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$ChangeTimezone; @@ -1866,7 +4143,10 @@ abstract class CopyWith$Variables$Mutation$ChangeTimezone { class _CopyWithImpl$Variables$Mutation$ChangeTimezone implements CopyWith$Variables$Mutation$ChangeTimezone { - _CopyWithImpl$Variables$Mutation$ChangeTimezone(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$ChangeTimezone( + this._instance, + this._then, + ); final Variables$Mutation$ChangeTimezone _instance; @@ -1875,10 +4155,11 @@ class _CopyWithImpl$Variables$Mutation$ChangeTimezone static const _undefined = {}; TRes call({Object? timezone = _undefined}) => - _then(Variables$Mutation$ChangeTimezone( - timezone: timezone == _undefined || timezone == null - ? _instance.timezone - : (timezone as String))); + _then(Variables$Mutation$ChangeTimezone._({ + ..._instance._$data, + if (timezone != _undefined && timezone != null) + 'timezone': (timezone as String), + })); } class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone @@ -1890,64 +4171,98 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone call({String? timezone}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeTimezone { - Mutation$ChangeTimezone( - {required this.changeTimezone, required this.$__typename}); + Mutation$ChangeTimezone({ + required this.changeTimezone, + required this.$__typename, + }); - @override - factory Mutation$ChangeTimezone.fromJson(Map json) => - _$Mutation$ChangeTimezoneFromJson(json); + factory Mutation$ChangeTimezone.fromJson(Map json) { + final l$changeTimezone = json['changeTimezone']; + final l$$__typename = json['__typename']; + return Mutation$ChangeTimezone( + changeTimezone: Mutation$ChangeTimezone$changeTimezone.fromJson( + (l$changeTimezone as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$ChangeTimezone$changeTimezone changeTimezone; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$ChangeTimezoneToJson(this); + Map toJson() { + final _resultData = {}; + final l$changeTimezone = changeTimezone; + _resultData['changeTimezone'] = l$changeTimezone.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$changeTimezone = changeTimezone; final l$$__typename = $__typename; - return Object.hashAll([l$changeTimezone, l$$__typename]); + return Object.hashAll([ + l$changeTimezone, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$ChangeTimezone) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ChangeTimezone) || + runtimeType != other.runtimeType) { return false; + } final l$changeTimezone = changeTimezone; final lOther$changeTimezone = other.changeTimezone; - if (l$changeTimezone != lOther$changeTimezone) return false; + if (l$changeTimezone != lOther$changeTimezone) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$ChangeTimezone on Mutation$ChangeTimezone { CopyWith$Mutation$ChangeTimezone get copyWith => - CopyWith$Mutation$ChangeTimezone(this, (i) => i); + CopyWith$Mutation$ChangeTimezone( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeTimezone { - factory CopyWith$Mutation$ChangeTimezone(Mutation$ChangeTimezone instance, - TRes Function(Mutation$ChangeTimezone) then) = - _CopyWithImpl$Mutation$ChangeTimezone; + factory CopyWith$Mutation$ChangeTimezone( + Mutation$ChangeTimezone instance, + TRes Function(Mutation$ChangeTimezone) then, + ) = _CopyWithImpl$Mutation$ChangeTimezone; factory CopyWith$Mutation$ChangeTimezone.stub(TRes res) = _CopyWithStubImpl$Mutation$ChangeTimezone; - TRes call( - {Mutation$ChangeTimezone$changeTimezone? changeTimezone, - String? $__typename}); + TRes call({ + Mutation$ChangeTimezone$changeTimezone? changeTimezone, + String? $__typename, + }); CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone; } class _CopyWithImpl$Mutation$ChangeTimezone implements CopyWith$Mutation$ChangeTimezone { - _CopyWithImpl$Mutation$ChangeTimezone(this._instance, this._then); + _CopyWithImpl$Mutation$ChangeTimezone( + this._instance, + this._then, + ); final Mutation$ChangeTimezone _instance; @@ -1955,16 +4270,18 @@ class _CopyWithImpl$Mutation$ChangeTimezone static const _undefined = {}; - TRes call( - {Object? changeTimezone = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? changeTimezone = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ChangeTimezone( - changeTimezone: changeTimezone == _undefined || changeTimezone == null - ? _instance.changeTimezone - : (changeTimezone as Mutation$ChangeTimezone$changeTimezone), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + changeTimezone: changeTimezone == _undefined || changeTimezone == null + ? _instance.changeTimezone + : (changeTimezone as Mutation$ChangeTimezone$changeTimezone), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone { final local$changeTimezone = _instance.changeTimezone; return CopyWith$Mutation$ChangeTimezone$changeTimezone( @@ -1978,9 +4295,10 @@ class _CopyWithStubImpl$Mutation$ChangeTimezone TRes _res; - call( - {Mutation$ChangeTimezone$changeTimezone? changeTimezone, - String? $__typename}) => + call({ + Mutation$ChangeTimezone$changeTimezone? changeTimezone, + String? $__typename, + }) => _res; CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone => CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(_res); @@ -1988,92 +4306,106 @@ class _CopyWithStubImpl$Mutation$ChangeTimezone const documentNodeMutationChangeTimezone = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'ChangeTimezone'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'timezone')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'changeTimezone'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'timezone'), - value: VariableNode(name: NameNode(value: 'timezone'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'ChangeTimezone'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'timezone')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeTimezone'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'timezone'), + value: VariableNode(name: NameNode(value: 'timezone')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'timezone'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'timezone'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$ChangeTimezone _parserFn$Mutation$ChangeTimezone( Map data) => Mutation$ChangeTimezone.fromJson(data); typedef OnMutationCompleted$Mutation$ChangeTimezone = FutureOr Function( - dynamic, Mutation$ChangeTimezone?); + dynamic, + Mutation$ChangeTimezone?, +); class Options$Mutation$ChangeTimezone extends graphql.MutationOptions { - Options$Mutation$ChangeTimezone( - {String? operationName, - required Variables$Mutation$ChangeTimezone variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$ChangeTimezone? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$ChangeTimezone({ + String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeTimezone? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$ChangeTimezone(data)), - update: update, - onError: onError, - document: documentNodeMutationChangeTimezone, - parserFn: _parserFn$Mutation$ChangeTimezone); + : _parserFn$Mutation$ChangeTimezone(data), + ), + update: update, + onError: onError, + document: documentNodeMutationChangeTimezone, + parserFn: _parserFn$Mutation$ChangeTimezone, + ); final OnMutationCompleted$Mutation$ChangeTimezone? onCompletedWithParsed; @@ -2082,38 +4414,39 @@ class Options$Mutation$ChangeTimezone ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$ChangeTimezone extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ChangeTimezone( - {String? operationName, - required Variables$Mutation$ChangeTimezone variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationChangeTimezone, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ChangeTimezone); + WatchOptions$Mutation$ChangeTimezone({ + String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeTimezone, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeTimezone, + ); } extension ClientExtension$Mutation$ChangeTimezone on graphql.GraphQLClient { @@ -2125,20 +4458,31 @@ extension ClientExtension$Mutation$ChangeTimezone on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeTimezone$changeTimezone - implements Fragment$basicMutationReturnFields { - Mutation$ChangeTimezone$changeTimezone( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.timezone}); + implements Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + Mutation$ChangeTimezone$changeTimezone({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.timezone, + }); - @override factory Mutation$ChangeTimezone$changeTimezone.fromJson( - Map json) => - _$Mutation$ChangeTimezone$changeTimezoneFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$timezone = json['timezone']; + return Mutation$ChangeTimezone$changeTimezone( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + timezone: (l$timezone as String?), + ); + } final int code; @@ -2146,43 +4490,75 @@ class Mutation$ChangeTimezone$changeTimezone final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? timezone; - Map toJson() => - _$Mutation$ChangeTimezone$changeTimezoneToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$timezone = timezone; + _resultData['timezone'] = l$timezone; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$timezone = timezone; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$timezone]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$timezone, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ChangeTimezone$changeTimezone) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$timezone = timezone; final lOther$timezone = other.timezone; - if (l$timezone != lOther$timezone) return false; + if (l$timezone != lOther$timezone) { + return false; + } return true; } } @@ -2191,31 +4567,36 @@ extension UtilityExtension$Mutation$ChangeTimezone$changeTimezone on Mutation$ChangeTimezone$changeTimezone { CopyWith$Mutation$ChangeTimezone$changeTimezone< Mutation$ChangeTimezone$changeTimezone> - get copyWith => - CopyWith$Mutation$ChangeTimezone$changeTimezone(this, (i) => i); + get copyWith => CopyWith$Mutation$ChangeTimezone$changeTimezone( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeTimezone$changeTimezone { factory CopyWith$Mutation$ChangeTimezone$changeTimezone( - Mutation$ChangeTimezone$changeTimezone instance, - TRes Function(Mutation$ChangeTimezone$changeTimezone) then) = - _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone; + Mutation$ChangeTimezone$changeTimezone instance, + TRes Function(Mutation$ChangeTimezone$changeTimezone) then, + ) = _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone; factory CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(TRes res) = _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? timezone}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? timezone, + }); } class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone implements CopyWith$Mutation$ChangeTimezone$changeTimezone { _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$ChangeTimezone$changeTimezone _instance; @@ -2223,28 +4604,28 @@ class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? timezone = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? timezone = _undefined, + }) => _then(Mutation$ChangeTimezone$changeTimezone( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - timezone: timezone == _undefined - ? _instance.timezone - : (timezone as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + timezone: + timezone == _undefined ? _instance.timezone : (timezone as String?), + )); } class _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone @@ -2253,55 +4634,80 @@ class _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? timezone}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? timezone, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$ChangeAutoUpgradeSettings { - Variables$Mutation$ChangeAutoUpgradeSettings({required this.settings}); + factory Variables$Mutation$ChangeAutoUpgradeSettings( + {required Input$AutoUpgradeSettingsInput settings}) => + Variables$Mutation$ChangeAutoUpgradeSettings._({ + r'settings': settings, + }); + + Variables$Mutation$ChangeAutoUpgradeSettings._(this._$data); - @override factory Variables$Mutation$ChangeAutoUpgradeSettings.fromJson( - Map json) => - _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson(json); - - final Input$AutoUpgradeSettingsInput settings; - - Map toJson() => - _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson(this); - int get hashCode { - final l$settings = settings; - return Object.hashAll([l$settings]); + Map data) { + final result$data = {}; + final l$settings = data['settings']; + result$data['settings'] = Input$AutoUpgradeSettingsInput.fromJson( + (l$settings as Map)); + return Variables$Mutation$ChangeAutoUpgradeSettings._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ChangeAutoUpgradeSettings) || - runtimeType != other.runtimeType) return false; + Map _$data; + + Input$AutoUpgradeSettingsInput get settings => + (_$data['settings'] as Input$AutoUpgradeSettingsInput); + Map toJson() { + final result$data = {}; final l$settings = settings; - final lOther$settings = other.settings; - if (l$settings != lOther$settings) return false; - return true; + result$data['settings'] = l$settings.toJson(); + return result$data; } CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings< Variables$Mutation$ChangeAutoUpgradeSettings> - get copyWith => - CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$ChangeAutoUpgradeSettings) || + runtimeType != other.runtimeType) { + return false; + } + final l$settings = settings; + final lOther$settings = other.settings; + if (l$settings != lOther$settings) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$settings = settings; + return Object.hashAll([l$settings]); + } } abstract class CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { factory CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings( - Variables$Mutation$ChangeAutoUpgradeSettings instance, - TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) then) = - _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings; + Variables$Mutation$ChangeAutoUpgradeSettings instance, + TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) then, + ) = _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings; factory CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings; @@ -2312,7 +4718,9 @@ abstract class CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { class _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings implements CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$ChangeAutoUpgradeSettings _instance; @@ -2321,10 +4729,11 @@ class _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings static const _undefined = {}; TRes call({Object? settings = _undefined}) => - _then(Variables$Mutation$ChangeAutoUpgradeSettings( - settings: settings == _undefined || settings == null - ? _instance.settings - : (settings as Input$AutoUpgradeSettingsInput))); + _then(Variables$Mutation$ChangeAutoUpgradeSettings._({ + ..._instance._$data, + if (settings != _undefined && settings != null) + 'settings': (settings as Input$AutoUpgradeSettingsInput), + })); } class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings @@ -2336,42 +4745,68 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings call({Input$AutoUpgradeSettingsInput? settings}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeAutoUpgradeSettings { - Mutation$ChangeAutoUpgradeSettings( - {required this.changeAutoUpgradeSettings, required this.$__typename}); + Mutation$ChangeAutoUpgradeSettings({ + required this.changeAutoUpgradeSettings, + required this.$__typename, + }); - @override factory Mutation$ChangeAutoUpgradeSettings.fromJson( - Map json) => - _$Mutation$ChangeAutoUpgradeSettingsFromJson(json); + Map json) { + final l$changeAutoUpgradeSettings = json['changeAutoUpgradeSettings']; + final l$$__typename = json['__typename']; + return Mutation$ChangeAutoUpgradeSettings( + changeAutoUpgradeSettings: + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( + (l$changeAutoUpgradeSettings as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings changeAutoUpgradeSettings; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$ChangeAutoUpgradeSettingsToJson(this); + Map toJson() { + final _resultData = {}; + final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; + _resultData['changeAutoUpgradeSettings'] = + l$changeAutoUpgradeSettings.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; final l$$__typename = $__typename; - return Object.hashAll([l$changeAutoUpgradeSettings, l$$__typename]); + return Object.hashAll([ + l$changeAutoUpgradeSettings, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ChangeAutoUpgradeSettings) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; final lOther$changeAutoUpgradeSettings = other.changeAutoUpgradeSettings; - if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) + if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) { return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2380,30 +4815,36 @@ extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings on Mutation$ChangeAutoUpgradeSettings { CopyWith$Mutation$ChangeAutoUpgradeSettings< Mutation$ChangeAutoUpgradeSettings> - get copyWith => - CopyWith$Mutation$ChangeAutoUpgradeSettings(this, (i) => i); + get copyWith => CopyWith$Mutation$ChangeAutoUpgradeSettings( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings { factory CopyWith$Mutation$ChangeAutoUpgradeSettings( - Mutation$ChangeAutoUpgradeSettings instance, - TRes Function(Mutation$ChangeAutoUpgradeSettings) then) = - _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings; + Mutation$ChangeAutoUpgradeSettings instance, + TRes Function(Mutation$ChangeAutoUpgradeSettings) then, + ) = _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings; factory CopyWith$Mutation$ChangeAutoUpgradeSettings.stub(TRes res) = _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings; - TRes call( - {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? - changeAutoUpgradeSettings, - String? $__typename}); + TRes call({ + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? + changeAutoUpgradeSettings, + String? $__typename, + }); CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings get changeAutoUpgradeSettings; } class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings implements CopyWith$Mutation$ChangeAutoUpgradeSettings { - _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings(this._instance, this._then); + _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings( + this._instance, + this._then, + ); final Mutation$ChangeAutoUpgradeSettings _instance; @@ -2411,18 +4852,20 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings static const _undefined = {}; - TRes call( - {Object? changeAutoUpgradeSettings = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? changeAutoUpgradeSettings = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ChangeAutoUpgradeSettings( - changeAutoUpgradeSettings: changeAutoUpgradeSettings == _undefined || - changeAutoUpgradeSettings == null - ? _instance.changeAutoUpgradeSettings - : (changeAutoUpgradeSettings - as Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + changeAutoUpgradeSettings: changeAutoUpgradeSettings == _undefined || + changeAutoUpgradeSettings == null + ? _instance.changeAutoUpgradeSettings + : (changeAutoUpgradeSettings + as Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings get changeAutoUpgradeSettings { final local$changeAutoUpgradeSettings = _instance.changeAutoUpgradeSettings; @@ -2438,10 +4881,11 @@ class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings TRes _res; - call( - {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? - changeAutoUpgradeSettings, - String? $__typename}) => + call({ + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? + changeAutoUpgradeSettings, + String? $__typename, + }) => _res; CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings get changeAutoUpgradeSettings => @@ -2452,99 +4896,114 @@ class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings const documentNodeMutationChangeAutoUpgradeSettings = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'ChangeAutoUpgradeSettings'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'settings')), - type: NamedTypeNode( - name: NameNode(value: 'AutoUpgradeSettingsInput'), - isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'changeAutoUpgradeSettings'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'settings'), - value: VariableNode(name: NameNode(value: 'settings'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'ChangeAutoUpgradeSettings'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'settings')), + type: NamedTypeNode( + name: NameNode(value: 'AutoUpgradeSettingsInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeAutoUpgradeSettings'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'settings'), + value: VariableNode(name: NameNode(value: 'settings')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'allowReboot'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'enableAutoUpgrade'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'enableAutoUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$ChangeAutoUpgradeSettings _parserFn$Mutation$ChangeAutoUpgradeSettings( Map data) => Mutation$ChangeAutoUpgradeSettings.fromJson(data); typedef OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings = FutureOr - Function(dynamic, Mutation$ChangeAutoUpgradeSettings?); + Function( + dynamic, + Mutation$ChangeAutoUpgradeSettings?, +); class Options$Mutation$ChangeAutoUpgradeSettings extends graphql.MutationOptions { - Options$Mutation$ChangeAutoUpgradeSettings( - {String? operationName, - required Variables$Mutation$ChangeAutoUpgradeSettings variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$ChangeAutoUpgradeSettings({ + String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$ChangeAutoUpgradeSettings(data)), - update: update, - onError: onError, - document: documentNodeMutationChangeAutoUpgradeSettings, - parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); + : _parserFn$Mutation$ChangeAutoUpgradeSettings(data), + ), + update: update, + onError: onError, + document: documentNodeMutationChangeAutoUpgradeSettings, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings, + ); final OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompletedWithParsed; @@ -2554,38 +5013,39 @@ class Options$Mutation$ChangeAutoUpgradeSettings ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$ChangeAutoUpgradeSettings extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ChangeAutoUpgradeSettings( - {String? operationName, - required Variables$Mutation$ChangeAutoUpgradeSettings variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationChangeAutoUpgradeSettings, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); + WatchOptions$Mutation$ChangeAutoUpgradeSettings({ + String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeAutoUpgradeSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings, + ); } extension ClientExtension$Mutation$ChangeAutoUpgradeSettings @@ -2600,22 +5060,35 @@ extension ClientExtension$Mutation$ChangeAutoUpgradeSettings this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings - implements Fragment$basicMutationReturnFields { - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - required this.allowReboot, - required this.enableAutoUpgrade}); + implements + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + required this.allowReboot, + required this.enableAutoUpgrade, + }); - @override factory Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( - Map json) => - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( - json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$allowReboot = json['allowReboot']; + final l$enableAutoUpgrade = json['enableAutoUpgrade']; + return Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + allowReboot: (l$allowReboot as bool), + enableAutoUpgrade: (l$enableAutoUpgrade as bool), + ); + } final int code; @@ -2623,16 +5096,30 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings final bool success; - @JsonKey(name: '__typename') final String $__typename; final bool allowReboot; final bool enableAutoUpgrade; - Map toJson() => - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( - this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$allowReboot = allowReboot; + _resultData['allowReboot'] = l$allowReboot; + final l$enableAutoUpgrade = enableAutoUpgrade; + _resultData['enableAutoUpgrade'] = l$enableAutoUpgrade; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; @@ -2646,34 +5133,50 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings l$success, l$$__typename, l$allowReboot, - l$enableAutoUpgrade + l$enableAutoUpgrade, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$allowReboot = allowReboot; final lOther$allowReboot = other.allowReboot; - if (l$allowReboot != lOther$allowReboot) return false; + if (l$allowReboot != lOther$allowReboot) { + return false; + } final l$enableAutoUpgrade = enableAutoUpgrade; final lOther$enableAutoUpgrade = other.enableAutoUpgrade; - if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) { + return false; + } return true; } } @@ -2684,29 +5187,31 @@ extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeS Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings> get copyWith => CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< TRes> { factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings instance, - TRes Function( - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) - then) = - _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings instance, + TRes Function(Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) + then, + ) = _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.stub( TRes res) = _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - bool? allowReboot, - bool? enableAutoUpgrade}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + bool? allowReboot, + bool? enableAutoUpgrade, + }); } class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< @@ -2715,7 +5220,9 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< TRes> { _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings _instance; @@ -2724,33 +5231,34 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? allowReboot = _undefined, - Object? enableAutoUpgrade = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? allowReboot = _undefined, + Object? enableAutoUpgrade = _undefined, + }) => _then(Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - allowReboot: allowReboot == _undefined || allowReboot == null - ? _instance.allowReboot - : (allowReboot as bool), - enableAutoUpgrade: - enableAutoUpgrade == _undefined || enableAutoUpgrade == null - ? _instance.enableAutoUpgrade - : (enableAutoUpgrade as bool))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + allowReboot: allowReboot == _undefined || allowReboot == null + ? _instance.allowReboot + : (allowReboot as bool), + enableAutoUpgrade: + enableAutoUpgrade == _undefined || enableAutoUpgrade == null + ? _instance.enableAutoUpgrade + : (enableAutoUpgrade as bool), + )); } class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< @@ -2763,12 +5271,13 @@ class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSett TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - bool? allowReboot, - bool? enableAutoUpgrade}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + bool? allowReboot, + bool? enableAutoUpgrade, + }) => _res; } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart deleted file mode 100644 index 6f4cb2d4..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart +++ /dev/null @@ -1,316 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'server_settings.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$SystemSettings _$Query$SystemSettingsFromJson( - Map json) => - Query$SystemSettings( - system: Query$SystemSettings$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettingsToJson( - Query$SystemSettings instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system _$Query$SystemSettings$systemFromJson( - Map json) => - Query$SystemSettings$system( - settings: Query$SystemSettings$system$settings.fromJson( - json['settings'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$systemToJson( - Query$SystemSettings$system instance) => - { - 'settings': instance.settings.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system$settings - _$Query$SystemSettings$system$settingsFromJson(Map json) => - Query$SystemSettings$system$settings( - autoUpgrade: - Query$SystemSettings$system$settings$autoUpgrade.fromJson( - json['autoUpgrade'] as Map), - ssh: Query$SystemSettings$system$settings$ssh.fromJson( - json['ssh'] as Map), - timezone: json['timezone'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$system$settingsToJson( - Query$SystemSettings$system$settings instance) => - { - 'autoUpgrade': instance.autoUpgrade.toJson(), - 'ssh': instance.ssh.toJson(), - 'timezone': instance.timezone, - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system$settings$autoUpgrade - _$Query$SystemSettings$system$settings$autoUpgradeFromJson( - Map json) => - Query$SystemSettings$system$settings$autoUpgrade( - allowReboot: json['allowReboot'] as bool, - enable: json['enable'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$system$settings$autoUpgradeToJson( - Query$SystemSettings$system$settings$autoUpgrade instance) => - { - 'allowReboot': instance.allowReboot, - 'enable': instance.enable, - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system$settings$ssh - _$Query$SystemSettings$system$settings$sshFromJson( - Map json) => - Query$SystemSettings$system$settings$ssh( - enable: json['enable'] as bool, - passwordAuthentication: json['passwordAuthentication'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$system$settings$sshToJson( - Query$SystemSettings$system$settings$ssh instance) => - { - 'enable': instance.enable, - 'passwordAuthentication': instance.passwordAuthentication, - '__typename': instance.$__typename, - }; - -Query$SystemIsUsingBinds _$Query$SystemIsUsingBindsFromJson( - Map json) => - Query$SystemIsUsingBinds( - system: Query$SystemIsUsingBinds$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemIsUsingBindsToJson( - Query$SystemIsUsingBinds instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemIsUsingBinds$system _$Query$SystemIsUsingBinds$systemFromJson( - Map json) => - Query$SystemIsUsingBinds$system( - info: Query$SystemIsUsingBinds$system$info.fromJson( - json['info'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemIsUsingBinds$systemToJson( - Query$SystemIsUsingBinds$system instance) => - { - 'info': instance.info.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemIsUsingBinds$system$info - _$Query$SystemIsUsingBinds$system$infoFromJson(Map json) => - Query$SystemIsUsingBinds$system$info( - usingBinds: json['usingBinds'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemIsUsingBinds$system$infoToJson( - Query$SystemIsUsingBinds$system$info instance) => - { - 'usingBinds': instance.usingBinds, - '__typename': instance.$__typename, - }; - -Query$DomainInfo _$Query$DomainInfoFromJson(Map json) => - Query$DomainInfo( - system: Query$DomainInfo$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$DomainInfoToJson(Query$DomainInfo instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$DomainInfo$system _$Query$DomainInfo$systemFromJson( - Map json) => - Query$DomainInfo$system( - domainInfo: Query$DomainInfo$system$domainInfo.fromJson( - json['domainInfo'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$DomainInfo$systemToJson( - Query$DomainInfo$system instance) => - { - 'domainInfo': instance.domainInfo.toJson(), - '__typename': instance.$__typename, - }; - -Query$DomainInfo$system$domainInfo _$Query$DomainInfo$system$domainInfoFromJson( - Map json) => - Query$DomainInfo$system$domainInfo( - domain: json['domain'] as String, - hostname: json['hostname'] as String, - provider: $enumDecode(_$Enum$DnsProviderEnumMap, json['provider'], - unknownValue: Enum$DnsProvider.$unknown), - requiredDnsRecords: (json['requiredDnsRecords'] as List) - .map((e) => - Fragment$dnsRecordFields.fromJson(e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$DomainInfo$system$domainInfoToJson( - Query$DomainInfo$system$domainInfo instance) => - { - 'domain': instance.domain, - 'hostname': instance.hostname, - 'provider': _$Enum$DnsProviderEnumMap[instance.provider]!, - 'requiredDnsRecords': - instance.requiredDnsRecords.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -const _$Enum$DnsProviderEnumMap = { - Enum$DnsProvider.CLOUDFLARE: 'CLOUDFLARE', - Enum$DnsProvider.DIGITALOCEAN: 'DIGITALOCEAN', - Enum$DnsProvider.$unknown: r'$unknown', -}; - -Variables$Mutation$ChangeTimezone _$Variables$Mutation$ChangeTimezoneFromJson( - Map json) => - Variables$Mutation$ChangeTimezone( - timezone: json['timezone'] as String, - ); - -Map _$Variables$Mutation$ChangeTimezoneToJson( - Variables$Mutation$ChangeTimezone instance) => - { - 'timezone': instance.timezone, - }; - -Mutation$ChangeTimezone _$Mutation$ChangeTimezoneFromJson( - Map json) => - Mutation$ChangeTimezone( - changeTimezone: Mutation$ChangeTimezone$changeTimezone.fromJson( - json['changeTimezone'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ChangeTimezoneToJson( - Mutation$ChangeTimezone instance) => - { - 'changeTimezone': instance.changeTimezone.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$ChangeTimezone$changeTimezone - _$Mutation$ChangeTimezone$changeTimezoneFromJson( - Map json) => - Mutation$ChangeTimezone$changeTimezone( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - timezone: json['timezone'] as String?, - ); - -Map _$Mutation$ChangeTimezone$changeTimezoneToJson( - Mutation$ChangeTimezone$changeTimezone instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'timezone': instance.timezone, - }; - -Variables$Mutation$ChangeAutoUpgradeSettings - _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson( - Map json) => - Variables$Mutation$ChangeAutoUpgradeSettings( - settings: Input$AutoUpgradeSettingsInput.fromJson( - json['settings'] as Map), - ); - -Map _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson( - Variables$Mutation$ChangeAutoUpgradeSettings instance) => - { - 'settings': instance.settings.toJson(), - }; - -Mutation$ChangeAutoUpgradeSettings _$Mutation$ChangeAutoUpgradeSettingsFromJson( - Map json) => - Mutation$ChangeAutoUpgradeSettings( - changeAutoUpgradeSettings: - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( - json['changeAutoUpgradeSettings'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ChangeAutoUpgradeSettingsToJson( - Mutation$ChangeAutoUpgradeSettings instance) => - { - 'changeAutoUpgradeSettings': instance.changeAutoUpgradeSettings.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( - Map json) => - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - allowReboot: json['allowReboot'] as bool, - enableAutoUpgrade: json['enableAutoUpgrade'] as bool, - ); - -Map - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings - instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'allowReboot': instance.allowReboot, - 'enableAutoUpgrade': instance.enableAutoUpgrade, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index a31058c4..1501d709 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,23 +1,69 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -part 'services.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -25,36 +71,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -63,25 +137,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -89,24 +173,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -115,43 +200,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -159,88 +255,1752 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$AllServices { - Query$AllServices({required this.services, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$AllServices.fromJson(Map json) => - _$Query$AllServicesFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$AllServices$services services; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllServicesToJson(this); - int get hashCode { - final l$services = services; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$services, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllServices) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { return false; - final l$services = services; - final lOther$services = other.services; - if (l$services != lOther$services) return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$AllServices { + Query$AllServices({ + required this.services, + required this.$__typename, + }); + + factory Query$AllServices.fromJson(Map json) { + final l$services = json['services']; + final l$$__typename = json['__typename']; + return Query$AllServices( + services: Query$AllServices$services.fromJson( + (l$services as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$AllServices$services services; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$services = services; + _resultData['services'] = l$services.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$services = services; + final l$$__typename = $__typename; + return Object.hashAll([ + l$services, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllServices) || runtimeType != other.runtimeType) { + return false; + } + final l$services = services; + final lOther$services = other.services; + if (l$services != lOther$services) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$AllServices on Query$AllServices { CopyWith$Query$AllServices get copyWith => - CopyWith$Query$AllServices(this, (i) => i); + CopyWith$Query$AllServices( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices { factory CopyWith$Query$AllServices( - Query$AllServices instance, TRes Function(Query$AllServices) then) = - _CopyWithImpl$Query$AllServices; + Query$AllServices instance, + TRes Function(Query$AllServices) then, + ) = _CopyWithImpl$Query$AllServices; factory CopyWith$Query$AllServices.stub(TRes res) = _CopyWithStubImpl$Query$AllServices; - TRes call({Query$AllServices$services? services, String? $__typename}); + TRes call({ + Query$AllServices$services? services, + String? $__typename, + }); CopyWith$Query$AllServices$services get services; } class _CopyWithImpl$Query$AllServices implements CopyWith$Query$AllServices { - _CopyWithImpl$Query$AllServices(this._instance, this._then); + _CopyWithImpl$Query$AllServices( + this._instance, + this._then, + ); final Query$AllServices _instance; @@ -248,15 +2008,18 @@ class _CopyWithImpl$Query$AllServices static const _undefined = {}; - TRes call( - {Object? services = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? services = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices( - services: services == _undefined || services == null - ? _instance.services - : (services as Query$AllServices$services), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + services: services == _undefined || services == null + ? _instance.services + : (services as Query$AllServices$services), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$AllServices$services get services { final local$services = _instance.services; return CopyWith$Query$AllServices$services( @@ -270,165 +2033,194 @@ class _CopyWithStubImpl$Query$AllServices TRes _res; - call({Query$AllServices$services? services, String? $__typename}) => _res; + call({ + Query$AllServices$services? services, + String? $__typename, + }) => + _res; CopyWith$Query$AllServices$services get services => CopyWith$Query$AllServices$services.stub(_res); } const documentNodeQueryAllServices = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'AllServices'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'services'), + type: OperationType.query, + name: NameNode(value: 'AllServices'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'services'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allServices'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'allServices'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'description'), + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'dnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'dnsRecordFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isEnabled'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isRequired'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'storageUsage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'volume'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'name'), alias: null, arguments: [], directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'displayName'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'dnsRecords'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'dnsRecordFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'id'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isEnabled'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isMovable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isRequired'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'storageUsage'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'title'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'usedSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'volume'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'svgIcon'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'url'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'svgIcon'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'url'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitiondnsRecordFields, ]); Query$AllServices _parserFn$Query$AllServices(Map data) => @@ -436,57 +2228,62 @@ Query$AllServices _parserFn$Query$AllServices(Map data) => class Options$Query$AllServices extends graphql.QueryOptions { - Options$Query$AllServices( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryAllServices, - parserFn: _parserFn$Query$AllServices); + Options$Query$AllServices({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllServices, + parserFn: _parserFn$Query$AllServices, + ); } class WatchOptions$Query$AllServices extends graphql.WatchQueryOptions { - WatchOptions$Query$AllServices( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryAllServices, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$AllServices); + WatchOptions$Query$AllServices({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllServices, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllServices, + ); } class FetchMoreOptions$Query$AllServices extends graphql.FetchMoreOptions { FetchMoreOptions$Query$AllServices({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryAllServices); + : super( + updateQuery: updateQuery, + document: documentNodeQueryAllServices, + ); } extension ClientExtension$Query$AllServices on graphql.GraphQLClient { @@ -496,63 +2293,94 @@ extension ClientExtension$Query$AllServices on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$AllServices( [WatchOptions$Query$AllServices? options]) => this.watchQuery(options ?? WatchOptions$Query$AllServices()); - void writeQuery$AllServices( - {required Query$AllServices data, bool broadcast = true}) => + void writeQuery$AllServices({ + required Query$AllServices data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryAllServices)), - data: data.toJson(), - broadcast: broadcast); - Query$AllServices? readQuery$AllServices({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryAllServices)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$AllServices? readQuery$AllServices({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllServices)), + optimistic: optimistic, + ); return result == null ? null : Query$AllServices.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services { - Query$AllServices$services( - {required this.allServices, required this.$__typename}); + Query$AllServices$services({ + required this.allServices, + required this.$__typename, + }); - @override - factory Query$AllServices$services.fromJson(Map json) => - _$Query$AllServices$servicesFromJson(json); + factory Query$AllServices$services.fromJson(Map json) { + final l$allServices = json['allServices']; + final l$$__typename = json['__typename']; + return Query$AllServices$services( + allServices: (l$allServices as List) + .map((e) => Query$AllServices$services$allServices.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List allServices; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllServices$servicesToJson(this); + Map toJson() { + final _resultData = {}; + final l$allServices = allServices; + _resultData['allServices'] = l$allServices.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$allServices = allServices; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$allServices.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$allServices.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$allServices = allServices; final lOther$allServices = other.allServices; - if (l$allServices.length != lOther$allServices.length) return false; + if (l$allServices.length != lOther$allServices.length) { + return false; + } for (int i = 0; i < l$allServices.length; i++) { final l$allServices$entry = l$allServices[i]; final lOther$allServices$entry = lOther$allServices[i]; - if (l$allServices$entry != lOther$allServices$entry) return false; + if (l$allServices$entry != lOther$allServices$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -560,21 +2388,25 @@ class Query$AllServices$services { extension UtilityExtension$Query$AllServices$services on Query$AllServices$services { CopyWith$Query$AllServices$services - get copyWith => CopyWith$Query$AllServices$services(this, (i) => i); + get copyWith => CopyWith$Query$AllServices$services( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services { factory CopyWith$Query$AllServices$services( - Query$AllServices$services instance, - TRes Function(Query$AllServices$services) then) = - _CopyWithImpl$Query$AllServices$services; + Query$AllServices$services instance, + TRes Function(Query$AllServices$services) then, + ) = _CopyWithImpl$Query$AllServices$services; factory CopyWith$Query$AllServices$services.stub(TRes res) = _CopyWithStubImpl$Query$AllServices$services; - TRes call( - {List? allServices, - String? $__typename}); + TRes call({ + List? allServices, + String? $__typename, + }); TRes allServices( Iterable Function( Iterable< @@ -585,7 +2417,10 @@ abstract class CopyWith$Query$AllServices$services { class _CopyWithImpl$Query$AllServices$services implements CopyWith$Query$AllServices$services { - _CopyWithImpl$Query$AllServices$services(this._instance, this._then); + _CopyWithImpl$Query$AllServices$services( + this._instance, + this._then, + ); final Query$AllServices$services _instance; @@ -593,16 +2428,18 @@ class _CopyWithImpl$Query$AllServices$services static const _undefined = {}; - TRes call( - {Object? allServices = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? allServices = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services( - allServices: allServices == _undefined || allServices == null - ? _instance.allServices - : (allServices as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + allServices: allServices == _undefined || allServices == null + ? _instance.allServices + : (allServices as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes allServices( Iterable Function( Iterable< @@ -610,9 +2447,11 @@ class _CopyWithImpl$Query$AllServices$services Query$AllServices$services$allServices>>) _fn) => call( - allServices: _fn(_instance.allServices.map((e) => - CopyWith$Query$AllServices$services$allServices(e, (i) => i))) - .toList()); + allServices: _fn(_instance.allServices + .map((e) => CopyWith$Query$AllServices$services$allServices( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$AllServices$services @@ -621,33 +2460,64 @@ class _CopyWithStubImpl$Query$AllServices$services TRes _res; - call( - {List? allServices, - String? $__typename}) => + call({ + List? allServices, + String? $__typename, + }) => _res; allServices(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services$allServices { - Query$AllServices$services$allServices( - {required this.description, - required this.displayName, - this.dnsRecords, - required this.id, - required this.isEnabled, - required this.isMovable, - required this.isRequired, - required this.status, - required this.storageUsage, - required this.svgIcon, - this.url, - required this.$__typename}); + Query$AllServices$services$allServices({ + required this.description, + required this.displayName, + this.dnsRecords, + required this.id, + required this.isEnabled, + required this.isMovable, + required this.isRequired, + required this.status, + required this.storageUsage, + required this.svgIcon, + this.url, + required this.$__typename, + }); - @override factory Query$AllServices$services$allServices.fromJson( - Map json) => - _$Query$AllServices$services$allServicesFromJson(json); + Map json) { + final l$description = json['description']; + final l$displayName = json['displayName']; + final l$dnsRecords = json['dnsRecords']; + final l$id = json['id']; + final l$isEnabled = json['isEnabled']; + final l$isMovable = json['isMovable']; + final l$isRequired = json['isRequired']; + final l$status = json['status']; + final l$storageUsage = json['storageUsage']; + final l$svgIcon = json['svgIcon']; + final l$url = json['url']; + final l$$__typename = json['__typename']; + return Query$AllServices$services$allServices( + description: (l$description as String), + displayName: (l$displayName as String), + dnsRecords: (l$dnsRecords as List?) + ?.map((e) => + Fragment$dnsRecordFields.fromJson((e as Map))) + .toList(), + id: (l$id as String), + isEnabled: (l$isEnabled as bool), + isMovable: (l$isMovable as bool), + isRequired: (l$isRequired as bool), + status: fromJson$Enum$ServiceStatusEnum((l$status as String)), + storageUsage: + Query$AllServices$services$allServices$storageUsage.fromJson( + (l$storageUsage as Map)), + svgIcon: (l$svgIcon as String), + url: (l$url as String?), + $__typename: (l$$__typename as String), + ); + } final String description; @@ -663,7 +2533,6 @@ class Query$AllServices$services$allServices { final bool isRequired; - @JsonKey(unknownEnumValue: Enum$ServiceStatusEnum.$unknown) final Enum$ServiceStatusEnum status; final Query$AllServices$services$allServices$storageUsage storageUsage; @@ -672,11 +2541,38 @@ class Query$AllServices$services$allServices { final String? url; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$AllServices$services$allServicesToJson(this); + Map toJson() { + final _resultData = {}; + final l$description = description; + _resultData['description'] = l$description; + final l$displayName = displayName; + _resultData['displayName'] = l$displayName; + final l$dnsRecords = dnsRecords; + _resultData['dnsRecords'] = l$dnsRecords?.map((e) => e.toJson()).toList(); + final l$id = id; + _resultData['id'] = l$id; + final l$isEnabled = isEnabled; + _resultData['isEnabled'] = l$isEnabled; + final l$isMovable = isMovable; + _resultData['isMovable'] = l$isMovable; + final l$isRequired = isRequired; + _resultData['isRequired'] = l$isRequired; + final l$status = status; + _resultData['status'] = toJson$Enum$ServiceStatusEnum(l$status); + final l$storageUsage = storageUsage; + _resultData['storageUsage'] = l$storageUsage.toJson(); + final l$svgIcon = svgIcon; + _resultData['svgIcon'] = l$svgIcon; + final l$url = url; + _resultData['url'] = l$url; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$description = description; final l$displayName = displayName; @@ -702,61 +2598,90 @@ class Query$AllServices$services$allServices { l$storageUsage, l$svgIcon, l$url, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services$allServices) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$displayName = displayName; final lOther$displayName = other.displayName; - if (l$displayName != lOther$displayName) return false; + if (l$displayName != lOther$displayName) { + return false; + } final l$dnsRecords = dnsRecords; final lOther$dnsRecords = other.dnsRecords; if (l$dnsRecords != null && lOther$dnsRecords != null) { - if (l$dnsRecords.length != lOther$dnsRecords.length) return false; + if (l$dnsRecords.length != lOther$dnsRecords.length) { + return false; + } for (int i = 0; i < l$dnsRecords.length; i++) { final l$dnsRecords$entry = l$dnsRecords[i]; final lOther$dnsRecords$entry = lOther$dnsRecords[i]; - if (l$dnsRecords$entry != lOther$dnsRecords$entry) return false; + if (l$dnsRecords$entry != lOther$dnsRecords$entry) { + return false; + } } } else if (l$dnsRecords != lOther$dnsRecords) { return false; } - final l$id = id; final lOther$id = other.id; - if (l$id != lOther$id) return false; + if (l$id != lOther$id) { + return false; + } final l$isEnabled = isEnabled; final lOther$isEnabled = other.isEnabled; - if (l$isEnabled != lOther$isEnabled) return false; + if (l$isEnabled != lOther$isEnabled) { + return false; + } final l$isMovable = isMovable; final lOther$isMovable = other.isMovable; - if (l$isMovable != lOther$isMovable) return false; + if (l$isMovable != lOther$isMovable) { + return false; + } final l$isRequired = isRequired; final lOther$isRequired = other.isRequired; - if (l$isRequired != lOther$isRequired) return false; + if (l$isRequired != lOther$isRequired) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$storageUsage = storageUsage; final lOther$storageUsage = other.storageUsage; - if (l$storageUsage != lOther$storageUsage) return false; + if (l$storageUsage != lOther$storageUsage) { + return false; + } final l$svgIcon = svgIcon; final lOther$svgIcon = other.svgIcon; - if (l$svgIcon != lOther$svgIcon) return false; + if (l$svgIcon != lOther$svgIcon) { + return false; + } final l$url = url; final lOther$url = other.url; - if (l$url != lOther$url) return false; + if (l$url != lOther$url) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -765,32 +2690,35 @@ extension UtilityExtension$Query$AllServices$services$allServices on Query$AllServices$services$allServices { CopyWith$Query$AllServices$services$allServices< Query$AllServices$services$allServices> - get copyWith => - CopyWith$Query$AllServices$services$allServices(this, (i) => i); + get copyWith => CopyWith$Query$AllServices$services$allServices( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services$allServices { factory CopyWith$Query$AllServices$services$allServices( - Query$AllServices$services$allServices instance, - TRes Function(Query$AllServices$services$allServices) then) = - _CopyWithImpl$Query$AllServices$services$allServices; + Query$AllServices$services$allServices instance, + TRes Function(Query$AllServices$services$allServices) then, + ) = _CopyWithImpl$Query$AllServices$services$allServices; factory CopyWith$Query$AllServices$services$allServices.stub(TRes res) = _CopyWithStubImpl$Query$AllServices$services$allServices; - TRes call( - {String? description, - String? displayName, - List? dnsRecords, - String? id, - bool? isEnabled, - bool? isMovable, - bool? isRequired, - Enum$ServiceStatusEnum? status, - Query$AllServices$services$allServices$storageUsage? storageUsage, - String? svgIcon, - String? url, - String? $__typename}); + TRes call({ + String? description, + String? displayName, + List? dnsRecords, + String? id, + bool? isEnabled, + bool? isMovable, + bool? isRequired, + Enum$ServiceStatusEnum? status, + Query$AllServices$services$allServices$storageUsage? storageUsage, + String? svgIcon, + String? url, + String? $__typename, + }); TRes dnsRecords( Iterable? Function( Iterable< @@ -803,7 +2731,9 @@ abstract class CopyWith$Query$AllServices$services$allServices { class _CopyWithImpl$Query$AllServices$services$allServices implements CopyWith$Query$AllServices$services$allServices { _CopyWithImpl$Query$AllServices$services$allServices( - this._instance, this._then); + this._instance, + this._then, + ); final Query$AllServices$services$allServices _instance; @@ -811,53 +2741,55 @@ class _CopyWithImpl$Query$AllServices$services$allServices static const _undefined = {}; - TRes call( - {Object? description = _undefined, - Object? displayName = _undefined, - Object? dnsRecords = _undefined, - Object? id = _undefined, - Object? isEnabled = _undefined, - Object? isMovable = _undefined, - Object? isRequired = _undefined, - Object? status = _undefined, - Object? storageUsage = _undefined, - Object? svgIcon = _undefined, - Object? url = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? description = _undefined, + Object? displayName = _undefined, + Object? dnsRecords = _undefined, + Object? id = _undefined, + Object? isEnabled = _undefined, + Object? isMovable = _undefined, + Object? isRequired = _undefined, + Object? status = _undefined, + Object? storageUsage = _undefined, + Object? svgIcon = _undefined, + Object? url = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services$allServices( - description: description == _undefined || description == null - ? _instance.description - : (description as String), - displayName: displayName == _undefined || displayName == null - ? _instance.displayName - : (displayName as String), - dnsRecords: dnsRecords == _undefined - ? _instance.dnsRecords - : (dnsRecords as List?), - id: id == _undefined || id == null ? _instance.id : (id as String), - isEnabled: isEnabled == _undefined || isEnabled == null - ? _instance.isEnabled - : (isEnabled as bool), - isMovable: isMovable == _undefined || isMovable == null - ? _instance.isMovable - : (isMovable as bool), - isRequired: isRequired == _undefined || isRequired == null - ? _instance.isRequired - : (isRequired as bool), - status: status == _undefined || status == null - ? _instance.status - : (status as Enum$ServiceStatusEnum), - storageUsage: storageUsage == _undefined || storageUsage == null - ? _instance.storageUsage - : (storageUsage - as Query$AllServices$services$allServices$storageUsage), - svgIcon: svgIcon == _undefined || svgIcon == null - ? _instance.svgIcon - : (svgIcon as String), - url: url == _undefined ? _instance.url : (url as String?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + description: description == _undefined || description == null + ? _instance.description + : (description as String), + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + dnsRecords: dnsRecords == _undefined + ? _instance.dnsRecords + : (dnsRecords as List?), + id: id == _undefined || id == null ? _instance.id : (id as String), + isEnabled: isEnabled == _undefined || isEnabled == null + ? _instance.isEnabled + : (isEnabled as bool), + isMovable: isMovable == _undefined || isMovable == null + ? _instance.isMovable + : (isMovable as bool), + isRequired: isRequired == _undefined || isRequired == null + ? _instance.isRequired + : (isRequired as bool), + status: status == _undefined || status == null + ? _instance.status + : (status as Enum$ServiceStatusEnum), + storageUsage: storageUsage == _undefined || storageUsage == null + ? _instance.storageUsage + : (storageUsage + as Query$AllServices$services$allServices$storageUsage), + svgIcon: svgIcon == _undefined || svgIcon == null + ? _instance.svgIcon + : (svgIcon as String), + url: url == _undefined ? _instance.url : (url as String?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes dnsRecords( Iterable? Function( Iterable< @@ -866,8 +2798,10 @@ class _CopyWithImpl$Query$AllServices$services$allServices _fn) => call( dnsRecords: _fn(_instance.dnsRecords - ?.map((e) => CopyWith$Fragment$dnsRecordFields(e, (i) => i))) - ?.toList()); + ?.map((e) => CopyWith$Fragment$dnsRecordFields( + e, + (i) => i, + )))?.toList()); CopyWith$Query$AllServices$services$allServices$storageUsage get storageUsage { final local$storageUsage = _instance.storageUsage; @@ -882,19 +2816,20 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices TRes _res; - call( - {String? description, - String? displayName, - List? dnsRecords, - String? id, - bool? isEnabled, - bool? isMovable, - bool? isRequired, - Enum$ServiceStatusEnum? status, - Query$AllServices$services$allServices$storageUsage? storageUsage, - String? svgIcon, - String? url, - String? $__typename}) => + call({ + String? description, + String? displayName, + List? dnsRecords, + String? id, + bool? isEnabled, + bool? isMovable, + bool? isRequired, + Enum$ServiceStatusEnum? status, + Query$AllServices$services$allServices$storageUsage? storageUsage, + String? svgIcon, + String? url, + String? $__typename, + }) => _res; dnsRecords(_fn) => _res; CopyWith$Query$AllServices$services$allServices$storageUsage @@ -903,18 +2838,30 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices _res); } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services$allServices$storageUsage { - Query$AllServices$services$allServices$storageUsage( - {required this.title, - required this.usedSpace, - this.volume, - required this.$__typename}); + Query$AllServices$services$allServices$storageUsage({ + required this.title, + required this.usedSpace, + this.volume, + required this.$__typename, + }); - @override factory Query$AllServices$services$allServices$storageUsage.fromJson( - Map json) => - _$Query$AllServices$services$allServices$storageUsageFromJson(json); + Map json) { + final l$title = json['title']; + final l$usedSpace = json['usedSpace']; + final l$volume = json['volume']; + final l$$__typename = json['__typename']; + return Query$AllServices$services$allServices$storageUsage( + title: (l$title as String), + usedSpace: (l$usedSpace as String), + volume: l$volume == null + ? null + : Query$AllServices$services$allServices$storageUsage$volume.fromJson( + (l$volume as Map)), + $__typename: (l$$__typename as String), + ); + } final String title; @@ -922,36 +2869,64 @@ class Query$AllServices$services$allServices$storageUsage { final Query$AllServices$services$allServices$storageUsage$volume? volume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$AllServices$services$allServices$storageUsageToJson(this); + Map toJson() { + final _resultData = {}; + final l$title = title; + _resultData['title'] = l$title; + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + final l$volume = volume; + _resultData['volume'] = l$volume?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$title = title; final l$usedSpace = usedSpace; final l$volume = volume; final l$$__typename = $__typename; - return Object.hashAll([l$title, l$usedSpace, l$volume, l$$__typename]); + return Object.hashAll([ + l$title, + l$usedSpace, + l$volume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services$allServices$storageUsage) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$title = title; final lOther$title = other.title; - if (l$title != lOther$title) return false; + if (l$title != lOther$title) { + return false; + } final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; + if (l$usedSpace != lOther$usedSpace) { + return false; + } final l$volume = volume; final lOther$volume = other.volume; - if (l$volume != lOther$volume) return false; + if (l$volume != lOther$volume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -962,26 +2937,28 @@ extension UtilityExtension$Query$AllServices$services$allServices$storageUsage Query$AllServices$services$allServices$storageUsage> get copyWith => CopyWith$Query$AllServices$services$allServices$storageUsage( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services$allServices$storageUsage< TRes> { factory CopyWith$Query$AllServices$services$allServices$storageUsage( - Query$AllServices$services$allServices$storageUsage instance, - TRes Function(Query$AllServices$services$allServices$storageUsage) - then) = - _CopyWithImpl$Query$AllServices$services$allServices$storageUsage; + Query$AllServices$services$allServices$storageUsage instance, + TRes Function(Query$AllServices$services$allServices$storageUsage) then, + ) = _CopyWithImpl$Query$AllServices$services$allServices$storageUsage; factory CopyWith$Query$AllServices$services$allServices$storageUsage.stub( TRes res) = _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage; - TRes call( - {String? title, - String? usedSpace, - Query$AllServices$services$allServices$storageUsage$volume? volume, - String? $__typename}); + TRes call({ + String? title, + String? usedSpace, + Query$AllServices$services$allServices$storageUsage$volume? volume, + String? $__typename, + }); CopyWith$Query$AllServices$services$allServices$storageUsage$volume get volume; } @@ -990,7 +2967,9 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage implements CopyWith$Query$AllServices$services$allServices$storageUsage { _CopyWithImpl$Query$AllServices$services$allServices$storageUsage( - this._instance, this._then); + this._instance, + this._then, + ); final Query$AllServices$services$allServices$storageUsage _instance; @@ -999,25 +2978,27 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage static const _undefined = {}; - TRes call( - {Object? title = _undefined, - Object? usedSpace = _undefined, - Object? volume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? title = _undefined, + Object? usedSpace = _undefined, + Object? volume = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services$allServices$storageUsage( - title: title == _undefined || title == null - ? _instance.title - : (title as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - volume: volume == _undefined - ? _instance.volume - : (volume - as Query$AllServices$services$allServices$storageUsage$volume?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + volume: volume == _undefined + ? _instance.volume + : (volume + as Query$AllServices$services$allServices$storageUsage$volume?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$AllServices$services$allServices$storageUsage$volume get volume { final local$volume = _instance.volume; @@ -1038,11 +3019,12 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage< TRes _res; - call( - {String? title, - String? usedSpace, - Query$AllServices$services$allServices$storageUsage$volume? volume, - String? $__typename}) => + call({ + String? title, + String? usedSpace, + Query$AllServices$services$allServices$storageUsage$volume? volume, + String? $__typename, + }) => _res; CopyWith$Query$AllServices$services$allServices$storageUsage$volume get volume => @@ -1050,42 +3032,65 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage< .stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services$allServices$storageUsage$volume { - Query$AllServices$services$allServices$storageUsage$volume( - {required this.name, required this.$__typename}); + Query$AllServices$services$allServices$storageUsage$volume({ + required this.name, + required this.$__typename, + }); - @override factory Query$AllServices$services$allServices$storageUsage$volume.fromJson( - Map json) => - _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( - json); + Map json) { + final l$name = json['name']; + final l$$__typename = json['__typename']; + return Query$AllServices$services$allServices$storageUsage$volume( + name: (l$name as String), + $__typename: (l$$__typename as String), + ); + } final String name; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$AllServices$services$allServices$storageUsage$volumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$name = name; + _resultData['name'] = l$name; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$name = name; final l$$__typename = $__typename; - return Object.hashAll([l$name, l$$__typename]); + return Object.hashAll([ + l$name, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services$allServices$storageUsage$volume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1096,23 +3101,27 @@ extension UtilityExtension$Query$AllServices$services$allServices$storageUsage$v Query$AllServices$services$allServices$storageUsage$volume> get copyWith => CopyWith$Query$AllServices$services$allServices$storageUsage$volume( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services$allServices$storageUsage$volume< TRes> { factory CopyWith$Query$AllServices$services$allServices$storageUsage$volume( - Query$AllServices$services$allServices$storageUsage$volume instance, - TRes Function( - Query$AllServices$services$allServices$storageUsage$volume) - then) = - _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume; + Query$AllServices$services$allServices$storageUsage$volume instance, + TRes Function(Query$AllServices$services$allServices$storageUsage$volume) + then, + ) = _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume; factory CopyWith$Query$AllServices$services$allServices$storageUsage$volume.stub( TRes res) = _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volume; - TRes call({String? name, String? $__typename}); + TRes call({ + String? name, + String? $__typename, + }); } class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< @@ -1121,7 +3130,9 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< CopyWith$Query$AllServices$services$allServices$storageUsage$volume< TRes> { _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume( - this._instance, this._then); + this._instance, + this._then, + ); final Query$AllServices$services$allServices$storageUsage$volume _instance; @@ -1130,14 +3141,18 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< static const _undefined = {}; - TRes call({Object? name = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? name = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services$allServices$storageUsage$volume( - name: name == _undefined || name == null - ? _instance.name - : (name as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + name: name == _undefined || name == null + ? _instance.name + : (name as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volume< @@ -1150,47 +3165,72 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volu TRes _res; - call({String? name, String? $__typename}) => _res; + call({ + String? name, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$EnableService { - Variables$Mutation$EnableService({required this.serviceId}); + factory Variables$Mutation$EnableService({required String serviceId}) => + Variables$Mutation$EnableService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$EnableService._(this._$data); + + factory Variables$Mutation$EnableService.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$EnableService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$EnableService + get copyWith => CopyWith$Variables$Mutation$EnableService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$EnableService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$EnableService.fromJson( - Map json) => - _$Variables$Mutation$EnableServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$EnableServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$EnableService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$EnableService - get copyWith => CopyWith$Variables$Mutation$EnableService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$EnableService { factory CopyWith$Variables$Mutation$EnableService( - Variables$Mutation$EnableService instance, - TRes Function(Variables$Mutation$EnableService) then) = - _CopyWithImpl$Variables$Mutation$EnableService; + Variables$Mutation$EnableService instance, + TRes Function(Variables$Mutation$EnableService) then, + ) = _CopyWithImpl$Variables$Mutation$EnableService; factory CopyWith$Variables$Mutation$EnableService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$EnableService; @@ -1200,7 +3240,10 @@ abstract class CopyWith$Variables$Mutation$EnableService { class _CopyWithImpl$Variables$Mutation$EnableService implements CopyWith$Variables$Mutation$EnableService { - _CopyWithImpl$Variables$Mutation$EnableService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$EnableService( + this._instance, + this._then, + ); final Variables$Mutation$EnableService _instance; @@ -1209,10 +3252,11 @@ class _CopyWithImpl$Variables$Mutation$EnableService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$EnableService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$EnableService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$EnableService @@ -1224,64 +3268,98 @@ class _CopyWithStubImpl$Variables$Mutation$EnableService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$EnableService { - Mutation$EnableService( - {required this.enableService, required this.$__typename}); + Mutation$EnableService({ + required this.enableService, + required this.$__typename, + }); - @override - factory Mutation$EnableService.fromJson(Map json) => - _$Mutation$EnableServiceFromJson(json); + factory Mutation$EnableService.fromJson(Map json) { + final l$enableService = json['enableService']; + final l$$__typename = json['__typename']; + return Mutation$EnableService( + enableService: Mutation$EnableService$enableService.fromJson( + (l$enableService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$EnableService$enableService enableService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$EnableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$enableService = enableService; + _resultData['enableService'] = l$enableService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$enableService = enableService; final l$$__typename = $__typename; - return Object.hashAll([l$enableService, l$$__typename]); + return Object.hashAll([ + l$enableService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$EnableService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$EnableService) || + runtimeType != other.runtimeType) { return false; + } final l$enableService = enableService; final lOther$enableService = other.enableService; - if (l$enableService != lOther$enableService) return false; + if (l$enableService != lOther$enableService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$EnableService on Mutation$EnableService { CopyWith$Mutation$EnableService get copyWith => - CopyWith$Mutation$EnableService(this, (i) => i); + CopyWith$Mutation$EnableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$EnableService { - factory CopyWith$Mutation$EnableService(Mutation$EnableService instance, - TRes Function(Mutation$EnableService) then) = - _CopyWithImpl$Mutation$EnableService; + factory CopyWith$Mutation$EnableService( + Mutation$EnableService instance, + TRes Function(Mutation$EnableService) then, + ) = _CopyWithImpl$Mutation$EnableService; factory CopyWith$Mutation$EnableService.stub(TRes res) = _CopyWithStubImpl$Mutation$EnableService; - TRes call( - {Mutation$EnableService$enableService? enableService, - String? $__typename}); + TRes call({ + Mutation$EnableService$enableService? enableService, + String? $__typename, + }); CopyWith$Mutation$EnableService$enableService get enableService; } class _CopyWithImpl$Mutation$EnableService implements CopyWith$Mutation$EnableService { - _CopyWithImpl$Mutation$EnableService(this._instance, this._then); + _CopyWithImpl$Mutation$EnableService( + this._instance, + this._then, + ); final Mutation$EnableService _instance; @@ -1289,16 +3367,18 @@ class _CopyWithImpl$Mutation$EnableService static const _undefined = {}; - TRes call( - {Object? enableService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? enableService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$EnableService( - enableService: enableService == _undefined || enableService == null - ? _instance.enableService - : (enableService as Mutation$EnableService$enableService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + enableService: enableService == _undefined || enableService == null + ? _instance.enableService + : (enableService as Mutation$EnableService$enableService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$EnableService$enableService get enableService { final local$enableService = _instance.enableService; return CopyWith$Mutation$EnableService$enableService( @@ -1312,9 +3392,10 @@ class _CopyWithStubImpl$Mutation$EnableService TRes _res; - call( - {Mutation$EnableService$enableService? enableService, - String? $__typename}) => + call({ + Mutation$EnableService$enableService? enableService, + String? $__typename, + }) => _res; CopyWith$Mutation$EnableService$enableService get enableService => CopyWith$Mutation$EnableService$enableService.stub(_res); @@ -1322,86 +3403,99 @@ class _CopyWithStubImpl$Mutation$EnableService const documentNodeMutationEnableService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'EnableService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'enableService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'EnableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$EnableService _parserFn$Mutation$EnableService( Map data) => Mutation$EnableService.fromJson(data); typedef OnMutationCompleted$Mutation$EnableService = FutureOr Function( - dynamic, Mutation$EnableService?); + dynamic, + Mutation$EnableService?, +); class Options$Mutation$EnableService extends graphql.MutationOptions { - Options$Mutation$EnableService( - {String? operationName, - required Variables$Mutation$EnableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$EnableService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$EnableService({ + String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$EnableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$EnableService(data)), - update: update, - onError: onError, - document: documentNodeMutationEnableService, - parserFn: _parserFn$Mutation$EnableService); + : _parserFn$Mutation$EnableService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationEnableService, + parserFn: _parserFn$Mutation$EnableService, + ); final OnMutationCompleted$Mutation$EnableService? onCompletedWithParsed; @@ -1410,38 +3504,39 @@ class Options$Mutation$EnableService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$EnableService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$EnableService( - {String? operationName, - required Variables$Mutation$EnableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationEnableService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$EnableService); + WatchOptions$Mutation$EnableService({ + String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationEnableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$EnableService, + ); } extension ClientExtension$Mutation$EnableService on graphql.GraphQLClient { @@ -1453,19 +3548,28 @@ extension ClientExtension$Mutation$EnableService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$EnableService$enableService - implements Fragment$basicMutationReturnFields { - Mutation$EnableService$enableService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$EnableService$enableService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$EnableService$enableService.fromJson( - Map json) => - _$Mutation$EnableService$enableServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$EnableService$enableService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1473,36 +3577,64 @@ class Mutation$EnableService$enableService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$EnableService$enableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$EnableService$enableService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1511,26 +3643,35 @@ extension UtilityExtension$Mutation$EnableService$enableService on Mutation$EnableService$enableService { CopyWith$Mutation$EnableService$enableService< Mutation$EnableService$enableService> - get copyWith => - CopyWith$Mutation$EnableService$enableService(this, (i) => i); + get copyWith => CopyWith$Mutation$EnableService$enableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$EnableService$enableService { factory CopyWith$Mutation$EnableService$enableService( - Mutation$EnableService$enableService instance, - TRes Function(Mutation$EnableService$enableService) then) = - _CopyWithImpl$Mutation$EnableService$enableService; + Mutation$EnableService$enableService instance, + TRes Function(Mutation$EnableService$enableService) then, + ) = _CopyWithImpl$Mutation$EnableService$enableService; factory CopyWith$Mutation$EnableService$enableService.stub(TRes res) = _CopyWithStubImpl$Mutation$EnableService$enableService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$EnableService$enableService implements CopyWith$Mutation$EnableService$enableService { _CopyWithImpl$Mutation$EnableService$enableService( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$EnableService$enableService _instance; @@ -1538,24 +3679,25 @@ class _CopyWithImpl$Mutation$EnableService$enableService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$EnableService$enableService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$EnableService$enableService @@ -1564,49 +3706,75 @@ class _CopyWithStubImpl$Mutation$EnableService$enableService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$DisableService { - Variables$Mutation$DisableService({required this.serviceId}); + factory Variables$Mutation$DisableService({required String serviceId}) => + Variables$Mutation$DisableService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$DisableService._(this._$data); + + factory Variables$Mutation$DisableService.fromJson( + Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$DisableService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$DisableService + get copyWith => CopyWith$Variables$Mutation$DisableService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$DisableService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$DisableService.fromJson( - Map json) => - _$Variables$Mutation$DisableServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$DisableServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DisableService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$DisableService - get copyWith => - CopyWith$Variables$Mutation$DisableService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$DisableService { factory CopyWith$Variables$Mutation$DisableService( - Variables$Mutation$DisableService instance, - TRes Function(Variables$Mutation$DisableService) then) = - _CopyWithImpl$Variables$Mutation$DisableService; + Variables$Mutation$DisableService instance, + TRes Function(Variables$Mutation$DisableService) then, + ) = _CopyWithImpl$Variables$Mutation$DisableService; factory CopyWith$Variables$Mutation$DisableService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DisableService; @@ -1616,7 +3784,10 @@ abstract class CopyWith$Variables$Mutation$DisableService { class _CopyWithImpl$Variables$Mutation$DisableService implements CopyWith$Variables$Mutation$DisableService { - _CopyWithImpl$Variables$Mutation$DisableService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$DisableService( + this._instance, + this._then, + ); final Variables$Mutation$DisableService _instance; @@ -1625,10 +3796,11 @@ class _CopyWithImpl$Variables$Mutation$DisableService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$DisableService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$DisableService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$DisableService @@ -1640,64 +3812,98 @@ class _CopyWithStubImpl$Variables$Mutation$DisableService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$DisableService { - Mutation$DisableService( - {required this.disableService, required this.$__typename}); + Mutation$DisableService({ + required this.disableService, + required this.$__typename, + }); - @override - factory Mutation$DisableService.fromJson(Map json) => - _$Mutation$DisableServiceFromJson(json); + factory Mutation$DisableService.fromJson(Map json) { + final l$disableService = json['disableService']; + final l$$__typename = json['__typename']; + return Mutation$DisableService( + disableService: Mutation$DisableService$disableService.fromJson( + (l$disableService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$DisableService$disableService disableService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DisableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$disableService = disableService; + _resultData['disableService'] = l$disableService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$disableService = disableService; final l$$__typename = $__typename; - return Object.hashAll([l$disableService, l$$__typename]); + return Object.hashAll([ + l$disableService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$DisableService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$DisableService) || + runtimeType != other.runtimeType) { return false; + } final l$disableService = disableService; final lOther$disableService = other.disableService; - if (l$disableService != lOther$disableService) return false; + if (l$disableService != lOther$disableService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$DisableService on Mutation$DisableService { CopyWith$Mutation$DisableService get copyWith => - CopyWith$Mutation$DisableService(this, (i) => i); + CopyWith$Mutation$DisableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DisableService { - factory CopyWith$Mutation$DisableService(Mutation$DisableService instance, - TRes Function(Mutation$DisableService) then) = - _CopyWithImpl$Mutation$DisableService; + factory CopyWith$Mutation$DisableService( + Mutation$DisableService instance, + TRes Function(Mutation$DisableService) then, + ) = _CopyWithImpl$Mutation$DisableService; factory CopyWith$Mutation$DisableService.stub(TRes res) = _CopyWithStubImpl$Mutation$DisableService; - TRes call( - {Mutation$DisableService$disableService? disableService, - String? $__typename}); + TRes call({ + Mutation$DisableService$disableService? disableService, + String? $__typename, + }); CopyWith$Mutation$DisableService$disableService get disableService; } class _CopyWithImpl$Mutation$DisableService implements CopyWith$Mutation$DisableService { - _CopyWithImpl$Mutation$DisableService(this._instance, this._then); + _CopyWithImpl$Mutation$DisableService( + this._instance, + this._then, + ); final Mutation$DisableService _instance; @@ -1705,16 +3911,18 @@ class _CopyWithImpl$Mutation$DisableService static const _undefined = {}; - TRes call( - {Object? disableService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? disableService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DisableService( - disableService: disableService == _undefined || disableService == null - ? _instance.disableService - : (disableService as Mutation$DisableService$disableService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + disableService: disableService == _undefined || disableService == null + ? _instance.disableService + : (disableService as Mutation$DisableService$disableService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$DisableService$disableService get disableService { final local$disableService = _instance.disableService; return CopyWith$Mutation$DisableService$disableService( @@ -1728,9 +3936,10 @@ class _CopyWithStubImpl$Mutation$DisableService TRes _res; - call( - {Mutation$DisableService$disableService? disableService, - String? $__typename}) => + call({ + Mutation$DisableService$disableService? disableService, + String? $__typename, + }) => _res; CopyWith$Mutation$DisableService$disableService get disableService => CopyWith$Mutation$DisableService$disableService.stub(_res); @@ -1738,86 +3947,99 @@ class _CopyWithStubImpl$Mutation$DisableService const documentNodeMutationDisableService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'DisableService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'disableService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'DisableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'disableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$DisableService _parserFn$Mutation$DisableService( Map data) => Mutation$DisableService.fromJson(data); typedef OnMutationCompleted$Mutation$DisableService = FutureOr Function( - dynamic, Mutation$DisableService?); + dynamic, + Mutation$DisableService?, +); class Options$Mutation$DisableService extends graphql.MutationOptions { - Options$Mutation$DisableService( - {String? operationName, - required Variables$Mutation$DisableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$DisableService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$DisableService({ + String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DisableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$DisableService(data)), - update: update, - onError: onError, - document: documentNodeMutationDisableService, - parserFn: _parserFn$Mutation$DisableService); + : _parserFn$Mutation$DisableService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationDisableService, + parserFn: _parserFn$Mutation$DisableService, + ); final OnMutationCompleted$Mutation$DisableService? onCompletedWithParsed; @@ -1826,38 +4048,39 @@ class Options$Mutation$DisableService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$DisableService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$DisableService( - {String? operationName, - required Variables$Mutation$DisableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationDisableService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$DisableService); + WatchOptions$Mutation$DisableService({ + String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDisableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DisableService, + ); } extension ClientExtension$Mutation$DisableService on graphql.GraphQLClient { @@ -1869,19 +4092,28 @@ extension ClientExtension$Mutation$DisableService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$DisableService$disableService - implements Fragment$basicMutationReturnFields { - Mutation$DisableService$disableService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$DisableService$disableService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$DisableService$disableService.fromJson( - Map json) => - _$Mutation$DisableService$disableServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$DisableService$disableService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1889,36 +4121,64 @@ class Mutation$DisableService$disableService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$DisableService$disableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DisableService$disableService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1927,26 +4187,35 @@ extension UtilityExtension$Mutation$DisableService$disableService on Mutation$DisableService$disableService { CopyWith$Mutation$DisableService$disableService< Mutation$DisableService$disableService> - get copyWith => - CopyWith$Mutation$DisableService$disableService(this, (i) => i); + get copyWith => CopyWith$Mutation$DisableService$disableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DisableService$disableService { factory CopyWith$Mutation$DisableService$disableService( - Mutation$DisableService$disableService instance, - TRes Function(Mutation$DisableService$disableService) then) = - _CopyWithImpl$Mutation$DisableService$disableService; + Mutation$DisableService$disableService instance, + TRes Function(Mutation$DisableService$disableService) then, + ) = _CopyWithImpl$Mutation$DisableService$disableService; factory CopyWith$Mutation$DisableService$disableService.stub(TRes res) = _CopyWithStubImpl$Mutation$DisableService$disableService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$DisableService$disableService implements CopyWith$Mutation$DisableService$disableService { _CopyWithImpl$Mutation$DisableService$disableService( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$DisableService$disableService _instance; @@ -1954,24 +4223,25 @@ class _CopyWithImpl$Mutation$DisableService$disableService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DisableService$disableService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$DisableService$disableService @@ -1980,46 +4250,74 @@ class _CopyWithStubImpl$Mutation$DisableService$disableService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$StopService { - Variables$Mutation$StopService({required this.serviceId}); + factory Variables$Mutation$StopService({required String serviceId}) => + Variables$Mutation$StopService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$StopService._(this._$data); + + factory Variables$Mutation$StopService.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$StopService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$StopService + get copyWith => CopyWith$Variables$Mutation$StopService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$StopService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$StopService.fromJson(Map json) => - _$Variables$Mutation$StopServiceFromJson(json); - - final String serviceId; - - Map toJson() => _$Variables$Mutation$StopServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$StopService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$StopService - get copyWith => CopyWith$Variables$Mutation$StopService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$StopService { factory CopyWith$Variables$Mutation$StopService( - Variables$Mutation$StopService instance, - TRes Function(Variables$Mutation$StopService) then) = - _CopyWithImpl$Variables$Mutation$StopService; + Variables$Mutation$StopService instance, + TRes Function(Variables$Mutation$StopService) then, + ) = _CopyWithImpl$Variables$Mutation$StopService; factory CopyWith$Variables$Mutation$StopService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$StopService; @@ -2029,7 +4327,10 @@ abstract class CopyWith$Variables$Mutation$StopService { class _CopyWithImpl$Variables$Mutation$StopService implements CopyWith$Variables$Mutation$StopService { - _CopyWithImpl$Variables$Mutation$StopService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$StopService( + this._instance, + this._then, + ); final Variables$Mutation$StopService _instance; @@ -2038,10 +4339,11 @@ class _CopyWithImpl$Variables$Mutation$StopService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$StopService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$StopService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$StopService @@ -2053,62 +4355,97 @@ class _CopyWithStubImpl$Variables$Mutation$StopService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$StopService { - Mutation$StopService({required this.stopService, required this.$__typename}); + Mutation$StopService({ + required this.stopService, + required this.$__typename, + }); - @override - factory Mutation$StopService.fromJson(Map json) => - _$Mutation$StopServiceFromJson(json); + factory Mutation$StopService.fromJson(Map json) { + final l$stopService = json['stopService']; + final l$$__typename = json['__typename']; + return Mutation$StopService( + stopService: Mutation$StopService$stopService.fromJson( + (l$stopService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$StopService$stopService stopService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$StopServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$stopService = stopService; + _resultData['stopService'] = l$stopService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$stopService = stopService; final l$$__typename = $__typename; - return Object.hashAll([l$stopService, l$$__typename]); + return Object.hashAll([ + l$stopService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$StopService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$StopService) || runtimeType != other.runtimeType) { return false; + } final l$stopService = stopService; final lOther$stopService = other.stopService; - if (l$stopService != lOther$stopService) return false; + if (l$stopService != lOther$stopService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$StopService on Mutation$StopService { CopyWith$Mutation$StopService get copyWith => - CopyWith$Mutation$StopService(this, (i) => i); + CopyWith$Mutation$StopService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StopService { - factory CopyWith$Mutation$StopService(Mutation$StopService instance, - TRes Function(Mutation$StopService) then) = - _CopyWithImpl$Mutation$StopService; + factory CopyWith$Mutation$StopService( + Mutation$StopService instance, + TRes Function(Mutation$StopService) then, + ) = _CopyWithImpl$Mutation$StopService; factory CopyWith$Mutation$StopService.stub(TRes res) = _CopyWithStubImpl$Mutation$StopService; - TRes call( - {Mutation$StopService$stopService? stopService, String? $__typename}); + TRes call({ + Mutation$StopService$stopService? stopService, + String? $__typename, + }); CopyWith$Mutation$StopService$stopService get stopService; } class _CopyWithImpl$Mutation$StopService implements CopyWith$Mutation$StopService { - _CopyWithImpl$Mutation$StopService(this._instance, this._then); + _CopyWithImpl$Mutation$StopService( + this._instance, + this._then, + ); final Mutation$StopService _instance; @@ -2116,16 +4453,18 @@ class _CopyWithImpl$Mutation$StopService static const _undefined = {}; - TRes call( - {Object? stopService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? stopService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StopService( - stopService: stopService == _undefined || stopService == null - ? _instance.stopService - : (stopService as Mutation$StopService$stopService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + stopService: stopService == _undefined || stopService == null + ? _instance.stopService + : (stopService as Mutation$StopService$stopService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$StopService$stopService get stopService { final local$stopService = _instance.stopService; return CopyWith$Mutation$StopService$stopService( @@ -2139,7 +4478,10 @@ class _CopyWithStubImpl$Mutation$StopService TRes _res; - call({Mutation$StopService$stopService? stopService, String? $__typename}) => + call({ + Mutation$StopService$stopService? stopService, + String? $__typename, + }) => _res; CopyWith$Mutation$StopService$stopService get stopService => CopyWith$Mutation$StopService$stopService.stub(_res); @@ -2147,83 +4489,97 @@ class _CopyWithStubImpl$Mutation$StopService const documentNodeMutationStopService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'StopService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'stopService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'StopService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'stopService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$StopService _parserFn$Mutation$StopService( Map data) => Mutation$StopService.fromJson(data); typedef OnMutationCompleted$Mutation$StopService = FutureOr Function( - dynamic, Mutation$StopService?); + dynamic, + Mutation$StopService?, +); class Options$Mutation$StopService extends graphql.MutationOptions { - Options$Mutation$StopService( - {String? operationName, - required Variables$Mutation$StopService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$StopService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$StopService({ + String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StopService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$StopService(data)), - update: update, - onError: onError, - document: documentNodeMutationStopService, - parserFn: _parserFn$Mutation$StopService); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$StopService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationStopService, + parserFn: _parserFn$Mutation$StopService, + ); final OnMutationCompleted$Mutation$StopService? onCompletedWithParsed; @@ -2232,38 +4588,39 @@ class Options$Mutation$StopService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$StopService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$StopService( - {String? operationName, - required Variables$Mutation$StopService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationStopService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$StopService); + WatchOptions$Mutation$StopService({ + String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStopService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StopService, + ); } extension ClientExtension$Mutation$StopService on graphql.GraphQLClient { @@ -2275,19 +4632,27 @@ extension ClientExtension$Mutation$StopService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$StopService$stopService - implements Fragment$basicMutationReturnFields { - Mutation$StopService$stopService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$StopService$stopService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$StopService$stopService.fromJson( - Map json) => - _$Mutation$StopService$stopServiceFromJson(json); + factory Mutation$StopService$stopService.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$StopService$stopService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2295,36 +4660,64 @@ class Mutation$StopService$stopService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$StopService$stopServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$StopService$stopService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2332,24 +4725,35 @@ class Mutation$StopService$stopService extension UtilityExtension$Mutation$StopService$stopService on Mutation$StopService$stopService { CopyWith$Mutation$StopService$stopService - get copyWith => CopyWith$Mutation$StopService$stopService(this, (i) => i); + get copyWith => CopyWith$Mutation$StopService$stopService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StopService$stopService { factory CopyWith$Mutation$StopService$stopService( - Mutation$StopService$stopService instance, - TRes Function(Mutation$StopService$stopService) then) = - _CopyWithImpl$Mutation$StopService$stopService; + Mutation$StopService$stopService instance, + TRes Function(Mutation$StopService$stopService) then, + ) = _CopyWithImpl$Mutation$StopService$stopService; factory CopyWith$Mutation$StopService$stopService.stub(TRes res) = _CopyWithStubImpl$Mutation$StopService$stopService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$StopService$stopService implements CopyWith$Mutation$StopService$stopService { - _CopyWithImpl$Mutation$StopService$stopService(this._instance, this._then); + _CopyWithImpl$Mutation$StopService$stopService( + this._instance, + this._then, + ); final Mutation$StopService$stopService _instance; @@ -2357,24 +4761,25 @@ class _CopyWithImpl$Mutation$StopService$stopService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StopService$stopService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$StopService$stopService @@ -2383,47 +4788,74 @@ class _CopyWithStubImpl$Mutation$StopService$stopService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$StartService { - Variables$Mutation$StartService({required this.serviceId}); + factory Variables$Mutation$StartService({required String serviceId}) => + Variables$Mutation$StartService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$StartService._(this._$data); + + factory Variables$Mutation$StartService.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$StartService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$StartService + get copyWith => CopyWith$Variables$Mutation$StartService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$StartService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$StartService.fromJson(Map json) => - _$Variables$Mutation$StartServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$StartServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$StartService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$StartService - get copyWith => CopyWith$Variables$Mutation$StartService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$StartService { factory CopyWith$Variables$Mutation$StartService( - Variables$Mutation$StartService instance, - TRes Function(Variables$Mutation$StartService) then) = - _CopyWithImpl$Variables$Mutation$StartService; + Variables$Mutation$StartService instance, + TRes Function(Variables$Mutation$StartService) then, + ) = _CopyWithImpl$Variables$Mutation$StartService; factory CopyWith$Variables$Mutation$StartService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$StartService; @@ -2433,7 +4865,10 @@ abstract class CopyWith$Variables$Mutation$StartService { class _CopyWithImpl$Variables$Mutation$StartService implements CopyWith$Variables$Mutation$StartService { - _CopyWithImpl$Variables$Mutation$StartService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$StartService( + this._instance, + this._then, + ); final Variables$Mutation$StartService _instance; @@ -2442,10 +4877,11 @@ class _CopyWithImpl$Variables$Mutation$StartService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$StartService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$StartService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$StartService @@ -2457,63 +4893,97 @@ class _CopyWithStubImpl$Variables$Mutation$StartService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$StartService { - Mutation$StartService( - {required this.startService, required this.$__typename}); + Mutation$StartService({ + required this.startService, + required this.$__typename, + }); - @override - factory Mutation$StartService.fromJson(Map json) => - _$Mutation$StartServiceFromJson(json); + factory Mutation$StartService.fromJson(Map json) { + final l$startService = json['startService']; + final l$$__typename = json['__typename']; + return Mutation$StartService( + startService: Mutation$StartService$startService.fromJson( + (l$startService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$StartService$startService startService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$StartServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$startService = startService; + _resultData['startService'] = l$startService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$startService = startService; final l$$__typename = $__typename; - return Object.hashAll([l$startService, l$$__typename]); + return Object.hashAll([ + l$startService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$StartService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$StartService) || runtimeType != other.runtimeType) { return false; + } final l$startService = startService; final lOther$startService = other.startService; - if (l$startService != lOther$startService) return false; + if (l$startService != lOther$startService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$StartService on Mutation$StartService { CopyWith$Mutation$StartService get copyWith => - CopyWith$Mutation$StartService(this, (i) => i); + CopyWith$Mutation$StartService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StartService { - factory CopyWith$Mutation$StartService(Mutation$StartService instance, - TRes Function(Mutation$StartService) then) = - _CopyWithImpl$Mutation$StartService; + factory CopyWith$Mutation$StartService( + Mutation$StartService instance, + TRes Function(Mutation$StartService) then, + ) = _CopyWithImpl$Mutation$StartService; factory CopyWith$Mutation$StartService.stub(TRes res) = _CopyWithStubImpl$Mutation$StartService; - TRes call( - {Mutation$StartService$startService? startService, String? $__typename}); + TRes call({ + Mutation$StartService$startService? startService, + String? $__typename, + }); CopyWith$Mutation$StartService$startService get startService; } class _CopyWithImpl$Mutation$StartService implements CopyWith$Mutation$StartService { - _CopyWithImpl$Mutation$StartService(this._instance, this._then); + _CopyWithImpl$Mutation$StartService( + this._instance, + this._then, + ); final Mutation$StartService _instance; @@ -2521,16 +4991,18 @@ class _CopyWithImpl$Mutation$StartService static const _undefined = {}; - TRes call( - {Object? startService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? startService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StartService( - startService: startService == _undefined || startService == null - ? _instance.startService - : (startService as Mutation$StartService$startService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + startService: startService == _undefined || startService == null + ? _instance.startService + : (startService as Mutation$StartService$startService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$StartService$startService get startService { final local$startService = _instance.startService; return CopyWith$Mutation$StartService$startService( @@ -2544,9 +5016,10 @@ class _CopyWithStubImpl$Mutation$StartService TRes _res; - call( - {Mutation$StartService$startService? startService, - String? $__typename}) => + call({ + Mutation$StartService$startService? startService, + String? $__typename, + }) => _res; CopyWith$Mutation$StartService$startService get startService => CopyWith$Mutation$StartService$startService.stub(_res); @@ -2554,86 +5027,97 @@ class _CopyWithStubImpl$Mutation$StartService const documentNodeMutationStartService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'StartService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'startService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'StartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'startService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$StartService _parserFn$Mutation$StartService( Map data) => Mutation$StartService.fromJson(data); typedef OnMutationCompleted$Mutation$StartService = FutureOr Function( - dynamic, Mutation$StartService?); + dynamic, + Mutation$StartService?, +); class Options$Mutation$StartService extends graphql.MutationOptions { - Options$Mutation$StartService( - {String? operationName, - required Variables$Mutation$StartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$StartService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$StartService({ + String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$StartService(data)), - update: update, - onError: onError, - document: documentNodeMutationStartService, - parserFn: _parserFn$Mutation$StartService); + data == null ? null : _parserFn$Mutation$StartService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationStartService, + parserFn: _parserFn$Mutation$StartService, + ); final OnMutationCompleted$Mutation$StartService? onCompletedWithParsed; @@ -2642,38 +5126,39 @@ class Options$Mutation$StartService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$StartService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$StartService( - {String? operationName, - required Variables$Mutation$StartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationStartService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$StartService); + WatchOptions$Mutation$StartService({ + String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StartService, + ); } extension ClientExtension$Mutation$StartService on graphql.GraphQLClient { @@ -2685,19 +5170,28 @@ extension ClientExtension$Mutation$StartService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$StartService$startService - implements Fragment$basicMutationReturnFields { - Mutation$StartService$startService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$StartService$startService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$StartService$startService.fromJson( - Map json) => - _$Mutation$StartService$startServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$StartService$startService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2705,36 +5199,64 @@ class Mutation$StartService$startService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$StartService$startServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$StartService$startService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2743,25 +5265,35 @@ extension UtilityExtension$Mutation$StartService$startService on Mutation$StartService$startService { CopyWith$Mutation$StartService$startService< Mutation$StartService$startService> - get copyWith => - CopyWith$Mutation$StartService$startService(this, (i) => i); + get copyWith => CopyWith$Mutation$StartService$startService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StartService$startService { factory CopyWith$Mutation$StartService$startService( - Mutation$StartService$startService instance, - TRes Function(Mutation$StartService$startService) then) = - _CopyWithImpl$Mutation$StartService$startService; + Mutation$StartService$startService instance, + TRes Function(Mutation$StartService$startService) then, + ) = _CopyWithImpl$Mutation$StartService$startService; factory CopyWith$Mutation$StartService$startService.stub(TRes res) = _CopyWithStubImpl$Mutation$StartService$startService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$StartService$startService implements CopyWith$Mutation$StartService$startService { - _CopyWithImpl$Mutation$StartService$startService(this._instance, this._then); + _CopyWithImpl$Mutation$StartService$startService( + this._instance, + this._then, + ); final Mutation$StartService$startService _instance; @@ -2769,24 +5301,25 @@ class _CopyWithImpl$Mutation$StartService$startService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StartService$startService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$StartService$startService @@ -2795,49 +5328,75 @@ class _CopyWithStubImpl$Mutation$StartService$startService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$RestartService { - Variables$Mutation$RestartService({required this.serviceId}); + factory Variables$Mutation$RestartService({required String serviceId}) => + Variables$Mutation$RestartService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$RestartService._(this._$data); + + factory Variables$Mutation$RestartService.fromJson( + Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$RestartService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$RestartService + get copyWith => CopyWith$Variables$Mutation$RestartService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$RestartService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$RestartService.fromJson( - Map json) => - _$Variables$Mutation$RestartServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$RestartServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RestartService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$RestartService - get copyWith => - CopyWith$Variables$Mutation$RestartService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RestartService { factory CopyWith$Variables$Mutation$RestartService( - Variables$Mutation$RestartService instance, - TRes Function(Variables$Mutation$RestartService) then) = - _CopyWithImpl$Variables$Mutation$RestartService; + Variables$Mutation$RestartService instance, + TRes Function(Variables$Mutation$RestartService) then, + ) = _CopyWithImpl$Variables$Mutation$RestartService; factory CopyWith$Variables$Mutation$RestartService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RestartService; @@ -2847,7 +5406,10 @@ abstract class CopyWith$Variables$Mutation$RestartService { class _CopyWithImpl$Variables$Mutation$RestartService implements CopyWith$Variables$Mutation$RestartService { - _CopyWithImpl$Variables$Mutation$RestartService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$RestartService( + this._instance, + this._then, + ); final Variables$Mutation$RestartService _instance; @@ -2856,10 +5418,11 @@ class _CopyWithImpl$Variables$Mutation$RestartService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$RestartService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$RestartService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$RestartService @@ -2871,64 +5434,98 @@ class _CopyWithStubImpl$Variables$Mutation$RestartService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RestartService { - Mutation$RestartService( - {required this.restartService, required this.$__typename}); + Mutation$RestartService({ + required this.restartService, + required this.$__typename, + }); - @override - factory Mutation$RestartService.fromJson(Map json) => - _$Mutation$RestartServiceFromJson(json); + factory Mutation$RestartService.fromJson(Map json) { + final l$restartService = json['restartService']; + final l$$__typename = json['__typename']; + return Mutation$RestartService( + restartService: Mutation$RestartService$restartService.fromJson( + (l$restartService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RestartService$restartService restartService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RestartServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$restartService = restartService; + _resultData['restartService'] = l$restartService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$restartService = restartService; final l$$__typename = $__typename; - return Object.hashAll([l$restartService, l$$__typename]); + return Object.hashAll([ + l$restartService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RestartService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RestartService) || + runtimeType != other.runtimeType) { return false; + } final l$restartService = restartService; final lOther$restartService = other.restartService; - if (l$restartService != lOther$restartService) return false; + if (l$restartService != lOther$restartService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RestartService on Mutation$RestartService { CopyWith$Mutation$RestartService get copyWith => - CopyWith$Mutation$RestartService(this, (i) => i); + CopyWith$Mutation$RestartService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RestartService { - factory CopyWith$Mutation$RestartService(Mutation$RestartService instance, - TRes Function(Mutation$RestartService) then) = - _CopyWithImpl$Mutation$RestartService; + factory CopyWith$Mutation$RestartService( + Mutation$RestartService instance, + TRes Function(Mutation$RestartService) then, + ) = _CopyWithImpl$Mutation$RestartService; factory CopyWith$Mutation$RestartService.stub(TRes res) = _CopyWithStubImpl$Mutation$RestartService; - TRes call( - {Mutation$RestartService$restartService? restartService, - String? $__typename}); + TRes call({ + Mutation$RestartService$restartService? restartService, + String? $__typename, + }); CopyWith$Mutation$RestartService$restartService get restartService; } class _CopyWithImpl$Mutation$RestartService implements CopyWith$Mutation$RestartService { - _CopyWithImpl$Mutation$RestartService(this._instance, this._then); + _CopyWithImpl$Mutation$RestartService( + this._instance, + this._then, + ); final Mutation$RestartService _instance; @@ -2936,16 +5533,18 @@ class _CopyWithImpl$Mutation$RestartService static const _undefined = {}; - TRes call( - {Object? restartService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? restartService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RestartService( - restartService: restartService == _undefined || restartService == null - ? _instance.restartService - : (restartService as Mutation$RestartService$restartService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + restartService: restartService == _undefined || restartService == null + ? _instance.restartService + : (restartService as Mutation$RestartService$restartService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RestartService$restartService get restartService { final local$restartService = _instance.restartService; return CopyWith$Mutation$RestartService$restartService( @@ -2959,9 +5558,10 @@ class _CopyWithStubImpl$Mutation$RestartService TRes _res; - call( - {Mutation$RestartService$restartService? restartService, - String? $__typename}) => + call({ + Mutation$RestartService$restartService? restartService, + String? $__typename, + }) => _res; CopyWith$Mutation$RestartService$restartService get restartService => CopyWith$Mutation$RestartService$restartService.stub(_res); @@ -2969,86 +5569,99 @@ class _CopyWithStubImpl$Mutation$RestartService const documentNodeMutationRestartService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RestartService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'restartService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'RestartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'restartService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RestartService _parserFn$Mutation$RestartService( Map data) => Mutation$RestartService.fromJson(data); typedef OnMutationCompleted$Mutation$RestartService = FutureOr Function( - dynamic, Mutation$RestartService?); + dynamic, + Mutation$RestartService?, +); class Options$Mutation$RestartService extends graphql.MutationOptions { - Options$Mutation$RestartService( - {String? operationName, - required Variables$Mutation$RestartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RestartService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RestartService({ + String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RestartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RestartService(data)), - update: update, - onError: onError, - document: documentNodeMutationRestartService, - parserFn: _parserFn$Mutation$RestartService); + : _parserFn$Mutation$RestartService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRestartService, + parserFn: _parserFn$Mutation$RestartService, + ); final OnMutationCompleted$Mutation$RestartService? onCompletedWithParsed; @@ -3057,38 +5670,39 @@ class Options$Mutation$RestartService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RestartService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RestartService( - {String? operationName, - required Variables$Mutation$RestartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRestartService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RestartService); + WatchOptions$Mutation$RestartService({ + String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRestartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RestartService, + ); } extension ClientExtension$Mutation$RestartService on graphql.GraphQLClient { @@ -3100,19 +5714,28 @@ extension ClientExtension$Mutation$RestartService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$RestartService$restartService - implements Fragment$basicMutationReturnFields { - Mutation$RestartService$restartService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$RestartService$restartService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RestartService$restartService.fromJson( - Map json) => - _$Mutation$RestartService$restartServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RestartService$restartService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -3120,36 +5743,64 @@ class Mutation$RestartService$restartService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RestartService$restartServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RestartService$restartService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3158,26 +5809,35 @@ extension UtilityExtension$Mutation$RestartService$restartService on Mutation$RestartService$restartService { CopyWith$Mutation$RestartService$restartService< Mutation$RestartService$restartService> - get copyWith => - CopyWith$Mutation$RestartService$restartService(this, (i) => i); + get copyWith => CopyWith$Mutation$RestartService$restartService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RestartService$restartService { factory CopyWith$Mutation$RestartService$restartService( - Mutation$RestartService$restartService instance, - TRes Function(Mutation$RestartService$restartService) then) = - _CopyWithImpl$Mutation$RestartService$restartService; + Mutation$RestartService$restartService instance, + TRes Function(Mutation$RestartService$restartService) then, + ) = _CopyWithImpl$Mutation$RestartService$restartService; factory CopyWith$Mutation$RestartService$restartService.stub(TRes res) = _CopyWithStubImpl$Mutation$RestartService$restartService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RestartService$restartService implements CopyWith$Mutation$RestartService$restartService { _CopyWithImpl$Mutation$RestartService$restartService( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RestartService$restartService _instance; @@ -3185,24 +5845,25 @@ class _CopyWithImpl$Mutation$RestartService$restartService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RestartService$restartService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RestartService$restartService @@ -3211,46 +5872,77 @@ class _CopyWithStubImpl$Mutation$RestartService$restartService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$MoveService { - Variables$Mutation$MoveService({required this.input}); + factory Variables$Mutation$MoveService( + {required Input$MoveServiceInput input}) => + Variables$Mutation$MoveService._({ + r'input': input, + }); + + Variables$Mutation$MoveService._(this._$data); + + factory Variables$Mutation$MoveService.fromJson(Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$MoveServiceInput.fromJson((l$input as Map)); + return Variables$Mutation$MoveService._(result$data); + } + + Map _$data; + + Input$MoveServiceInput get input => + (_$data['input'] as Input$MoveServiceInput); + Map toJson() { + final result$data = {}; + final l$input = input; + result$data['input'] = l$input.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$MoveService + get copyWith => CopyWith$Variables$Mutation$MoveService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$MoveService) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } @override - factory Variables$Mutation$MoveService.fromJson(Map json) => - _$Variables$Mutation$MoveServiceFromJson(json); - - final Input$MoveServiceInput input; - - Map toJson() => _$Variables$Mutation$MoveServiceToJson(this); int get hashCode { final l$input = input; return Object.hashAll([l$input]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MoveService) || - runtimeType != other.runtimeType) return false; - final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; - } - - CopyWith$Variables$Mutation$MoveService - get copyWith => CopyWith$Variables$Mutation$MoveService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$MoveService { factory CopyWith$Variables$Mutation$MoveService( - Variables$Mutation$MoveService instance, - TRes Function(Variables$Mutation$MoveService) then) = - _CopyWithImpl$Variables$Mutation$MoveService; + Variables$Mutation$MoveService instance, + TRes Function(Variables$Mutation$MoveService) then, + ) = _CopyWithImpl$Variables$Mutation$MoveService; factory CopyWith$Variables$Mutation$MoveService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$MoveService; @@ -3260,7 +5952,10 @@ abstract class CopyWith$Variables$Mutation$MoveService { class _CopyWithImpl$Variables$Mutation$MoveService implements CopyWith$Variables$Mutation$MoveService { - _CopyWithImpl$Variables$Mutation$MoveService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$MoveService( + this._instance, + this._then, + ); final Variables$Mutation$MoveService _instance; @@ -3269,10 +5964,11 @@ class _CopyWithImpl$Variables$Mutation$MoveService static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$MoveService( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$MoveServiceInput))); + _then(Variables$Mutation$MoveService._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$MoveServiceInput), + })); } class _CopyWithStubImpl$Variables$Mutation$MoveService @@ -3284,62 +5980,97 @@ class _CopyWithStubImpl$Variables$Mutation$MoveService call({Input$MoveServiceInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$MoveService { - Mutation$MoveService({required this.moveService, required this.$__typename}); + Mutation$MoveService({ + required this.moveService, + required this.$__typename, + }); - @override - factory Mutation$MoveService.fromJson(Map json) => - _$Mutation$MoveServiceFromJson(json); + factory Mutation$MoveService.fromJson(Map json) { + final l$moveService = json['moveService']; + final l$$__typename = json['__typename']; + return Mutation$MoveService( + moveService: Mutation$MoveService$moveService.fromJson( + (l$moveService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$MoveService$moveService moveService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MoveServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$moveService = moveService; + _resultData['moveService'] = l$moveService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$moveService = moveService; final l$$__typename = $__typename; - return Object.hashAll([l$moveService, l$$__typename]); + return Object.hashAll([ + l$moveService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$MoveService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$MoveService) || runtimeType != other.runtimeType) { return false; + } final l$moveService = moveService; final lOther$moveService = other.moveService; - if (l$moveService != lOther$moveService) return false; + if (l$moveService != lOther$moveService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$MoveService on Mutation$MoveService { CopyWith$Mutation$MoveService get copyWith => - CopyWith$Mutation$MoveService(this, (i) => i); + CopyWith$Mutation$MoveService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MoveService { - factory CopyWith$Mutation$MoveService(Mutation$MoveService instance, - TRes Function(Mutation$MoveService) then) = - _CopyWithImpl$Mutation$MoveService; + factory CopyWith$Mutation$MoveService( + Mutation$MoveService instance, + TRes Function(Mutation$MoveService) then, + ) = _CopyWithImpl$Mutation$MoveService; factory CopyWith$Mutation$MoveService.stub(TRes res) = _CopyWithStubImpl$Mutation$MoveService; - TRes call( - {Mutation$MoveService$moveService? moveService, String? $__typename}); + TRes call({ + Mutation$MoveService$moveService? moveService, + String? $__typename, + }); CopyWith$Mutation$MoveService$moveService get moveService; } class _CopyWithImpl$Mutation$MoveService implements CopyWith$Mutation$MoveService { - _CopyWithImpl$Mutation$MoveService(this._instance, this._then); + _CopyWithImpl$Mutation$MoveService( + this._instance, + this._then, + ); final Mutation$MoveService _instance; @@ -3347,16 +6078,18 @@ class _CopyWithImpl$Mutation$MoveService static const _undefined = {}; - TRes call( - {Object? moveService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? moveService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MoveService( - moveService: moveService == _undefined || moveService == null - ? _instance.moveService - : (moveService as Mutation$MoveService$moveService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + moveService: moveService == _undefined || moveService == null + ? _instance.moveService + : (moveService as Mutation$MoveService$moveService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$MoveService$moveService get moveService { final local$moveService = _instance.moveService; return CopyWith$Mutation$MoveService$moveService( @@ -3370,7 +6103,10 @@ class _CopyWithStubImpl$Mutation$MoveService TRes _res; - call({Mutation$MoveService$moveService? moveService, String? $__typename}) => + call({ + Mutation$MoveService$moveService? moveService, + String? $__typename, + }) => _res; CopyWith$Mutation$MoveService$moveService get moveService => CopyWith$Mutation$MoveService$moveService.stub(_res); @@ -3378,162 +6114,189 @@ class _CopyWithStubImpl$Mutation$MoveService const documentNodeMutationMoveService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'MoveService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'MoveServiceInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'moveService'), + type: OperationType.mutation, + name: NameNode(value: 'MoveService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MoveServiceInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'moveService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'job'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), FieldNode( - name: NameNode(value: 'job'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$MoveService _parserFn$Mutation$MoveService( Map data) => Mutation$MoveService.fromJson(data); typedef OnMutationCompleted$Mutation$MoveService = FutureOr Function( - dynamic, Mutation$MoveService?); + dynamic, + Mutation$MoveService?, +); class Options$Mutation$MoveService extends graphql.MutationOptions { - Options$Mutation$MoveService( - {String? operationName, - required Variables$Mutation$MoveService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$MoveService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$MoveService({ + String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MoveService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$MoveService(data)), - update: update, - onError: onError, - document: documentNodeMutationMoveService, - parserFn: _parserFn$Mutation$MoveService); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$MoveService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationMoveService, + parserFn: _parserFn$Mutation$MoveService, + ); final OnMutationCompleted$Mutation$MoveService? onCompletedWithParsed; @@ -3542,38 +6305,39 @@ class Options$Mutation$MoveService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$MoveService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MoveService( - {String? operationName, - required Variables$Mutation$MoveService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationMoveService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MoveService); + WatchOptions$Mutation$MoveService({ + String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMoveService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MoveService, + ); } extension ClientExtension$Mutation$MoveService on graphql.GraphQLClient { @@ -3585,20 +6349,33 @@ extension ClientExtension$Mutation$MoveService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$MoveService$moveService - implements Fragment$basicMutationReturnFields { - Mutation$MoveService$moveService( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.job}); + implements Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + Mutation$MoveService$moveService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job, + }); - @override - factory Mutation$MoveService$moveService.fromJson( - Map json) => - _$Mutation$MoveService$moveServiceFromJson(json); + factory Mutation$MoveService$moveService.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$job = json['job']; + return Mutation$MoveService$moveService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + job: l$job == null + ? null + : Mutation$MoveService$moveService$job.fromJson( + (l$job as Map)), + ); + } final int code; @@ -3606,42 +6383,75 @@ class Mutation$MoveService$moveService final bool success; - @JsonKey(name: '__typename') final String $__typename; final Mutation$MoveService$moveService$job? job; - Map toJson() => - _$Mutation$MoveService$moveServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$job = job; + _resultData['job'] = l$job?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$job = job; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$job, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MoveService$moveService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$job = job; final lOther$job = other.job; - if (l$job != lOther$job) return false; + if (l$job != lOther$job) { + return false; + } return true; } } @@ -3649,30 +6459,37 @@ class Mutation$MoveService$moveService extension UtilityExtension$Mutation$MoveService$moveService on Mutation$MoveService$moveService { CopyWith$Mutation$MoveService$moveService - get copyWith => CopyWith$Mutation$MoveService$moveService(this, (i) => i); + get copyWith => CopyWith$Mutation$MoveService$moveService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MoveService$moveService { factory CopyWith$Mutation$MoveService$moveService( - Mutation$MoveService$moveService instance, - TRes Function(Mutation$MoveService$moveService) then) = - _CopyWithImpl$Mutation$MoveService$moveService; + Mutation$MoveService$moveService instance, + TRes Function(Mutation$MoveService$moveService) then, + ) = _CopyWithImpl$Mutation$MoveService$moveService; factory CopyWith$Mutation$MoveService$moveService.stub(TRes res) = _CopyWithStubImpl$Mutation$MoveService$moveService; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MoveService$moveService$job? job}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MoveService$moveService$job? job, + }); CopyWith$Mutation$MoveService$moveService$job get job; } class _CopyWithImpl$Mutation$MoveService$moveService implements CopyWith$Mutation$MoveService$moveService { - _CopyWithImpl$Mutation$MoveService$moveService(this._instance, this._then); + _CopyWithImpl$Mutation$MoveService$moveService( + this._instance, + this._then, + ); final Mutation$MoveService$moveService _instance; @@ -3680,28 +6497,29 @@ class _CopyWithImpl$Mutation$MoveService$moveService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? job = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? job = _undefined, + }) => _then(Mutation$MoveService$moveService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - job: job == _undefined - ? _instance.job - : (job as Mutation$MoveService$moveService$job?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Mutation$MoveService$moveService$job?), + )); CopyWith$Mutation$MoveService$moveService$job get job { final local$job = _instance.job; return local$job == null @@ -3717,47 +6535,70 @@ class _CopyWithStubImpl$Mutation$MoveService$moveService TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MoveService$moveService$job? job}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MoveService$moveService$job? job, + }) => _res; CopyWith$Mutation$MoveService$moveService$job get job => CopyWith$Mutation$MoveService$moveService$job.stub(_res); } -@JsonSerializable(explicitToJson: true) class Mutation$MoveService$moveService$job { - Mutation$MoveService$moveService$job( - {required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - required this.$__typename}); + Mutation$MoveService$moveService$job({ + required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename, + }); - @override factory Mutation$MoveService$moveService$job.fromJson( - Map json) => - _$Mutation$MoveService$moveService$jobFromJson(json); + Map json) { + final l$createdAt = json['createdAt']; + final l$description = json['description']; + final l$error = json['error']; + final l$finishedAt = json['finishedAt']; + final l$name = json['name']; + final l$progress = json['progress']; + final l$result = json['result']; + final l$status = json['status']; + final l$statusText = json['statusText']; + final l$uid = json['uid']; + final l$updatedAt = json['updatedAt']; + final l$$__typename = json['__typename']; + return Mutation$MoveService$moveService$job( + createdAt: dateTimeFromJson(l$createdAt), + description: (l$description as String), + error: (l$error as String?), + finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), + name: (l$name as String), + progress: (l$progress as int?), + result: (l$result as String?), + status: (l$status as String), + statusText: (l$statusText as String?), + uid: (l$uid as String), + updatedAt: dateTimeFromJson(l$updatedAt), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime createdAt; final String description; final String? error; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? finishedAt; final String name; @@ -3772,14 +6613,41 @@ class Mutation$MoveService$moveService$job { final String uid; - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime updatedAt; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$MoveService$moveService$jobToJson(this); + Map toJson() { + final _resultData = {}; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$description = description; + _resultData['description'] = l$description; + final l$error = error; + _resultData['error'] = l$error; + final l$finishedAt = finishedAt; + _resultData['finishedAt'] = + l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); + final l$name = name; + _resultData['name'] = l$name; + final l$progress = progress; + _resultData['progress'] = l$progress; + final l$result = result; + _resultData['result'] = l$result; + final l$status = status; + _resultData['status'] = l$status; + final l$statusText = statusText; + _resultData['statusText'] = l$statusText; + final l$uid = uid; + _resultData['uid'] = l$uid; + final l$updatedAt = updatedAt; + _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createdAt = createdAt; final l$description = description; @@ -3805,51 +6673,79 @@ class Mutation$MoveService$moveService$job { l$statusText, l$uid, l$updatedAt, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MoveService$moveService$job) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$createdAt = createdAt; final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) return false; + if (l$createdAt != lOther$createdAt) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$error = error; final lOther$error = other.error; - if (l$error != lOther$error) return false; + if (l$error != lOther$error) { + return false; + } final l$finishedAt = finishedAt; final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) return false; + if (l$finishedAt != lOther$finishedAt) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$progress = progress; final lOther$progress = other.progress; - if (l$progress != lOther$progress) return false; + if (l$progress != lOther$progress) { + return false; + } final l$result = result; final lOther$result = other.result; - if (l$result != lOther$result) return false; + if (l$result != lOther$result) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$statusText = statusText; final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) return false; + if (l$statusText != lOther$statusText) { + return false; + } final l$uid = uid; final lOther$uid = other.uid; - if (l$uid != lOther$uid) return false; + if (l$uid != lOther$uid) { + return false; + } final l$updatedAt = updatedAt; final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) return false; + if (l$updatedAt != lOther$updatedAt) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3858,38 +6754,43 @@ extension UtilityExtension$Mutation$MoveService$moveService$job on Mutation$MoveService$moveService$job { CopyWith$Mutation$MoveService$moveService$job< Mutation$MoveService$moveService$job> - get copyWith => - CopyWith$Mutation$MoveService$moveService$job(this, (i) => i); + get copyWith => CopyWith$Mutation$MoveService$moveService$job( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MoveService$moveService$job { factory CopyWith$Mutation$MoveService$moveService$job( - Mutation$MoveService$moveService$job instance, - TRes Function(Mutation$MoveService$moveService$job) then) = - _CopyWithImpl$Mutation$MoveService$moveService$job; + Mutation$MoveService$moveService$job instance, + TRes Function(Mutation$MoveService$moveService$job) then, + ) = _CopyWithImpl$Mutation$MoveService$moveService$job; factory CopyWith$Mutation$MoveService$moveService$job.stub(TRes res) = _CopyWithStubImpl$Mutation$MoveService$moveService$job; - TRes call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}); + TRes call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }); } class _CopyWithImpl$Mutation$MoveService$moveService$job implements CopyWith$Mutation$MoveService$moveService$job { _CopyWithImpl$Mutation$MoveService$moveService$job( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$MoveService$moveService$job _instance; @@ -3897,51 +6798,51 @@ class _CopyWithImpl$Mutation$MoveService$moveService$job static const _undefined = {}; - TRes call( - {Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MoveService$moveService$job( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null - ? _instance.uid - : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$MoveService$moveService$job @@ -3950,23 +6851,19 @@ class _CopyWithStubImpl$Mutation$MoveService$moveService$job TRes _res; - call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}) => + call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }) => _res; } - -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart deleted file mode 100644 index 52663401..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart +++ /dev/null @@ -1,458 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'services.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$AllServices _$Query$AllServicesFromJson(Map json) => - Query$AllServices( - services: Query$AllServices$services.fromJson( - json['services'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServicesToJson(Query$AllServices instance) => - { - 'services': instance.services.toJson(), - '__typename': instance.$__typename, - }; - -Query$AllServices$services _$Query$AllServices$servicesFromJson( - Map json) => - Query$AllServices$services( - allServices: (json['allServices'] as List) - .map((e) => Query$AllServices$services$allServices.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServices$servicesToJson( - Query$AllServices$services instance) => - { - 'allServices': instance.allServices.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$AllServices$services$allServices - _$Query$AllServices$services$allServicesFromJson( - Map json) => - Query$AllServices$services$allServices( - description: json['description'] as String, - displayName: json['displayName'] as String, - dnsRecords: (json['dnsRecords'] as List?) - ?.map((e) => - Fragment$dnsRecordFields.fromJson(e as Map)) - .toList(), - id: json['id'] as String, - isEnabled: json['isEnabled'] as bool, - isMovable: json['isMovable'] as bool, - isRequired: json['isRequired'] as bool, - status: $enumDecode(_$Enum$ServiceStatusEnumEnumMap, json['status'], - unknownValue: Enum$ServiceStatusEnum.$unknown), - storageUsage: - Query$AllServices$services$allServices$storageUsage.fromJson( - json['storageUsage'] as Map), - svgIcon: json['svgIcon'] as String, - url: json['url'] as String?, - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServices$services$allServicesToJson( - Query$AllServices$services$allServices instance) => - { - 'description': instance.description, - 'displayName': instance.displayName, - 'dnsRecords': instance.dnsRecords?.map((e) => e.toJson()).toList(), - 'id': instance.id, - 'isEnabled': instance.isEnabled, - 'isMovable': instance.isMovable, - 'isRequired': instance.isRequired, - 'status': _$Enum$ServiceStatusEnumEnumMap[instance.status]!, - 'storageUsage': instance.storageUsage.toJson(), - 'svgIcon': instance.svgIcon, - 'url': instance.url, - '__typename': instance.$__typename, - }; - -const _$Enum$ServiceStatusEnumEnumMap = { - Enum$ServiceStatusEnum.ACTIVATING: 'ACTIVATING', - Enum$ServiceStatusEnum.ACTIVE: 'ACTIVE', - Enum$ServiceStatusEnum.DEACTIVATING: 'DEACTIVATING', - Enum$ServiceStatusEnum.FAILED: 'FAILED', - Enum$ServiceStatusEnum.INACTIVE: 'INACTIVE', - Enum$ServiceStatusEnum.OFF: 'OFF', - Enum$ServiceStatusEnum.RELOADING: 'RELOADING', - Enum$ServiceStatusEnum.$unknown: r'$unknown', -}; - -Query$AllServices$services$allServices$storageUsage - _$Query$AllServices$services$allServices$storageUsageFromJson( - Map json) => - Query$AllServices$services$allServices$storageUsage( - title: json['title'] as String, - usedSpace: json['usedSpace'] as String, - volume: json['volume'] == null - ? null - : Query$AllServices$services$allServices$storageUsage$volume - .fromJson(json['volume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map - _$Query$AllServices$services$allServices$storageUsageToJson( - Query$AllServices$services$allServices$storageUsage instance) => - { - 'title': instance.title, - 'usedSpace': instance.usedSpace, - 'volume': instance.volume?.toJson(), - '__typename': instance.$__typename, - }; - -Query$AllServices$services$allServices$storageUsage$volume - _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( - Map json) => - Query$AllServices$services$allServices$storageUsage$volume( - name: json['name'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServices$services$allServices$storageUsage$volumeToJson( - Query$AllServices$services$allServices$storageUsage$volume instance) => - { - 'name': instance.name, - '__typename': instance.$__typename, - }; - -Variables$Mutation$EnableService _$Variables$Mutation$EnableServiceFromJson( - Map json) => - Variables$Mutation$EnableService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$EnableServiceToJson( - Variables$Mutation$EnableService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$EnableService _$Mutation$EnableServiceFromJson( - Map json) => - Mutation$EnableService( - enableService: Mutation$EnableService$enableService.fromJson( - json['enableService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$EnableServiceToJson( - Mutation$EnableService instance) => - { - 'enableService': instance.enableService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$EnableService$enableService - _$Mutation$EnableService$enableServiceFromJson(Map json) => - Mutation$EnableService$enableService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$EnableService$enableServiceToJson( - Mutation$EnableService$enableService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$DisableService _$Variables$Mutation$DisableServiceFromJson( - Map json) => - Variables$Mutation$DisableService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$DisableServiceToJson( - Variables$Mutation$DisableService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$DisableService _$Mutation$DisableServiceFromJson( - Map json) => - Mutation$DisableService( - disableService: Mutation$DisableService$disableService.fromJson( - json['disableService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DisableServiceToJson( - Mutation$DisableService instance) => - { - 'disableService': instance.disableService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$DisableService$disableService - _$Mutation$DisableService$disableServiceFromJson( - Map json) => - Mutation$DisableService$disableService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DisableService$disableServiceToJson( - Mutation$DisableService$disableService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$StopService _$Variables$Mutation$StopServiceFromJson( - Map json) => - Variables$Mutation$StopService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$StopServiceToJson( - Variables$Mutation$StopService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$StopService _$Mutation$StopServiceFromJson( - Map json) => - Mutation$StopService( - stopService: Mutation$StopService$stopService.fromJson( - json['stopService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StopServiceToJson( - Mutation$StopService instance) => - { - 'stopService': instance.stopService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$StopService$stopService _$Mutation$StopService$stopServiceFromJson( - Map json) => - Mutation$StopService$stopService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StopService$stopServiceToJson( - Mutation$StopService$stopService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$StartService _$Variables$Mutation$StartServiceFromJson( - Map json) => - Variables$Mutation$StartService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$StartServiceToJson( - Variables$Mutation$StartService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$StartService _$Mutation$StartServiceFromJson( - Map json) => - Mutation$StartService( - startService: Mutation$StartService$startService.fromJson( - json['startService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StartServiceToJson( - Mutation$StartService instance) => - { - 'startService': instance.startService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$StartService$startService _$Mutation$StartService$startServiceFromJson( - Map json) => - Mutation$StartService$startService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StartService$startServiceToJson( - Mutation$StartService$startService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$RestartService _$Variables$Mutation$RestartServiceFromJson( - Map json) => - Variables$Mutation$RestartService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$RestartServiceToJson( - Variables$Mutation$RestartService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$RestartService _$Mutation$RestartServiceFromJson( - Map json) => - Mutation$RestartService( - restartService: Mutation$RestartService$restartService.fromJson( - json['restartService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RestartServiceToJson( - Mutation$RestartService instance) => - { - 'restartService': instance.restartService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RestartService$restartService - _$Mutation$RestartService$restartServiceFromJson( - Map json) => - Mutation$RestartService$restartService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RestartService$restartServiceToJson( - Mutation$RestartService$restartService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$MoveService _$Variables$Mutation$MoveServiceFromJson( - Map json) => - Variables$Mutation$MoveService( - input: Input$MoveServiceInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$MoveServiceToJson( - Variables$Mutation$MoveService instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$MoveService _$Mutation$MoveServiceFromJson( - Map json) => - Mutation$MoveService( - moveService: Mutation$MoveService$moveService.fromJson( - json['moveService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MoveServiceToJson( - Mutation$MoveService instance) => - { - 'moveService': instance.moveService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$MoveService$moveService _$Mutation$MoveService$moveServiceFromJson( - Map json) => - Mutation$MoveService$moveService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - job: json['job'] == null - ? null - : Mutation$MoveService$moveService$job.fromJson( - json['job'] as Map), - ); - -Map _$Mutation$MoveService$moveServiceToJson( - Mutation$MoveService$moveService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'job': instance.job?.toJson(), - }; - -Mutation$MoveService$moveService$job - _$Mutation$MoveService$moveService$jobFromJson(Map json) => - Mutation$MoveService$moveService$job( - createdAt: dateTimeFromJson(json['createdAt']), - description: json['description'] as String, - error: json['error'] as String?, - finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), - name: json['name'] as String, - progress: json['progress'] as int?, - result: json['result'] as String?, - status: json['status'] as String, - statusText: json['statusText'] as String?, - uid: json['uid'] as String, - updatedAt: dateTimeFromJson(json['updatedAt']), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MoveService$moveService$jobToJson( - Mutation$MoveService$moveService$job instance) => - { - 'createdAt': dateTimeToJson(instance.createdAt), - 'description': instance.description, - 'error': instance.error, - 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), - 'name': instance.name, - 'progress': instance.progress, - 'result': instance.result, - 'status': instance.status, - 'statusText': instance.statusText, - 'uid': instance.uid, - 'updatedAt': dateTimeToJson(instance.updatedAt), - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 18a15aa9..dbc8eccc 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,23 +1,69 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; import 'services.graphql.dart'; -part 'users.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -25,36 +71,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -63,25 +137,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -89,24 +173,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -115,43 +200,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -159,56 +255,1704 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Fragment$userFields { - Fragment$userFields( - {required this.username, - required this.userType, - required this.sshKeys, - required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } @override - factory Fragment$userFields.fromJson(Map json) => - _$Fragment$userFieldsFromJson(json); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$userFields { + Fragment$userFields({ + required this.username, + required this.userType, + required this.sshKeys, + required this.$__typename, + }); + + factory Fragment$userFields.fromJson(Map json) { + final l$username = json['username']; + final l$userType = json['userType']; + final l$sshKeys = json['sshKeys']; + final l$$__typename = json['__typename']; + return Fragment$userFields( + username: (l$username as String), + userType: fromJson$Enum$UserType((l$userType as String)), + sshKeys: (l$sshKeys as List).map((e) => (e as String)).toList(), + $__typename: (l$$__typename as String), + ); + } final String username; - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) final Enum$UserType userType; final List sshKeys; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Fragment$userFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$username = username; + _resultData['username'] = l$username; + final l$userType = userType; + _resultData['userType'] = toJson$Enum$UserType(l$userType); + final l$sshKeys = sshKeys; + _resultData['sshKeys'] = l$sshKeys.map((e) => e).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$username = username; final l$userType = userType; @@ -218,60 +1962,80 @@ class Fragment$userFields { l$username, l$userType, Object.hashAll(l$sshKeys.map((v) => v)), - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) { return false; + } final l$username = username; final lOther$username = other.username; - if (l$username != lOther$username) return false; + if (l$username != lOther$username) { + return false; + } final l$userType = userType; final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; + if (l$userType != lOther$userType) { + return false; + } final l$sshKeys = sshKeys; final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; + if (l$sshKeys.length != lOther$sshKeys.length) { + return false; + } for (int i = 0; i < l$sshKeys.length; i++) { final l$sshKeys$entry = l$sshKeys[i]; final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + if (l$sshKeys$entry != lOther$sshKeys$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Fragment$userFields on Fragment$userFields { CopyWith$Fragment$userFields get copyWith => - CopyWith$Fragment$userFields(this, (i) => i); + CopyWith$Fragment$userFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$userFields { - factory CopyWith$Fragment$userFields(Fragment$userFields instance, - TRes Function(Fragment$userFields) then) = - _CopyWithImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields( + Fragment$userFields instance, + TRes Function(Fragment$userFields) then, + ) = _CopyWithImpl$Fragment$userFields; factory CopyWith$Fragment$userFields.stub(TRes res) = _CopyWithStubImpl$Fragment$userFields; - TRes call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}); + TRes call({ + String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename, + }); } class _CopyWithImpl$Fragment$userFields implements CopyWith$Fragment$userFields { - _CopyWithImpl$Fragment$userFields(this._instance, this._then); + _CopyWithImpl$Fragment$userFields( + this._instance, + this._then, + ); final Fragment$userFields _instance; @@ -279,24 +2043,26 @@ class _CopyWithImpl$Fragment$userFields static const _undefined = {}; - TRes call( - {Object? username = _undefined, - Object? userType = _undefined, - Object? sshKeys = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? username = _undefined, + Object? userType = _undefined, + Object? sshKeys = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$userFields( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + username: username == _undefined || username == null + ? _instance.username + : (username as String), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$userFields @@ -305,130 +2071,183 @@ class _CopyWithStubImpl$Fragment$userFields TRes _res; - call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}) => + call({ + String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename, + }) => _res; } const fragmentDefinitionuserFields = FragmentDefinitionNode( - name: NameNode(value: 'userFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'userFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'User'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentuserFields = DocumentNode(definitions: [ fragmentDefinitionuserFields, ]); extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { - void writeFragment$userFields( - {required Fragment$userFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$userFields({ + required Fragment$userFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'userFields', - document: documentNodeFragmentuserFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$userFields? readFragment$userFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'userFields', - document: documentNodeFragmentuserFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$userFields? readFragment$userFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$userFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$AllUsers { - Query$AllUsers({required this.users, required this.$__typename}); + Query$AllUsers({ + required this.users, + required this.$__typename, + }); - @override - factory Query$AllUsers.fromJson(Map json) => - _$Query$AllUsersFromJson(json); + factory Query$AllUsers.fromJson(Map json) { + final l$users = json['users']; + final l$$__typename = json['__typename']; + return Query$AllUsers( + users: Query$AllUsers$users.fromJson((l$users as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$AllUsers$users users; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllUsersToJson(this); + Map toJson() { + final _resultData = {}; + final l$users = users; + _resultData['users'] = l$users.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$users = users; final l$$__typename = $__typename; - return Object.hashAll([l$users, l$$__typename]); + return Object.hashAll([ + l$users, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) { return false; + } final l$users = users; final lOther$users = other.users; - if (l$users != lOther$users) return false; + if (l$users != lOther$users) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$AllUsers on Query$AllUsers { CopyWith$Query$AllUsers get copyWith => - CopyWith$Query$AllUsers(this, (i) => i); + CopyWith$Query$AllUsers( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllUsers { factory CopyWith$Query$AllUsers( - Query$AllUsers instance, TRes Function(Query$AllUsers) then) = - _CopyWithImpl$Query$AllUsers; + Query$AllUsers instance, + TRes Function(Query$AllUsers) then, + ) = _CopyWithImpl$Query$AllUsers; factory CopyWith$Query$AllUsers.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers; - TRes call({Query$AllUsers$users? users, String? $__typename}); + TRes call({ + Query$AllUsers$users? users, + String? $__typename, + }); CopyWith$Query$AllUsers$users get users; } class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers { - _CopyWithImpl$Query$AllUsers(this._instance, this._then); + _CopyWithImpl$Query$AllUsers( + this._instance, + this._then, + ); final Query$AllUsers _instance; @@ -436,14 +2255,18 @@ class _CopyWithImpl$Query$AllUsers static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? users = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllUsers( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$AllUsers$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + users: users == _undefined || users == null + ? _instance.users + : (users as Query$AllUsers$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$AllUsers$users get users { final local$users = _instance.users; return CopyWith$Query$AllUsers$users(local$users, (e) => call(users: e)); @@ -456,129 +2279,154 @@ class _CopyWithStubImpl$Query$AllUsers TRes _res; - call({Query$AllUsers$users? users, String? $__typename}) => _res; + call({ + Query$AllUsers$users? users, + String? $__typename, + }) => + _res; CopyWith$Query$AllUsers$users get users => CopyWith$Query$AllUsers$users.stub(_res); } const documentNodeQueryAllUsers = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'AllUsers'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'users'), + type: OperationType.query, + name: NameNode(value: 'AllUsers'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allUsers'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'allUsers'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: 'getUser'), + alias: NameNode(value: 'rootUser'), + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: StringValueNode( + value: 'root', + isBlock: false, + ), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'getUser'), - alias: NameNode(value: 'rootUser'), - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: StringValueNode(value: 'root', isBlock: false)) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionuserFields, ]); Query$AllUsers _parserFn$Query$AllUsers(Map data) => Query$AllUsers.fromJson(data); class Options$Query$AllUsers extends graphql.QueryOptions { - Options$Query$AllUsers( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryAllUsers, - parserFn: _parserFn$Query$AllUsers); + Options$Query$AllUsers({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllUsers, + parserFn: _parserFn$Query$AllUsers, + ); } class WatchOptions$Query$AllUsers extends graphql.WatchQueryOptions { - WatchOptions$Query$AllUsers( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryAllUsers, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$AllUsers); + WatchOptions$Query$AllUsers({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllUsers, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllUsers, + ); } class FetchMoreOptions$Query$AllUsers extends graphql.FetchMoreOptions { FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); + : super( + updateQuery: updateQuery, + document: documentNodeQueryAllUsers, + ); } extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { @@ -588,89 +2436,133 @@ extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$AllUsers( [WatchOptions$Query$AllUsers? options]) => this.watchQuery(options ?? WatchOptions$Query$AllUsers()); - void writeQuery$AllUsers( - {required Query$AllUsers data, bool broadcast = true}) => + void writeQuery$AllUsers({ + required Query$AllUsers data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryAllUsers)), - data: data.toJson(), - broadcast: broadcast); - Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryAllUsers)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllUsers)), + optimistic: optimistic, + ); return result == null ? null : Query$AllUsers.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$AllUsers$users { - Query$AllUsers$users( - {required this.allUsers, this.rootUser, required this.$__typename}); + Query$AllUsers$users({ + required this.allUsers, + this.rootUser, + required this.$__typename, + }); - @override - factory Query$AllUsers$users.fromJson(Map json) => - _$Query$AllUsers$usersFromJson(json); + factory Query$AllUsers$users.fromJson(Map json) { + final l$allUsers = json['allUsers']; + final l$rootUser = json['rootUser']; + final l$$__typename = json['__typename']; + return Query$AllUsers$users( + allUsers: (l$allUsers as List) + .map((e) => Fragment$userFields.fromJson((e as Map))) + .toList(), + rootUser: l$rootUser == null + ? null + : Fragment$userFields.fromJson((l$rootUser as Map)), + $__typename: (l$$__typename as String), + ); + } final List allUsers; final Fragment$userFields? rootUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllUsers$usersToJson(this); + Map toJson() { + final _resultData = {}; + final l$allUsers = allUsers; + _resultData['allUsers'] = l$allUsers.map((e) => e.toJson()).toList(); + final l$rootUser = rootUser; + _resultData['rootUser'] = l$rootUser?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$allUsers = allUsers; final l$rootUser = rootUser; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$allUsers.map((v) => v)), l$rootUser, l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$allUsers.map((v) => v)), + l$rootUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) { return false; + } final l$allUsers = allUsers; final lOther$allUsers = other.allUsers; - if (l$allUsers.length != lOther$allUsers.length) return false; + if (l$allUsers.length != lOther$allUsers.length) { + return false; + } for (int i = 0; i < l$allUsers.length; i++) { final l$allUsers$entry = l$allUsers[i]; final lOther$allUsers$entry = lOther$allUsers[i]; - if (l$allUsers$entry != lOther$allUsers$entry) return false; + if (l$allUsers$entry != lOther$allUsers$entry) { + return false; + } } - final l$rootUser = rootUser; final lOther$rootUser = other.rootUser; - if (l$rootUser != lOther$rootUser) return false; + if (l$rootUser != lOther$rootUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { CopyWith$Query$AllUsers$users get copyWith => - CopyWith$Query$AllUsers$users(this, (i) => i); + CopyWith$Query$AllUsers$users( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllUsers$users { - factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, - TRes Function(Query$AllUsers$users) then) = - _CopyWithImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users( + Query$AllUsers$users instance, + TRes Function(Query$AllUsers$users) then, + ) = _CopyWithImpl$Query$AllUsers$users; factory CopyWith$Query$AllUsers$users.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers$users; - TRes call( - {List? allUsers, - Fragment$userFields? rootUser, - String? $__typename}); + TRes call({ + List? allUsers, + Fragment$userFields? rootUser, + String? $__typename, + }); TRes allUsers( Iterable Function( Iterable>) @@ -680,7 +2572,10 @@ abstract class CopyWith$Query$AllUsers$users { class _CopyWithImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { - _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); + _CopyWithImpl$Query$AllUsers$users( + this._instance, + this._then, + ); final Query$AllUsers$users _instance; @@ -688,27 +2583,32 @@ class _CopyWithImpl$Query$AllUsers$users static const _undefined = {}; - TRes call( - {Object? allUsers = _undefined, - Object? rootUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? allUsers = _undefined, + Object? rootUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllUsers$users( - allUsers: allUsers == _undefined || allUsers == null - ? _instance.allUsers - : (allUsers as List), - rootUser: rootUser == _undefined - ? _instance.rootUser - : (rootUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + allUsers: allUsers == _undefined || allUsers == null + ? _instance.allUsers + : (allUsers as List), + rootUser: rootUser == _undefined + ? _instance.rootUser + : (rootUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes allUsers( Iterable Function( Iterable>) _fn) => call( - allUsers: _fn(_instance.allUsers - .map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); + allUsers: + _fn(_instance.allUsers.map((e) => CopyWith$Fragment$userFields( + e, + (i) => i, + ))).toList()); CopyWith$Fragment$userFields get rootUser { final local$rootUser = _instance.rootUser; return local$rootUser == null @@ -724,51 +2624,76 @@ class _CopyWithStubImpl$Query$AllUsers$users TRes _res; - call( - {List? allUsers, - Fragment$userFields? rootUser, - String? $__typename}) => + call({ + List? allUsers, + Fragment$userFields? rootUser, + String? $__typename, + }) => _res; allUsers(_fn) => _res; CopyWith$Fragment$userFields get rootUser => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Query$GetUser { - Variables$Query$GetUser({required this.username}); + factory Variables$Query$GetUser({required String username}) => + Variables$Query$GetUser._({ + r'username': username, + }); + + Variables$Query$GetUser._(this._$data); + + factory Variables$Query$GetUser.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + return Variables$Query$GetUser._(result$data); + } + + Map _$data; + + String get username => (_$data['username'] as String); + Map toJson() { + final result$data = {}; + final l$username = username; + result$data['username'] = l$username; + return result$data; + } + + CopyWith$Variables$Query$GetUser get copyWith => + CopyWith$Variables$Query$GetUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Query$GetUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + return true; + } @override - factory Variables$Query$GetUser.fromJson(Map json) => - _$Variables$Query$GetUserFromJson(json); - - final String username; - - Map toJson() => _$Variables$Query$GetUserToJson(this); int get hashCode { final l$username = username; return Object.hashAll([l$username]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) - return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - return true; - } - - CopyWith$Variables$Query$GetUser get copyWith => - CopyWith$Variables$Query$GetUser(this, (i) => i); } abstract class CopyWith$Variables$Query$GetUser { - factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, - TRes Function(Variables$Query$GetUser) then) = - _CopyWithImpl$Variables$Query$GetUser; + factory CopyWith$Variables$Query$GetUser( + Variables$Query$GetUser instance, + TRes Function(Variables$Query$GetUser) then, + ) = _CopyWithImpl$Variables$Query$GetUser; factory CopyWith$Variables$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Variables$Query$GetUser; @@ -778,7 +2703,10 @@ abstract class CopyWith$Variables$Query$GetUser { class _CopyWithImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { - _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); + _CopyWithImpl$Variables$Query$GetUser( + this._instance, + this._then, + ); final Variables$Query$GetUser _instance; @@ -786,10 +2714,12 @@ class _CopyWithImpl$Variables$Query$GetUser static const _undefined = {}; - TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( - username: username == _undefined || username == null - ? _instance.username - : (username as String))); + TRes call({Object? username = _undefined}) => + _then(Variables$Query$GetUser._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + })); } class _CopyWithStubImpl$Variables$Query$GetUser @@ -801,61 +2731,95 @@ class _CopyWithStubImpl$Variables$Query$GetUser call({String? username}) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetUser { - Query$GetUser({required this.users, required this.$__typename}); + Query$GetUser({ + required this.users, + required this.$__typename, + }); - @override - factory Query$GetUser.fromJson(Map json) => - _$Query$GetUserFromJson(json); + factory Query$GetUser.fromJson(Map json) { + final l$users = json['users']; + final l$$__typename = json['__typename']; + return Query$GetUser( + users: Query$GetUser$users.fromJson((l$users as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$GetUser$users users; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$users = users; + _resultData['users'] = l$users.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$users = users; final l$$__typename = $__typename; - return Object.hashAll([l$users, l$$__typename]); + return Object.hashAll([ + l$users, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetUser) || runtimeType != other.runtimeType) { return false; + } final l$users = users; final lOther$users = other.users; - if (l$users != lOther$users) return false; + if (l$users != lOther$users) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetUser on Query$GetUser { - CopyWith$Query$GetUser get copyWith => - CopyWith$Query$GetUser(this, (i) => i); + CopyWith$Query$GetUser get copyWith => CopyWith$Query$GetUser( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetUser { factory CopyWith$Query$GetUser( - Query$GetUser instance, TRes Function(Query$GetUser) then) = - _CopyWithImpl$Query$GetUser; + Query$GetUser instance, + TRes Function(Query$GetUser) then, + ) = _CopyWithImpl$Query$GetUser; factory CopyWith$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Query$GetUser; - TRes call({Query$GetUser$users? users, String? $__typename}); + TRes call({ + Query$GetUser$users? users, + String? $__typename, + }); CopyWith$Query$GetUser$users get users; } class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser { - _CopyWithImpl$Query$GetUser(this._instance, this._then); + _CopyWithImpl$Query$GetUser( + this._instance, + this._then, + ); final Query$GetUser _instance; @@ -863,14 +2827,18 @@ class _CopyWithImpl$Query$GetUser static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? users = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetUser( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$GetUser$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + users: users == _undefined || users == null + ? _instance.users + : (users as Query$GetUser$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetUser$users get users { final local$users = _instance.users; return CopyWith$Query$GetUser$users(local$users, (e) => call(users: e)); @@ -883,130 +2851,149 @@ class _CopyWithStubImpl$Query$GetUser TRes _res; - call({Query$GetUser$users? users, String? $__typename}) => _res; + call({ + Query$GetUser$users? users, + String? $__typename, + }) => + _res; CopyWith$Query$GetUser$users get users => CopyWith$Query$GetUser$users.stub(_res); } const documentNodeQueryGetUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'username')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'users'), + type: OperationType.query, + name: NameNode(value: 'GetUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getUser'), alias: null, - arguments: [], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username')), + ) + ], directives: [], selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'getUser'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: VariableNode(name: NameNode(value: 'username'))) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionuserFields, ]); Query$GetUser _parserFn$Query$GetUser(Map data) => Query$GetUser.fromJson(data); class Options$Query$GetUser extends graphql.QueryOptions { - Options$Query$GetUser( - {String? operationName, - required Variables$Query$GetUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetUser, - parserFn: _parserFn$Query$GetUser); + Options$Query$GetUser({ + String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetUser, + parserFn: _parserFn$Query$GetUser, + ); } class WatchOptions$Query$GetUser extends graphql.WatchQueryOptions { - WatchOptions$Query$GetUser( - {String? operationName, - required Variables$Query$GetUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetUser); + WatchOptions$Query$GetUser({ + String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetUser, + ); } class FetchMoreOptions$Query$GetUser extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetUser( - {required graphql.UpdateQuery updateQuery, - required Variables$Query$GetUser variables}) - : super( - updateQuery: updateQuery, - variables: variables.toJson(), - document: documentNodeQueryGetUser); + FetchMoreOptions$Query$GetUser({ + required graphql.UpdateQuery updateQuery, + required Variables$Query$GetUser variables, + }) : super( + updateQuery: updateQuery, + variables: variables.toJson(), + document: documentNodeQueryGetUser, + ); } extension ClientExtension$Query$GetUser on graphql.GraphQLClient { @@ -1016,82 +3003,126 @@ extension ClientExtension$Query$GetUser on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetUser( WatchOptions$Query$GetUser options) => this.watchQuery(options); - void writeQuery$GetUser( - {required Query$GetUser data, - required Variables$Query$GetUser variables, - bool broadcast = true}) => + void writeQuery$GetUser({ + required Query$GetUser data, + required Variables$Query$GetUser variables, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), - data: data.toJson(), - broadcast: broadcast); - Query$GetUser? readQuery$GetUser( - {required Variables$Query$GetUser variables, bool optimistic = true}) { - final result = this.readQuery( graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), - optimistic: optimistic); + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson(), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetUser? readQuery$GetUser({ + required Variables$Query$GetUser variables, + bool optimistic = true, + }) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson(), + ), + optimistic: optimistic, + ); return result == null ? null : Query$GetUser.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetUser$users { - Query$GetUser$users({this.getUser, required this.$__typename}); + Query$GetUser$users({ + this.getUser, + required this.$__typename, + }); - @override - factory Query$GetUser$users.fromJson(Map json) => - _$Query$GetUser$usersFromJson(json); + factory Query$GetUser$users.fromJson(Map json) { + final l$getUser = json['getUser']; + final l$$__typename = json['__typename']; + return Query$GetUser$users( + getUser: l$getUser == null + ? null + : Fragment$userFields.fromJson((l$getUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Fragment$userFields? getUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetUser$usersToJson(this); + Map toJson() { + final _resultData = {}; + final l$getUser = getUser; + _resultData['getUser'] = l$getUser?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getUser = getUser; final l$$__typename = $__typename; - return Object.hashAll([l$getUser, l$$__typename]); + return Object.hashAll([ + l$getUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) { return false; + } final l$getUser = getUser; final lOther$getUser = other.getUser; - if (l$getUser != lOther$getUser) return false; + if (l$getUser != lOther$getUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { CopyWith$Query$GetUser$users get copyWith => - CopyWith$Query$GetUser$users(this, (i) => i); + CopyWith$Query$GetUser$users( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetUser$users { - factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, - TRes Function(Query$GetUser$users) then) = - _CopyWithImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users( + Query$GetUser$users instance, + TRes Function(Query$GetUser$users) then, + ) = _CopyWithImpl$Query$GetUser$users; factory CopyWith$Query$GetUser$users.stub(TRes res) = _CopyWithStubImpl$Query$GetUser$users; - TRes call({Fragment$userFields? getUser, String? $__typename}); + TRes call({ + Fragment$userFields? getUser, + String? $__typename, + }); CopyWith$Fragment$userFields get getUser; } class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { - _CopyWithImpl$Query$GetUser$users(this._instance, this._then); + _CopyWithImpl$Query$GetUser$users( + this._instance, + this._then, + ); final Query$GetUser$users _instance; @@ -1099,14 +3130,18 @@ class _CopyWithImpl$Query$GetUser$users static const _undefined = {}; - TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? getUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetUser$users( - getUser: getUser == _undefined - ? _instance.getUser - : (getUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getUser: getUser == _undefined + ? _instance.getUser + : (getUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Fragment$userFields get getUser { final local$getUser = _instance.getUser; return local$getUser == null @@ -1121,47 +3156,77 @@ class _CopyWithStubImpl$Query$GetUser$users TRes _res; - call({Fragment$userFields? getUser, String? $__typename}) => _res; + call({ + Fragment$userFields? getUser, + String? $__typename, + }) => + _res; CopyWith$Fragment$userFields get getUser => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$CreateUser { - Variables$Mutation$CreateUser({required this.user}); + factory Variables$Mutation$CreateUser( + {required Input$UserMutationInput user}) => + Variables$Mutation$CreateUser._({ + r'user': user, + }); + + Variables$Mutation$CreateUser._(this._$data); + + factory Variables$Mutation$CreateUser.fromJson(Map data) { + final result$data = {}; + final l$user = data['user']; + result$data['user'] = + Input$UserMutationInput.fromJson((l$user as Map)); + return Variables$Mutation$CreateUser._(result$data); + } + + Map _$data; + + Input$UserMutationInput get user => + (_$data['user'] as Input$UserMutationInput); + Map toJson() { + final result$data = {}; + final l$user = user; + result$data['user'] = l$user.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$CreateUser + get copyWith => CopyWith$Variables$Mutation$CreateUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$CreateUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) { + return false; + } + return true; + } @override - factory Variables$Mutation$CreateUser.fromJson(Map json) => - _$Variables$Mutation$CreateUserFromJson(json); - - final Input$UserMutationInput user; - - Map toJson() => _$Variables$Mutation$CreateUserToJson(this); int get hashCode { final l$user = user; return Object.hashAll([l$user]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$CreateUser) || - runtimeType != other.runtimeType) return false; - final l$user = user; - final lOther$user = other.user; - if (l$user != lOther$user) return false; - return true; - } - - CopyWith$Variables$Mutation$CreateUser - get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$CreateUser { factory CopyWith$Variables$Mutation$CreateUser( - Variables$Mutation$CreateUser instance, - TRes Function(Variables$Mutation$CreateUser) then) = - _CopyWithImpl$Variables$Mutation$CreateUser; + Variables$Mutation$CreateUser instance, + TRes Function(Variables$Mutation$CreateUser) then, + ) = _CopyWithImpl$Variables$Mutation$CreateUser; factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$CreateUser; @@ -1171,7 +3236,10 @@ abstract class CopyWith$Variables$Mutation$CreateUser { class _CopyWithImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { - _CopyWithImpl$Variables$Mutation$CreateUser(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$CreateUser( + this._instance, + this._then, + ); final Variables$Mutation$CreateUser _instance; @@ -1179,10 +3247,12 @@ class _CopyWithImpl$Variables$Mutation$CreateUser static const _undefined = {}; - TRes call({Object? user = _undefined}) => _then(Variables$Mutation$CreateUser( - user: user == _undefined || user == null - ? _instance.user - : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => + _then(Variables$Mutation$CreateUser._({ + ..._instance._$data, + if (user != _undefined && user != null) + 'user': (user as Input$UserMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$CreateUser @@ -1194,61 +3264,97 @@ class _CopyWithStubImpl$Variables$Mutation$CreateUser call({Input$UserMutationInput? user}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$CreateUser { - Mutation$CreateUser({required this.createUser, required this.$__typename}); + Mutation$CreateUser({ + required this.createUser, + required this.$__typename, + }); - @override - factory Mutation$CreateUser.fromJson(Map json) => - _$Mutation$CreateUserFromJson(json); + factory Mutation$CreateUser.fromJson(Map json) { + final l$createUser = json['createUser']; + final l$$__typename = json['__typename']; + return Mutation$CreateUser( + createUser: Mutation$CreateUser$createUser.fromJson( + (l$createUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$CreateUser$createUser createUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$CreateUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$createUser = createUser; + _resultData['createUser'] = l$createUser.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createUser = createUser; final l$$__typename = $__typename; - return Object.hashAll([l$createUser, l$$__typename]); + return Object.hashAll([ + l$createUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) { return false; + } final l$createUser = createUser; final lOther$createUser = other.createUser; - if (l$createUser != lOther$createUser) return false; + if (l$createUser != lOther$createUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { CopyWith$Mutation$CreateUser get copyWith => - CopyWith$Mutation$CreateUser(this, (i) => i); + CopyWith$Mutation$CreateUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$CreateUser { - factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, - TRes Function(Mutation$CreateUser) then) = - _CopyWithImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser( + Mutation$CreateUser instance, + TRes Function(Mutation$CreateUser) then, + ) = _CopyWithImpl$Mutation$CreateUser; factory CopyWith$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser; - TRes call({Mutation$CreateUser$createUser? createUser, String? $__typename}); + TRes call({ + Mutation$CreateUser$createUser? createUser, + String? $__typename, + }); CopyWith$Mutation$CreateUser$createUser get createUser; } class _CopyWithImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { - _CopyWithImpl$Mutation$CreateUser(this._instance, this._then); + _CopyWithImpl$Mutation$CreateUser( + this._instance, + this._then, + ); final Mutation$CreateUser _instance; @@ -1256,16 +3362,18 @@ class _CopyWithImpl$Mutation$CreateUser static const _undefined = {}; - TRes call( - {Object? createUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$CreateUser( - createUser: createUser == _undefined || createUser == null - ? _instance.createUser - : (createUser as Mutation$CreateUser$createUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createUser: createUser == _undefined || createUser == null + ? _instance.createUser + : (createUser as Mutation$CreateUser$createUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$CreateUser$createUser get createUser { final local$createUser = _instance.createUser; return CopyWith$Mutation$CreateUser$createUser( @@ -1279,7 +3387,10 @@ class _CopyWithStubImpl$Mutation$CreateUser TRes _res; - call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => + call({ + Mutation$CreateUser$createUser? createUser, + String? $__typename, + }) => _res; CopyWith$Mutation$CreateUser$createUser get createUser => CopyWith$Mutation$CreateUser$createUser.stub(_res); @@ -1287,98 +3398,116 @@ class _CopyWithStubImpl$Mutation$CreateUser const documentNodeMutationCreateUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'CreateUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode( - name: NameNode(value: 'UserMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createUser'), + type: OperationType.mutation, + name: NameNode(value: 'CreateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'user'), - value: VariableNode(name: NameNode(value: 'user'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( - dynamic, Mutation$CreateUser?); + dynamic, + Mutation$CreateUser?, +); class Options$Mutation$CreateUser extends graphql.MutationOptions { - Options$Mutation$CreateUser( - {String? operationName, - required Variables$Mutation$CreateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$CreateUser? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$CreateUser({ + String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$CreateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$CreateUser(data)), - update: update, - onError: onError, - document: documentNodeMutationCreateUser, - parserFn: _parserFn$Mutation$CreateUser); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$CreateUser(data), + ), + update: update, + onError: onError, + document: documentNodeMutationCreateUser, + parserFn: _parserFn$Mutation$CreateUser, + ); final OnMutationCompleted$Mutation$CreateUser? onCompletedWithParsed; @@ -1387,38 +3516,39 @@ class Options$Mutation$CreateUser ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$CreateUser extends graphql.WatchQueryOptions { - WatchOptions$Mutation$CreateUser( - {String? operationName, - required Variables$Mutation$CreateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationCreateUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$CreateUser); + WatchOptions$Mutation$CreateUser({ + String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationCreateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$CreateUser, + ); } extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { @@ -1430,19 +3560,32 @@ extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$CreateUser$createUser - implements Fragment$basicMutationReturnFields { - Mutation$CreateUser$createUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$CreateUser$createUser({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override - factory Mutation$CreateUser$createUser.fromJson(Map json) => - _$Mutation$CreateUser$createUserFromJson(json); + factory Mutation$CreateUser$createUser.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$CreateUser$createUser( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -1450,42 +3593,75 @@ class Mutation$CreateUser$createUser final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => _$Mutation$CreateUser$createUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$CreateUser$createUser) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -1493,30 +3669,37 @@ class Mutation$CreateUser$createUser extension UtilityExtension$Mutation$CreateUser$createUser on Mutation$CreateUser$createUser { CopyWith$Mutation$CreateUser$createUser - get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); + get copyWith => CopyWith$Mutation$CreateUser$createUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$CreateUser$createUser { factory CopyWith$Mutation$CreateUser$createUser( - Mutation$CreateUser$createUser instance, - TRes Function(Mutation$CreateUser$createUser) then) = - _CopyWithImpl$Mutation$CreateUser$createUser; + Mutation$CreateUser$createUser instance, + TRes Function(Mutation$CreateUser$createUser) then, + ) = _CopyWithImpl$Mutation$CreateUser$createUser; factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser$createUser; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { - _CopyWithImpl$Mutation$CreateUser$createUser(this._instance, this._then); + _CopyWithImpl$Mutation$CreateUser$createUser( + this._instance, + this._then, + ); final Mutation$CreateUser$createUser _instance; @@ -1524,28 +3707,29 @@ class _CopyWithImpl$Mutation$CreateUser$createUser static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$CreateUser$createUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -1560,53 +3744,77 @@ class _CopyWithStubImpl$Mutation$CreateUser$createUser TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$DeleteUser { - Variables$Mutation$DeleteUser({required this.username}); + factory Variables$Mutation$DeleteUser({required String username}) => + Variables$Mutation$DeleteUser._({ + r'username': username, + }); + + Variables$Mutation$DeleteUser._(this._$data); + + factory Variables$Mutation$DeleteUser.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + return Variables$Mutation$DeleteUser._(result$data); + } + + Map _$data; + + String get username => (_$data['username'] as String); + Map toJson() { + final result$data = {}; + final l$username = username; + result$data['username'] = l$username; + return result$data; + } + + CopyWith$Variables$Mutation$DeleteUser + get copyWith => CopyWith$Variables$Mutation$DeleteUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$DeleteUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + return true; + } @override - factory Variables$Mutation$DeleteUser.fromJson(Map json) => - _$Variables$Mutation$DeleteUserFromJson(json); - - final String username; - - Map toJson() => _$Variables$Mutation$DeleteUserToJson(this); int get hashCode { final l$username = username; return Object.hashAll([l$username]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DeleteUser) || - runtimeType != other.runtimeType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - return true; - } - - CopyWith$Variables$Mutation$DeleteUser - get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$DeleteUser { factory CopyWith$Variables$Mutation$DeleteUser( - Variables$Mutation$DeleteUser instance, - TRes Function(Variables$Mutation$DeleteUser) then) = - _CopyWithImpl$Variables$Mutation$DeleteUser; + Variables$Mutation$DeleteUser instance, + TRes Function(Variables$Mutation$DeleteUser) then, + ) = _CopyWithImpl$Variables$Mutation$DeleteUser; factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DeleteUser; @@ -1616,7 +3824,10 @@ abstract class CopyWith$Variables$Mutation$DeleteUser { class _CopyWithImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { - _CopyWithImpl$Variables$Mutation$DeleteUser(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$DeleteUser( + this._instance, + this._then, + ); final Variables$Mutation$DeleteUser _instance; @@ -1624,11 +3835,12 @@ class _CopyWithImpl$Variables$Mutation$DeleteUser static const _undefined = {}; - TRes call({Object? username = _undefined}) => _then( - Variables$Mutation$DeleteUser( - username: username == _undefined || username == null - ? _instance.username - : (username as String))); + TRes call({Object? username = _undefined}) => + _then(Variables$Mutation$DeleteUser._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + })); } class _CopyWithStubImpl$Variables$Mutation$DeleteUser @@ -1640,61 +3852,97 @@ class _CopyWithStubImpl$Variables$Mutation$DeleteUser call({String? username}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteUser { - Mutation$DeleteUser({required this.deleteUser, required this.$__typename}); + Mutation$DeleteUser({ + required this.deleteUser, + required this.$__typename, + }); - @override - factory Mutation$DeleteUser.fromJson(Map json) => - _$Mutation$DeleteUserFromJson(json); + factory Mutation$DeleteUser.fromJson(Map json) { + final l$deleteUser = json['deleteUser']; + final l$$__typename = json['__typename']; + return Mutation$DeleteUser( + deleteUser: Mutation$DeleteUser$deleteUser.fromJson( + (l$deleteUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$DeleteUser$deleteUser deleteUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DeleteUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$deleteUser = deleteUser; + _resultData['deleteUser'] = l$deleteUser.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$deleteUser = deleteUser; final l$$__typename = $__typename; - return Object.hashAll([l$deleteUser, l$$__typename]); + return Object.hashAll([ + l$deleteUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) { return false; + } final l$deleteUser = deleteUser; final lOther$deleteUser = other.deleteUser; - if (l$deleteUser != lOther$deleteUser) return false; + if (l$deleteUser != lOther$deleteUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { CopyWith$Mutation$DeleteUser get copyWith => - CopyWith$Mutation$DeleteUser(this, (i) => i); + CopyWith$Mutation$DeleteUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteUser { - factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, - TRes Function(Mutation$DeleteUser) then) = - _CopyWithImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser( + Mutation$DeleteUser instance, + TRes Function(Mutation$DeleteUser) then, + ) = _CopyWithImpl$Mutation$DeleteUser; factory CopyWith$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser; - TRes call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}); + TRes call({ + Mutation$DeleteUser$deleteUser? deleteUser, + String? $__typename, + }); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser; } class _CopyWithImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { - _CopyWithImpl$Mutation$DeleteUser(this._instance, this._then); + _CopyWithImpl$Mutation$DeleteUser( + this._instance, + this._then, + ); final Mutation$DeleteUser _instance; @@ -1702,16 +3950,18 @@ class _CopyWithImpl$Mutation$DeleteUser static const _undefined = {}; - TRes call( - {Object? deleteUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? deleteUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteUser( - deleteUser: deleteUser == _undefined || deleteUser == null - ? _instance.deleteUser - : (deleteUser as Mutation$DeleteUser$deleteUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + deleteUser: deleteUser == _undefined || deleteUser == null + ? _instance.deleteUser + : (deleteUser as Mutation$DeleteUser$deleteUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser { final local$deleteUser = _instance.deleteUser; return CopyWith$Mutation$DeleteUser$deleteUser( @@ -1725,7 +3975,10 @@ class _CopyWithStubImpl$Mutation$DeleteUser TRes _res; - call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => + call({ + Mutation$DeleteUser$deleteUser? deleteUser, + String? $__typename, + }) => _res; CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); @@ -1733,82 +3986,96 @@ class _CopyWithStubImpl$Mutation$DeleteUser const documentNodeMutationDeleteUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'DeleteUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'username')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'deleteUser'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: VariableNode(name: NameNode(value: 'username'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'DeleteUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => Mutation$DeleteUser.fromJson(data); typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( - dynamic, Mutation$DeleteUser?); + dynamic, + Mutation$DeleteUser?, +); class Options$Mutation$DeleteUser extends graphql.MutationOptions { - Options$Mutation$DeleteUser( - {String? operationName, - required Variables$Mutation$DeleteUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$DeleteUser? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$DeleteUser({ + String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$DeleteUser(data)), - update: update, - onError: onError, - document: documentNodeMutationDeleteUser, - parserFn: _parserFn$Mutation$DeleteUser); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$DeleteUser(data), + ), + update: update, + onError: onError, + document: documentNodeMutationDeleteUser, + parserFn: _parserFn$Mutation$DeleteUser, + ); final OnMutationCompleted$Mutation$DeleteUser? onCompletedWithParsed; @@ -1817,38 +4084,39 @@ class Options$Mutation$DeleteUser ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$DeleteUser extends graphql.WatchQueryOptions { - WatchOptions$Mutation$DeleteUser( - {String? operationName, - required Variables$Mutation$DeleteUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationDeleteUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$DeleteUser); + WatchOptions$Mutation$DeleteUser({ + String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteUser, + ); } extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { @@ -1860,18 +4128,27 @@ extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteUser$deleteUser - implements Fragment$basicMutationReturnFields { - Mutation$DeleteUser$deleteUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$DeleteUser$deleteUser({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => - _$Mutation$DeleteUser$deleteUserFromJson(json); + factory Mutation$DeleteUser$deleteUser.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$DeleteUser$deleteUser( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1879,35 +4156,64 @@ class Mutation$DeleteUser$deleteUser final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DeleteUser$deleteUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DeleteUser$deleteUser) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1915,24 +4221,35 @@ class Mutation$DeleteUser$deleteUser extension UtilityExtension$Mutation$DeleteUser$deleteUser on Mutation$DeleteUser$deleteUser { CopyWith$Mutation$DeleteUser$deleteUser - get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); + get copyWith => CopyWith$Mutation$DeleteUser$deleteUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteUser$deleteUser { factory CopyWith$Mutation$DeleteUser$deleteUser( - Mutation$DeleteUser$deleteUser instance, - TRes Function(Mutation$DeleteUser$deleteUser) then) = - _CopyWithImpl$Mutation$DeleteUser$deleteUser; + Mutation$DeleteUser$deleteUser instance, + TRes Function(Mutation$DeleteUser$deleteUser) then, + ) = _CopyWithImpl$Mutation$DeleteUser$deleteUser; factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { - _CopyWithImpl$Mutation$DeleteUser$deleteUser(this._instance, this._then); + _CopyWithImpl$Mutation$DeleteUser$deleteUser( + this._instance, + this._then, + ); final Mutation$DeleteUser$deleteUser _instance; @@ -1940,24 +4257,25 @@ class _CopyWithImpl$Mutation$DeleteUser$deleteUser static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteUser$deleteUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser @@ -1966,46 +4284,77 @@ class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$UpdateUser { - Variables$Mutation$UpdateUser({required this.user}); + factory Variables$Mutation$UpdateUser( + {required Input$UserMutationInput user}) => + Variables$Mutation$UpdateUser._({ + r'user': user, + }); + + Variables$Mutation$UpdateUser._(this._$data); + + factory Variables$Mutation$UpdateUser.fromJson(Map data) { + final result$data = {}; + final l$user = data['user']; + result$data['user'] = + Input$UserMutationInput.fromJson((l$user as Map)); + return Variables$Mutation$UpdateUser._(result$data); + } + + Map _$data; + + Input$UserMutationInput get user => + (_$data['user'] as Input$UserMutationInput); + Map toJson() { + final result$data = {}; + final l$user = user; + result$data['user'] = l$user.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$UpdateUser + get copyWith => CopyWith$Variables$Mutation$UpdateUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$UpdateUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) { + return false; + } + return true; + } @override - factory Variables$Mutation$UpdateUser.fromJson(Map json) => - _$Variables$Mutation$UpdateUserFromJson(json); - - final Input$UserMutationInput user; - - Map toJson() => _$Variables$Mutation$UpdateUserToJson(this); int get hashCode { final l$user = user; return Object.hashAll([l$user]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UpdateUser) || - runtimeType != other.runtimeType) return false; - final l$user = user; - final lOther$user = other.user; - if (l$user != lOther$user) return false; - return true; - } - - CopyWith$Variables$Mutation$UpdateUser - get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$UpdateUser { factory CopyWith$Variables$Mutation$UpdateUser( - Variables$Mutation$UpdateUser instance, - TRes Function(Variables$Mutation$UpdateUser) then) = - _CopyWithImpl$Variables$Mutation$UpdateUser; + Variables$Mutation$UpdateUser instance, + TRes Function(Variables$Mutation$UpdateUser) then, + ) = _CopyWithImpl$Variables$Mutation$UpdateUser; factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UpdateUser; @@ -2015,7 +4364,10 @@ abstract class CopyWith$Variables$Mutation$UpdateUser { class _CopyWithImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { - _CopyWithImpl$Variables$Mutation$UpdateUser(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$UpdateUser( + this._instance, + this._then, + ); final Variables$Mutation$UpdateUser _instance; @@ -2023,10 +4375,12 @@ class _CopyWithImpl$Variables$Mutation$UpdateUser static const _undefined = {}; - TRes call({Object? user = _undefined}) => _then(Variables$Mutation$UpdateUser( - user: user == _undefined || user == null - ? _instance.user - : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => + _then(Variables$Mutation$UpdateUser._({ + ..._instance._$data, + if (user != _undefined && user != null) + 'user': (user as Input$UserMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$UpdateUser @@ -2038,61 +4392,97 @@ class _CopyWithStubImpl$Variables$Mutation$UpdateUser call({Input$UserMutationInput? user}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$UpdateUser { - Mutation$UpdateUser({required this.updateUser, required this.$__typename}); + Mutation$UpdateUser({ + required this.updateUser, + required this.$__typename, + }); - @override - factory Mutation$UpdateUser.fromJson(Map json) => - _$Mutation$UpdateUserFromJson(json); + factory Mutation$UpdateUser.fromJson(Map json) { + final l$updateUser = json['updateUser']; + final l$$__typename = json['__typename']; + return Mutation$UpdateUser( + updateUser: Mutation$UpdateUser$updateUser.fromJson( + (l$updateUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$UpdateUser$updateUser updateUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UpdateUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$updateUser = updateUser; + _resultData['updateUser'] = l$updateUser.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$updateUser = updateUser; final l$$__typename = $__typename; - return Object.hashAll([l$updateUser, l$$__typename]); + return Object.hashAll([ + l$updateUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) { return false; + } final l$updateUser = updateUser; final lOther$updateUser = other.updateUser; - if (l$updateUser != lOther$updateUser) return false; + if (l$updateUser != lOther$updateUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { CopyWith$Mutation$UpdateUser get copyWith => - CopyWith$Mutation$UpdateUser(this, (i) => i); + CopyWith$Mutation$UpdateUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UpdateUser { - factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, - TRes Function(Mutation$UpdateUser) then) = - _CopyWithImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser( + Mutation$UpdateUser instance, + TRes Function(Mutation$UpdateUser) then, + ) = _CopyWithImpl$Mutation$UpdateUser; factory CopyWith$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser; - TRes call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}); + TRes call({ + Mutation$UpdateUser$updateUser? updateUser, + String? $__typename, + }); CopyWith$Mutation$UpdateUser$updateUser get updateUser; } class _CopyWithImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { - _CopyWithImpl$Mutation$UpdateUser(this._instance, this._then); + _CopyWithImpl$Mutation$UpdateUser( + this._instance, + this._then, + ); final Mutation$UpdateUser _instance; @@ -2100,16 +4490,18 @@ class _CopyWithImpl$Mutation$UpdateUser static const _undefined = {}; - TRes call( - {Object? updateUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? updateUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UpdateUser( - updateUser: updateUser == _undefined || updateUser == null - ? _instance.updateUser - : (updateUser as Mutation$UpdateUser$updateUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + updateUser: updateUser == _undefined || updateUser == null + ? _instance.updateUser + : (updateUser as Mutation$UpdateUser$updateUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$UpdateUser$updateUser get updateUser { final local$updateUser = _instance.updateUser; return CopyWith$Mutation$UpdateUser$updateUser( @@ -2123,7 +4515,10 @@ class _CopyWithStubImpl$Mutation$UpdateUser TRes _res; - call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => + call({ + Mutation$UpdateUser$updateUser? updateUser, + String? $__typename, + }) => _res; CopyWith$Mutation$UpdateUser$updateUser get updateUser => CopyWith$Mutation$UpdateUser$updateUser.stub(_res); @@ -2131,98 +4526,116 @@ class _CopyWithStubImpl$Mutation$UpdateUser const documentNodeMutationUpdateUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'UpdateUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode( - name: NameNode(value: 'UserMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'updateUser'), + type: OperationType.mutation, + name: NameNode(value: 'UpdateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'updateUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'user'), - value: VariableNode(name: NameNode(value: 'user'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( - dynamic, Mutation$UpdateUser?); + dynamic, + Mutation$UpdateUser?, +); class Options$Mutation$UpdateUser extends graphql.MutationOptions { - Options$Mutation$UpdateUser( - {String? operationName, - required Variables$Mutation$UpdateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$UpdateUser? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$UpdateUser({ + String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UpdateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$UpdateUser(data)), - update: update, - onError: onError, - document: documentNodeMutationUpdateUser, - parserFn: _parserFn$Mutation$UpdateUser); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$UpdateUser(data), + ), + update: update, + onError: onError, + document: documentNodeMutationUpdateUser, + parserFn: _parserFn$Mutation$UpdateUser, + ); final OnMutationCompleted$Mutation$UpdateUser? onCompletedWithParsed; @@ -2231,38 +4644,39 @@ class Options$Mutation$UpdateUser ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$UpdateUser extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UpdateUser( - {String? operationName, - required Variables$Mutation$UpdateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationUpdateUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UpdateUser); + WatchOptions$Mutation$UpdateUser({ + String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUpdateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UpdateUser, + ); } extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { @@ -2274,19 +4688,32 @@ extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$UpdateUser$updateUser - implements Fragment$basicMutationReturnFields { - Mutation$UpdateUser$updateUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$UpdateUser$updateUser({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override - factory Mutation$UpdateUser$updateUser.fromJson(Map json) => - _$Mutation$UpdateUser$updateUserFromJson(json); + factory Mutation$UpdateUser$updateUser.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$UpdateUser$updateUser( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -2294,42 +4721,75 @@ class Mutation$UpdateUser$updateUser final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => _$Mutation$UpdateUser$updateUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UpdateUser$updateUser) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -2337,30 +4797,37 @@ class Mutation$UpdateUser$updateUser extension UtilityExtension$Mutation$UpdateUser$updateUser on Mutation$UpdateUser$updateUser { CopyWith$Mutation$UpdateUser$updateUser - get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); + get copyWith => CopyWith$Mutation$UpdateUser$updateUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UpdateUser$updateUser { factory CopyWith$Mutation$UpdateUser$updateUser( - Mutation$UpdateUser$updateUser instance, - TRes Function(Mutation$UpdateUser$updateUser) then) = - _CopyWithImpl$Mutation$UpdateUser$updateUser; + Mutation$UpdateUser$updateUser instance, + TRes Function(Mutation$UpdateUser$updateUser) then, + ) = _CopyWithImpl$Mutation$UpdateUser$updateUser; factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser$updateUser; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { - _CopyWithImpl$Mutation$UpdateUser$updateUser(this._instance, this._then); + _CopyWithImpl$Mutation$UpdateUser$updateUser( + this._instance, + this._then, + ); final Mutation$UpdateUser$updateUser _instance; @@ -2368,28 +4835,29 @@ class _CopyWithImpl$Mutation$UpdateUser$updateUser static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$UpdateUser$updateUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -2404,53 +4872,80 @@ class _CopyWithStubImpl$Mutation$UpdateUser$updateUser TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$AddSshKey { - Variables$Mutation$AddSshKey({required this.sshInput}); + factory Variables$Mutation$AddSshKey( + {required Input$SshMutationInput sshInput}) => + Variables$Mutation$AddSshKey._({ + r'sshInput': sshInput, + }); + + Variables$Mutation$AddSshKey._(this._$data); + + factory Variables$Mutation$AddSshKey.fromJson(Map data) { + final result$data = {}; + final l$sshInput = data['sshInput']; + result$data['sshInput'] = + Input$SshMutationInput.fromJson((l$sshInput as Map)); + return Variables$Mutation$AddSshKey._(result$data); + } + + Map _$data; + + Input$SshMutationInput get sshInput => + (_$data['sshInput'] as Input$SshMutationInput); + Map toJson() { + final result$data = {}; + final l$sshInput = sshInput; + result$data['sshInput'] = l$sshInput.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$AddSshKey + get copyWith => CopyWith$Variables$Mutation$AddSshKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$AddSshKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) { + return false; + } + return true; + } @override - factory Variables$Mutation$AddSshKey.fromJson(Map json) => - _$Variables$Mutation$AddSshKeyFromJson(json); - - final Input$SshMutationInput sshInput; - - Map toJson() => _$Variables$Mutation$AddSshKeyToJson(this); int get hashCode { final l$sshInput = sshInput; return Object.hashAll([l$sshInput]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AddSshKey) || - runtimeType != other.runtimeType) return false; - final l$sshInput = sshInput; - final lOther$sshInput = other.sshInput; - if (l$sshInput != lOther$sshInput) return false; - return true; - } - - CopyWith$Variables$Mutation$AddSshKey - get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$AddSshKey { factory CopyWith$Variables$Mutation$AddSshKey( - Variables$Mutation$AddSshKey instance, - TRes Function(Variables$Mutation$AddSshKey) then) = - _CopyWithImpl$Variables$Mutation$AddSshKey; + Variables$Mutation$AddSshKey instance, + TRes Function(Variables$Mutation$AddSshKey) then, + ) = _CopyWithImpl$Variables$Mutation$AddSshKey; factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$AddSshKey; @@ -2460,7 +4955,10 @@ abstract class CopyWith$Variables$Mutation$AddSshKey { class _CopyWithImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { - _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$AddSshKey( + this._instance, + this._then, + ); final Variables$Mutation$AddSshKey _instance; @@ -2469,10 +4967,11 @@ class _CopyWithImpl$Variables$Mutation$AddSshKey static const _undefined = {}; TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$AddSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); + _then(Variables$Mutation$AddSshKey._({ + ..._instance._$data, + if (sshInput != _undefined && sshInput != null) + 'sshInput': (sshInput as Input$SshMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$AddSshKey @@ -2484,61 +4983,97 @@ class _CopyWithStubImpl$Variables$Mutation$AddSshKey call({Input$SshMutationInput? sshInput}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$AddSshKey { - Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); + Mutation$AddSshKey({ + required this.addSshKey, + required this.$__typename, + }); - @override - factory Mutation$AddSshKey.fromJson(Map json) => - _$Mutation$AddSshKeyFromJson(json); + factory Mutation$AddSshKey.fromJson(Map json) { + final l$addSshKey = json['addSshKey']; + final l$$__typename = json['__typename']; + return Mutation$AddSshKey( + addSshKey: Mutation$AddSshKey$addSshKey.fromJson( + (l$addSshKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$AddSshKey$addSshKey addSshKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$AddSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$addSshKey = addSshKey; + _resultData['addSshKey'] = l$addSshKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$addSshKey = addSshKey; final l$$__typename = $__typename; - return Object.hashAll([l$addSshKey, l$$__typename]); + return Object.hashAll([ + l$addSshKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) { return false; + } final l$addSshKey = addSshKey; final lOther$addSshKey = other.addSshKey; - if (l$addSshKey != lOther$addSshKey) return false; + if (l$addSshKey != lOther$addSshKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { CopyWith$Mutation$AddSshKey get copyWith => - CopyWith$Mutation$AddSshKey(this, (i) => i); + CopyWith$Mutation$AddSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AddSshKey { factory CopyWith$Mutation$AddSshKey( - Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = - _CopyWithImpl$Mutation$AddSshKey; + Mutation$AddSshKey instance, + TRes Function(Mutation$AddSshKey) then, + ) = _CopyWithImpl$Mutation$AddSshKey; factory CopyWith$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey; - TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); + TRes call({ + Mutation$AddSshKey$addSshKey? addSshKey, + String? $__typename, + }); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; } class _CopyWithImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { - _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$AddSshKey( + this._instance, + this._then, + ); final Mutation$AddSshKey _instance; @@ -2546,15 +5081,18 @@ class _CopyWithImpl$Mutation$AddSshKey static const _undefined = {}; - TRes call( - {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? addSshKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$AddSshKey( - addSshKey: addSshKey == _undefined || addSshKey == null - ? _instance.addSshKey - : (addSshKey as Mutation$AddSshKey$addSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + addSshKey: addSshKey == _undefined || addSshKey == null + ? _instance.addSshKey + : (addSshKey as Mutation$AddSshKey$addSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { final local$addSshKey = _instance.addSshKey; return CopyWith$Mutation$AddSshKey$addSshKey( @@ -2568,105 +5106,127 @@ class _CopyWithStubImpl$Mutation$AddSshKey TRes _res; - call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; + call({ + Mutation$AddSshKey$addSshKey? addSshKey, + String? $__typename, + }) => + _res; CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); } const documentNodeMutationAddSshKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'AddSshKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'addSshKey'), + type: OperationType.mutation, + name: NameNode(value: 'AddSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'addSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => Mutation$AddSshKey.fromJson(data); typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( - dynamic, Mutation$AddSshKey?); + dynamic, + Mutation$AddSshKey?, +); class Options$Mutation$AddSshKey extends graphql.MutationOptions { - Options$Mutation$AddSshKey( - {String? operationName, - required Variables$Mutation$AddSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$AddSshKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$AddSshKey({ + String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AddSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$AddSshKey(data)), - update: update, - onError: onError, - document: documentNodeMutationAddSshKey, - parserFn: _parserFn$Mutation$AddSshKey); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$AddSshKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationAddSshKey, + parserFn: _parserFn$Mutation$AddSshKey, + ); final OnMutationCompleted$Mutation$AddSshKey? onCompletedWithParsed; @@ -2675,38 +5235,39 @@ class Options$Mutation$AddSshKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$AddSshKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$AddSshKey( - {String? operationName, - required Variables$Mutation$AddSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationAddSshKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$AddSshKey); + WatchOptions$Mutation$AddSshKey({ + String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAddSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AddSshKey, + ); } extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { @@ -2718,19 +5279,32 @@ extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$AddSshKey$addSshKey - implements Fragment$basicMutationReturnFields { - Mutation$AddSshKey$addSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$AddSshKey$addSshKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override - factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => - _$Mutation$AddSshKey$addSshKeyFromJson(json); + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$AddSshKey$addSshKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -2738,42 +5312,75 @@ class Mutation$AddSshKey$addSshKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => _$Mutation$AddSshKey$addSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$AddSshKey$addSshKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -2781,30 +5388,37 @@ class Mutation$AddSshKey$addSshKey extension UtilityExtension$Mutation$AddSshKey$addSshKey on Mutation$AddSshKey$addSshKey { CopyWith$Mutation$AddSshKey$addSshKey - get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); + get copyWith => CopyWith$Mutation$AddSshKey$addSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AddSshKey$addSshKey { factory CopyWith$Mutation$AddSshKey$addSshKey( - Mutation$AddSshKey$addSshKey instance, - TRes Function(Mutation$AddSshKey$addSshKey) then) = - _CopyWithImpl$Mutation$AddSshKey$addSshKey; + Mutation$AddSshKey$addSshKey instance, + TRes Function(Mutation$AddSshKey$addSshKey) then, + ) = _CopyWithImpl$Mutation$AddSshKey$addSshKey; factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { - _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$AddSshKey$addSshKey( + this._instance, + this._then, + ); final Mutation$AddSshKey$addSshKey _instance; @@ -2812,28 +5426,29 @@ class _CopyWithImpl$Mutation$AddSshKey$addSshKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$AddSshKey$addSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -2848,54 +5463,80 @@ class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$RemoveSshKey { - Variables$Mutation$RemoveSshKey({required this.sshInput}); + factory Variables$Mutation$RemoveSshKey( + {required Input$SshMutationInput sshInput}) => + Variables$Mutation$RemoveSshKey._({ + r'sshInput': sshInput, + }); + + Variables$Mutation$RemoveSshKey._(this._$data); + + factory Variables$Mutation$RemoveSshKey.fromJson(Map data) { + final result$data = {}; + final l$sshInput = data['sshInput']; + result$data['sshInput'] = + Input$SshMutationInput.fromJson((l$sshInput as Map)); + return Variables$Mutation$RemoveSshKey._(result$data); + } + + Map _$data; + + Input$SshMutationInput get sshInput => + (_$data['sshInput'] as Input$SshMutationInput); + Map toJson() { + final result$data = {}; + final l$sshInput = sshInput; + result$data['sshInput'] = l$sshInput.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$RemoveSshKey + get copyWith => CopyWith$Variables$Mutation$RemoveSshKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$RemoveSshKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) { + return false; + } + return true; + } @override - factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => - _$Variables$Mutation$RemoveSshKeyFromJson(json); - - final Input$SshMutationInput sshInput; - - Map toJson() => - _$Variables$Mutation$RemoveSshKeyToJson(this); int get hashCode { final l$sshInput = sshInput; return Object.hashAll([l$sshInput]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveSshKey) || - runtimeType != other.runtimeType) return false; - final l$sshInput = sshInput; - final lOther$sshInput = other.sshInput; - if (l$sshInput != lOther$sshInput) return false; - return true; - } - - CopyWith$Variables$Mutation$RemoveSshKey - get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RemoveSshKey { factory CopyWith$Variables$Mutation$RemoveSshKey( - Variables$Mutation$RemoveSshKey instance, - TRes Function(Variables$Mutation$RemoveSshKey) then) = - _CopyWithImpl$Variables$Mutation$RemoveSshKey; + Variables$Mutation$RemoveSshKey instance, + TRes Function(Variables$Mutation$RemoveSshKey) then, + ) = _CopyWithImpl$Variables$Mutation$RemoveSshKey; factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; @@ -2905,7 +5546,10 @@ abstract class CopyWith$Variables$Mutation$RemoveSshKey { class _CopyWithImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { - _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$RemoveSshKey( + this._instance, + this._then, + ); final Variables$Mutation$RemoveSshKey _instance; @@ -2914,10 +5558,11 @@ class _CopyWithImpl$Variables$Mutation$RemoveSshKey static const _undefined = {}; TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$RemoveSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); + _then(Variables$Mutation$RemoveSshKey._({ + ..._instance._$data, + if (sshInput != _undefined && sshInput != null) + 'sshInput': (sshInput as Input$SshMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey @@ -2929,63 +5574,97 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey call({Input$SshMutationInput? sshInput}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveSshKey { - Mutation$RemoveSshKey( - {required this.removeSshKey, required this.$__typename}); + Mutation$RemoveSshKey({ + required this.removeSshKey, + required this.$__typename, + }); - @override - factory Mutation$RemoveSshKey.fromJson(Map json) => - _$Mutation$RemoveSshKeyFromJson(json); + factory Mutation$RemoveSshKey.fromJson(Map json) { + final l$removeSshKey = json['removeSshKey']; + final l$$__typename = json['__typename']; + return Mutation$RemoveSshKey( + removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( + (l$removeSshKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RemoveSshKey$removeSshKey removeSshKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RemoveSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$removeSshKey = removeSshKey; + _resultData['removeSshKey'] = l$removeSshKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$removeSshKey = removeSshKey; final l$$__typename = $__typename; - return Object.hashAll([l$removeSshKey, l$$__typename]); + return Object.hashAll([ + l$removeSshKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) { return false; + } final l$removeSshKey = removeSshKey; final lOther$removeSshKey = other.removeSshKey; - if (l$removeSshKey != lOther$removeSshKey) return false; + if (l$removeSshKey != lOther$removeSshKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { CopyWith$Mutation$RemoveSshKey get copyWith => - CopyWith$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Mutation$RemoveSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveSshKey { - factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, - TRes Function(Mutation$RemoveSshKey) then) = - _CopyWithImpl$Mutation$RemoveSshKey; + factory CopyWith$Mutation$RemoveSshKey( + Mutation$RemoveSshKey instance, + TRes Function(Mutation$RemoveSshKey) then, + ) = _CopyWithImpl$Mutation$RemoveSshKey; factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey; - TRes call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); + TRes call({ + Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename, + }); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; } class _CopyWithImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { - _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveSshKey( + this._instance, + this._then, + ); final Mutation$RemoveSshKey _instance; @@ -2993,16 +5672,18 @@ class _CopyWithImpl$Mutation$RemoveSshKey static const _undefined = {}; - TRes call( - {Object? removeSshKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? removeSshKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RemoveSshKey( - removeSshKey: removeSshKey == _undefined || removeSshKey == null - ? _instance.removeSshKey - : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + removeSshKey: removeSshKey == _undefined || removeSshKey == null + ? _instance.removeSshKey + : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { final local$removeSshKey = _instance.removeSshKey; return CopyWith$Mutation$RemoveSshKey$removeSshKey( @@ -3016,9 +5697,10 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey TRes _res; - call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, - String? $__typename}) => + call({ + Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename, + }) => _res; CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); @@ -3026,60 +5708,73 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RemoveSshKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'removeSshKey'), + type: OperationType.mutation, + name: NameNode(value: 'RemoveSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); @@ -3087,41 +5782,43 @@ Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( Map data) => Mutation$RemoveSshKey.fromJson(data); typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( - dynamic, Mutation$RemoveSshKey?); + dynamic, + Mutation$RemoveSshKey?, +); class Options$Mutation$RemoveSshKey extends graphql.MutationOptions { - Options$Mutation$RemoveSshKey( - {String? operationName, - required Variables$Mutation$RemoveSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RemoveSshKey({ + String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$RemoveSshKey(data)), - update: update, - onError: onError, - document: documentNodeMutationRemoveSshKey, - parserFn: _parserFn$Mutation$RemoveSshKey); + data == null ? null : _parserFn$Mutation$RemoveSshKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRemoveSshKey, + parserFn: _parserFn$Mutation$RemoveSshKey, + ); final OnMutationCompleted$Mutation$RemoveSshKey? onCompletedWithParsed; @@ -3130,38 +5827,39 @@ class Options$Mutation$RemoveSshKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RemoveSshKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RemoveSshKey( - {String? operationName, - required Variables$Mutation$RemoveSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRemoveSshKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RemoveSshKey); + WatchOptions$Mutation$RemoveSshKey({ + String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveSshKey, + ); } extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { @@ -3173,20 +5871,33 @@ extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveSshKey$removeSshKey - implements Fragment$basicMutationReturnFields { - Mutation$RemoveSshKey$removeSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$RemoveSshKey$removeSshKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override factory Mutation$RemoveSshKey$removeSshKey.fromJson( - Map json) => - _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$RemoveSshKey$removeSshKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -3194,43 +5905,75 @@ class Mutation$RemoveSshKey$removeSshKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => - _$Mutation$RemoveSshKey$removeSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RemoveSshKey$removeSshKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -3239,31 +5982,37 @@ extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey on Mutation$RemoveSshKey$removeSshKey { CopyWith$Mutation$RemoveSshKey$removeSshKey< Mutation$RemoveSshKey$removeSshKey> - get copyWith => - CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); + get copyWith => CopyWith$Mutation$RemoveSshKey$removeSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { factory CopyWith$Mutation$RemoveSshKey$removeSshKey( - Mutation$RemoveSshKey$removeSshKey instance, - TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; + Mutation$RemoveSshKey$removeSshKey instance, + TRes Function(Mutation$RemoveSshKey$removeSshKey) then, + ) = _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey( + this._instance, + this._then, + ); final Mutation$RemoveSshKey$removeSshKey _instance; @@ -3271,28 +6020,29 @@ class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$RemoveSshKey$removeSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -3307,12 +6057,13 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart deleted file mode 100644 index 7fb93e4e..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart +++ /dev/null @@ -1,366 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'users.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => - Fragment$userFields( - username: json['username'] as String, - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - sshKeys: - (json['sshKeys'] as List).map((e) => e as String).toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$userFieldsToJson( - Fragment$userFields instance) => - { - 'username': instance.username, - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'sshKeys': instance.sshKeys, - '__typename': instance.$__typename, - }; - -const _$Enum$UserTypeEnumMap = { - Enum$UserType.NORMAL: 'NORMAL', - Enum$UserType.PRIMARY: 'PRIMARY', - Enum$UserType.ROOT: 'ROOT', - Enum$UserType.$unknown: r'$unknown', -}; - -Query$AllUsers _$Query$AllUsersFromJson(Map json) => - Query$AllUsers( - users: - Query$AllUsers$users.fromJson(json['users'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllUsersToJson(Query$AllUsers instance) => - { - 'users': instance.users.toJson(), - '__typename': instance.$__typename, - }; - -Query$AllUsers$users _$Query$AllUsers$usersFromJson( - Map json) => - Query$AllUsers$users( - allUsers: (json['allUsers'] as List) - .map((e) => Fragment$userFields.fromJson(e as Map)) - .toList(), - rootUser: json['rootUser'] == null - ? null - : Fragment$userFields.fromJson( - json['rootUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllUsers$usersToJson( - Query$AllUsers$users instance) => - { - 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), - 'rootUser': instance.rootUser?.toJson(), - '__typename': instance.$__typename, - }; - -Variables$Query$GetUser _$Variables$Query$GetUserFromJson( - Map json) => - Variables$Query$GetUser( - username: json['username'] as String, - ); - -Map _$Variables$Query$GetUserToJson( - Variables$Query$GetUser instance) => - { - 'username': instance.username, - }; - -Query$GetUser _$Query$GetUserFromJson(Map json) => - Query$GetUser( - users: - Query$GetUser$users.fromJson(json['users'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetUserToJson(Query$GetUser instance) => - { - 'users': instance.users.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => - Query$GetUser$users( - getUser: json['getUser'] == null - ? null - : Fragment$userFields.fromJson( - json['getUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetUser$usersToJson( - Query$GetUser$users instance) => - { - 'getUser': instance.getUser?.toJson(), - '__typename': instance.$__typename, - }; - -Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson( - Map json) => - Variables$Mutation$CreateUser( - user: Input$UserMutationInput.fromJson( - json['user'] as Map), - ); - -Map _$Variables$Mutation$CreateUserToJson( - Variables$Mutation$CreateUser instance) => - { - 'user': instance.user.toJson(), - }; - -Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => - Mutation$CreateUser( - createUser: Mutation$CreateUser$createUser.fromJson( - json['createUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$CreateUserToJson( - Mutation$CreateUser instance) => - { - 'createUser': instance.createUser.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson( - Map json) => - Mutation$CreateUser$createUser( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$CreateUser$createUserToJson( - Mutation$CreateUser$createUser instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( - Map json) => - Variables$Mutation$DeleteUser( - username: json['username'] as String, - ); - -Map _$Variables$Mutation$DeleteUserToJson( - Variables$Mutation$DeleteUser instance) => - { - 'username': instance.username, - }; - -Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => - Mutation$DeleteUser( - deleteUser: Mutation$DeleteUser$deleteUser.fromJson( - json['deleteUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteUserToJson( - Mutation$DeleteUser instance) => - { - 'deleteUser': instance.deleteUser.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson( - Map json) => - Mutation$DeleteUser$deleteUser( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteUser$deleteUserToJson( - Mutation$DeleteUser$deleteUser instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson( - Map json) => - Variables$Mutation$UpdateUser( - user: Input$UserMutationInput.fromJson( - json['user'] as Map), - ); - -Map _$Variables$Mutation$UpdateUserToJson( - Variables$Mutation$UpdateUser instance) => - { - 'user': instance.user.toJson(), - }; - -Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => - Mutation$UpdateUser( - updateUser: Mutation$UpdateUser$updateUser.fromJson( - json['updateUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UpdateUserToJson( - Mutation$UpdateUser instance) => - { - 'updateUser': instance.updateUser.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson( - Map json) => - Mutation$UpdateUser$updateUser( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$UpdateUser$updateUserToJson( - Mutation$UpdateUser$updateUser instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( - Map json) => - Variables$Mutation$AddSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), - ); - -Map _$Variables$Mutation$AddSshKeyToJson( - Variables$Mutation$AddSshKey instance) => - { - 'sshInput': instance.sshInput.toJson(), - }; - -Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => - Mutation$AddSshKey( - addSshKey: Mutation$AddSshKey$addSshKey.fromJson( - json['addSshKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => - { - 'addSshKey': instance.addSshKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( - Map json) => - Mutation$AddSshKey$addSshKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$AddSshKey$addSshKeyToJson( - Mutation$AddSshKey$addSshKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( - Map json) => - Variables$Mutation$RemoveSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), - ); - -Map _$Variables$Mutation$RemoveSshKeyToJson( - Variables$Mutation$RemoveSshKey instance) => - { - 'sshInput': instance.sshInput.toJson(), - }; - -Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey( - removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( - json['removeSshKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveSshKeyToJson( - Mutation$RemoveSshKey instance) => - { - 'removeSshKey': instance.removeSshKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey$removeSshKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$RemoveSshKey$removeSshKeyToJson( - Mutation$RemoveSshKey$removeSshKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 438e92bf..60039365 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -343,7 +343,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String formattedHostname = getHostnameFromDomain(domainName); - const String infectBranch = 'providers/digital-ocean'; + const String infectBranch = 'testing/digital-ocean'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String dnsProviderType = dnsProviderToInfectName(dnsProvider); From efe4f620ee36315f17ac31928e2c999d5a2baa50 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 7 Feb 2023 20:51:15 +0400 Subject: [PATCH 355/732] chore: Transfer some methords from api to provider --- .../server_installation_cubit.dart | 18 ++++++++---------- lib/logic/providers/server_provider.dart | 7 +++++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index e6ad9be1..d6928e40 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -113,22 +113,21 @@ class ServerInstallationCubit extends Cubit { } Future> fetchAvailableLocations() async { - if (ApiController.currentServerProviderApiFactory == null) { + if (ProvidersController.currentServerProvider == null) { return []; } - final APIGenericResult apiResult = await ApiController - .currentServerProviderApiFactory! - .getServerProvider() + final APIGenericResult apiResponse = await ProvidersController + .currentServerProvider! .getAvailableLocations(); - if (!apiResult.success) { + if (!apiResponse.success) { getIt().showSnackBar( 'initializing.could_not_connect'.tr(), ); } - return apiResult.data; + return apiResponse.data; } Future> fetchAvailableTypesByLocation( @@ -138,10 +137,9 @@ class ServerInstallationCubit extends Cubit { return []; } - final APIGenericResult apiResult = await ApiController - .currentServerProviderApiFactory! - .getServerProvider() - .getServerTypesByLocation(location: location); + final APIGenericResult apiResult = await ProvidersController + .currentServerProvider! + .getServerTypes(location: location); if (!apiResult.success) { getIt().showSnackBar( diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index 15475715..aca7f477 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -1,5 +1,12 @@ import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; abstract class ServerProvider { Future> isApiTokenValid(final String apiToken); + Future>> + getAvailableLocations(); + Future>> getServerTypes({ + required final ServerProviderLocation location, + }); } From 9c27083a1c3eeacd9405922a54faeed750528c35 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 8 Feb 2023 20:19:27 +0200 Subject: [PATCH 356/732] set compileSdkVersion --- android/app/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index c8a562ca..9d678878 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -52,7 +52,8 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "org.selfprivacy.app" minSdkVersion 21 - targetSdkVersion 31 + targetSdkVersion 33 + compileSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } From 6cebe27852be09959a4893e8ad5f0b25c51a21b6 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Wed, 8 Feb 2023 22:33:34 +0200 Subject: [PATCH 357/732] fix packaging metadata --- appimage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appimage.yml b/appimage.yml index 48f9ca32..ce7bab35 100644 --- a/appimage.yml +++ b/appimage.yml @@ -10,7 +10,7 @@ AppDir: id: org.selfprivacy.app name: SelfPrivacy icon: org.selfprivacy.app - version: 0.7.0 + version: 0.8.0 exec: selfprivacy exec_args: $@ apt: From bad692656797cc962385d2ed815054835555a98d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 13 Feb 2023 18:13:32 +0400 Subject: [PATCH 358/732] chore: Continue refactoring - Rename APIGenericResult to GenericResult - Wrap all provider functions results with GenericResult - Move basic server commands and getters to business logic layer from API on Hetzner --- ...eneric_result.dart => generic_result.dart} | 4 +- .../graphql_maps/server_api/jobs_api.dart | 6 +- .../graphql_maps/server_api/server_api.dart | 68 +-- .../graphql_maps/server_api/services_api.dart | 36 +- .../graphql_maps/server_api/users_api.dart | 30 +- .../graphql_maps/server_api/volume_api.dart | 8 +- lib/logic/api_maps/rest_maps/backblaze.dart | 10 +- .../dns_providers/cloudflare/cloudflare.dart | 18 +- .../digital_ocean_dns/digital_ocean_dns.dart | 18 +- .../rest_maps/dns_providers/dns_provider.dart | 10 +- .../digital_ocean/digital_ocean_api.dart | 50 +-- .../server_providers/hetzner/hetzner_api.dart | 315 ++++---------- .../server_providers/server_provider.dart | 45 +- .../server_providers/volume_provider.dart | 19 +- lib/logic/cubit/devices/devices_cubit.dart | 7 +- .../initializing/backblaze_form_cubit.dart | 4 +- .../recovery_key/recovery_key_cubit.dart | 4 +- .../server_installation_cubit.dart | 27 +- .../server_installation_repository.dart | 25 +- lib/logic/cubit/users/users_cubit.dart | 10 +- lib/logic/models/server_metadata.dart | 4 +- lib/logic/providers/server_provider.dart | 14 +- .../providers/server_providers/hetzner.dart | 389 +++++++++++++++++- lib/ui/pages/server_details/text_details.dart | 2 +- 24 files changed, 634 insertions(+), 489 deletions(-) rename lib/logic/api_maps/{api_generic_result.dart => generic_result.dart} (85%) diff --git a/lib/logic/api_maps/api_generic_result.dart b/lib/logic/api_maps/generic_result.dart similarity index 85% rename from lib/logic/api_maps/api_generic_result.dart rename to lib/logic/api_maps/generic_result.dart index 81e1760a..5ce31561 100644 --- a/lib/logic/api_maps/api_generic_result.dart +++ b/lib/logic/api_maps/generic_result.dart @@ -1,5 +1,5 @@ -class APIGenericResult { - APIGenericResult({ +class GenericResult { + GenericResult({ required this.success, required this.data, this.message, diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart index c14aa98d..03bfd1b3 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -22,13 +22,13 @@ mixin JobsApi on ApiMap { return jobsList; } - Future> removeApiJob(final String uid) async { + Future> removeApiJob(final String uid) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$RemoveJob(jobId: uid); final mutation = Options$Mutation$RemoveJob(variables: variables); final response = await client.mutate$RemoveJob(mutation); - return APIGenericResult( + return GenericResult( data: response.parsedData?.removeJob.success ?? false, success: true, code: response.parsedData?.removeJob.code ?? 0, @@ -36,7 +36,7 @@ mixin JobsApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, code: 0, diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 9f863b1f..966b17bd 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -1,6 +1,6 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; @@ -24,7 +24,7 @@ import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/ssh_settings.dart'; import 'package:selfprivacy/logic/models/system_settings.dart'; -export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +export 'package:selfprivacy/logic/api_maps/generic_result.dart'; part 'jobs_api.dart'; part 'server_actions_api.dart'; @@ -205,7 +205,7 @@ class ServerApi extends ApiMap return settings; } - Future> getRecoveryTokenStatus() async { + Future> getRecoveryTokenStatus() async { RecoveryKeyStatus? key; QueryResult response; String? error; @@ -222,18 +222,18 @@ class ServerApi extends ApiMap print(e); } - return APIGenericResult( + return GenericResult( success: error == null, data: key, message: error, ); } - Future> generateRecoveryToken( + Future> generateRecoveryToken( final DateTime? expirationDate, final int? numberOfUses, ) async { - APIGenericResult key; + GenericResult key; QueryResult response; try { @@ -254,19 +254,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - key = APIGenericResult( + key = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - key = APIGenericResult( + key = GenericResult( success: true, data: response.parsedData!.getNewRecoveryApiKey.key!, ); } catch (e) { print(e); - key = APIGenericResult( + key = GenericResult( success: false, data: '', message: e.toString(), @@ -299,8 +299,8 @@ class ServerApi extends ApiMap return records; } - Future>> getApiTokens() async { - APIGenericResult> tokens; + Future>> getApiTokens() async { + GenericResult> tokens; QueryResult response; try { @@ -309,7 +309,7 @@ class ServerApi extends ApiMap if (response.hasException) { final message = response.exception.toString(); print(message); - tokens = APIGenericResult>( + tokens = GenericResult>( success: false, data: [], message: message, @@ -323,13 +323,13 @@ class ServerApi extends ApiMap ApiToken.fromGraphQL(device), ) .toList(); - tokens = APIGenericResult>( + tokens = GenericResult>( success: true, data: parsed, ); } catch (e) { print(e); - tokens = APIGenericResult>( + tokens = GenericResult>( success: false, data: [], message: e.toString(), @@ -339,8 +339,8 @@ class ServerApi extends ApiMap return tokens; } - Future> deleteApiToken(final String name) async { - APIGenericResult returnable; + Future> deleteApiToken(final String name) async { + GenericResult returnable; QueryResult response; try { @@ -357,19 +357,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - returnable = APIGenericResult( + returnable = GenericResult( success: false, data: null, message: response.exception.toString(), ); } - returnable = APIGenericResult( + returnable = GenericResult( success: true, data: null, ); } catch (e) { print(e); - returnable = APIGenericResult( + returnable = GenericResult( success: false, data: null, message: e.toString(), @@ -379,8 +379,8 @@ class ServerApi extends ApiMap return returnable; } - Future> createDeviceToken() async { - APIGenericResult token; + Future> createDeviceToken() async { + GenericResult token; QueryResult response; try { @@ -392,19 +392,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = APIGenericResult( + token = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = APIGenericResult( + token = GenericResult( success: true, data: response.parsedData!.getNewDeviceApiKey.key!, ); } catch (e) { print(e); - token = APIGenericResult( + token = GenericResult( success: false, data: '', message: e.toString(), @@ -416,10 +416,10 @@ class ServerApi extends ApiMap Future isHttpServerWorking() async => (await getApiVersion()) != null; - Future> authorizeDevice( + Future> authorizeDevice( final DeviceToken deviceToken, ) async { - APIGenericResult token; + GenericResult token; QueryResult response; try { @@ -441,19 +441,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = APIGenericResult( + token = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = APIGenericResult( + token = GenericResult( success: true, data: response.parsedData!.authorizeWithNewDeviceApiKey.token!, ); } catch (e) { print(e); - token = APIGenericResult( + token = GenericResult( success: false, data: '', message: e.toString(), @@ -463,10 +463,10 @@ class ServerApi extends ApiMap return token; } - Future> useRecoveryToken( + Future> useRecoveryToken( final DeviceToken deviceToken, ) async { - APIGenericResult token; + GenericResult token; QueryResult response; try { @@ -488,19 +488,19 @@ class ServerApi extends ApiMap ); if (response.hasException) { print(response.exception.toString()); - token = APIGenericResult( + token = GenericResult( success: false, data: '', message: response.exception.toString(), ); } - token = APIGenericResult( + token = GenericResult( success: true, data: response.parsedData!.useRecoveryApiKey.token!, ); } catch (e) { print(e); - token = APIGenericResult( + token = GenericResult( success: false, data: '', message: e.toString(), diff --git a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart index adfe806f..9d39f137 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart @@ -20,7 +20,7 @@ mixin ServicesApi on ApiMap { return services; } - Future> enableService( + Future> enableService( final String serviceId, ) async { try { @@ -28,7 +28,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$EnableService(serviceId: serviceId); final mutation = Options$Mutation$EnableService(variables: variables); final response = await client.mutate$EnableService(mutation); - return APIGenericResult( + return GenericResult( data: response.parsedData?.enableService.success ?? false, success: true, code: response.parsedData?.enableService.code ?? 0, @@ -36,7 +36,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, code: 0, @@ -45,7 +45,7 @@ mixin ServicesApi on ApiMap { } } - Future> disableService( + Future> disableService( final String serviceId, ) async { try { @@ -53,7 +53,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$DisableService(serviceId: serviceId); final mutation = Options$Mutation$DisableService(variables: variables); final response = await client.mutate$DisableService(mutation); - return APIGenericResult( + return GenericResult( data: null, success: response.parsedData?.disableService.success ?? false, code: response.parsedData?.disableService.code ?? 0, @@ -61,7 +61,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: null, success: false, code: 0, @@ -70,7 +70,7 @@ mixin ServicesApi on ApiMap { } } - Future> stopService( + Future> stopService( final String serviceId, ) async { try { @@ -78,7 +78,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$StopService(serviceId: serviceId); final mutation = Options$Mutation$StopService(variables: variables); final response = await client.mutate$StopService(mutation); - return APIGenericResult( + return GenericResult( data: response.parsedData?.stopService.success ?? false, success: true, code: response.parsedData?.stopService.code ?? 0, @@ -86,7 +86,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, code: 0, @@ -95,13 +95,13 @@ mixin ServicesApi on ApiMap { } } - Future startService(final String serviceId) async { + Future startService(final String serviceId) async { try { final GraphQLClient client = await getClient(); final variables = Variables$Mutation$StartService(serviceId: serviceId); final mutation = Options$Mutation$StartService(variables: variables); final response = await client.mutate$StartService(mutation); - return APIGenericResult( + return GenericResult( data: null, success: response.parsedData?.startService.success ?? false, code: response.parsedData?.startService.code ?? 0, @@ -109,7 +109,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: null, success: false, code: 0, @@ -118,7 +118,7 @@ mixin ServicesApi on ApiMap { } } - Future> restartService( + Future> restartService( final String serviceId, ) async { try { @@ -126,7 +126,7 @@ mixin ServicesApi on ApiMap { final variables = Variables$Mutation$RestartService(serviceId: serviceId); final mutation = Options$Mutation$RestartService(variables: variables); final response = await client.mutate$RestartService(mutation); - return APIGenericResult( + return GenericResult( data: response.parsedData?.restartService.success ?? false, success: true, code: response.parsedData?.restartService.code ?? 0, @@ -134,7 +134,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, code: 0, @@ -143,7 +143,7 @@ mixin ServicesApi on ApiMap { } } - Future> moveService( + Future> moveService( final String serviceId, final String destination, ) async { @@ -158,7 +158,7 @@ mixin ServicesApi on ApiMap { final mutation = Options$Mutation$MoveService(variables: variables); final response = await client.mutate$MoveService(mutation); final jobJson = response.parsedData?.moveService.job?.toJson(); - return APIGenericResult( + return GenericResult( success: true, code: response.parsedData?.moveService.code ?? 0, message: response.parsedData?.moveService.message, @@ -166,7 +166,7 @@ mixin ServicesApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, code: 0, message: e.toString(), diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index f1851353..cca78798 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -45,7 +45,7 @@ mixin UsersApi on ApiMap { return user; } - Future> createUser( + Future> createUser( final String username, final String password, ) async { @@ -56,7 +56,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$CreateUser(variables: variables); final response = await client.mutate$CreateUser(mutation); - return APIGenericResult( + return GenericResult( success: true, code: response.parsedData?.createUser.code ?? 500, message: response.parsedData?.createUser.message, @@ -66,7 +66,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, code: 0, message: e.toString(), @@ -75,7 +75,7 @@ mixin UsersApi on ApiMap { } } - Future> deleteUser( + Future> deleteUser( final String username, ) async { try { @@ -83,7 +83,7 @@ mixin UsersApi on ApiMap { final variables = Variables$Mutation$DeleteUser(username: username); final mutation = Options$Mutation$DeleteUser(variables: variables); final response = await client.mutate$DeleteUser(mutation); - return APIGenericResult( + return GenericResult( data: response.parsedData?.deleteUser.success ?? false, success: true, code: response.parsedData?.deleteUser.code ?? 500, @@ -91,7 +91,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, code: 500, @@ -100,7 +100,7 @@ mixin UsersApi on ApiMap { } } - Future> updateUser( + Future> updateUser( final String username, final String password, ) async { @@ -111,7 +111,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$UpdateUser(variables: variables); final response = await client.mutate$UpdateUser(mutation); - return APIGenericResult( + return GenericResult( success: true, code: response.parsedData?.updateUser.code ?? 500, message: response.parsedData?.updateUser.message, @@ -121,7 +121,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: null, success: false, code: 0, @@ -130,7 +130,7 @@ mixin UsersApi on ApiMap { } } - Future> addSshKey( + Future> addSshKey( final String username, final String sshKey, ) async { @@ -144,7 +144,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$AddSshKey(variables: variables); final response = await client.mutate$AddSshKey(mutation); - return APIGenericResult( + return GenericResult( success: true, code: response.parsedData?.addSshKey.code ?? 500, message: response.parsedData?.addSshKey.message, @@ -154,7 +154,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: null, success: false, code: 0, @@ -163,7 +163,7 @@ mixin UsersApi on ApiMap { } } - Future> removeSshKey( + Future> removeSshKey( final String username, final String sshKey, ) async { @@ -177,7 +177,7 @@ mixin UsersApi on ApiMap { ); final mutation = Options$Mutation$RemoveSshKey(variables: variables); final response = await client.mutate$RemoveSshKey(mutation); - return APIGenericResult( + return GenericResult( success: response.parsedData?.removeSshKey.success ?? false, code: response.parsedData?.removeSshKey.code ?? 500, message: response.parsedData?.removeSshKey.message, @@ -187,7 +187,7 @@ mixin UsersApi on ApiMap { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: null, success: false, code: 0, diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index e830cabd..3459e6f9 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -57,10 +57,10 @@ mixin VolumeApi on ApiMap { } } - Future> migrateToBinds( + Future> migrateToBinds( final Map serviceToDisk, ) async { - APIGenericResult? mutation; + GenericResult? mutation; try { final GraphQLClient client = await getClient(); @@ -78,7 +78,7 @@ mixin VolumeApi on ApiMap { await client.mutate$MigrateToBinds( migrateMutation, ); - mutation = mutation = APIGenericResult( + mutation = mutation = GenericResult( success: true, code: result.parsedData!.migrateToBinds.code, message: result.parsedData!.migrateToBinds.message, @@ -86,7 +86,7 @@ mixin VolumeApi on ApiMap { ); } catch (e) { print(e); - mutation = APIGenericResult( + mutation = GenericResult( success: false, code: 0, message: e.toString(), diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index 8ea94803..6fe5cd8e 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -2,11 +2,11 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; -export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +export 'package:selfprivacy/logic/api_maps/generic_result.dart'; class BackblazeApiAuth { BackblazeApiAuth({required this.authorizationToken, required this.apiUrl}); @@ -74,7 +74,7 @@ class BackblazeApi extends ApiMap { ); } - Future> isApiTokenValid( + Future> isApiTokenValid( final String encodedApiKey, ) async { final Dio client = await getClient(); @@ -99,7 +99,7 @@ class BackblazeApi extends ApiMap { } } on DioError catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, message: e.toString(), @@ -108,7 +108,7 @@ class BackblazeApi extends ApiMap { close(client); } - return APIGenericResult( + return GenericResult( data: isTokenValid, success: true, ); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 1da08c40..d9ac5c6c 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -46,7 +46,7 @@ class CloudflareApi extends DnsProviderApi { String rootAddress = 'https://api.cloudflare.com/client/v4'; @override - Future> isApiTokenValid(final String token) async { + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; String message = ''; @@ -70,7 +70,7 @@ class CloudflareApi extends DnsProviderApi { } if (response == null) { - return APIGenericResult( + return GenericResult( data: isValid, success: false, message: message, @@ -85,7 +85,7 @@ class CloudflareApi extends DnsProviderApi { throw Exception('code: ${response.statusCode}'); } - return APIGenericResult( + return GenericResult( data: isValid, success: true, message: response.statusMessage, @@ -113,7 +113,7 @@ class CloudflareApi extends DnsProviderApi { } @override - Future> removeSimilarRecords({ + Future> removeSimilarRecords({ required final ServerDomain domain, final String? ip4, }) async { @@ -139,7 +139,7 @@ class CloudflareApi extends DnsProviderApi { await Future.wait(allDeleteFutures); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: null, message: e.toString(), @@ -148,7 +148,7 @@ class CloudflareApi extends DnsProviderApi { close(client); } - return APIGenericResult(success: true, data: null); + return GenericResult(success: true, data: null); } @override @@ -272,7 +272,7 @@ class CloudflareApi extends DnsProviderApi { } @override - Future> createMultipleDnsRecords({ + Future> createMultipleDnsRecords({ required final ServerDomain domain, final String? ip4, }) async { @@ -298,7 +298,7 @@ class CloudflareApi extends DnsProviderApi { rethrow; } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: null, message: e.toString(), @@ -307,7 +307,7 @@ class CloudflareApi extends DnsProviderApi { close(client); } - return APIGenericResult(success: true, data: null); + return GenericResult(success: true, data: null); } @override diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart index b5b33f98..fd2b2e02 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart @@ -46,7 +46,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { String rootAddress = 'https://api.digitalocean.com/v2'; @override - Future> isApiTokenValid(final String token) async { + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; String message = ''; @@ -70,7 +70,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { } if (response == null) { - return APIGenericResult( + return GenericResult( data: isValid, success: false, message: message, @@ -85,7 +85,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { throw Exception('code: ${response.statusCode}'); } - return APIGenericResult( + return GenericResult( data: isValid, success: true, message: response.statusMessage, @@ -97,7 +97,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { Future getZoneId(final String domain) async => domain; @override - Future> removeSimilarRecords({ + Future> removeSimilarRecords({ required final ServerDomain domain, final String? ip4, }) async { @@ -118,7 +118,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { await Future.wait(allDeleteFutures); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: null, message: e.toString(), @@ -127,7 +127,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { close(client); } - return APIGenericResult(success: true, data: null); + return GenericResult(success: true, data: null); } @override @@ -262,7 +262,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { } @override - Future> createMultipleDnsRecords({ + Future> createMultipleDnsRecords({ required final ServerDomain domain, final String? ip4, }) async { @@ -292,7 +292,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { rethrow; } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: null, message: e.toString(), @@ -301,7 +301,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { close(client); } - return APIGenericResult(success: true, data: null); + return GenericResult(success: true, data: null); } @override diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 0d010242..299928b0 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -1,10 +1,10 @@ -import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +export 'package:selfprivacy/logic/api_maps/generic_result.dart'; export 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; class DomainNotFoundException implements Exception { @@ -21,11 +21,11 @@ abstract class DnsProviderApi extends ApiMap { final String? ipAddress, final String? dkimPublicKey, }); - Future> removeSimilarRecords({ + Future> removeSimilarRecords({ required final ServerDomain domain, final String? ip4, }); - Future> createMultipleDnsRecords({ + Future> createMultipleDnsRecords({ required final ServerDomain domain, final String? ip4, }); @@ -36,7 +36,7 @@ abstract class DnsProviderApi extends ApiMap { Future getZoneId(final String domain); Future> domainList(); - Future> isApiTokenValid(final String token); + Future> isApiTokenValid(final String token); RegExp getApiTokenValidation(); List getProjectDnsRecords( diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 540b39c5..3d05d4db 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -60,7 +60,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { String get displayProviderName => 'Digital Ocean'; @override - Future> isApiTokenValid(final String token) async { + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; String message = ''; @@ -84,7 +84,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } if (response == null) { - return APIGenericResult( + return GenericResult( data: isValid, success: false, message: message, @@ -99,7 +99,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { throw Exception('code: ${response.statusCode}'); } - return APIGenericResult( + return GenericResult( data: isValid, success: true, message: response.statusMessage, @@ -115,7 +115,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); @override - Future> createVolume() async { + Future> createVolume() async { ServerVolume? volume; Response? createVolumeResponse; @@ -147,7 +147,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: null, success: false, message: e.toString(), @@ -156,7 +156,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { client.close(); } - return APIGenericResult( + return GenericResult( data: volume, success: true, code: createVolumeResponse.statusCode, @@ -230,7 +230,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future> attachVolume( + Future> attachVolume( final ServerVolume volume, final int serverId, ) async { @@ -252,7 +252,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { attachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, message: e.toString(), @@ -261,7 +261,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult( + return GenericResult( data: success, success: true, code: attachVolumeResponse.statusCode, @@ -327,7 +327,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future> createServer({ + Future> createServer({ required final String dnsApiToken, required final User rootUser, required final String domainName, @@ -399,7 +399,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: null, message: e.toString(), @@ -408,7 +408,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult( + return GenericResult( data: serverDetails, success: true, code: serverCreateResponse.statusCode, @@ -417,7 +417,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future> deleteServer({ + Future> deleteServer({ required final String domainName, }) async { final Dio client = await getClient(); @@ -431,7 +431,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, message: e.toString(), @@ -446,7 +446,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: false, success: false, message: e.toString(), @@ -464,7 +464,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { await Future.wait(laterFutures); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: false, message: e.toString(), @@ -473,7 +473,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult( + return GenericResult( success: true, data: true, ); @@ -762,7 +762,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } @override - Future>> + Future>> getAvailableLocations() async { List locations = []; @@ -784,7 +784,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { .toList(); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: [], success: false, message: e.toString(), @@ -793,11 +793,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult(data: locations, success: true); + return GenericResult(data: locations, success: true); } @override - Future>> getServerTypesByLocation({ + Future>> getAvailableServerTypes({ required final ServerProviderLocation location, }) async { final List types = []; @@ -830,7 +830,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: [], success: false, message: e.toString(), @@ -839,17 +839,17 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult(data: types, success: true); + return GenericResult(data: types, success: true); } @override - Future> createReverseDns({ + Future> createReverseDns({ required final ServerHostingDetails serverDetails, required final ServerDomain domain, }) async { /// TODO remove from provider interface const bool success = true; - return APIGenericResult(success: success, data: null); + return GenericResult(success: success, data: null); } @override diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index cfd9eb40..f43fc050 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -17,7 +17,6 @@ import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; -import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; @@ -60,8 +59,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { @override String get displayProviderName => 'Hetzner'; - @override - Future> isApiTokenValid(final String token) async { + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; String message = ''; @@ -85,7 +83,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } if (response == null) { - return APIGenericResult( + return GenericResult( data: isValid, success: false, message: message, @@ -100,21 +98,19 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { throw Exception('code: ${response.statusCode}'); } - return APIGenericResult( + return GenericResult( data: isValid, success: true, message: response.statusMessage, ); } - @override ProviderApiTokenValidation getApiTokenValidation() => ProviderApiTokenValidation( regexp: RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'), length: 64, ); - @override Future getPricePerGb() async { double? price; @@ -140,8 +136,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - @override - Future> createVolume() async { + Future> createVolume() async { ServerVolume? volume; Response? createVolumeResponse; @@ -172,7 +167,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: null, success: false, message: e.toString(), @@ -181,7 +176,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { client.close(); } - return APIGenericResult( + return GenericResult( data: volume, success: true, code: createVolumeResponse.statusCode, @@ -189,7 +184,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - @override Future> getVolumes({final String? status}) async { final List volumes = []; @@ -257,7 +251,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return volume; } - @override Future deleteVolume(final ServerVolume volume) async { final Dio client = await getClient(); try { @@ -269,8 +262,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } } - @override - Future> attachVolume( + Future> attachVolume( final ServerVolume volume, final int serverId, ) async { @@ -294,7 +286,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { client.close(); } - return APIGenericResult( + return GenericResult( data: success, success: true, code: attachVolumeResponse?.statusCode, @@ -302,7 +294,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - @override Future detachVolume(final ServerVolume volume) async { bool success = false; @@ -323,7 +314,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return success; } - @override Future resizeVolume( final ServerVolume volume, final DiskSize size, @@ -350,19 +340,17 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return success; } - @override - Future> createServer({ + Future> createServer({ required final String dnsApiToken, required final User rootUser, required final String domainName, required final String serverType, required final DnsProviderType dnsProvider, }) async { - final APIGenericResult newVolumeResponse = - await createVolume(); + final GenericResult newVolumeResponse = await createVolume(); if (!newVolumeResponse.success || newVolumeResponse.data == null) { - return APIGenericResult( + return GenericResult( data: null, success: false, message: newVolumeResponse.message, @@ -379,7 +367,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future> createServerWithVolume({ + Future> createServerWithVolume({ required final String dnsApiToken, required final User rootUser, required final String domainName, @@ -457,7 +445,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { apiResultMessage = 'uniqueness_error'; } - return APIGenericResult( + return GenericResult( data: serverDetails, success: success && hetznerError == null, code: serverCreateResponse?.statusCode ?? @@ -466,8 +454,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - @override - Future> deleteServer({ + Future> deleteServer({ required final String domainName, }) async { final Dio client = await getClient(); @@ -494,7 +481,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { await Future.wait(laterFutures); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: false, message: e.toString(), @@ -503,45 +490,55 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult( + return GenericResult( success: true, data: true, ); } - @override - Future restart() async { - final ServerHostingDetails server = getIt().serverDetails!; - + Future> restart(final int serverId) async { final Dio client = await getClient(); try { - await client.post('/servers/${server.id}/actions/reset'); + await client.post('/servers/$serverId/actions/reset'); } catch (e) { print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } - return server.copyWith(startTime: DateTime.now()); + return GenericResult( + success: true, + data: null, + ); } - @override - Future powerOn() async { - final ServerHostingDetails server = getIt().serverDetails!; - + Future> powerOn(final int serverId) async { final Dio client = await getClient(); try { - await client.post('/servers/${server.id}/actions/poweron'); + await client.post('/servers/$serverId/actions/poweron'); } catch (e) { print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } - return server.copyWith(startTime: DateTime.now()); + return GenericResult( + success: true, + data: null, + ); } - Future> requestRawMetrics( + Future>> getMetrics( final int serverId, final DateTime start, final DateTime end, @@ -562,127 +559,20 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { metrics = res.data['metrics']; } catch (e) { print(e); + return GenericResult( + success: false, + data: {}, + message: e.toString(), + ); } finally { close(client); } - return metrics; + return GenericResult(data: metrics, success: true); } - List serializeTimeSeries( - final Map json, - final String type, - ) { - final List list = json['time_series'][type]['values']; - return list - .map((final el) => TimeSeriesData(el[0], double.parse(el[1]))) - .toList(); - } - - @override - Future getMetrics( - final int serverId, - final DateTime start, - final DateTime end, - ) async { - ServerMetrics? metrics; - - final Map rawCpuMetrics = await requestRawMetrics( - serverId, - start, - end, - 'cpu', - ); - final Map rawNetworkMetrics = await requestRawMetrics( - serverId, - start, - end, - 'network', - ); - - if (rawNetworkMetrics.isEmpty || rawCpuMetrics.isEmpty) { - return metrics; - } - - metrics = ServerMetrics( - cpu: serializeTimeSeries( - rawCpuMetrics, - 'cpu', - ), - bandwidthIn: serializeTimeSeries( - rawNetworkMetrics, - 'network.0.bandwidth.in', - ), - bandwidthOut: serializeTimeSeries( - rawNetworkMetrics, - 'network.0.bandwidth.out', - ), - end: end, - start: start, - stepsInSecond: rawCpuMetrics['step'], - ); - - return metrics; - } - - @override - Future> getMetadata(final int serverId) async { - List metadata = []; - - final Dio client = await getClient(); - try { - final Response response = await client.get('/servers/$serverId'); - final hetznerInfo = HetznerServerInfo.fromJson(response.data!['server']); - metadata = [ - ServerMetadataEntity( - type: MetadataType.id, - name: 'server.server_id'.tr(), - value: hetznerInfo.id.toString(), - ), - ServerMetadataEntity( - type: MetadataType.status, - name: 'server.status'.tr(), - value: hetznerInfo.status.toString().split('.')[1].capitalize(), - ), - ServerMetadataEntity( - type: MetadataType.cpu, - name: 'server.cpu'.tr(), - value: 'server.core_count'.plural(hetznerInfo.serverType.cores), - ), - ServerMetadataEntity( - type: MetadataType.ram, - name: 'server.ram'.tr(), - value: '${hetznerInfo.serverType.memory.toString()} GB', - ), - ServerMetadataEntity( - type: MetadataType.cost, - name: 'server.monthly_cost'.tr(), - value: hetznerInfo.serverType.prices[1].monthly.toStringAsFixed(2), - ), - ServerMetadataEntity( - type: MetadataType.location, - name: 'server.location'.tr(), - value: - '${hetznerInfo.location.city}, ${hetznerInfo.location.country}', - ), - ServerMetadataEntity( - type: MetadataType.other, - name: 'server.provider'.tr(), - value: displayProviderName, - ), - ]; - } catch (e) { - print(e); - } finally { - close(client); - } - - return metadata; - } - - @override - Future> getServers() async { - List servers = []; + Future>> getServers() async { + List servers = []; final Dio client = await getClient(); try { @@ -691,53 +581,22 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { .map( (final e) => HetznerServerInfo.fromJson(e), ) - .toList() - .where( - (final server) => server.publicNet.ipv4 != null, - ) - .map( - (final server) => ServerBasicInfo( - id: server.id, - name: server.name, - ip: server.publicNet.ipv4.ip, - reverseDns: server.publicNet.ipv4.reverseDns, - created: server.created, - ), - ) .toList(); } catch (e) { print(e); + return GenericResult( + success: false, + data: [], + message: e.toString(), + ); } finally { close(client); } - print(servers); - return servers; + return GenericResult(data: servers, success: true); } - String? getEmojiFlag(final String query) { - String? emoji; - - switch (query.toLowerCase()) { - case 'de': - emoji = '🇩🇪'; - break; - - case 'fi': - emoji = '🇫🇮'; - break; - - case 'us': - emoji = '🇺🇸'; - break; - } - - return emoji; - } - - @override - Future>> - getAvailableLocations() async { + Future> getAvailableLocations() async { List locations = []; final Dio client = await getClient(); @@ -746,19 +605,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { '/locations', ); - locations = response.data!['locations'] - .map( - (final location) => ServerProviderLocation( - title: location['city'], - description: location['description'], - flag: getEmojiFlag(location['country']), - identifier: location['name'], - ), - ) - .toList(); + locations = response.data!['locations']; } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: [], message: e.toString(), @@ -767,44 +617,21 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult(success: true, data: locations); + return GenericResult(success: true, data: locations); } - @override - Future>> getServerTypesByLocation({ - required final ServerProviderLocation location, - }) async { - final List types = []; + Future> getAvailableServerTypes() async { + List types = []; final Dio client = await getClient(); try { final Response response = await client.get( '/server_types', ); - final rawTypes = response.data!['server_types']; - for (final rawType in rawTypes) { - for (final rawPrice in rawType['prices']) { - if (rawPrice['location'].toString() == location.identifier) { - types.add( - ServerType( - title: rawType['description'], - identifier: rawType['name'], - ram: rawType['memory'], - cores: rawType['cores'], - disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), - price: Price( - value: double.parse(rawPrice['price_monthly']['gross']), - currency: 'EUR', - ), - location: location, - ), - ); - } - } - } + types = response.data!['server_types']; } catch (e) { print(e); - return APIGenericResult( + return GenericResult( data: [], success: false, message: e.toString(), @@ -813,26 +640,26 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult(data: types, success: true); + return GenericResult(data: types, success: true); } - @override - Future> createReverseDns({ - required final ServerHostingDetails serverDetails, - required final ServerDomain domain, + Future> createReverseDns({ + required final int serverId, + required final String ip4, + required final String dnsPtr, }) async { final Dio client = await getClient(); try { await client.post( - '/servers/${serverDetails.id}/actions/change_dns_ptr', + '/servers/$serverId/actions/change_dns_ptr', data: { - 'ip': serverDetails.ip4, - 'dns_ptr': domain.domainName, + 'ip': ip4, + 'dns_ptr': dnsPtr, }, ); } catch (e) { print(e); - return APIGenericResult( + return GenericResult( success: false, data: null, message: e.toString(), @@ -841,6 +668,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return APIGenericResult(success: true, data: null); + return GenericResult(success: true, data: null); } } diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 99516535..99c6b1ac 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -1,15 +1,6 @@ -import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/metrics.dart'; -import 'package:selfprivacy/logic/models/server_basic_info.dart'; -import 'package:selfprivacy/logic/models/server_metadata.dart'; -import 'package:selfprivacy/logic/models/server_provider_location.dart'; -import 'package:selfprivacy/logic/models/server_type.dart'; - -export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +export 'package:selfprivacy/logic/api_maps/generic_result.dart'; class ProviderApiTokenValidation { ProviderApiTokenValidation({ @@ -21,40 +12,6 @@ class ProviderApiTokenValidation { } abstract class ServerProviderApi extends ApiMap { - Future> getServers(); - Future>> - getAvailableLocations(); - Future>> getServerTypesByLocation({ - required final ServerProviderLocation location, - }); - - Future restart(); - Future powerOn(); - - Future> deleteServer({ - required final String domainName, - }); - Future> createServer({ - required final String dnsApiToken, - required final User rootUser, - required final String domainName, - required final String serverType, - required final DnsProviderType dnsProvider, - }); - Future> createReverseDns({ - required final ServerHostingDetails serverDetails, - required final ServerDomain domain, - }); - - Future> isApiTokenValid(final String token); - ProviderApiTokenValidation getApiTokenValidation(); - Future> getMetadata(final int serverId); - Future getMetrics( - final int serverId, - final DateTime start, - final DateTime end, - ); - String dnsProviderToInfectName(final DnsProviderType dnsProvider) { String dnsProviderType; switch (dnsProvider) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart index 5e01d268..5ddacd6d 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart @@ -1,20 +1,5 @@ -import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/models/disk_size.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/price.dart'; -export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +export 'package:selfprivacy/logic/api_maps/generic_result.dart'; -mixin VolumeProviderApi on ApiMap { - Future> createVolume(); - Future> getVolumes({final String? status}); - Future> attachVolume( - final ServerVolume volume, - final int serverId, - ); - Future detachVolume(final ServerVolume volume); - Future resizeVolume(final ServerVolume volume, final DiskSize size); - Future deleteVolume(final ServerVolume volume); - Future getPricePerGb(); -} +mixin VolumeProviderApi on ApiMap {} diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index 5e5c145c..10ad943d 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -35,7 +35,7 @@ class ApiDevicesCubit } Future?> _getApiTokens() async { - final APIGenericResult> response = await api.getApiTokens(); + final GenericResult> response = await api.getApiTokens(); if (response.success) { return response.data; } else { @@ -44,8 +44,7 @@ class ApiDevicesCubit } Future deleteDevice(final ApiToken device) async { - final APIGenericResult response = - await api.deleteApiToken(device.name); + final GenericResult response = await api.deleteApiToken(device.name); if (response.success) { emit( ApiDevicesState( @@ -60,7 +59,7 @@ class ApiDevicesCubit } Future getNewDeviceKey() async { - final APIGenericResult response = await api.createDeviceToken(); + final GenericResult response = await api.createDeviceToken(); if (response.success) { return response.data; } else { diff --git a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart index 21d17a84..af20a8aa 100644 --- a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart @@ -40,7 +40,7 @@ class BackblazeFormCubit extends FormCubit { @override FutureOr asyncValidation() async { - late APIGenericResult backblazeResponse; + late GenericResult backblazeResponse; final BackblazeApi apiClient = BackblazeApi(isWithToken: false); try { @@ -51,7 +51,7 @@ class BackblazeFormCubit extends FormCubit { backblazeResponse = await apiClient.isApiTokenValid(encodedApiKey); } catch (e) { addError(e); - backblazeResponse = APIGenericResult( + backblazeResponse = GenericResult( success: false, data: false, message: e.toString(), diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index 56800be3..76a572d1 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -32,7 +32,7 @@ class RecoveryKeyCubit } Future _getRecoveryKeyStatus() async { - final APIGenericResult response = + final GenericResult response = await api.getRecoveryTokenStatus(); if (response.success) { return response.data; @@ -57,7 +57,7 @@ class RecoveryKeyCubit final DateTime? expirationDate, final int? numberOfUses, }) async { - final APIGenericResult response = + final GenericResult response = await api.generateRecoveryToken(expirationDate, numberOfUses); if (response.success) { refresh(); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index d6928e40..17d90764 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -77,8 +77,8 @@ class ServerInstallationCubit extends Cubit { Future isServerProviderApiTokenValid( final String providerToken, ) async { - final APIGenericResult apiResponse = - await ProvidersController.currentServerProvider!.isApiTokenValid( + final GenericResult apiResponse = + await ProvidersController.currentServerProvider!.tryInitApiByToken( providerToken, ); @@ -95,7 +95,7 @@ class ServerInstallationCubit extends Cubit { Future isDnsProviderApiTokenValid( final String providerToken, ) async { - final APIGenericResult apiResponse = + final GenericResult apiResponse = await ApiController.currentDnsProviderApiFactory! .getDnsProvider( settings: const DnsProviderApiSettings(isWithToken: false), @@ -117,7 +117,7 @@ class ServerInstallationCubit extends Cubit { return []; } - final APIGenericResult apiResponse = await ProvidersController + final GenericResult apiResponse = await ProvidersController .currentServerProvider! .getAvailableLocations(); @@ -137,7 +137,7 @@ class ServerInstallationCubit extends Cubit { return []; } - final APIGenericResult apiResult = await ProvidersController + final GenericResult apiResult = await ProvidersController .currentServerProvider! .getServerTypes(location: location); @@ -173,21 +173,8 @@ class ServerInstallationCubit extends Cubit { void setServerType(final ServerType serverType) async { await repository.saveServerType(serverType); - ApiController.initServerProviderApiFactory( - ServerProviderSettings( - provider: getIt().serverProvider!, - location: serverType.location.identifier, - ), - ); - - // All server providers support volumes for now, - // so it's safe to initialize. - ApiController.initVolumeProviderApiFactory( - ServerProviderSettings( - provider: getIt().serverProvider!, - location: serverType.location.identifier, - ), - ); + await ProvidersController.currentServerProvider! + .trySetServerType(serverType); emit( (state as ServerInstallationNotFinished).copyWith( diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 50eb7998..d60b2119 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -259,7 +259,7 @@ class ServerInstallationRepository { actionButtonOnPressed: () async { ServerHostingDetails? serverDetails; try { - final APIGenericResult createResult = await api.createServer( + final GenericResult createResult = await api.createServer( dnsProvider: getIt().dnsProvider!, dnsApiToken: cloudFlareKey, rootUser: rootUser, @@ -283,7 +283,7 @@ class ServerInstallationRepository { } try { - final APIGenericResult createServerResult = + final GenericResult createServerResult = await api.createServer( dnsProvider: getIt().dnsProvider!, dnsApiToken: cloudFlareKey, @@ -309,7 +309,7 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { - final APIGenericResult createResult = await api.createServer( + final GenericResult createResult = await api.createServer( dnsProvider: getIt().dnsProvider!, dnsApiToken: cloudFlareKey, rootUser: rootUser, @@ -366,7 +366,7 @@ class ServerInstallationRepository { ); } - final APIGenericResult removingResult = + final GenericResult removingResult = await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, domain: domain, @@ -380,7 +380,7 @@ class ServerInstallationRepository { bool createdSuccessfully = false; String errorMessage = 'domain.error'.tr(); try { - final APIGenericResult createResult = + final GenericResult createResult = await dnsProviderApi.createMultipleDnsRecords( ip4: serverDetails.ip4, domain: domain, @@ -397,8 +397,7 @@ class ServerInstallationRepository { return false; } - final APIGenericResult createReverseResult = - await serverApi.createReverseDns( + final GenericResult createReverseResult = await serverApi.createReverseDns( serverDetails: serverDetails, domain: domain, ); @@ -520,7 +519,7 @@ class ServerInstallationRepository { overrideDomain: serverDomain.domainName, ); final String serverIp = await getServerIpFromDomain(serverDomain); - final APIGenericResult result = await serverApi.authorizeDevice( + final GenericResult result = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: newDeviceKey), ); @@ -557,7 +556,7 @@ class ServerInstallationRepository { overrideDomain: serverDomain.domainName, ); final String serverIp = await getServerIpFromDomain(serverDomain); - final APIGenericResult result = await serverApi.useRecoveryToken( + final GenericResult result = await serverApi.useRecoveryToken( DeviceToken(device: await getDeviceName(), token: recoveryKey), ); @@ -618,9 +617,9 @@ class ServerInstallationRepository { ); } } - final APIGenericResult deviceAuthKey = + final GenericResult deviceAuthKey = await serverApi.createDeviceToken(); - final APIGenericResult result = await serverApi.authorizeDevice( + final GenericResult result = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), ); @@ -771,7 +770,7 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final APIGenericResult deletionResult = await ApiController + final GenericResult deletionResult = await ApiController .currentServerProviderApiFactory! .getServerProvider() .deleteServer( @@ -797,7 +796,7 @@ class ServerInstallationRepository { await box.put(BNames.isLoading, false); await box.put(BNames.serverDetails, null); - final APIGenericResult removalResult = await ApiController + final GenericResult removalResult = await ApiController .currentDnsProviderApiFactory! .getDnsProvider() .removeSimilarRecords(domain: serverDomain); diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 001ce8d0..de31cdcd 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -78,7 +78,7 @@ class UsersCubit extends ServerInstallationDependendCubit { return; } // If API returned error, do nothing - final APIGenericResult result = + final GenericResult result = await api.createUser(user.login, password); if (result.data == null) { getIt() @@ -101,7 +101,7 @@ class UsersCubit extends ServerInstallationDependendCubit { return; } final List loadedUsers = List.from(state.users); - final APIGenericResult result = await api.deleteUser(user.login); + final GenericResult result = await api.deleteUser(user.login); if (result.success && result.data) { loadedUsers.removeWhere((final User u) => u.login == user.login); await box.clear(); @@ -128,7 +128,7 @@ class UsersCubit extends ServerInstallationDependendCubit { .showSnackBar('users.could_not_change_password'.tr()); return; } - final APIGenericResult result = + final GenericResult result = await api.updateUser(user.login, newPassword); if (result.data == null) { getIt().showSnackBar( @@ -138,7 +138,7 @@ class UsersCubit extends ServerInstallationDependendCubit { } Future addSshKey(final User user, final String publicKey) async { - final APIGenericResult result = + final GenericResult result = await api.addSshKey(user.login, publicKey); if (result.data != null) { final User updatedUser = result.data!; @@ -157,7 +157,7 @@ class UsersCubit extends ServerInstallationDependendCubit { } Future deleteSshKey(final User user, final String publicKey) async { - final APIGenericResult result = + final GenericResult result = await api.removeSshKey(user.login, publicKey); if (result.data != null) { final User updatedUser = result.data!; diff --git a/lib/logic/models/server_metadata.dart b/lib/logic/models/server_metadata.dart index 0275a2ef..553fcbb5 100644 --- a/lib/logic/models/server_metadata.dart +++ b/lib/logic/models/server_metadata.dart @@ -19,11 +19,11 @@ enum MetadataType { class ServerMetadataEntity { ServerMetadataEntity({ - required this.name, + required this.trId, required this.value, this.type = MetadataType.other, }); final MetadataType type; - final String name; + final String trId; final String value; } diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index aca7f477..e5c1c1bf 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -1,12 +1,16 @@ -import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +export 'package:selfprivacy/logic/api_maps/generic_result.dart'; + abstract class ServerProvider { - Future> isApiTokenValid(final String apiToken); - Future>> - getAvailableLocations(); - Future>> getServerTypes({ + Future> trySetServerType(final ServerType type); + Future> tryInitApiByToken(final String token); + Future>> getAvailableLocations(); + Future>> getServerTypes({ required final ServerProviderLocation location, }); + + GenericResult get success => GenericResult(success: true, data: true); } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 2e4ff1e8..fdc8f11e 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -1,3 +1,390 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; +import 'package:selfprivacy/logic/models/price.dart'; +import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/utils/extensions/string_extensions.dart'; -class HetznerServerProvider extends ServerProvider {} +class ApiAdapter { + ApiAdapter({final String? region, final bool isWithToken = true}) + : _api = HetznerApi( + region: region, + isWithToken: isWithToken, + ); + + HetznerApi api({final bool getInitialized = true}) => getInitialized + ? _api + : HetznerApi( + region: _api.region, + isWithToken: false, + ); + + final HetznerApi _api; +} + +class HetznerServerProvider extends ServerProvider { + HetznerServerProvider() : _adapter = ApiAdapter(); + HetznerServerProvider.load( + final ServerType serverType, + final bool isAuthotized, + ) : _adapter = ApiAdapter( + isWithToken: isAuthotized, + region: serverType.location.identifier, + ); + + ApiAdapter _adapter; + + @override + Future> trySetServerType(final ServerType type) async { + final bool apiInitialized = _adapter.api().isWithToken; + if (!apiInitialized) { + return GenericResult( + success: true, + data: false, + message: 'Not authorized!', + ); + } + + _adapter = ApiAdapter( + isWithToken: true, + region: type.location.identifier, + ); + return success; + } + + @override + Future> tryInitApiByToken(final String token) async { + final api = _adapter.api(getInitialized: false); + final result = await api.isApiTokenValid(token); + if (!result.data || !result.success) { + return result; + } + + _adapter = ApiAdapter(region: api.region, isWithToken: true); + return result; + } + + String? getEmojiFlag(final String query) { + String? emoji; + + switch (query.toLowerCase()) { + case 'de': + emoji = '🇩🇪'; + break; + + case 'fi': + emoji = '🇫🇮'; + break; + + case 'us': + emoji = '🇺🇸'; + break; + } + + return emoji; + } + + @override + Future>> + getAvailableLocations() async { + final List locations = []; + final result = await _adapter.api().getAvailableLocations(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: locations, + code: result.code, + message: result.message, + ); + } + + final List rawLocations = result.data; + for (final rawLocation in rawLocations) { + ServerProviderLocation? location; + try { + location = ServerProviderLocation( + title: rawLocation['city'], + description: rawLocation['description'], + flag: getEmojiFlag(rawLocation['country']), + identifier: rawLocation['name'], + ); + } catch (e) { + continue; + } + locations.add(location); + } + + return GenericResult(success: true, data: locations); + } + + @override + Future>> getServerTypes({ + required final ServerProviderLocation location, + }) async { + final List types = []; + final result = await _adapter.api().getAvailableServerTypes(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: types, + code: result.code, + message: result.message, + ); + } + + final List rawTypes = result.data; + for (final rawType in rawTypes) { + for (final rawPrice in rawType['prices']) { + if (rawPrice['location'].toString() == location.identifier) { + types.add( + ServerType( + title: rawType['description'], + identifier: rawType['name'], + ram: rawType['memory'], + cores: rawType['cores'], + disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), + price: Price( + value: double.parse(rawPrice['price_monthly']['gross']), + currency: 'EUR', + ), + location: location, + ), + ); + } + } + } + + return GenericResult(success: true, data: types); + } + + Future> createReverseDns({ + required final ServerHostingDetails serverDetails, + required final ServerDomain domain, + }) async => + _adapter.api().createReverseDns( + serverId: serverDetails.id, + ip4: serverDetails.ip4, + dnsPtr: domain.domainName, + ); + + Future>> getServers() async { + final List servers = []; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: servers, + code: result.code, + message: result.message, + ); + } + + final List hetznerServers = result.data; + for (final hetznerServer in hetznerServers) { + if (hetznerServer.publicNet.ipv4 == null) { + continue; + } + + ServerBasicInfo? server; + try { + server = ServerBasicInfo( + id: hetznerServer.id, + name: hetznerServer.name, + ip: hetznerServer.publicNet.ipv4!.ip, + reverseDns: hetznerServer.publicNet.ipv4!.reverseDns, + created: hetznerServer.created, + ); + } catch (e) { + continue; + } + + servers.add(server); + } + + return GenericResult(success: true, data: servers); + } + + Future>> getMetadata( + final int serverId, + ) async { + List metadata = []; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: false, + data: metadata, + code: result.code, + message: result.message, + ); + } + + final List servers = result.data; + try { + final HetznerServerInfo server = servers.firstWhere( + (final server) => server.id == serverId, + ); + + metadata = [ + ServerMetadataEntity( + type: MetadataType.id, + trId: 'server.server_id', + value: server.id.toString(), + ), + ServerMetadataEntity( + type: MetadataType.status, + trId: 'server.status', + value: server.status.toString().split('.')[1].capitalize(), + ), + ServerMetadataEntity( + type: MetadataType.cpu, + trId: 'server.cpu', + value: server.serverType.cores.toString(), + ), + ServerMetadataEntity( + type: MetadataType.ram, + trId: 'server.ram', + value: '${server.serverType.memory.toString()} GB', + ), + ServerMetadataEntity( + type: MetadataType.cost, + trId: 'server.monthly_cost', + value: server.serverType.prices[1].monthly.toStringAsFixed(2), + ), + ServerMetadataEntity( + type: MetadataType.location, + trId: 'server.location', + value: '${server.location.city}, ${server.location.country}', + ), + ServerMetadataEntity( + type: MetadataType.other, + trId: 'server.provider', + value: _adapter.api().displayProviderName, + ), + ]; + } catch (e) { + return GenericResult( + success: false, + data: [], + message: e.toString(), + ); + } + + return GenericResult(success: true, data: metadata); + } + + Future> getMetrics( + final int serverId, + final DateTime start, + final DateTime end, + ) async { + ServerMetrics? metrics; + + List serializeTimeSeries( + final Map json, + final String type, + ) { + final List list = json['time_series'][type]['values']; + return list + .map((final el) => TimeSeriesData(el[0], double.parse(el[1]))) + .toList(); + } + + final cpuResult = await _adapter.api().getMetrics( + serverId, + start, + end, + 'cpu', + ); + if (cpuResult.data.isEmpty || !cpuResult.success) { + return GenericResult( + success: false, + data: metrics, + code: cpuResult.code, + message: cpuResult.message, + ); + } + + final netResult = await _adapter.api().getMetrics( + serverId, + start, + end, + 'network', + ); + + if (cpuResult.data.isEmpty || !netResult.success) { + return GenericResult( + success: false, + data: metrics, + code: netResult.code, + message: netResult.message, + ); + } + + metrics = ServerMetrics( + cpu: serializeTimeSeries( + cpuResult.data, + 'cpu', + ), + bandwidthIn: serializeTimeSeries( + netResult.data, + 'network.0.bandwidth.in', + ), + bandwidthOut: serializeTimeSeries( + netResult.data, + 'network.0.bandwidth.out', + ), + end: end, + start: start, + stepsInSecond: cpuResult.data['step'], + ); + + return GenericResult(data: metrics, success: true); + } + + Future> restart(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().restart(serverId); + if (!result.success) { + return GenericResult( + success: false, + data: timestamp, + code: result.code, + message: result.message, + ); + } + + timestamp = DateTime.now(); + + return GenericResult( + success: true, + data: timestamp, + ); + } + + Future> powerOn(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().powerOn(serverId); + if (!result.success) { + return GenericResult( + success: false, + data: timestamp, + code: result.code, + message: result.message, + ); + } + + timestamp = DateTime.now(); + + return GenericResult( + success: true, + data: timestamp, + ); + } +} diff --git a/lib/ui/pages/server_details/text_details.dart b/lib/ui/pages/server_details/text_details.dart index 5f447901..d8911b8c 100644 --- a/lib/ui/pages/server_details/text_details.dart +++ b/lib/ui/pages/server_details/text_details.dart @@ -27,7 +27,7 @@ class _TextDetails extends StatelessWidget { .map( (final metadata) => ListTileOnSurfaceVariant( leadingIcon: metadata.type.icon, - title: metadata.name, + title: metadata.trId.tr(), subtitle: metadata.value, ), ) From e99b08bcc380562d8b266ef1067caa6fe94aeeb5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 15 Feb 2023 11:03:13 +0400 Subject: [PATCH 359/732] fix: Improve DigitalOcean server types filtering - Convert RAM to GB - Don't let it droplets with RAM less than 1024 MB --- .../server_providers/digital_ocean/digital_ocean.dart | 5 +++-- lib/logic/models/server_type.dart | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 4beb53f7..b2f4c624 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -808,12 +808,13 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final rawSizes = response.data!['sizes']; for (final rawSize in rawSizes) { for (final rawRegion in rawSize['regions']) { - if (rawRegion.toString() == location.identifier) { + final ramMb = rawSize['memory'].toDouble(); + if (rawRegion.toString() == location.identifier && ramMb > 1024) { types.add( ServerType( title: rawSize['description'], identifier: rawSize['slug'], - ram: rawSize['memory'].toDouble(), + ram: ramMb / 1024, cores: rawSize['vcpus'], disk: DiskSize(byte: rawSize['disk'] * 1024 * 1024 * 1024), price: Price( diff --git a/lib/logic/models/server_type.dart b/lib/logic/models/server_type.dart index 4e7b8d92..3bdb9baa 100644 --- a/lib/logic/models/server_type.dart +++ b/lib/logic/models/server_type.dart @@ -14,7 +14,7 @@ class ServerType { }); final String title; final String identifier; - final double ram; + final double ram; // GB !! final DiskSize disk; final int cores; final Price price; From c43a8bc0476df039e8c167582de394eeb243a1ad Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 16 Feb 2023 20:47:27 +0200 Subject: [PATCH 360/732] try to fix fdroid metadata --- metadata/org.selfprivacy.app/en-US | 1 + 1 file changed, 1 insertion(+) create mode 120000 metadata/org.selfprivacy.app/en-US diff --git a/metadata/org.selfprivacy.app/en-US b/metadata/org.selfprivacy.app/en-US new file mode 120000 index 00000000..1bfd2c49 --- /dev/null +++ b/metadata/org.selfprivacy.app/en-US @@ -0,0 +1 @@ +../../fastlane/metadata/android/en-US \ No newline at end of file From 438bad3cd0238005d2afab92087a500c20f0db2f Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 16 Feb 2023 21:22:19 +0200 Subject: [PATCH 361/732] fix fdroid metadata --- metadata/org.selfprivacy.app/en-US | 1 - .../en-US/full_description.txt | 23 +++++++++++++++++++ .../en-US/short_description.txt | 1 + metadata/org.selfprivacy.app/en-US/title.txt | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) delete mode 120000 metadata/org.selfprivacy.app/en-US create mode 100644 metadata/org.selfprivacy.app/en-US/full_description.txt create mode 100644 metadata/org.selfprivacy.app/en-US/short_description.txt create mode 100644 metadata/org.selfprivacy.app/en-US/title.txt diff --git a/metadata/org.selfprivacy.app/en-US b/metadata/org.selfprivacy.app/en-US deleted file mode 120000 index 1bfd2c49..00000000 --- a/metadata/org.selfprivacy.app/en-US +++ /dev/null @@ -1 +0,0 @@ -../../fastlane/metadata/android/en-US \ No newline at end of file diff --git a/metadata/org.selfprivacy.app/en-US/full_description.txt b/metadata/org.selfprivacy.app/en-US/full_description.txt new file mode 100644 index 00000000..f5ba9142 --- /dev/null +++ b/metadata/org.selfprivacy.app/en-US/full_description.txt @@ -0,0 +1,23 @@ +

SelfPrivacy — is a platform on your cloud hosting, that allows to deploy your own private services and control them using mobile application.

+ +

To use this application, you'll be required to create accounts of different service providers. Please reffer to this manual: https://selfprivacy.org/en/second

+ +

Application will do the following things for you:

+ +
    +
  1. Create your personal server
  2. +
  3. Setup NixOS
  4. +
  5. Bring all services to the ready-to-use state. Services include:
  6. +
+ +
    +
  • E-mail, ready to use with DeltaChat
  • +
  • NextCloud — your personal cloud storage
  • +
  • Bitwarden — secure and private password manager
  • +
  • Pleroma — your private fediverse space for blogging
  • +
  • Jitsi — awesome Zoom alternative
  • +
  • Gitea — your own Git server
  • +
  • OpenConnect — Personal VPN server
  • +
+ +

Project is currently in open beta state. Feel free to try it. It would be much appreciated if you would provide us with some feedback.

diff --git a/metadata/org.selfprivacy.app/en-US/short_description.txt b/metadata/org.selfprivacy.app/en-US/short_description.txt new file mode 100644 index 00000000..18bbf5ab --- /dev/null +++ b/metadata/org.selfprivacy.app/en-US/short_description.txt @@ -0,0 +1 @@ +Self-hosted services without pain diff --git a/metadata/org.selfprivacy.app/en-US/title.txt b/metadata/org.selfprivacy.app/en-US/title.txt new file mode 100644 index 00000000..adc138c5 --- /dev/null +++ b/metadata/org.selfprivacy.app/en-US/title.txt @@ -0,0 +1 @@ +SelfPrivacy From 5d0519cb11867e3f12be685d9731fea46371f25b Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 16 Feb 2023 21:24:40 +0200 Subject: [PATCH 362/732] add fdroid images --- .../org.selfprivacy.app/en-US/images/icon.png | Bin 0 -> 8284 bytes .../en-US/images/phoneScreenshots/1.png | Bin 0 -> 61120 bytes .../en-US/images/phoneScreenshots/2.png | Bin 0 -> 79651 bytes .../en-US/images/phoneScreenshots/3.png | Bin 0 -> 52977 bytes .../en-US/images/phoneScreenshots/4.png | Bin 0 -> 44320 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 metadata/org.selfprivacy.app/en-US/images/icon.png create mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/1.png create mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/2.png create mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/3.png create mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/4.png diff --git a/metadata/org.selfprivacy.app/en-US/images/icon.png b/metadata/org.selfprivacy.app/en-US/images/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fee217d6b49efbef66fac02000f93eeedd48682a GIT binary patch literal 8284 zcmb7J2{e>#`+v}ik`O|KP(q@Vz3d^CkXWZWnTxd0jzns5uV3$*aG?Sa$fR%9-MmlKli2?t*raIm$GE&x*=#Y~p0}p8%6cVH?vnCL zxKvi5_$;C5Q%vpGlg3jLnG=2EZWI-soh4OCif7c_D4xCKJQcrTbex6yW`?u-LcB9W6z_VWYRK>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 HcmV?d00001 diff --git a/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/1.png b/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/1.png new file mode 100644 index 0000000000000000000000000000000000000000..3ffd726f9a8048521889f905557e2c16194c31c0 GIT binary patch literal 61120 zcmeFYXH=6-*C-r&K~$tkvrr`n+#mq~u|Yt^I)Mz z{|N{F4LklP{Q7Sghp^P=mHEJfFFpD<*zw=s0Kdn6yfO`cmv?%M`y1}(!Ph)J@PGI9 zclaCQ6E0pzI4{1>dnG}>AWM)D=r#}jKN|iup57!7=;|5>bl}au(j1dPppq9L&{^)k z(qun?K&So!fr{H7Kg2!!4`dGVe)qe&f(n9U(kAi zS4WaZr#J6;1o8m6fG&WHL0%vykO~h{2mJw318MH{f%HL#4<0&v=-}bQhYlY(a`@=+ z)5nh=J9b>?nYlrQ}ucS-Tm z-;L}$a^%SIqsIl09~ZnNE+T&E|99B?3=%kcD1ZO=1N)>w`vvwL5ZJf(4J5^zzWw_T z{LR__3`dS0I=t_|!Tra0*^Z|{`wkq~cktk0{zE5@96oUL0BGO-13YpBj-0uuc2w|| zg^=_^pJyy#(X;AWaHL;s+}n@&BDXE$3uLZnS~=qI&kMhF{*={6xRAbf$Z0^X`W894 zE*cmb{q-WF<{Q+1iPwktK3?zt1p{86hYlay&&yL5;H|g)Jal;Y9QaQJ_Z_g@e^5Y3 zIQHYAix$#qx6TOi5Xfi!T-@V=P8{G-BXB?fbOTiMWB)(?Nzwm}|2YDOQ(#52DrEUz z@Bftk_+%(|I!*}5a-gTY+SNjG7g?g{zB%^iSpc12Z*B-CCyXz{^XUv`!>@)?m)8GYE9* z(E5_sC!2{fd+bHh$7hf@_p}V#dV^J9(O^7V^<-;)OWU#WI+d=C!=H2F7(_-3Cy|De zCaFY`rs{8M{_!`lj=0otPGk?@tu>u@u(;D}tq|`O9}v{gy-9;2mr^6X=-w3(ESlBV zDs8_NHSkM^ewMi<_M;P;0WqAR_C&Nc93KC>nSX|TdE;f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(*2_+m>tpz|wM z^hr2!{8aQD2n3nG&QWY3T1eKGZ6VrIdJpyd(Sf61EQ#^eZX~LLL9TGGuz?M`^^l45 zkrxFO#-2qa^>M zTpayV%=84E&n4B@q9%@bmVyi#=D&aU{u?CP?=KZmsqELoAj$(rFZwvC8tdH;sNj3( zyZyJKWqDEwvzP8zjXB@;2AA3WN&+za9C+ZVxq53LX_4M3OyJ9X4ruZMko&A4$T8F zXMrTWJcYNlAs;*!o! z>kW#pT$^mwJZhrAJL)nR7=dMFzhqjqP2--eR-KMt_{|maTqI=HoA@c=sJ~KR_iU*fZG+ z%uu~w5{}UOBx%Otmy}B*i2v1f8KPtfgDop`qT3;anvHiM>stZuK?cRd|29MRjSuht Lg^s-R+sK~*ye5E< literal 0 HcmV?d00001 diff --git a/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/3.png b/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/3.png new file mode 100644 index 0000000000000000000000000000000000000000..e2024cbda144abb625b31a127c58a33696b8f67c GIT binary patch literal 52977 zcmeFZ2UJt*wkRA$EFdZ(9n?)HG${e;7D6vV5&|KB(g^|*no?~bMPLV|Ly#6yC{h9h z1hz^?Kmwtcjr0tg#Z}7m;_tD?*|KQ5VcW2;N?f^ia%zqI6|M%#ele4cQBhq)q;fH1rXB5_nfnRa` zH~jH0+~MEw*S~Ny)Z#89&N~J!;rb7_!$07GevkYZaoT>xcYK8Yg^w|C4bO-Ezi9n} zUnM^8>;;1`u2zgg0N@L-0O$ekFz|mV{JlQCa{+*x+W-L5?|*;hkOlx$M*sjkBY%G; z@(uvF_!0o9>Us14{ot>{oMN0$y0`!U8-)M>n>7Hy@f84IvH4p;|DN{mZSgx>C?=o&zw1ZmgN!) z%eiwbS1w#Ue~J4F4-fYhE-pSn(QADC!U9}e*QKuui-}7DC3&yO+>nvDAu1s$@hg)P zXU?2qIm^Pq!onfJ$Hgb{Uxwp90PJU(D^7l8Iw1r&$$o-~{lsw-K=4h;VL5T;?AcS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q?CpV?AM(E5}BnYrn{?i3uA^@1B>iOtYs6^LO`>lzC3 zobt}~71vH{x1kpr0f1d70wGkJ@tW{`#(}Vp0}cA&J#F-Bw;!rDprsd@7S%X>dKtAa zdV?lY+-rP5QVjw_3;QqJ%A&41@)L5?cLckhca1v8dl(4dK5tpTmWG>$L~Q)F=gDvX WqYmt^gZ{F>Ul#b^Vgb`XhW-zk``|hN literal 0 HcmV?d00001 diff --git a/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/4.png b/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/4.png new file mode 100644 index 0000000000000000000000000000000000000000..3d3b2b379aed7793ece27dffb5a68c427ea7f276 GIT binary patch literal 44320 zcmeFZ2UL^IwlEy@wSnl1G^JSR1Ob&^Ef9JOBm_cJnh=^K0VIGOqzDKINN5^b3M2vs z2oO*ZqzDKk^dd?PMd=CxUwqFx_dWmp&RySk&pF>(_h0MmXC=>`J$=ufJu`b|p1py+ zPk`S|42%r`92@`u2m1l+ecmTytf%KC-YzF$nW8X;t8}|JU0QmW%k=BOS&f3|- z&;FwQ6>hkpZv7SiJ8yQn8-2f02LO8I|BnCviFCx>1LejJ^o{*PBiWg=3+v9t`ELFN zzx@k${R{r&7mkEj>#@VUVB<13{|0yc8$1Mk3(XGG@+-XCE#xnJgpF(a`3C*U>lgeg z@lg+ds15sV$Nq@`PylOyA>bMt|Chp_{0zVW0P5=i!2YLy(p)nDfXYY!;N;MsG>I1g z!0|@_KtWusad6^56GO{wi65%*> z=n&^&PF_wu3FpP zNa7c`qy%*hy#MTFes@prHE}g0I=Qr5HRwS~+1ry6(kkjUsE4@M4U)?GpuCB1ZmG+V z;75(0**TnI=lu)*nmhabM-FT+F`mEpaQwFaul^i7C-&{G#FxF56VNz0*``5!4so%5A<~x{C$Ra= zbbNRtz)w}wGIv+*)0$HiY!5Kuh`ou-NhEmGeW3)*mN_d@!f@d+UnEQxXuBm#GixgJ zA`$#YYWH&7TO|cc|7`4R>fGtO4`0G&wju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;BFB(hHEe`EWJ uiuM=2U-k2|UlksfPA`Wm#|55A-~Pb)XW>85__J;N;~n&$9gUddk^cgC2RL>B literal 0 HcmV?d00001 From f5f1f919009f3a2645f2ccf14b23e162e5034d0f Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Fri, 17 Feb 2023 03:11:58 +0200 Subject: [PATCH 363/732] Make Windows builds --- .github/workflows/windows.yml | 29 +++++++++++++++++++++++++++++ ci.py | 14 ++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..c52968cd --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,29 @@ +name: Windows Builder + +on: tag + +jobs: + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + # Install Python dependencies + - run: pip install requests pyyaml + + # Install Flutter + - uses: subosito/flutter-action@v2 + with: + flutter-version: '3.3.10' + channel: 'stable' + + # Build Windows artifact + - run: flutter build windows + + # Archive the build + - run: python ci.py --package-windows-archive + + # Upload the build + - run: python ci.py --deploy-windows-archive + env: + GITEA_RELEASE_TOKEN: ${{ secrets.GITEA_RELEASE_TOKEN }} diff --git a/ci.py b/ci.py index a76f6654..b2403bfe 100755 --- a/ci.py +++ b/ci.py @@ -155,6 +155,13 @@ def deploy_gitea_release(): gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.flatpak") gitea_upload_attachment(f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.tar.zstd") +def package_windows_archive(): + import shutil + shutil.make_archive(f"selfprivacy-{APP_SEMVER}-win32", 'zip', "build/windows/runner/Release") + +def deploy_windows_archive(): + gitea_upload_attachment(f"selfprivacy-{APP_SEMVER}-win32.zip") + def deploy_fdroid_repo(): subprocess.run([f"""eval $(ssh-agent -s) && echo \"$SSH_PRIVATE_KEY\" | tr -d '\r' | ssh-add - && @@ -190,8 +197,10 @@ if __name__ == "__main__": group.add_argument("--package-linux-appimage", action="store_true") group.add_argument("--package-linux-flatpak", action="store_true") group.add_argument("--package-linux-archive", action="store_true") + group.add_argument("--package-windows-archive", action="store_true") group.add_argument("--deploy-gitea-release", action="store_true", help="depends on $GITEA_RELEASE_TOKEN") group.add_argument("--deploy-fdroid-repo", action="store_true", help="depends on $SSH_PRIVATE_KEY") + group.add_argument("--deploy-windows-archive", action="store_true") group.add_argument("--ci-build-linux", action="store_true") group.add_argument("--ci-build-apk", action="store_true") group.add_argument("--ci-run-tests", action="store_true") @@ -219,10 +228,14 @@ elif args.package_linux_flatpak: package_linux_flatpak() elif args.package_linux_archive: package_linux_archive() +elif args.package_windows_archive: + package_windows_archive() elif args.deploy_gitea_release: deploy_gitea_release() elif args.deploy_fdroid_repo: deploy_fdroid_repo() +elif args.deploy_windows_archive: + deploy_windows_archive() elif args.ci_build_linux: ci_build_linux() elif args.ci_build_apk: @@ -233,3 +246,4 @@ elif args.gitea_create_release: gitea_create_release() elif args.gitea_upload_attachment: gitea_upload_attachment(args.gitea_upload_attachment) + From 7d9981c2658b7135a5ad33565863d84ac6e45c5b Mon Sep 17 00:00:00 2001 From: Weblate Date: Sun, 29 Jan 2023 04:50:13 +0000 Subject: [PATCH 364/732] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/ --- assets/markdown/how_digital_ocean-ru.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/assets/markdown/how_digital_ocean-ru.md b/assets/markdown/how_digital_ocean-ru.md index 67ff04ff..dc6355c2 100644 --- a/assets/markdown/how_digital_ocean-ru.md +++ b/assets/markdown/how_digital_ocean-ru.md @@ -1,10 +1,12 @@ -### Как получить токен Digital Ocean API -1. Переходим по [ссылке](https://console.hetzner.cloud/) и авторизуемся в ранее созданном аккаунте. -2. Заходим в созданный нами проект. Если такового нет — значит создаём. -3. *Наводим мышкой на боковую панель.* Она должна раскрыться, показав нам пункты меню. Нас интересует последний — **Security** (с иконкой ключика). -4. Далее, в верхней части интерфейса видим примерно такой список: **SSH KEYS, API TOKENS, CERTIFICATES, MEMBERS.** Нам нужен **API TOKENS**. Переходим по нему. -5. По середине в интерфейсе, нас будет ожидать кнопка **GENERATE API TOKEN**. Нажимаем на эту кнопку. -6. В поле **Description** даём нашему токену название (это может быть любое название, которое Вам нравится, сути оно не меняет). -7. Под полем **Description** видим возможность выбрать разрешения **PERMISSIONS**. Выбираем **Read & Write**. -8. Нажимаем **GENERATE API TOKEN**. -9. После этого, появиться окно с вашим токеном. \ No newline at end of file +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file From 7d963ed0f2c1abc0fcfa57ce51aab76d851893b0 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Wed, 1 Feb 2023 14:40:59 +0000 Subject: [PATCH 365/732] Translated using Weblate (Polish) Currently translated at 38.7% (156 of 403 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index ddea4932..d177b23d 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -165,6 +165,24 @@ "create_new": "Utwórz nową kopię", "creating": "Tworzenie kopii: {}%", "restoring": "Przywracanie z kopii", - "waiting_for_rebuild": "Po kilku minutach będziesz mógł utworzyć pierwszą kopię." + "waiting_for_rebuild": "Po kilku minutach będziesz mógł utworzyć pierwszą kopię.", + "error_pending": "Serwer zwrócił błąd, sprawdź go poniżej", + "refresh": "Odśwież status", + "refetch_backups": "Ponownie pobierz listę kopii zapasowych", + "refetching_list": "Za kilka minut lista zostanie zaktualizowana", + "restore_alert": "Za chwilę przywrócisz z kopii utworzonej przez {}. Wszystkie bieżące dane zostaną utracone. Jesteś pewny?" + }, + "storage": { + "card_title": "Pamięć serwera", + "status_ok": "Użycie dysku jest OK", + "status_error": "Mało miejsca na dysku", + "disk_usage": "{} użyte", + "disk_total": "{} całkowity · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Bajty", + "extend_volume_button": "Rozwiń pamięć", + "extending_volume_title": "Rozszerzenie pamięci" } } From 4735d89556e109b446805bbb048191773a5ceff8 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 3 Feb 2023 21:40:58 +0000 Subject: [PATCH 366/732] Translated using Weblate (German) Currently translated at 46.2% (185 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/de/ --- assets/translations/de.json | 150 +++++++++++++++++++++++++++++++++++- 1 file changed, 149 insertions(+), 1 deletion(-) diff --git a/assets/translations/de.json b/assets/translations/de.json index 77e99a20..842967fe 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -74,6 +74,154 @@ "subtitle_with_keys": "{} Schlüssel", "subtitle_without_keys": "Keine Slüssel", "no_key_name": "Unbennanter Schlüssel", - "root_title": "Das sind superuser Schlüsseln" + "root_title": "Das sind superuser Schlüsseln", + "root_subtitle": "Besitzer dieser Schlüssel erhalten vollen Zugriff auf den Server und können alles darauf tun. Fügen Sie dem Server nur Ihre eigenen Schlüssel hinzu.", + "input_label": "Öffentlicher ED25519 oder RSA Schlüssel" + }, + "onboarding": { + "page2_server_provider_text": "Ein Serveranbieter unterhält Ihren Server in einem eigenen Rechenzentrum. SelfPrivacy verbindet sich automatisch mit dem Anbieter und richtet alle notwendigen Dinge ein.", + "page1_title": "Digitale Unabhägigkeit ist für jeden von uns verfügbar", + "page1_text": "E-Mail, VPN, Messenger, soziales Netzwerk und viel mehr auf Ihrem privaten Server unter Ihrer Kontrolle.", + "page2_title": "SelfPrivacy ist keine Cloud, sondern Ihr perönliches Rechenzentrum", + "page2_text": "SelfPrivacy funktioniert nur mit Providern Ihrer Wahl. Wenn Sie dort keine erforderlichen Konten haben, helfen wir Ihnen, sie zu erstellen.", + "page2_server_provider_title": "Serveranbieter", + "page2_dns_provider_title": "DNS-Provider", + "page2_backup_provider_title": "Backup-Provider", + "page2_dns_provider_text": "Sie brauchen einen Domainnamen, um im Internet zu sein. Sie benötigen außerdem einen zuverlässigen DNS-Provider, damit die Domain auf ihren Server verweist. Wir empfehlen Ihnen, einen unterstützten DNS-Anbieter auszuwählen, um das Netzwerk automatisch einzurichten. Wollen Sie es manuell einstellen? Das geht auch.", + "page2_backup_provider_text": "Was ist, wenn etwas mit Ihrem Server passiert? Stellen Sie sich einen Hackerangriff, eine versehentliche Datenlöschung oder DOS-Angriff vor? Ihre Daten werden bei Ihrem Anbieter von Backups sicher aufbewahrt. Sie werden sicher verschlüsselt und sind jederzeit zugänglich, um Ihren Server damit wiederherzustellen." + }, + "resource_chart": { + "month": "Monat", + "day": "Tag", + "hour": "Stunde", + "cpu_title": "CPU Auslastung", + "network_title": "Netzwerknutzung", + "in": "Empfangen", + "out": "Gesendet" + }, + "server": { + "card_title": "Server", + "description": "Dies ist ein virtueller Computer, auf dem alle Ihre Dienste ausgeführt werden", + "general_information": "Allgemeine Information", + "resource_usage": "Ressourcenverwendung", + "allow_autoupgrade": "Automatische Aktualisierung erlauben", + "allow_autoupgrade_hint": "Automatische Installation der Updates auf dem Server erlauben", + "reboot_after_upgrade": "Neustart nach der Aktualisierung", + "reboot_after_upgrade_hint": "Automatisch den Server neustarten nach der Anwendung der Aktualisierungen", + "server_timezone": "Server Zeitzone", + "select_timezone": "Zeitzone auswählen", + "timezone_search_bar": "Zeitzonenname oder Zeitverschiebungswert", + "server_id": "Server ID", + "status": "Status", + "cpu": "CPU", + "ram": "Arbeitsspeicher", + "disk": "Festplatte", + "monthly_cost": "Monatliche Kosten", + "location": "Standort", + "provider": "Provider", + "core_count": { + "one": "{} Kern", + "two": "{} Kerne", + "few": "{} Kerne", + "many": "{} Kerne", + "other": "{} Kerne" + } + }, + "record": { + "root": "Root Domain", + "api": "SelfPrivacy API", + "git": "Git Server", + "meet": "Videokonferenz", + "social": "Soziales Netzwerk", + "password": "Passwortmanager", + "vpn": "VPN", + "dkim": "DKIM Shlüssel", + "mx": "MX Eintrag", + "dmarc": "DMARC Eintrag", + "spf": "SPF Eintrag", + "cloud": "Datencloud" + }, + "domain": { + "screen_title": "Domäne und DNS", + "ok": "Aufnahmen sind in Ordnung", + "error": "Probleme gefunden", + "error_subtitle": "Tippen sie hier, um sie zu beheben", + "uninitialized": "Daten sind noch nicht vorhanden", + "services_title": "Dienste", + "email_title": "E-Mail", + "email_subtitle": "Für sicheren E-Mail-Austauch benötigte Einträge.", + "update_list": "Liste aktualisieren", + "card_title": "Domäne", + "refreshing": "Statusaktualisierung…", + "services_subtitle": "Einträge vom Typ \"A\", die für jeden Dienst erfordelich sind." + }, + "backup": { + "card_title": "Backup", + "description": "Retten Sie im Falle eines Hackerangriffs, Serverlöschung usw.", + "reupload_key": "Erneute Hochladung des Schlüssels erzwingen", + "reuploaded_key": "Schlüssel auf dem Server wurde Aktualisiert", + "initialize": "Initialisieren", + "restore": "Von der Sicherungskopie wiederherstellen", + "no_backups": "Backups sind noch nicht vorhanden", + "create_new": "Neuen Backup erstellen", + "creating": "Erstellung eines neuen Backups: {}%", + "restoring": "Wiederherstellung aus Backups", + "restore_alert": "Sie sind dabei die am {} erstellten Backup wiederherzutellen. Alle aktuelle Daten gehen dabei verloren. Sind Sie sicher?", + "refresh": "Status Aktualisieren", + "refetch_backups": "Backupliste neuladen", + "waiting_for_rebuild": "In wenigen Minuten können Sie Ihren ersten Backup erstellen.", + "error_pending": "Server hat einen Fehler zurückgegeben, überprüfen Sie es unten", + "refetching_list": "In wenigen Minuten wird die Liste neugeladen" + }, + "storage": { + "card_title": "Serverspeicher", + "status_ok": "Die Festplattennutzung ist in Ordnung", + "status_error": "Geringer Speicherplatz", + "disk_usage": "{} belegt", + "disk_total": "{} insgesamt · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Byte", + "extend_volume_button": "Speicher erweitern", + "extending_volume_title": "Speichererweiterung", + "extending_volume_description": "Durch die Speichererweiterung können Sie mehr Daten auf Ihrem Server speichern, ohne den Server selbst zu erweitern. Speicher kann nur erweitert werden, Verringerung ist nicht möglich.", + "extending_volume_error": "Speichererweiterung konnte nicht initialisiert werden.", + "size": "Größe", + "euro": "Euro", + "data_migration_title": "Datenmigration", + "data_migration_notice": "Während der Migration werden alle Dienste ausgeschaltet.", + "start_migration_button": "Migration starten", + "migration_process": "Migrieren…", + "migration_done": "Beenden", + "extending_volume_price_info": "Der Preis enthält die gesetzliche Mehrwertsteuer und wird anhand der von Hetzner bereitgestellten Preisangaben geschätzt. Der Server wird nach der Größenänderung neu gestartet." + }, + "not_ready_card": { + "in_menu": "Server ist noch nicht eingerichtet. Bitte beenden Sie die Einrichtung mit dem Einrichtungsassistenten, um fortzufahren." + }, + "service_page": { + "enable": "Dienst aktivieren", + "status": { + "deactivating": "Wird deaktiviert", + "active": "In Betrieb", + "inactive": "Gestoppt", + "failed": "Fehler beim Starten", + "off": "Deaktiviert", + "activating": "Wird aktiviert", + "reloading": "Wird neugestartet" + }, + "open_in_browser": "Im Browser öffnen", + "restart": "Dienst neustarten", + "disable": "Dienst ausschalten", + "move": "Zu einer anderen Festplatte wechseln", + "uses": "Belegt {usage} auf {volume}" + }, + "mail": { + "login_info": "Verwenden Sie den Benutzernamen und das Passwort von dem Benutzertab. IMAP-Port ist 143 mit STARTTLS, SMTP-Port ist 587 mit STARTTLS.", + "title": "E-Mail", + "subtitle": "E-Mail für Familie und Unternehmen." + }, + "password_manager": { + "title": "Passwortmanager" } } From c37ad33fe28b39bc8a0f62f3e0ace3486d660ce2 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 8 Feb 2023 12:33:52 +0000 Subject: [PATCH 367/732] Added translation using Weblate (Macedonian) --- assets/translations/mk.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/translations/mk.json diff --git a/assets/translations/mk.json b/assets/translations/mk.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/mk.json @@ -0,0 +1 @@ +{} From bc434439ef7c41786b525c126e1971961100c1e1 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 7 Feb 2023 19:27:11 +0000 Subject: [PATCH 368/732] Translated using Weblate (Russian) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index a26808ed..6ea09201 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -267,7 +267,7 @@ "refresh_users": "Обновить список пользователей", "could_not_create_user": "Не удалось создать пользователя", "could_not_delete_user": "Не удалось стереть пользователя", - "could_not_add_ssh_key": "Не удалось создать SSH ключить", + "could_not_add_ssh_key": "Не удалось создать SSH ключ", "username_rule": "Имя может содержать только маленькие латинские буквы, цифры, подчёркивания, не может начинаться с цифр", "email_login": "Авторизация по Email", "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." From f731b4284b6daf1670ce7a35e36a13b737ed27de Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 7 Feb 2023 19:34:11 +0000 Subject: [PATCH 369/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/be/ --- assets/translations/be.json | 477 +++++++++++++++++++++++++++++++++++- 1 file changed, 476 insertions(+), 1 deletion(-) diff --git a/assets/translations/be.json b/assets/translations/be.json index 0967ef42..efe560c9 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -1 +1,476 @@ -{} +{ + "initializing": { + "how": "Як атрымаць API токен", + "provider_bad_key_error": "Няверны API ключ правайдэра", + "could_not_connect": "Не ўдалося злучыцца з правайдэрам.", + "choose_location_type": "Дзе замовіць сервер?", + "choose_location_type_text": "Ад выбару лакацыі будуць залежаць даступныя канфігурацыі, кошты і хуткасць вашага злучэння з серверам.", + "locations_not_found": "Ой!", + "back_to_locations": "Выбраць іншы", + "no_locations_found": "Не знойдзена лакацый, пераканайцеся, што ваш рахунак даступны", + "choose_server_type": "Які тып сервера выбраць?", + "choose_server_type_ram": "{} GB RAM", + "choose_server_type_payment_per_month": "{} у месяц", + "no_server_types_found": "Не знойдзена даступных тыпаў сервера! Калі ласка, пераканайцеся, што ў вас ёсць доступ да правайдэра сервера...", + "cloudflare_bad_key_error": "Cloudflare API ключ няправільны", + "backblaze_bad_key_error": "Інфармацыя аб Backblaze сховішча няслушная", + "select_dns": "Цяпер давайце выберам DNS-правайдэра", + "what": "Што гэта значыць?", + "server_rebooted": "Сервер перазагружаны, чакаем апошнюю праверку…", + "server_created": "Сервер створаны. Ідзе праверка DNS адрасоў і запуск сервера…", + "until_the_next_check": "Да наступнай праверкі: ", + "check": "Праверка", + "create_master_account": "Стварыце галоўны ўліковы запіс", + "enter_username_and_password": "Увядзіце імя карыстальніка і складаны пароль", + "finish": "Усё ініцыялізавана", + "checks": "Праверак выканана: \n{} / {}", + "choose_server_type_storage": "{} GB сістэмнага сховішча", + "locations_not_found_text": "У гэтым месцы не аказалася даступных сервераў для арэнды", + "choose_server_type_text": "Ад рэсурсаў сервера залежыць, якія сервісы змогуць запусціцца. Пашырыць сервер можна будзе ў любы час", + "choose_server_type_notice": "Галоўнае, на што варта звярнуць увагу - колькасць патокаў працэсара і аб'ём аператыўнай памяці. Дадзеныя сэрвісаў будуць размешчаны на асобным дыску, які аплачваецца асобна і лёгка пашыраем.", + "server_started": "Сервер запушчаны. Цяпер ён будзе правераны і перагружаны…", + "one_more_restart": "Цяпер будзе дадатковая перазагрузка для актывацыі сертыфікатаў бяспекі.", + "manage_domain_dns": "Для кіравання DNS вашага дамена", + "use_this_domain": "Ужываем гэты дамен?", + "use_this_domain_text": "Указаны вамі токен дае кантроль над гэтым даменам", + "cloudflare_api_token": "CloudFlare API ключ", + "connect_backblaze_storage": "Падлучыце хмарнае сховішча Backblaze", + "no_connected_domains": "У дадзены момант падлучаных даменаў няма", + "loading_domain_list": "Загружаем спіс даменаў", + "found_more_domains": "Знойдзена больш аднаго дамена, для вашай бяспекі, просім Вам выдаліць не патрэбныя дамены", + "save_domain": "Захаваць дамен", + "final": "Апошні крок", + "create_server": "Стварыць сервер", + "connect_to_server": "Пачнём з сервера.", + "select_provider": "Ніжэй падборка правайдэраў, якіх падтрымлівае SelfPrivacy", + "select_provider_notice": "Пад 'Невялікім серверам' маецца на ўвазе сервер з двума струменямі працэсара і двума гігабайтамі аператыўнай памяці.", + "select_provider_countries_title": "Даступныя краіны", + "select_provider_countries_text_hetzner": "Германія, Фінляндыя, ЗША", + "select_provider_countries_text_do": "ЗША, Нідэрланды, Сінгапур, Вялікабрытанія, Германія, Канада, Індыя, Аўстралія", + "select_provider_price_title": "Сярэдні кошт", + "select_provider_price_text_hetzner": "€8 у месяц за невялікі сервер і 50GB месцы на дыску", + "select_provider_price_text_do": "$17 у месяц за невялікі сервер і 50GB месцы на дыску", + "select_provider_payment_title": "Метады аплаты", + "select_provider_payment_text_hetzner": "Банкаўскія карты, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Банкаўскія карты, Google Pay, PayPal", + "select_provider_email_notice": "Хостынг электроннай пошты недаступны для новых кліентаў. Разблакаваць можна будзе пасля першай аплаты.", + "select_provider_site_button": "Наведаць сайт", + "connect_to_server_provider": "Аўтарызавацца ў ", + "connect_to_server_provider_text": "З дапамогай API токена праграма SelfPrivacy зможа ад вашага імя замовіць і наладзіць сервер" + }, + "recovering": { + "generic_error": "Памылка правядзення аперацыі, паспрабуйце яшчэ раз.", + "recovery_main_header": "Падключыцца да існуючага сервера", + "domain_recovery_description": "Увядзіце дамен, па якім вы жадаеце атрымаць доступ да сервера:", + "domain_recover_placeholder": "Дамен", + "domain_recover_error": "Не удалося знайсці сервер з такім даменам", + "method_select_description": "Выбярыце спосаб уваходу:", + "method_select_other_device": "У мяне ёсць доступ на іншай прыладзе", + "method_select_recovery_key": "У мяне ёсць ключ аднаўлення", + "method_select_nothing": "У мяне нічога з гэтага няма", + "method_device_description": "Адкрыйце прыкладанне на іншай прыладзе і адкрыйце экран кіравання прыладамі. Націсніце \"Дадаць прыладу\" каб атрымаць токен для аўтарызацыі.", + "method_device_button": "Я атрымаў токен", + "method_device_input_placeholder": "Токен", + "method_recovery_input_description": "Увядзіце ваш токен аднаўлення", + "method_device_input_description": "Увядзіце ваш токен аўтарызацыі", + "fallback_select_description": "Што ў вас з гэтага ёсць? Абярыце першае, што падыходзіць:", + "fallback_select_token_copy": "Копія токена аўтарызацыі з іншай версіі праграмы.", + "fallback_select_root_ssh": "Каранёвы доступ да сервера праз SSH.", + "authorization_failed": "Не ўдалося ўвайсці з гэтым ключом", + "fallback_select_provider_console_hint": "Напрыклад, Hetzner.", + "server_provider_connected": "Падлучэнне да вашага сервернага правайдэра", + "server_provider_connected_placeholder": "Токен сервернага правайдэра", + "confirm_server": "Пацвердзіце сервер", + "confirm_server_description": "Знайшлі сервер! Пацьвердзіце, што гэта ён:", + "confirm_server_accept": "Да, гэта ён", + "confirm_server_decline": "Выбраць іншы сервер", + "choose_server_description": "Не атрымалася вызначыць, з якім серверам вы ўсталёўваеце сувязь.", + "domain_not_available_on_token": "Уведзены токен не мае доступу да патрэбнага дамену.", + "modal_confirmation_title": "Гэта сапраўды ваш сэрвер?", + "modal_confirmation_dns_valid": "Зваротны DNS карэктны", + "modal_confirmation_dns_invalid": "Зваротны DNS паказвае на іншы дамен", + "modal_confirmation_ip_invalid": "IP не супадае з паказаным у DNS запісу", + "confirm_backblaze": "Падключэнне да Backblaze", + "confirm_backblaze_description": "Увядзіце токен Backblaze, які мае правы на сховішча рэзервовых копій:", + "fallback_select_provider_console": "Доступ да кансолі хостынгу.", + "server_provider_connected_description": "Сувязь устаноўлена. Увядзіце свой токен з доступам да {}:", + "choose_server": "Выберыце сервер", + "no_servers": "На вашым акаўнце няма даступных сэрвэраў.", + "modal_confirmation_description": "Падлучэнне да няправільнага сервера можа прывесці да дэструктыўных наступстваў.", + "modal_confirmation_ip_valid": "IP супадае з паказаным у DNS запісу", + "confirm_cloudflare": "Падключэнне да Cloudflare", + "confirm_cloudflare_description": "Увядзіце токен Cloudflare, які мае правы на {}:" + }, + "devices": { + "main_screen": { + "header": "Прылады", + "this_device": "Гэта прылада", + "other_devices": "Іншыя прылады", + "authorize_new_device": "Аўтарызаваць новую прыладу", + "access_granted_on": "Доступ выдадзены {}", + "tip": "Націсніце на прыладу, каб адклікаць доступ.", + "description": "Гэтыя прылады маюць поўны доступ да кіравання серверам праз прыкладанне SelfPrivacy." + }, + "add_new_device_screen": { + "description": "Увядзіце гэты ключ на новай прыладзе:", + "expired": "Тэрмін дзеяння ключа скончыўся.", + "get_new_key": "Атрымаць новы ключ", + "header": "Аўтарызацыя новай прылады", + "please_wait": "Калі ласка, пачакайце", + "tip": "Ключ сапраўдны 10 хвілін." + }, + "revoke_device_alert": { + "header": "Адклікаць доступ?", + "yes": "Адклікаць", + "no": "Адменіць", + "description": "Прылада {} больш не зможа кіраваць серверам." + } + }, + "test": "by-test", + "locale": "by", + "basis": { + "providers": "Правайдэр", + "providers_title": "Ваш Дата Цэнтр", + "select": "Выбраць", + "services_title": "Вашы асабістыя, прыватныя і незалежныя сэрвісы.", + "next": "Далей", + "delete": "Выдаліць", + "later": "Прапусціць і наладзіць потым", + "no_data": "Няма дадзеных", + "services": "Сэрвісы", + "users": "Ужыткоўнікі", + "more": "Дадаткова", + "got_it": "Зразумеў", + "settings": "Налады", + "password": "Пароль", + "create": "Cтварыць", + "confirmation": "Пацверджанне", + "cancel": "Адмяніць", + "close": "Закрыць", + "connect": "Падключыць", + "domain": "Дамен", + "saving": "Захаванне…", + "username": "Імя ўжыткоўніка", + "loading": "Загрузка…", + "connect_to_existing": "Падключыцца да існуючага сервера", + "reset": "Скінуць", + "details": "Падрабязная інфармацыя", + "wait": "Пачакайце", + "remove": "Выдаліць", + "apply": "Ужыць", + "done": "Гатова", + "continue": "Працягнуць", + "alert": "Паведамленне" + }, + "recovery_key": { + "key_connection_error": "Не ўдалося злучыцца з серверам.", + "key_synchronizing": "Сінхранізацыя…", + "key_main_header": "Ключ аднаўлення", + "key_amount_toggle": "Абмежаваць выкарыстання", + "key_amount_field_title": "Макс. кольк-ць ужыванняў", + "key_duedate_toggle": "Абмежаваць тэрмін выкарыстання", + "key_duedate_field_title": "Дата заканчэння тэрміну дзеяння", + "key_receive_button": "Атрымаць ключ", + "key_valid": "Ваш ключ сапраўдны", + "key_invalid": "Ваш ключ больш не сапраўдны", + "key_valid_until": "Дзейнічае да {}", + "key_creation_date": "Створаны {}", + "key_replace_button": "Згенераваць новы ключ", + "key_receiving_done": "Зроблена!", + "generation_error": "Не ўдалося згенераваць ключ. {}", + "key_main_description": "Неабходна для аўтарызацыі SelfPrivacy, калі аўтарызаваныя прылады недаступныя.", + "key_valid_for": "Можна выкарыстоўваць яшчэ {} раз", + "key_receiving_description": "Запішыце гэты ключ у бяспечным месцы. Ён дае поўны доступ да вашага сервера:", + "key_receiving_info": "Гэты ключ больш не будзе паказаны, але вы зможаце замяніць яго новым." + }, + "modals": { + "server_validators_error": "Не ўдалося атрымаць спіс сервераў.", + "already_exists": "Такі сервер ужо існуе.", + "destroy_server": "Знішчыць сервер і стварыць новы?", + "try_again": "Паспрабаваць яшчэ раз?", + "are_you_sure": "Вы ўпэўнены?", + "purge_all_keys": "Сцерці ўсе ключы аўтарызацыі?", + "purge_all_keys_confirm": "Так, сцерці ўсе ключы", + "reboot": "Перазагрузіць", + "you_cant_use_this_api": "Нельга выкарыстоўваць гэты API для дамен з падобным TLD.", + "yes": "Да", + "no": "Не", + "dns_removal_error": "Немагчыма выдаліць запісы DNS.", + "server_deletion_error": "Немагчыма выдаліць сервер.", + "unexpected_error": "Непрадбачаная памылка з боку правайдэра.", + "delete_server_volume": "Выдаліць сервер і сховішча?" + }, + "timer": { + "sec": "{} сек" + }, + "jobs": { + "title": "Задачы", + "start": "Пачаць выкананне", + "empty": "Задач няма", + "delete_user": "Выдаліць карыстальніка", + "service_turn_off": "Спыніць", + "service_turn_on": "Запусціць", + "job_added": "Задача дададзена", + "run_jobs": "Запусціце задачы", + "reboot_success": "Сервер перазагружаецца", + "reboot_failed": "Не ўдалося перазагрузіць сервер, праверце логі.", + "upgrade_success": "Запушчана абнаўленне сервера", + "upgrade_failed": "Абнавіць сервер не выйшла", + "upgrade_server": "Абнавіць сервер", + "create_ssh_key": "Стварыць SSH ключ для {}", + "delete_ssh_key": "Выдаліць SSH ключ для {}", + "server_jobs": "Задачы на серверы", + "generic_error": "Не ўдалося падключыцца да сервера!", + "create_user": "Стварыць карыстальніка", + "config_pull_failed": "Не ўдалося абнавіць канфігурацыю сервера. Абнаўленне ПЗ запушчана.", + "reset_user_password": "Скінуць пароль карыстальніка", + "reboot_server": "Перазагрузіць сервер" + }, + "more_page": { + "configuration_wizard": "Майстар наладкі", + "application_settings": "Налады праграмы", + "about_project": "Аб праекце SelfPrivacy", + "about_application": "Аб праграме", + "onboarding": "Прівітанне", + "create_ssh_key": "SSH ключы адміністратара", + "console": "Кансоль" + }, + "about_application_page": { + "application_version_text": "Версія праграмы v.{}", + "title": "Аб праграме", + "api_version_text": "Версія API сервера v.{}", + "privacy_policy": "Палітыка прыватнасці" + }, + "application_settings": { + "reset_config_description": "Скінуць API ключы i суперкарыстальніка", + "delete_server_description": "Дзеянне прывядзе да выдалення сервера. Пасля гэтага ён будзе недаступны.", + "title": "Налады праграмы", + "dark_theme_title": "Цёмная тэма", + "dark_theme_description": "Змяніць каляровую тэму", + "reset_config_title": "Скід налад", + "delete_server_title": "Выдаліць сервер" + }, + "ssh": { + "root_subtitle": "Уладальнікі паказаных тут ключоў атрымліваюць поўны доступ да дадзеных і налад сервера. Дадавайце выключна свае ключы.", + "title": "SSH ключы", + "create": "Дадаць SSH ключ", + "delete": "Выдаліць SSH ключ", + "delete_confirm_question": "Вы ўпэўненыя, што хочаце выдаліць наступны ключ?", + "subtitle_with_keys": "Ключэй: {}", + "subtitle_without_keys": "Ключэй няма", + "no_key_name": "Безназоўны ключ", + "root_title": "Гэта ключы суперкарыстальніка", + "input_label": "Публічны ED25519 або RSA ключ" + }, + "onboarding": { + "page1_title": "Лічбавая незалежнасць, даступная ўсім нам", + "page1_text": "Почта, VPN, Пасыльнік, социальная сеть и многое другое на Вашем личном сервере, под Вашим полным контролем.", + "page2_server_provider_text": "Сервер-правайдэр будзе абслугоўваць ваш сервер у сваім дата-цэнтры. SelfPrivacy аўтаматычна далучыцца да яго і наладзіць вам сервер.", + "page2_dns_provider_text": "Вам патрэбен дамен, каб мець месца ў Інтэрнеце. Вам таксама патрэбен надзейны пастаўшчык DNS, каб дамен паказваў на ваш сервер. Мы прапануем вам выбраць падтрымоўванага пастаўшчыка DNS для аўтаматычнай налады сеткі.", + "page2_backup_provider_text": "Што рабіць, калі нешта здарыцца з вашым серверам? Уявіце сабе хакерскую атаку, выпадковае выдаленне даных або адмову ў абслугоўванні? Вашы дадзеныя будуць захоўвацца ў бяспецы ў пастаўшчыка рэзервовых копій. Яны будуць надзейна зашыфраваны і даступныя для аднаўлення вашага сервера ў любы час.", + "page2_title": "SelfPrivacy - гэта не воблака, а ваш асабісты дата-цэнтр", + "page2_text": "SelfPrivacy працуе толькі з сэрвіс-правайдэрамі на ваш выбар. Калі ў Вас няма ўліковых запісаў, мы дапаможам іх стварыць.", + "page2_server_provider_title": "Сервер-правайдэр", + "page2_dns_provider_title": "DNS-правайдэр", + "page2_backup_provider_title": "Бэкап-правайдэр" + }, + "record": { + "api": "SelfPrivacy API", + "social": "Сацыяльная сетка", + "password": "Менеджэр пароляў", + "root": "Каранёвы дамен", + "cloud": "Файлавае воблака", + "git": "Git сервер", + "meet": "Відэаканферэнцыі", + "vpn": "VPN", + "mx": "Запіс MX", + "dmarc": "Запіс DMARC", + "spf": "Запіс SPF", + "dkim": "DKIM ключ" + }, + "domain": { + "error": "Праблемы знойдзены", + "uninitialized": "Дадзеныя яшчэ не атрыманы", + "email_subtitle": "Запісы неабходныя для бяспечнага абмену электроннай поштай.", + "card_title": "Дамен", + "screen_title": "Дамен і DNS", + "ok": "Запісы ў парадку", + "error_subtitle": "Націсніце тут, каб выправіць іх", + "refreshing": "Абнаўленне дадзеных…", + "services_title": "Сэрвісы", + "services_subtitle": "Запісы тыпу \"A\" неабходныя для працы сэрвісаў.", + "email_title": "Электронная пошта", + "update_list": "Абнавіць спіс" + }, + "backup": { + "description": "Выручыць Вас у любой сітуацыі: хакерская атака, выдаленне сервера і г.д.", + "no_backups": "Рэзервовых копій пакуль няма", + "error_pending": "Сервер вярнуў памылку, праверце яе ніжэй", + "restore_alert": "Вы збіраецеся аднавіць з рэзервовай копіі, створанай {}. Усе бягучыя даныя будуць страчаны. Вы ўпэўнены?", + "card_title": "Рэзервовае капіраванне", + "reupload_key": "Прымусова абнавіць ключ", + "reuploaded_key": "Ключ на серверы абноўлены", + "initialize": "Ініцыялізаваць", + "waiting_for_rebuild": "Вы зможаце стварыць першую рэзервовую копію праз некалькі хвілін.", + "restore": "Аднавіць з рэзервовай копіі", + "create_new": "Стварыць новую рэзервовую копію", + "creating": "Стварэнне новай рэзервовай копіі: {}%", + "restoring": "Аднаўленне з рэзервовай копіі", + "refresh": "Абнавіць статус", + "refetch_backups": "Абнавіць спіс копій", + "refetching_list": "Праз некалькі хвілін спіс будзе абноўлены" + }, + "validations": { + "required": "Абавязковае поле", + "already_exist": "Ужо існуе", + "invalid_format_password": "Павінен не змяшчаць пустыя сімвалы", + "root_name": "Імя карыстальніка не можа быць 'root'", + "length_not_equal": "Даўжыня радка [], павінна быць роўна {}", + "length_longer": "Даўжыня радка [], павінна быць менш або роўна {}", + "invalid_format": "Няправільны фармат", + "invalid_format_ssh": "Павінен прытрымлівацца фармату SSH ключоў" + }, + "storage": { + "extending_volume_title": "Пашырэнне сховішча", + "extending_volume_description": "Змяненне памеру сховішча дазволіць вам трымаць больш дадзеных на вашым серверы без пашырэння самога сервера. Аб'ём можна толькі павялічыць: зменшыць aб'ём не мажліва.", + "status_ok": "Праблем на дыску не знайдзена", + "status_error": "Мала месца на дыску", + "disk_usage": "{} выкарыстана", + "disk_total": "{} усяго · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Байт", + "extend_volume_button": "Пашырыць сховішча", + "extending_volume_price_info": "Кошт уключае ПДВ і ацэньваецца на аснове дадзеных аб цэнах, прадстаўленых Hetzner. Сервер будзе перагружаны падчас працэсу.", + "extending_volume_error": "Не ўдалося ініцыялізаваць пашырэнне тома.", + "size": "Памер", + "euro": "Еўро", + "data_migration_title": "Міграцыя дадзеных", + "card_title": "Сховішча", + "data_migration_notice": "Падчас міграцыі ўсе службы будуць адключаны.", + "start_migration_button": "Пачаць міграцыю", + "migration_process": "Мігруем…", + "migration_done": "Скончыць" + }, + "service_page": { + "status": { + "active": "Запушчаны і працуе", + "inactive": "Астаноўлены", + "failed": "Не ўдалося запусціць", + "off": "Адключана", + "activating": "Уключаецца", + "deactivating": "Выключаецца", + "reloading": "Перазапускаецца" + }, + "open_in_browser": "Адкрыць у браўзэры", + "restart": "Перазапусціць сэрвіс", + "disable": "Выключыць сэрвіс", + "enable": "Уключыць сэрвіс", + "move": "Перамясціць на іншы дыск", + "uses": "Выкарыстоўвае {usage} на {volume}" + }, + "console_page": { + "title": "Кансоль", + "waiting": "Чакаем ініцыялізацыі…" + }, + "about_us_page": { + "title": "Аб праекце SelfPrivacy" + }, + "resource_chart": { + "month": "Месяц", + "day": "Дзень", + "hour": "Гадзіна", + "cpu_title": "Выкарыстанне працэсара", + "network_title": "Выкарыстанне сеткі", + "in": "Атрымлена", + "out": "Адпраўлена" + }, + "server": { + "card_title": "Сервер", + "description": "Гэта віртуальны кампутар на якім працуюць усе вашыя сэрвісы", + "general_information": "Агульная інфармацыя", + "resource_usage": "Ужыванне рэсурсаў", + "allow_autoupgrade": "Дазволіць аўта-абнаўленні", + "allow_autoupgrade_hint": "Дазволіць аўтаматычную ўстаноўку абнаўленняў на сервер", + "reboot_after_upgrade": "Перазагружаць пасля абнаўленняў", + "reboot_after_upgrade_hint": "Аўтаматычна перазагружаць сервер пасля прымянення абнаўленняў", + "server_timezone": "Часавы пояс сервера", + "select_timezone": "Абярыце гадзінны пояс", + "timezone_search_bar": "Назва гадзіннага пояса або значэнне зруху часу", + "server_id": "ID сервера", + "status": "Статус", + "cpu": "Працэсар", + "ram": "Аператыўная памяць", + "disk": "Дыск", + "monthly_cost": "Штомесячны кошт", + "location": "Размяшчэнне", + "provider": "Правайдэр", + "core_count": { + "one": "{} ядро", + "two": "{} ядра", + "few": "{} ядра", + "many": "{} ядраў", + "other": "{} ядраў" + } + }, + "not_ready_card": { + "in_menu": "Сервер яшчэ не наладжаны. Калі ласка, завяршыце наладку з дапамогай майстра наладкі для далейшай працы." + }, + "mail": { + "login_info": "Выкарыстоўвайце лагін і пароль з укладкі ўжытоўнікаў. IMAP порт: 143, STARTTLS. SMTP порт: 587, STARTTLS.", + "title": "Пошта", + "subtitle": "Электронная пошта для сям'і або кампаніі." + }, + "password_manager": { + "subtitle": "Гэта база вашай бяспекі. Bitwarden дапаможа вам ствараць, захоўваць і перамяшчаць паролі паміж прыладамі, а таксама ўводзіць іх па запыце з дапамогай аўтазапаўнення.", + "title": "Менеджэр пароляў", + "login_info": "Акаўнт трэба стварыць на сайце." + }, + "cloud": { + "subtitle": "Не дазваляйце хмарным сэрвісам праглядаць вашыя дадзеныя. Выкарыстоўвайце NextCloud - надзейны дом для ўсіх Вашых дадзеных.", + "title": "Файлавае воблака", + "login_info": "Лагін адміністратара: admin, пароль такі ж як у асноўнага карыстальніка. Стварайце новых карыстальнікаў у інтэрфейсе адміністратара NextCloud." + }, + "social_network": { + "subtitle": "Складана паверыць, але стала магчымым стварыць сваю ўласную сацыяльную сетку, са сваімі правіламі і аўдыторыяй.", + "title": "Сацыяльная сетка", + "login_info": "Акаўнт трэба стварыць на сайце." + }, + "video": { + "title": "Відэаканферэнцыя", + "subtitle": "Zoom і Google Meet - гэта добра, але Jitsi Meet - вартая альтэрнатыва, якая таксама дае вам упэўненасць, што вас не слухаюць.", + "login_info": "Акаўнт не патрабуецца." + }, + "git": { + "title": "Git-сервер", + "subtitle": "Прыватная альтэрнатыва Github, якая належыць вам, а не Microsoft.", + "login_info": "Акаўнт трэба стварыць на сайце. Першы зарэгістраваны карыстач становіцца адміністратарам." + }, + "vpn": { + "title": "VPN сервер", + "subtitle": "Закрыты VPN сервер" + }, + "users": { + "add_new_user": "Дадайце першага карыстальніка", + "new_user": "Новы карыстальнік", + "delete_user": "Выдаліць карыстальніка", + "not_ready": "Падлучыце сервер, дамен і DNS у раздзеле Правайдэры каб дадаць першага карыстальніка", + "nobody_here": "Тут будуць адлюстроўвацца карыстальнікі", + "login": "Логін", + "new_user_info_note": "Новы карыстальнік аўтаматычна атрымае доступ да ўсіх сэрвісаў", + "delete_confirm_question": "Вы напраўда хочаце выдаліць уліковы запіс?", + "reset_password": "Скінуць пароль", + "account": "Уліковы запіс", + "send_registration_data": "Падзяліцца рэквізітамі", + "could_not_fetch_users": "Не ўдалося атрымаць карыстальнікаў", + "could_not_fetch_description": "Праверце інтэрнэт злучэнне і паспрабуйце зноў", + "refresh_users": "Абнавіць спіс карыстальнікаў", + "could_not_create_user": "Не ўдалося стварыць карыстальніка", + "could_not_delete_user": "Не ўдалося выдаліць карыстальніка", + "could_not_add_ssh_key": "Не ўдалося стварыць SSH ключ", + "username_rule": "Імя можа мець толькі маленькія лацінскія літары, лічбы, падкрэслення і не можа пачынацца з лічбы", + "email_login": "Аўтарызацыя па Email", + "no_ssh_notice": "Для гэтага карыстальніка створаны толькі SSH і Email акаўнты. Адзіная аўтарызацыя для ўсіх сэрвісаў яшчэ не рэалізавана." + } +} From 600b73279d221ac7a5c87dcbc9530ffbeec38619 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 7 Feb 2023 21:19:03 +0000 Subject: [PATCH 370/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (6 of 6 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: about Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-about/be/ --- assets/markdown/about-be.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/markdown/about-be.md b/assets/markdown/about-be.md index 3963aa6e..71a9ef3e 100644 --- a/assets/markdown/about-be.md +++ b/assets/markdown/about-be.md @@ -1,12 +1,12 @@ -### About us +### Пра нас -More and more corporations want to control our data. -We want to have full control of our **data** on our own. +Усё больш арганізацый жадаюць валодаць нашымі дадзенымі +Праект дазваляе толькі Вам у поўнай меры распараджацца ўласнымі **дадзенымі** на сваім сэрвэры. -### Our mission +### Наша місія -Digital independence and privacy, available to everyone +Лічбавая незалежнасць і прыватнасць, даступныя кожнаму -### Target +### Мэта -Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file +Распрацаваць праграму, якая дазволіць кожнаму разгарнуць свае прыватныя паслугі для сябе і сваіх суседзяў. \ No newline at end of file From 96b733f814b646ed2fe8b08e22e030d452f7cf4f Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Mon, 6 Feb 2023 16:46:52 +0000 Subject: [PATCH 371/732] Translated using Weblate (Polish) Currently translated at 53.2% (213 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 85 ++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index d177b23d..39f41013 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -41,7 +41,8 @@ "create_ssh_key": "SSH klucze administratora", "console": "Konsola", "configuration_wizard": "Kreator konfiguracji", - "application_settings": "Ustawienia aplikacji" + "application_settings": "Ustawienia aplikacji", + "onboarding": "Witamy" }, "console_page": { "title": "Konsola", @@ -183,6 +184,86 @@ "kb": "{} KB", "bytes": "Bajty", "extend_volume_button": "Rozwiń pamięć", - "extending_volume_title": "Rozszerzenie pamięci" + "extending_volume_title": "Rozszerzenie pamięci", + "extending_volume_price_info": "Cena zawiera podatek VAT i jest oparta na danych cenowych dostarczonych przez firmę Hetzner. Serwer zostanie zrestartowany w trakcie procesu.", + "extending_volume_error": "Nie można rozpocząć rozszerzenia repozytorium.", + "size": "Rozmiar", + "euro": "Euro", + "data_migration_title": "Migracja danych", + "data_migration_notice": "Na czas migracji danych wszystkie usługi zostaną wyłączone.", + "start_migration_button": "Rozpocznij migrację", + "migration_process": "Migracja…", + "migration_done": "Zakończyć", + "extending_volume_description": "Zmiana rozmiaru pamięci masowej pozwoli na przechowywanie większej ilości danych na serwerze bez rozszerzenia serwera. Objętość można tylko zwiększyć, nie można jej zmniejszyć." + }, + "service_page": { + "open_in_browser": "Otwórz w przeglądarce", + "status": { + "activating": "Włącza się", + "deactivating": "Wyłącza się", + "reloading": "Uruchamia się ponownie", + "off": "Wyłączone", + "inactive": "Zatrzymany", + "active": "Włączone i działa", + "failed": "Nie udało sie uruchomić" + }, + "move": "Przeniesienie do innego woluminu", + "enable": "Włącz usługę", + "restart": "Uruchom ponownie usługę", + "disable": "Wyłącz usługę", + "uses": "Używa {usage} na {volume}" + }, + "mail": { + "title": "E-mail", + "subtitle": "E-Mail dla firmy i rodziny.", + "login_info": "Użyj nazwy użytkownika i hasła z listy użytkowników. Port IMAP: 143, STARTTLS. Port SMTP: 587, STARTTLS." + }, + "password_manager": { + "title": "Menedżer haseł", + "subtitle": "To podstawa Twojego bezpieczeństwa. Bitwarden pomoże Ci tworzyć, przechowywać, kopiować hasła między urządzeniami i umieszczać je w formularzach.", + "login_info": "Konto należy założyć na stronie internetowej." + }, + "video": { + "title": "Wideokonferencja", + "subtitle": "Zoom i Google Meet są świetne, ale Jitsi Meet to dobra alternatywa, która daje pewność, że nie jesteś słuchany.", + "login_info": "Konto nie jest potrzebne." + }, + "cloud": { + "title": "Przechowywanie w chmurze", + "subtitle": "Nie zezwalaj usługom w chmurze na odczyt twoich danych, dla tego korzystaj z NextCloud.", + "login_info": "Login jest admin, hasło jest takie samo jak w przypadku głównego użytkownika. Utwórz nowe konta w interfejsie Nextcloud." + }, + "social_network": { + "title": "Serwis społecznościowy", + "subtitle": "Trudno w to uwierzyć, ale stało możliwe stworzenie własnego serwisu społecznościowego, z własnymi zasadami i publicznością.", + "login_info": "Konto należy założyć na stronie." + }, + "git": { + "login_info": "Konto należy założyć na stronie. Pierwszy zarejestrowany użytkownik zostaje administratorem.", + "title": "Git Serwer" + }, + "vpn": { + "title": "VPN Serwer", + "subtitle": "Prywatny serwer VPN" + }, + "users": { + "add_new_user": "Dodaj pierwszego użytkownika", + "new_user": "Nowy użytkownik", + "delete_user": "Usuń użytkownika", + "not_ready": "Połącz serwer, domenę I DNS w zakładce dostawcy, aby mieć możliwość dodać pierwszego użytkownika", + "nobody_here": "Tu będą pojawią się użytkownicy", + "login": "Login", + "new_user_info_note": "Nowy użytkownik automatycznie otrzyma dostęp do wszystkich serwisów", + "delete_confirm_question": "Czy naprawdę chcesz usunąć konto?", + "reset_password": "Zresetuj hasło", + "account": "Konto", + "send_registration_data": "Udostępnij dane logowania", + "could_not_fetch_users": "Nie udało się uzyskać użytkowników" + }, + "validations": { + "length_longer": "Długość ciągu znaków [] musi być mniejsza lub równa {}" + }, + "not_ready_card": { + "in_menu": "Serwer jeszcze nie jest skonfigurowany, użyj kreatora połączeń." } } From a8fbeca0076751f4b6fbb838c1fd78e1c66d3e11 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Wed, 8 Feb 2023 08:31:50 +0000 Subject: [PATCH 372/732] Translated using Weblate (Ukrainian) Currently translated at 100.0% (8 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/uk/ --- assets/markdown/how_fallback_terminal-uk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/markdown/how_fallback_terminal-uk.md b/assets/markdown/how_fallback_terminal-uk.md index 6d762e67..c72f9f7e 100644 --- a/assets/markdown/how_fallback_terminal-uk.md +++ b/assets/markdown/how_fallback_terminal-uk.md @@ -1,6 +1,6 @@ -На панелі керування сервером Hetzner перейдіть на вкладку **Rescue**. Після цього натисніть кнопку **увімкнути цикл порятунку та живлення**. +На панелі керування сервером Hetzner перейдіть на вкладку **Rescue**. Після цього натисніть кнопку **Enable rescue & power cycle**. -In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. +У полі *Choose a Recue OS* виберіть **linux64**, а в *SSH Key* свій ключ, якщо він був доданий у ваш обліковий запис Hetzner. Натисніть **Enable rescue & power cycle** і зачекайте, поки сервер перезавантажить. На екрані з'явиться логін і пароль. Увійдіть до користувача root за допомогою вашої реєстраційних даних і паролів. From 2bde5fffefece235e434462b3fab1cac2e1c9273 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Mon, 6 Feb 2023 15:02:41 +0000 Subject: [PATCH 373/732] Translated using Weblate (Thai) Currently translated at 42.0% (168 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/th/ --- assets/translations/th.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/translations/th.json b/assets/translations/th.json index 1f56a51e..6202e616 100644 --- a/assets/translations/th.json +++ b/assets/translations/th.json @@ -177,6 +177,26 @@ "card_title": "พื้นที่ของเซิฟร์เวอร์", "status_ok": "การใช้งานดิสก์ปกติ", "status_error": "พื้นที่ว่างดิสก์ต่ำ", - "disk_usage": "{} ใช้แล้ว" + "disk_usage": "{} ใช้แล้ว", + "extending_volume_title": "กำลังขยายความจุ", + "disk_total": "{} ทั้งหมด {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "ไบต์", + "extend_volume_button": "ขยายความจุ", + "extending_volume_description": "การเปลี่ยนความจุนั้นจะทำให้คุณสามารถเก็บข้อมูลบนเซิร์ฟเวอร์ของคุณได้มากขึ้นโดยที่ไม่ต้องเพิ่มความเร็วเซิร์ฟเวอร์แต่ถว่าความจุนั้นสามารถเพิ่มได้อย่างเดียว ไม่สามารถลดขนาดได้", + "extending_volume_price_info": "ราคารวมภาษีมูลค่าเพิ่มและประมาณการจากข้อมูลราคาที่จัดทำโดย Hetzner เซิร์ฟเวอร์จะรีบูตหลังจากปรับความจุ", + "extending_volume_error": "ไม่สามารถเริ่มต้นการขยายความจุได้", + "size": "ขนาด", + "euro": "ยูโร", + "data_migration_title": "การโยกย้ายข้อมูล", + "data_migration_notice": "ระหว่างการย้ายข้อมูล ทุกเซิร์ฟเวอร์จะถูกปิด", + "start_migration_button": "เริ่มการย้ายข้อมูล", + "migration_process": "กำลังย้ายข้อมูล…", + "migration_done": "เสร็จสิ้น" + }, + "not_ready_card": { + "in_menu": "เซิร์ฟเวอร์ยังไม่ถูกติดตั้งในตอนนี้. โปรดใช้การติดตั้งอย่างง่ายในการติดตั้ง" } } From b057fda550c86a82bfd9e011f4ff7bbc104575a5 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Wed, 8 Feb 2023 08:28:41 +0000 Subject: [PATCH 374/732] Translated using Weblate (Ukrainian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/uk/ --- assets/markdown/how_cloudflare-uk.md | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/assets/markdown/how_cloudflare-uk.md b/assets/markdown/how_cloudflare-uk.md index 2f8880cb..27e3a5c4 100644 --- a/assets/markdown/how_cloudflare-uk.md +++ b/assets/markdown/how_cloudflare-uk.md @@ -1,17 +1,17 @@ -### How to get Cloudflare API Token -1. Visit the following link: https://dash.cloudflare.com/ -2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** -3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. -4. Click on **Create Token** button. -5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. -6. In the **Token Name** field, give your token a name. -7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. -8. Next, right under this line, click Add More. Similar field will appear. -9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. -10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. -11. Flick to the bottom and press the blue **Continue to Summary** button. -12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. -13. Click on **Create Token**. -14. We copy the created token, and save it in a reliable place (preferably in the password manager). +### Як отримати токен Cloudflare API +1. Перейдіть за цим посиланням: https://dash.cloudflare.com/ +2. В правому куті натисніть на іконку профілю (людина в колі). Для мобільної версії сайту, у верхньому лівому кутку натисніть кнопку **Menu** (три горизонтальні смужки), у випадаючому меню натисніть **My profile** +3. Є чотири категорії конфігурації на вибір: *Communication*, *Authentication*, **API Tokens**, *Session*. Виберіть **API Tokens**. +4. Натисніть кнопку **Create Token**. +5. Спустіться вниз і перегляньте поле **Create Custom Token** і натисніть кнопку **Get Started** праворуч. +6. У полі **Назва токена** введіть назву токена. +7. Далі у нас є Дозволи. У крайньому лівому полі виберіть **Zone**. У найдовшому полі по центру виберіть **DNS**. У крайньому правому полі виберіть **Edit**. +8. Далі прямо під цим рядком натисніть «Add more». З'явиться аналогічне поле. +9. У крайньому лівому полі нового рядка виберіть, як і в останньому рядку, — **Zone**. У центрі — трохи інше. Тут вибираємо те саме, що й зліва — **Zone**. У крайньому правому полі виберіть **Read**. +10. Далі подивіться на **Zone Resources**. Під цим написом — рядок із двома полями. Ліворуч має бути **Include**, а праворуч має бути **Specific Zone**. Після вибору «Specific Zone» праворуч з’явиться ще одне поле. Виберіть у ньому свій домен. +11. Прокрутіть униз і натисніть синю кнопку **Continue to Summary**. +12. Перевірте, чи все ви зробили правильно. Подібний рядок має бути присутнім: *Domain — DNS:Edit, Zone:Read*. +13. Натисніть **Create Token**. +14. Копіюємо створений токен і зберігаємо в надійному місці (бажано в менеджері паролів). -![Cloudflare настройка токена](resource:assets/images/gifs/CloudFlare.gif) +![Cloudflare налаштування токена](resource:assets/images/gifs/CloudFlare.gif) From 0edc6ab30fb56387c9a77cfe1131afbc85efad72 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 11 Feb 2023 12:07:42 +0000 Subject: [PATCH 375/732] Added translation using Weblate (Azerbaijani) --- assets/translations/az.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/translations/az.json diff --git a/assets/translations/az.json b/assets/translations/az.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/az.json @@ -0,0 +1 @@ +{} From 8756d53545d6c2b09b07fa63fe0e607c92b38f7d Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 22:20:34 +0000 Subject: [PATCH 376/732] Translated using Weblate (German) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_ssh Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_ssh/de/ --- assets/markdown/how_fallback_ssh-de.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/markdown/how_fallback_ssh-de.md b/assets/markdown/how_fallback_ssh-de.md index ce90e76a..f6da0343 100644 --- a/assets/markdown/how_fallback_ssh-de.md +++ b/assets/markdown/how_fallback_ssh-de.md @@ -1,19 +1,19 @@ -Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` +Melden Sie sich als Root-Benutzer auf Ihrem Server an und sehen Sie sich den Inhalt der Datei `/etc/nixos/userdata/tokens.json` an ```sh cat /etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Diese Datei hat einen ähnlichen Aufbau: ```json { "tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + "token": "token_zum_Kopieren", + "name": "Gerätname", + "date": "Datum" } ``` -Copy the token from the file and paste it in the next window. +Kopieren Sie das Token aus der Datei und fügen Sie es im nächsten Fenster ein. From b24b093232e44ae0e715a4cd1f75ff29bb24c3b4 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 16:00:45 +0000 Subject: [PATCH 377/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (8 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/be/ --- assets/markdown/how_fallback_terminal-be.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/markdown/how_fallback_terminal-be.md b/assets/markdown/how_fallback_terminal-be.md index 77c97efa..675d3902 100644 --- a/assets/markdown/how_fallback_terminal-be.md +++ b/assets/markdown/how_fallback_terminal-be.md @@ -1,17 +1,17 @@ -In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. +У панэлі кіравання серверам Hetzner перайдзіце на ўкладку **Rescue**. Затым націсніце на **Enable rescue & power cycle**. -In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. +У полі *Choose a Recue OS* выберыце **linux64**, а ў *SSH Key* выберыце свой ключ, калі ён быў дададзены ў ваш уліковы запіс Hetzner. -Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. +Націсніце **Enable rescue & power cycle** і дачакайцеся перазагрузкі сервера. На экране адлюструюцца лагін і пароль. Увайдзіце ў сістэму root, выкарыстоўваючы свой лагін і пароль. -Mount your server file system and see the contents of the token file: +Падключыце файлавую сістэму сервера і паглядзіце змесціва файла токена: ```sh mount /dev/sda1 /mnt cat /mnt/etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Гэты файл будзе мець падобную канструкцыю: ```json { @@ -23,4 +23,4 @@ This file will have a similar construction: } ``` -Copy the token from the file and paste it in the next window. +Скапіруйце токен з файла і ўстаўце яго ў наступнае акно. From 7610b1da0d2bee87a05dc2b849ea74affe98de2b Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 22:19:52 +0000 Subject: [PATCH 378/732] Translated using Weblate (German) Currently translated at 100.0% (8 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/de/ --- assets/markdown/how_fallback_terminal-de.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/markdown/how_fallback_terminal-de.md b/assets/markdown/how_fallback_terminal-de.md index 77c97efa..7031612a 100644 --- a/assets/markdown/how_fallback_terminal-de.md +++ b/assets/markdown/how_fallback_terminal-de.md @@ -1,26 +1,26 @@ -In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. +Gehen Sie im Control Panel des Hetzner-Servers auf den Tab **Rescue**. Klicken Sie dann auf **Enable rescue & power cycle**. -In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. +In *Choose a Recue OS* wählen Sie **linux64** aus und in *SSH Key* wählen Sie Ihren Schlüssel aus, wen er zu ihrem Htzner-Konto hinzugefügt wurde. -Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. +Klicken Sie auf **Enable rescue & power cycle** und warten Sie, bis der Server neu gestartet wird. Login und Passwort werden auf dem Bildschirm angezeigt. Melden Sie sich mit Ihren Anmelde- und Kennwortinformationen beim Root-Benutzer an. -Mount your server file system and see the contents of the token file: +Mounten Sie Ihr Server-Dateisystem und sehen Sie sich den Inhalt der Token-Datei an: ```sh mount /dev/sda1 /mnt cat /mnt/etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Diese Datei hat einen ähnlichen Aufbau: ```json { "tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + "token": "token_zum_Kopieren", + "name": "Gerätname", + "date": "Datum" } ``` -Copy the token from the file and paste it in the next window. +Kopieren Sie das Token aus der Datei und fügen Sie es im nächsten Fenster ein. From 7269dd8620d139db8108696cb0bb9035e28012fe Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 18:13:19 +0000 Subject: [PATCH 379/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_old Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_old/be/ --- assets/markdown/how_fallback_old-be.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/markdown/how_fallback_old-be.md b/assets/markdown/how_fallback_old-be.md index c12504e7..0f3b619d 100644 --- a/assets/markdown/how_fallback_old-be.md +++ b/assets/markdown/how_fallback_old-be.md @@ -1,3 +1,3 @@ -In the next window, enter the token obtained from the console of the previous version of the application. +У наступным акне увядзіце токен, атрыманы з кансолі папярэдняй версіі прыкладання. -Enter it without the word *Bearer*. +Увядзіце яго без слова *Bearer*. From 9816035757fbe16ff89b3201aadb0d6964c89b21 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 22:16:29 +0000 Subject: [PATCH 380/732] Translated using Weblate (German) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/de/ --- assets/markdown/how_digital_ocean-de.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_digital_ocean-de.md b/assets/markdown/how_digital_ocean-de.md index dc6355c2..79c04259 100644 --- a/assets/markdown/how_digital_ocean-de.md +++ b/assets/markdown/how_digital_ocean-de.md @@ -1,12 +1,12 @@ -### How to get Digital Ocean API Token -1. Visit the following [link](https://cloud.digitalocean.com/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Go to the "API" link on the left bar. -4. Click on the "Generate New Token". -5. Enter any name for the token. -6. Put expiration time to "No expiry". -7. Check the "Write (optional)" checkbox. -8. Now click on the "Generate Token" button. -9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file +### So erhalten Sie das Digital Ocean API-Token +1. Besuchen Sie den folgenden [link](https://cloud.digitalocean.com/) und melden Sie sich + in das neu erstellte Konto an. +2. Gehen Sie in ein zuvor erstelltes Projekt. Wenn Sie noch keine erstellt haben, + dann bitte fortfahren. +3. Gehen Sie zum Link "API" in der linken Leiste. +4. Klicken Sie auf "Generate New Token". +5. Geben Sie einen beliebigen Namen für das Token ein. +6. Setzen Sie die Ablaufzeit auf "No expiry". +7. Aktivieren Sie das Kontrollkästchen "Write (optional)". +8. Klicken Sie nun auf die Schaltfläche "Generate Token". +9. Danach wird der Token angezeigt. Bewahren Sie es an einem zuverlässigen Ort auf, vorzugsweise in einem Passwort-Manager. \ No newline at end of file From 61a70970ed8b4a673e4478171ae663b00dea01be Mon Sep 17 00:00:00 2001 From: Ortibexon Date: Sat, 11 Feb 2023 12:15:33 +0000 Subject: [PATCH 381/732] Translated using Weblate (Azerbaijani) Currently translated at 40.5% (162 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/az/ --- assets/translations/az.json | 195 +++++++++++++++++++++++++++++++++++- 1 file changed, 194 insertions(+), 1 deletion(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index 0967ef42..37e9535d 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -1 +1,194 @@ -{} +{ + "test": "az-test", + "locale": "az", + "basis": { + "providers": "Provayderlər", + "providers_title": "Sizin məlumat mərkəziniz", + "select": "Seçin", + "services": "Xidmətlər", + "users": "İstifadəçilər", + "more": "Çox", + "next": "Sonrakı", + "got_it": "Anladım", + "settings": "Parametrlər", + "password": "Parol", + "create": "Yeni əlavə et", + "confirmation": "Təsdiq", + "cancel": "Ləğv edin", + "delete": "Silin", + "close": "Bağla", + "connect": "Qoşulmaq", + "domain": "Domen", + "saving": "Qənaət…", + "username": "İstifadəçilər adı", + "later": "Keçidin, sonra tənzimləyin", + "connect_to_existing": "Mövcud serverə qoşulun", + "reset": "Sıfırlayın", + "details": "Təfərrüatlar", + "no_data": "İnformasiya yoxdur", + "wait": "Gözləyin", + "remove": "Silin", + "done": "Hazır", + "continue": "Davam et", + "alert": "Bildiriş", + "services_title": "Şəxsi, şəxsi və müstəqil xidmətləriniz.", + "loading": "Yüklənir…", + "apply": "Müraciət edin" + }, + "more_page": { + "configuration_wizard": "Quraşdırma Sihirbazı", + "onboarding": "Salamlar", + "create_ssh_key": "SSH admin açarları", + "console": "Konsol", + "application_settings": "Tətbiq parametrləri", + "about_project": "SelfPrivacy haqqında", + "about_application": "Proqram haqqında" + }, + "console_page": { + "title": "Konsol", + "waiting": "Başlama gözlənilir…" + }, + "about_application_page": { + "application_version_text": "Tətbiq versiyası v.{}", + "api_version_text": "Server API versiyası v.{}", + "privacy_policy": "Gizlilik Siyasəti", + "title": "Tətbiq haqqında" + }, + "application_settings": { + "title": "Tətbiq parametrləri", + "dark_theme_title": "Qaranlıq mövzu", + "reset_config_title": "Tətbiq Sıfırlayın", + "reset_config_description": "API və Super İstifadəçi Açarlarını sıfırlayın", + "delete_server_title": "Serveri silin", + "dark_theme_description": "Rəng mövzusunu dəyişdirin", + "delete_server_description": "Əməliyyat serveri siləcək. Bundan sonra o, əlçatmaz olacaq." + }, + "ssh": { + "title": "SSH açarları", + "create": "SSH açarı yaradın", + "delete": "SSH açarını silin", + "delete_confirm_question": "Növbəti SSH açarı silmək istədiyinizə əminsiniz?", + "subtitle_with_keys": "{} açarlar", + "subtitle_without_keys": "Açar yoxdur", + "no_key_name": "Adsız açar", + "root_title": "Bunlar super istifadəçi açarlarıdır", + "input_label": "İctimai ED25519 və ya RSA açarı", + "root_subtitle": "Burada göstərilən açarların sahibləri server məlumatlarına və parametrlərinə tam giriş əldə edirlər. Yalnız açarlarınızı əlavə edin." + }, + "onboarding": { + "page1_title": "Rəqəmsal müstəqillik hər kəs üçün əlçatandır", + "page1_text": "Mail, VPN, Messenger, sosial şəbəkə və daha çox şəxsi serverinizdə, tam nəzarətiniz altında.", + "page2_title": "SelfPrivacy bulud deyil, şəxsi məlumat mərkəzinizdir", + "page2_server_provider_title": "Server provayderi", + "page2_dns_provider_title": "DNS provayderi", + "page2_dns_provider_text": "İnternetdə olmaq üçün sizə domen lazımdır. Domenin serverinizə işarə etməsi üçün sizə etibarlı DNS server lazımdır. Biz sizə dəstəklənən DNS serverlərindən birini seçməyi və bütün qeydləri avtomatik konfiqurasiya etməyi təklif edəcəyik. Onları əl ilə qurmaq istəyirsiniz? Bu da mümkündür.", + "page2_backup_provider_title": "Yedək provayderi", + "page2_text": "SelfPrivacy yalnız seçdiyiniz xidmət təminatçıları ilə işləyir. Hesablarınız yoxdursa, onları yaratmağınıza kömək edəcəyik.", + "page2_server_provider_text": "Server provayderi öz məlumat mərkəzində serverinizə xidmət göstərəcək. SelfPrivacy avtomatik olaraq ona qoşulacaq və sizin üçün server quracaq.", + "page2_backup_provider_text": "Bəs serverə bir şey olarsa? Haker hücumu, xidmətdən imtina və ya sadəcə məlumatların təsadüfən silinməsi? Məlumatlarınız ehtiyat yaddaş provayderinizlə başqa yerdə təhlükəsiz olacaq. Onların hamısı təhlükəsiz şəkildə şifrələnib və siz serverinizi bərpa edə bilərsiniz." + }, + "about_us_page": { + "title": "SelfPrivacy haqqında" + }, + "resource_chart": { + "month": "Ay", + "day": "Gün", + "hour": "Saat", + "cpu_title": "CPU İstifadəsi", + "network_title": "Şəbəkə istifadəsi", + "in": "Alındı", + "out": "Göndərildi" + }, + "server": { + "card_title": "Server", + "general_information": "Ümumi məlumat", + "resource_usage": "Resurs istehlakı", + "allow_autoupgrade": "Avtomatik yeniləmələrə icazə verin", + "allow_autoupgrade_hint": "Serverdə yeniləmələrin avtomatik quraşdırılmasına icazə verin", + "reboot_after_upgrade": "Yeniləmələrdən sonra yenidən başladın", + "description": "Bu, bütün xidmətlərinizin işlədiyi virtual kompüterdir", + "reboot_after_upgrade_hint": "Yeniləmələri tətbiq etdikdən sonra serveri avtomatik yenidən başladın", + "server_timezone": "Server saat qurşağı", + "select_timezone": "Saat qurşağınızı seçin", + "timezone_search_bar": "Saat qurşağı adı və ya vaxt ofset dəyəri", + "server_id": "Server İD", + "status": "Status", + "cpu": "CPU", + "ram": "RAM yaddaşı", + "disk": "Disk", + "monthly_cost": "Aylıq xərc", + "location": "Yerləşdirmə", + "provider": "Provayder", + "core_count": { + "one": "{} nüvəs", + "two": "{} nüvələr", + "few": "{} nüvələr", + "other": "{} nüvələr", + "many": "{} nüvələr" + } + }, + "record": { + "root": "Kök domen", + "api": "SelfPrivacy APİ", + "cloud": "Fayl buludu", + "git": "Git Server", + "meet": "Video konfrans", + "social": "Sosial Mediya", + "password": "Parol meneceri", + "vpn": "VPN", + "mx": "MX rekordu", + "spf": "SPF rekordu", + "dkim": "DKIM açarı", + "dmarc": "DMARC rekordu" + }, + "domain": { + "card_title": "Domen", + "screen_title": "Domain və DNS", + "ok": "Qeydlər qaydasındadır", + "error": "Problemlər tapıldı", + "refreshing": "Data yenilənməsi…", + "uninitialized": "Data hələ alınmayıb", + "services_title": "Servislər", + "email_title": "E-poçt", + "email_subtitle": "Təhlükəsiz e-poçt mübadiləsi üçün tələb olunan qeydlər.", + "update_list": "Siyahını yeniləyin", + "error_subtitle": "Düzəltmək üçün bura klikləyin", + "services_subtitle": "Xidmətlərin fəaliyyəti üçün “A” tipli qeydlər lazımdır." + }, + "backup": { + "card_title": "Ehtiyat nüsxəsi", + "reupload_key": "Açar yeniləməsini məcbur edin", + "reuploaded_key": "Server açarı yeniləndi", + "initialize": "Qurunmaq", + "waiting_for_rebuild": "Bir neçə dəqiqədən sonra ilk nüsxəni yarada biləcəksiniz.", + "restore": "Kopyadan bərpa edin", + "no_backups": "Yedəkləmə hələ yoxdur", + "create_new": "Yeni nüsxə yaradın", + "creating": "Surəti çıxarmaq: {}%", + "restoring": "Kopyadan bərpa edilir", + "error_pending": "Server xəta verdi: aşağıda yoxlayın", + "restore_alert": "Siz {} tərəfindən yaradılmış nüsxədən bərpa etmək üzrəsiniz. Bütün cari məlumatlar itiriləcək. Sən əminsən?", + "refresh": "Statusu yenilə", + "refetch_backups": "Kopya siyahısını yeniləyin", + "refetching_list": "Siyahı bir neçə dəqiqəyə yenilənəcək", + "description": "İstənilən vəziyyətdə sizə kömək edəcək: haker hücumu, serverin silinməsi və s." + }, + "storage": { + "card_title": "Server yaddaşı", + "status_ok": "Heç bir disk problemi tapılmadı", + "status_error": "Disk sahəsi tükənir", + "disk_usage": "{} istifadə olunur", + "disk_total": "{} ümumi · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Bayt", + "extend_volume_button": "Yaddaşı genişləndirin", + "extending_volume_title": "Yaddaş genişləndirilməsi", + "extending_volume_price_info": "Qiymətə ƏDV daxildir və Hetzner tərəfindən təqdim edilən qiymət məlumatlarına əsaslanır. Proses zamanı server yenidən işə salınacaq.", + "extending_volume_error": "Yaddaş genişləndirilməsinə başlamaq alınmadı.", + "size": "Ölçüsü", + "euro": "Avro", + "extending_volume_description": "Yaddaş ölçüsünün dəyişdirilməsi, serverin özünü genişləndirmədən serverinizdə daha çox məlumat saxlamağa imkan verəcəkdir. Həcmi yalnız artırmaq olar, onu azaltmaq olmaz." + } +} From 6d0db6a28d15fc48035838c15eb8d627a9c43573 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 21:58:47 +0000 Subject: [PATCH 382/732] Translated using Weblate (German) Currently translated at 100.0% (6 of 6 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: about Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-about/de/ --- assets/markdown/about-de.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/markdown/about-de.md b/assets/markdown/about-de.md index 3963aa6e..401af514 100644 --- a/assets/markdown/about-de.md +++ b/assets/markdown/about-de.md @@ -1,12 +1,12 @@ -### About us +### Über uns -More and more corporations want to control our data. -We want to have full control of our **data** on our own. +Immer mehr Unternehmen wollen unsere Daten kontrollieren. +Wir wollen selbst die volle Kontrolle über unsere **data** haben. -### Our mission +### Unsere Mission -Digital independence and privacy, available to everyone +Digitale Unabhängigkeit und Privatsphäre für alle verfügbar -### Target +### Ziel -Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file +Das Programm entwickeln, das es jedem ermöglicht, seine privaten Dienste für sich und seine Nachbarn einzusetzen. \ No newline at end of file From c3d47fb526d81c9317768813e04962eb3c7b0a8b Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 22:35:10 +0000 Subject: [PATCH 383/732] Translated using Weblate (German) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_hetzner Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_hetzner/de/ --- assets/markdown/how_hetzner-de.md | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/assets/markdown/how_hetzner-de.md b/assets/markdown/how_hetzner-de.md index 6f859c18..5430c70b 100644 --- a/assets/markdown/how_hetzner-de.md +++ b/assets/markdown/how_hetzner-de.md @@ -1,23 +1,23 @@ -### How to get Hetzner API Token -1. Visit the following [link](https://console.hetzner.cloud/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Hover side panel with mouse cursor. Panel should expand and show us - a menu. We're interested in the last one — **Security** (icon of a - key). -4. Next, in the upper part of an interface, we can see approximately - the following: **SSH Keys, API Tokens, Certificates, Members.** You - need **API Tokens**. Click on it. -5. In the right part of the interface, there should be **Generate API - token** button. If you're using mobile version og a webpage, in the - lower right corner you'll see **red cross**. Push that button. -6. In the **Description** field, give our token a name (this can be any - name that you like. It doesn't influence the essence. -7. Under the **Description** field we can see a possibility to choose - **permissions**. Pick **Read & Write**. -8. Click **Generate API Token.** -9. After that, our key will be shown. Store it in the reliable place, - or in the password manager, which is better. +### So erhalten Sie das Hetzner-API-Token +1. Besuchen Sie den folgenden [link](https://console.hetzner.cloud/) und melden Sie sich + in das neu erstellte Konto an. +2. Gehen Sie in ein zuvor erstelltes Projekt. Wenn Sie noch keine erstellt haben, + dann bitte fortfahren. +3. Bewegen Sie den Mauszeiger über das Seitenpanel. Panel sollte sich erweitern und uns + Ein Menü zeigen. Uns interessiert letzteres — **Security** (Symbol eines + Schlüssels). +4. Als nächstes können wir im oberen Teil der Oberfläache ungefähr sehen + Folgendes: **SSH Keys, API Tokens, Certificates, Members.** Sie + benötigen **API Tokens**. Klicken Sie es an. +5. Im rechten Teil der Benutzeroberfläche sollte **Generate API + Token** stehen. Wenn Sie die mobile Version der Webseite verwenden, in der + In der unteren rechten Ecke sehen Sie **red cross**. Drücken Sie diesen Knopf. +6. Geben Sie im Feld **Description** unserem Token einen Namen (dies kann ein beliebiger Name + sein). Es beeinflusst nicht die Essenz. +7. Unter dem Feld **Description** sehen wir eine Auswahlmöglichkeit + **permissions**. Wählen Sie **Read & Write**. +8. Klicken Sie auf **Generate API Token.** +9. Danach wird unser Schlüssel angezeigt. Bewahren Sie es an einem zuverlässigen Ort auf, + oder im Passwortmanager, was besser ist. -![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) +![Hetzner token Einrichtung](resource:assets/images/gifs/Hetzner.gif) From bd0e3e015801afdc2f657db81c68695232b9b957 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 16:01:32 +0000 Subject: [PATCH 384/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_ssh Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_ssh/be/ --- assets/markdown/how_fallback_ssh-be.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/markdown/how_fallback_ssh-be.md b/assets/markdown/how_fallback_ssh-be.md index ce90e76a..3ad871bc 100644 --- a/assets/markdown/how_fallback_ssh-be.md +++ b/assets/markdown/how_fallback_ssh-be.md @@ -1,10 +1,10 @@ -Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` +Увайдзіце на ваш сервер як root карыстальнік і праглядзіце змесціва файла `/etc/nixos/userdata/tokens.json` ```sh cat /etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Гэты файл будзе мець падобную канструкцыю: ```json { @@ -16,4 +16,4 @@ This file will have a similar construction: } ``` -Copy the token from the file and paste it in the next window. +Скапіруйце токен з файла і ўстаўце яго ў наступнае акно. From b91cd9eb40ca341efc975613186f8af3092e5455 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 21:34:10 +0000 Subject: [PATCH 385/732] Translated using Weblate (German) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/de/ --- assets/translations/de.json | 251 +++++++++++++++++++++++++++++++++++- 1 file changed, 250 insertions(+), 1 deletion(-) diff --git a/assets/translations/de.json b/assets/translations/de.json index 842967fe..1210fddb 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -222,6 +222,255 @@ "subtitle": "E-Mail für Familie und Unternehmen." }, "password_manager": { - "title": "Passwortmanager" + "title": "Passwortmanager", + "subtitle": "Basis Ihrer Sicherheit. Bitwarden hilft Ihnen beim Erstellen, Speichern und Übertragung von Passwörtern zwischen Geräten sowie bei der Eingabe mithilfe der automatischen Vervollständigung.", + "login_info": "Ihr Konto müssen Sie auf der Webseite erstellen." + }, + "modals": { + "unexpected_error": "Unerwarteter Fehler beim Platzieren von Seiten des Anbieters.", + "delete_server_volume": "Server und Speicher löschen?", + "dns_removal_error": "DNS-Einträge konnten nicht entfernt werden.", + "server_deletion_error": "Aktiver Server konnte nicht gelöscht werden.", + "server_validators_error": "Verfügbare Server konnten nicht abgerufen werden.", + "already_exists": "Ein solcher Server existiert bereits.", + "destroy_server": "Den Server zerstören und einen neuen erstellen?", + "try_again": "Nochmal versuchen?", + "are_you_sure": "Sind Sie sicher?", + "purge_all_keys": "Alle Authentifizierungsschlüssel löschen?", + "purge_all_keys_confirm": "Ja, alle meine Token löschen", + "reboot": "Neustarten", + "you_cant_use_this_api": "Sie können diese API nicht für Domains mit einer solchen TLD verwenden.", + "yes": "Ja", + "no": "Nein" + }, + "jobs": { + "create_user": "Benutzer erstellen", + "service_turn_on": "Starten", + "reboot_success": "Server wird neugestartet", + "reboot_failed": "Der Server konnte nicht neugestartet werden. Überprüfen Sie die Logs der Anwendung.", + "create_ssh_key": "SSH-Schlüssel erstellen für {}", + "generic_error": "Es konnte keine Verbindung zum Server hergestellt werden!", + "delete_user": "Benutzer löschen", + "service_turn_off": "Abschalten", + "job_added": "Aufgabe hinzugefügt", + "run_jobs": "Aufgaben ausführen", + "title": "Aufgaben", + "start": "Starten", + "empty": "Keine Aufgaben", + "config_pull_failed": "Konfigurationsaktualisierung konnte nicht ausgeführt werden. Software-Aktualisierung trotzdem gestartet.", + "upgrade_success": "Serveraktualisierung gestartet", + "upgrade_failed": "Serveraktualisierung fehlgeschlagen", + "upgrade_server": "Server aktualisieren", + "reboot_server": "Server neustarten", + "delete_ssh_key": "SSH-Schlüssel löschen für {}", + "server_jobs": "Aufgaben auf dem Server", + "reset_user_password": "Passwort des Benutzers zurücksetzen" + }, + "initializing": { + "locations_not_found": "Oops!", + "backblaze_bad_key_error": "Die Backblaze-Speicherinformationen sind ungültig", + "select_dns": "Lassen Sie uns nun einen DNS-Provider auswählen", + "manage_domain_dns": "Zum Verwalten des DNS Ihrer Domain", + "use_this_domain": "Diese Domäne verwenden?", + "use_this_domain_text": "Das von Ihnen bereitgestellte Token gewährt Zugriff auf die folgende Domäne", + "cloudflare_api_token": "CloudFlare-API-Token", + "connect_backblaze_storage": "Backblaze-Speicher verbinden", + "no_connected_domains": "Derzeit keine verbundenen Domains", + "loading_domain_list": "Domänenliste wird geladen", + "found_more_domains": "Mehr als eine Domain gefunden. Zu Ihrer eigenen Sicherheit bitten wir Sie, nicht benötigte Domains zu löschen", + "save_domain": "Domäne speichern", + "final": "Letzter Schritt", + "create_server": "Server erstellen", + "select_provider_countries_text_do": "USA, Niederlande, Singapur, Großbritannien, Deutschland, Kanada, Indien, Australien", + "select_provider_price_text_do": "17 Dollar pro Monat für einen relativ kleinen Server und 50 GB Festplattenspeicher", + "connect_to_server_provider_text": "Mit dem API-Token kann SelfPrivacy eine Maschine mieten und Ihren Server darauf einrichten", + "choose_location_type_text": "Unterschiedliche Standorte bieten unterschiedliche Serverkonfigurationen, Preise und Verbindungsgeschwindigkeiten.", + "choose_server_type_text": "Unterschiedliche Ressourcenfunktionen unterstützen unterschiedliche Dienste. Keine Sorge, Sie können Ihren Server jederzeit erweitern", + "no_server_types_found": "Keine verfügbaren Servertypen gefunden. Stellen Sie sicher, dass auf Ihr Konto zugegriffen werden kann und versuchen Sie Ihren Serverstandort zu ändern.", + "one_more_restart": "Noch ein Neustart, um Ihre Sicherheitszertifikate anzuwenden.", + "checks": "Überprüfungen sind abgeschlossen \n{} aus {}", + "connect_to_server": "Beginnen wir mit einem Server.", + "select_provider": "Wählen Sie einen beliebigen Anbieter aus der folgenden Liste aus, sie alle unterstützen SelfPrivacy", + "select_provider_notice": "Mit „relativ klein“ meinen wir eine Maschine mit 2 CPU-Kernen und 2 Gigabyte RAM.", + "select_provider_countries_title": "verfügbare Länder", + "select_provider_countries_text_hetzner": "Deutschland, Finnland, USA", + "select_provider_price_title": "Durchschnittspreis", + "select_provider_price_text_hetzner": "8 Euro pro Monat für einen relativ kleinen Server und 50 GB Festplattenspeicher", + "select_provider_payment_title": "Zahlungsarten", + "select_provider_payment_text_hetzner": "Kreditkarten, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Kreditkarten, Google Pay, PayPal", + "select_provider_email_notice": "E-Mail-Hosting ist für Neukunden nicht verfügbar. Es wird jedoch freigeschaltet, sobald Sie Ihre erste Zahlung abgeschlossen haben.", + "select_provider_site_button": "Webseite besuchen", + "connect_to_server_provider": "Anmelden bei ", + "how": "So erhalten Sie ein API-Token", + "provider_bad_key_error": "Der API-Schlüssel des Anbieters ist ungültig", + "could_not_connect": "Es konnte keine Verbindung zum Anbieter hergestellt werden.", + "choose_location_type": "Wo möchten Sie Ihren Server mieten?", + "locations_not_found_text": "An diesem Standort stehen keine Server zum Mieten zur Verfügung", + "back_to_locations": "Wählen Sie einen anderen aus", + "no_locations_found": "Keine verfügbaren Standorte gefunden, stellen Sie sicher, dass auf Ihr Konto zugegriffen werden kann", + "choose_server_type": "Welche Art von Server benötigen Sie?", + "choose_server_type_notice": "Die wichtigsten Dinge, die man sich ansehen sollte, sind CPU und RAM. Die Daten Ihrer Dienste werden auf einem leicht erweiterbaren und separat zu zahlenden Datenträger gespeichert.", + "choose_server_type_ram": "{} GB Arbeitsspeicher", + "choose_server_type_storage": "{} GB Systemspeicher", + "choose_server_type_payment_per_month": "{} pro Monat", + "cloudflare_bad_key_error": "Der Cloudflare-API-Schlüssel ist ungültig", + "what": "Was bedeutet das?", + "server_rebooted": "Server neugestartet. Warten auf die letzte Bestätigung…", + "server_started": "Server gestartet. Es wird jetzt validiert und neugestartet…", + "server_created": "Server erstellt. DNS-Prüfungen und Server starten…", + "until_the_next_check": "Bis zur nächsten Überprüfung: ", + "check": "Überprüfung", + "create_master_account": "Hauptkonto erstellen", + "enter_username_and_password": "Geben Sie den Benutzernamen und ein gutes Passwort ein", + "finish": "Alles initialisiert" + }, + "validations": { + "length_not_equal": "Länge ist [], sollte {} sein", + "required": "Erforderlich", + "already_exist": "Ist bereits vorhanden", + "invalid_format": "Ungültiges Format", + "invalid_format_password": "Darf keine Leerzeichen enthalten", + "invalid_format_ssh": "Muss dem SSH-Schlüsselformat entsprechen", + "root_name": "Benutzername darf nicht root sein", + "length_longer": "Länge ist [], sollte kürzer oder gleich {} sein" + }, + "users": { + "could_not_create_user": "Benutzer konnte nicht erstellt werden", + "could_not_delete_user": "Benutzer konnte nicht gelöscht werden", + "could_not_add_ssh_key": "SSH-Schlüssel konnte nicht hinzugefügt werden", + "username_rule": "Der Benutzername darf nur lateinische Kleinbuchstaben, Ziffern und Unterstriche enthalten und darf nicht mit einer Ziffer beginnen", + "no_ssh_notice": "Für diesen Benutzer werden nur E-Mail- und SSH-Konten erstellt. Single Sign On für alle Dienste ist in Kürze verfügbar.", + "add_new_user": "Fügen Sie den ersten Benutzer hinzu", + "new_user": "Neuer Benutzer", + "delete_user": "Benutzer löschen", + "not_ready": "Bitte verbinden Sie Server, Domain und DNS im Providertab, um den ersten Benutzer hinzufügen zu können", + "nobody_here": "Hier werden Benutzer angezeigt", + "login": "Login", + "new_user_info_note": "Neuen Benutzern wird automatisch Zugang zu allen Diensten gewährt", + "delete_confirm_question": "Sind Sie sicher?", + "reset_password": "Passwort zurücksetzen", + "account": "Konto", + "send_registration_data": "Anmeldedaten teilen", + "could_not_fetch_users": "Benutzerliste konnte nicht abgerufen werden", + "could_not_fetch_description": "Bitte überprüfen Sie Ihre Internetverbindung und versuchen Sie es erneut", + "refresh_users": "Benutzerliste aktualisieren", + "email_login": "E-Mail-Anmeldung" + }, + "devices": { + "main_screen": { + "header": "Geräte", + "description": "Diese Geräte haben über die SelfPrivacy-App vollen Zugriff auf den Server.", + "this_device": "Dieses Gerät", + "other_devices": "Andere Geräte", + "authorize_new_device": "Neues Gerät autorisieren", + "access_granted_on": "Zugriff gewährt auf {}", + "tip": "Tippen Sie auf das Gerät, um den Zugriff zu widerrufen." + }, + "add_new_device_screen": { + "header": "Neues Gerät autorisieren", + "expired": "Der Schlüssel ist nicht mehr gültig.", + "description": "Geben Sie den Schlüssel auf dem Gerät ein, das Sie autorisieren möchten:", + "please_wait": "Bitte warten", + "tip": "Der Schlüssel ist 10 Minuten gültig.", + "get_new_key": "Neuen Schlüssel erhalten" + }, + "revoke_device_alert": { + "header": "Zugangsberechtigung aufheben?", + "description": "Das Gerät {} hat auf den Server keinen Zugriff mehr.", + "yes": "Widerrufen", + "no": "Abbrechen" + } + }, + "recovering": { + "domain_recovery_description": "Geben Sie eine Serverdomäne ein, für die Sie Zugriff erhalten möchten:", + "method_device_description": "Öffnen Sie die Anwendung auf einem anderen Gerät und gehen Sie dann zur Geräteseite. Drücken Sie auf „Gerät hinzufügen“, um Ihren Token zu erhalten.", + "fallback_select_token_copy": "Kopie des Authentifizierungstokens von einer anderen Version der Anwendung.", + "server_provider_connected_description": "Kommunikation hergestellt. Eingabe Ihres Tokens Token mit Zugriff auf {}:", + "choose_server_description": "Wir konnten nicht herausfinden, mit welchem Server Sie sich verbinden möchten.", + "modal_confirmation_dns_invalid": "Reverse DNS zeigt auf eine andere Domain", + "confirm_cloudflare_description": "Eingabe des Cloudflare-Tokens mit Zugriff auf {}:", + "confirm_backblaze": "Mit Backblaze verbinden", + "confirm_backblaze_description": "Geben Sie ein Backblaze-Token mit Zugriff auf den Sicherungsspeicher ein:", + "generic_error": "Vorgang fehlgeschlagen, bitte versuchen Sie es erneut.", + "recovery_main_header": "Verbindung zu einem vorhandenen Server herstellen", + "domain_recover_placeholder": "Ihre Domain", + "domain_recover_error": "Server mit dieser Domain wurde nicht gefunden", + "method_select_description": "Wählen Sie eine Wiederherstellungsmethode aus:", + "method_select_other_device": "Ich habe Zugriff auf einem anderen Gerät", + "method_select_recovery_key": "Ich habe einen Wiederherstellungsschlüssel", + "method_select_nothing": "Ich habe nichts davon", + "method_device_button": "Ich habe mein Token erhalten", + "method_device_input_description": "Geben Sie Ihr Autorisierungstoken ein", + "method_device_input_placeholder": "Token", + "method_recovery_input_description": "Geben Sie Ihren Wiederherstellungsschlüssel ein", + "fallback_select_description": "Was genau haben Sie? Wählen Sie die erste verfügbare Option:", + "fallback_select_root_ssh": "Root-SSH-Zugriff auf den Server.", + "fallback_select_provider_console": "Zugriff auf die Serverkonsole meines Prodivers.", + "authorization_failed": "Anmeldung mit diesem Schlüssel nicht möglich", + "fallback_select_provider_console_hint": "Zum Beispiel: Hetzner.", + "server_provider_connected": "Verbinden Sie sich mit Ihrem Serveranbieter", + "server_provider_connected_placeholder": "Token des Serveranbieters", + "confirm_server": "Server bestätigen", + "confirm_server_description": "Server gefunden! Bestätigen Sie, dass es das Richtige ist:", + "confirm_server_accept": "Ja! Das ist es", + "confirm_server_decline": "Einen anderen Server wählen", + "choose_server": "Wählen Sie Ihren Server", + "no_servers": "Auf Ihrem Konto sind keine Server verfügbar.", + "domain_not_available_on_token": "Die ausgewählte Domäne ist auf diesem Token nicht verfügbar.", + "modal_confirmation_title": "Ist es wirklich Ihr Server?", + "modal_confirmation_description": "Wenn Sie sich mit einem falschen Server verbinden, können Sie alle Ihre Daten verlieren.", + "modal_confirmation_dns_valid": "Reverse DNS ist gültig", + "modal_confirmation_ip_valid": "Die IP ist die gleiche wie im DNS-Eintrag", + "modal_confirmation_ip_invalid": "Die IP ist nicht dieselbe wie im DNS-Eintrag", + "confirm_cloudflare": "Mit CloudFlare verbinden" + }, + "recovery_key": { + "key_connection_error": "Es konnte keine Verbindung zum Server hergestellt werden.", + "key_main_description": "Wird für die SelfPrivacy-Autorisierung benötigt, wenn alle Ihre anderen autorisierten Geräte nicht verfügbar sind.", + "key_synchronizing": "Synchronisieren…", + "key_main_header": "Wiederherstellungsschlüssel", + "key_amount_toggle": "Nutzung einschränken", + "key_amount_field_title": "Maximale Anzahl von Nutzungen", + "key_duedate_toggle": "Zeitlich begrenzen", + "key_duedate_field_title": "Ablaufsdatum", + "key_receive_button": "Schlüssel erhalten", + "key_valid": "Ihr Schlüssel ist gültig", + "key_invalid": "Ihr Schlüssel ist nicht mehr gültig", + "key_valid_until": "Gültig bis {}", + "key_valid_for": "Gültig für {} Nutzungen", + "key_creation_date": "Erstellt am {}", + "key_replace_button": "Neuen Schlüssel generieren", + "key_receiving_info": "Der Schlüssel wird nie wieder angezeigt, aber Sie können ihn durch einen anderen ersetzen.", + "key_receiving_done": "Fertig!", + "generation_error": "Wiederherstellungsschlüssel konnte nicht generiert werden. {}", + "key_receiving_description": "Notieren Sie sich diesen Schlüssel und bewahren Sie ihn an einem sicheren Ort auf. Es wird verwendet, um den vollen Zugriff auf Ihren Server wiederherzustellen:" + }, + "video": { + "title": "Videokonferenz", + "subtitle": "Zoom und Google Meet sind gut, aber Jitsi Meet ist eine wertvolle Alternative, ber der Sie sicher sein können, das Ihre Gespräche nicht abgehört werden.", + "login_info": "Kein Konto erforderlich." + }, + "cloud": { + "title": "Cloud-Speicher", + "subtitle": "Erlauben Sie Cloud-Diensten nicht, Ihre Daten zu lesen, indem Sie NextCloud verwenden.", + "login_info": "Login für den Administrator ist admin, Passwort ist dasselbe wie bei Ihrem Hauptbenutzer. Erstellen Sie neue Konten in der Nextcloud-Oberfläche." + }, + "social_network": { + "title": "Soziales Netzwerk", + "subtitle": "Es ist schwer zu glauben, aber jetzt ist es möglich ein eigenes soziales Netzwerk mit Ihren eigenen Regeln und einer eigenen Zielgruppe zu erstellen.", + "login_info": "Sie müssen ein Konto auf der Website erstellen." + }, + "git": { + "title": "Git-Server", + "subtitle": "Private Alternative zum Github, die Ihnen und nicht Microsoft gehört.", + "login_info": "Sie müssen ein Konto auf der Website erstellen. Der erste Benutzer wird zum Administrator." + }, + "vpn": { + "title": "VPN-Server", + "subtitle": "Privater VPN-Server" + }, + "timer": { + "sec": "{} Sek" } } From 0e76f5301fbf8e172cdaad5518d0ae9dff70d927 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 22:17:30 +0000 Subject: [PATCH 386/732] Translated using Weblate (German) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_old Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_old/de/ --- assets/markdown/how_fallback_old-de.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/markdown/how_fallback_old-de.md b/assets/markdown/how_fallback_old-de.md index c12504e7..c00d7799 100644 --- a/assets/markdown/how_fallback_old-de.md +++ b/assets/markdown/how_fallback_old-de.md @@ -1,3 +1,3 @@ -In the next window, enter the token obtained from the console of the previous version of the application. +Geben Sie im nächsten Fenster das Token ein, das Sie von der Konsole der vorherigen Version der Anwendung erhalten haben. -Enter it without the word *Bearer*. +Geben Sie es ohne das Wort *Bearer* ein. From 7375074c4862f2162ba5b7751ee1b70906541b2b Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 22:04:19 +0000 Subject: [PATCH 387/732] Translated using Weblate (German) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_backblaze Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_backblaze/de/ --- assets/markdown/how_backblaze-de.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/markdown/how_backblaze-de.md b/assets/markdown/how_backblaze-de.md index b1e341d1..a9ef0c1c 100644 --- a/assets/markdown/how_backblaze-de.md +++ b/assets/markdown/how_backblaze-de.md @@ -1,8 +1,8 @@ -### How to get Backblaze API Token -1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm -2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. -3. Click on the blue **Generate New Master Application Key** button. -4. In the appeared pop-up window confirm the generation. -5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. +### So erhalten Sie das Backblaze-API-Token +1. Besuchen Sie den folgenden Link und melden Sie sich an: https://secure.backblaze.com/user_signin.htm +2. Wählen Sie auf der linken Seite der Benutzeroberfläche **App Keys** in der Unterkategorie **B2 Cloud Storage** aus. +3. Klicken Sie auf die blaue Schaltfläche **Generate New Master Application Key**. +4. Bestätigen Sie im erscheinenden Popup-Fenster die Generierung. +5. Speichern Sie _keyID_ und _applicationKey_ an einem sicheren Ort. Zum Beispiel im Passwort-Manager. -![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) +![Backblaze token Einrichtung](resource:assets/images/gifs/Backblaze.gif) From b0f4a243a9e52ee2e1d369180efd772803010e7f Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 22:12:54 +0000 Subject: [PATCH 388/732] Translated using Weblate (German) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/de/ --- assets/markdown/how_cloudflare-de.md | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/assets/markdown/how_cloudflare-de.md b/assets/markdown/how_cloudflare-de.md index 61fb4b4e..fd9d066d 100644 --- a/assets/markdown/how_cloudflare-de.md +++ b/assets/markdown/how_cloudflare-de.md @@ -1,17 +1,17 @@ -### How to get Cloudflare API Token -1. Visit the following link: https://dash.cloudflare.com/ -2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** -3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. -4. Click on **Create Token** button. -5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. -6. In the **Token Name** field, give your token a name. -7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. -8. Next, right under this line, click Add More. Similar field will appear. -9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. -10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. -11. Flick to the bottom and press the blue **Continue to Summary** button. -12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. -13. Click on **Create Token**. -14. We copy the created token, and save it in a reliable place (preferably in the password manager). +### So erhalten Sie das Cloudflare-API-Token +1. Besuchen Sie den folgenden Link: https://dash.cloudflare.com/ +2. Klicken Sie in der rechten Ecke auf das Profilsymbol (ein Mann im Kreis). Klicken Sie für die mobile Version der Website in der oberen linken Ecke auf die Schaltfläche **Menu** (drei horizontale Balken) und im Dropdown-Menü auf **My Profile** +3. Es stehen vier Konfigurationskategorien zur Auswahl: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +4. Klicken Sie auf die Schaltfläche **Create Token**. +5. Gehen Sie nach unten und sehen Sie sich das Feld **Create Custom Token** an und klicken Sie auf die Schaltfläche **Get Started** auf der rechten Seite. +6. Geben Sie Ihrem Token im Feld **Token Name** einen Namen. +7. Als nächstes haben wir Berechtigungen. Wählen Sie im linken Feld **Zone** aus. Wählen Sie im längsten Feld in der Mitte **DNS** aus. Wählen Sie im Feld ganz rechts **Edit** aus. +8. Klicken Sie als Nächstes direkt unter dieser Zeile auf Mehr hinzufügen. Ein ähnliches Feld wird angezeigt. +9. Wählen Sie im linken Feld der neuen Zeile ähnlich wie in der letzten Zeile — **Zone**. In der Mitte – etwas anders. Wählen Sie hier dasselbe wie links – **Zone**. Wählen Sie im Feld ganz rechts **Read** aus. +10. Sehen Sie sich als Nächstes **Zone Resources** an. Unter dieser Inschrift befindet sich eine Zeile mit zwei Feldern. Auf der linken Seite muss **Include** und auf der rechten Seite **Specific Zone** stehen. Nachdem Sie Spezifische Zone ausgewählt haben, erscheint rechts ein weiteres Feld. Wählen Sie darin Ihre Domain aus. +11. Blättern Sie nach unten und drücken Sie die blaue Schaltfläche **Continue to Summary**. +12. Überprüfen Sie, ob Sie alles richtig gemacht haben. Eine ähnliche Zeichenfolge muss vorhanden sein: *Domain — DNS:Edit, Zone:Read*. +13. Klicken Sie auf **Create Token**. +14. Wir kopieren das erstellte Token und speichern es an einem zuverlässigen Ort (vorzugsweise im Passwort-Manager). -![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) +![Cloudflare token Einrichtung](resource:assets/images/gifs/CloudFlare.gif) From f17bd9ed20ac2379b9c918cae090252aea863107 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 10 Feb 2023 18:13:54 +0000 Subject: [PATCH 389/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_backblaze Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_backblaze/be/ --- assets/markdown/how_backblaze-be.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/markdown/how_backblaze-be.md b/assets/markdown/how_backblaze-be.md index b1e341d1..76e364e3 100644 --- a/assets/markdown/how_backblaze-be.md +++ b/assets/markdown/how_backblaze-be.md @@ -1,8 +1,8 @@ -### How to get Backblaze API Token -1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm -2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. -3. Click on the blue **Generate New Master Application Key** button. -4. In the appeared pop-up window confirm the generation. -5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. +### Як атрымаць Backblaze API Token +1. Перайдзіце па спасылцы https://secure.backblaze.com/user_signin.htm і аўтарызуйцеся +2. У левай частцы інтэрфейсу абярыце **App Keys** y **B2 Cloud Storage** падкатэгорыі. +3. Націсніце на сінюю кнопку **Generate New Master Application Key**. +4. Пацвердзіце стварэнне ва ўсплываючым акне. +5. Схавайце _keyID_ і _applicationKey_ у бяспечным месце. Напрыклад, у мэнеджэры пароляў. -![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) +![Атрыманіе токена Backblaze](resource:assets/images/gifs/Backblaze.gif) From 0938f35a2337bc1e807665840ef72e3b5035d6e0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 12 Feb 2023 12:35:17 +0000 Subject: [PATCH 390/732] Added translation using Weblate (Slovenian) --- assets/translations/sl.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/translations/sl.json diff --git a/assets/translations/sl.json b/assets/translations/sl.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/sl.json @@ -0,0 +1 @@ +{} From 59e7693f361ff4702454908ffec12761dd55f3c7 Mon Sep 17 00:00:00 2001 From: Ortibexon Date: Sun, 12 Feb 2023 10:04:25 +0000 Subject: [PATCH 391/732] Translated using Weblate (Azerbaijani) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/az/ --- assets/translations/az.json | 284 +++++++++++++++++++++++++++++++++++- 1 file changed, 283 insertions(+), 1 deletion(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index 37e9535d..54b22d45 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -189,6 +189,288 @@ "extending_volume_error": "Yaddaş genişləndirilməsinə başlamaq alınmadı.", "size": "Ölçüsü", "euro": "Avro", - "extending_volume_description": "Yaddaş ölçüsünün dəyişdirilməsi, serverin özünü genişləndirmədən serverinizdə daha çox məlumat saxlamağa imkan verəcəkdir. Həcmi yalnız artırmaq olar, onu azaltmaq olmaz." + "extending_volume_description": "Yaddaş ölçüsünün dəyişdirilməsi, serverin özünü genişləndirmədən serverinizdə daha çox məlumat saxlamağa imkan verəcəkdir. Həcmi yalnız artırmaq olar, onu azaltmaq olmaz.", + "data_migration_title": "Məlumat miqrasiya", + "data_migration_notice": "Məlumatların köçürülməsi zamanı bütün xidmətlər deaktiv ediləcək.", + "start_migration_button": "Miqrasiyaya başlayın", + "migration_process": "Köçür…", + "migration_done": "Tamamlayın" + }, + "service_page": { + "move": "Başqa sürücüyə keçin", + "open_in_browser": "Brauzerdə açın", + "restart": "Xidməti yenidən başladın", + "disable": "Xidməti söndürün", + "enable": "Xidməti aktivləşdirin", + "uses": "{volume} üzərində {usage} istifadə edir", + "status": { + "active": "Açılır və qaçır", + "inactive": "Dayandı", + "failed": "Başlamaq alınmadı", + "off": "Əlil", + "activating": "Yandırılır", + "deactivating": "Söndürür", + "reloading": "Yenidən başladıldı" + } + }, + "mail": { + "login_info": "İstifadəçilər sekmesinden istifadəçi adı və paroldan istifadə edin. IMAP portu: 143, STARTTLS. SMTP portu: 587, STARTTLS.", + "title": "E-poçt", + "subtitle": "Ailə və ya şirkət üçün e-poçt." + }, + "video": { + "subtitle": "Jitsi meet Zoom və Google meet-in əla analoqudur və bu, rahatlıqla yanaşı, yüksək keyfiyyətli video konfransların təhlükəsizliyini təmin edir.", + "title": "video konfrans", + "login_info": "Hesab tələb olunmur." + }, + "cloud": { + "login_info": "Administrator girişi: admin, parol əsas istifadəçi ilə eynidir. NextCloud admin interfeysində yeni istifadəçilər yaradın.", + "title": "Fayl bulud", + "subtitle": "Bulud xidmətlərinin məlumatlarınıza baxmasının qarşısını alın. NextCloud istifadə edin - bütün məlumatlarınız üçün təhlükəsiz ev." + }, + "git": { + "login_info": "Saytda hesab yaradılmalıdır. İlk qeydiyyatdan keçmiş istifadəçi administrator olur.", + "title": "Git Server", + "subtitle": "Microsoft-a deyil, sizə məxsus şəxsi Github alternativi." + }, + "users": { + "not_ready": "Birinci istifadəçini əlavə etmək üçün Provayderlər bölməsində server, domen və DNS-ni birləşdirin", + "could_not_fetch_description": "İnternet bağlantısını yoxlayın və yenidən cəhd edin", + "username_rule": "Adda yalnız kiçik Latın hərfləri, rəqəmlər, alt xətt ola bilər, rəqəmlərlə başlaya bilməz", + "add_new_user": "İlk istifadəçini əlavə edin", + "new_user": "Yeni istifadəçi", + "delete_user": "İstifadəçini silin", + "nobody_here": "İstifadəçilər burada göstəriləcək", + "login": "Daxil ol", + "new_user_info_note": "Yeni istifadəçi avtomatik olaraq bütün xidmətlərə çıxış əldə edəcək", + "delete_confirm_question": "Hesabınızı silmək istədiyinizə əminsiniz?", + "reset_password": "Parolu sıfırlayın", + "account": "Hesab", + "send_registration_data": "Detalları paylaşın", + "could_not_fetch_users": "İstifadəçiləri əldə etmək alınmadı", + "refresh_users": "İstifadəçi siyahısını yeniləyin", + "could_not_create_user": "İstifadəçi yaratmaq alınmadı", + "could_not_delete_user": "İstifadəçini silmək alınmadı", + "could_not_add_ssh_key": "SSH açarı yaratmaq alınmadı", + "email_login": "E-poçt Avtorizasiyası", + "no_ssh_notice": "Bu istifadəçi üçün yalnız SSH və E-poçt hesabları yaradılmışdır. Bütün xidmətlər üçün vahid icazə hələ tətbiq edilməyib." + }, + "initializing": { + "select_provider": "Aşağıda SelfPrivacy tərəfindən dəstəklənən provayderlərin seçimi var", + "select_provider_countries_text_do": "ABŞ, Hollandiya, Sinqapur, Böyük Britaniya, Almaniya, Kanada, Hindistan, Avstraliya", + "connect_to_server_provider_text": "Token API-dən istifadə edərək SelfPrivacy proqramı sizin adınıza server sifariş edə və konfiqurasiya edə biləcək", + "no_locations_found": "Heç bir məkan tapılmadı, lütfən, hesabınızın mövcud olduğundan əmin olun", + "choose_server_type_text": "Server resursları hansı xidmətlərin başlaya biləcəyini müəyyənləşdirir. İstənilən vaxt serveri genişləndirə bilərsiniz", + "no_server_types_found": "Heç bir mövcud server növləri tapılmadı! Lütfən, server provayderinə girişinizin olduğundan əmin olun...", + "server_rebooted": "Server yenidən başladıldı, son yoxlamanı gözləyirik…", + "one_more_restart": "İndi təhlükəsizlik sertifikatlarını aktivləşdirmək üçün əlavə reboot olacaq.", + "connect_to_server": "Serverdən başlayaq.", + "select_provider_notice": "“Kiçik server” dedikdə biz iki prosessor xətti və iki giqabayt operativ yaddaşa malik serveri nəzərdə tuturuq.", + "select_provider_countries_title": "Mövcud ölkələr", + "select_provider_countries_text_hetzner": "Almaniya, Finlandiya, ABŞ", + "select_provider_price_title": "Orta qiymət", + "select_provider_price_text_hetzner": "Kiçik bir server və 50 GB disk sahəsi üçün ayda € 8", + "select_provider_price_text_do": "Kiçik server və 50 GB disk sahəsi üçün ayda $17", + "select_provider_payment_title": "Ödəmə metodları", + "select_provider_payment_text_hetzner": "Bank kartları, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Bank kartları, Google Pay, PayPal", + "select_provider_email_notice": "Yeni müştərilər üçün e-poçt hostinqi mövcud deyil. İlk ödənişdən sonra onu açmaq mümkün olacaq.", + "select_provider_site_button": "Saytı ziyarət edin", + "connect_to_server_provider": "Giriş ", + "how": "API Tokenini necə əldə etmək olar", + "provider_bad_key_error": "Provayder API açarı yanlışdır", + "could_not_connect": "Provayderə qoşulmaq alınmadı.", + "choose_location_type": "Harada server sifariş etmək olar?", + "choose_location_type_text": "Mövcud konfiqurasiyalar, qiymətlər və serverə qoşulma sürətiniz yer seçimindən asılı olacaq.", + "locations_not_found": "Vay!", + "locations_not_found_text": "Bu məkanda icarəyə verilə bilən server yoxdur", + "back_to_locations": "Başqasını seçək", + "choose_server_type": "Hansı server növünü seçmək lazımdır?", + "choose_server_type_notice": "Diqqət etməli olduğunuz əsas şey prosessor iplərinin sayı və RAM miqdarıdır. Xidmət məlumatları ayrıca ödənilən və asanlıqla genişləndirilə bilən ayrıca diskdə yerləşdiriləcək.", + "choose_server_type_ram": "RAM üçün {} GB", + "choose_server_type_storage": "{} GB sistem yaddaşı", + "choose_server_type_payment_per_month": "{} aylıq", + "cloudflare_bad_key_error": "Cloudflare API açarı yanlışdır", + "backblaze_bad_key_error": "Backblaze vault haqqında məlumat yanlışdır", + "select_dns": "İndi DNS provayderini seçək", + "manage_domain_dns": "Domeninizin DNS-ni idarə etmək üçün", + "use_this_domain": "Biz bu domendən istifadə edirik?", + "use_this_domain_text": "Göstərdiyiniz token bu domen üzərində nəzarəti təmin edir", + "cloudflare_api_token": "CloudFlare API Açarı", + "connect_backblaze_storage": "Backblaze bulud yaddaşınızı birləşdirin", + "no_connected_domains": "Hazırda heç bir bağlı domen yoxdur", + "loading_domain_list": "Domenlərin siyahısı yüklənir", + "found_more_domains": "Birdən çox domen tapıldı, təhlükəsizliyiniz üçün lazımsız domenləri silin", + "save_domain": "Domeni yadda saxla", + "final": "Son addım", + "create_server": "Server yaradın", + "what": "Bunun mənası nədi?", + "server_started": "Server işləyir. İndi yoxlanılacaq və yenidən işə salınacaq…", + "server_created": "Server yaradıldı. DNS ünvanları yoxlanılır və server işə salınır…", + "until_the_next_check": "Növbəti yoxlamaya qədər: ", + "check": "Yoxlanış", + "create_master_account": "Əsas hesab yaradın", + "enter_username_and_password": "İstifadəçi adı və mürəkkəb parol daxil edin", + "finish": "Hər şey işə salınıb", + "checks": "Yoxlamalar aparıldı:. \n{} / {}" + }, + "recovering": { + "domain_recovery_description": "Serverə daxil olmaq istədiyiniz domeni daxil edin:", + "method_device_description": "Proqramı başqa cihazda açın və cihaz idarəetmə ekranını açın. Avtorizasiya nişanı əldə etmək üçün \"Cihaz əlavə et\" üzərinə klikləyin.", + "modal_confirmation_title": "Bu həqiqətən sizin serverinizdir?", + "modal_confirmation_description": "Yanlış serverə qoşulmaq dağıdıcı ola bilər.", + "modal_confirmation_ip_invalid": "IP DNS qeydində göstərilənə uyğun gəlmir", + "generic_error": "Əməliyyat uğursuz oldu, yenidən cəhd edin.", + "recovery_main_header": "Mövcud serverə qoşulun", + "domain_recover_placeholder": "Sizin domeniniz", + "domain_recover_error": "Bu domenlə server tapmaq mümkün olmadı", + "method_select_description": "Giriş metodunu seçin:", + "method_select_other_device": "Başqa cihazda girişim var", + "method_select_recovery_key": "Məndə bərpa açarı var", + "method_select_nothing": "Məndə bunların heç biri yoxdur", + "method_device_button": "Token aldım", + "method_device_input_description": "İcazə nişanınızı daxil edin", + "method_device_input_placeholder": "Token", + "method_recovery_input_description": "Bərpa nişanınızı daxil edin", + "fallback_select_description": "Bundan sənə nə var? İlk uyğun gələni seçin:", + "fallback_select_token_copy": "Tətbiqin başqa versiyasından icazə nişanının surəti.", + "fallback_select_root_ssh": "SSH vasitəsilə serverə Root girişi.", + "fallback_select_provider_console": "Hostinq konsoluna giriş.", + "authorization_failed": "Bu açarla daxil olmaq alınmadı", + "fallback_select_provider_console_hint": "Məsələn: Hetzner.", + "server_provider_connected": "Server provayderinizə qoşulur", + "server_provider_connected_description": "Əlaqə quruldu. {} girişi ilə nişanınızı daxil edin:", + "server_provider_connected_placeholder": "Server provayderi nişanı", + "confirm_server": "Serveri təsdiqləyin", + "confirm_server_description": "Server tapdım! Onun olduğunu təsdiq edin:", + "confirm_server_accept": "Bəli, odur", + "confirm_server_decline": "Başqa server seçin", + "choose_server": "Server seçin", + "choose_server_description": "Hansı serverlə əlaqə saxladığınızı müəyyən etmək mümkün olmadı.", + "no_servers": "Hesabınızda mövcud server yoxdur.", + "domain_not_available_on_token": "Daxil edilmiş işarənin tələb olunan domenə girişi yoxdur.", + "modal_confirmation_dns_valid": "Əks DNS düzgündür", + "modal_confirmation_dns_invalid": "Əks DNS fərqli domenə işarə edir", + "modal_confirmation_ip_valid": "IP DNS qeydində göstərilənə uyğun gəlir", + "confirm_cloudflare": "Cloudflare-ə qoşulur", + "confirm_cloudflare_description": "{} hüququ olan Cloudflare tokenini daxil edin:", + "confirm_backblaze": "Backblaze-ə qoşulur", + "confirm_backblaze_description": "Ehtiyat saxlama hüququ olan Backblaze tokenini daxil edin:" + }, + "devices": { + "main_screen": { + "description": "Bu cihazların SelfPrivacy proqramı vasitəsilə server idarəçiliyinə tam çıxışı var.", + "header": "Cihazlar", + "this_device": "Bu cihaz", + "other_devices": "Digər cihazlar", + "authorize_new_device": "Yeni cihaza icazə verin", + "access_granted_on": "Giriş verilmişdir {}", + "tip": "Girişi ləğv etmək üçün cihaza klikləyin." + }, + "revoke_device_alert": { + "description": "{} cihazı artıq serveri idarə edə bilməyəcək.", + "header": "Giriş ləğv edilsin?", + "yes": "Geri çəkilmək", + "no": "Ləğv et" + }, + "add_new_device_screen": { + "header": "Yeni Cihaz Avtorizasiyası", + "description": "Bu açarı yeni cihaza daxil edin:", + "please_wait": "Zəhmət olmasa, gözləyin", + "tip": "Açar 10 dəqiqə etibarlıdır.", + "expired": "Açarın müddəti bitib.", + "get_new_key": "Yeni açar alın" + } + }, + "recovery_key": { + "key_main_description": "Səlahiyyətli cihazlar mövcud olmadıqda SelfPrivacy avtorizasiyası üçün tələb olunur.", + "key_receiving_description": "Bu açarı təhlükəsiz yerə yazın. O, serverinizə tam giriş imkanı verir:", + "key_connection_error": "Serverə qoşulmaq alınmadı.", + "key_synchronizing": "Sinxronizasiya…", + "key_main_header": "Bərpa açarı", + "key_amount_toggle": "İstifadəsini məhdudlaşdırın", + "key_amount_field_title": "Maks. istifadə sayı", + "key_duedate_toggle": "İstifadə müddətini məhdudlaşdırın", + "key_duedate_field_title": "Son istifadə tarixi", + "key_receive_button": "Açar alın", + "key_valid": "Açarınız etibarlıdır", + "key_invalid": "Açarınız artıq etibarlı deyil", + "key_valid_until": "{} tarixinə qədər etibarlıdır", + "key_valid_for": "Daha {} dəfə istifadə edə bilərsiniz", + "key_creation_date": "Yaradılıb {}", + "key_replace_button": "Yeni açar yaradın", + "key_receiving_info": "Bu açar artıq göstərilməyəcək, lakin siz onu yenisi ilə əvəz edə bilərsiniz.", + "key_receiving_done": "Hazır!", + "generation_error": "Açar yaratmaq alınmadı. {}" + }, + "modals": { + "unexpected_error": "Provayder tərəfindən gözlənilməz xəta.", + "dns_removal_error": "DNS qeydlərini silmək mümkün deyil.", + "server_deletion_error": "Server silinə bilməz.", + "server_validators_error": "Server siyahısını əldə etmək alınmadı.", + "already_exists": "Belə bir server artıq mövcuddur.", + "destroy_server": "Serveri məhv edib yenisini yaratmaq?", + "try_again": "Bir daha cəhd etmək üçün?", + "are_you_sure": "Sən əminsən?", + "purge_all_keys": "Bütün avtorizasiya açarları silinsin?", + "purge_all_keys_confirm": "Bəli, bütün düymələri silin", + "delete_server_volume": "Server və yaddaş silinsin?", + "reboot": "Yenidən yükləyin", + "you_cant_use_this_api": "Siz oxşar TLD ilə domen üçün bu API istifadə edə bilməzsiniz.", + "yes": "Bəli", + "no": "Yox" + }, + "jobs": { + "create_ssh_key": "{} üçün SSH açarı yaradın", + "title": "Tapşırıqlar", + "start": "İcra etməyə başlayın", + "empty": "Tapşırıq yoxdur", + "create_user": "İstifadəçi yaradın", + "delete_user": "İstifadəçini silin", + "service_turn_off": "Dayan", + "service_turn_on": "Başlayın", + "job_added": "Tapşırıq əlavə edildi", + "run_jobs": "Tapşırıqları yerinə yetirin", + "reboot_success": "Server yenidən işə salınır", + "reboot_failed": "Serveri yenidən başlatmaq alınmadı, qeydləri yoxlayın.", + "config_pull_failed": "Server konfiqurasiyasını yeniləmək alınmadı. Proqram təminatı yeniləməsi başladı.", + "upgrade_success": "Server yeniləməsi başladı", + "upgrade_failed": "Server yeniləməsi uğursuz oldu", + "upgrade_server": "Serveri yeniləyin", + "reboot_server": "Serveri yenidən başladın", + "delete_ssh_key": "{} üçün SSH açarını silin", + "server_jobs": "Serverdəki tapşırıqlar", + "reset_user_password": "İstifadəçi parolunu sıfırlayın", + "generic_error": "Serverə qoşulmaq alınmadı!" + }, + "validations": { + "already_exist": "Artıq mövcuddur", + "length_not_equal": "[] sətirinin uzunluğu {}-ə bərabər olmalıdır", + "required": "Məcburi sahə", + "invalid_format": "Səhv format", + "invalid_format_password": "İçərisində boş simvol olmamalıdır", + "invalid_format_ssh": "SSH açar formatına əməl edilməlidir", + "root_name": "İstifadəçi adı 'root' ola bilməz", + "length_longer": "[] sətirinin uzunluğu {}-dən kiçik və ya ona bərabər olmalıdır" + }, + "not_ready_card": { + "in_menu": "Server hələ konfiqurasiya edilməyib, əlaqə sihirbazından istifadə edin." + }, + "password_manager": { + "title": "Parol Meneceri", + "subtitle": "Bu, təhlükəsizliyinizin əsasıdır. Bitwarden sizə cihazlar arasında parollar yaratmağa, saxlamağa, köçürməyə və onları formalara çevirməyə kömək edəcək.", + "login_info": "Saytda hesab yaradılmalıdır." + }, + "social_network": { + "title": "sosial Mediya", + "subtitle": "İnanmaq çətindir, lakin öz qaydaları və auditoriyası olan öz sosial şəbəkənizi yaratmaq mümkün oldu.", + "login_info": "Аккаунт нужно создать на сайте." + }, + "vpn": { + "title": "VPN server", + "subtitle": "Bağlı VPN serveri" + }, + "timer": { + "sec": "{} san" } } From 35f00fa032b6f5ba9de781fbce9f793a1b9835ba Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Sun, 12 Feb 2023 19:03:35 +0000 Subject: [PATCH 392/732] Translated using Weblate (Japanese) Currently translated at 0.5% (2 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ja/ --- assets/translations/ja.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/translations/ja.json b/assets/translations/ja.json index 0967ef42..07e84b75 100644 --- a/assets/translations/ja.json +++ b/assets/translations/ja.json @@ -1 +1,4 @@ -{} +{ + "test": "jp-test", + "locale": "jp" +} From b4b8625a26f37d0b4a88d2457731e7793c4d8c42 Mon Sep 17 00:00:00 2001 From: Revertron Date: Tue, 14 Feb 2023 12:22:44 +0000 Subject: [PATCH 393/732] Translated using Weblate (English) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/en/ --- assets/translations/en.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 893d5884..c849e266 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -53,8 +53,8 @@ }, "about_application_page": { "title": "About", - "application_version_text": "Application version v.{}", - "api_version_text": "Server API version v.{}", + "application_version_text": "Application version {}", + "api_version_text": "Server API version {}", "privacy_policy": "Privacy policy" }, "application_settings": { From bac6e66ac04478a3d1a777ac413ffff9ca56d4b4 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 13:03:28 +0000 Subject: [PATCH 394/732] Translated using Weblate (Azerbaijani) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/az/ --- assets/translations/az.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index 54b22d45..56d67f06 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -49,8 +49,8 @@ "waiting": "Başlama gözlənilir…" }, "about_application_page": { - "application_version_text": "Tətbiq versiyası v.{}", - "api_version_text": "Server API versiyası v.{}", + "application_version_text": "Tətbiq versiyası {}", + "api_version_text": "Server API versiyası {}", "privacy_policy": "Gizlilik Siyasəti", "title": "Tətbiq haqqında" }, From 0a028df6d4ba1279cfe9fb3193febce87e8cf59d Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 13:04:47 +0000 Subject: [PATCH 395/732] Translated using Weblate (Ukrainian) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/uk/ --- assets/translations/uk.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/uk.json b/assets/translations/uk.json index 00d76b50..2de33241 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -73,8 +73,8 @@ "title": "Про нас" }, "about_application_page": { - "application_version_text": "Версія додатку v.{}", - "api_version_text": "Версія API сервера v.{}", + "application_version_text": "Версія додатку {}", + "api_version_text": "Версія API сервера {}", "privacy_policy": "Політика конфіденційності", "title": "Про нас" }, From 50b504d563b364d161c18944f73baa9975d3e5e9 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 17:58:09 +0000 Subject: [PATCH 396/732] Translated using Weblate (Polish) Currently translated at 50.0% (1 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/pl/ --- assets/markdown/how_cloudflare-pl.md | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/markdown/how_cloudflare-pl.md b/assets/markdown/how_cloudflare-pl.md index 61fb4b4e..3a0caee9 100644 --- a/assets/markdown/how_cloudflare-pl.md +++ b/assets/markdown/how_cloudflare-pl.md @@ -1,17 +1,17 @@ -### How to get Cloudflare API Token -1. Visit the following link: https://dash.cloudflare.com/ -2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** -3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. -4. Click on **Create Token** button. -5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. -6. In the **Token Name** field, give your token a name. -7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. -8. Next, right under this line, click Add More. Similar field will appear. -9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. -10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. -11. Flick to the bottom and press the blue **Continue to Summary** button. -12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. -13. Click on **Create Token**. -14. We copy the created token, and save it in a reliable place (preferably in the password manager). +### Jak otrzymać Cloudflare API Token +1. Odwiedź ten link: https://dash.cloudflare.com/ +2. W prawym rogu kliknij ikonę profilu (mężczyzna w kółku). W wersji mobilnej strony w lewym górnym rogu kliknij przycisk **Menu** (trzy poziome kreski), w rozwijanym menu kliknij **My profile** +3. Do wyboru są cztery kategorie konfiguracji: *Communication*, *Authentication*, **API Tokens**, *Session*. Wybierż **API Tokens**. +4. Kliknij na **Create Token**. +5. Zejdź na dół i zobacz **Create Custom Token** pole and naciśnij **Get Started** po prawej stronie. +6. W polu **Token Name** podaj nazwę swojego tokena. +7. Dalej mamy Uprawnienia. W skrajnym lewym polu wybierz **Zone**. W najdłuższym polu pośrodku wybierz **DNS**. W polu po prawej stronie wybierz **Edit**. +8. Następnie, tuż pod tą linią, kliknij Dodaj więcej. Pojawi się podobne okno. +9. W skrajnym lewym polu nowej linii wybierz, podobnie jak w ostatniej linii — **Zone**. W centrum — trochę inaczej: tutaj wybieramy to samo co po lewej — **Zone**. W polu po prawej stronie wybierz **Read**. +10. Następnie spójrz na **Zone Resources**. Pod tym napisem znajduje się linia z dwoma polami. Po lewej musi mieć opcję **Include**, a po prawej **Specific Zone**. Po wybraniu określonej strefy po prawej stronie pojawi się kolejne pole. Wybierz w nim swoją domenę. +11. Przesuń w dół i naciśnij niebieski przycisk **Continue to Summary**. +12. Sprawdź, czy wszystko zrobiłeś dobrze. Podobny ciąg musi być obecny: *Domain — DNS:Edit, Zone:Read*. +13. Naciśnij na **Create Token**. +14. Stworzony token kopiujemy i zapisujemy w bezpiecznym miejscu (najlepiej w menedżerze haseł). ![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) From 1498a16853f29c9c7ca5d7ff150fc792b1091258 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 18:33:08 +0000 Subject: [PATCH 397/732] Translated using Weblate (Polish) Currently translated at 12.5% (1 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/pl/ --- assets/markdown/how_fallback_terminal-pl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_fallback_terminal-pl.md b/assets/markdown/how_fallback_terminal-pl.md index 77c97efa..03695810 100644 --- a/assets/markdown/how_fallback_terminal-pl.md +++ b/assets/markdown/how_fallback_terminal-pl.md @@ -1,4 +1,4 @@ -In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. +W panelu sterowania serwera Hetzner przejdź do zakładki **Rescue**. Następnie kliknij **Enable rescue & power cycle**. In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. From 7322d5281ae530910a52365be98756fb3655ea23 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 12:59:58 +0000 Subject: [PATCH 398/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/be/ --- assets/translations/be.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/be.json b/assets/translations/be.json index efe560c9..e9bafe9e 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -236,9 +236,9 @@ "console": "Кансоль" }, "about_application_page": { - "application_version_text": "Версія праграмы v.{}", + "application_version_text": "Версія праграмы {}", "title": "Аб праграме", - "api_version_text": "Версія API сервера v.{}", + "api_version_text": "Версія API сервера {}", "privacy_policy": "Палітыка прыватнасці" }, "application_settings": { From b3a1d18a23f8cb1f3133c3ca478fc0ade083a249 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 12:10:45 +0000 Subject: [PATCH 399/732] Translated using Weblate (Spanish) Currently translated at 18.0% (72 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/es/ --- assets/translations/es.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/translations/es.json b/assets/translations/es.json index 1cf786a4..e01f9167 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -66,7 +66,12 @@ "page2_text": "SelfPrivacy sólo trabaja con los proveedores que usted elija. Si no tiene cuentas obligatorias en ellos, le ayudaremos a crearlas.", "page1_title": "La independencia digital, al alcance de todos", "page1_text": "Correo, VPN, Messenger, red social y mucho más en tu servidor privado, bajo tu control.", - "page2_title": "SelfPrivacy no es una nube, es tu centro de datos personal" + "page2_title": "SelfPrivacy no es una nube, es tu centro de datos personal", + "page2_server_provider_title": "Servidor proveedor", + "page2_server_provider_text": "Un proveedor de servidores mantiene su servidor en su propio centro de datos. SelfPrivacy se conectará automáticamente al proveedor y configurará todo lo necesario.", + "page2_dns_provider_title": "Proveedor de DNS", + "page2_backup_provider_title": "Proveedor de copias de seguridad", + "page2_dns_provider_text": "Necesitas un dominio para tener un lugar en Internet. Y también necesitas un proveedor de DNS fiable para que el dominio apunte a tu servidor. Le sugeriremos que elija un proveedor de DNS compatible para configurar automáticamente la red." }, "more_page": { "configuration_wizard": "Asistente de configuración", From 024aad09033787289bb869c5ba979dc443c5cc38 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 18:24:17 +0000 Subject: [PATCH 400/732] Translated using Weblate (Polish) Currently translated at 50.0% (1 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_old Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_old/pl/ --- assets/markdown/how_fallback_old-pl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_fallback_old-pl.md b/assets/markdown/how_fallback_old-pl.md index c12504e7..351d9647 100644 --- a/assets/markdown/how_fallback_old-pl.md +++ b/assets/markdown/how_fallback_old-pl.md @@ -1,3 +1,3 @@ -In the next window, enter the token obtained from the console of the previous version of the application. +W kolejnym oknie wprowadź token uzyskany z konsoli poprzedniej wersji aplikacji. Enter it without the word *Bearer*. From 5482ecc232953bb2c292ab133c70ad5dd03da759 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Mon, 13 Feb 2023 20:53:29 +0000 Subject: [PATCH 401/732] Translated using Weblate (Macedonian) Currently translated at 1.2% (5 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/mk/ --- assets/translations/mk.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/translations/mk.json b/assets/translations/mk.json index 0967ef42..0e655d5a 100644 --- a/assets/translations/mk.json +++ b/assets/translations/mk.json @@ -1 +1,9 @@ -{} +{ + "test": "mk-test", + "basis": { + "providers": "Провајдери", + "providers_title": "Вашиот центар за податоци", + "select": "Изберите" + }, + "locale": "mk" +} From 633710e3c56cd8b56cf0faf6a34d87bb7fdae1a7 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 13:04:02 +0000 Subject: [PATCH 402/732] Translated using Weblate (German) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/de/ --- assets/translations/de.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/de.json b/assets/translations/de.json index 1210fddb..af956aed 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -53,8 +53,8 @@ }, "about_application_page": { "title": "Über", - "application_version_text": "Anwendungsversion v.{}", - "api_version_text": "Server API Version v.{}", + "application_version_text": "Anwendungsversion {}", + "api_version_text": "Server API Version {}", "privacy_policy": "Datenschutzerklärung" }, "application_settings": { From 6d68bd3cd6941cd648b6939979f2e1e879152292 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 18:35:14 +0000 Subject: [PATCH 403/732] Translated using Weblate (Polish) Currently translated at 59.0% (236 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 39f41013..0eead5f2 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -258,12 +258,37 @@ "reset_password": "Zresetuj hasło", "account": "Konto", "send_registration_data": "Udostępnij dane logowania", - "could_not_fetch_users": "Nie udało się uzyskać użytkowników" + "could_not_fetch_users": "Nie udało się uzyskać użytkowników", + "could_not_fetch_description": "Sprawdź połączenie internetowe i spróbuj ponownie", + "refresh_users": "Odśwież listę użytkowników", + "could_not_create_user": "Nie udało się utworzyć użytkownika", + "could_not_delete_user": "Nie udało się usunąć użytkownika", + "could_not_add_ssh_key": "Nie udało się utworzyć SSH klucz", + "username_rule": "Nazwa użytkownika może zawierać tylko małe litery alfabetu łacińskiego, cyfry i podkreślenia, nie może zaczynać się od cyfry", + "email_login": "Logowanie e-mailem", + "no_ssh_notice": "Dla tego użytkownika tworzone są tylko konta e-mail i SSH. Jednokrotne logowanie do wszystkich usług będzie dostępne wkrótce." }, "validations": { "length_longer": "Długość ciągu znaków [] musi być mniejsza lub równa {}" }, "not_ready_card": { "in_menu": "Serwer jeszcze nie jest skonfigurowany, użyj kreatora połączeń." + }, + "initializing": { + "connect_to_server": "Zacznijmy od serwera.", + "select_provider": "Wybierz dowolnego dostawcę z poniższej listy, wszyscy obsługują SelfPrivacy", + "select_provider_notice": "Przez \"stosunkowo małą\" rozumiemy maszynę z 2 rdzeniami procesora i 2 gigabajtami pamięci RAM.", + "select_provider_countries_title": "Dostępne kraje", + "select_provider_countries_text_hetzner": "Niemcy, Finlandia, USA", + "select_provider_countries_text_do": "USA, Holandia, Singapur, Wielka Brytania, Niemcy, Kanada, Indie, Australia", + "select_provider_payment_text_do": "Karty kredytowe, Google Pay, PayPal", + "select_provider_email_notice": "Hosting poczty e-mail nie będzie dostępny dla nowych klientów. Niemniej jednak zostanie odblokowany, gdy tylko dokonasz pierwszej płatności.", + "select_provider_site_button": "Odwiedź stronę", + "select_provider_price_title": "Średnia cena", + "select_provider_price_text_hetzner": "€8 miesięcznie za stosunkowo mały serwer i 50GB miejsca na dysku", + "select_provider_price_text_do": "$17 miesięcznie za stosunkowo mały serwer i 50GB miejsca na dysku", + "select_provider_payment_title": "Metody płatności", + "select_provider_payment_text_hetzner": "Karty kredytowe, SWIFT, SEPA, PayPal", + "connect_to_server_provider": "Teraz zaloguj się przez " } } From 9185111a567a8c6e9ec18109b141b72d1a2cf374 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 18:28:03 +0000 Subject: [PATCH 404/732] Translated using Weblate (Polish) Currently translated at 50.0% (1 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_backblaze Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_backblaze/pl/ --- assets/markdown/how_backblaze-pl.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/markdown/how_backblaze-pl.md b/assets/markdown/how_backblaze-pl.md index b1e341d1..f5e195a7 100644 --- a/assets/markdown/how_backblaze-pl.md +++ b/assets/markdown/how_backblaze-pl.md @@ -1,8 +1,8 @@ -### How to get Backblaze API Token -1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm -2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. -3. Click on the blue **Generate New Master Application Key** button. -4. In the appeared pop-up window confirm the generation. -5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. +### Jak otrzymać Backblaze API Token +1. Odwiedź poniższy link i autoryzuj: https://secure.backblaze.com/user_signin.htm +2. Po lewej stronie wybierz **App Keys** w podkategorіі **B2 Cloud Storage**. +3. Naciśnij **Generate New Master Application Key**. +4. W wyświetlonym oknie podręcznym potwierdź generację. +5. Zapisz _keyID_ i _applicationKey_ w bezpiecznym miejscu. Na przykład w menedżerze haseł. ![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) From d72c790dea3a97cf5c1cb88db041d09b8b6655b5 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 14 Feb 2023 17:58:27 +0000 Subject: [PATCH 405/732] Translated using Weblate (Polish) Currently translated at 20.0% (1 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_ssh Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_ssh/pl/ --- assets/markdown/how_fallback_ssh-pl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_fallback_ssh-pl.md b/assets/markdown/how_fallback_ssh-pl.md index ce90e76a..1659d662 100644 --- a/assets/markdown/how_fallback_ssh-pl.md +++ b/assets/markdown/how_fallback_ssh-pl.md @@ -1,4 +1,4 @@ -Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` +Zaloguj się jako użytkownik root na swoim serwerze i przejrzyj zawartość pliku `/etc/nixos/userdata/tokens.json` ```sh cat /etc/nixos/userdata/tokens.json From 4f9a717dc31fd032c3490cdac6fad4cb05ccf652 Mon Sep 17 00:00:00 2001 From: Revertron Date: Tue, 14 Feb 2023 23:16:32 +0000 Subject: [PATCH 406/732] Translated using Weblate (Slovak) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/sk/ --- assets/translations/sk.json | 477 +++++++++++++++++++++++++++++++++++- 1 file changed, 476 insertions(+), 1 deletion(-) diff --git a/assets/translations/sk.json b/assets/translations/sk.json index 0967ef42..49538eb7 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -1 +1,476 @@ -{} +{ + "validations": { + "length_longer": "Dĺžka je [], mala by byť kratšia alebo rovná {}", + "required": "Požadované pole", + "already_exist": "Už existuje", + "invalid_format": "Nesprávny formát", + "invalid_format_ssh": "Musí dodržiavať formát kľúča SSH", + "root_name": "Používateľské meno nemôže byť 'root'", + "length_not_equal": "Dĺžka je [], mala by byť {}", + "invalid_format_password": "Nesmie obsahovať prázdne znaky" + }, + "modals": { + "no": "Nie", + "are_you_sure": "Ste si istý?", + "you_cant_use_this_api": "Toto API nemôžete použiť pre doménu s podobnou TLD.", + "yes": "Áno", + "dns_removal_error": "Nie je možné odstrániť zápisy DNS.", + "server_deletion_error": "Server nie je možné vymazať.", + "server_validators_error": "Nepodarilo sa získať zoznam serverov.", + "already_exists": "Takýto server už existuje.", + "unexpected_error": "Neočakávaná chyba na strane poskytovateľa.", + "destroy_server": "Zničiť server a vytvoriť nový?", + "try_again": "Skúsiť ešte raz?", + "purge_all_keys": "Vymazať všetky autorizačné kľúče?", + "purge_all_keys_confirm": "Áno, vyčistiť všetky moje tokeny", + "delete_server_volume": "Odstrániť server a úložisko?", + "reboot": "Reštartovať" + }, + "jobs": { + "title": "Úlohy", + "start": "Štart", + "empty": "Žiadne úlohy", + "create_user": "Vytvoriť používateľa", + "delete_user": "Vymazať používateľa", + "reboot_success": "Server sa reštartuje", + "config_pull_failed": "Nepodarilo sa stiahnuť aktualizáciu konfigurácie. Aj tak sa začala aktualizácia softvéru.", + "service_turn_off": "Vypnúť", + "service_turn_on": "Zapnúť", + "job_added": "Úloha bola pridaná", + "run_jobs": "Spustiť úlohy", + "reboot_failed": "Server sa nepodarilo reštartovať, skontrolujte protokoly.", + "upgrade_success": "Spustila sa aktualizácia servera", + "upgrade_failed": "Aktualizácia servera zlyhala", + "upgrade_server": "Aktualizovať server", + "reboot_server": "Reštartovať server", + "create_ssh_key": "Vytvoriť kľúč SSH pre {}", + "delete_ssh_key": "Odstrániť kľúč SSH pre {}", + "server_jobs": "Úlohy na serveri", + "reset_user_password": "Obnoviť heslo používateľa", + "generic_error": "Nepodarilo sa pripojiť k serveru!" + }, + "test": "sk-test", + "locale": "sk", + "basis": { + "providers": "Poskytovatelia", + "providers_title": "Vaše dátové centrum", + "select": "Vybrať", + "services": "Služby", + "users": "Užívatelia", + "more": "Viac", + "next": "Ďalší", + "got_it": "Dobre", + "settings": "Nastavenia", + "password": "Heslo", + "create": "Pridať nový", + "confirmation": "Potvrdenie", + "cancel": "Zrušiť", + "delete": "Vymazať", + "close": "Zavrieť", + "connect": "Pripojiť", + "domain": "Doména", + "saving": "Ukladanie…", + "username": "Užívateľské meno", + "later": "Preskočiť a nastaviť neskôr", + "connect_to_existing": "Pripojiť sa k existujúcemu serveru", + "reset": "Resetovať", + "details": "Podrobnosti", + "no_data": "Žiadne dáta", + "wait": "Počkajte", + "remove": "Vymazať", + "done": "Hotovo", + "continue": "Pokračovať", + "alert": "Upozornenie", + "services_title": "Vaše osobné, súkromné a nezávislé služby.", + "loading": "Načítanie…", + "apply": "Uplatniť" + }, + "more_page": { + "configuration_wizard": "Sprievodca nastavením", + "about_project": "O nás", + "about_application": "O apke", + "console": "Konzola", + "application_settings": "Nastavenia aplikácie", + "onboarding": "Vitajte", + "create_ssh_key": "SSH kľúče superužívateľa" + }, + "console_page": { + "title": "Konzola", + "waiting": "Čakáme na inicializáciu…" + }, + "about_us_page": { + "title": "O nás" + }, + "about_application_page": { + "title": "O apke", + "application_version_text": "Verzia aplikácie {}", + "api_version_text": "Verzia servera {}", + "privacy_policy": "Zásady ochrany osobných údajov" + }, + "application_settings": { + "title": "Nastavenia aplikácie", + "dark_theme_title": "Temná téma", + "dark_theme_description": "Zmeniť tému aplikácie", + "reset_config_title": "Resetovať nastavenia aplikácie", + "reset_config_description": "Resetovať kľúče API a užívateľa root", + "delete_server_title": "Zmazať server", + "delete_server_description": "Tým sa odstráni váš server. Už nebude prístupným." + }, + "ssh": { + "title": "Kľúče SSH", + "create": "Vytvoriť kľúč SSH", + "delete": "Zmazať kľúč SSH", + "delete_confirm_question": "Ste si istí že chcete vymazať kľúč SSH?", + "subtitle_with_keys": "{} kľúče", + "subtitle_without_keys": "Žiadne kľúče", + "no_key_name": "Kľúč bez mena", + "root_title": "Toto sú kľúče superužívateľa", + "input_label": "Verejný kľúč ED25519 alebo RSA", + "root_subtitle": "Majitelia týchto kľúčov získajú plný prístup na server a môžu na ňom robiť čokoľvek. Pridávajte do servera iba svoje vlastné kľúče." + }, + "onboarding": { + "page1_title": "Digitálna nezávislosť, dostupná každému z nás", + "page1_text": "Email, VPN, Messenger, sociálna sieť a o veľa viac na vašom privátnom servere, pod vašim kontrolom.", + "page2_text": "SelfPrivacy pracuje iba s poskytovateľmi, ktoré si vyberiete. Ak v nich nemáte požadované účty, pomôžeme vám ich vytvoriť.", + "page2_server_provider_title": "Poskytovateľ servera", + "page2_backup_provider_title": "Poskytovateľ zálohovania", + "page2_title": "SelfPrivacy nie je oblak, toto je váš personálny datacentrum", + "page2_server_provider_text": "Poskytovateľ servera udržiava váš server vo svojom vlastnom dátovom centre. SelfPrivacy sa automaticky pripojí k poskytovateľovi a nastaví všetky potrebné veci.", + "page2_dns_provider_title": "Poskytovateľ DNS", + "page2_dns_provider_text": "Potrebujete doménu, aby ste mali miesto na internete. A tiež potrebujete spoľahlivého poskytovateľa DNS, aby bola doména nasmerovaná na váš server. Navrhujeme, aby ste si vybrali podporovaného poskytovateľa DNS na automatické nastavenie sietí.", + "page2_backup_provider_text": "Čo ak sa niečo stane na vašom serveri? Predstavte si hackerský útok, náhodné vymazanie údajov alebo odmietnutie služby? Vaše údaje budú udržiavané v bezpečí vášho poskytovateľa záloh. Budú bezpečne šifrovaní a kedykoľvek sú prístupní na obnovenie servera." + }, + "resource_chart": { + "month": "Mesiac", + "day": "Deň", + "hour": "Hodina", + "cpu_title": "Využitie procesora", + "network_title": "Využitie siete", + "out": "Von", + "in": "Dnu" + }, + "server": { + "card_title": "Server", + "description": "Všetky vaši servery bývajú tu", + "general_information": "Všeobecné informácie", + "resource_usage": "Využitie zdrojov", + "allow_autoupgrade": "Povoliť automatické aktualizácie", + "allow_autoupgrade_hint": "Povoliť automatické aktualizácie balíkov na serveri", + "reboot_after_upgrade": "Reštartovať po aktualizácie", + "reboot_after_upgrade_hint": "Reštartovať server po aktualizácii bez výzvy", + "server_timezone": "Časový pás servera", + "select_timezone": "Vyberte časový pás", + "timezone_search_bar": "Názov časového pásma alebo veľkosť časového posunu", + "server_id": "ID servera", + "status": "Stav", + "cpu": "Procesor", + "ram": "Pamäť", + "disk": "Lokálny disk", + "monthly_cost": "Mesačná cena", + "location": "Lokalita", + "provider": "Poskytovateľ", + "core_count": { + "one": "{} jadro", + "two": "{} jadrá", + "few": "{} jadier", + "many": "{} jadier", + "other": "{} jadier" + } + }, + "record": { + "root": "Koreňová doména", + "api": "SelfPrivacy API", + "cloud": "Súborový cloud", + "git": "Git server", + "meet": "Video konferencie", + "social": "Sociálna sieť", + "password": "Správca hesiel", + "vpn": "VPN", + "mx": "Zápis MX", + "dmarc": "Zápis DMARC", + "spf": "Zápis SPF", + "dkim": "Kľúč DKIM" + }, + "domain": { + "screen_title": "Doména a DNS", + "ok": "Zápise sú v poriadku", + "error": "Nájdené problémy", + "error_subtitle": "Klepnutím sem ich opravíte", + "uninitialized": "Údaje ešte nie sú načítané", + "services_title": "Služby", + "services_subtitle": "Zápisy typu “A” nutne pre každú službu.", + "email_title": "Email", + "update_list": "Obnoviť zoznam", + "card_title": "Doména", + "refreshing": "Obnovovanie stavu…", + "email_subtitle": "Zápisy nutne pre bezpečnú prácu s emailami." + }, + "service_page": { + "open_in_browser": "Otvoriť v prehliadači", + "restart": "Reštartovať službu", + "disable": "Vypnúť službu", + "uses": "Využíva {usage} na {volume}", + "enable": "Zapnúť službu", + "move": "Presunúť na iný disk", + "status": { + "active": "Zapnuté a funguje", + "inactive": "Vypnuté", + "failed": "Chyba pri štarte", + "off": "Vypnuté", + "activating": "Zapína sa", + "deactivating": "Vypína sa", + "reloading": "Reštartuje sa" + } + }, + "backup": { + "card_title": "Záloha", + "description": "Ušetrí vám nervy v prípade incidentu: útok hackerov, vymazanie servera atď.", + "reupload_key": "Násilne aktualizovať kľúč", + "reuploaded_key": "Kľúč je aktualizovaný", + "initialize": "Nastaviť", + "restore": "Obnoviť zo zálohy", + "no_backups": "Zatiaľ nemáte žiadne záložné kópie", + "create_new": "Vytvoriť novú zálohu", + "creating": "Vytvorenie zálohy: {}%", + "restoring": "Obnovenie zo zálohy", + "error_pending": "Server vrátil chybu, pozrite ju nižšie", + "refresh": "Obnoviť stav", + "refetch_backups": "Obnoviť zoznam záloh", + "refetching_list": "O pár minút zoznam bude aktualizovaný", + "waiting_for_rebuild": "O pár minút budete môcť vytvoriť svoju prvú zálohu.", + "restore_alert": "Chystáte sa obnoviť zo zálohy vytvorenej {}. Všetky aktuálne údaje sa stratia. Ste si istý?" + }, + "storage": { + "card_title": "Skladovací priestor", + "status_ok": "Disk je v poriadku", + "status_error": "Málo miesta na disku", + "disk_usage": "Využité {}", + "disk_total": "{} celkove · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Bajtov", + "extend_volume_button": "Rozšíriť úložisko", + "extending_volume_price_info": "Cena je vrátane DPH a vychádza z cenových údajov poskytnutých spoločnosťou Hetzner. Server sa počas procesu reštartuje.", + "extending_volume_error": "Nepodarilo sa spustiť rozšírenie úložiska.", + "size": "Veľkosť", + "euro": "Euro", + "data_migration_title": "Migrácia údajov", + "data_migration_notice": "V čase migrácie údajov sa všetky služby vypnú.", + "start_migration_button": "Spustiť migráciu", + "migration_process": "Migruje sa…", + "migration_done": "Dokončiť", + "extending_volume_title": "Rozšírenie úložiska", + "extending_volume_description": "Zmena veľkosti úložiska vám umožní uchovávať viac údajov na serveri bez rozšírenia samotného servera. Objem sa dá len zvýšiť: nemôžete znížiť." + }, + "not_ready_card": { + "in_menu": "Server ešte nie je nakonfigurovaný, použite sprievodcu nastavením." + }, + "initializing": { + "choose_server_type_notice": "Dôležité veci, na ktoré sa treba pozrieť, sú CPU a RAM. Dáta vašich služieb budú uložené na pripojenom disku, ktorý sa dá ľahko rozšíriť a platí sa zaň samostatne.", + "select_provider": "Vyberte si ktoréhokoľvek poskytovateľa z nasledujúceho zoznamu, všetci podporujú SelfPrivacy", + "select_provider_countries_text_do": "USA, Holandsko, Singapur, Spojené kráľovstvo, Nemecko, Kanada, India, Austrália", + "select_provider_email_notice": "E-mailový hosting nie je dostupný pre nových zákazníkov. Odomknutie bude možné po prvej platbe.", + "choose_location_type_text": "Rôzne miesta poskytujú rôzne konfigurácie serverov, ceny a rýchlosť pripojenia.", + "choose_server_type_text": "Rôzne možnosti zdrojov podporujú rôzne služby. Nebojte sa, svoj server môžete kedykoľvek rozšíriť", + "enter_username_and_password": "Zadajte používateľské meno a zložité heslo", + "finish": "Všetko je inicializované", + "use_this_domain_text": "Token, ktorý ste poskytli, poskytuje prístup k nasledujúcej doméne", + "cloudflare_api_token": "CloudFlare API Token", + "connect_backblaze_storage": "Pripojte svoje cloudové úložisko Backblaze", + "no_connected_domains": "Momentálne nie sú pripojené žiadne domény", + "loading_domain_list": "Načítava sa zoznam domén", + "found_more_domains": "Našlo sa viac ako jedna doména. Pre vašu vlastnú bezpečnosť vás požiadame o odstránenie nepotrebných domén", + "save_domain": "Uložiť doménu", + "final": "Posledný krok", + "create_server": "Vytvoriť server", + "what": "Čo to znamená?", + "server_rebooted": "Server bol reštartovaný. Čaká sa na posledné overenie…", + "server_started": "Server spustený. Teraz bude overený a reštartovaný…", + "server_created": "Server bol vytvorený. Prebieha kontrola DNS a spúšťanie servera…", + "until_the_next_check": "Do nasledujúcej kontroly: ", + "check": "Kontrola", + "one_more_restart": "Teraz dôjde k ďalšiemu reštartu na aktiváciu bezpečnostných certifikátov.", + "connect_to_server": "Začnime so serverom.", + "select_provider_notice": "Pod pojmom „malý server“ rozumieme server s dvoma procesorovými vláknami a dvoma gigabajtmi pamäte RAM.", + "select_provider_countries_title": "Dostupné krajiny", + "select_provider_countries_text_hetzner": "Nemecko, Fínsko, USA", + "select_provider_price_title": "Priemerná cena", + "select_provider_price_text_hetzner": "8€ mesačne za malý server a 50 GB miesta na disku", + "select_provider_price_text_do": "$17 mesačne za malý server a 50 GB miesta na disku", + "select_provider_payment_title": "Spôsoby platby", + "select_provider_payment_text_hetzner": "Bankové karty, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Bankové karty, Google Pay, PayPal", + "select_provider_site_button": "Navštíviť stránku", + "connect_to_server_provider": "Prihlásiť sa v ", + "connect_to_server_provider_text": "S API tokenom si SelfPrivacy bude môcť prenajať stroj a nastaviť na ňom váš server", + "how": "Ako získať token API", + "provider_bad_key_error": "Kľúč API poskytovateľa je neplatný", + "could_not_connect": "Nepodarilo sa pripojiť k poskytovateľovi.", + "choose_location_type": "Kde objednať server?", + "locations_not_found": "Ojoj!", + "locations_not_found_text": "Nie sú k dispozícii žiadne servery na prenájom", + "back_to_locations": "Vybrať niečo iné", + "no_locations_found": "Nenašli sa žiadne dostupné miesta, skontrolujte, či je váš účet prístupný", + "choose_server_type": "Aký typ servera potrebujete?", + "choose_server_type_ram": "{} GB RAM", + "choose_server_type_storage": "{} GB systémového úložiska", + "choose_server_type_payment_per_month": "{} mesačne", + "no_server_types_found": "Nenašli sa žiadne dostupné typy serverov. Uistite sa, že je váš účet prístupný a skúste zmeniť umiestnenie servera.", + "cloudflare_bad_key_error": "Kľúč Cloudflare API je neplatný", + "backblaze_bad_key_error": "Informácie o úložisku Backblaze sú neplatné", + "select_dns": "Teraz vyberme poskytovateľa DNS", + "manage_domain_dns": "Na správu DNS vašej domény", + "use_this_domain": "Chcete použiť túto doménu?", + "create_master_account": "Vytvorte hlavný účet", + "checks": "Kontroly boli ukončené\n{} z {}" + }, + "mail": { + "subtitle": "Email pre rodinu alebo spoločnosť.", + "title": "Email", + "login_info": "Užívateľské meno a heslo z tabu používateľov. IMAP port je 143 so STARTTLS, SMTP port je 587 so STARTTLS." + }, + "password_manager": { + "subtitle": "Toto je základ vašej bezpečnosti. Bitwarden vám pomôže vytvárať, ukladať, kopírovať heslá medzi zariadeniami a vkladať ich do formulárov.", + "title": "Správca hesiel", + "login_info": "Musíte vytvoriť účet na webovej stránke." + }, + "cloud": { + "subtitle": "Zabráňte cloudovým službám v prezeraní vašich údajov. Použite NextCloud – bezpečný domov pre všetky vaše dáta.", + "title": "Súborový cloud", + "login_info": "Prihlásenie správcu: admin, heslo je rovnaké ako pre hlavného používateľa. Vytvorte nových používateľov v správcovskom rozhraní NextCloud." + }, + "social_network": { + "subtitle": "Je ťažké tomu uveriť, ale bolo možné vytvoriť si vlastnú sociálnu sieť s vlastnými pravidlami a publikom.", + "title": "Sociálna sieť", + "login_info": "Musíte vytvoriť účet na webovej stránke." + }, + "users": { + "not_ready": "Pripojte server, doménu a DNS v sekcii Poskytovatelia a pridajte prvého používateľa", + "could_not_fetch_users": "Nepodarilo sa načítať používateľov", + "could_not_delete_user": "Nepodarilo sa vymazať účet", + "could_not_add_ssh_key": "Nepodarilo sa pridať kľúč SSH", + "username_rule": "Meno môže obsahovať len malé latinské písmená, čísla, podčiarkovníky, nemôže začínať číslicami", + "add_new_user": "Pridajte prvého používateľa", + "new_user": "Nový používateľ", + "delete_user": "Vymazať používateľa", + "nobody_here": "Tu sa zobrazia používatelia", + "login": "Užívateľské meno", + "new_user_info_note": "Nový používateľ bude mať automaticky prístup ku všetkým službám", + "delete_confirm_question": "Naozaj chcete odstrániť ten účet?", + "reset_password": "Resetovať heslo", + "account": "Účet", + "send_registration_data": "Zdieľať údaje účtu", + "could_not_fetch_description": "Skontrolujte internetové pripojenie a skúste to znova", + "refresh_users": "Aktualizovať zoznam používateľov", + "could_not_create_user": "Nepodarilo sa vytvoriť účet", + "email_login": "Emailová autorizácia", + "no_ssh_notice": "Pre tohto používateľa sú vytvorené iba e-mailové účty a účty SSH. Čoskoro bude k dispozícii jednotné prihlásenie pre všetky služby." + }, + "recovering": { + "recovery_main_header": "Pripojiť sa k existujúcemu serveru", + "method_select_other_device": "Mám prístup na inom zariadení", + "method_device_description": "Otvorte aplikáciu na inom zariadení a otvorte obrazovku správy zariadenia. Kliknutím na „Pridať zariadenie“ získate autorizačný token.", + "server_provider_connected": "Pripojiť sa k poskytovateľovi servera", + "choose_server": "Vyberte si svoj server", + "domain_not_available_on_token": "Vybraná doména nie je na tomto tokene dostupná.", + "modal_confirmation_ip_valid": "IP je rovnaká ako v DNS zázname", + "confirm_backblaze_description": "Zadajte token Backblaze, ktorý má práva na úložisko záloh:", + "generic_error": "Operácia zlyhala, skúste to znova.", + "domain_recovery_description": "Zadajte doménu servera, pre ktorú chcete získať prístup:", + "domain_recover_placeholder": "Vaša doména", + "domain_recover_error": "Server s takouto doménou sa nenašiel", + "method_select_description": "Vyberte spôsob obnovenia:", + "method_select_recovery_key": "Mám kľúč na obnovenie", + "method_select_nothing": "Nič z toho nemám", + "method_device_button": "Dostal som token", + "method_device_input_description": "Zadajte svoj autorizačný token", + "method_device_input_placeholder": "Token", + "method_recovery_input_description": "Zadajte svoj token na obnovenie", + "fallback_select_description": "Čo z toho máte? Vyberte prvý, ktorý vyhovuje:", + "fallback_select_token_copy": "Kópia autorizačného tokenu z inej verzie aplikácie.", + "fallback_select_root_ssh": "Rootový prístup k serveru cez SSH.", + "fallback_select_provider_console": "Prístup k serverovej konzole môjho poskytovateľa.", + "authorization_failed": "Pomocou tohto kľúča sa nepodarilo prihlásiť", + "fallback_select_provider_console_hint": "Napríklad Hetzner.", + "server_provider_connected_description": "Spojenie bolo nadviazané. Zadajte svoj token s prístupom k {}:", + "server_provider_connected_placeholder": "Token poskytovateľa servera", + "confirm_server": "Potvrďte server", + "confirm_server_description": "Našiel sa server! Potvrďte, že je to on:", + "confirm_server_accept": "Áno, to je on", + "confirm_server_decline": "Vybrať iný server", + "choose_server_description": "Nepodarilo sa nám zistiť, ku ktorému serveru sa pokúšate pripojiť.", + "no_servers": "Vo vašom účte nie sú dostupné žiadne servery.", + "modal_confirmation_title": "Je to naozaj váš server?", + "modal_confirmation_description": "Ak sa pripojíte k nesprávnemu serveru, môžete stratiť všetky svoje údaje.", + "modal_confirmation_dns_valid": "Reverzný DNS je platný", + "modal_confirmation_dns_invalid": "Reverzné DNS ukazuje na inú doménu", + "modal_confirmation_ip_invalid": "IP nie je rovnaká ako v DNS zázname", + "confirm_cloudflare": "Pripojenie k službe CloudFlare", + "confirm_cloudflare_description": "Zadajte token Cloudflare, ktorý má práva na {}:", + "confirm_backblaze": "Pripojenie ku Backblaze" + }, + "devices": { + "add_new_device_screen": { + "get_new_key": "Získať nový kľúč", + "header": "Autorizácia nového zariadenia", + "description": "Zadajte kľúč na zariadení, ktoré chcete autorizovať:", + "please_wait": "Prosím počkajte", + "tip": "Platnosť kľúča je 10 minút.", + "expired": "Platnosť kľúča vypršala." + }, + "main_screen": { + "description": "Tieto zariadenia majú plný prístup k serveru prostredníctvom aplikácie SelfPrivacy.", + "tip": "Stlačením na zariadení zrušíte prístup.", + "header": "Zariadenia", + "this_device": "Toto zariadenie", + "other_devices": "Iné zariadenia", + "authorize_new_device": "Autorizovať nové zariadenie", + "access_granted_on": "Prístup poskytnutý {}" + }, + "revoke_device_alert": { + "header": "Odobrať prístup?", + "description": "Zariadenie {} už nebude mať prístup k serveru.", + "yes": "Odobrať", + "no": "Zrušiť" + } + }, + "recovery_key": { + "key_main_description": "Vyžaduje sa pre autorizáciu SelfPrivacy, keď autorizované zariadenia nie sú dostupné.", + "key_valid_for": "Môžete použiť ešte {} krát", + "key_receiving_description": "Zapíšte si tento kľúč na bezpečnom mieste. Poskytuje plný prístup k vášmu serveru:", + "key_connection_error": "Nepodarilo sa pripojiť k serveru.", + "key_synchronizing": "Synchronizácia…", + "key_main_header": "Kľúč na obnovenie", + "key_amount_toggle": "Obmedziť používanie", + "key_amount_field_title": "Maximálny počet použití", + "key_duedate_toggle": "Obmedziť časom", + "key_duedate_field_title": "Dátum splatnosti", + "key_receive_button": "Získať kľúč", + "key_valid": "Váš kľúč je platný", + "key_invalid": "Váš kľúč už nie je platný", + "key_valid_until": "Platný do {}", + "key_creation_date": "Vytvorený {}", + "key_replace_button": "Vygenerovať nový kľúč", + "key_receiving_info": "Tento kľúč sa už nebude zobrazovať, ale môžete ho nahradiť novým.", + "key_receiving_done": "Hotovo!", + "generation_error": "Nepodarilo sa vygenerovať kľúč. {}" + }, + "timer": { + "sec": "{} sek" + }, + "video": { + "title": "Video konferencia", + "subtitle": "Jitsi meet je výborný analog Zoom a Google meet, ktorý vám okrem pohodlia zaručí aj bezpečné videokonferencie vo vysokej kvalite.", + "login_info": "Účet sa nevyžaduje." + }, + "git": { + "title": "Git server", + "subtitle": "Súkromná alternatíva Github, ktorá patrí vám, nie spoločnosti Microsoft.", + "login_info": "Na stránke musí byť vytvorený účet. Prvý registrovaný užívateľ sa stáva administrátorom." + }, + "vpn": { + "title": "Server VPN", + "subtitle": "Súkromný server VPN" + } +} From c30001c8293a40ffb0dea386ec651ce17bb6378a Mon Sep 17 00:00:00 2001 From: Revertron Date: Tue, 14 Feb 2023 23:15:19 +0000 Subject: [PATCH 407/732] Translated using Weblate (Russian) Currently translated at 99.5% (398 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 6ea09201..34886e9b 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -314,7 +314,7 @@ "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", "no_connected_domains": "На данный момент подлюченных доменов нет", "loading_domain_list": "Загружаем список доменов", - "found_more_domains": "Найдено больше одного домена, для вашей безопастности, просим Вам удалить не нужные домены", + "found_more_domains": "Найдено больше одного домена, для вашей безопасности, просим Вам удалить ненужные домены", "save_domain": "Сохранить домен", "final": "Последний шаг", "create_server": "Создать сервер", @@ -442,13 +442,13 @@ }, "jobs": { "title": "Задачи", - "start": "Начать выполенение", + "start": "Начать выполнение", "empty": "Задач нет", "create_user": "Создать пользователя", "delete_user": "Удалить пользователя", "service_turn_off": "Остановить", "service_turn_on": "Запустить", - "job_added": "Задача добавленна", + "job_added": "Задача добавлена", "run_jobs": "Запустите задачи", "reboot_success": "Сервер перезагружается", "reboot_failed": "Не удалось перезагрузить сервер, проверьте логи.", @@ -470,7 +470,7 @@ "invalid_format_password": "Должен не содержать пустые символы", "invalid_format_ssh": "Должен следовать формату SSH ключей", "root_name": "Имя пользователя не может быть 'root'", - "length_not_equal": "Длина строки [], должно быть равно {}", - "length_longer": "Длина строки [], должно быть меньше либо равно {}" + "length_not_equal": "Длина строки [], должна быть равна {}", + "length_longer": "Длина строки [], должна быть меньше либо равна {}" } } From 16d66155dbfaec4d6a95b9d9440a3fc9eb0b6d49 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Wed, 15 Feb 2023 13:12:41 +0000 Subject: [PATCH 408/732] Translated using Weblate (Polish) Currently translated at 63.7% (255 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 0eead5f2..02e0550a 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -240,7 +240,8 @@ }, "git": { "login_info": "Konto należy założyć na stronie. Pierwszy zarejestrowany użytkownik zostaje administratorem.", - "title": "Git Serwer" + "title": "Git Serwer", + "subtitle": "Prywatna alternatywa dla Githuba, która należy do Ciebie, ale nie do Microsoftu." }, "vpn": { "title": "VPN Serwer", @@ -289,6 +290,24 @@ "select_provider_price_text_do": "$17 miesięcznie za stosunkowo mały serwer i 50GB miejsca na dysku", "select_provider_payment_title": "Metody płatności", "select_provider_payment_text_hetzner": "Karty kredytowe, SWIFT, SEPA, PayPal", - "connect_to_server_provider": "Teraz zaloguj się przez " + "connect_to_server_provider": "Teraz zaloguj się przez ", + "no_locations_found": "Nie znaleziono lokalizacji, upewnij się, że Twoje konto jest dostępne", + "choose_server_type": "Jaki typ serwera powinienem wybrać?", + "choose_server_type_ram": "{} GB pamięci RAM", + "choose_server_type_text": "Od zasobów serwera zależeć będzie, jakie usługi będą mogły być uruchomione. W każdej chwili możliwa będzie rozbudowa serwera", + "choose_server_type_notice": "Główne rzeczy, na które należy zwrócić uwagę, to liczba wątków procesora i ilość pamięci RAM. Dane serwisowe zostaną umieszczone na osobnym dysku, który jest osobno płatny i łatwo rozszerzalny.", + "connect_to_server_provider_text": "Dzięki tokenowi API SelfPrivacy będzie mógł wynająć maszynę i postawić na niej swój serwer", + "how": "Jak uzyskać token API", + "provider_bad_key_error": "Klucz API dostawcy jest nieprawidłowy", + "could_not_connect": "Nie można połączyć się z dostawcą.", + "choose_location_type": "Gdzie chcesz zamówić swój serwer?", + "locations_not_found": "Ups!", + "locations_not_found_text": "W tej lokalizacji nie było dostępnych serwerów do wynajęcia", + "back_to_locations": "Wybierzmy inny", + "choose_location_type_text": "Wybór lokalizacji będzie determinował dostępne konfiguracje, ceny i prędkość połączenia z serwerem.", + "choose_server_type_storage": "{} GB pamięci masowej systemu", + "choose_server_type_payment_per_month": "{} miesięcznie", + "no_server_types_found": "Nie znaleziono dostępnych typów serwerów! Proszę upewnić się, że masz dostęp do dostawcy serwera...", + "cloudflare_bad_key_error": "Klucz API Cloudflare jest nieprawidłowy" } } From 48ad69f23116a989624783e20fb633d699d18a21 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Wed, 15 Feb 2023 13:10:44 +0000 Subject: [PATCH 409/732] Translated using Weblate (Russian) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 34886e9b..35498bd9 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -53,8 +53,8 @@ }, "about_application_page": { "title": "О приложении", - "application_version_text": "Версия приложения v.{}", - "api_version_text": "Версия API сервера v.{}", + "application_version_text": "Версия приложения {}", + "api_version_text": "Версия API сервера {}", "privacy_policy": "Политика конфиденциальности" }, "application_settings": { @@ -329,7 +329,7 @@ "enter_username_and_password": "Введите имя пользователя и сложный пароль", "finish": "Всё инициализировано", "checks": "Проверок выполнено: \n{} / {}", - "select_dns": "Теперь давайте выберем DNS-провайдера" + "select_dns": "Сейчас выберите DNS провайдера" }, "recovering": { "generic_error": "Ошибка проведения операции, попробуйте ещё раз.", From 8da7341ccbae89f21d770fbf6b0d2ecc865c8968 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 21 Feb 2023 13:11:04 +0400 Subject: [PATCH 410/732] chore: Implement basics of hetzner installation logic --- assets/translations/en.json | 3 +- .../server_providers/hetzner/hetzner_api.dart | 89 ++++++--- .../server_installation_cubit.dart | 4 +- .../models/callback_dialogue_branching.dart | 21 ++ .../models/launch_installation_data.dart | 19 ++ lib/logic/providers/server_provider.dart | 2 +- .../providers/server_providers/hetzner.dart | 181 +++++++++++++++++- 7 files changed, 287 insertions(+), 32 deletions(-) create mode 100644 lib/logic/models/callback_dialogue_branching.dart create mode 100644 lib/logic/models/launch_installation_data.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 6aee165c..ca95a6d0 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -429,6 +429,7 @@ "modals": { "dns_removal_error": "Couldn't remove DNS records.", "server_deletion_error": "Couldn't delete active server.", + "volume_creation_error": "Couldn't create volume.", "server_validators_error": "Couldn't fetch available servers.", "already_exists": "Such server already exists.", "unexpected_error": "Unexpected error during placement from the provider side.", @@ -479,4 +480,4 @@ "length_not_equal": "Length is [], should be {}", "length_longer": "Length is [], should be shorter than or equal to {}" } -} +} \ No newline at end of file diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index f43fc050..fa244393 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -340,34 +340,72 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return success; } - Future> createServer({ + Future createServer({ required final String dnsApiToken, + required final String dnsProviderType, + required final String serverApiToken, required final User rootUser, + required final String base64Password, + required final String databasePassword, required final String domainName, + required final String hostName, + required final int volumeId, required final String serverType, - required final DnsProviderType dnsProvider, }) async { - final GenericResult newVolumeResponse = await createVolume(); + final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; - if (!newVolumeResponse.success || newVolumeResponse.data == null) { - return GenericResult( - data: null, - success: false, - message: newVolumeResponse.message, - code: newVolumeResponse.code, - ); + Response? serverCreateResponse; + DioError? hetznerError; + bool success = false; + final Dio client = await getClient(); + try { + final Map data = { + 'name': hostName, + 'server_type': serverType, + 'start_after_create': false, + 'image': 'ubuntu-20.04', + 'volumes': [volumeId], + 'networks': [], + 'user_data': '#cloud-config\n' + 'runcmd:\n' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/hetzner/nixos-infect | ' + "STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType " + "NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' " + 'CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | ' + 'tee /tmp/infect.log', + 'labels': {}, + 'automount': true, + 'location': region!, + }; + print('Decoded data: $data'); + + serverCreateResponse = await client.post('/servers', data: data); + success = true; + } on DioError catch (e) { + print(e); + hetznerError = e; + } catch (e) { + print(e); + } finally { + close(client); } - return createServerWithVolume( - dnsApiToken: dnsApiToken, - rootUser: rootUser, - domainName: domainName, - volume: newVolumeResponse.data!, - serverType: serverType, - dnsProvider: dnsProvider, + + String? apiResultMessage = serverCreateResponse?.statusMessage; + if (hetznerError != null && + hetznerError.response!.data['error']['code'] == 'uniqueness_error') { + apiResultMessage = 'uniqueness_error'; + } + + return GenericResult( + data: serverCreateResponse?.data, + success: success && hetznerError == null, + code: serverCreateResponse?.statusCode ?? + hetznerError?.response?.statusCode, + message: apiResultMessage, ); } - Future> createServerWithVolume({ + Future> skldfjalkdsjflkasd({ required final String dnsApiToken, required final User rootUser, required final String domainName, @@ -375,8 +413,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String serverType, required final DnsProviderType dnsProvider, }) async { - final Dio client = await getClient(); - final String dbPassword = StringGenerators.dbPassword(); final int volumeId = volume.id; @@ -388,14 +424,11 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { base64.encode(utf8.encode(rootUser.password ?? 'PASS')); final String dnsProviderType = dnsProviderToInfectName(dnsProvider); - final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; - Response? serverCreateResponse; ServerHostingDetails? serverDetails; DioError? hetznerError; bool success = false; - + final Dio client = await getClient(); try { final Map data = { 'name': hostname, @@ -404,7 +437,13 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'image': 'ubuntu-20.04', 'volumes': [volumeId], 'networks': [], - 'user_data': userdataString, + 'user_data': '#cloud-config\n' + 'runcmd:\n' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | ' + "STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType " + "NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' " + 'CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | ' + 'tee /tmp/infect.log', 'labels': {}, 'automount': true, 'location': region!, diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 17d90764..9758c545 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -9,8 +9,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -174,7 +172,7 @@ class ServerInstallationCubit extends Cubit { await repository.saveServerType(serverType); await ProvidersController.currentServerProvider! - .trySetServerType(serverType); + .trySetServerLocation(serverType); emit( (state as ServerInstallationNotFinished).copyWith( diff --git a/lib/logic/models/callback_dialogue_branching.dart b/lib/logic/models/callback_dialogue_branching.dart new file mode 100644 index 00000000..614a7c22 --- /dev/null +++ b/lib/logic/models/callback_dialogue_branching.dart @@ -0,0 +1,21 @@ +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; + +class CallbackDialogueBranching { + CallbackDialogueBranching({ + required this.title, + required this.description, + required this.choices, + }); + final String title; + final String description; + final List choices; +} + +class CallbackDialogueChoice { + CallbackDialogueChoice({ + required this.title, + required this.callback, + }); + final String title; + final Future> Function()? callback; +} diff --git a/lib/logic/models/launch_installation_data.dart b/lib/logic/models/launch_installation_data.dart new file mode 100644 index 00000000..14e1e592 --- /dev/null +++ b/lib/logic/models/launch_installation_data.dart @@ -0,0 +1,19 @@ +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; + +class LaunchInstallationData { + LaunchInstallationData({ + required this.rootUser, + required this.dnsApiToken, + required this.dnsProviderType, + required this.domainName, + required this.serverType, + }); + + final User rootUser; + final String dnsApiToken; + final String domainName; + final DnsProviderType dnsProviderType; + final ServerType serverType; +} diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index e5c1c1bf..642c779a 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/models/server_type.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; abstract class ServerProvider { - Future> trySetServerType(final ServerType type); + Future> trySetServerLocation(final String location); Future> tryInitApiByToken(final String token); Future>> getAvailableLocations(); Future>> getServerTypes({ diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index fdc8f11e..f1453448 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -1,8 +1,14 @@ +import 'dart:convert'; + +import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; +import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; @@ -11,6 +17,8 @@ import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/server_provider.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; +import 'package:selfprivacy/utils/password_generator.dart'; class ApiAdapter { ApiAdapter({final String? region, final bool isWithToken = true}) @@ -42,7 +50,9 @@ class HetznerServerProvider extends ServerProvider { ApiAdapter _adapter; @override - Future> trySetServerType(final ServerType type) async { + Future> trySetServerLocation( + final String location, + ) async { final bool apiInitialized = _adapter.api().isWithToken; if (!apiInitialized) { return GenericResult( @@ -54,7 +64,7 @@ class HetznerServerProvider extends ServerProvider { _adapter = ApiAdapter( isWithToken: true, - region: type.location.identifier, + region: location, ); return success; } @@ -302,6 +312,7 @@ class HetznerServerProvider extends ServerProvider { end, 'cpu', ); + if (cpuResult.data.isEmpty || !cpuResult.success) { return GenericResult( success: false, @@ -387,4 +398,170 @@ class HetznerServerProvider extends ServerProvider { data: timestamp, ); } + + String dnsProviderToInfectName(final DnsProviderType dnsProvider) { + String dnsProviderType; + switch (dnsProvider) { + case DnsProviderType.digitalOcean: + dnsProviderType = 'DIGITALOCEAN'; + break; + case DnsProviderType.cloudflare: + default: + dnsProviderType = 'CLOUDFLARE'; + break; + } + return dnsProviderType; + } + + Future> launchInstallation( + final LaunchInstallationData installationData, + ) async { + final volumeResult = await _adapter.api().createVolume(); + + if (!volumeResult.success || volumeResult.data == null) { + return GenericResult( + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'basis.try_again'.tr(), + callback: () async => launchInstallation(installationData), + ), + ], + description: + volumeResult.message ?? 'modals.volume_creation_error'.tr(), + title: 'modals.unexpected_error'.tr(), + ), + success: false, + message: volumeResult.message, + code: volumeResult.code, + ); + } + + final volume = volumeResult.data!; + final serverApiToken = StringGenerators.apiToken(); + final hostname = getHostnameFromDomain(installationData.domainName); + + final serverResult = await _adapter.api().createServer( + dnsApiToken: installationData.dnsApiToken, + rootUser: installationData.rootUser, + domainName: installationData.domainName, + serverType: installationData.serverType.identifier, + dnsProviderType: + dnsProviderToInfectName(installationData.dnsProviderType), + hostName: hostname, + volumeId: volume.id, + base64Password: base64.encode( + utf8.encode(installationData.rootUser.password ?? 'PASS'), + ), + databasePassword: StringGenerators.dbPassword(), + serverApiToken: serverApiToken, + ); + + if (!serverResult.success || serverResult.data == null) { + await _adapter.api().deleteVolume(volume); + await Future.delayed(const Duration(seconds: 5)); + if (serverResult.message != null && + serverResult.message == 'uniqueness_error') { + return GenericResult( + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'basis.yes'.tr(), + callback: () async { + final deleting = await deleteServer(hostname); + if (deleting.success) { + return launchInstallation(installationData); + } + + return deleting; + }, + ), + ], + description: volumeResult.message ?? 'modals.destroy_server'.tr(), + title: 'modals.already_exists'.tr(), + ), + success: false, + message: volumeResult.message, + code: volumeResult.code, + ); + } else { + return GenericResult( + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'basis.try_again'.tr(), + callback: () async => launchInstallation(installationData), + ), + ], + description: + volumeResult.message ?? 'recovering.generic_error'.tr(), + title: 'modals.unexpected_error'.tr(), + ), + success: false, + message: volumeResult.message, + code: volumeResult.code, + ); + } + } + + final serverDetails = ServerHostingDetails( + id: serverResult.data['server']['id'], + ip4: serverResult.data['server']['public_net']['ipv4']['ip'], + createTime: DateTime.now(), + volume: volume, + apiToken: serverApiToken, + provider: ServerProviderType.hetzner, + ); + + final createDnsResult = await _adapter.api().createReverseDns( + serverId: serverDetails.id, + ip4: serverDetails.ip4, + dnsPtr: installationData.domainName, + ); + + if (!createDnsResult.success) { + return GenericResult( + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'basis.try_again'.tr(), + callback: () async { + final deletion = await deleteServer(hostname); + if (deletion.success) { + return launchInstallation(installationData); + } + + return deletion; + }, + ), + ], + description: volumeResult.message ?? 'recovering.generic_error'.tr(), + title: 'modals.unexpected_error'.tr(), + ), + success: false, + message: volumeResult.message, + code: volumeResult.code, + ); + } + } + + Future> deleteServer( + final String hostname, + ) async {} } From b2f0819e18f4c831515a10fa8ccd66660f0f6b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me?= Date: Mon, 20 Feb 2023 06:58:54 +0000 Subject: [PATCH 411/732] Translated using Weblate (French) Currently translated at 53.0% (212 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/fr/ --- assets/translations/fr.json | 230 +++++++++++++++++++++++++++++++++++- 1 file changed, 229 insertions(+), 1 deletion(-) diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 622a9ea5..142e1397 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -29,6 +29,234 @@ "details": "Détails", "no_data": "Pas de données", "wait": "Attendez", - "remove": "Supprimer" + "remove": "Supprimer", + "alert": "Alerte", + "continue": "Continuer", + "apply": "Appliquer", + "done": "Effectué" + }, + "more_page": { + "about_application": "À propos", + "create_ssh_key": "Clés SSH du super utilisateur", + "console": "Console", + "application_settings": "Paramètres de l'application", + "configuration_wizard": "Assistant de configuration", + "about_project": "À propos de nous" + }, + "console_page": { + "title": "Console", + "waiting": "En attente de l'initialisation…" + }, + "about_us_page": { + "title": "À propos de nous" + }, + "about_application_page": { + "title": "À propos", + "privacy_policy": "Politique de confidentialité", + "application_version_text": "Version de l'application {}" + }, + "application_settings": { + "title": "Paramètres de l'application", + "dark_theme_description": "Changer le thème de l'application", + "reset_config_title": "Réinitialiser la configuration de l'application", + "delete_server_title": "Supprimer le serveur", + "delete_server_description": "Cela va supprimer votre serveur. Celui-ci ne sera plus accessible.", + "dark_theme_title": "Thème sombre", + "reset_config_description": "Réinitialiser les clés API et l'utilisateur root" + }, + "ssh": { + "title": "Clés SSH", + "create": "Créer une clé SSH", + "delete": "Supprimer une clé SSH", + "delete_confirm_question": "Êtes-vous sûr de vouloir supprimer la clé SSH ?", + "subtitle_with_keys": "{} clés", + "subtitle_without_keys": "Pas de clés SSH", + "no_key_name": "Clé sans nom", + "input_label": "Clé RSA ou ED25519 publique", + "root_title": "Ce sont les clés SSH du superutilisateur", + "root_subtitle": "Les possesseurs de ses clés SSH obtiennent le contrôle total sur le serveur et peuvent faire ce qu'ils veulent dessus. Il suffit d'ajouter vos clés SSH sur ce serveur." + }, + "onboarding": { + "page1_title": "Indépendance numérique, accessible à nous tous", + "page1_text": "Mail, VPN, messagerie, réseau social et bien plus sur votre serveur privé, sous votre contrôle.", + "page2_title": "SelfPrivacy n'est pas un cloud, c'est votre centre de données personnel", + "page2_server_provider_title": "Hébergeur", + "page2_server_provider_text": "Un hébergeur maintient votre serveur dans son propre datacenter. SelfPrivacy va automatiquement se connecter à votre fournisseur et installer tout le nécessaire.", + "page2_dns_provider_title": "Fournisseur de DNS", + "page2_backup_provider_title": "Fournisseur de sauvegarde", + "page2_text": "SelfPrivacy fonctionne uniquement avec les fournisseurs que vous choisissez. Si vous n'avez pas de compte sur ceux-ci, nous allons vous aider à en créer.", + "page2_dns_provider_text": "Vous avez besoin d'un domaine pour avoir un espace sur l'Internet. Il est également nécessaire de disposer d'un fournisseur de DNS fiable pour que votre domaine pointe sur votre serveur. Nous allons vous suggérer de choisir des fournisseurs DNS supportés pour automatiquement configurer le réseau." + }, + "resource_chart": { + "month": "Mois", + "day": "Jour", + "hour": "Heure", + "cpu_title": "Utilisation du CPU", + "network_title": "Utilisation du réseau" + }, + "server": { + "card_title": "Serveur", + "general_information": "Informations générales", + "resource_usage": "Utilisation des ressources", + "allow_autoupgrade": "Permettre la mise à jour automatique", + "allow_autoupgrade_hint": "Permettre la mise à jour des paquets automatiquement sur le serveur", + "reboot_after_upgrade": "Redémarrer après mise à jour", + "reboot_after_upgrade_hint": "Redémarrer sans demander après application des changements sur le serveur", + "server_id": "ID du serveur", + "status": "Statut", + "cpu": "Processeur", + "ram": "Mémoire", + "disk": "Disque local", + "monthly_cost": "Coût mensuel", + "location": "Localisation", + "provider": "Fournisseur", + "core_count": { + "one": "{} cœur", + "two": "{} cœurs", + "many": "{} cœurs", + "other": "{} cœurs", + "few": "{} cœurs" + }, + "server_timezone": "Fuseau horaire du serveur", + "select_timezone": "Sélectionner le fuseau horaire" + }, + "record": { + "root": "Domaine racine", + "api": "API de SelfPrivacy", + "git": "Serveur Git", + "meet": "Conférence vidéo", + "social": "Réseau social", + "password": "Gestionnaire de mot de passe", + "vpn": "VPN", + "dmarc": "Enregistrement DMARC", + "spf": "Enregistrement SPF", + "dkim": "Clé DKIM", + "mx": "Enregistrement MX" + }, + "domain": { + "card_title": "Domaine", + "screen_title": "Domaines et DNS", + "error": "Problèmes détectés", + "error_subtitle": "Clique ici pour les fixer", + "refreshing": "Rafraîchissement du statut…", + "services_title": "Services", + "services_subtitle": "Enregistrement de type \"A\" requis pour chaque service.", + "email_title": "Email", + "email_subtitle": "Enregistrements nécessaires pour l'échange sécurisé d'email.", + "update_list": "Liste mise à jour", + "ok": "Les enregistrements DNS sont OK", + "uninitialized": "Les données n'ont pas encore été récupérées" + }, + "backup": { + "card_title": "Sauvegarde", + "reuploaded_key": "Clés republiées", + "initialize": "Initialise", + "waiting_for_rebuild": "Vous serez capable de créer votre première sauvegarde dans quelques instants.", + "restore": "Restaurer depuis la sauvegarde", + "create_new": "Créer une nouvelle sauvegarde", + "creating": "Création d'une nouvelle sauvegarde: {}%", + "restoring": "Restauration depuis la sauvegarde", + "restore_alert": "Vous allez restaurer depuis la sauvegarde créée le {}. Toutes les données existantes vont être perdues. Êtes-vous sûr ?", + "refresh": "Statut d'avancement", + "refetching_list": "Dans quelques minutes, la liste sera mise à jour", + "reupload_key": "Forcer la republication de la clé", + "no_backups": "Il n'y a pour l'instant aucune sauvegarde", + "error_pending": "Le serveur a retourné une erreur, vérifier plus bas", + "refetch_backups": "Récupérer la liste des mise à jour" + }, + "storage": { + "card_title": "Stockage du serveur", + "status_ok": "L'utilisation du disque est OK", + "status_error": "Faible espace disque", + "disk_usage": "{} utilisé", + "disk_total": "{} total · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "extending_volume_title": "Extension du volume", + "extending_volume_price_info": "Les prix incluent la TVA et sont estimés par les données commerciales fournies par Hetzner.\nLe serveur va redémarrer après redimensionnement.", + "extending_volume_error": "Pas possible d'initialiser l'extension du volume.", + "size": "Taille", + "euro": "Euro", + "data_migration_title": "Migration de données", + "data_migration_notice": "Durant la migration, tous les services ne seront plus accessibles.", + "start_migration_button": "Démarrer la migration", + "migration_process": "Migration en cours…", + "migration_done": "Terminé", + "extend_volume_button": "Étendre le volume", + "extending_volume_description": "Redimensionner le volume va vous permettre de stocker davantage de données sur votre serveur sans étendre le serveur lui-même. Les volumes ne peuvent être qu'étendus, le shrinking n'est pas possible." + }, + "service_page": { + "open_in_browser": "Ouvrir dans le navigateur", + "restart": "Redémarrer le service", + "status": { + "active": "Démarré et opérationnel", + "inactive": "Arrêté", + "failed": "Démarrage en échec", + "off": "Désactivé", + "activating": "Activation", + "deactivating": "Désactivation", + "reloading": "Redémarrage" + }, + "disable": "Désactiver le service", + "enable": "Activer le service", + "move": "Déplacer sur un autre volume", + "uses": "Utilise {usage} du {volume}" + }, + "mail": { + "title": "E-Mail", + "login_info": "Utiliser l'identifiant et le mot de passe de l'onglets utilisateurs. Le port IMAP est 143 avec STARTTLS, le port SMTP est 587 avec STARTTLS.", + "subtitle": "E-Mail pour des entreprises et la famille." + }, + "not_ready_card": { + "in_menu": "Le serveur n'est pas encore configuré. Veuillez finir le paramétrage en utilisant l'assistant d'installation pour aller plus loin." + }, + "validations": { + "invalid_format_password": "Ne doit pas contenir d'espace", + "invalid_format": "Format invalide", + "already_exist": "Existe déjà", + "required": "Requis", + "invalid_format_ssh": "Doit correspondre au format de clé SSH", + "root_name": "Ne peut être 'root'" + }, + "jobs": { + "create_ssh_key": "Créer une clé SSH pour {}", + "reboot_failed": "Impossible de redémarrer le serveur. Veuillez vérifier les logs applicatifs.", + "delete_user": "Supprimer utilisateur", + "generic_error": "Impossible de se connecter au serveur!", + "delete_ssh_key": "Supprimer la clé SSH pour {}", + "reboot_server": "Redémarrer le serveur", + "upgrade_server": "Mise à jour du serveur", + "upgrade_failed": "Impossible de mettre à jour le serveur", + "upgrade_success": "Mise à jour du serveur démarrée", + "reboot_success": "Le serveur redémarre", + "run_jobs": "Lancer des jobs", + "job_added": "Job ajouté", + "service_turn_on": "Lancer", + "reset_user_password": "Réinitialiser le mot de passe de l'utilisateur", + "service_turn_off": "Arrêter", + "create_user": "Créer utilisateur", + "empty": "Pas de jobs", + "server_jobs": "Jobs sur le serveur", + "start": "Démarrer", + "title": "Liste des jobs" + }, + "modals": { + "you_cant_use_this_api": "Vous ne pouvez pas utiliser cette API pour un domaine avec cette extension.", + "destroy_server": "Effacer le serveur et en créer un nouveau?", + "no": "Non", + "yes": "Oui", + "reboot": "Redémarrer", + "delete_server_volume": "Supprimer le serveur et le volume?", + "purge_all_keys_confirm": "Oui, purger tous mes tokens", + "purge_all_keys": "Purger toutes les clés d'authentification?", + "are_you_sure": "Êtes-vous sûr?", + "try_again": "Essayer à nouveau?" + }, + "password_manager": { + "title": "Gestionnaire de mot de passe" + }, + "timer": { + "sec": "{} secondes" } } From 5a47ef4819c548a994cbb590b31cdc4c4ffe6ef0 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Tue, 21 Feb 2023 10:57:27 +0000 Subject: [PATCH 412/732] Translated using Weblate (Thai) Currently translated at 60.2% (241 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/th/ --- assets/translations/th.json | 99 ++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/assets/translations/th.json b/assets/translations/th.json index 6202e616..db92988e 100644 --- a/assets/translations/th.json +++ b/assets/translations/th.json @@ -48,9 +48,9 @@ "title": "เกี่ยวกับพวกเรา" }, "about_application_page": { - "api_version_text": "API เซิฟเวอร์เวอร์ชั้น v.{}", + "api_version_text": "API เซิฟเวอร์เวอร์ชั้น {}", "title": "เกี่ยวกับ", - "application_version_text": "แอปพลิเคชั่น เวอร์ชั่น v.{}", + "application_version_text": "แอปพลิเคชั่น เวอร์ชั่น {}", "privacy_policy": "นโยบายความเป็นส่วนตัว" }, "application_settings": { @@ -198,5 +198,100 @@ }, "not_ready_card": { "in_menu": "เซิร์ฟเวอร์ยังไม่ถูกติดตั้งในตอนนี้. โปรดใช้การติดตั้งอย่างง่ายในการติดตั้ง" + }, + "service_page": { + "open_in_browser": "เปิดในบราวเซอร์", + "restart": "รีสตาร์ทบริการ", + "disable": "ปิดบริการ", + "enable": "เปิดใช้บริการ", + "move": "ย้ายไปยังไดรฟ์ข้อมูลอื่น", + "uses": "ใช้ {usage} บน {volume}", + "status": { + "active": "เสร็จสิ้นและกำลังทำงาน", + "inactive": "หยุดแล้ว", + "failed": "การเริ่มต้นผิดพลาด", + "off": "ปิดการใช้แล้ว", + "activating": "กำลังเปิดใช้งาน", + "deactivating": "กำลังปิดใช้งาน", + "reloading": "กำลังรีสตาร์ท" + } + }, + "users": { + "login": "เข้าสู่ระบบ", + "add_new_user": "เพิ่มผู้ใช้แรก", + "not_ready": "โปรดเชื่อมต่อเซิร์ฟเวอร์ โดเมน และ DNS ในแท็บผู้ให้บริการ เพื่อให้สามารถเพิ่มผู้ใช้รายแรกได้", + "delete_confirm_question": "คุณแน่ใจใช่ไหม?", + "could_not_fetch_users": "ไม่สามารถดึงรายชื่อผู้ใช้", + "refresh_users": "รีเฟรชรายชื่อผู้ใช้", + "username_rule": "ชื่อผู้ใช้ต้องประกอบด้วยตัวอักษรละตินตัวพิมพ์เล็กตัวเลขและขีดล่างเท่านั้นไม่ควรขึ้นต้นด้วยตัวเลข", + "no_ssh_notice": "เฉพาะอีเมลและบัญชี SSH เท่านั้นที่ถูกสร้างขึ้นสําหรับผู้ใช้รายนี้ การลงชื่อเข้าระบบครั้งเดียวสําหรับบริการทั้งหมดกําลังจะมาในเร็วๆ นี้", + "new_user": "ผู้ใช้ใหม่", + "delete_user": "ลบผู้ใช้", + "nobody_here": "ไม่มีใครอยู่ในนี้", + "new_user_info_note": "ผู้ใช้ใหม่จะได้รับสิทธิ์เข้าถึงบริการทั้งหมดโดยอัตโนมัติ", + "reset_password": "รีเซ็ตรหัสผ่าน", + "account": "บัญชี", + "send_registration_data": "แบ่งปันข้อมูลรับรองการเข้าสู่ระบบ", + "could_not_fetch_description": "โปรดตรวจสอบการเชื่อมต่ออินเทอร์เน็ตของคุณแล้วลองอีกครั้ง", + "could_not_create_user": "สร้างผู้ใช้ไม่ได้", + "could_not_delete_user": "ลบผู้ใช้ไม่ได้", + "could_not_add_ssh_key": "เพิ่มกุญแจ SSH ไม่ได้", + "email_login": "เข้าสู่ระบบอีเมล" + }, + "social_network": { + "subtitle": "มันยากที่จะเชื่อ แต่มันก็เป็นไปได้ที่จะสร้างโซเชียลเน็ตเวิร์กของคุณเอง โดยมีกฎและกลุ่มเป้าหมายของคุณเอง", + "title": "เครือข่ายสังคม", + "login_info": "คุณจะต้องสร้างบัญชีบนเว็บไซต์" + }, + "git": { + "subtitle": "ทางเลือกส่วนตัวสำหรับ Github ที่เป็นของคุณ แต่ไม่ใช่ของ Microsoft", + "title": "Git Server", + "login_info": "คุณจะต้องสร้างบัญชีบนเว็บไซต์ ผู้ใช้คนแรกจะกลายเป็นผู้ดูแลระบบ" + }, + "initializing": { + "select_provider_notice": "โดย 'ค่อนข้างเล็ก' เราหมายถึงเครื่องที่มีซีพียู 2 คอร์และแรม 2 กิกะไบต์", + "select_provider_countries_text_do": "สหรัฐอเมริกา, เนเธอร์แลนด์, สิงคโปร์, สหราชอาณาจักร, เยอรมนี, แคนาดา, อินเดีย, ออสเตรเลีย", + "select_provider_price_text_do": "$ 17 ต่อเดือนสําหรับเซิร์ฟเวอร์ที่ค่อนข้างเล็กและพื้นที่เก็บข้อมูล 50GB", + "select_provider_email_notice": "การโฮสต์อีเมลจะไม่พร้อมใช้งานสําหรับลูกค้าใหม่ อย่างไรก็ตามมันจะถูกปลดล็อคทันทีที่คุณชําระเงินครั้งแรกเสร็จสิ้น", + "could_not_connect": "ไม่สามารถเชื่อมต่อกับผู้ให้บริการ", + "choose_location_type": "คุณต้องการสั่งซื้อเซิร์ฟเวอร์ของคุณที่ไหน?", + "connect_to_server": "เริ่มจากเซิร์ฟเวอร์กันก่อน", + "select_provider": "เลือกผู้ให้บริการรายใดก็ได้จากรายการต่อไปนี้พวกเขาทั้งหมดสนับสนุน SelfPrivacy", + "select_provider_countries_title": "ประเทศที่ใช้ได้", + "select_provider_countries_text_hetzner": "เยอรมนี, ฟินแลนด์, สหรัฐอเมริกา", + "select_provider_price_title": "ราคาเฉลี่ย", + "select_provider_price_text_hetzner": "€ 8 ต่อเดือนสําหรับเซิร์ฟเวอร์ที่ค่อนข้างเล็กและพื้นที่เก็บข้อมูล 50GB", + "select_provider_payment_title": "ช่องทางการจ่ายเงิน", + "select_provider_payment_text_hetzner": "บัตรเครดิต, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "บัตรเครดิต, Google Pay PayPal", + "select_provider_site_button": "เยี่ยมชมเว็บไซต์", + "connect_to_server_provider": "เข้าสู่ระบบใน ", + "connect_to_server_provider_text": "ด้วยโทเค็น API SelfPrivacy จะสามารถเช่าเครื่องและตั้งค่าเซิร์ฟเวอร์ของคุณได้", + "how": "วิธีรับโทเค็น API", + "provider_bad_key_error": "คีย์ API ของผู้ให้บริการไม่ถูกต้อง" + }, + "mail": { + "title": "อีเมล", + "subtitle": "อีเมลสำหรับบริษัทและครอบครัว", + "login_info": "ใช้ชื่อผู้ใช้และรหัสผ่านจากแท็บผู้ใช้ พอร์ต IMAP คือ 143 พร้อม STARTTLS, พอร์ต SMTP คือ 587 พร้อม STARTTLS." + }, + "password_manager": { + "title": "การจัดการรหัสผ่าน", + "subtitle": "ฐานความปลอดภัยของคุณ Bitwarden จะช่วยคุณสร้าง จัดเก็บ และย้ายรหัสผ่านระหว่างอุปกรณ์ ตลอดจนป้อนรหัสผ่าน เมื่อมีการร้องขอโดยใช้การเติมข้อความอัตโนมัติ", + "login_info": "คุณจะต้องสร้างบัญชีบนเว็บไซต์" + }, + "video": { + "title": "การประชุมแบบวิดีโอ", + "subtitle": "Zoom และ Google Meet นั้นดี แต่ Jitsi Meet เป็นทางเลือกที่คุ้มค่าซึ่งยังช่วยให้คุณมั่นใจได้ว่าไม่มีใครฟังคุณ", + "login_info": "ไม่จะเป็นต้องใช้บัญชี" + }, + "cloud": { + "title": "การจัดเก็บบนคลาวด์", + "subtitle": "ไม่อนุญาตให้บริการคลาวด์อ่านข้อมูลของคุณโดยใช้ NextCloud", + "login_info": "การเข้าสู่ระบบคือผู้ดูแลระบบ รหัสผ่านเหมือนกับผู้ใช้หลักของคุณ สร้างบัญชีใหม่ในอินเทอร์เฟซ Nextcloud" + }, + "vpn": { + "title": "เซิฟเวอร์ VPN", + "subtitle": "เซิฟเวอร์ VPN ส่วนตัว" } } From fde7082fc9e2ca193a4b058ecbf8892022e23c16 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Mon, 20 Feb 2023 18:15:28 +0000 Subject: [PATCH 413/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/be/ --- assets/markdown/how_cloudflare-be.md | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/assets/markdown/how_cloudflare-be.md b/assets/markdown/how_cloudflare-be.md index 61fb4b4e..7cf9c11f 100644 --- a/assets/markdown/how_cloudflare-be.md +++ b/assets/markdown/how_cloudflare-be.md @@ -1,17 +1,17 @@ -### How to get Cloudflare API Token -1. Visit the following link: https://dash.cloudflare.com/ -2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** -3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. -4. Click on **Create Token** button. -5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. -6. In the **Token Name** field, give your token a name. -7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. -8. Next, right under this line, click Add More. Similar field will appear. -9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. -10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. -11. Flick to the bottom and press the blue **Continue to Summary** button. -12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. -13. Click on **Create Token**. -14. We copy the created token, and save it in a reliable place (preferably in the password manager). +### Як атрымаць токен Cloudflare API +1. Перайдзіце па наступнай спасылцы: https://dash.cloudflare.com/ +2. У правым куце націсніце на значок профілю (чалавек у крузе). Для мабільнай версіі сайта ў левым верхнім куце націсніце кнопку **Menu** (тры гарызантальныя палоскі), у выпадальным меню націсніце **My Profile**. +3. Ёсць чатыры катэгорыі канфігурацыі на выбар: *Communication*, *Authentication*, **API Tokens**, *Session*. Выберыце **API Tokens**. +4. Націсніце на кнопку **Create Token**. +5. Спусціцеся ўніз і паглядзіце поле **Create Custom Token** і націсніце кнопку **Get Started** справа. +6. У полі **Token Name** дайце назву токену. +7. Далей у нас налады. У крайнім левым полі абярыце **Zone**. У самым доўгім полі па цэнтры абярыце **DNS**. У крайнім правым полі абярыце **Edit**. +8. Далей прама пад гэтым радком націсніце «Дадаць яшчэ». З'явіцца аналагічнае поле. +9. У самым левым полі новага радка выберыце аналагічна папярэдняму радку — **Zone**. У цэнтры — крыху іншае. Тут абярыце тое ж, што і злева — **Zone**. У крайнім правым полі абярыце **Read**. +10. Далей паглядзіце на **Resources Zone**. Пад гэтым надпісам радок з двума палямі. Злева павінна быць **Include**, а справа павінна быць **Specific Zone**. Пасля таго як вы выберыце канкрэтную зону, справа з'явіцца іншае поле. Выберыце ў ім свой дамен. +11. Прагартайце ўніз і націсніце сінюю кнопку **Continue to Summary**. +12. Правер, ці ўсё ў цябе правільна. Аналагічны радок павінен прысутнічаць: *Domain — DNS:Edit, Zone:Read*. +13. Націсніце на **Create Token**. +14. Створаны токен капіюем і захоўваем у надзейным месцы (пажадана ў мэнэджару пароляў). -![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) +![Настройка токену Cloudfire](resource:assets/images/gifs/CloudFlare.gif) From 17f15a591bbe743fa4f6b7f9960d1f0e2abff6dc Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Mon, 20 Feb 2023 18:04:50 +0000 Subject: [PATCH 414/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/be/ --- assets/markdown/how_digital_ocean-be.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_digital_ocean-be.md b/assets/markdown/how_digital_ocean-be.md index dc6355c2..8cc4876d 100644 --- a/assets/markdown/how_digital_ocean-be.md +++ b/assets/markdown/how_digital_ocean-be.md @@ -1,12 +1,10 @@ -### How to get Digital Ocean API Token -1. Visit the following [link](https://cloud.digitalocean.com/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Go to the "API" link on the left bar. -4. Click on the "Generate New Token". -5. Enter any name for the token. -6. Put expiration time to "No expiry". -7. Check the "Write (optional)" checkbox. -8. Now click on the "Generate Token" button. -9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file +### Як атрымаць Digital Ocean API Токен +1. Перайдзіце па наступнай спасылцы [link](https://cloud.digitalocean.com/) і ўвайдзіце ў новы акаўнт. +2. Увайдзіце ў раней створаны праект. Калі вы яшчэ не стварылі, калі ласка працягвайце. +3. Перайдзіце па спасылцы «API» на панэлі злева. +4. Націсніце на "Generate New Token". +5. Увядзіце любое імя для токена. +6. Пастаўце тэрмін прыдатнасці "No expiry". +7. Усталюйце сцяжок "Write (optional)". +8. Цяпер націсніце кнопку "Generate Token". +9. Пасля гэтага будзе паказаны токен. Захоўвайце яго ў любым надзейным месцы, пажадана ў менеджэры пароляў. \ No newline at end of file From ef04b5bf57a60e7af85d5018731cf742f538b5ba Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 22 Feb 2023 21:03:58 +0400 Subject: [PATCH 415/732] chore: Implement server installation on businness logic layer for hetzner --- .../server_installation_cubit.dart | 60 ++++++++----------- .../models/launch_installation_data.dart | 5 ++ .../providers/server_providers/hetzner.dart | 28 +++++++-- 3 files changed, 53 insertions(+), 40 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 9758c545..896ef717 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -172,7 +172,7 @@ class ServerInstallationCubit extends Cubit { await repository.saveServerType(serverType); await ProvidersController.currentServerProvider! - .trySetServerLocation(serverType); + .trySetServerLocation(serverType.identifier); emit( (state as ServerInstallationNotFinished).copyWith( @@ -223,42 +223,30 @@ class ServerInstallationCubit extends Cubit { emit((state as ServerInstallationNotFinished).copyWith(rootUser: rootUser)); } + Future onCreateServerSuccess( + final ServerHostingDetails serverDetails, + ) async { + await repository.saveServerDetails(serverDetails); + // TODO dns; + emit( + (state as ServerInstallationNotFinished).copyWith( + isLoading: false, + serverDetails: serverDetails, + ), + ); + runDelayed(startServerIfDnsIsOkay, const Duration(seconds: 30), null); + } + void createServerAndSetDnsRecords() async { - final ServerInstallationNotFinished stateCopy = - state as ServerInstallationNotFinished; - void onCancel() => emit( - (state as ServerInstallationNotFinished).copyWith(isLoading: false), - ); - - Future onSuccess(final ServerHostingDetails serverDetails) async { - await repository.createDnsRecords( - serverDetails, - state.serverDomain!, - onCancel: onCancel, - ); - - emit( - (state as ServerInstallationNotFinished).copyWith( - isLoading: false, - serverDetails: serverDetails, - ), - ); - runDelayed(startServerIfDnsIsOkay, const Duration(seconds: 30), null); - } - - try { - emit((state as ServerInstallationNotFinished).copyWith(isLoading: true)); - await repository.createServer( - state.rootUser!, - state.serverDomain!.domainName, - state.dnsApiToken!, - state.backblazeCredential!, - onCancel: onCancel, - onSuccess: onSuccess, - ); - } catch (e) { - emit(stateCopy); - } + emit((state as ServerInstallationNotFinished).copyWith(isLoading: true)); + await repository.createServer( + state.rootUser!, + state.serverDomain!.domainName, + state.dnsApiToken!, + state.backblazeCredential!, + onCancel: clearAppConfig, + onSuccess: onCreateServerSuccess, + ); } void startServerIfDnsIsOkay({ diff --git a/lib/logic/models/launch_installation_data.dart b/lib/logic/models/launch_installation_data.dart index 14e1e592..f955eed7 100644 --- a/lib/logic/models/launch_installation_data.dart +++ b/lib/logic/models/launch_installation_data.dart @@ -1,3 +1,4 @@ +import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -9,6 +10,8 @@ class LaunchInstallationData { required this.dnsProviderType, required this.domainName, required this.serverType, + required this.errorCallback, + required this.successCallback, }); final User rootUser; @@ -16,4 +19,6 @@ class LaunchInstallationData { final String domainName; final DnsProviderType dnsProviderType; final ServerType serverType; + final Function() errorCallback; + final Function(ServerHostingDetails details) successCallback; } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index f1453448..6cd5f4f6 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -424,7 +424,7 @@ class HetznerServerProvider extends ServerProvider { choices: [ CallbackDialogueChoice( title: 'basis.cancel'.tr(), - callback: null, + callback: await installationData.errorCallback(), ), CallbackDialogueChoice( title: 'basis.try_again'.tr(), @@ -471,7 +471,7 @@ class HetznerServerProvider extends ServerProvider { choices: [ CallbackDialogueChoice( title: 'basis.cancel'.tr(), - callback: null, + callback: installationData.errorCallback(), ), CallbackDialogueChoice( title: 'basis.yes'.tr(), @@ -498,7 +498,14 @@ class HetznerServerProvider extends ServerProvider { choices: [ CallbackDialogueChoice( title: 'basis.cancel'.tr(), - callback: null, + callback: () async { + final deletion = await deleteServer(hostname); + if (deletion.success) { + installationData.errorCallback(); + } + + return deletion; + }, ), CallbackDialogueChoice( title: 'basis.try_again'.tr(), @@ -537,13 +544,23 @@ class HetznerServerProvider extends ServerProvider { choices: [ CallbackDialogueChoice( title: 'basis.cancel'.tr(), - callback: null, + callback: () async { + final deletion = await deleteServer(hostname); + if (deletion.success) { + installationData.errorCallback(); + } + + return deletion; + }, ), CallbackDialogueChoice( title: 'basis.try_again'.tr(), callback: () async { + await _adapter.api().deleteVolume(volume); + await Future.delayed(const Duration(seconds: 5)); final deletion = await deleteServer(hostname); if (deletion.success) { + await Future.delayed(const Duration(seconds: 5)); return launchInstallation(installationData); } @@ -559,6 +576,9 @@ class HetznerServerProvider extends ServerProvider { code: volumeResult.code, ); } + + await installationData.successCallback(serverDetails); + return GenericResult(success: true, data: null); } Future> deleteServer( From 62c0030f8e55aeb7449a8dd1500e875fb2454566 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 22 Feb 2023 21:58:59 +0400 Subject: [PATCH 416/732] chore: Implement server installation logic on cubit layer --- .../server_installation_cubit.dart | 55 +++++++-- .../server_installation_repository.dart | 115 ++---------------- .../models/launch_installation_data.dart | 5 +- lib/logic/providers/server_provider.dart | 7 ++ .../providers/server_providers/hetzner.dart | 5 +- 5 files changed, 69 insertions(+), 118 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 896ef717..1ccaf714 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -6,6 +6,8 @@ import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; +import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; +import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; @@ -18,6 +20,7 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_repository.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; export 'package:provider/provider.dart'; @@ -239,14 +242,52 @@ class ServerInstallationCubit extends Cubit { void createServerAndSetDnsRecords() async { emit((state as ServerInstallationNotFinished).copyWith(isLoading: true)); - await repository.createServer( - state.rootUser!, - state.serverDomain!.domainName, - state.dnsApiToken!, - state.backblazeCredential!, - onCancel: clearAppConfig, - onSuccess: onCreateServerSuccess, + + final installationData = LaunchInstallationData( + rootUser: state.rootUser!, + dnsApiToken: state.dnsApiToken!, + dnsProviderType: state.serverDomain!.provider, + domainName: state.serverDomain!.domainName, + serverTypeId: state.serverTypeIdentificator!, + errorCallback: clearAppConfig, + successCallback: onCreateServerSuccess, ); + + final result = + await ProvidersController.currentServerProvider!.launchInstallation( + installationData, + ); + + if (!result.success && result.data != null) { + bool dialoguesResolved = false; + CallbackDialogueBranching branching = result.data!; + while (!dialoguesResolved) { + showPopUpAlert( + alertTitle: branching.title, + description: branching.description, + actionButtonTitle: branching.choices[1].title, + actionButtonOnPressed: () async { + final branchingResult = await branching.choices[1].callback!(); + if (branchingResult.data == null) { + dialoguesResolved = true; + return; + } + + branching = branchingResult.data!; + }, + cancelButtonTitle: branching.choices[0].title, + cancelButtonOnPressed: () async { + final branchingResult = await branching.choices[0].callback!(); + if (branchingResult.data == null) { + dialoguesResolved = true; + return; + } + + branching = branchingResult.data!; + }, + ); + } + } } void startServerIfDnsIsOkay({ diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index d60b2119..3d3f62a8 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -25,6 +25,7 @@ import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +import 'package:selfprivacy/logic/providers/providers_controller.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/utils/network_utils.dart'; @@ -168,13 +169,15 @@ class ServerInstallationRepository { Future startServer( final ServerHostingDetails server, ) async { - ServerHostingDetails serverDetails; + final result = await ProvidersController.currentServerProvider!.powerOn( + server.id, + ); - serverDetails = await ApiController.currentServerProviderApiFactory! - .getServerProvider() - .powerOn(); + if (result.success && result.data != null) { + server.copyWith(startTime: result.data); + } - return serverDetails; + return server; } Future getDomainId(final String token, final String domain) async { @@ -239,108 +242,6 @@ class ServerInstallationRepository { return matches; } - Future createServer( - final User rootUser, - final String domainName, - final String cloudFlareKey, - final BackblazeCredential backblazeCredential, { - required final void Function() onCancel, - required final Future Function(ServerHostingDetails serverDetails) - onSuccess, - }) async { - final ServerProviderApi api = - ApiController.currentServerProviderApiFactory!.getServerProvider(); - - void showInstallationErrorPopUp() { - showPopUpAlert( - alertTitle: 'modals.unexpected_error'.tr(), - description: 'modals.try_again'.tr(), - actionButtonTitle: 'modals.yes'.tr(), - actionButtonOnPressed: () async { - ServerHostingDetails? serverDetails; - try { - final GenericResult createResult = await api.createServer( - dnsProvider: getIt().dnsProvider!, - dnsApiToken: cloudFlareKey, - rootUser: rootUser, - domainName: domainName, - serverType: getIt().serverType!, - ); - serverDetails = createResult.data; - } catch (e) { - print(e); - } - - if (serverDetails == null) { - print('Server is not initialized!'); - return; - } - await saveServerDetails(serverDetails); - onSuccess(serverDetails); - }, - cancelButtonOnPressed: onCancel, - ); - } - - try { - final GenericResult createServerResult = - await api.createServer( - dnsProvider: getIt().dnsProvider!, - dnsApiToken: cloudFlareKey, - rootUser: rootUser, - domainName: domainName, - serverType: getIt().serverType!, - ); - - if (createServerResult.data == null) { - const String e = 'Server is not initialized!'; - print(e); - } - - if (createServerResult.message == 'uniqueness_error') { - showPopUpAlert( - alertTitle: 'modals.already_exists'.tr(), - description: 'modals.destroy_server'.tr(), - actionButtonTitle: 'modals.yes'.tr(), - actionButtonOnPressed: () async { - await api.deleteServer( - domainName: domainName, - ); - - ServerHostingDetails? serverDetails; - try { - final GenericResult createResult = await api.createServer( - dnsProvider: getIt().dnsProvider!, - dnsApiToken: cloudFlareKey, - rootUser: rootUser, - domainName: domainName, - serverType: getIt().serverType!, - ); - serverDetails = createResult.data; - } catch (e) { - print(e); - } - - if (serverDetails == null) { - print('Server is not initialized!'); - return; - } - await saveServerDetails(serverDetails); - onSuccess(serverDetails); - }, - cancelButtonOnPressed: onCancel, - ); - return; - } - - saveServerDetails(createServerResult.data!); - onSuccess(createServerResult.data!); - } catch (e) { - print(e); - showInstallationErrorPopUp(); - } - } - Future createDnsRecords( final ServerHostingDetails serverDetails, final ServerDomain domain, { diff --git a/lib/logic/models/launch_installation_data.dart b/lib/logic/models/launch_installation_data.dart index f955eed7..c7956ea1 100644 --- a/lib/logic/models/launch_installation_data.dart +++ b/lib/logic/models/launch_installation_data.dart @@ -1,7 +1,6 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/server_type.dart'; class LaunchInstallationData { LaunchInstallationData({ @@ -9,7 +8,7 @@ class LaunchInstallationData { required this.dnsApiToken, required this.dnsProviderType, required this.domainName, - required this.serverType, + required this.serverTypeId, required this.errorCallback, required this.successCallback, }); @@ -18,7 +17,7 @@ class LaunchInstallationData { final String dnsApiToken; final String domainName; final DnsProviderType dnsProviderType; - final ServerType serverType; + final String serverTypeId; final Function() errorCallback; final Function(ServerHostingDetails details) successCallback; } diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index 642c779a..b92faa97 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -1,4 +1,6 @@ import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; +import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -11,6 +13,11 @@ abstract class ServerProvider { Future>> getServerTypes({ required final ServerProviderLocation location, }); + Future> launchInstallation( + final LaunchInstallationData installationData, + ); + Future> powerOn(final int serverId); + Future> restart(final int serverId); GenericResult get success => GenericResult(success: true, data: true); } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 6cd5f4f6..4b2377e6 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -359,6 +359,7 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(data: metrics, success: true); } + @override Future> restart(final int serverId) async { DateTime? timestamp; final result = await _adapter.api().restart(serverId); @@ -379,6 +380,7 @@ class HetznerServerProvider extends ServerProvider { ); } + @override Future> powerOn(final int serverId) async { DateTime? timestamp; final result = await _adapter.api().powerOn(serverId); @@ -413,6 +415,7 @@ class HetznerServerProvider extends ServerProvider { return dnsProviderType; } + @override Future> launchInstallation( final LaunchInstallationData installationData, ) async { @@ -449,7 +452,7 @@ class HetznerServerProvider extends ServerProvider { dnsApiToken: installationData.dnsApiToken, rootUser: installationData.rootUser, domainName: installationData.domainName, - serverType: installationData.serverType.identifier, + serverType: installationData.serverTypeId, dnsProviderType: dnsProviderToInfectName(installationData.dnsProviderType), hostName: hostname, From 985c4a34e84ad85faff7530d91102007ec42e664 Mon Sep 17 00:00:00 2001 From: Thary Date: Thu, 23 Feb 2023 13:54:37 +0000 Subject: [PATCH 417/732] Translated using Weblate (Polish) Currently translated at 72.0% (288 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 52 ++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 02e0550a..b235e826 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -270,7 +270,14 @@ "no_ssh_notice": "Dla tego użytkownika tworzone są tylko konta e-mail i SSH. Jednokrotne logowanie do wszystkich usług będzie dostępne wkrótce." }, "validations": { - "length_longer": "Długość ciągu znaków [] musi być mniejsza lub równa {}" + "length_longer": "Długość ciągu znaków [] musi być mniejsza lub równa {}", + "length_not_equal": "Długość jest [], ależ powinna być {}", + "already_exist": "Już jest", + "invalid_format": "Nieprwidłowy format", + "required": "Potrzebien", + "root_name": "Nie może być 'root'", + "invalid_format_ssh": "Potrzebien format klucza SSH", + "invalid_format_password": "Nie musi mieć puste symbole" }, "not_ready_card": { "in_menu": "Serwer jeszcze nie jest skonfigurowany, użyj kreatora połączeń." @@ -284,7 +291,7 @@ "select_provider_countries_text_do": "USA, Holandia, Singapur, Wielka Brytania, Niemcy, Kanada, Indie, Australia", "select_provider_payment_text_do": "Karty kredytowe, Google Pay, PayPal", "select_provider_email_notice": "Hosting poczty e-mail nie będzie dostępny dla nowych klientów. Niemniej jednak zostanie odblokowany, gdy tylko dokonasz pierwszej płatności.", - "select_provider_site_button": "Odwiedź stronę", + "select_provider_site_button": "Odwiedź storonkę", "select_provider_price_title": "Średnia cena", "select_provider_price_text_hetzner": "€8 miesięcznie za stosunkowo mały serwer i 50GB miejsca na dysku", "select_provider_price_text_do": "$17 miesięcznie za stosunkowo mały serwer i 50GB miejsca na dysku", @@ -305,9 +312,46 @@ "locations_not_found_text": "W tej lokalizacji nie było dostępnych serwerów do wynajęcia", "back_to_locations": "Wybierzmy inny", "choose_location_type_text": "Wybór lokalizacji będzie determinował dostępne konfiguracje, ceny i prędkość połączenia z serwerem.", - "choose_server_type_storage": "{} GB pamięci masowej systemu", + "choose_server_type_storage": "{} GB pamięci na diskie", "choose_server_type_payment_per_month": "{} miesięcznie", "no_server_types_found": "Nie znaleziono dostępnych typów serwerów! Proszę upewnić się, że masz dostęp do dostawcy serwera...", - "cloudflare_bad_key_error": "Klucz API Cloudflare jest nieprawidłowy" + "cloudflare_bad_key_error": "Klucz API Cloudflare jest nieprawidłowy", + "use_this_domain": "Kto używa ten domen?", + "cloudflare_api_token": "Klucz CloudFlare API", + "connect_backblaze_storage": "Dodajcie Blackblaze", + "no_connected_domains": "Niema podłączonych domenów", + "what": "Co to znaczy?", + "backblaze_bad_key_error": "Informacja o Blackbaze nieprawidłowa", + "select_dns": "Teraz wybierz provajdera DNS", + "manage_domain_dns": "Dla kierowania DNS", + "create_master_account": "Dodać konto administratora" + }, + "jobs": { + "delete_ssh_key": "Wydalić SSH-klucz dla {}", + "create_user": "Dodać korzystalnika", + "delete_user": "Wydalić korzystalnika", + "reboot_failed": "Nie otrzyma się zrestartować. Przeprowadzicie logi.", + "service_turn_off": "Wyłączyć", + "service_turn_on": "Włączyć", + "create_ssh_key": "Dodać SSH-klucz dla {}", + "generic_error": "Nie otrzyma się podłoczyć k serweru!" + }, + "modals": { + "purge_all_keys": "Wydalić wszystkie kluczy autentyfikacji?", + "are_you_sure": "Wpełnieny?", + "dns_removal_error": "Nie otrzyma się wydalić zapis DNS.", + "yes": "Tak", + "no": "Nie", + "reboot": "Restart" + }, + "recovery_key": { + "key_main_header": "Klucz odzyskania", + "key_synchronizing": "Synchronizacja…", + "key_receiving_done": "Zrobiono!", + "key_replace_button": "Wytworzyć nowy klucz", + "generation_error": "Nie otrzyma się zrobić klucz odzyskania. {}" + }, + "timer": { + "sec": "{} s" } } From 38fff57e1562bfc189663a4d7609f7b0686ec30a Mon Sep 17 00:00:00 2001 From: Thary Date: Thu, 23 Feb 2023 14:01:07 +0000 Subject: [PATCH 418/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/be/ --- assets/translations/be.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/translations/be.json b/assets/translations/be.json index e9bafe9e..e07cfc09 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -323,7 +323,7 @@ "validations": { "required": "Абавязковае поле", "already_exist": "Ужо існуе", - "invalid_format_password": "Павінен не змяшчаць пустыя сімвалы", + "invalid_format_password": "Не павінен змяшчаць пустыя сімвалы", "root_name": "Імя карыстальніка не можа быць 'root'", "length_not_equal": "Даўжыня радка [], павінна быць роўна {}", "length_longer": "Даўжыня радка [], павінна быць менш або роўна {}", From 7f3a339207ff82661f47c5ae7442427148e7b008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me?= Date: Thu, 23 Feb 2023 17:43:17 +0000 Subject: [PATCH 419/732] Translated using Weblate (French) Currently translated at 57.2% (229 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/fr/ --- assets/translations/fr.json | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 142e1397..0de687c9 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -41,7 +41,8 @@ "console": "Console", "application_settings": "Paramètres de l'application", "configuration_wizard": "Assistant de configuration", - "about_project": "À propos de nous" + "about_project": "À propos de nous", + "onboarding": "Embarquement" }, "console_page": { "title": "Console", @@ -254,9 +255,35 @@ "try_again": "Essayer à nouveau?" }, "password_manager": { - "title": "Gestionnaire de mot de passe" + "title": "Gestionnaire de mot de passe", + "subtitle": "La base de votre sécurité. Bitwarden vous aidera à créer, stocker et déplacer les mots de passe entre appareils, ainsi qu'à les saisir, lorsque cela est demandé, en utilisant l'autocomplétion.", + "login_info": "Vous devrez créer un compte sur le site web." }, "timer": { "sec": "{} secondes" + }, + "cloud": { + "title": "Stockage cloud", + "subtitle": "Ne permettez pas aux services cloud de lire vos données en utilisant NextCloud.", + "login_info": "Le login est admin, le mot de passe est le même que votre utilisateur principal. Créer de nouveaux comptes via l'interface Nextcloud." + }, + "video": { + "title": "Vidéoconférence", + "subtitle": "Zoom et Google Meet sont biens, mais Jitsi Meet est une alternative valable qui vous donne également l'assurance que vous n'êtes pas écouter.", + "login_info": "Pas de compte nécessaire." + }, + "social_network": { + "title": "Réseaux sociaux", + "subtitle": "C'est difficile à croire mais il devient possible de créer votre propre réseau social, avec vos propres règles et votre propre public cible.", + "login_info": "Vous devrez créer un compte sur le site web." + }, + "git": { + "title": "Serveur Git", + "subtitle": "Une alternative privée à Github, qui vous appartient et qui n'appartient pas à Microsoft.", + "login_info": "Vous devrez créer un compte sur le site web. Le premier utilisateur deviendra admin." + }, + "vpn": { + "title": "Serveur VPN", + "subtitle": "Serveur VPN privé" } } From 97e9e9d9cbbb2bf627677fd05024070d22b12627 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 28 Feb 2023 07:00:52 +0400 Subject: [PATCH 420/732] chore: Adapt MetricsRepository to new ProvidersControllers model --- .../server_providers/hetzner/hetzner_api.dart | 97 +------------------ .../cubit/metrics/metrics_repository.dart | 21 ++-- .../server_installation_cubit.dart | 3 +- .../server_installation_repository.dart | 25 +++-- lib/logic/providers/server_provider.dart | 6 ++ .../providers/server_providers/hetzner.dart | 1 + 6 files changed, 36 insertions(+), 117 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index fa244393..42ec94bb 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -1,23 +1,16 @@ -import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; -import 'package:selfprivacy/logic/models/server_basic_info.dart'; -import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; -import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; @@ -353,10 +346,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String serverType, }) async { final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; - Response? serverCreateResponse; DioError? hetznerError; bool success = false; + final Dio client = await getClient(); try { final Map data = { @@ -405,94 +398,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future> skldfjalkdsjflkasd({ - required final String dnsApiToken, - required final User rootUser, - required final String domainName, - required final ServerVolume volume, - required final String serverType, - required final DnsProviderType dnsProvider, - }) async { - final String dbPassword = StringGenerators.dbPassword(); - final int volumeId = volume.id; - - final String apiToken = StringGenerators.apiToken(); - final String hostname = getHostnameFromDomain(domainName); - const String infectBranch = 'providers/hetzner'; - final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; - final String base64Password = - base64.encode(utf8.encode(rootUser.password ?? 'PASS')); - final String dnsProviderType = dnsProviderToInfectName(dnsProvider); - - Response? serverCreateResponse; - ServerHostingDetails? serverDetails; - DioError? hetznerError; - bool success = false; - final Dio client = await getClient(); - try { - final Map data = { - 'name': hostname, - 'server_type': serverType, - 'start_after_create': false, - 'image': 'ubuntu-20.04', - 'volumes': [volumeId], - 'networks': [], - 'user_data': '#cloud-config\n' - 'runcmd:\n' - '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | ' - "STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType " - "NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' " - 'CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | ' - 'tee /tmp/infect.log', - 'labels': {}, - 'automount': true, - 'location': region!, - }; - print('Decoded data: $data'); - - serverCreateResponse = await client.post( - '/servers', - data: data, - ); - print(serverCreateResponse.data); - serverDetails = ServerHostingDetails( - id: serverCreateResponse.data['server']['id'], - ip4: serverCreateResponse.data['server']['public_net']['ipv4']['ip'], - createTime: DateTime.now(), - volume: volume, - apiToken: apiToken, - provider: ServerProviderType.hetzner, - ); - success = true; - } on DioError catch (e) { - print(e); - hetznerError = e; - } catch (e) { - print(e); - } finally { - client.close(); - } - - if (!success) { - await Future.delayed(const Duration(seconds: 10)); - await deleteVolume(volume); - } - - String? apiResultMessage = serverCreateResponse?.statusMessage; - if (hetznerError != null && - hetznerError.response!.data['error']['code'] == 'uniqueness_error') { - apiResultMessage = 'uniqueness_error'; - } - - return GenericResult( - data: serverDetails, - success: success && hetznerError == null, - code: serverCreateResponse?.statusCode ?? - hetznerError?.response?.statusCode, - message: apiResultMessage, - ); - } - Future> deleteServer({ required final String domainName, }) async { diff --git a/lib/logic/cubit/metrics/metrics_repository.dart b/lib/logic/cubit/metrics/metrics_repository.dart index 71c298bf..0c6a82ef 100644 --- a/lib/logic/cubit/metrics/metrics_repository.dart +++ b/lib/logic/cubit/metrics/metrics_repository.dart @@ -1,9 +1,8 @@ import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/metrics/metrics_cubit.dart'; -import 'package:selfprivacy/logic/models/metrics.dart'; +import 'package:selfprivacy/logic/providers/providers_controller.dart'; class MetricsLoadException implements Exception { MetricsLoadException(this.message); @@ -12,8 +11,7 @@ class MetricsLoadException implements Exception { class MetricsRepository { Future getMetrics(final Period period) async { - final providerApiFactory = ApiController.currentServerProviderApiFactory; - if (providerApiFactory == null) { + if (ProvidersController.currentServerProvider == null) { throw MetricsLoadException('Server Provider data is null'); } @@ -33,20 +31,19 @@ class MetricsRepository { } final serverId = getIt().serverDetails!.id; - final ServerMetrics? metrics = - await providerApiFactory.getServerProvider().getMetrics( - serverId, - start, - end, - ); + final result = await ProvidersController.currentServerProvider!.getMetrics( + serverId, + start, + end, + ); - if (metrics == null) { + if (result.data == null || !result.success) { throw MetricsLoadException('Metrics data is null'); } return MetricsLoaded( period: period, - metrics: metrics, + metrics: result.data!, ); } } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 1ccaf714..435d84af 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -134,7 +134,7 @@ class ServerInstallationCubit extends Cubit { Future> fetchAvailableTypesByLocation( final ServerProviderLocation location, ) async { - if (ApiController.currentServerProviderApiFactory == null) { + if (ProvidersController.currentServerProvider == null) { return []; } @@ -754,6 +754,7 @@ class ServerInstallationCubit extends Cubit { void clearAppConfig() { closeTimer(); ApiController.clearProviderApiFactories(); + ProvidersController.clearProviders(); repository.clearAppConfig(); emit(const ServerInstallationEmpty()); } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 3d3f62a8..528b713f 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -332,15 +332,24 @@ class ServerInstallationRepository { return api.isHttpServerWorking(); } - Future restart() async => - ApiController.currentServerProviderApiFactory! - .getServerProvider() - .restart(); + Future restart() async { + final server = getIt().serverDetails!; - Future powerOn() async => - ApiController.currentServerProviderApiFactory! - .getServerProvider() - .powerOn(); + final result = await ProvidersController.currentServerProvider!.restart( + server.id, + ); + + if (result.success && result.data != null) { + server.copyWith(startTime: result.data); + } + + return server; + } + + Future powerOn() async { + final server = getIt().serverDetails!; + return startServer(server); + } Future getRecoveryCapabilities( final ServerDomain serverDomain, diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index b92faa97..519307e8 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -1,6 +1,7 @@ import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/launch_installation_data.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -18,6 +19,11 @@ abstract class ServerProvider { ); Future> powerOn(final int serverId); Future> restart(final int serverId); + Future> getMetrics( + final int serverId, + final DateTime start, + final DateTime end, + ); GenericResult get success => GenericResult(success: true, data: true); } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 4b2377e6..20a4ca95 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -289,6 +289,7 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(success: true, data: metadata); } + @override Future> getMetrics( final int serverId, final DateTime start, From cd59c19c9cf7187c0ad730fa5959700c464926ef Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 1 Mar 2023 06:53:51 +0400 Subject: [PATCH 421/732] chore: Start implementing Digital Ocean provider layer --- .../digital_ocean/digital_ocean_api.dart | 83 +-------- .../server_providers/server_provider.dart | 15 -- .../server_providers/digital_ocean.dart | 176 +++++++++++++++++- .../providers/server_providers/hetzner.dart | 1 - 4 files changed, 180 insertions(+), 95 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 7cd379ee..e1996dc4 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -59,7 +59,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @override String get displayProviderName => 'Digital Ocean'; - @override Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; @@ -724,46 +723,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return servers; } - String? getEmojiFlag(final String query) { - String? emoji; - - switch (query.toLowerCase().substring(0, 3)) { - case 'fra': - emoji = '🇩🇪'; - break; - - case 'ams': - emoji = '🇳🇱'; - break; - - case 'sgp': - emoji = '🇸🇬'; - break; - - case 'lon': - emoji = '🇬🇧'; - break; - - case 'tor': - emoji = '🇨🇦'; - break; - - case 'blr': - emoji = '🇮🇳'; - break; - - case 'nyc': - case 'sfo': - emoji = '🇺🇸'; - break; - } - - return emoji; - } - - @override - Future>> - getAvailableLocations() async { + Future> getAvailableLocations() async { List locations = []; final Dio client = await getClient(); @@ -772,16 +732,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/regions', ); - locations = response.data!['regions'] - .map( - (final location) => ServerProviderLocation( - title: location['slug'], - description: location['name'], - flag: getEmojiFlag(location['slug']), - identifier: location['slug'], - ), - ) - .toList(); + locations = response.data!['regions']; } catch (e) { print(e); return GenericResult( @@ -796,39 +747,15 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return GenericResult(data: locations, success: true); } - @override - Future>> getAvailableServerTypes({ - required final ServerProviderLocation location, - }) async { - final List types = []; + Future> getAvailableServerTypes() async { + List types = []; final Dio client = await getClient(); try { final Response response = await client.get( '/sizes', ); - final rawSizes = response.data!['sizes']; - for (final rawSize in rawSizes) { - for (final rawRegion in rawSize['regions']) { - final ramMb = rawSize['memory'].toDouble(); - if (rawRegion.toString() == location.identifier && ramMb > 1024) { - types.add( - ServerType( - title: rawSize['description'], - identifier: rawSize['slug'], - ram: ramMb / 1024, - cores: rawSize['vcpus'], - disk: DiskSize(byte: rawSize['disk'] * 1024 * 1024 * 1024), - price: Price( - value: rawSize['price_monthly'], - currency: 'USD', - ), - location: location, - ), - ); - } - } - } + types = response.data!['sizes']; } catch (e) { print(e); return GenericResult( diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 99c6b1ac..88250ab3 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -1,5 +1,4 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; class ProviderApiTokenValidation { @@ -12,20 +11,6 @@ class ProviderApiTokenValidation { } abstract class ServerProviderApi extends ApiMap { - String dnsProviderToInfectName(final DnsProviderType dnsProvider) { - String dnsProviderType; - switch (dnsProvider) { - case DnsProviderType.digitalOcean: - dnsProviderType = 'DIGITALOCEAN'; - break; - case DnsProviderType.cloudflare: - default: - dnsProviderType = 'CLOUDFLARE'; - break; - } - return dnsProviderType; - } - /// Provider name key which lets infect understand what kind of installation /// it requires, for example 'digitaloceal' for Digital Ocean String get infectProviderName; diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 4a26c49e..d94418cd 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -1,3 +1,177 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart'; +import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/server_provider.dart'; -class DigitalOceanServerProvider extends ServerProvider {} +class ApiAdapter { + ApiAdapter({final String? region, final bool isWithToken = true}) + : _api = DigitalOceanApi( + region: region, + isWithToken: isWithToken, + ); + + DigitalOceanApi api({final bool getInitialized = true}) => getInitialized + ? _api + : DigitalOceanApi( + region: _api.region, + isWithToken: false, + ); + + final DigitalOceanApi _api; +} + +class DigitalOceanServerProvider extends ServerProvider { + DigitalOceanServerProvider() : _adapter = ApiAdapter(); + DigitalOceanServerProvider.load( + final ServerType serverType, + final bool isAuthotized, + ) : _adapter = ApiAdapter( + isWithToken: isAuthotized, + region: serverType.location.identifier, + ); + + ApiAdapter _adapter; + + @override + Future> trySetServerLocation( + final String location, + ) async { + final bool apiInitialized = _adapter.api().isWithToken; + if (!apiInitialized) { + return GenericResult( + success: true, + data: false, + message: 'Not authorized!', + ); + } + + _adapter = ApiAdapter( + isWithToken: true, + region: location, + ); + return success; + } + + @override + Future> tryInitApiByToken(final String token) async { + final api = _adapter.api(getInitialized: false); + final result = await api.isApiTokenValid(token); + if (!result.data || !result.success) { + return result; + } + + _adapter = ApiAdapter(region: api.region, isWithToken: true); + return result; + } + + String? getEmojiFlag(final String query) { + String? emoji; + + switch (query.toLowerCase().substring(0, 3)) { + case 'fra': + emoji = '🇩🇪'; + break; + + case 'ams': + emoji = '🇳🇱'; + break; + + case 'sgp': + emoji = '🇸🇬'; + break; + + case 'lon': + emoji = '🇬🇧'; + break; + + case 'tor': + emoji = '🇨🇦'; + break; + + case 'blr': + emoji = '🇮🇳'; + break; + + case 'nyc': + case 'sfo': + emoji = '🇺🇸'; + break; + } + + return emoji; + } + + @override + Future>> + getAvailableLocations() async { + final List locations = []; + final result = await _adapter.api().getAvailableLocations(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: locations, + code: result.code, + message: result.message, + ); + } + + final List rawLocations = result.data; + for (final rawLocation in rawLocations) { + ServerProviderLocation? location; + try { + location = ServerProviderLocation( + title: rawLocation['slug'], + description: rawLocation['name'], + flag: getEmojiFlag(rawLocation['slug']), + identifier: rawLocation['slug'], + ); + } catch (e) { + continue; + } + locations.add(location); + } + + return GenericResult(success: true, data: locations); + } + + @override + Future>> getServerTypes({ + required final ServerProviderLocation location, + }) async { + final List types = []; + final result = await _adapter.api().getAvailableServerTypes(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: types, + code: result.code, + message: result.message, + ); + } + + final List rawTypes = result.data; + for (final rawSize in rawSizes) { + for (final rawRegion in rawSize['regions']) { + final ramMb = rawSize['memory'].toDouble(); + if (rawRegion.toString() == location.identifier && ramMb > 1024) { + types.add( + ServerType( + title: rawSize['description'], + identifier: rawSize['slug'], + ram: ramMb / 1024, + cores: rawSize['vcpus'], + disk: DiskSize(byte: rawSize['disk'] * 1024 * 1024 * 1024), + price: Price( + value: rawSize['price_monthly'], + currency: 'USD', + ), + location: location, + ), + ); + } + } + } + + return GenericResult(success: true, data: types); + } +} diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 20a4ca95..43d60aec 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart'; -import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; From 76536f81154499415b3063614f5aef642d7dccfd Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 3 Mar 2023 03:01:09 +0400 Subject: [PATCH 422/732] chore: Move basic functionality of Digital Ocean to provider layer --- .../digital_ocean/digital_ocean_api.dart | 264 ++++-------------- .../server_providers/hetzner/hetzner_api.dart | 10 +- .../server_providers/digital_ocean.dart | 247 +++++++++++++++- .../providers/server_providers/hetzner.dart | 10 - 4 files changed, 308 insertions(+), 223 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index e1996dc4..3f886597 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; @@ -11,13 +10,9 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; -import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; -import 'package:selfprivacy/logic/models/server_type.dart'; -import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; @@ -107,13 +102,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { /// Hardcoded on their documentation and there is no pricing API at all /// Probably we should scrap the doc page manually - @override Future getPricePerGb() async => Price( value: 0.10, currency: 'USD', ); - @override Future> createVolume() async { ServerVolume? volume; @@ -163,7 +156,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - @override Future> getVolumes({final String? status}) async { final List volumes = []; @@ -216,7 +208,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return requestedVolume; } - @override Future deleteVolume(final ServerVolume volume) async { final Dio client = await getClient(); try { @@ -228,7 +219,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } } - @override Future> attachVolume( final ServerVolume volume, final int serverId, @@ -268,7 +258,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - @override Future detachVolume(final ServerVolume volume) async { bool success = false; @@ -295,7 +284,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return success; } - @override Future resizeVolume( final ServerVolume volume, final DiskSize size, @@ -325,7 +313,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return success; } - @override Future> createServer({ required final String dnsApiToken, required final User rootUser, @@ -472,132 +459,65 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return GenericResult( - success: true, - data: true, - ); + return GenericResult(success: true, data: true); } - @override - Future restart() async { - final ServerHostingDetails server = getIt().serverDetails!; - + Future> restart(final int serverId) async { final Dio client = await getClient(); try { await client.post( - '/droplets/${server.id}/actions', + '/droplets/$serverId/actions', data: { 'type': 'reboot', }, ); } catch (e) { print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } - return server.copyWith(startTime: DateTime.now()); + return GenericResult(success: true, data: null); } - @override - Future powerOn() async { - final ServerHostingDetails server = getIt().serverDetails!; - + Future> powerOn(final int serverId) async { final Dio client = await getClient(); try { await client.post( - '/droplets/${server.id}/actions', + '/droplets/$serverId/actions', data: { 'type': 'power_on', }, ); } catch (e) { print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { close(client); } - return server.copyWith(startTime: DateTime.now()); + return GenericResult(success: true, data: null); } - /// Digital Ocean returns a map of lists of /proc/stat values, - /// so here we are trying to implement average CPU - /// load calculation for each point in time on a given interval. - /// - /// For each point of time: - /// - /// `Average Load = 100 * (1 - (Idle Load / Total Load))` - /// - /// For more info please proceed to read: - /// https://rosettacode.org/wiki/Linux_CPU_utilization - List calculateCpuLoadMetrics(final List rawProcStatMetrics) { - final List cpuLoads = []; - - final int pointsInTime = (rawProcStatMetrics[0]['values'] as List).length; - for (int i = 0; i < pointsInTime; ++i) { - double currentMetricLoad = 0.0; - double? currentMetricIdle; - for (final rawProcStat in rawProcStatMetrics) { - final String rawProcValue = rawProcStat['values'][i][1]; - // Converting MBit into bit - final double procValue = double.parse(rawProcValue) * 1000000; - currentMetricLoad += procValue; - if (currentMetricIdle == null && - rawProcStat['metric']['mode'] == 'idle') { - currentMetricIdle = procValue; - } - } - currentMetricIdle ??= 0.0; - currentMetricLoad = 100.0 * (1 - (currentMetricIdle / currentMetricLoad)); - cpuLoads.add( - TimeSeriesData( - rawProcStatMetrics[0]['values'][i][0], - currentMetricLoad, - ), - ); - } - - return cpuLoads; - } - - @override - Future getMetrics( + Future> getMetricsCpu( final int serverId, final DateTime start, final DateTime end, ) async { - ServerMetrics? metrics; + List metrics = []; - const int step = 15; final Dio client = await getClient(); try { - Response response = await client.get( - '/monitoring/metrics/droplet/bandwidth', - queryParameters: { - 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', - 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', - 'host_id': '$serverId', - 'interface': 'public', - 'direction': 'inbound', - }, - ); - - final List inbound = response.data['data']['result'][0]['values']; - - response = await client.get( - '/monitoring/metrics/droplet/bandwidth', - queryParameters: { - 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', - 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', - 'host_id': '$serverId', - 'interface': 'public', - 'direction': 'outbound', - }, - ); - - final List outbound = response.data['data']['result'][0]['values']; - - response = await client.get( + final Response response = await client.get( '/monitoring/metrics/droplet/cpu', queryParameters: { 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', @@ -605,122 +525,75 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'host_id': '$serverId', }, ); - - metrics = ServerMetrics( - bandwidthIn: inbound - .map( - (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), - ) - .toList(), - bandwidthOut: outbound - .map( - (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), - ) - .toList(), - cpu: calculateCpuLoadMetrics(response.data['data']['result']), - start: start, - end: end, - stepsInSecond: step, - ); + metrics = response.data['data']['result']; } catch (e) { print(e); + return GenericResult( + success: false, + data: [], + message: e.toString(), + ); } finally { close(client); } - return metrics; + return GenericResult(success: true, data: metrics); } - @override - Future> getMetadata(final int serverId) async { - List metadata = []; + Future> getMetricsBandwidth( + final int serverId, + final DateTime start, + final DateTime end, + final bool isInbound, + ) async { + List metrics = []; final Dio client = await getClient(); try { - final Response response = await client.get('/droplets/$serverId'); - final droplet = response.data!['droplet']; - metadata = [ - ServerMetadataEntity( - type: MetadataType.id, - name: 'server.server_id'.tr(), - value: droplet['id'].toString(), - ), - ServerMetadataEntity( - type: MetadataType.status, - name: 'server.status'.tr(), - value: droplet['status'].toString().capitalize(), - ), - ServerMetadataEntity( - type: MetadataType.cpu, - name: 'server.cpu'.tr(), - value: 'server.core_count'.plural(droplet['vcpus']), - ), - ServerMetadataEntity( - type: MetadataType.ram, - name: 'server.ram'.tr(), - value: "${droplet['memory'].toString()} MB", - ), - ServerMetadataEntity( - type: MetadataType.cost, - name: 'server.monthly_cost'.tr(), - value: droplet['size']['price_monthly'].toString(), - ), - ServerMetadataEntity( - type: MetadataType.location, - name: 'server.location'.tr(), - value: - '${droplet['region']['name']} ${getEmojiFlag(droplet['region']['slug'].toString()) ?? ''}', - ), - ServerMetadataEntity( - type: MetadataType.other, - name: 'server.provider'.tr(), - value: displayProviderName, - ), - ]; + final Response response = await client.get( + '/monitoring/metrics/droplet/bandwidth', + queryParameters: { + 'start': '${(start.microsecondsSinceEpoch / 1000000).round()}', + 'end': '${(end.microsecondsSinceEpoch / 1000000).round()}', + 'host_id': '$serverId', + 'interface': 'public', + 'direction': isInbound ? 'inbound' : 'outbound', + }, + ); + metrics = response.data['data']['result'][0]['values']; } catch (e) { print(e); + return GenericResult( + success: false, + data: [], + message: e.toString(), + ); } finally { close(client); } - return metadata; + return GenericResult(success: true, data: metrics); } - @override - Future> getServers() async { - List servers = []; + Future> getServers() async { + List servers = []; final Dio client = await getClient(); try { final Response response = await client.get('/droplets'); - servers = response.data!['droplets'].map( - (final server) { - String ipv4 = '0.0.0.0'; - if (server['networks']['v4'].isNotEmpty) { - for (final v4 in server['networks']['v4']) { - if (v4['type'].toString() == 'public') { - ipv4 = v4['ip_address'].toString(); - } - } - } - - return ServerBasicInfo( - id: server['id'], - reverseDns: server['name'], - created: DateTime.now(), - ip: ipv4, - name: server['name'], - ); - }, - ).toList(); + servers = response.data; } catch (e) { print(e); + return GenericResult( + success: false, + data: servers, + message: e.toString(), + ); } finally { close(client); } - print(servers); - return servers; + return GenericResult(success: true, data: servers); } Future> getAvailableLocations() async { @@ -769,21 +642,4 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return GenericResult(data: types, success: true); } - - @override - Future> createReverseDns({ - required final ServerHostingDetails serverDetails, - required final ServerDomain domain, - }) async { - /// TODO remove from provider interface - const bool success = true; - return GenericResult(success: success, data: null); - } - - @override - ProviderApiTokenValidation getApiTokenValidation() => - ProviderApiTokenValidation( - regexp: RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'), - length: 71, - ); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 42ec94bb..d1051b76 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -455,10 +455,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return GenericResult( - success: true, - data: null, - ); + return GenericResult(success: true, data: null); } Future> powerOn(final int serverId) async { @@ -476,10 +473,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { close(client); } - return GenericResult( - success: true, - data: null, - ); + return GenericResult(success: true, data: null); } Future>> getMetrics( diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index d94418cd..9538c6a4 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -1,7 +1,13 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/metrics.dart'; +import 'package:selfprivacy/logic/models/price.dart'; +import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/utils/extensions/string_extensions.dart'; class ApiAdapter { ApiAdapter({final String? region, final bool isWithToken = true}) @@ -149,7 +155,7 @@ class DigitalOceanServerProvider extends ServerProvider { ); } - final List rawTypes = result.data; + final List rawSizes = result.data; for (final rawSize in rawSizes) { for (final rawRegion in rawSize['regions']) { final ramMb = rawSize['memory'].toDouble(); @@ -174,4 +180,243 @@ class DigitalOceanServerProvider extends ServerProvider { return GenericResult(success: true, data: types); } + + Future>> getServers() async { + final List servers = []; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: servers, + code: result.code, + message: result.message, + ); + } + + final List rawServers = result.data; + rawServers.map( + (final server) { + String ipv4 = '0.0.0.0'; + if (server['networks']['v4'].isNotEmpty) { + for (final v4 in server['networks']['v4']) { + if (v4['type'].toString() == 'public') { + ipv4 = v4['ip_address'].toString(); + } + } + } + + return ServerBasicInfo( + id: server['id'], + reverseDns: server['name'], + created: DateTime.now(), + ip: ipv4, + name: server['name'], + ); + }, + ).toList(); + + return GenericResult(success: true, data: servers); + } + + Future>> getMetadata( + final int serverId, + ) async { + List metadata = []; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: false, + data: metadata, + code: result.code, + message: result.message, + ); + } + + final List servers = result.data; + try { + final droplet = servers.firstWhere( + (final server) => server['id'] == serverId, + ); + + metadata = [ + ServerMetadataEntity( + type: MetadataType.id, + trId: 'server.server_id', + value: droplet['id'].toString(), + ), + ServerMetadataEntity( + type: MetadataType.status, + trId: 'server.status', + value: droplet['status'].toString().capitalize(), + ), + ServerMetadataEntity( + type: MetadataType.cpu, + trId: 'server.cpu', + value: droplet['vcpus'].toString(), + ), + ServerMetadataEntity( + type: MetadataType.ram, + trId: 'server.ram', + value: "${droplet['memory'].toString()} MB", + ), + ServerMetadataEntity( + type: MetadataType.cost, + trId: 'server.monthly_cost', + value: droplet['size']['price_monthly'].toString(), + ), + ServerMetadataEntity( + type: MetadataType.location, + trId: 'server.location', + value: + '${droplet['region']['name']} ${getEmojiFlag(droplet['region']['slug'].toString()) ?? ''}', + ), + ServerMetadataEntity( + type: MetadataType.other, + trId: 'server.provider', + value: _adapter.api().displayProviderName, + ), + ]; + } catch (e) { + return GenericResult( + success: false, + data: [], + message: e.toString(), + ); + } + + return GenericResult(success: true, data: metadata); + } + + /// Digital Ocean returns a map of lists of /proc/stat values, + /// so here we are trying to implement average CPU + /// load calculation for each point in time on a given interval. + /// + /// For each point of time: + /// + /// `Average Load = 100 * (1 - (Idle Load / Total Load))` + /// + /// For more info please proceed to read: + /// https://rosettacode.org/wiki/Linux_CPU_utilization + List calculateCpuLoadMetrics(final List rawProcStatMetrics) { + final List cpuLoads = []; + + final int pointsInTime = (rawProcStatMetrics[0]['values'] as List).length; + for (int i = 0; i < pointsInTime; ++i) { + double currentMetricLoad = 0.0; + double? currentMetricIdle; + for (final rawProcStat in rawProcStatMetrics) { + final String rawProcValue = rawProcStat['values'][i][1]; + // Converting MBit into bit + final double procValue = double.parse(rawProcValue) * 1000000; + currentMetricLoad += procValue; + if (currentMetricIdle == null && + rawProcStat['metric']['mode'] == 'idle') { + currentMetricIdle = procValue; + } + } + currentMetricIdle ??= 0.0; + currentMetricLoad = 100.0 * (1 - (currentMetricIdle / currentMetricLoad)); + cpuLoads.add( + TimeSeriesData( + rawProcStatMetrics[0]['values'][i][0], + currentMetricLoad, + ), + ); + } + + return cpuLoads; + } + + @override + Future> getMetrics( + final int serverId, + final DateTime start, + final DateTime end, + ) async { + ServerMetrics? metrics; + + const int step = 15; + final inboundResult = await _adapter.api().getMetricsBandwidth( + serverId, + start, + end, + true, + ); + + if (inboundResult.data.isEmpty || !inboundResult.success) { + return GenericResult( + success: false, + data: null, + code: inboundResult.code, + message: inboundResult.message, + ); + } + + final outboundResult = await _adapter.api().getMetricsBandwidth( + serverId, + start, + end, + false, + ); + + if (outboundResult.data.isEmpty || !outboundResult.success) { + return GenericResult( + success: false, + data: null, + code: outboundResult.code, + message: outboundResult.message, + ); + } + + final cpuResult = await _adapter.api().getMetricsCpu(serverId, start, end); + + if (cpuResult.data.isEmpty || !cpuResult.success) { + return GenericResult( + success: false, + data: null, + code: cpuResult.code, + message: cpuResult.message, + ); + } + + metrics = ServerMetrics( + bandwidthIn: inboundResult.data + .map( + (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), + ) + .toList(), + bandwidthOut: outboundResult.data + .map( + (final el) => TimeSeriesData(el[0], double.parse(el[1]) * 100000), + ) + .toList(), + cpu: calculateCpuLoadMetrics(cpuResult.data), + start: start, + end: end, + stepsInSecond: step, + ); + + return GenericResult(success: true, data: metrics); + } + + @override + Future> restart(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().restart(serverId); + if (!result.success) { + return GenericResult( + success: false, + data: timestamp, + code: result.code, + message: result.message, + ); + } + + timestamp = DateTime.now(); + + return GenericResult( + success: true, + data: timestamp, + ); + } } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 43d60aec..41669a76 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -173,16 +173,6 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(success: true, data: types); } - Future> createReverseDns({ - required final ServerHostingDetails serverDetails, - required final ServerDomain domain, - }) async => - _adapter.api().createReverseDns( - serverId: serverDetails.id, - ip4: serverDetails.ip4, - dnsPtr: domain.domainName, - ); - Future>> getServers() async { final List servers = []; final result = await _adapter.api().getServers(); From 20dca20862d44da1706fc2a156a59c32a6e6ac2a Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Sun, 5 Mar 2023 11:51:12 +0000 Subject: [PATCH 423/732] Translated using Weblate (Polish) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 127 ++++++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 4 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index b235e826..18629305 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -324,7 +324,22 @@ "backblaze_bad_key_error": "Informacja o Blackbaze nieprawidłowa", "select_dns": "Teraz wybierz provajdera DNS", "manage_domain_dns": "Dla kierowania DNS", - "create_master_account": "Dodać konto administratora" + "create_master_account": "Dodać konto administratora", + "use_this_domain_text": "Podany token zapewnia kontrolę nad tą domeną", + "loading_domain_list": "Ładowanie listy domen", + "found_more_domains": "Znaleziono więcej niż jedną domenę, dla własnego bezpieczeństwa usuń niepotrzebne domeny", + "save_domain": "Zapisz domenę", + "final": "Ostatni krok", + "create_server": "Utwórz serwer", + "server_rebooted": "Serwer zrestartowany. Czekam na ostatnią weryfikację…", + "server_started": "Serwer działa. Teraz zostanie sprawdzony i zrestartowany…", + "server_created": "Serwer został utworzony. Sprawdzane są adresy DNS i serwer uruchamia się…", + "until_the_next_check": "Do następnej inspekcji: ", + "check": "Sprawdź", + "one_more_restart": "Teraz nastąpi dodatkowe ponowne uruchomienie komputera w celu aktywacji certyfikatów bezpieczeństwa.", + "enter_username_and_password": "Wprowadź nazwę użytkownika i złożone hasło", + "finish": "Wszystko jest inicjalizowane", + "checks": "Kontrole wykonane:\n{} / {}" }, "jobs": { "delete_ssh_key": "Wydalić SSH-klucz dla {}", @@ -334,7 +349,20 @@ "service_turn_off": "Wyłączyć", "service_turn_on": "Włączyć", "create_ssh_key": "Dodać SSH-klucz dla {}", - "generic_error": "Nie otrzyma się podłoczyć k serweru!" + "generic_error": "Nie otrzyma się podłoczyć k serweru!", + "title": "Zadania", + "start": "Rozpocząć wykonywanie", + "empty": "Nie ma zadań", + "job_added": "Zadanie dodane", + "run_jobs": "Uruchom zadania", + "reboot_success": "Serwer uruchamia się ponownie", + "config_pull_failed": "Aktualizacja konfiguracji serwera nie powiodła się. Rozpoczęto aktualizację oprogramowania.", + "upgrade_success": "Uruchomiono aktualizację serwera", + "upgrade_failed": "Aktualizacja serwera nie działa", + "upgrade_server": "Aktualizacja serwera", + "reboot_server": "Ponowne uruchomienie serwera", + "server_jobs": "Zadania na serwerze", + "reset_user_password": "Zresetuj hasło użytkownika" }, "modals": { "purge_all_keys": "Wydalić wszystkie kluczy autentyfikacji?", @@ -342,16 +370,107 @@ "dns_removal_error": "Nie otrzyma się wydalić zapis DNS.", "yes": "Tak", "no": "Nie", - "reboot": "Restart" + "reboot": "Restart", + "server_deletion_error": "Nie można usunąć serwera.", + "server_validators_error": "Nie udało się uzyskać listy serwerów.", + "already_exists": "Taki serwer już istnieje.", + "unexpected_error": "Nieprzewidywalny błąd po stronie świadczeniodawcy.", + "destroy_server": "Zniszczyć serwer i stworzyć nowy?", + "try_again": "Mam spróbować jeszcze raz?", + "purge_all_keys_confirm": "Tak, wymazać wszystkie klucze", + "delete_server_volume": "Usunąć serwer i pamięć masową?", + "you_cant_use_this_api": "Nie możesz użyć tego API dla domeny z podobnym TLD." }, "recovery_key": { "key_main_header": "Klucz odzyskania", "key_synchronizing": "Synchronizacja…", "key_receiving_done": "Zrobiono!", "key_replace_button": "Wytworzyć nowy klucz", - "generation_error": "Nie otrzyma się zrobić klucz odzyskania. {}" + "generation_error": "Nie otrzyma się zrobić klucz odzyskania. {}", + "key_connection_error": "Nie udało się połączyć z serwerem.", + "key_main_description": "Wymagane dla autoryzacji SelfPrivacy, gdy autoryzowane urządzenia są niedostępne.", + "key_amount_toggle": "Ograniczenie stosowania", + "key_amount_field_title": "Maks. liczba zastosowań", + "key_duedate_toggle": "Ograniczenie okresu użytkowania", + "key_duedate_field_title": "Data ważności", + "key_receive_button": "Zdobądź klucz", + "key_valid": "Twój klucz jest ważny", + "key_invalid": "Twój klucz jest już nieważny", + "key_valid_until": "Ważny do {}", + "key_valid_for": "Możesz użyć {} więcej razy", + "key_creation_date": "Utworzony {}", + "key_receiving_description": "Zapisz ten klucz w bezpiecznym miejscu. Dzięki niemu masz pełny dostęp do swojego serwera:", + "key_receiving_info": "Ten klucz nie będzie już pokazywany, ale możesz go zastąpić nowym." }, "timer": { "sec": "{} s" + }, + "recovering": { + "confirm_server_decline": "Wybierz inny serwer", + "domain_not_available_on_token": "Wprowadzony token nie ma dostępu do żądanej domeny.", + "confirm_cloudflare_description": "Podaj token Cloudflare, który ma prawa do {}:", + "method_recovery_input_description": "Wprowadź swój token odzyskiwania", + "fallback_select_provider_console": "Dostęp do konsoli hostingowej.", + "confirm_server_description": "Znalazłem serwer!!! Potwierdź, że to jest to:", + "confirm_server": "Potwierdzić serwer", + "modal_confirmation_title": "Czy to naprawdę twój serwer?", + "modal_confirmation_description": "Podłączenie się do niewłaściwego serwera może prowadzić do destrukcyjnych konsekwencji.", + "generic_error": "Błąd operacji, spróbuj ponownie.", + "recovery_main_header": "Podłączenie do istniejącego serwera", + "domain_recovery_description": "Wprowadź domenę, pod którą chcesz uzyskać dostęp do serwera:", + "domain_recover_placeholder": "Domena", + "domain_recover_error": "Nie można znaleźć serwera z tą domeną", + "method_device_description": "Otwórz aplikację na innym urządzeniu i otwórz ekran zarządzania urządzeniami. Naciśnij \"Dodaj urządzenie\", aby otrzymać token autoryzacji.", + "method_select_description": "Wybierz metodę wprowadzania danych:", + "method_select_other_device": "Mam dostęp na innym urządzeniu", + "method_select_recovery_key": "Mam klucz odzyskiwania", + "method_select_nothing": "Nie mam żadnego z nich", + "method_device_button": "Otrzymałem symbol", + "method_device_input_description": "Wprowadź swój token autoryzacyjny", + "method_device_input_placeholder": "Token", + "confirm_server_accept": "Tak, to on", + "choose_server": "Wybierz serwer", + "choose_server_description": "Nie można określić, z którym serwerem się komunikujesz.", + "no_servers": "Na Twoim koncie nie ma dostępnych serwerów.", + "modal_confirmation_dns_valid": "Odwrócony DNS jest prawidłowy", + "modal_confirmation_dns_invalid": "Odwrócony DNS wskazuje na inną domenę", + "modal_confirmation_ip_valid": "IP jest takie samo jak w rekordzie DNS", + "modal_confirmation_ip_invalid": "IP nie jest zgodne z tym w rekordzie DNS", + "confirm_cloudflare": "Łączenie się z Cloudflare", + "confirm_backblaze": "Podłączanie do Backblaze", + "confirm_backblaze_description": "Wpisz token Backblaze, który ma prawa do magazynu kopii zapasowych:", + "fallback_select_description": "Które z nich posiadasz? Wybierz pierwszą, która pasuje:", + "fallback_select_token_copy": "Kopia tokena autoryzacyjnego z innej wersji aplikacji.", + "fallback_select_root_ssh": "Dostęp Root do serwera poprzez SSH.", + "authorization_failed": "Nie udało się zalogować za pomocą tego klucza", + "fallback_select_provider_console_hint": "Hetzner, na przykład.", + "server_provider_connected": "Połączenie z dostawcą serwera", + "server_provider_connected_description": "Połączenie ustanowione. Podaj swój token z dostępem do {}:", + "server_provider_connected_placeholder": "Token dostawcy serwera" + }, + "devices": { + "main_screen": { + "description": "Urządzenia te mają pełny dostęp do zarządzania serwerem poprzez aplikację SelfPrivacy.", + "header": "Urządzenia", + "this_device": "To urządzenie", + "other_devices": "Inne urządzenia", + "authorize_new_device": "Autoryzacja nowego urządzenia", + "access_granted_on": "Dostęp przyznany {}", + "tip": "Naciśnij na urządzenie, aby cofnąć dostęp." + }, + "revoke_device_alert": { + "header": "Cofnąć dostęp?", + "description": "Urządzenie {} nie będzie już mogło kontrolować serwera.", + "yes": "Wycofaj się", + "no": "Anulować" + }, + "add_new_device_screen": { + "header": "Autoryzacja nowego urządzenia", + "description": "Wprowadź ten klucz na nowym urządzeniu:", + "please_wait": "Proszę czekać", + "tip": "Klucz jest ważny przez 10 minut.", + "expired": "Klucz stracił ważność.", + "get_new_key": "Uzyskaj nowy klucz" + } } } From bc9ab447f0e1478677a98699aee412e28fad7a36 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 9 Mar 2023 13:06:15 +0400 Subject: [PATCH 424/732] chore: Implement server deletion for hetzner on provider layer --- .../server_providers/hetzner/hetzner_api.dart | 60 +++++++++---------- .../providers/server_providers/hetzner.dart | 60 ++++++++++++++++++- 2 files changed, 85 insertions(+), 35 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index d1051b76..65e509c4 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -244,15 +244,25 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return volume; } - Future deleteVolume(final ServerVolume volume) async { + Future> deleteVolume(final int volumeId) async { final Dio client = await getClient(); try { - await client.delete('/volumes/${volume.id}'); + await client.delete('/volumes/$volumeId'); } catch (e) { print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); } finally { client.close(); } + + return GenericResult( + success: true, + data: null, + ); } Future> attachVolume( @@ -287,24 +297,32 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future detachVolume(final ServerVolume volume) async { + Future> detachVolume(final int volumeId) async { bool success = false; final Response detachVolumeResponse; final Dio client = await getClient(); try { detachVolumeResponse = await client.post( - '/volumes/${volume.id}/actions/detach', + '/volumes/$volumeId/actions/detach', ); success = detachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); + return GenericResult( + success: false, + data: false, + message: e.toString(), + ); } finally { client.close(); } - return success; + return GenericResult( + success: false, + data: success, + ); } Future resizeVolume( @@ -398,46 +416,24 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future> deleteServer({ - required final String domainName, + Future> deleteServer({ + required final int serverId, }) async { final Dio client = await getClient(); try { - final String hostname = getHostnameFromDomain(domainName); - - final Response serversReponse = await client.get('/servers'); - final List servers = serversReponse.data['servers']; - final Map server = - servers.firstWhere((final el) => el['name'] == hostname); - final List volumes = server['volumes']; - final List laterFutures = []; - - for (final volumeId in volumes) { - await client.post('/volumes/$volumeId/actions/detach'); - } - await Future.delayed(const Duration(seconds: 10)); - - for (final volumeId in volumes) { - laterFutures.add(client.delete('/volumes/$volumeId')); - } - laterFutures.add(client.delete('/servers/${server['id']}')); - - await Future.wait(laterFutures); + await client.delete('/servers/$serverId'); } catch (e) { print(e); return GenericResult( success: false, - data: false, + data: null, message: e.toString(), ); } finally { close(client); } - return GenericResult( - success: true, - data: true, - ); + return GenericResult(success: true, data: null); } Future> restart(final int serverId) async { diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 41669a76..1a1c2524 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -455,7 +455,7 @@ class HetznerServerProvider extends ServerProvider { ); if (!serverResult.success || serverResult.data == null) { - await _adapter.api().deleteVolume(volume); + await _adapter.api().deleteVolume(volume.id); await Future.delayed(const Duration(seconds: 5)); if (serverResult.message != null && serverResult.message == 'uniqueness_error') { @@ -549,7 +549,7 @@ class HetznerServerProvider extends ServerProvider { CallbackDialogueChoice( title: 'basis.try_again'.tr(), callback: () async { - await _adapter.api().deleteVolume(volume); + await _adapter.api().deleteVolume(volume.id); await Future.delayed(const Duration(seconds: 5)); final deletion = await deleteServer(hostname); if (deletion.success) { @@ -576,5 +576,59 @@ class HetznerServerProvider extends ServerProvider { Future> deleteServer( final String hostname, - ) async {} + ) async { + final serversResult = await _adapter.api().getServers(); + try { + final servers = serversResult.data; + HetznerServerInfo? foundServer; + for (final server in servers) { + if (server.name == hostname) { + foundServer = server; + break; + } + } + + for (final volumeId in foundServer!.volumes) { + await _adapter.api().detachVolume(volumeId); + } + + await Future.delayed(const Duration(seconds: 10)); + final List laterFutures = []; + + for (final volumeId in foundServer.volumes) { + laterFutures.add(_adapter.api().deleteVolume(volumeId)); + } + laterFutures.add(_adapter.api().deleteVolume(foundServer.id)); + + await Future.wait(laterFutures); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'basis.try_again'.tr(), + callback: () async { + await Future.delayed(const Duration(seconds: 5)); + return deleteServer(hostname); + }, + ), + ], + description: 'modals.try_again'.tr(), + title: 'modals.server_deletion_error'.tr(), + ), + message: e.toString(), + ); + } + + return GenericResult( + success: true, + data: null, + ); + } } From 7b543f9030221e2d7892cb1925efc7f734e1e3fe Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 10 Mar 2023 00:47:02 +0400 Subject: [PATCH 425/732] chore: Implement server deletion for digital ocean on provider level --- .../digital_ocean/digital_ocean_api.dart | 50 ++------------- .../server_providers/digital_ocean.dart | 64 +++++++++++++++++++ .../providers/server_providers/hetzner.dart | 2 +- 3 files changed, 69 insertions(+), 47 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 3f886597..fabeac24 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -402,64 +402,22 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - @override - Future> deleteServer({ - required final String domainName, - }) async { + Future> deleteServer(final int serverId) async { final Dio client = await getClient(); - - final String hostname = getHostnameFromDomain(domainName); - final servers = await getServers(); - final ServerBasicInfo serverToRemove; try { - serverToRemove = servers.firstWhere( - (final el) => el.name == hostname, - ); - } catch (e) { - print(e); - return GenericResult( - data: false, - success: false, - message: e.toString(), - ); - } - - final volumes = await getVolumes(); - final ServerVolume volumeToRemove; - try { - volumeToRemove = volumes.firstWhere( - (final el) => el.serverId == serverToRemove.id, - ); - } catch (e) { - print(e); - return GenericResult( - data: false, - success: false, - message: e.toString(), - ); - } - - final List laterFutures = []; - - await detachVolume(volumeToRemove); - await Future.delayed(const Duration(seconds: 10)); - - try { - laterFutures.add(deleteVolume(volumeToRemove)); - laterFutures.add(client.delete('/droplets/${serverToRemove.id}')); - await Future.wait(laterFutures); + await client.delete('/droplets/$serverId'); } catch (e) { print(e); return GenericResult( success: false, - data: false, + data: null, message: e.toString(), ); } finally { close(client); } - return GenericResult(success: true, data: true); + return GenericResult(success: true, data: null); } Future> restart(final int serverId) async { diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 9538c6a4..b8bc3ab1 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -1,5 +1,8 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart'; +import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; @@ -8,6 +11,7 @@ import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/server_provider.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; class ApiAdapter { ApiAdapter({final String? region, final bool isWithToken = true}) @@ -419,4 +423,64 @@ class DigitalOceanServerProvider extends ServerProvider { data: timestamp, ); } + + Future> deleteServer( + final String hostname, + ) async { + final String deletionName = getHostnameFromDomain(hostname); + final serversResult = await getServers(); + try { + final servers = serversResult.data; + ServerBasicInfo? foundServer; + for (final server in servers) { + if (server.name == deletionName) { + foundServer = server; + break; + } + } + + final volumes = await _adapter.api().getVolumes(); + final ServerVolume volumeToRemove; + volumeToRemove = volumes.firstWhere( + (final el) => el.serverId == foundServer!.id, + ); + + await _adapter.api().detachVolume(volumeToRemove); + + await Future.delayed(const Duration(seconds: 10)); + final List laterFutures = []; + laterFutures.add(_adapter.api().deleteVolume(volumeToRemove)); + laterFutures.add(_adapter.api().deleteServer(foundServer!.id)); + + await Future.wait(laterFutures); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'basis.try_again'.tr(), + callback: () async { + await Future.delayed(const Duration(seconds: 5)); + return deleteServer(hostname); + }, + ), + ], + description: 'modals.try_again'.tr(), + title: 'modals.server_deletion_error'.tr(), + ), + message: e.toString(), + ); + } + + return GenericResult( + success: true, + data: null, + ); + } } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 1a1c2524..400701ff 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -598,7 +598,7 @@ class HetznerServerProvider extends ServerProvider { for (final volumeId in foundServer.volumes) { laterFutures.add(_adapter.api().deleteVolume(volumeId)); } - laterFutures.add(_adapter.api().deleteVolume(foundServer.id)); + laterFutures.add(_adapter.api().deleteServer(serverId: foundServer.id)); await Future.wait(laterFutures); } catch (e) { From f264b309d7879c1b315674b8fa8ed2e11e9e1014 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Thu, 9 Mar 2023 11:04:55 +0000 Subject: [PATCH 426/732] Translated using Weblate (Polish) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 18629305..1380e907 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -53,8 +53,8 @@ }, "about_application_page": { "title": "O aplikacji", - "application_version_text": "Wersja aplikacji v.{}", - "api_version_text": "Wersja API serwera v.{}", + "application_version_text": "Wersja aplikacji {}", + "api_version_text": "Wersja API serwera {}", "privacy_policy": "Polityka prywatności" }, "application_settings": { @@ -411,7 +411,7 @@ "confirm_cloudflare_description": "Podaj token Cloudflare, który ma prawa do {}:", "method_recovery_input_description": "Wprowadź swój token odzyskiwania", "fallback_select_provider_console": "Dostęp do konsoli hostingowej.", - "confirm_server_description": "Znalazłem serwer!!! Potwierdź, że to jest to:", + "confirm_server_description": "Znalazłem twój serwer! Potwierdź, że jest to właściwe:", "confirm_server": "Potwierdzić serwer", "modal_confirmation_title": "Czy to naprawdę twój serwer?", "modal_confirmation_description": "Podłączenie się do niewłaściwego serwera może prowadzić do destrukcyjnych konsekwencji.", @@ -443,7 +443,7 @@ "fallback_select_token_copy": "Kopia tokena autoryzacyjnego z innej wersji aplikacji.", "fallback_select_root_ssh": "Dostęp Root do serwera poprzez SSH.", "authorization_failed": "Nie udało się zalogować za pomocą tego klucza", - "fallback_select_provider_console_hint": "Hetzner, na przykład.", + "fallback_select_provider_console_hint": "Na przykład: Hetzner.", "server_provider_connected": "Połączenie z dostawcą serwera", "server_provider_connected_description": "Połączenie ustanowione. Podaj swój token z dostępem do {}:", "server_provider_connected_placeholder": "Token dostawcy serwera" From e7ca94fd0a27583fde66cc5e7945e3e95a855a8d Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Sun, 12 Mar 2023 20:52:41 +0000 Subject: [PATCH 427/732] Translated using Weblate (Polish) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 1380e907..f6187f8c 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -125,7 +125,7 @@ "allow_autoupgrade": "Zezwalaj na automatyczne aktualizacje", "reboot_after_upgrade_hint": "Automatycznie uruchom ponownie serwer po zastosowaniu aktualizacji", "select_timezone": "Wybierz swoją strefę czasową", - "timezone_search_bar": "Nazwa strefy czasowej lub wartość przesunięcia czasu" + "timezone_search_bar": "Nazwa strefy czasowej lub znaczenie przesunięcia czasowego" }, "record": { "root": "Domena główna", @@ -159,8 +159,8 @@ "card_title": "Utworzyć kopię zapasową", "description": "Pomoże Ci w każdej sytuacji: atak hakerski, usunięcie serwera, itp.", "reupload_key": "Wymuś aktualizację klucza", - "reuploaded_key": "Zaktualizowano klucz na serwerze", - "initialize": "Inicjalizacja", + "reuploaded_key": "Klucz na serwerze został zaktualizowany", + "initialize": "Nastawić", "restore": "Przywróć z kopii", "no_backups": "Nie ma jeszcze żadnych kopii zapasowych", "create_new": "Utwórz nową kopię", @@ -182,7 +182,7 @@ "gb": "{} GB", "mb": "{} MB", "kb": "{} KB", - "bytes": "Bajty", + "bytes": "Bajt", "extend_volume_button": "Rozwiń pamięć", "extending_volume_title": "Rozszerzenie pamięci", "extending_volume_price_info": "Cena zawiera podatek VAT i jest oparta na danych cenowych dostarczonych przez firmę Hetzner. Serwer zostanie zrestartowany w trakcie procesu.", From d7a067474efaada516113a5278f29be48a1ee0ed Mon Sep 17 00:00:00 2001 From: Thary Date: Tue, 14 Mar 2023 16:23:02 +0000 Subject: [PATCH 428/732] Translated using Weblate (Polish) Currently translated at 100.0% (400 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index f6187f8c..21b53f62 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -323,7 +323,7 @@ "what": "Co to znaczy?", "backblaze_bad_key_error": "Informacja o Blackbaze nieprawidłowa", "select_dns": "Teraz wybierz provajdera DNS", - "manage_domain_dns": "Dla kierowania DNS", + "manage_domain_dns": "Dla kirowania DNS", "create_master_account": "Dodać konto administratora", "use_this_domain_text": "Podany token zapewnia kontrolę nad tą domeną", "loading_domain_list": "Ładowanie listy domen", From dde6f7e80d20a68bb838970f22e09fda50a08ccf Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 20 Mar 2023 12:22:43 -0300 Subject: [PATCH 429/732] chore: Move volume functions to provider layer for Hetzner --- .../server_providers/hetzner/hetzner_api.dart | 60 +++------ .../providers/server_providers/hetzner.dart | 120 ++++++++++++++++++ 2 files changed, 140 insertions(+), 40 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 65e509c4..8e67b188 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -11,7 +11,6 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; -import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { @@ -129,9 +128,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future> createVolume() async { - ServerVolume? volume; - + Future createVolume() async { Response? createVolumeResponse; final Dio client = await getClient(); try { @@ -146,18 +143,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'format': 'ext4' }, ); - final volumeId = createVolumeResponse.data['volume']['id']; - final volumeSize = createVolumeResponse.data['volume']['size']; - final volumeServer = createVolumeResponse.data['volume']['server']; - final volumeName = createVolumeResponse.data['volume']['name']; - final volumeDevice = createVolumeResponse.data['volume']['linux_device']; - volume = ServerVolume( - id: volumeId, - name: volumeName, - sizeByte: volumeSize, - serverId: volumeServer, - linuxDevice: volumeDevice, - ); } catch (e) { print(e); return GenericResult( @@ -170,17 +155,17 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } return GenericResult( - data: volume, + data: createVolumeResponse.data, success: true, code: createVolumeResponse.statusCode, message: createVolumeResponse.statusMessage, ); } - Future> getVolumes({final String? status}) async { - final List volumes = []; + Future> getVolumes({final String? status}) async { + List volumes = []; - final Response getVolumesResonse; + Response? getVolumesResonse; final Dio client = await getClient(); try { getVolumesResonse = await client.get( @@ -189,29 +174,24 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'status': status, }, ); - final List rawVolumes = getVolumesResonse.data['volumes']; - for (final rawVolume in rawVolumes) { - final int volumeId = rawVolume['id']; - final int volumeSize = rawVolume['size'] * 1024 * 1024 * 1024; - final volumeServer = rawVolume['server']; - final String volumeName = rawVolume['name']; - final volumeDevice = rawVolume['linux_device']; - final volume = ServerVolume( - id: volumeId, - name: volumeName, - sizeByte: volumeSize, - serverId: volumeServer, - linuxDevice: volumeDevice, - ); - volumes.add(volume); - } + volumes = getVolumesResonse.data['volumes']; } catch (e) { print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); } finally { client.close(); } - return volumes; + return GenericResult( + data: volumes, + success: true, + code: getVolumesResonse.statusCode, + message: getVolumesResonse.statusMessage, + ); } Future getVolume( @@ -244,7 +224,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return volume; } - Future> deleteVolume(final int volumeId) async { + Future> deleteVolume(final int volumeId) async { final Dio client = await getClient(); try { await client.delete('/volumes/$volumeId'); @@ -252,7 +232,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { print(e); return GenericResult( success: false, - data: null, + data: false, message: e.toString(), ); } finally { @@ -261,7 +241,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return GenericResult( success: true, - data: null, + data: true, ); } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 400701ff..33894f3d 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -631,4 +631,124 @@ class HetznerServerProvider extends ServerProvider { data: null, ); } + + Future> createVolume() async { + ServerVolume? volume; + + final result = await _adapter.api().createVolume(); + + if (!result.success || result.data == null) { + return GenericResult( + data: null, + success: false, + message: result.message, + code: result.code, + ); + } + + try { + final volumeId = result.data['volume']['id']; + final volumeSize = result.data['volume']['size']; + final volumeServer = result.data['volume']['server']; + final volumeName = result.data['volume']['name']; + final volumeDevice = result.data['volume']['linux_device']; + volume = ServerVolume( + id: volumeId, + name: volumeName, + sizeByte: volumeSize, + serverId: volumeServer, + linuxDevice: volumeDevice, + ); + } catch (e) { + print(e); + return GenericResult( + data: null, + success: false, + message: e.toString(), + ); + } + + return GenericResult( + data: volume, + success: true, + code: result.code, + message: result.message, + ); + } + + Future>> getVolumes({ + final String? status, + }) async { + final List volumes = []; + + final result = await _adapter.api().getVolumes(); + + if (!result.success) { + return GenericResult( + data: [], + success: false, + message: result.message, + code: result.code, + ); + } + + try { + for (final rawVolume in result.data) { + final int volumeId = rawVolume['id']; + final int volumeSize = rawVolume['size'] * 1024 * 1024 * 1024; + final volumeServer = rawVolume['server']; + final String volumeName = rawVolume['name']; + final volumeDevice = rawVolume['linux_device']; + final volume = ServerVolume( + id: volumeId, + name: volumeName, + sizeByte: volumeSize, + serverId: volumeServer, + linuxDevice: volumeDevice, + ); + volumes.add(volume); + } + } catch (e) { + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + + return GenericResult( + data: volumes, + success: true, + code: result.code, + message: result.message, + ); + } + + Future> deleteVolume(final int volumeId) async => + _adapter.api().deleteVolume(volumeId); + + Future> attachVolume( + final ServerVolume volume, + final int serverId, + ) async => + _adapter.api().attachVolume( + volume, + serverId, + ); + + Future> detachVolume( + final int volumeId, + ) async => + _adapter.api().detachVolume( + volumeId, + ); + + Future resizeVolume( + final ServerVolume volume, + final DiskSize size, + ) async => + _adapter.api().resizeVolume( + volume, + size, + ); } From 4e4b61609fc9a61fe86bb294e30d9c7f97893e78 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 21 Mar 2023 13:08:46 -0300 Subject: [PATCH 430/732] chore: Move volume functions to provider layer for Digital Ocean --- .../digital_ocean/digital_ocean_api.dart | 119 ++++++------- .../server_providers/digital_ocean.dart | 163 +++++++++++++++++- 2 files changed, 215 insertions(+), 67 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index fabeac24..0d25dc2b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -107,13 +107,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { currency: 'USD', ); - Future> createVolume() async { - ServerVolume? volume; - + Future createVolume() async { Response? createVolumeResponse; final Dio client = await getClient(); try { - final List volumes = await getVolumes(); await Future.delayed(const Duration(seconds: 6)); createVolumeResponse = await client.post( @@ -126,17 +123,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'filesystem_type': 'ext4', }, ); - final volumeId = createVolumeResponse.data['volume']['id']; - final volumeSize = createVolumeResponse.data['volume']['size_gigabytes']; - final volumeName = createVolumeResponse.data['volume']['name']; - volume = ServerVolume( - id: volumes.length, - name: volumeName, - sizeByte: volumeSize, - serverId: null, - linuxDevice: '/dev/disk/by-id/scsi-0DO_Volume_$volumeName', - uuid: volumeId, - ); } catch (e) { print(e); return GenericResult( @@ -149,17 +135,17 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } return GenericResult( - data: volume, + data: createVolumeResponse.data, success: true, code: createVolumeResponse.statusCode, message: createVolumeResponse.statusMessage, ); } - Future> getVolumes({final String? status}) async { - final List volumes = []; + Future> getVolumes({final String? status}) async { + List volumes = []; - final Response getVolumesResponse; + Response? getVolumesResponse; final Dio client = await getClient(); try { getVolumesResponse = await client.get( @@ -168,59 +154,47 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'status': status, }, ); - final List rawVolumes = getVolumesResponse.data['volumes']; - int id = 0; - for (final rawVolume in rawVolumes) { - final volumeId = rawVolume['id']; - final int volumeSize = rawVolume['size_gigabytes'] * 1024 * 1024 * 1024; - final volumeDropletIds = rawVolume['droplet_ids']; - final String volumeName = rawVolume['name']; - final volume = ServerVolume( - id: id++, - name: volumeName, - sizeByte: volumeSize, - serverId: volumeDropletIds.isNotEmpty ? volumeDropletIds[0] : null, - linuxDevice: 'scsi-0DO_Volume_$volumeName', - uuid: volumeId, - ); - volumes.add(volume); - } + volumes = getVolumesResponse.data['volumes']; } catch (e) { print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); } finally { client.close(); } - return volumes; + return GenericResult( + data: volumes, + success: false, + ); } - Future getVolume(final String volumeUuid) async { - ServerVolume? requestedVolume; - - final List volumes = await getVolumes(); - - for (final volume in volumes) { - if (volume.uuid == volumeUuid) { - requestedVolume = volume; - } - } - - return requestedVolume; - } - - Future deleteVolume(final ServerVolume volume) async { + Future> deleteVolume(final String uuid) async { final Dio client = await getClient(); try { - await client.delete('/volumes/${volume.uuid}'); + await client.delete('/volumes/$uuid'); } catch (e) { print(e); + return GenericResult( + data: null, + success: false, + message: e.toString(), + ); } finally { client.close(); } + + return GenericResult( + data: null, + success: true, + ); } Future> attachVolume( - final ServerVolume volume, + final String name, final int serverId, ) async { bool success = false; @@ -232,7 +206,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/volumes/actions', data: { 'type': 'attach', - 'volume_name': volume.name, + 'volume_name': name, 'region': region, 'droplet_id': serverId, }, @@ -258,7 +232,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - Future detachVolume(final ServerVolume volume) async { + Future> detachVolume( + final String name, + final int serverId, + ) async { bool success = false; final Response detachVolumeResponse; @@ -268,8 +245,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/volumes/actions', data: { 'type': 'detach', - 'volume_name': volume.name, - 'droplet_id': volume.serverId, + 'volume_name': name, + 'droplet_id': serverId, 'region': region, }, ); @@ -277,15 +254,23 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { detachVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); + return GenericResult( + data: false, + success: false, + message: e.toString(), + ); } finally { client.close(); } - return success; + return GenericResult( + data: success, + success: true, + ); } - Future resizeVolume( - final ServerVolume volume, + Future> resizeVolume( + final String name, final DiskSize size, ) async { bool success = false; @@ -297,7 +282,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/volumes/actions', data: { 'type': 'resize', - 'volume_name': volume.name, + 'volume_name': name, 'size_gigabytes': size.gibibyte, 'region': region, }, @@ -306,11 +291,19 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { resizeVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); + return GenericResult( + data: false, + success: false, + message: e.toString(), + ); } finally { client.close(); } - return success; + return GenericResult( + data: success, + success: true, + ); } Future> createServer({ diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index b8bc3ab1..df7af648 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -439,17 +439,20 @@ class DigitalOceanServerProvider extends ServerProvider { } } - final volumes = await _adapter.api().getVolumes(); + final volumes = await getVolumes(); final ServerVolume volumeToRemove; - volumeToRemove = volumes.firstWhere( + volumeToRemove = volumes.data.firstWhere( (final el) => el.serverId == foundServer!.id, ); - await _adapter.api().detachVolume(volumeToRemove); + await _adapter.api().detachVolume( + volumeToRemove.name, + volumeToRemove.serverId!, + ); await Future.delayed(const Duration(seconds: 10)); final List laterFutures = []; - laterFutures.add(_adapter.api().deleteVolume(volumeToRemove)); + laterFutures.add(_adapter.api().deleteVolume(volumeToRemove.uuid!)); laterFutures.add(_adapter.api().deleteServer(foundServer!.id)); await Future.wait(laterFutures); @@ -483,4 +486,156 @@ class DigitalOceanServerProvider extends ServerProvider { data: null, ); } + + Future>> getVolumes({ + final String? status, + }) async { + final List volumes = []; + + final result = await _adapter.api().getVolumes(); + + if (!result.success || result.data.isEmpty) { + return GenericResult( + data: [], + success: false, + code: result.code, + message: result.message, + ); + } + + try { + int id = 0; + for (final rawVolume in result.data) { + final volumeId = rawVolume['id']; + final int volumeSize = rawVolume['size_gigabytes'] * 1024 * 1024 * 1024; + final volumeDropletIds = rawVolume['droplet_ids']; + final String volumeName = rawVolume['name']; + final volume = ServerVolume( + id: id++, + name: volumeName, + sizeByte: volumeSize, + serverId: volumeDropletIds.isNotEmpty ? volumeDropletIds[0] : null, + linuxDevice: 'scsi-0DO_Volume_$volumeName', + uuid: volumeId, + ); + volumes.add(volume); + } + } catch (e) { + print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + + return GenericResult( + data: volumes, + success: true, + ); + } + + Future> createVolume() async { + ServerVolume? volume; + + final result = await _adapter.api().createVolume(); + + if (!result.success || result.data == null) { + return GenericResult( + data: null, + success: false, + code: result.code, + message: result.message, + ); + } + + final getVolumesResult = await _adapter.api().getVolumes(); + + if (!getVolumesResult.success || getVolumesResult.data.isEmpty) { + return GenericResult( + data: null, + success: false, + code: result.code, + message: result.message, + ); + } + + final volumeId = result.data['volume']['id']; + final volumeSize = result.data['volume']['size_gigabytes']; + final volumeName = result.data['volume']['name']; + volume = ServerVolume( + id: getVolumesResult.data.length, + name: volumeName, + sizeByte: volumeSize, + serverId: null, + linuxDevice: '/dev/disk/by-id/scsi-0DO_Volume_$volumeName', + uuid: volumeId, + ); + + return GenericResult( + data: volume, + success: true, + ); + } + + Future> getVolume( + final String volumeUuid, + ) async { + ServerVolume? requestedVolume; + + final result = await getVolumes(); + + if (!result.success || result.data.isEmpty) { + return GenericResult( + data: null, + success: false, + code: result.code, + message: result.message, + ); + } + + for (final volume in result.data) { + if (volume.uuid == volumeUuid) { + requestedVolume = volume; + } + } + + return GenericResult( + data: requestedVolume, + success: true, + ); + } + + Future> deleteVolume( + final ServerVolume volume, + ) async => + _adapter.api().deleteVolume( + volume.uuid!, + ); + + Future> attachVolume( + final ServerVolume volume, + final int serverId, + ) async => + _adapter.api().attachVolume( + volume.name, + serverId, + ); + + Future> detachVolume( + final ServerVolume volume, + ) async => + _adapter.api().detachVolume( + volume.name, + volume.serverId!, + ); + + Future> resizeVolume( + final ServerVolume volume, + final DiskSize size, + ) async => + _adapter.api().resizeVolume( + volume.name, + size, + ); } From 7b2540640fd9ab133e4eac7dde06de472514651a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 22 Mar 2023 21:28:16 -0300 Subject: [PATCH 431/732] chore: Rewrite server installation function on api level for Digital Ocean --- .../digital_ocean/digital_ocean_api.dart | 56 ++++++++++++++++- lib/logic/providers/server_provider.dart | 1 + .../server_providers/digital_ocean.dart | 60 +++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 0d25dc2b..264f227d 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -306,7 +306,61 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - Future> createServer({ + Future createServer({ + required final String dnsApiToken, + required final String dnsProviderType, + required final String serverApiToken, + required final User rootUser, + required final String base64Password, + required final String databasePassword, + required final String domainName, + required final String hostName, + required final int volumeId, + required final String serverType, + }) async { + final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; + + Response? serverCreateResponse; + final Dio client = await getClient(); + try { + final Map data = { + 'name': hostName, + 'size': serverType, + 'image': 'ubuntu-20-04-x64', + 'user_data': '#cloud-config\n' + 'runcmd:\n' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/digital-ocean/nixos-infect | ' + "PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' DOMAIN='$domainName' " + "LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword " + 'API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | tee /tmp/infect.log', + 'region': region!, + }; + print('Decoded data: $data'); + + serverCreateResponse = await client.post( + '/droplets', + data: data, + ); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult( + data: serverCreateResponse, + success: true, + code: serverCreateResponse.statusCode, + message: serverCreateResponse.statusMessage, + ); + } + + Future> creatfgdfeServer({ required final String dnsApiToken, required final User rootUser, required final String domainName, diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index 519307e8..7a2f4a02 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -6,6 +6,7 @@ import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; +export 'package:selfprivacy/logic/models/launch_installation_data.dart'; abstract class ServerProvider { Future> trySetServerLocation(final String location); diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index df7af648..4393f80e 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -1,8 +1,11 @@ +import 'dart:convert'; + import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart'; import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; @@ -12,6 +15,7 @@ import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/server_provider.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/network_utils.dart'; +import 'package:selfprivacy/utils/password_generator.dart'; class ApiAdapter { ApiAdapter({final String? region, final bool isWithToken = true}) @@ -111,6 +115,62 @@ class DigitalOceanServerProvider extends ServerProvider { return emoji; } + String dnsProviderToInfectName(final DnsProviderType dnsProvider) { + String dnsProviderType; + switch (dnsProvider) { + case DnsProviderType.digitalOcean: + dnsProviderType = 'DIGITALOCEAN'; + break; + case DnsProviderType.cloudflare: + default: + dnsProviderType = 'CLOUDFLARE'; + break; + } + return dnsProviderType; + } + + @override + Future> launchInstallation( + final LaunchInstallationData installationData, + ) async { + final serverResult = await _adapter.api().createServer( + dnsApiToken: installationData.dnsApiToken, + rootUser: installationData.rootUser, + domainName: installationData.domainName, + serverType: installationData.serverTypeId, + dnsProviderType: + dnsProviderToInfectName(installationData.dnsProviderType), + hostName: getHostnameFromDomain(installationData.domainName), + base64Password: base64.encode( + utf8.encode(installationData.rootUser.password ?? 'PASS'), + ), + databasePassword: StringGenerators.dbPassword(), + serverApiToken: StringGenerators.apiToken(), + ); + + if (!serverResult.success || serverResult.data == null) { + GenericResult( + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: await installationData.errorCallback(), + ), + CallbackDialogueChoice( + title: 'basis.try_again'.tr(), + callback: () async => launchInstallation(installationData), + ), + ], + description: serverResult.message ?? 'recovering.generic_error'.tr(), + title: 'modals.unexpected_error'.tr(), + ), + success: false, + message: serverResult.message, + code: serverResult.code, + ); + } + } + @override Future>> getAvailableLocations() async { From 768d5ff2267a346f8ccff64b96985e1a2ce922d1 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 7 Feb 2023 11:35:00 +0300 Subject: [PATCH 432/732] chore(dependencies): Remove share_plus, add auto_route and flutter_adaptive_scaffold --- macos/Flutter/GeneratedPluginRegistrant.swift | 2 - pubspec.lock | 56 +++++++++++-------- pubspec.yaml | 5 +- .../flutter/generated_plugin_registrant.cc | 3 - windows/flutter/generated_plugins.cmake | 1 - 5 files changed, 36 insertions(+), 31 deletions(-) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index b3e22002..6140a508 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -11,7 +11,6 @@ import dynamic_color import flutter_secure_storage_macos import package_info import path_provider_foundation -import share_plus import shared_preferences_foundation import url_launcher_macos import wakelock_macos @@ -23,7 +22,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 4ffd3c72..39fcd88f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -17,6 +17,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.4.0" + animations: + dependency: "direct main" + description: + name: animations + sha256: fe8a6bdca435f718bb1dc8a11661b2c22504c6da40ef934cee8327ed77934164 + url: "https://pub.dev" + source: hosted + version: "2.0.7" archive: dependency: transitive description: @@ -41,6 +49,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.10.0" + auto_route: + dependency: "direct main" + description: + name: auto_route + sha256: "12047baeca0e01df93165ef33275b32119d72699ab9a49dc64c20e78f586f96d" + url: "https://pub.dev" + source: hosted + version: "5.0.4" + auto_route_generator: + dependency: "direct dev" + description: + name: auto_route_generator + sha256: de5bfbc02ae4eebb339dd90d325749ae7536e903f6513ef72b88954072d72b0e + url: "https://pub.dev" + source: hosted + version: "5.0.3" auto_size_text: dependency: "direct main" description: @@ -209,14 +233,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.6.2" - cross_file: - dependency: transitive - description: - name: cross_file - sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" - url: "https://pub.dev" - source: hosted - version: "0.3.3+4" crypt: dependency: "direct main" description: @@ -374,6 +390,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_adaptive_scaffold: + dependency: "direct main" + description: + name: flutter_adaptive_scaffold + sha256: d5842a235ec810320c7e6dac282876d93bccf231201be6e684b016cd717c0576 + url: "https://pub.dev" + source: hosted + version: "0.1.0" flutter_bloc: dependency: "direct main" description: @@ -1045,22 +1069,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.27.7" - share_plus: - dependency: "direct main" - description: - name: share_plus - sha256: e387077716f80609bb979cd199331033326033ecd1c8f200a90c5f57b1c9f55e - url: "https://pub.dev" - source: hosted - version: "6.3.0" - share_plus_platform_interface: - dependency: transitive - description: - name: share_plus_platform_interface - sha256: "82ddd4ab9260c295e6e39612d4ff00390b9a7a21f1bb1da771e2f232d80ab8a1" - url: "https://pub.dev" - source: hosted - version: "3.2.0" shared_preferences: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 407089e8..5e12d900 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,6 +8,8 @@ environment: flutter: ">=3.7.0" dependencies: + animations: ^2.0.7 + auto_route: ^5.0.4 auto_size_text: ^3.0.0 basic_utils: ^5.4.2 crypt: ^4.2.1 @@ -21,6 +23,7 @@ dependencies: fl_chart: ^0.50.1 flutter: sdk: flutter + flutter_adaptive_scaffold: ^0.1.0 flutter_bloc: ^8.1.1 flutter_markdown: ^0.6.13+1 flutter_secure_storage: ^7.0.1 @@ -44,12 +47,12 @@ dependencies: pretty_dio_logger: ^1.2.0-beta-1 provider: ^6.0.5 pub_semver: ^2.1.3 - share_plus: ^6.3.0 timezone: ^0.9.1 url_launcher: ^6.1.8 wakelock: ^0.6.2 dev_dependencies: + auto_route_generator: ^5.0.3 flutter_test: sdk: flutter build_runner: ^2.3.3 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 2d280636..4ff4b899 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -10,7 +10,6 @@ #include #include #include -#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { @@ -22,8 +21,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); LocalAuthPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("LocalAuthPlugin")); - SharePlusWindowsPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b4df792f..ae5ef358 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -7,7 +7,6 @@ list(APPEND FLUTTER_PLUGIN_LIST dynamic_color flutter_secure_storage_windows local_auth_windows - share_plus url_launcher_windows ) From 8fc229647fd70a56f855c874f4f503fc11885a61 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 23 Feb 2023 17:36:26 +0300 Subject: [PATCH 433/732] feat: Add Support drawer and basic support cubit. --- .editorconfig | 3 ++ assets/translations/en.json | 18 +++++++ lib/config/bloc_config.dart | 7 +++ .../support_system/support_system_cubit.dart | 19 +++++++ .../support_system/support_system_state.dart | 12 +++++ .../support_drawer/support_drawer.dart | 52 +++++++++++++++++++ pubspec.lock | 8 --- pubspec.yaml | 1 - shell.nix | 35 +++++++++++++ 9 files changed, 146 insertions(+), 9 deletions(-) create mode 100644 lib/logic/cubit/support_system/support_system_cubit.dart create mode 100644 lib/logic/cubit/support_system/support_system_state.dart create mode 100644 lib/ui/components/support_drawer/support_drawer.dart create mode 100644 shell.nix diff --git a/.editorconfig b/.editorconfig index 80a3e35b..206f5ceb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,3 +14,6 @@ max_line_length = 150 [*.md] trim_trailing_whitespace = false + +[*.json] +indent_size = 4 diff --git a/assets/translations/en.json b/assets/translations/en.json index c849e266..d5adf64d 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -2,6 +2,7 @@ "test": "en-test", "locale": "en", "basis": { + "app_name": "SelfPrivacy", "providers": "Providers", "providers_title": "Your Data Center", "select": "Select", @@ -59,8 +60,11 @@ }, "application_settings": { "title": "Application settings", + "system_dark_theme_title": "System default theme", + "system_dark_theme_description": "Use light or dark theme depending on system settings", "dark_theme_title": "Dark theme", "dark_theme_description": "Switch your application theme", + "dangerous_settings": "Dangerous settings", "reset_config_title": "Reset application config", "reset_config_description": "Reset api keys and root user", "delete_server_title": "Delete server", @@ -472,5 +476,19 @@ "root_name": "Cannot be 'root'", "length_not_equal": "Length is [], should be {}", "length_longer": "Length is [], should be shorter than or equal to {}" + }, + "support": { + "title": "SelfPrivacy Support" + }, + "developer_settings": { + "title": "Developer settings", + "subtitle": "These settings are for debugging only. Don't change them unless you know what you're doing.", + "server_setup": "Server setup", + "use_staging_acme": "Use staging ACME server", + "use_staging_acme_description": "Rebuild your app to change this value.", + "routing": "App routing", + "reset_onboarding": "Reset onboarding switch", + "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", + "cubit_statuses": "Cubit loading statuses" } } diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index 6c870f9e..381261fe 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -12,6 +12,7 @@ import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; @@ -23,7 +24,9 @@ class BlocAndProviderConfig extends StatelessWidget { @override Widget build(final BuildContext context) { const isDark = false; + const isAutoDark = true; final serverInstallationCubit = ServerInstallationCubit()..load(); + final supportSystemCubit = SupportSystemCubit(); final usersCubit = UsersCubit(serverInstallationCubit); final servicesCubit = ServicesCubit(serverInstallationCubit); final backupsCubit = BackupsCubit(serverInstallationCubit); @@ -41,9 +44,13 @@ class BlocAndProviderConfig extends StatelessWidget { BlocProvider( create: (final _) => AppSettingsCubit( isDarkModeOn: isDark, + isAutoDarkModeOn: isAutoDark, isOnboardingShowing: true, )..load(), ), + BlocProvider( + create: (final _) => supportSystemCubit, + ), BlocProvider( create: (final _) => serverInstallationCubit, lazy: false, diff --git a/lib/logic/cubit/support_system/support_system_cubit.dart b/lib/logic/cubit/support_system/support_system_cubit.dart new file mode 100644 index 00000000..b6250740 --- /dev/null +++ b/lib/logic/cubit/support_system/support_system_cubit.dart @@ -0,0 +1,19 @@ +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:equatable/equatable.dart'; +import 'package:flutter/material.dart'; + +part 'support_system_state.dart'; + +class SupportSystemCubit extends Cubit { + SupportSystemCubit() : super(const SupportSystemState('about')); + + void showArticle({ + required final String article, + final BuildContext? context, + }) { + emit(SupportSystemState(article)); + if (context != null) { + Scaffold.of(context).openEndDrawer(); + } + } +} diff --git a/lib/logic/cubit/support_system/support_system_state.dart b/lib/logic/cubit/support_system/support_system_state.dart new file mode 100644 index 00000000..0c3c3087 --- /dev/null +++ b/lib/logic/cubit/support_system/support_system_state.dart @@ -0,0 +1,12 @@ +part of 'support_system_cubit.dart'; + +class SupportSystemState extends Equatable { + const SupportSystemState( + this.currentArticle, + ); + + final String currentArticle; + + @override + List get props => [currentArticle]; +} diff --git a/lib/ui/components/support_drawer/support_drawer.dart b/lib/ui/components/support_drawer/support_drawer.dart new file mode 100644 index 00000000..7b4c5c2b --- /dev/null +++ b/lib/ui/components/support_drawer/support_drawer.dart @@ -0,0 +1,52 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; +import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; + +class SupportDrawer extends StatelessWidget { + const SupportDrawer({ + super.key, + }); + + @override + Widget build(final BuildContext context) { + final currentArticle = + context.watch().state.currentArticle; + return Drawer( + width: 440, + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + const SizedBox(width: 8), + const Icon(Icons.help_outline), + const SizedBox(width: 16), + Text( + 'support.title'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + const Spacer(), + IconButton( + onPressed: () => Scaffold.of(context).closeEndDrawer(), + icon: const Icon(Icons.chevron_right_outlined), + ), + ], + ), + const SizedBox(height: 8), + Padding( + padding: const EdgeInsets.all(8.0), + child: BrandMarkdown( + fileName: currentArticle, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 39fcd88f..44d368aa 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -390,14 +390,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_adaptive_scaffold: - dependency: "direct main" - description: - name: flutter_adaptive_scaffold - sha256: d5842a235ec810320c7e6dac282876d93bccf231201be6e684b016cd717c0576 - url: "https://pub.dev" - source: hosted - version: "0.1.0" flutter_bloc: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 5e12d900..0dd3f199 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,7 +23,6 @@ dependencies: fl_chart: ^0.50.1 flutter: sdk: flutter - flutter_adaptive_scaffold: ^0.1.0 flutter_bloc: ^8.1.1 flutter_markdown: ^0.6.13+1 flutter_secure_storage: ^7.0.1 diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..f7cbc91a --- /dev/null +++ b/shell.nix @@ -0,0 +1,35 @@ +with (import { }); + +mkShell { + buildInputs = [ + at-spi2-core.dev + clang + cmake + dart + dbus.dev + flutter + gtk3 + libdatrie + libepoxy.dev + libselinux + libsepol + libthai + libxkbcommon + libsecret + ninja + pcre + pkg-config + util-linux.dev + xorg.libXdmcp + xorg.libXtst + xorg.libX11 + + glib + jsoncpp + libgcrypt + libgpg-error + ]; + shellHook = '' + export LD_LIBRARY_PATH=${libepoxy}/lib + ''; +} From 0b3b46b4528cb68a67c4933f426963640448f042 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 23 Feb 2023 17:36:38 +0300 Subject: [PATCH 434/732] feat: Breakpoints utility --- lib/utils/breakpoints.dart | 131 +++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 lib/utils/breakpoints.dart diff --git a/lib/utils/breakpoints.dart b/lib/utils/breakpoints.dart new file mode 100644 index 00000000..0e9104e2 --- /dev/null +++ b/lib/utils/breakpoints.dart @@ -0,0 +1,131 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +const Set _desktop = { + TargetPlatform.linux, + TargetPlatform.macOS, + TargetPlatform.windows +}; + +const Set _mobile = { + TargetPlatform.android, + TargetPlatform.fuchsia, + TargetPlatform.iOS, +}; + +/// A group of standard breakpoints built according to the material +/// specifications for screen width size. +/// +/// See also: +/// +/// * [AdaptiveScaffold], which uses some of these Breakpoints as defaults. +class Breakpoints { + /// This is a standard breakpoint that can be used as a fallthrough in the + /// case that no other breakpoint is active. + /// + /// It is active from a width of -1 dp to infinity. + static const Breakpoint standard = WidthPlatformBreakpoint(begin: -1); + + /// A window whose width is less than 600 dp and greater than 0 dp. + static const Breakpoint small = WidthPlatformBreakpoint(begin: 0, end: 600); + + /// A window whose width is greater than 0 dp. + static const Breakpoint smallAndUp = WidthPlatformBreakpoint(begin: 0); + + /// A desktop screen whose width is less than 600 dp and greater than 0 dp. + static const Breakpoint smallDesktop = + WidthPlatformBreakpoint(begin: 0, end: 600, platform: _desktop); + + /// A mobile screen whose width is less than 600 dp and greater than 0 dp. + static const Breakpoint smallMobile = + WidthPlatformBreakpoint(begin: 0, end: 600, platform: _mobile); + + /// A window whose width is between 600 dp and 840 dp. + static const Breakpoint medium = + WidthPlatformBreakpoint(begin: 600, end: 840); + + /// A window whose width is greater than 600 dp. + static const Breakpoint mediumAndUp = WidthPlatformBreakpoint(begin: 600); + + /// A desktop window whose width is between 600 dp and 840 dp. + static const Breakpoint mediumDesktop = + WidthPlatformBreakpoint(begin: 600, end: 840, platform: _desktop); + + /// A mobile window whose width is between 600 dp and 840 dp. + static const Breakpoint mediumMobile = + WidthPlatformBreakpoint(begin: 600, end: 840, platform: _mobile); + + /// A window whose width is greater than 840 dp. + static const Breakpoint large = WidthPlatformBreakpoint(begin: 840); + + /// A desktop window whose width is greater than 840 dp. + static const Breakpoint largeDesktop = + WidthPlatformBreakpoint(begin: 840, platform: _desktop); + + /// A mobile window whose width is greater than 840 dp. + static const Breakpoint largeMobile = + WidthPlatformBreakpoint(begin: 840, platform: _mobile); +} + +/// A class that can be used to quickly generate [Breakpoint]s that depend on +/// the screen width and the platform. +class WidthPlatformBreakpoint extends Breakpoint { + /// Returns a const [Breakpoint] with the given constraints. + const WidthPlatformBreakpoint({this.begin, this.end, this.platform}); + + /// The beginning width dp value. If left null then the [Breakpoint] will have + /// no lower bound. + final double? begin; + + /// The end width dp value. If left null then the [Breakpoint] will have no + /// upper bound. + final double? end; + + /// A Set of [TargetPlatform]s that the [Breakpoint] will be active on. If + /// left null then it will be active on all platforms. + final Set? platform; + + @override + bool isActive(final BuildContext context) { + final TargetPlatform host = Theme.of(context).platform; + final bool isRightPlatform = platform?.contains(host) ?? true; + + // Null boundaries are unbounded, assign the max/min of their associated + // direction on a number line. + final double width = MediaQuery.of(context).size.width; + final double lowerBound = begin ?? double.negativeInfinity; + final double upperBound = end ?? double.infinity; + + return width >= lowerBound && width < upperBound && isRightPlatform; + } +} + +/// An interface to define the conditions that distinguish between types of +/// screens. +/// +/// Adaptive apps usually display differently depending on the screen type: a +/// compact layout for smaller screens, or a relaxed layout for larger screens. +/// Override this class by defining `isActive` to fetch the screen property +/// (usually `MediaQuery.of`) and return true if the condition is met. +/// +/// Breakpoints do not need to be exclusive because they are tested in order +/// with the last Breakpoint active taking priority. +/// +/// If the condition is only based on the screen width and/or the device type, +/// use [WidthPlatformBreakpoint] to define the [Breakpoint]. +/// +/// See also: +/// +/// * [SlotLayout.config], which uses breakpoints to dictate the layout of the +/// screen. +abstract class Breakpoint { + /// Returns a const [Breakpoint]. + const Breakpoint(); + + /// A method that returns true based on conditions related to the context of + /// the screen such as MediaQuery.of(context).size.width. + bool isActive(final BuildContext context); +} From 54513998ce5c34c46a43290f62770ccffe3b2eeb Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 23 Feb 2023 17:37:23 +0300 Subject: [PATCH 435/732] fix: Devices and Recovery Key cubits couldn't initialize right after server installation --- lib/logic/cubit/devices/devices_cubit.dart | 6 ++--- .../recovery_key/recovery_key_cubit.dart | 26 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/logic/cubit/devices/devices_cubit.dart b/lib/logic/cubit/devices/devices_cubit.dart index 5e5c145c..d76e3651 100644 --- a/lib/logic/cubit/devices/devices_cubit.dart +++ b/lib/logic/cubit/devices/devices_cubit.dart @@ -15,9 +15,9 @@ class ApiDevicesCubit @override void load() async { - if (serverInstallationCubit.state is ServerInstallationFinished) { - _refetch(); - } + // if (serverInstallationCubit.state is ServerInstallationFinished) { + _refetch(); + // } } Future refresh() async { diff --git a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart index 56800be3..5ca2bfa9 100644 --- a/lib/logic/cubit/recovery_key/recovery_key_cubit.dart +++ b/lib/logic/cubit/recovery_key/recovery_key_cubit.dart @@ -14,21 +14,21 @@ class RecoveryKeyCubit @override void load() async { - if (serverInstallationCubit.state is ServerInstallationFinished) { - final RecoveryKeyStatus? status = await _getRecoveryKeyStatus(); - if (status == null) { - emit(state.copyWith(loadingStatus: LoadingStatus.error)); - } else { - emit( - state.copyWith( - status: status, - loadingStatus: LoadingStatus.success, - ), - ); - } + // if (serverInstallationCubit.state is ServerInstallationFinished) { + final RecoveryKeyStatus? status = await _getRecoveryKeyStatus(); + if (status == null) { + emit(state.copyWith(loadingStatus: LoadingStatus.error)); } else { - emit(state.copyWith(loadingStatus: LoadingStatus.uninitialized)); + emit( + state.copyWith( + status: status, + loadingStatus: LoadingStatus.success, + ), + ); } + // } else { + // emit(state.copyWith(loadingStatus: LoadingStatus.uninitialized)); + // } } Future _getRecoveryKeyStatus() async { From befdc0286e437b7e2ae3f08e1f4597178da146d6 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 23 Feb 2023 17:41:45 +0300 Subject: [PATCH 436/732] feat: Automatic day/night theme --- lib/config/hive_config.dart | 3 + .../app_settings/app_settings_cubit.dart | 15 +- .../app_settings/app_settings_state.dart | 7 +- lib/main.dart | 10 +- .../pages/more/app_settings/app_setting.dart | 229 ------------------ .../pages/more/app_settings/app_settings.dart | 146 +++++++++++ 6 files changed, 172 insertions(+), 238 deletions(-) delete mode 100644 lib/ui/pages/more/app_settings/app_setting.dart create mode 100644 lib/ui/pages/more/app_settings/app_settings.dart diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 93bce6ee..b6ba018c 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -63,6 +63,9 @@ class BNames { /// A boolean field of [appSettingsBox] box. static String isDarkModeOn = 'isDarkModeOn'; + /// A boolean field of [appSettingsBox] box. + static String isAutoDarkModeOn = 'isAutoDarkModeOn'; + /// A boolean field of [appSettingsBox] box. static String isOnboardingShowing = 'isOnboardingShowing'; diff --git a/lib/logic/cubit/app_settings/app_settings_cubit.dart b/lib/logic/cubit/app_settings/app_settings_cubit.dart index d013d418..af1ab3e0 100644 --- a/lib/logic/cubit/app_settings/app_settings_cubit.dart +++ b/lib/logic/cubit/app_settings/app_settings_cubit.dart @@ -15,10 +15,12 @@ part 'app_settings_state.dart'; class AppSettingsCubit extends Cubit { AppSettingsCubit({ required final bool isDarkModeOn, + required final bool isAutoDarkModeOn, required final bool isOnboardingShowing, }) : super( AppSettingsState( isDarkModeOn: isDarkModeOn, + isAutoDarkModeOn: isAutoDarkModeOn, isOnboardingShowing: isOnboardingShowing, ), ); @@ -27,10 +29,12 @@ class AppSettingsCubit extends Cubit { void load() async { final bool? isDarkModeOn = box.get(BNames.isDarkModeOn); + final bool? isAutoDarkModeOn = box.get(BNames.isAutoDarkModeOn); final bool? isOnboardingShowing = box.get(BNames.isOnboardingShowing); emit( state.copyWith( isDarkModeOn: isDarkModeOn, + isAutoDarkModeOn: isAutoDarkModeOn, isOnboardingShowing: isOnboardingShowing, ), ); @@ -49,9 +53,14 @@ class AppSettingsCubit extends Cubit { emit(state.copyWith(isDarkModeOn: isDarkModeOn)); } - void turnOffOnboarding() { - box.put(BNames.isOnboardingShowing, false); + void updateAutoDarkMode({required final bool isAutoDarkModeOn}) { + box.put(BNames.isAutoDarkModeOn, isAutoDarkModeOn); + emit(state.copyWith(isAutoDarkModeOn: isAutoDarkModeOn)); + } - emit(state.copyWith(isOnboardingShowing: false)); + void turnOffOnboarding({final bool isOnboardingShowing = false}) { + box.put(BNames.isOnboardingShowing, isOnboardingShowing); + + emit(state.copyWith(isOnboardingShowing: isOnboardingShowing)); } } diff --git a/lib/logic/cubit/app_settings/app_settings_state.dart b/lib/logic/cubit/app_settings/app_settings_state.dart index 8b29f6e9..ad364d66 100644 --- a/lib/logic/cubit/app_settings/app_settings_state.dart +++ b/lib/logic/cubit/app_settings/app_settings_state.dart @@ -3,21 +3,25 @@ part of 'app_settings_cubit.dart'; class AppSettingsState extends Equatable { const AppSettingsState({ required this.isDarkModeOn, + required this.isAutoDarkModeOn, required this.isOnboardingShowing, this.corePalette, }); final bool isDarkModeOn; + final bool isAutoDarkModeOn; final bool isOnboardingShowing; final color_utils.CorePalette? corePalette; AppSettingsState copyWith({ final bool? isDarkModeOn, + final bool? isAutoDarkModeOn, final bool? isOnboardingShowing, final color_utils.CorePalette? corePalette, }) => AppSettingsState( isDarkModeOn: isDarkModeOn ?? this.isDarkModeOn, + isAutoDarkModeOn: isAutoDarkModeOn ?? this.isAutoDarkModeOn, isOnboardingShowing: isOnboardingShowing ?? this.isOnboardingShowing, corePalette: corePalette ?? this.corePalette, ); @@ -26,5 +30,6 @@ class AppSettingsState extends Equatable { corePalette ?? color_utils.CorePalette.of(BrandColors.primary.value); @override - List get props => [isDarkModeOn, isOnboardingShowing, corePalette]; + List get props => + [isDarkModeOn, isAutoDarkModeOn, isOnboardingShowing, corePalette]; } diff --git a/lib/main.dart b/lib/main.dart index 3bab9f0d..cde6d45c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -87,11 +87,11 @@ class MyApp extends StatelessWidget { title: 'SelfPrivacy', theme: lightThemeData, darkTheme: darkThemeData, - themeMode: - appSettings.isDarkModeOn ? ThemeMode.dark : ThemeMode.light, - home: appSettings.isOnboardingShowing - ? const OnboardingPage(nextPage: InitializingPage()) - : const RootPage(), + themeMode: appSettings.isAutoDarkModeOn + ? ThemeMode.system + : appSettings.isDarkModeOn + ? ThemeMode.dark + : ThemeMode.light, builder: (final BuildContext context, final Widget? widget) { Widget error = const Text('...rendering error...'); if (widget is Scaffold || widget is Navigator) { diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart deleted file mode 100644 index 4287e985..00000000 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ /dev/null @@ -1,229 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; -import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/action_button/action_button.dart'; -import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/brand_switch/brand_switch.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; -import 'package:selfprivacy/utils/named_font_weight.dart'; -import 'package:easy_localization/easy_localization.dart'; - -class AppSettingsPage extends StatefulWidget { - const AppSettingsPage({super.key}); - - @override - State createState() => _AppSettingsPageState(); -} - -class _AppSettingsPageState extends State { - @override - Widget build(final BuildContext context) { - final bool isDarkModeOn = - context.watch().state.isDarkModeOn; - - return SafeArea( - child: Builder( - builder: (final context) => Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: BrandHeader( - title: 'application_settings.title'.tr(), - hasBackButton: true, - ), - ), - body: ListView( - padding: paddingH15V0, - children: [ - const Divider(height: 1), - Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: _TextColumn( - title: 'application_settings.dark_theme_title'.tr(), - value: - 'application_settings.dark_theme_description'.tr(), - hasWarning: false, - ), - ), - const SizedBox(width: 5), - BrandSwitch( - value: Theme.of(context).brightness == Brightness.dark, - onChanged: (final value) => context - .read() - .updateDarkMode(isDarkModeOn: !isDarkModeOn), - ), - ], - ), - ), - const Divider(height: 0), - Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: _TextColumn( - title: 'application_settings.reset_config_title'.tr(), - value: 'application_settings.reset_config_description' - .tr(), - hasWarning: false, - ), - ), - const SizedBox(width: 5), - ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: BrandColors.red1, - ), - child: Text( - 'basis.reset'.tr(), - style: const TextStyle( - color: BrandColors.white, - fontWeight: NamedFontWeight.demiBold, - ), - ), - onPressed: () { - showDialog( - context: context, - builder: (final _) => BrandAlert( - title: 'modals.are_you_sure'.tr(), - contentText: 'modals.purge_all_keys'.tr(), - actions: [ - ActionButton( - text: 'modals.purge_all_keys_confirm'.tr(), - isRed: true, - onPressed: () { - context - .read() - .clearAppConfig(); - Navigator.of(context).pop(); - }, - ), - ActionButton( - text: 'basis.cancel'.tr(), - ), - ], - ), - ); - }, - ), - ], - ), - ), - const Divider(height: 0), - _deleteServer(context) - ], - ), - ), - ), - ); - } - - Widget _deleteServer(final BuildContext context) { - final bool isDisabled = - context.watch().state.serverDetails == null; - return Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: _TextColumn( - title: 'application_settings.delete_server_title'.tr(), - value: 'application_settings.delete_server_description'.tr(), - hasWarning: false, - ), - ), - const SizedBox(width: 5), - ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: BrandColors.red1, - ), - onPressed: isDisabled - ? null - : () { - showDialog( - context: context, - builder: (final _) => BrandAlert( - title: 'modals.are_you_sure'.tr(), - contentText: 'modals.delete_server_volume'.tr(), - actions: [ - ActionButton( - text: 'modals.yes'.tr(), - isRed: true, - onPressed: () async { - showDialog( - context: context, - builder: (final context) => Container( - alignment: Alignment.center, - child: const CircularProgressIndicator(), - ), - ); - await context - .read() - .serverDelete(); - if (!mounted) { - return; - } - Navigator.of(context).pop(); - }, - ), - ActionButton( - text: 'basis.cancel'.tr(), - ), - ], - ), - ); - }, - child: Text( - 'basis.delete'.tr(), - style: const TextStyle( - color: BrandColors.white, - fontWeight: NamedFontWeight.demiBold, - ), - ), - ), - ], - ), - ); - } -} - -class _TextColumn extends StatelessWidget { - const _TextColumn({ - required this.title, - required this.value, - this.hasWarning = false, - }); - - final String title; - final String value; - final bool hasWarning; - @override - Widget build(final BuildContext context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BrandText.body1( - title, - style: TextStyle(color: hasWarning ? BrandColors.warning : null), - ), - const SizedBox(height: 5), - BrandText.body1( - value, - style: const TextStyle( - fontSize: 13, - height: 1.53, - color: BrandColors.gray1, - ).merge(TextStyle(color: hasWarning ? BrandColors.warning : null)), - ), - ], - ); -} diff --git a/lib/ui/pages/more/app_settings/app_settings.dart b/lib/ui/pages/more/app_settings/app_settings.dart new file mode 100644 index 00000000..08be5393 --- /dev/null +++ b/lib/ui/pages/more/app_settings/app_settings.dart @@ -0,0 +1,146 @@ +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/ui/components/action_button/action_button.dart'; +import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:easy_localization/easy_localization.dart'; + +class AppSettingsPage extends StatefulWidget { + const AppSettingsPage({super.key}); + + @override + State createState() => _AppSettingsPageState(); +} + +class _AppSettingsPageState extends State { + @override + Widget build(final BuildContext context) { + final bool isDarkModeOn = + context.watch().state.isDarkModeOn; + + final bool isSystemDarkModeOn = + context.watch().state.isAutoDarkModeOn; + + return BrandHeroScreen( + hasBackButton: true, + hasFlashButton: false, + bodyPadding: const EdgeInsets.symmetric(vertical: 16), + heroTitle: 'application_settings.title'.tr(), + children: [ + SwitchListTile( + title: Text('application_settings.system_dark_theme_title'.tr()), + subtitle: + Text('application_settings.system_dark_theme_description'.tr()), + value: isSystemDarkModeOn, + onChanged: (final value) => context + .read() + .updateAutoDarkMode(isAutoDarkModeOn: !isSystemDarkModeOn), + ), + SwitchListTile( + title: Text('application_settings.dark_theme_title'.tr()), + subtitle: Text('application_settings.dark_theme_description'.tr()), + value: Theme.of(context).brightness == Brightness.dark, + onChanged: isSystemDarkModeOn + ? null + : (final value) => context + .read() + .updateDarkMode(isDarkModeOn: !isDarkModeOn), + ), + const Divider(height: 0), + Padding( + padding: const EdgeInsets.all(16), + child: Text( + 'application_settings.dangerous_settings'.tr(), + style: Theme.of(context).textTheme.labelLarge!.copyWith( + color: Theme.of(context).colorScheme.error, + ), + ), + ), + const _ResetAppTile(), + // const Divider(height: 0), + _deleteServer(context) + ], + ); + } + + Widget _deleteServer(final BuildContext context) { + final bool isDisabled = + context.watch().state.serverDetails == null; + return ListTile( + title: Text('application_settings.delete_server_title'.tr()), + subtitle: Text('application_settings.delete_server_description'.tr()), + textColor: isDisabled + ? Theme.of(context).colorScheme.onBackground.withOpacity(0.5) + : Theme.of(context).colorScheme.onBackground, + onTap: isDisabled + ? null + : () { + showDialog( + context: context, + builder: (final _) => BrandAlert( + title: 'modals.are_you_sure'.tr(), + contentText: 'modals.delete_server_volume'.tr(), + actions: [ + ActionButton( + text: 'modals.yes'.tr(), + isRed: true, + onPressed: () async { + showDialog( + context: context, + builder: (final context) => Container( + alignment: Alignment.center, + child: const CircularProgressIndicator(), + ), + ); + await context + .read() + .serverDelete(); + if (!mounted) { + return; + } + Navigator.of(context).pop(); + }, + ), + ActionButton( + text: 'basis.cancel'.tr(), + ), + ], + ), + ); + }, + ); + } +} + +class _ResetAppTile extends StatelessWidget { + const _ResetAppTile(); + + @override + Widget build(final BuildContext context) => ListTile( + title: Text('application_settings.reset_config_title'.tr()), + subtitle: Text('application_settings.reset_config_description'.tr()), + onTap: () { + showDialog( + context: context, + builder: (final _) => BrandAlert( + title: 'modals.are_you_sure'.tr(), + contentText: 'modals.purge_all_keys'.tr(), + actions: [ + ActionButton( + text: 'modals.purge_all_keys_confirm'.tr(), + isRed: true, + onPressed: () { + context.read().clearAppConfig(); + Navigator.of(context).pop(); + }, + ), + ActionButton( + text: 'basis.cancel'.tr(), + ), + ], + ), + ); + }, + ); +} From 423efeeb20bff9943af66becbb90663c38d36603 Mon Sep 17 00:00:00 2001 From: inexcode Date: Thu, 23 Feb 2023 17:49:14 +0300 Subject: [PATCH 437/732] feat: Introduce new router and adaptive layouts --- assets/translations/en.json | 15 +- lib/main.dart | 32 +- .../not_ready_card/not_ready_card.dart | 10 +- .../pre_styled_buttons/flash_fab.dart | 49 +- .../brand_hero_screen.dart | 90 +- .../responsive_layout_with_infobox.dart | 70 ++ .../root_scaffold_with_navigation.dart | 276 ++++++ .../pages/backup_details/backup_details.dart | 2 +- lib/ui/pages/devices/devices.dart | 2 +- lib/ui/pages/devices/new_device.dart | 2 +- lib/ui/pages/dns_details/dns_details.dart | 2 +- lib/ui/pages/more/about_application.dart | 91 +- .../more/app_settings/developer_settings.dart | 83 ++ lib/ui/pages/more/console.dart | 8 +- lib/ui/pages/more/more.dart | 66 +- lib/ui/pages/onboarding/onboarding.dart | 30 +- lib/ui/pages/providers/providers.dart | 15 +- lib/ui/pages/recovery_key/recovery_key.dart | 13 +- .../recovery_key/recovery_key_receiving.dart | 2 +- lib/ui/pages/root_route.dart | 192 +++-- .../server_details/server_details_screen.dart | 2 +- .../migration_process_page.dart | 2 +- .../server_storage/extending_volume.dart | 2 +- .../pages/server_storage/server_storage.dart | 2 +- lib/ui/pages/services/service_page.dart | 8 +- lib/ui/pages/services/services.dart | 15 +- .../setup/initializing/initializing.dart | 814 +++++++++++------- .../initializing/server_provider_picker.dart | 421 +++++---- .../initializing/server_type_picker.dart | 334 +++---- .../recovering/recover_by_new_device_key.dart | 2 +- .../recovering/recover_by_old_token.dart | 2 +- .../recovering/recover_by_recovery_key.dart | 2 +- .../recovery_confirm_backblaze.dart | 2 +- .../recovery_confirm_cloudflare.dart | 2 +- .../recovering/recovery_confirm_server.dart | 2 +- .../recovering/recovery_method_select.dart | 2 +- .../setup/recovering/recovery_routing.dart | 2 +- .../recovery_server_provider_connected.dart | 2 +- lib/ui/pages/users/user.dart | 2 +- lib/ui/pages/users/user_details.dart | 4 +- lib/ui/pages/users/users.dart | 17 +- lib/ui/router/root_destinations.dart | 46 + lib/ui/router/router.dart | 122 +++ lib/ui/router/router.gr.dart | 474 ++++++++++ 44 files changed, 2352 insertions(+), 981 deletions(-) rename lib/ui/{components/brand_hero_screen => layouts}/brand_hero_screen.dart (62%) create mode 100644 lib/ui/layouts/responsive_layout_with_infobox.dart create mode 100644 lib/ui/layouts/root_scaffold_with_navigation.dart create mode 100644 lib/ui/pages/more/app_settings/developer_settings.dart create mode 100644 lib/ui/router/root_destinations.dart create mode 100644 lib/ui/router/router.dart create mode 100644 lib/ui/router/router.gr.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index d5adf64d..15727826 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -333,7 +333,20 @@ "create_master_account": "Create master account", "enter_username_and_password": "Enter username and strong password", "finish": "Everything is initialized", - "checks": "Checks have been completed \n{} out of {}" + "checks": "Checks have been completed \n{} out of {}", + "steps": { + "hosting": "Hosting", + "server_type": "Server type", + "dns_provider": "DNS provider", + "backups_provider": "Backups", + "domain": "Domain", + "master_account": "Master account", + "server": "Server", + "dns_setup": "DNS setup", + "nixos_installation": "NixOS installation", + "server_reboot": "Server reboot", + "final_checks": "Final checks" + } }, "recovering": { "generic_error": "Operation failed, please try again.", diff --git a/lib/main.dart b/lib/main.dart index cde6d45c..702d8280 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,9 +5,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/theming/factory/app_theme_factory.dart'; -import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; -import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; -import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/ui/router/router.dart'; import 'package:wakelock/wakelock.dart'; import 'package:timezone/data/latest.dart' as tz; @@ -20,7 +18,7 @@ import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await HiveConfig.init(); - await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); + // await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); try { /// Wakelock support for Linux @@ -43,21 +41,20 @@ void main() async { fallbackColor: BrandColors.primary, ); - BlocOverrides.runZoned( - () => runApp( - Localization( - child: MyApp( - lightThemeData: lightThemeData, - darkThemeData: darkThemeData, - ), + Bloc.observer = SimpleBlocObserver(); + + runApp( + Localization( + child: SelfprivacyApp( + lightThemeData: lightThemeData, + darkThemeData: darkThemeData, ), ), - blocObserver: SimpleBlocObserver(), ); } -class MyApp extends StatelessWidget { - const MyApp({ +class SelfprivacyApp extends StatelessWidget { + SelfprivacyApp({ required this.lightThemeData, required this.darkThemeData, super.key, @@ -66,6 +63,8 @@ class MyApp extends StatelessWidget { final ThemeData lightThemeData; final ThemeData darkThemeData; + final _appRouter = RootRouter(); + @override Widget build(final BuildContext context) => Localization( child: AnnotatedRegion( @@ -76,10 +75,11 @@ class MyApp extends StatelessWidget { final BuildContext context, final AppSettingsState appSettings, ) => - MaterialApp( + MaterialApp.router( + routeInformationParser: _appRouter.defaultRouteParser(), + routerDelegate: _appRouter.delegate(), scaffoldMessengerKey: getIt.get().scaffoldMessengerKey, - navigatorKey: getIt.get().navigatorKey, localizationsDelegates: context.localizationDelegates, supportedLocales: context.supportedLocales, locale: context.locale, diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index 379abf27..5e62e093 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -1,7 +1,7 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/router/router.dart'; import 'package:easy_localization/easy_localization.dart'; class NotReadyCard extends StatelessWidget { @@ -13,11 +13,7 @@ class NotReadyCard extends StatelessWidget { child: ListTile( contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), - onTap: () => Navigator.of(context).push( - materialRoute( - const InitializingPage(), - ), - ), + onTap: () => context.pushRoute(const InitializingRoute()), title: Text( 'not_ready_card.in_menu'.tr(), style: Theme.of(context).textTheme.titleSmall?.copyWith( diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/components/pre_styled_buttons/flash_fab.dart index f0087b9f..e069bcec 100644 --- a/lib/ui/components/pre_styled_buttons/flash_fab.dart +++ b/lib/ui/components/pre_styled_buttons/flash_fab.dart @@ -1,3 +1,4 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:ionicons/ionicons.dart'; @@ -7,7 +8,12 @@ import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; class BrandFab extends StatefulWidget { - const BrandFab({super.key}); + const BrandFab({ + this.extended = false, + super.key, + }); + + final bool extended; @override State createState() => _BrandFabState(); @@ -64,20 +70,35 @@ class _BrandFabState extends State ), ); }, - child: AnimatedBuilder( - animation: _colorTween, - builder: (final BuildContext context, final Widget? child) { - final double v = _animationController.value; - final IconData icon = - v > 0.5 ? Ionicons.flash : Ionicons.flash_outline; - return Transform.scale( - scale: 1 + (v < 0.5 ? v : 1 - v) * 2, - child: Icon( - icon, - color: _colorTween.value, + isExtended: widget.extended, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AnimatedBuilder( + animation: _colorTween, + builder: (final BuildContext context, final Widget? child) { + final double v = _animationController.value; + final IconData icon = + v > 0.5 ? Ionicons.flash : Ionicons.flash_outline; + return Transform.scale( + scale: 1 + (v < 0.5 ? v : 1 - v) * 2, + child: Icon( + icon, + color: _colorTween.value, + ), + ); + }, + ), + if (widget.extended) + const SizedBox( + width: 8, ), - ); - }, + if (widget.extended) + Text( + 'jobs.title'.tr(), + ), + ], ), ), ); diff --git a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart similarity index 62% rename from lib/ui/components/brand_hero_screen/brand_hero_screen.dart rename to lib/ui/layouts/brand_hero_screen.dart index 68f5d772..d51bca4f 100644 --- a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -1,6 +1,8 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; import 'package:selfprivacy/ui/helpers/widget_size.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; class BrandHeroScreen extends StatelessWidget { const BrandHeroScreen({ @@ -13,6 +15,7 @@ class BrandHeroScreen extends StatelessWidget { this.heroTitle = '', this.heroSubtitle, this.onBackButtonPressed, + this.bodyPadding = const EdgeInsets.all(16.0), }); final List children; @@ -23,6 +26,7 @@ class BrandHeroScreen extends StatelessWidget { final String heroTitle; final String? heroSubtitle; final VoidCallback? onBackButtonPressed; + final EdgeInsetsGeometry bodyPadding; @override Widget build(final BuildContext context) { @@ -64,7 +68,7 @@ class BrandHeroScreen extends StatelessWidget { ), ), SliverPadding( - padding: const EdgeInsets.all(16.0), + padding: bodyPadding, sliver: SliverList( delegate: SliverChildListDelegate(children), ), @@ -98,50 +102,50 @@ class HeroSliverAppBar extends StatefulWidget { class _HeroSliverAppBarState extends State { Size _size = Size.zero; @override - Widget build(final BuildContext context) => SliverAppBar( - expandedHeight: - widget.hasHeroIcon ? 148.0 + _size.height : 72.0 + _size.height, - primary: true, - pinned: true, - stretch: true, - leading: widget.hasBackButton - ? IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: widget.onBackButtonPressed ?? - () => Navigator.of(context).pop(), - ) - : null, - flexibleSpace: FlexibleSpaceBar( - title: LayoutBuilder( - builder: (final context, final constraints) => SizedBox( - width: constraints.maxWidth - 72.0, - child: WidgetSize( - onChange: (final Size size) => setState(() => _size = size), - child: Text( - widget.heroTitle, - style: Theme.of(context).textTheme.titleLarge?.copyWith( - color: Theme.of(context).colorScheme.onSurface, - ), - overflow: TextOverflow.fade, - textAlign: TextAlign.center, - ), + Widget build(final BuildContext context) { + final isMobile = Breakpoints.small.isActive(context); + return SliverAppBar( + expandedHeight: + widget.hasHeroIcon ? 148.0 + _size.height : 72.0 + _size.height, + primary: true, + pinned: isMobile, + stretch: true, + surfaceTintColor: isMobile ? null : Colors.transparent, + leading: (widget.hasBackButton && isMobile) + ? const AutoLeadingButton() + : const SizedBox.shrink(), + flexibleSpace: FlexibleSpaceBar( + title: LayoutBuilder( + builder: (final context, final constraints) => SizedBox( + width: constraints.maxWidth - 72.0, + child: WidgetSize( + onChange: (final Size size) => setState(() => _size = size), + child: Text( + widget.heroTitle, + style: Theme.of(context).textTheme.titleLarge?.copyWith( + color: Theme.of(context).colorScheme.onSurface, + ), + overflow: TextOverflow.fade, + textAlign: TextAlign.center, ), ), ), - expandedTitleScale: 1.2, - centerTitle: true, - collapseMode: CollapseMode.pin, - titlePadding: const EdgeInsets.only( - bottom: 12.0, - top: 16.0, - ), - background: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - const SizedBox(height: 72.0), - if (widget.hasHeroIcon) widget.heroIconWidget, - ], - ), ), - ); + expandedTitleScale: 1.2, + centerTitle: true, + collapseMode: CollapseMode.pin, + titlePadding: const EdgeInsets.only( + bottom: 12.0, + top: 16.0, + ), + background: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + const SizedBox(height: 72.0), + if (widget.hasHeroIcon) widget.heroIconWidget, + ], + ), + ), + ); + } } diff --git a/lib/ui/layouts/responsive_layout_with_infobox.dart b/lib/ui/layouts/responsive_layout_with_infobox.dart new file mode 100644 index 00000000..4ef467ab --- /dev/null +++ b/lib/ui/layouts/responsive_layout_with_infobox.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; + +class ResponsiveLayoutWithInfobox extends StatelessWidget { + const ResponsiveLayoutWithInfobox({ + required this.primaryColumn, + this.topChild, + this.secondaryColumn, + super.key, + }); + + final Widget? topChild; + final Widget primaryColumn; + final Widget? secondaryColumn; + + @override + Widget build(final BuildContext context) { + final hasSecondaryColumn = secondaryColumn != null; + final hasTopChild = topChild != null; + + if (Breakpoints.large.isActive(context)) { + return LayoutBuilder( + builder: (final context, final constraints) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (hasTopChild) + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: constraints.maxWidth * 0.9, + child: topChild, + ), + ], + ), + if (hasTopChild) const SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + width: hasSecondaryColumn + ? constraints.maxWidth * 0.7 + : constraints.maxWidth * 0.9, + child: primaryColumn, + ), + if (hasSecondaryColumn) const SizedBox(width: 16), + if (hasSecondaryColumn) + SizedBox( + width: constraints.maxWidth * 0.2, + child: secondaryColumn, + ), + ], + ), + ], + ), + ); + } + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (hasTopChild) topChild!, + const SizedBox(height: 16), + primaryColumn, + const SizedBox(height: 32), + if (hasSecondaryColumn) secondaryColumn!, + ], + ); + } +} diff --git a/lib/ui/layouts/root_scaffold_with_navigation.dart b/lib/ui/layouts/root_scaffold_with_navigation.dart new file mode 100644 index 00000000..f8e1048b --- /dev/null +++ b/lib/ui/layouts/root_scaffold_with_navigation.dart @@ -0,0 +1,276 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; +import 'package:selfprivacy/ui/components/support_drawer/support_drawer.dart'; +import 'package:selfprivacy/ui/router/root_destinations.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; + +class RootScaffoldWithNavigation extends StatelessWidget { + const RootScaffoldWithNavigation({ + required this.child, + required this.title, + required this.destinations, + this.showBottomBar = true, + this.showFab = true, + super.key, + }); + + final Widget child; + final String title; + final bool showBottomBar; + final List destinations; + final bool showFab; + + @override + // ignore: prefer_expression_function_bodies + Widget build(final BuildContext context) { + return Scaffold( + appBar: Breakpoints.mediumAndUp.isActive(context) + ? PreferredSize( + preferredSize: const Size.fromHeight(52), + child: _RootAppBar(title: title), + ) + : null, + endDrawer: const SupportDrawer(), + endDrawerEnableOpenDragGesture: false, + body: Row( + children: [ + if (Breakpoints.medium.isActive(context)) + MainScreenNavigationRail( + destinations: destinations, + showFab: showFab, + ), + if (Breakpoints.large.isActive(context)) + MainScreenNavigationDrawer( + destinations: destinations, + ), + Expanded(child: child), + ], + ), + bottomNavigationBar: BottomBar( + destinations: destinations, + hidden: !(Breakpoints.small.isActive(context) && showBottomBar), + key: const Key('bottomBar'), + ), + ); + } +} + +class _RootAppBar extends StatelessWidget { + const _RootAppBar({ + required this.title, + }); + + final String title; + + @override + Widget build(final BuildContext context) => AppBar( + title: AnimatedSwitcher( + duration: const Duration(milliseconds: 200), + transitionBuilder: + (final Widget child, final Animation animation) => + SlideTransition( + position: animation.drive( + Tween( + begin: const Offset(0.0, 0.2), + end: Offset.zero, + ), + ), + child: FadeTransition( + opacity: animation, + child: child, + ), + ), + child: SizedBox( + key: ValueKey(title), + width: double.infinity, + child: Text( + title, + ), + ), + ), + leading: context.router.pageCount > 1 + ? IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: () => context.router.pop(), + ) + : null, + actions: const [ + SizedBox.shrink(), + ], + ); +} + +class MainScreenNavigationRail extends StatelessWidget { + const MainScreenNavigationRail({ + required this.destinations, + this.showFab = true, + super.key, + }); + + final List destinations; + final bool showFab; + + @override + Widget build(final BuildContext context) { + int? activeIndex = destinations.indexWhere( + (final destination) => + context.router.isRouteActive(destination.route.routeName), + ); + + final prevActiveIndex = destinations.indexWhere( + (final destination) => context.router.stack + .any((final route) => route.name == destination.route.routeName), + ); + + if (activeIndex == -1) { + if (prevActiveIndex != -1) { + activeIndex = prevActiveIndex; + } else { + activeIndex = 0; + } + } + + final isExtended = Breakpoints.large.isActive(context); + + return LayoutBuilder( + builder: (final context, final constraints) => SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints(minHeight: constraints.maxHeight), + child: IntrinsicHeight( + child: NavigationRail( + backgroundColor: Colors.transparent, + labelType: isExtended + ? NavigationRailLabelType.none + : NavigationRailLabelType.all, + extended: isExtended, + leading: showFab + ? const BrandFab( + extended: false, + ) + : null, + groupAlignment: 0.0, + destinations: destinations + .map( + (final destination) => NavigationRailDestination( + icon: Icon(destination.icon), + label: Text(destination.label), + ), + ) + .toList(), + selectedIndex: activeIndex, + onDestinationSelected: (final index) { + context.router.replaceAll([destinations[index].route]); + }, + ), + ), + ), + ), + ); + } +} + +class BottomBar extends StatelessWidget { + const BottomBar({ + required this.destinations, + required this.hidden, + super.key, + }); + + final List destinations; + final bool hidden; + + @override + Widget build(final BuildContext context) { + final prevActiveIndex = destinations.indexWhere( + (final destination) => context.router.stack + .any((final route) => route.name == destination.route.routeName), + ); + + print(prevActiveIndex); + + return AnimatedContainer( + duration: const Duration(milliseconds: 200), + height: hidden ? 0 : 80, + curve: Curves.easeInOut, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + color: Theme.of(context).scaffoldBackgroundColor, + ), + child: NavigationBar( + selectedIndex: prevActiveIndex == -1 ? 0 : prevActiveIndex, + labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected, + onDestinationSelected: (final index) { + context.router.replaceAll([destinations[index].route]); + }, + destinations: destinations + .map( + (final destination) => NavigationDestination( + icon: Icon(destination.icon), + label: destination.label, + ), + ) + .toList(), + ), + ); + } +} + +class MainScreenNavigationDrawer extends StatelessWidget { + const MainScreenNavigationDrawer({ + required this.destinations, + this.showFab = true, + super.key, + }); + + final List destinations; + final bool showFab; + + @override + Widget build(final BuildContext context) { + int? activeIndex = destinations.indexWhere( + (final destination) => + context.router.isRouteActive(destination.route.routeName), + ); + + final prevActiveIndex = destinations.indexWhere( + (final destination) => context.router.stack + .any((final route) => route.name == destination.route.routeName), + ); + + if (activeIndex == -1) { + if (prevActiveIndex != -1) { + activeIndex = prevActiveIndex; + } else { + activeIndex = 0; + } + } + + return SizedBox( + height: MediaQuery.of(context).size.height, + width: 296, + child: NavigationDrawer( + key: const Key('PrimaryNavigationDrawer'), + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + surfaceTintColor: Colors.transparent, + selectedIndex: activeIndex, + onDestinationSelected: (final index) { + context.router.replaceAll([destinations[index].route]); + }, + children: [ + const Padding( + padding: EdgeInsets.all(16.0), + child: BrandFab(extended: true), + ), + const SizedBox(height: 16), + ...destinations.map( + (final destination) => NavigationDrawerDestination( + icon: Icon(destination.icon), + label: Text(destination.label), + ), + ), + ], + ), + ); + } +} diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 93cb0139..fd2757f8 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index 31010fd4..fe37418c 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/pages/devices/new_device.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/devices/new_device.dart b/lib/ui/pages/devices/new_device.dart index 8310b127..3d16101f 100644 --- a/lib/ui/pages/devices/new_device.dart +++ b/lib/ui/pages/devices/new_device.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class NewDeviceScreen extends StatelessWidget { const NewDeviceScreen({super.key}); diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 692921eb..be11f4ef 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -4,7 +4,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/utils/network_utils.dart'; diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 7a9dc11e..110a944c 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -1,67 +1,70 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:package_info/package_info.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:url_launcher/url_launcher.dart'; class AboutApplicationPage extends StatelessWidget { const AboutApplicationPage({super.key}); @override - Widget build(final BuildContext context) => SafeArea( - child: Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: BrandHeader( - title: 'about_application_page.title'.tr(), - hasBackButton: true, + Widget build(final BuildContext context) { + final bool isReady = context.watch().state + is ServerInstallationFinished; + + return BrandHeroScreen( + hasBackButton: true, + hasFlashButton: false, + heroTitle: 'about_application_page.title'.tr(), + children: [ + FutureBuilder( + future: _packageVersion(), + builder: (final context, final snapshot) => BrandText.body1( + 'about_application_page.application_version_text' + .tr(args: [snapshot.data.toString()]), + ), + ), + if (isReady) + FutureBuilder( + future: _apiVersion(), + builder: (final context, final snapshot) => BrandText.body1( + 'about_application_page.api_version_text' + .tr(args: [snapshot.data.toString()]), ), ), - body: ListView( - padding: paddingH15V0, + const SizedBox(height: 10), + // Button to call showAboutDialog + TextButton( + onPressed: () => showAboutDialog( + context: context, + applicationName: 'SelfPrivacy', + applicationLegalese: '© 2022 SelfPrivacy', + // Link to privacy policy children: [ - const SizedBox(height: 10), - FutureBuilder( - future: _packageVersion(), - builder: (final context, final snapshot) => BrandText.body1( - 'about_application_page.application_version_text' - .tr(args: [snapshot.data.toString()]), - ), - ), - FutureBuilder( - future: _apiVersion(), - builder: (final context, final snapshot) => BrandText.body1( - 'about_application_page.api_version_text' - .tr(args: [snapshot.data.toString()]), - ), - ), - const SizedBox(height: 10), - // Button to call showAboutDialog TextButton( - onPressed: () => showAboutDialog( - context: context, - applicationName: 'SelfPrivacy', - applicationLegalese: '© 2022 SelfPrivacy', - // Link to privacy policy - children: [ - TextButton( - onPressed: () => launchUrl( - Uri.parse('https://selfprivacy.ru/privacy-policy'), - mode: LaunchMode.externalApplication, - ), - child: Text('about_application_page.privacy_policy'.tr()), - ), - ], + onPressed: () => launchUrl( + Uri.parse('https://selfprivacy.ru/privacy-policy'), + mode: LaunchMode.externalApplication, ), - child: const Text('Show about dialog'), + child: Text('about_application_page.privacy_policy'.tr()), ), ], ), + child: const Text('Show about dialog'), ), - ); + const SizedBox(height: 8), + const Divider(height: 0), + const SizedBox(height: 8), + const BrandMarkdown( + fileName: 'about', + ), + ], + ); + } Future _packageVersion() async { String packageVersion = 'unknown'; diff --git a/lib/ui/pages/more/app_settings/developer_settings.dart b/lib/ui/pages/more/app_settings/developer_settings.dart new file mode 100644 index 00000000..09ab8840 --- /dev/null +++ b/lib/ui/pages/more/app_settings/developer_settings.dart @@ -0,0 +1,83 @@ +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; +import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; +import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:easy_localization/easy_localization.dart'; + +class DeveloperSettingsPage extends StatefulWidget { + const DeveloperSettingsPage({super.key}); + + @override + State createState() => _DeveloperSettingsPageState(); +} + +class _DeveloperSettingsPageState extends State { + @override + Widget build(final BuildContext context) => BrandHeroScreen( + hasBackButton: true, + hasFlashButton: false, + bodyPadding: const EdgeInsets.symmetric(vertical: 16), + heroTitle: 'developer_settings.title'.tr(), + heroSubtitle: 'developer_settings.subtitle'.tr(), + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: Text( + 'developer_settings.server_setup'.tr(), + style: Theme.of(context).textTheme.labelLarge!.copyWith( + color: Theme.of(context).colorScheme.secondary, + ), + ), + ), + SwitchListTile( + title: Text('developer_settings.use_staging_acme'.tr()), + subtitle: + Text('developer_settings.use_staging_acme_description'.tr()), + value: StagingOptions.stagingAcme, + onChanged: null, + ), + Padding( + padding: const EdgeInsets.all(16), + child: Text( + 'developer_settings.routing'.tr(), + style: Theme.of(context).textTheme.labelLarge!.copyWith( + color: Theme.of(context).colorScheme.secondary, + ), + ), + ), + ListTile( + title: Text('developer_settings.reset_onboarding'.tr()), + subtitle: + Text('developer_settings.reset_onboarding_description'.tr()), + enabled: + !context.watch().state.isOnboardingShowing, + onTap: () => context + .read() + .turnOffOnboarding(isOnboardingShowing: true), + ), + Padding( + padding: const EdgeInsets.all(16), + child: Text( + 'developer_settings.cubit_statuses'.tr(), + style: Theme.of(context).textTheme.labelLarge!.copyWith( + color: Theme.of(context).colorScheme.secondary, + ), + ), + ), + ListTile( + title: const Text('ApiDevicesCubit'), + subtitle: Text( + context.watch().state.status.toString(), + ), + ), + ListTile( + title: const Text('RecoveryKeyCubit'), + subtitle: Text( + context.watch().state.loadingStatus.toString(), + ), + ), + ], + ); +} diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index 6ad31ea5..6811e39a 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -7,14 +7,14 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -class Console extends StatefulWidget { - const Console({super.key}); +class ConsolePage extends StatefulWidget { + const ConsolePage({super.key}); @override - State createState() => _ConsoleState(); + State createState() => _ConsolePageState(); } -class _ConsoleState extends State { +class _ConsolePageState extends State { @override void initState() { getIt.get().addListener(update); diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 77b1d34a..9ea2c49b 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:ionicons/ionicons.dart'; @@ -8,19 +9,8 @@ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/pages/devices/devices.dart'; -import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; -import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; -import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; -import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; -import 'package:selfprivacy/ui/pages/root_route.dart'; -import 'package:selfprivacy/ui/pages/users/users.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; - -import 'package:selfprivacy/ui/pages/more/about_us.dart'; -import 'package:selfprivacy/ui/pages/more/app_settings/app_setting.dart'; -import 'package:selfprivacy/ui/pages/more/console.dart'; -import 'package:selfprivacy/ui/pages/more/about_application.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; +import 'package:selfprivacy/ui/router/router.dart'; class MorePage extends StatelessWidget { const MorePage({super.key}); @@ -34,12 +24,14 @@ class MorePage extends StatelessWidget { context.watch().state.usesBinds; return Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: BrandHeader( - title: 'basis.more'.tr(), - ), - ), + appBar: Breakpoints.small.isActive(context) + ? PreferredSize( + preferredSize: const Size.fromHeight(52), + child: BrandHeader( + title: 'basis.more'.tr(), + ), + ) + : null, body: ListView( children: [ Padding( @@ -50,7 +42,7 @@ class MorePage extends StatelessWidget { _MoreMenuItem( title: 'storage.start_migration_button'.tr(), iconData: Icons.drive_file_move_outline, - goTo: ServicesMigrationPage( + goTo: () => ServicesMigrationRoute( diskStatus: context .watch() .state @@ -77,7 +69,7 @@ class MorePage extends StatelessWidget { _MoreMenuItem( title: 'more_page.configuration_wizard'.tr(), iconData: Icons.change_history_outlined, - goTo: const InitializingPage(), + goTo: () => const InitializingRoute(), subtitle: 'not_ready_card.in_menu'.tr(), accent: true, ), @@ -85,47 +77,43 @@ class MorePage extends StatelessWidget { _MoreMenuItem( title: 'more_page.create_ssh_key'.tr(), iconData: Ionicons.key_outline, - goTo: const UserDetails( + goTo: () => UserDetailsRoute( login: 'root', ), ), if (isReady) _MoreMenuItem( iconData: Icons.password_outlined, - goTo: const RecoveryKey(), + goTo: () => const RecoveryKeyRoute(), title: 'recovery_key.key_main_header'.tr(), ), if (isReady) _MoreMenuItem( iconData: Icons.devices_outlined, - goTo: const DevicesScreen(), + goTo: () => const DevicesRoute(), title: 'devices.main_screen.header'.tr(), ), _MoreMenuItem( title: 'more_page.application_settings'.tr(), iconData: Icons.settings_outlined, - goTo: const AppSettingsPage(), - ), - _MoreMenuItem( - title: 'more_page.about_project'.tr(), - iconData: BrandIcons.engineer, - goTo: const AboutUsPage(), + goTo: () => const AppSettingsRoute(), ), _MoreMenuItem( title: 'more_page.about_application'.tr(), iconData: BrandIcons.fire, - goTo: const AboutApplicationPage(), + goTo: () => const AboutApplicationRoute(), + longGoTo: const DeveloperSettingsRoute(), ), if (!isReady) _MoreMenuItem( title: 'more_page.onboarding'.tr(), iconData: BrandIcons.start, - goTo: const OnboardingPage(nextPage: RootPage()), + goTo: () => const OnboardingRoute(), ), _MoreMenuItem( title: 'more_page.console'.tr(), iconData: BrandIcons.terminal, - goTo: const Console(), + goTo: () => const ConsoleRoute(), ), ], ), @@ -140,14 +128,16 @@ class _MoreMenuItem extends StatelessWidget { const _MoreMenuItem({ required this.iconData, required this.title, + required this.goTo, this.subtitle, - this.goTo, + this.longGoTo, this.accent = false, }); final IconData iconData; final String title; - final Widget? goTo; + final PageRouteInfo Function() goTo; + final PageRouteInfo? longGoTo; final String? subtitle; final bool accent; @@ -160,9 +150,9 @@ class _MoreMenuItem extends StatelessWidget { tertiary: accent, child: ListTile( contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), - onTap: goTo != null - ? () => Navigator.of(context).push(materialRoute(goTo!)) - : null, + onTap: () => context.pushRoute(goTo()), + onLongPress: + longGoTo != null ? () => context.pushRoute(longGoTo!) : null, leading: Icon( iconData, size: 24, diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index ac865b11..34c49b93 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -1,13 +1,13 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/router/router.dart'; import 'package:easy_localization/easy_localization.dart'; class OnboardingPage extends StatefulWidget { - const OnboardingPage({required this.nextPage, super.key}); + const OnboardingPage({super.key}); - final Widget nextPage; @override State createState() => _OnboardingPageState(); } @@ -22,14 +22,14 @@ class _OnboardingPageState extends State { @override Widget build(final BuildContext context) => Scaffold( - body: PageView( - controller: pageController, - children: [ - _withPadding(firstPage()), - _withPadding(secondPage()), - ], - ), - ); + body: PageView( + controller: pageController, + children: [ + _withPadding(firstPage()), + _withPadding(secondPage()), + ], + ), + ); Widget _withPadding(final Widget child) => Padding( padding: const EdgeInsets.symmetric( @@ -142,10 +142,10 @@ class _OnboardingPageState extends State { BrandButton.rised( onPressed: () { context.read().turnOffOnboarding(); - Navigator.of(context).pushAndRemoveUntil( - materialRoute(widget.nextPage), - (final route) => false, - ); + context.router.replaceAll([ + const RootRoute(), + const InitializingRoute(), + ]); }, text: 'basis.got_it'.tr(), ), diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index d234c984..1b9ffb47 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -13,6 +13,7 @@ import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -61,12 +62,14 @@ class _ProvidersPageState extends State { } return Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: BrandHeader( - title: 'basis.providers_title'.tr(), - ), - ), + appBar: Breakpoints.small.isActive(context) + ? PreferredSize( + preferredSize: const Size.fromHeight(52), + child: BrandHeader( + title: 'basis.providers_title'.tr(), + ), + ) + : null, body: ListView( padding: paddingH15V0, children: [ diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index 02a7ed9a..006f72d0 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -1,4 +1,3 @@ -import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -8,18 +7,18 @@ import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; -class RecoveryKey extends StatefulWidget { - const RecoveryKey({super.key}); +class RecoveryKeyPage extends StatefulWidget { + const RecoveryKeyPage({super.key}); @override - State createState() => _RecoveryKeyState(); + State createState() => _RecoveryKeyPageState(); } -class _RecoveryKeyState extends State { +class _RecoveryKeyPageState extends State { @override void initState() { super.initState(); @@ -29,7 +28,7 @@ class _RecoveryKeyState extends State { @override Widget build(final BuildContext context) { final RecoveryKeyState keyStatus = context.watch().state; - + final List widgets; String? subtitle = keyStatus.exists ? null : 'recovery_key.key_main_description'.tr(); diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index afca6d20..85c4939f 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; class RecoveryKeyReceiving extends StatelessWidget { diff --git a/lib/ui/pages/root_route.dart b/lib/ui/pages/root_route.dart index ce1f344c..5fd2645f 100644 --- a/lib/ui/pages/root_route.dart +++ b/lib/ui/pages/root_route.dart @@ -1,89 +1,149 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_tab_bar/brand_tab_bar.dart'; -import 'package:selfprivacy/ui/pages/more/more.dart'; -import 'package:selfprivacy/ui/pages/providers/providers.dart'; -import 'package:selfprivacy/ui/pages/services/services.dart'; -import 'package:selfprivacy/ui/pages/users/users.dart'; +import 'package:selfprivacy/ui/layouts/root_scaffold_with_navigation.dart'; +import 'package:selfprivacy/ui/router/root_destinations.dart'; -import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; +import 'package:selfprivacy/ui/router/router.dart'; -class RootPage extends StatefulWidget { +class RootPage extends StatefulWidget implements AutoRouteWrapper { const RootPage({super.key}); @override State createState() => _RootPageState(); + + @override + Widget wrappedRoute(final BuildContext context) => this; } class _RootPageState extends State with TickerProviderStateMixin { - late TabController tabController; + bool shouldUseSplitView() => false; - late final AnimationController _controller = AnimationController( - duration: const Duration(milliseconds: 400), - vsync: this, - ); - late final Animation _animation = CurvedAnimation( - parent: _controller, - curve: Curves.fastOutSlowIn, - ); - - @override - void initState() { - tabController = TabController(length: 4, vsync: this); - tabController.addListener(() { - setState(() { - tabController.index == 2 - ? _controller.forward() - : _controller.reverse(); - }); - }); - super.initState(); - } - - @override - void dispose() { - tabController.dispose(); - _controller.dispose(); - super.dispose(); - } + final destinations = rootDestinations; @override Widget build(final BuildContext context) { final bool isReady = context.watch().state is ServerInstallationFinished; - return Provider( - create: (final _) => ChangeTab(tabController.animateTo), - child: Scaffold( - body: TabBarView( - controller: tabController, - children: const [ - ProvidersPage(), - ServicesPage(), - UsersPage(), - MorePage(), + if (context.read().state.isOnboardingShowing) { + context.router.replace(const OnboardingRoute()); + } + + return AutoRouter( + builder: (final context, final child) { + final currentDestinationIndex = destinations.indexWhere( + (final destination) => + context.router.isRouteActive(destination.route.routeName), + ); + final routeName = getRouteTitle(context.router.current.name).tr(); + return RootScaffoldWithNavigation( + title: routeName, + destinations: destinations, + showBottomBar: !(currentDestinationIndex == -1), + showFab: isReady, + child: child, + ); + }, + ); + } +} + +class MainScreenNavigationRail extends StatelessWidget { + const MainScreenNavigationRail({ + required this.destinations, + super.key, + }); + + final List destinations; + + @override + Widget build(final BuildContext context) { + int? activeIndex = destinations.indexWhere( + (final destination) => + context.router.isRouteActive(destination.route.routeName), + ); + if (activeIndex == -1) { + activeIndex = null; + } + + return Padding( + padding: const EdgeInsets.all(8.0), + child: SizedBox( + height: MediaQuery.of(context).size.height, + width: 72, + child: LayoutBuilder( + builder: (final context, final constraints) => SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints(minHeight: constraints.maxHeight), + child: IntrinsicHeight( + child: NavigationRail( + backgroundColor: Colors.transparent, + labelType: NavigationRailLabelType.all, + destinations: destinations + .map( + (final destination) => NavigationRailDestination( + icon: Icon(destination.icon), + label: Text(destination.label), + ), + ) + .toList(), + selectedIndex: activeIndex, + onDestinationSelected: (final index) { + context.router.replaceAll([destinations[index].route]); + }, + ), + ), + ), + ), + ), + ), + ); + } +} + +class MainScreenNavigationDrawer extends StatelessWidget { + const MainScreenNavigationDrawer({ + required this.destinations, + super.key, + }); + + final List destinations; + + @override + Widget build(final BuildContext context) { + int? activeIndex = destinations.indexWhere( + (final destination) => + context.router.isRouteActive(destination.route.routeName), + ); + if (activeIndex == -1) { + activeIndex = null; + } + + return SizedBox( + height: MediaQuery.of(context).size.height, + width: 296, + child: LayoutBuilder( + builder: (final context, final constraints) => NavigationDrawer( + // backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + // surfaceTintColor: Colors.transparent, + key: const Key('PrimaryNavigationDrawer'), + selectedIndex: activeIndex, + onDestinationSelected: (final index) { + context.router.replaceAll([destinations[index].route]); + }, + children: [ + const SizedBox(height: 18), + ...destinations.map( + (final destination) => NavigationDrawerDestination( + icon: Icon(destination.icon), + label: Text(destination.label), + ), + ), ], ), - bottomNavigationBar: BrandTabBar( - controller: tabController, - ), - floatingActionButton: isReady - ? SizedBox( - height: 104 + 16, - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - ScaleTransition( - scale: _animation, - child: const AddUserFab(), - ), - const SizedBox(height: 16), - const BrandFab(), - ], - ), - ) - : null, ), ); } diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 487e1a25..a0891630 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; diff --git a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index 2f896673..227fb501 100644 --- a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index d40c628c..808cd6d5 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart' import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 2a5206e2..313fb5de 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 22db2bf6..8f344a85 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; import 'package:selfprivacy/utils/launch_url.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -50,7 +50,11 @@ class _ServicePageState extends State { service.svgIcon, width: 48.0, height: 48.0, - color: Theme.of(context).colorScheme.onBackground, + colorFilter: ColorFilter.mode( + Theme.of(context).colorScheme.onBackground, + BlendMode.srcIn, + ) + // color: Theme.of(context).colorScheme.onBackground, ), heroTitle: service.displayName, children: [ diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 54192367..3e919158 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -12,6 +12,7 @@ import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/pages/services/service_page.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/launch_url.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; @@ -34,12 +35,14 @@ class _ServicesPageState extends State { .sort((final a, final b) => a.status.index.compareTo(b.status.index)); return Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: BrandHeader( - title: 'basis.services'.tr(), - ), - ), + appBar: Breakpoints.small.isActive(context) + ? PreferredSize( + preferredSize: const Size.fromHeight(52), + child: BrandHeader( + title: 'basis.services'.tr(), + ), + ) + : null, body: RefreshIndicator( onRefresh: () async { context.read().reload(); diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index ca502b65..fe512ee2 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -1,7 +1,7 @@ +import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; @@ -9,17 +9,19 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; +import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; -import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/ui/components/support_drawer/support_drawer.dart'; +import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_type_picker.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/router/router.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; class InitializingPage extends StatelessWidget { const InitializingPage({super.key}); @@ -48,99 +50,123 @@ class InitializingPage extends StatelessWidget { ][cubit.state.progress.index](); } + const steps = [ + 'initializing.steps.hosting', + 'initializing.steps.server_type', + 'initializing.steps.dns_provider', + 'initializing.steps.backups_provider', + 'initializing.steps.domain', + 'initializing.steps.master_account', + 'initializing.steps.server', + 'initializing.steps.dns_setup', + 'initializing.steps.nixos_installation', + 'initializing.steps.server_reboot', + 'initializing.steps.final_checks', + ]; + return BlocListener( listener: (final context, final state) { if (cubit.state is ServerInstallationFinished) { - Navigator.of(context) - .pushReplacement(materialRoute(const RootPage())); + context.router.popUntilRoot(); } }, child: Scaffold( - appBar: AppBar( - actions: [ - if (cubit.state is ServerInstallationFinished) - IconButton( - icon: const Icon(Icons.check), - onPressed: () { - Navigator.of(context) - .pushReplacement(materialRoute(const RootPage())); - }, - ) - ], - title: Text( - 'more_page.configuration_wizard'.tr(), - ), - bottom: PreferredSize( - preferredSize: const Size.fromHeight(28), - child: Padding( - padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), - child: ProgressBar( - steps: const [ - 'Hosting', - 'Server Type', - 'CloudFlare', - 'Backblaze', - 'Domain', - 'User', - 'Server', - 'Installation', - ], - activeIndex: cubit.state.porgressBar, - ), - ), - ), - ), - body: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.fromLTRB(16.0, 0, 16.0, 0.0), - child: AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: actualInitializingPage, - ), - ), - ConstrainedBox( - constraints: BoxConstraints( - minHeight: MediaQuery.of(context).size.height - - MediaQuery.of(context).padding.top - - MediaQuery.of(context).padding.bottom - - 566, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - alignment: Alignment.center, - child: BrandButton.text( - title: cubit.state is ServerInstallationFinished - ? 'basis.close'.tr() - : 'basis.later'.tr(), - onPressed: () { - Navigator.of(context).pushAndRemoveUntil( - materialRoute(const RootPage()), - (final predicate) => false, - ); - }, - ), + endDrawer: const SupportDrawer(), + endDrawerEnableOpenDragGesture: false, + appBar: Breakpoints.large.isActive(context) + ? null + : AppBar( + actions: [ + if (cubit.state is ServerInstallationFinished) + IconButton( + icon: const Icon(Icons.check), + onPressed: () { + context.router.popUntilRoot(); + }, ), - if (cubit.state is ServerInstallationEmpty || - cubit.state is ServerInstallationNotFinished) - Container( - alignment: Alignment.center, - child: BrandButton.text( - title: 'basis.connect_to_existing'.tr(), - onPressed: () { - Navigator.of(context).push( - materialRoute( - const RecoveryRouting(), - ), - ); - }, + const SizedBox.shrink(), + ], + title: Text( + 'more_page.configuration_wizard'.tr(), + ), + bottom: PreferredSize( + preferredSize: const Size.fromHeight(28), + child: Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), + child: ProgressBar( + steps: const [ + 'Hosting', + 'Server Type', + 'CloudFlare', + 'Backblaze', + 'Domain', + 'User', + 'Server', + 'Installation', + ], + activeIndex: cubit.state.porgressBar, + ), + ), + ), + ), + body: LayoutBuilder( + builder: (final context, final constraints) => Row( + children: [ + if (Breakpoints.large.isActive(context)) + _ProgressDrawer( + steps: steps, + cubit: cubit, + constraints: constraints, + ), + SizedBox( + width: constraints.maxWidth - + (Breakpoints.large.isActive(context) ? 300 : 0), + height: constraints.maxHeight, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: Breakpoints.large.isActive(context) + ? const EdgeInsets.all(16.0) + : const EdgeInsets.fromLTRB(16.0, 0, 16.0, 0.0), + child: AnimatedSwitcher( + duration: const Duration(milliseconds: 300), + child: actualInitializingPage, ), - ) - ], + ), + if (!Breakpoints.large.isActive(context)) + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + alignment: Alignment.center, + child: BrandButton.text( + title: + cubit.state is ServerInstallationFinished + ? 'basis.close'.tr() + : 'basis.later'.tr(), + onPressed: () { + context.router.popUntilRoot(); + }, + ), + ), + if (cubit.state is ServerInstallationEmpty || + cubit.state is ServerInstallationNotFinished) + Container( + alignment: Alignment.center, + child: BrandButton.text( + title: 'basis.connect_to_existing'.tr(), + onPressed: () { + context.router + .replace(const RecoveryRoute()); + }, + ), + ) + ], + ), + ], + ), ), ), ], @@ -179,57 +205,55 @@ class InitializingPage extends StatelessWidget { ), ); - void _showModal(final BuildContext context, final Widget widget) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => widget, - ); - } - Widget _stepCloudflare(final ServerInstallationCubit initializingCubit) => BlocProvider( create: (final context) => DnsProviderFormCubit(initializingCubit), child: Builder( - builder: (final context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '${'initializing.connect_to_server_provider'.tr()}Cloudflare', - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.manage_domain_dns'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 32), - CubitFormTextField( - formFieldCubit: context.read().apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: InputDecoration( - hintText: 'initializing.cloudflare_api_token'.tr(), + builder: (final context) => ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '${'initializing.connect_to_server_provider'.tr()}Cloudflare', + style: Theme.of(context).textTheme.headlineSmall, ), - ), - const SizedBox(height: 32), - BrandButton.rised( - onPressed: () => - context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - const SizedBox(height: 10), - BrandButton.text( - onPressed: () => _showModal( - context, - const _HowTo( - fileName: 'how_cloudflare', + const SizedBox(height: 16), + Text( + 'initializing.manage_domain_dns'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CubitFormTextField( + formFieldCubit: context.read().apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: InputDecoration( + hintText: 'initializing.cloudflare_api_token'.tr(), ), ), - title: 'initializing.how'.tr(), - ), - ], + const SizedBox(height: 32), + BrandButton.filled( + onPressed: () => + context.read().trySubmit(), + text: 'basis.connect'.tr(), + ), + const SizedBox(height: 10), + BrandOutlinedButton( + onPressed: () { + context.read().showArticle( + article: 'how_cloudflare', + context: context, + ); + Scaffold.of(context).openEndDrawer(); + }, + title: 'initializing.how'.tr(), + ), + ], + ), ), ), ); @@ -240,50 +264,57 @@ class InitializingPage extends StatelessWidget { child: Builder( builder: (final context) { final formCubitState = context.watch().state; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '${'initializing.connect_to_server_provider'.tr()}Backblaze', - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 32), - CubitFormTextField( - formFieldCubit: context.read().keyId, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: const InputDecoration( - hintText: 'KeyID', + return ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '${'initializing.connect_to_server_provider'.tr()}Backblaze', + style: Theme.of(context).textTheme.headlineSmall, ), - ), - const SizedBox(height: 16), - CubitFormTextField( - formFieldCubit: - context.read().applicationKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: const InputDecoration( - hintText: 'Master Application Key', - ), - ), - const SizedBox(height: 32), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - const SizedBox(height: 10), - BrandButton.text( - onPressed: () => _showModal( - context, - const _HowTo( - fileName: 'how_backblaze', + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CubitFormTextField( + formFieldCubit: context.read().keyId, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'KeyID', ), ), - title: 'initializing.how'.tr(), - ), - ], + const SizedBox(height: 16), + CubitFormTextField( + formFieldCubit: + context.read().applicationKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'Master Application Key', + ), + ), + const SizedBox(height: 32), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => context.read().trySubmit(), + text: 'basis.connect'.tr(), + ), + const SizedBox(height: 10), + BrandButton.text( + onPressed: () { + context.read().showArticle( + article: 'how_backblaze', + context: context, + ); + Scaffold.of(context).openEndDrawer(); + }, + title: 'initializing.how'.tr(), + ), + ], + ), ); }, ), @@ -296,9 +327,8 @@ class InitializingPage extends StatelessWidget { builder: (final context) { final DomainSetupState state = context.watch().state; - return SizedBox( - width: double.infinity, - child: Column( + return ResponsiveLayoutWithInfobox( + topChild: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( @@ -310,7 +340,11 @@ class InitializingPage extends StatelessWidget { 'initializing.use_this_domain_text'.tr(), style: Theme.of(context).textTheme.bodyMedium, ), - const SizedBox(height: 32), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ if (state is Empty) Text( 'initializing.no_connected_domains'.tr(), @@ -350,7 +384,7 @@ class InitializingPage extends StatelessWidget { ], if (state is Empty) ...[ const SizedBox(height: 30), - BrandButton.rised( + BrandButton.filled( onPressed: () => context.read().load(), child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -367,7 +401,7 @@ class InitializingPage extends StatelessWidget { ], if (state is Loaded) ...[ const SizedBox(height: 32), - BrandButton.rised( + BrandButton.filled( onPressed: () => context.read().saveDomain(), text: 'initializing.save_domain'.tr(), @@ -388,74 +422,83 @@ class InitializingPage extends StatelessWidget { builder: (final context) { final formCubitState = context.watch().state; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.create_master_account'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.enter_username_and_password'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - if (formCubitState.isErrorShown) const SizedBox(height: 16), - if (formCubitState.isErrorShown) + return ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Text( - 'users.username_rule'.tr(), - style: TextStyle( - color: Theme.of(context).colorScheme.error, + 'initializing.create_master_account'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.enter_username_and_password'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (formCubitState.isErrorShown) const SizedBox(height: 16), + if (formCubitState.isErrorShown) + Text( + 'users.username_rule'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + const SizedBox(height: 32), + CubitFormTextField( + formFieldCubit: context.read().userName, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: InputDecoration( + hintText: 'basis.username'.tr(), ), ), - const SizedBox(height: 32), - CubitFormTextField( - formFieldCubit: context.read().userName, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: InputDecoration( - hintText: 'basis.username'.tr(), - ), - ), - const SizedBox(height: 16), - BlocBuilder, FieldCubitState>( - bloc: context.read().isVisible, - builder: (final context, final state) { - final bool isVisible = state.value; - return CubitFormTextField( - obscureText: !isVisible, - formFieldCubit: - context.read().password, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: InputDecoration( - hintText: 'basis.password'.tr(), - suffixIcon: IconButton( - icon: Icon( - isVisible ? Icons.visibility : Icons.visibility_off, + const SizedBox(height: 16), + BlocBuilder, FieldCubitState>( + bloc: context.read().isVisible, + builder: (final context, final state) { + final bool isVisible = state.value; + return CubitFormTextField( + obscureText: !isVisible, + formFieldCubit: + context.read().password, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: InputDecoration( + hintText: 'basis.password'.tr(), + suffixIcon: IconButton( + icon: Icon( + isVisible + ? Icons.visibility + : Icons.visibility_off, + ), + onPressed: () => context + .read() + .isVisible + .setValue(!isVisible), ), - onPressed: () => context - .read() - .isVisible - .setValue(!isVisible), + suffixIconConstraints: + const BoxConstraints(minWidth: 60), + prefixIconConstraints: + const BoxConstraints(maxWidth: 60), + prefixIcon: Container(), ), - suffixIconConstraints: - const BoxConstraints(minWidth: 60), - prefixIconConstraints: - const BoxConstraints(maxWidth: 60), - prefixIcon: Container(), - ), - ); - }, - ), - const SizedBox(height: 32), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - ], + ); + }, + ), + const SizedBox(height: 32), + BrandButton.filled( + onPressed: formCubitState.isSubmitting + ? null + : () => context.read().trySubmit(), + text: 'basis.connect'.tr(), + ), + ], + ), ); }, ), @@ -465,27 +508,28 @@ class InitializingPage extends StatelessWidget { final bool isLoading = (appConfigCubit.state as ServerInstallationNotFinished).isLoading; return Builder( - builder: (final context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.final'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.create_server'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 128), - BrandButton.rised( - onPressed: - isLoading ? null : appConfigCubit.createServerAndSetDnsRecords, - text: isLoading - ? 'basis.loading'.tr() - : 'initializing.create_server'.tr(), - ), - ], + builder: (final context) => ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.final'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.create_server'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: BrandButton.filled( + onPressed: + isLoading ? null : appConfigCubit.createServerAndSetDnsRecords, + text: isLoading + ? 'basis.loading'.tr() + : 'initializing.create_server'.tr(), + ), ), ); } @@ -514,84 +558,200 @@ class InitializingPage extends StatelessWidget { return Builder( builder: (final context) => SizedBox( width: double.infinity, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.checks'.tr(args: [doneCount.toString(), '4']), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - if (text != null) + child: ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Text( - text, - style: Theme.of(context).textTheme.bodyMedium, + 'initializing.checks'.tr(args: [doneCount.toString(), '4']), + style: Theme.of(context).textTheme.headlineSmall, ), - const SizedBox(height: 128), - const SizedBox(height: 10), - if (doneCount == 0 && state.dnsMatches != null) - Column( - children: state.dnsMatches!.entries.map((final entry) { - final String domain = entry.key; - final bool isCorrect = entry.value; - return Row( - children: [ - if (isCorrect) - const Icon(Icons.check, color: Colors.green), - if (!isCorrect) - const Icon(Icons.schedule, color: Colors.amber), - const SizedBox(width: 10), - Text(domain), - ], - ); - }).toList(), - ), - const SizedBox(height: 10), - if (!state.isLoading) - Row( - children: [ - Text( - 'initializing.until_the_next_check'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - BrandTimer( - startDateTime: state.timerStart!, - duration: state.duration!, - ) - ], - ), - if (state.isLoading) - Text( - 'initializing.check'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - ], + const SizedBox(height: 16), + if (text != null) + Text( + text, + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 128), + const SizedBox(height: 10), + if (doneCount == 0 && state.dnsMatches != null) + Column( + children: state.dnsMatches!.entries.map((final entry) { + final String domain = entry.key; + final bool isCorrect = entry.value; + return Row( + children: [ + if (isCorrect) + const Icon(Icons.check, color: Colors.green), + if (!isCorrect) + const Icon(Icons.schedule, color: Colors.amber), + const SizedBox(width: 10), + Text(domain), + ], + ); + }).toList(), + ), + const SizedBox(height: 10), + if (!state.isLoading) + Row( + children: [ + Text( + 'initializing.until_the_next_check'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + BrandTimer( + startDateTime: state.timerStart!, + duration: state.duration!, + ) + ], + ), + if (state.isLoading) + Text( + 'initializing.check'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), ), ), ); } } -class _HowTo extends StatelessWidget { - const _HowTo({ - required this.fileName, +class _ProgressDrawer extends StatelessWidget { + const _ProgressDrawer({ + required this.steps, + required this.cubit, + required this.constraints, }); - final String fileName; + final List steps; + final ServerInstallationCubit cubit; + final BoxConstraints constraints; @override - Widget build(final BuildContext context) => BrandBottomSheet( - isExpended: true, - child: Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), + Widget build(final BuildContext context) => SizedBox( + width: 300, + height: constraints.maxHeight, + child: Drawer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - BrandMarkdown( - fileName: fileName, + Padding( + padding: const EdgeInsets.all(16.0), + child: Text( + 'more_page.configuration_wizard'.tr(), + style: Theme.of(context).textTheme.titleLarge, + ), + ), + Flexible( + fit: FlexFit.tight, + child: SingleChildScrollView( + child: Column( + children: [ + ...steps.map((final step) { + final index = steps.indexOf(step); + return _StepIndicator( + title: step.tr(), + isCurrent: index == cubit.state.progress.index, + isCompleted: index < cubit.state.progress.index, + ); + }).toList(), + ], + ), + ), + ), + // const Spacer(), + Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (cubit.state is ServerInstallationEmpty || + cubit.state is ServerInstallationNotFinished) + Container( + alignment: Alignment.center, + child: BrandButton.filled( + text: 'basis.connect_to_existing'.tr(), + onPressed: () { + context.router.replace(const RecoveryRoute()); + }, + ), + ), + ConstrainedBox( + constraints: const BoxConstraints( + minWidth: double.infinity, + ), + child: OutlinedButton( + child: Text( + cubit.state is ServerInstallationFinished + ? 'basis.close'.tr() + : 'basis.later'.tr(), + ), + onPressed: () { + context.router.popUntilRoot(); + }, + ), + ), + ], + ), ), ], ), ), ); } + +class _StepIndicator extends StatelessWidget { + const _StepIndicator({ + required this.title, + required this.isCompleted, + required this.isCurrent, + }); + + final String title; + final bool isCompleted; + final bool isCurrent; + + @override + Widget build(final BuildContext context) => ListTile( + selected: isCurrent, + leading: isCurrent + ? const _StepCurrentIcon() + : isCompleted + ? const _StepCompletedIcon() + : const _StepPendingIcon(), + title: Text( + title, + ), + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + iconColor: Theme.of(context).colorScheme.onSurfaceVariant, + ); +} + +class _StepCompletedIcon extends StatelessWidget { + const _StepCompletedIcon(); + + @override + Widget build(final BuildContext context) => const Icon(Icons.check_circle); +} + +class _StepPendingIcon extends StatelessWidget { + const _StepPendingIcon(); + + @override + Widget build(final BuildContext context) => const Icon(Icons.circle_outlined); +} + +class _StepCurrentIcon extends StatelessWidget { + const _StepCurrentIcon(); + + @override + Widget build(final BuildContext context) => + const Icon(Icons.build_circle_outlined); +} diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index dfec01b9..6813d9cd 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -2,16 +2,15 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; import 'package:selfprivacy/utils/launch_url.dart'; class ServerProviderPicker extends StatefulWidget { @@ -98,56 +97,49 @@ class ProviderInputDataPage extends StatelessWidget { final ProviderFormCubit providerCubit; @override - Widget build(final BuildContext context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "${'initializing.connect_to_server_provider'.tr()}${providerInfo.providerType.displayName}", - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.connect_to_server_provider_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 32), - CubitFormTextField( - formFieldCubit: providerCubit.apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: const InputDecoration( - hintText: 'Provider API Token', + Widget build(final BuildContext context) => ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "${'initializing.connect_to_server_provider'.tr()}${providerInfo.providerType.displayName}", + style: Theme.of(context).textTheme.headlineSmall, ), - ), - const SizedBox(height: 32), - BrandButton.filled( - child: Text('basis.connect'.tr()), - onPressed: () => providerCubit.trySubmit(), - ), - const SizedBox(height: 10), - BrandOutlinedButton( - child: Text('initializing.how'.tr()), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => BrandBottomSheet( - isExpended: true, - child: Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: [ - BrandMarkdown( - fileName: providerInfo.pathToHow, - ), - ], - ), - ), + const SizedBox(height: 16), + Text( + 'initializing.connect_to_server_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CubitFormTextField( + formFieldCubit: providerCubit.apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'Provider API Token', ), ), - ), - ], + const SizedBox(height: 32), + BrandButton.filled( + child: Text('basis.connect'.tr()), + onPressed: () => providerCubit.trySubmit(), + ), + const SizedBox(height: 10), + BrandOutlinedButton( + child: Text('initializing.how'.tr()), + onPressed: () { + context.read().showArticle( + article: providerInfo.pathToHow, + context: context, + ); + }, + ), + ], + ), ); } @@ -164,175 +156,182 @@ class ProviderSelectionPage extends StatelessWidget { @override Widget build(final BuildContext context) => SizedBox( width: double.infinity, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.connect_to_server'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 10), - Text( - 'initializing.select_provider'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 10), - OutlinedCard( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - width: 40, - height: 40, - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(40), - color: const Color(0xFFD50C2D), + child: ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.connect_to_server'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 10), + Text( + 'initializing.select_provider'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + children: [ + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color(0xFFD50C2D), + ), + child: SvgPicture.asset( + 'assets/images/logos/hetzner.svg', + ), ), - child: SvgPicture.asset( - 'assets/images/logos/hetzner.svg', + const SizedBox(width: 16), + Text( + 'Hetzner Cloud', + style: Theme.of(context).textTheme.titleMedium, ), - ), - const SizedBox(width: 16), - Text( - 'Hetzner Cloud', - style: Theme.of(context).textTheme.titleMedium, - ), - ], - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_countries_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_countries_text_hetzner' - .tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_price_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_price_text_hetzner'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_hetzner'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_email_notice'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - BrandButton.filled( - child: Text('basis.select'.tr()), - onPressed: () { - serverInstallationCubit - .setServerProviderType(ServerProvider.hetzner); - callback(ServerProvider.hetzner); - }, - ), - // Outlined button that will open website - BrandOutlinedButton( - onPressed: () => - launchURL('https://www.hetzner.com/cloud'), - title: 'initializing.select_provider_site_button'.tr(), - ), - ], + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_countries_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_countries_text_hetzner' + .tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_text_hetzner'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_hetzner' + .tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_email_notice'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.filled( + child: Text('basis.select'.tr()), + onPressed: () { + serverInstallationCubit + .setServerProviderType(ServerProvider.hetzner); + callback(ServerProvider.hetzner); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchURL('https://www.hetzner.com/cloud'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), ), ), - ), - const SizedBox(height: 16), - OutlinedCard( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - width: 40, - height: 40, - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(40), - color: const Color(0xFF0080FF), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color(0xFF0080FF), + ), + child: SvgPicture.asset( + 'assets/images/logos/digital_ocean.svg', + ), ), - child: SvgPicture.asset( - 'assets/images/logos/digital_ocean.svg', + const SizedBox(width: 16), + Text( + 'Digital Ocean', + style: Theme.of(context).textTheme.titleMedium, ), - ), - const SizedBox(width: 16), - Text( - 'Digital Ocean', - style: Theme.of(context).textTheme.titleMedium, - ), - ], - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_countries_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_countries_text_do'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_price_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_price_text_do'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_do'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - BrandButton.filled( - child: Text('basis.select'.tr()), - onPressed: () { - serverInstallationCubit - .setServerProviderType(ServerProvider.digitalOcean); - callback(ServerProvider.digitalOcean); - }, - ), - // Outlined button that will open website - BrandOutlinedButton( - onPressed: () => - launchURL('https://www.digitalocean.com'), - title: 'initializing.select_provider_site_button'.tr(), - ), - ], + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_countries_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_countries_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.filled( + child: Text('basis.select'.tr()), + onPressed: () { + serverInstallationCubit.setServerProviderType( + ServerProvider.digitalOcean, + ); + callback(ServerProvider.digitalOcean); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchURL('https://www.digitalocean.com'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), ), ), - ), - const SizedBox(height: 16), - InfoBox(text: 'initializing.select_provider_notice'.tr()), - ], + ], + ), + secondaryColumn: + InfoBox(text: 'initializing.select_provider_notice'.tr()), ), ); } diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 5a6632c8..2b9f1748 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -7,6 +7,7 @@ import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; class ServerTypePicker extends StatefulWidget { const ServerTypePicker({ @@ -70,50 +71,67 @@ class SelectLocationPage extends StatelessWidget { if ((snapshot.data as List).isEmpty) { return Text('initializing.no_locations_found'.tr()); } - return Column( - children: [ - Text( - 'initializing.choose_location_type'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.choose_location_type_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 16), - ...(snapshot.data! as List).map( - (final location) => SizedBox( - width: double.infinity, - child: InkWell( - onTap: () { - callback(location); - }, - child: Card( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '${location.flag ?? ''} ${location.title}', - style: Theme.of(context).textTheme.titleMedium, - ), - const SizedBox(height: 8), - if (location.description != null) - Text( - location.description!, - style: Theme.of(context).textTheme.bodyMedium, + return ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.choose_location_type'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.choose_location_type_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...(snapshot.data! as List).map( + (final location) => Column( + children: [ + SizedBox( + width: double.infinity, + child: Card( + clipBehavior: Clip.antiAlias, + child: InkResponse( + highlightShape: BoxShape.rectangle, + onTap: () { + callback(location); + }, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '${location.flag ?? ''} ${location.title}', + style: Theme.of(context) + .textTheme + .titleMedium, + ), + const SizedBox(height: 8), + if (location.description != null) + Text( + location.description!, + style: Theme.of(context) + .textTheme + .bodyMedium, + ), + ], ), - ], + ), + ), ), ), - ), + const SizedBox(height: 8), + ], ), ), - ), - const SizedBox(height: 24), - ], + ], + ), ); } else { return const Center(child: CircularProgressIndicator()); @@ -180,121 +198,145 @@ class SelectTypePage extends StatelessWidget { ], ); } - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.choose_server_type'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.choose_server_type_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(height: 16), - ...(snapshot.data! as List).map( - (final type) => SizedBox( - width: double.infinity, - child: InkWell( - onTap: () { - serverInstallationCubit.setServerType(type); - }, - child: Card( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - type.title, - style: Theme.of(context).textTheme.titleMedium, - ), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.memory_outlined, - color: - Theme.of(context).colorScheme.onSurface, - ), - const SizedBox(width: 8), - Text( - 'server.core_count'.plural(type.cores), - style: - Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.memory_outlined, - color: - Theme.of(context).colorScheme.onSurface, - ), - const SizedBox(width: 8), - Text( - 'initializing.choose_server_type_ram' - .tr(args: [type.ram.toString()]), - style: - Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.sd_card_outlined, - color: - Theme.of(context).colorScheme.onSurface, - ), - const SizedBox(width: 8), - Text( - 'initializing.choose_server_type_storage' - .tr( - args: [type.disk.gibibyte.toString()], + return ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.choose_server_type'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.choose_server_type_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...(snapshot.data! as List).map( + (final type) => Column( + children: [ + SizedBox( + width: double.infinity, + child: InkWell( + onTap: () { + serverInstallationCubit.setServerType(type); + }, + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + type.title, + style: Theme.of(context) + .textTheme + .titleMedium, ), - style: - Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - const SizedBox(height: 8), - const Divider(height: 8), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.payments_outlined, - color: - Theme.of(context).colorScheme.onSurface, - ), - const SizedBox(width: 8), - Text( - 'initializing.choose_server_type_payment_per_month' - .tr( - args: [ - '${type.price.value.toString()} ${type.price.currency}' + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.memory_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'server.core_count' + .plural(type.cores), + style: Theme.of(context) + .textTheme + .bodyMedium, + ), ], ), - style: - Theme.of(context).textTheme.bodyLarge, - ), - ], + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.memory_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_ram' + .tr(args: [type.ram.toString()]), + style: Theme.of(context) + .textTheme + .bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.sd_card_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_storage' + .tr( + args: [ + type.disk.gibibyte.toString() + ], + ), + style: Theme.of(context) + .textTheme + .bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + const Divider(height: 8), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.payments_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_payment_per_month' + .tr( + args: [ + '${type.price.value.toString()} ${type.price.currency}' + ], + ), + style: Theme.of(context) + .textTheme + .bodyLarge, + ), + ], + ), + ], + ), ), - ], + ), ), ), - ), + const SizedBox(height: 8), + ], ), ), - ), - const SizedBox(height: 16), - InfoBox(text: 'initializing.choose_server_type_notice'.tr()), - ], + ], + ), + secondaryColumn: + InfoBox(text: 'initializing.choose_server_type_notice'.tr()), ); } else { return const Center(child: CircularProgressIndicator()); diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index bb2ebbf0..7eeb2812 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index 2b65ba8b..d9dbba3a 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index c47b924f..bd308f31 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoverByRecoveryKey extends StatelessWidget { const RecoverByRecoveryKey({super.key}); diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index 0b7e7a9e..12c23d54 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmBackblaze extends StatelessWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index 4b766e56..4bf670a3 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_fo import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmCloudflare extends StatelessWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 3b47cc76..948e2288 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -4,7 +4,7 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoveryConfirmServer extends StatefulWidget { const RecoveryConfirmServer({super.key}); diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index 68129d57..8aaefe35 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -4,7 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 68108214..23f72f8f 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_recovery_key.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index f850cde7..50c99ca7 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -4,7 +4,7 @@ import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; diff --git a/lib/ui/pages/users/user.dart b/lib/ui/pages/users/user.dart index 1d781811..2658d3cc 100644 --- a/lib/ui/pages/users/user.dart +++ b/lib/ui/pages/users/user.dart @@ -12,7 +12,7 @@ class _User extends StatelessWidget { Widget build(final BuildContext context) => InkWell( onTap: () { Navigator.of(context).push( - materialRoute(UserDetails(login: user.login)), + materialRoute(UserDetailsPage(login: user.login)), ); }, child: Container( diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 3ae5b86d..0fc0447c 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -1,7 +1,7 @@ part of 'users.dart'; -class UserDetails extends StatelessWidget { - const UserDetails({ +class UserDetailsPage extends StatelessWidget { + const UserDetailsPage({ required this.login, super.key, }); diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index caf6d441..51b29828 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -16,12 +16,13 @@ import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -106,12 +107,14 @@ class UsersPage extends StatelessWidget { } return Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: BrandHeader( - title: 'basis.users'.tr(), - ), - ), + appBar: Breakpoints.small.isActive(context) + ? PreferredSize( + preferredSize: const Size.fromHeight(52), + child: BrandHeader( + title: 'basis.users'.tr(), + ), + ) + : null, body: child, ); } diff --git a/lib/ui/router/root_destinations.dart b/lib/ui/router/root_destinations.dart new file mode 100644 index 00000000..0d981894 --- /dev/null +++ b/lib/ui/router/root_destinations.dart @@ -0,0 +1,46 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; +import 'package:selfprivacy/ui/router/router.dart'; + +class RouteDestination { + const RouteDestination({ + required this.route, + required this.icon, + required this.label, + required this.title, + }); + + final PageRouteInfo route; + final IconData icon; + final String label; + final String title; +} + +final rootDestinations = [ + RouteDestination( + route: const ProvidersRoute(), + icon: BrandIcons.server, + label: 'basis.providers'.tr(), + title: 'basis.providers_title'.tr(), + ), + RouteDestination( + route: const ServicesRoute(), + icon: BrandIcons.box, + label: 'basis.services'.tr(), + title: 'basis.services'.tr(), + ), + RouteDestination( + route: const UsersRoute(), + icon: BrandIcons.users, + label: 'basis.users'.tr(), + title: 'basis.users'.tr(), + ), + RouteDestination( + route: const MoreRoute(), + icon: Icons.menu_rounded, + label: 'basis.more'.tr(), + title: 'basis.more'.tr(), + ), +]; diff --git a/lib/ui/router/router.dart b/lib/ui/router/router.dart new file mode 100644 index 00000000..92c588e0 --- /dev/null +++ b/lib/ui/router/router.dart @@ -0,0 +1,122 @@ +import 'package:animations/animations.dart'; +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/models/disk_status.dart'; +import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/ui/pages/devices/devices.dart'; +import 'package:selfprivacy/ui/pages/more/about_application.dart'; +import 'package:selfprivacy/ui/pages/more/app_settings/app_settings.dart'; +import 'package:selfprivacy/ui/pages/more/app_settings/developer_settings.dart'; +import 'package:selfprivacy/ui/pages/more/console.dart'; +import 'package:selfprivacy/ui/pages/more/more.dart'; +import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; +import 'package:selfprivacy/ui/pages/providers/providers.dart'; +import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; +import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; +import 'package:selfprivacy/ui/pages/services/services.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; +import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; +import 'package:selfprivacy/ui/pages/users/users.dart'; + +part 'router.gr.dart'; + +Widget fadeThroughTransition( + final BuildContext context, + final Animation animation, + final Animation secondaryAnimation, + final Widget child, +) => + SharedAxisTransition( + key: UniqueKey(), + animation: animation, + secondaryAnimation: secondaryAnimation, + transitionType: SharedAxisTransitionType.vertical, + child: child, + ); + +@MaterialAutoRouter( + // transitionsBuilder: fadeThroughTransition, + replaceInRouteName: 'Page|Screen|Routing,Route', + routes: [ + AutoRoute( + page: OnboardingPage, + ), + AutoRoute(page: InitializingPage), + AutoRoute(page: RecoveryRouting), + AutoRoute( + page: RootPage, + initial: true, + children: [ + CustomRoute( + page: ProvidersPage, + usesPathAsKey: true, + initial: true, + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + ), + CustomRoute( + page: ServicesPage, + usesPathAsKey: true, + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + ), + CustomRoute( + page: UsersPage, + usesPathAsKey: true, + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + ), + CustomRoute( + page: MorePage, + usesPathAsKey: true, + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + ), + AutoRoute(page: AppSettingsPage), + AutoRoute(page: UserDetailsPage), + AutoRoute(page: RecoveryKeyPage), + AutoRoute(page: DevicesScreen), + AutoRoute(page: AboutApplicationPage), + AutoRoute(page: DeveloperSettingsPage), + ], + ), + AutoRoute(page: ServicesMigrationPage), + AutoRoute(page: ConsolePage), + ], +) +class RootRouter extends _$RootRouter { + RootRouter(); +} + +// Function to map route names to route titles +String getRouteTitle(final String routeName) { + switch (routeName) { + case 'RootRoute': + return 'basis.app_name'; + case 'ProvidersRoute': + return 'basis.providers_title'; + case 'ServicesRoute': + return 'basis.services'; + case 'UsersRoute': + return 'basis.users'; + case 'MoreRoute': + return 'basis.more'; + case 'AppSettingsRoute': + return 'application_settings.title'; + case 'UserDetailsRoute': + return '[User Details]'; + case 'RecoveryKeyRoute': + return 'recovery_key.key_main_header'; + case 'DevicesRoute': + return 'devices.main_screen.header'; + case 'AboutApplicationRoute': + return 'about_us_page.title'; + case 'ConsoleRoute': + return '[Console]'; + case 'DeveloperSettingsRoute': + return 'developer_settings.title'; + default: + return routeName; + } +} diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart new file mode 100644 index 00000000..eae72e33 --- /dev/null +++ b/lib/ui/router/router.gr.dart @@ -0,0 +1,474 @@ +// ************************************************************************** +// AutoRouteGenerator +// ************************************************************************** + +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// AutoRouteGenerator +// ************************************************************************** +// +// ignore_for_file: type=lint + +part of 'router.dart'; + +class _$RootRouter extends RootStackRouter { + _$RootRouter([GlobalKey? navigatorKey]) : super(navigatorKey); + + @override + final Map pagesMap = { + OnboardingRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const OnboardingPage(), + ); + }, + InitializingRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const InitializingPage(), + ); + }, + RecoveryRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const RecoveryRouting(), + ); + }, + RootRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: WrappedRoute(child: const RootPage()), + ); + }, + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); + return MaterialPageX( + routeData: routeData, + child: ServicesMigrationPage( + services: args.services, + diskStatus: args.diskStatus, + isMigration: args.isMigration, + key: args.key, + ), + ); + }, + ConsoleRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const ConsolePage(), + ); + }, + ProvidersRoute.name: (routeData) { + return CustomPage( + routeData: routeData, + child: const ProvidersPage(), + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + opaque: true, + barrierDismissible: false, + ); + }, + ServicesRoute.name: (routeData) { + return CustomPage( + routeData: routeData, + child: const ServicesPage(), + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + opaque: true, + barrierDismissible: false, + ); + }, + UsersRoute.name: (routeData) { + return CustomPage( + routeData: routeData, + child: const UsersPage(), + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + opaque: true, + barrierDismissible: false, + ); + }, + MoreRoute.name: (routeData) { + return CustomPage( + routeData: routeData, + child: const MorePage(), + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 200, + opaque: true, + barrierDismissible: false, + ); + }, + AppSettingsRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const AppSettingsPage(), + ); + }, + UserDetailsRoute.name: (routeData) { + final args = routeData.argsAs(); + return MaterialPageX( + routeData: routeData, + child: UserDetailsPage( + login: args.login, + key: args.key, + ), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const RecoveryKeyPage(), + ); + }, + DevicesRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const DevicesScreen(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + DeveloperSettingsRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const DeveloperSettingsPage(), + ); + }, + }; + + @override + List get routes => [ + RouteConfig( + OnboardingRoute.name, + path: '/onboarding-page', + ), + RouteConfig( + InitializingRoute.name, + path: '/initializing-page', + ), + RouteConfig( + RecoveryRoute.name, + path: '/recovery-routing', + ), + RouteConfig( + RootRoute.name, + path: '/', + children: [ + RouteConfig( + ProvidersRoute.name, + path: '', + parent: RootRoute.name, + usesPathAsKey: true, + ), + RouteConfig( + ServicesRoute.name, + path: 'services-page', + parent: RootRoute.name, + usesPathAsKey: true, + ), + RouteConfig( + UsersRoute.name, + path: 'users-page', + parent: RootRoute.name, + usesPathAsKey: true, + ), + RouteConfig( + MoreRoute.name, + path: 'more-page', + parent: RootRoute.name, + usesPathAsKey: true, + ), + RouteConfig( + AppSettingsRoute.name, + path: 'app-settings-page', + parent: RootRoute.name, + ), + RouteConfig( + UserDetailsRoute.name, + path: 'user-details-page', + parent: RootRoute.name, + ), + RouteConfig( + RecoveryKeyRoute.name, + path: 'recovery-key-page', + parent: RootRoute.name, + ), + RouteConfig( + DevicesRoute.name, + path: 'devices-screen', + parent: RootRoute.name, + ), + RouteConfig( + AboutApplicationRoute.name, + path: 'about-application-page', + parent: RootRoute.name, + ), + RouteConfig( + DeveloperSettingsRoute.name, + path: 'developer-settings-page', + parent: RootRoute.name, + ), + ], + ), + RouteConfig( + ServicesMigrationRoute.name, + path: '/services-migration-page', + ), + RouteConfig( + ConsoleRoute.name, + path: '/console-page', + ), + ]; +} + +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute() + : super( + OnboardingRoute.name, + path: '/onboarding-page', + ); + + static const String name = 'OnboardingRoute'; +} + +/// generated route for +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute() + : super( + InitializingRoute.name, + path: '/initializing-page', + ); + + static const String name = 'InitializingRoute'; +} + +/// generated route for +/// [RecoveryRouting] +class RecoveryRoute extends PageRouteInfo { + const RecoveryRoute() + : super( + RecoveryRoute.name, + path: '/recovery-routing', + ); + + static const String name = 'RecoveryRoute'; +} + +/// generated route for +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) + : super( + RootRoute.name, + path: '/', + initialChildren: children, + ); + + static const String name = 'RootRoute'; +} + +/// generated route for +/// [ServicesMigrationPage] +class ServicesMigrationRoute extends PageRouteInfo { + ServicesMigrationRoute({ + required List services, + required DiskStatus diskStatus, + required bool isMigration, + Key? key, + }) : super( + ServicesMigrationRoute.name, + path: '/services-migration-page', + args: ServicesMigrationRouteArgs( + services: services, + diskStatus: diskStatus, + isMigration: isMigration, + key: key, + ), + ); + + static const String name = 'ServicesMigrationRoute'; +} + +class ServicesMigrationRouteArgs { + const ServicesMigrationRouteArgs({ + required this.services, + required this.diskStatus, + required this.isMigration, + this.key, + }); + + final List services; + + final DiskStatus diskStatus; + + final bool isMigration; + + final Key? key; + + @override + String toString() { + return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; + } +} + +/// generated route for +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute() + : super( + ConsoleRoute.name, + path: '/console-page', + ); + + static const String name = 'ConsoleRoute'; +} + +/// generated route for +/// [ProvidersPage] +class ProvidersRoute extends PageRouteInfo { + const ProvidersRoute() + : super( + ProvidersRoute.name, + path: '', + ); + + static const String name = 'ProvidersRoute'; +} + +/// generated route for +/// [ServicesPage] +class ServicesRoute extends PageRouteInfo { + const ServicesRoute() + : super( + ServicesRoute.name, + path: 'services-page', + ); + + static const String name = 'ServicesRoute'; +} + +/// generated route for +/// [UsersPage] +class UsersRoute extends PageRouteInfo { + const UsersRoute() + : super( + UsersRoute.name, + path: 'users-page', + ); + + static const String name = 'UsersRoute'; +} + +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute() + : super( + MoreRoute.name, + path: 'more-page', + ); + + static const String name = 'MoreRoute'; +} + +/// generated route for +/// [AppSettingsPage] +class AppSettingsRoute extends PageRouteInfo { + const AppSettingsRoute() + : super( + AppSettingsRoute.name, + path: 'app-settings-page', + ); + + static const String name = 'AppSettingsRoute'; +} + +/// generated route for +/// [UserDetailsPage] +class UserDetailsRoute extends PageRouteInfo { + UserDetailsRoute({ + required String login, + Key? key, + }) : super( + UserDetailsRoute.name, + path: 'user-details-page', + args: UserDetailsRouteArgs( + login: login, + key: key, + ), + ); + + static const String name = 'UserDetailsRoute'; +} + +class UserDetailsRouteArgs { + const UserDetailsRouteArgs({ + required this.login, + this.key, + }); + + final String login; + + final Key? key; + + @override + String toString() { + return 'UserDetailsRouteArgs{login: $login, key: $key}'; + } +} + +/// generated route for +/// [RecoveryKeyPage] +class RecoveryKeyRoute extends PageRouteInfo { + const RecoveryKeyRoute() + : super( + RecoveryKeyRoute.name, + path: 'recovery-key-page', + ); + + static const String name = 'RecoveryKeyRoute'; +} + +/// generated route for +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute() + : super( + DevicesRoute.name, + path: 'devices-screen', + ); + + static const String name = 'DevicesRoute'; +} + +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute() + : super( + AboutApplicationRoute.name, + path: 'about-application-page', + ); + + static const String name = 'AboutApplicationRoute'; +} + +/// generated route for +/// [DeveloperSettingsPage] +class DeveloperSettingsRoute extends PageRouteInfo { + const DeveloperSettingsRoute() + : super( + DeveloperSettingsRoute.name, + path: 'developer-settings-page', + ); + + static const String name = 'DeveloperSettingsRoute'; +} From 6656635785e9fde253c92ce99cbc3c7b6f02348f Mon Sep 17 00:00:00 2001 From: inexcode Date: Fri, 24 Feb 2023 13:38:24 +0300 Subject: [PATCH 438/732] fix: remove unnecessary logging --- lib/logic/cubit/forms/user/user_form_cubit.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/logic/cubit/forms/user/user_form_cubit.dart b/lib/logic/cubit/forms/user/user_form_cubit.dart index c3712382..5524417d 100644 --- a/lib/logic/cubit/forms/user/user_form_cubit.dart +++ b/lib/logic/cubit/forms/user/user_form_cubit.dart @@ -36,10 +36,6 @@ class UserFormCubit extends FormCubit { @override FutureOr onSubmit() { - print('onSubmit'); - print('initialUser: $initialUser'); - print('login: ${login.state.value}'); - print('password: ${password.state.value}'); if (initialUser == null) { final User user = User( login: login.state.value, From 0df9d2ac27fc82a8206677d9ce9bc07c5b986f96 Mon Sep 17 00:00:00 2001 From: inexcode Date: Fri, 24 Feb 2023 13:38:57 +0300 Subject: [PATCH 439/732] feat: Use Material 3 animation curves --- lib/ui/components/brand_button/segmented_buttons.dart | 4 ++-- .../brand_linear_indicator/brand_linear_indicator.dart | 4 ++-- lib/ui/layouts/root_scaffold_with_navigation.dart | 4 ++-- lib/ui/pages/onboarding/onboarding.dart | 2 +- lib/ui/router/router.dart | 8 ++++---- lib/ui/router/router.gr.dart | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/ui/components/brand_button/segmented_buttons.dart b/lib/ui/components/brand_button/segmented_buttons.dart index 7632dc20..6dcf611b 100644 --- a/lib/ui/components/brand_button/segmented_buttons.dart +++ b/lib/ui/components/brand_button/segmented_buttons.dart @@ -38,7 +38,7 @@ class SegmentedButtons extends StatelessWidget { opacity: isSelected[index] ? 1 : 0, child: AnimatedScale( duration: const Duration(milliseconds: 200), - curve: Curves.easeInOut, + curve: Curves.easeInOutCubicEmphasized, alignment: Alignment.centerLeft, scale: isSelected[index] ? 1 : 0, child: Icon( @@ -53,7 +53,7 @@ class SegmentedButtons extends StatelessWidget { ? const EdgeInsets.only(left: 24) : EdgeInsets.zero, duration: const Duration(milliseconds: 200), - curve: Curves.easeInOut, + curve: Curves.easeInOutCubicEmphasized, child: Text( title, style: Theme.of(context).textTheme.labelLarge, diff --git a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart index 335387f5..34fb9e10 100644 --- a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart +++ b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart @@ -27,14 +27,14 @@ class BrandLinearIndicator extends StatelessWidget { alignment: Alignment.centerLeft, child: AnimatedSlide( duration: const Duration(milliseconds: 400), - curve: Curves.easeInOut, + curve: Curves.easeInOutCubicEmphasized, offset: Offset( -(1 - value), 0, ), child: AnimatedContainer( duration: const Duration(milliseconds: 400), - curve: Curves.easeInOut, + curve: Curves.easeInOutCubicEmphasized, width: constraints.maxWidth, decoration: BoxDecoration( color: color, diff --git a/lib/ui/layouts/root_scaffold_with_navigation.dart b/lib/ui/layouts/root_scaffold_with_navigation.dart index f8e1048b..6401a783 100644 --- a/lib/ui/layouts/root_scaffold_with_navigation.dart +++ b/lib/ui/layouts/root_scaffold_with_navigation.dart @@ -190,9 +190,9 @@ class BottomBar extends StatelessWidget { print(prevActiveIndex); return AnimatedContainer( - duration: const Duration(milliseconds: 200), + duration: const Duration(milliseconds: 500), height: hidden ? 0 : 80, - curve: Curves.easeInOut, + curve: Curves.easeInOutCubicEmphasized, clipBehavior: Clip.antiAlias, decoration: BoxDecoration( color: Theme.of(context).scaffoldBackgroundColor, diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index 34c49b93..9da66e9d 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -76,7 +76,7 @@ class _OnboardingPageState extends State { pageController.animateToPage( 1, duration: const Duration(milliseconds: 300), - curve: Curves.easeIn, + curve: Curves.easeInOutCubicEmphasized, ); }, text: 'basis.next'.tr(), diff --git a/lib/ui/router/router.dart b/lib/ui/router/router.dart index 92c588e0..d6f8043f 100644 --- a/lib/ui/router/router.dart +++ b/lib/ui/router/router.dart @@ -53,25 +53,25 @@ Widget fadeThroughTransition( usesPathAsKey: true, initial: true, transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, ), CustomRoute( page: ServicesPage, usesPathAsKey: true, transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, ), CustomRoute( page: UsersPage, usesPathAsKey: true, transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, ), CustomRoute( page: MorePage, usesPathAsKey: true, transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, ), AutoRoute(page: AppSettingsPage), AutoRoute(page: UserDetailsPage), diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index eae72e33..e2655f39 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -64,7 +64,7 @@ class _$RootRouter extends RootStackRouter { routeData: routeData, child: const ProvidersPage(), transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, opaque: true, barrierDismissible: false, ); @@ -74,7 +74,7 @@ class _$RootRouter extends RootStackRouter { routeData: routeData, child: const ServicesPage(), transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, opaque: true, barrierDismissible: false, ); @@ -84,7 +84,7 @@ class _$RootRouter extends RootStackRouter { routeData: routeData, child: const UsersPage(), transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, opaque: true, barrierDismissible: false, ); @@ -94,7 +94,7 @@ class _$RootRouter extends RootStackRouter { routeData: routeData, child: const MorePage(), transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 200, + durationInMilliseconds: 400, opaque: true, barrierDismissible: false, ); From 1f5f366bc534f7e51c3999b46a2ad6c952d14b5b Mon Sep 17 00:00:00 2001 From: inexcode Date: Fri, 24 Feb 2023 13:44:55 +0300 Subject: [PATCH 440/732] refactor(server-api): GraphQL codegen removed dependency on JSON Serializable. --- .../schema/disk_volumes.graphql.dart | 5923 ++++++--- .../graphql_maps/schema/schema.graphql.dart | 1675 ++- .../schema/server_api.graphql.dart | 10937 +++++++++++----- .../schema/server_settings.graphql.dart | 5117 ++++++-- .../graphql_maps/schema/services.graphql.dart | 6803 +++++++--- .../graphql_maps/schema/users.graphql.dart | 6019 ++++++--- 6 files changed, 25894 insertions(+), 10580 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 359a7a27..9035da4f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -1,24 +1,70 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; -part 'disk_volumes.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -26,36 +72,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -64,25 +138,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -90,24 +174,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -116,43 +201,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -160,65 +256,1719 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumes { - Query$GetServerDiskVolumes( - {required this.storage, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$GetServerDiskVolumes.fromJson(Map json) => - _$Query$GetServerDiskVolumesFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$GetServerDiskVolumes$storage storage; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetServerDiskVolumesToJson(this); - int get hashCode { - final l$storage = storage; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$storage, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumes) || - runtimeType != other.runtimeType) return false; - final l$storage = storage; - final lOther$storage = other.storage; - if (l$storage != lOther$storage) return false; + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$GetServerDiskVolumes { + Query$GetServerDiskVolumes({ + required this.storage, + required this.$__typename, + }); + + factory Query$GetServerDiskVolumes.fromJson(Map json) { + final l$storage = json['storage']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes( + storage: Query$GetServerDiskVolumes$storage.fromJson( + (l$storage as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$GetServerDiskVolumes$storage storage; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$storage = storage; + _resultData['storage'] = l$storage.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$storage = storage; + final l$$__typename = $__typename; + return Object.hashAll([ + l$storage, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetServerDiskVolumes) || + runtimeType != other.runtimeType) { + return false; + } + final l$storage = storage; + final lOther$storage = other.storage; + if (l$storage != lOther$storage) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -226,25 +1976,34 @@ class Query$GetServerDiskVolumes { extension UtilityExtension$Query$GetServerDiskVolumes on Query$GetServerDiskVolumes { CopyWith$Query$GetServerDiskVolumes - get copyWith => CopyWith$Query$GetServerDiskVolumes(this, (i) => i); + get copyWith => CopyWith$Query$GetServerDiskVolumes( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes { factory CopyWith$Query$GetServerDiskVolumes( - Query$GetServerDiskVolumes instance, - TRes Function(Query$GetServerDiskVolumes) then) = - _CopyWithImpl$Query$GetServerDiskVolumes; + Query$GetServerDiskVolumes instance, + TRes Function(Query$GetServerDiskVolumes) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes; factory CopyWith$Query$GetServerDiskVolumes.stub(TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes; - TRes call({Query$GetServerDiskVolumes$storage? storage, String? $__typename}); + TRes call({ + Query$GetServerDiskVolumes$storage? storage, + String? $__typename, + }); CopyWith$Query$GetServerDiskVolumes$storage get storage; } class _CopyWithImpl$Query$GetServerDiskVolumes implements CopyWith$Query$GetServerDiskVolumes { - _CopyWithImpl$Query$GetServerDiskVolumes(this._instance, this._then); + _CopyWithImpl$Query$GetServerDiskVolumes( + this._instance, + this._then, + ); final Query$GetServerDiskVolumes _instance; @@ -252,14 +2011,18 @@ class _CopyWithImpl$Query$GetServerDiskVolumes static const _undefined = {}; - TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? storage = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes( - storage: storage == _undefined || storage == null - ? _instance.storage - : (storage as Query$GetServerDiskVolumes$storage), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + storage: storage == _undefined || storage == null + ? _instance.storage + : (storage as Query$GetServerDiskVolumes$storage), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetServerDiskVolumes$storage get storage { final local$storage = _instance.storage; return CopyWith$Query$GetServerDiskVolumes$storage( @@ -273,7 +2036,10 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes TRes _res; - call({Query$GetServerDiskVolumes$storage? storage, String? $__typename}) => + call({ + Query$GetServerDiskVolumes$storage? storage, + String? $__typename, + }) => _res; CopyWith$Query$GetServerDiskVolumes$storage get storage => CopyWith$Query$GetServerDiskVolumes$storage.stub(_res); @@ -281,163 +2047,188 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes const documentNodeQueryGetServerDiskVolumes = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetServerDiskVolumes'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'storage'), + type: OperationType.query, + name: NameNode(value: 'GetServerDiskVolumes'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'storage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'volumes'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'volumes'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'freeSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'model'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'root'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'serial'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'totalSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'type'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'usages'), + name: NameNode(value: 'freeSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'model'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'root'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'serial'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'totalSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'type'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usages'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + InlineFragmentNode( + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'ServiceStorageUsage'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'service'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'title'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: 'usedSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - InlineFragmentNode( - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode( - value: 'ServiceStorageUsage'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'service'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'id'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isMovable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'displayName'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])) - ])), - FieldNode( - name: NameNode(value: 'usedSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + ]), + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes( Map data) => @@ -445,52 +2236,54 @@ Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes( class Options$Query$GetServerDiskVolumes extends graphql.QueryOptions { - Options$Query$GetServerDiskVolumes( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetServerDiskVolumes, - parserFn: _parserFn$Query$GetServerDiskVolumes); + Options$Query$GetServerDiskVolumes({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetServerDiskVolumes, + parserFn: _parserFn$Query$GetServerDiskVolumes, + ); } class WatchOptions$Query$GetServerDiskVolumes extends graphql.WatchQueryOptions { - WatchOptions$Query$GetServerDiskVolumes( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetServerDiskVolumes, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetServerDiskVolumes); + WatchOptions$Query$GetServerDiskVolumes({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetServerDiskVolumes, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetServerDiskVolumes, + ); } class FetchMoreOptions$Query$GetServerDiskVolumes @@ -498,8 +2291,9 @@ class FetchMoreOptions$Query$GetServerDiskVolumes FetchMoreOptions$Query$GetServerDiskVolumes( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQueryGetServerDiskVolumes); + updateQuery: updateQuery, + document: documentNodeQueryGetServerDiskVolumes, + ); } extension ClientExtension$Query$GetServerDiskVolumes on graphql.GraphQLClient { @@ -511,66 +2305,97 @@ extension ClientExtension$Query$GetServerDiskVolumes on graphql.GraphQLClient { watchQuery$GetServerDiskVolumes( [WatchOptions$Query$GetServerDiskVolumes? options]) => this.watchQuery(options ?? WatchOptions$Query$GetServerDiskVolumes()); - void writeQuery$GetServerDiskVolumes( - {required Query$GetServerDiskVolumes data, bool broadcast = true}) => + void writeQuery$GetServerDiskVolumes({ + required Query$GetServerDiskVolumes data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumes)), - data: data.toJson(), - broadcast: broadcast); - Query$GetServerDiskVolumes? readQuery$GetServerDiskVolumes( - {bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation( document: documentNodeQueryGetServerDiskVolumes)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetServerDiskVolumes? readQuery$GetServerDiskVolumes( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryGetServerDiskVolumes)), + optimistic: optimistic, + ); return result == null ? null : Query$GetServerDiskVolumes.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage { - Query$GetServerDiskVolumes$storage( - {required this.volumes, required this.$__typename}); + Query$GetServerDiskVolumes$storage({ + required this.volumes, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storageFromJson(json); + Map json) { + final l$volumes = json['volumes']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage( + volumes: (l$volumes as List) + .map((e) => Query$GetServerDiskVolumes$storage$volumes.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List volumes; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storageToJson(this); + Map toJson() { + final _resultData = {}; + final l$volumes = volumes; + _resultData['volumes'] = l$volumes.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$volumes = volumes; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$volumes.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$volumes.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$volumes = volumes; final lOther$volumes = other.volumes; - if (l$volumes.length != lOther$volumes.length) return false; + if (l$volumes.length != lOther$volumes.length) { + return false; + } for (int i = 0; i < l$volumes.length; i++) { final l$volumes$entry = l$volumes[i]; final lOther$volumes$entry = lOther$volumes[i]; - if (l$volumes$entry != lOther$volumes$entry) return false; + if (l$volumes$entry != lOther$volumes$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -579,22 +2404,25 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage on Query$GetServerDiskVolumes$storage { CopyWith$Query$GetServerDiskVolumes$storage< Query$GetServerDiskVolumes$storage> - get copyWith => - CopyWith$Query$GetServerDiskVolumes$storage(this, (i) => i); + get copyWith => CopyWith$Query$GetServerDiskVolumes$storage( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage { factory CopyWith$Query$GetServerDiskVolumes$storage( - Query$GetServerDiskVolumes$storage instance, - TRes Function(Query$GetServerDiskVolumes$storage) then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage; + Query$GetServerDiskVolumes$storage instance, + TRes Function(Query$GetServerDiskVolumes$storage) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage; factory CopyWith$Query$GetServerDiskVolumes$storage.stub(TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage; - TRes call( - {List? volumes, - String? $__typename}); + TRes call({ + List? volumes, + String? $__typename, + }); TRes volumes( Iterable Function( Iterable< @@ -605,7 +2433,10 @@ abstract class CopyWith$Query$GetServerDiskVolumes$storage { class _CopyWithImpl$Query$GetServerDiskVolumes$storage implements CopyWith$Query$GetServerDiskVolumes$storage { - _CopyWithImpl$Query$GetServerDiskVolumes$storage(this._instance, this._then); + _CopyWithImpl$Query$GetServerDiskVolumes$storage( + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage _instance; @@ -613,14 +2444,18 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage static const _undefined = {}; - TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? volumes = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes$storage( - volumes: volumes == _undefined || volumes == null - ? _instance.volumes - : (volumes as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + volumes: volumes == _undefined || volumes == null + ? _instance.volumes + : (volumes as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes volumes( Iterable Function( Iterable< @@ -628,9 +2463,11 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage Query$GetServerDiskVolumes$storage$volumes>>) _fn) => call( - volumes: _fn(_instance.volumes.map((e) => - CopyWith$Query$GetServerDiskVolumes$storage$volumes( - e, (i) => i))).toList()); + volumes: _fn(_instance.volumes + .map((e) => CopyWith$Query$GetServerDiskVolumes$storage$volumes( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage @@ -639,31 +2476,57 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage TRes _res; - call( - {List? volumes, - String? $__typename}) => + call({ + List? volumes, + String? $__typename, + }) => _res; volumes(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes { - Query$GetServerDiskVolumes$storage$volumes( - {required this.freeSpace, - this.model, - required this.name, - required this.root, - this.serial, - required this.totalSpace, - required this.type, - required this.usages, - required this.usedSpace, - required this.$__typename}); + Query$GetServerDiskVolumes$storage$volumes({ + required this.freeSpace, + this.model, + required this.name, + required this.root, + this.serial, + required this.totalSpace, + required this.type, + required this.usages, + required this.usedSpace, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storage$volumesFromJson(json); + Map json) { + final l$freeSpace = json['freeSpace']; + final l$model = json['model']; + final l$name = json['name']; + final l$root = json['root']; + final l$serial = json['serial']; + final l$totalSpace = json['totalSpace']; + final l$type = json['type']; + final l$usages = json['usages']; + final l$usedSpace = json['usedSpace']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage$volumes( + freeSpace: (l$freeSpace as String), + model: (l$model as String?), + name: (l$name as String), + root: (l$root as bool), + serial: (l$serial as String?), + totalSpace: (l$totalSpace as String), + type: (l$type as String), + usages: (l$usages as List) + .map((e) => + Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( + (e as Map))) + .toList(), + usedSpace: (l$usedSpace as String), + $__typename: (l$$__typename as String), + ); + } final String freeSpace; @@ -683,11 +2546,34 @@ class Query$GetServerDiskVolumes$storage$volumes { final String usedSpace; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumesToJson(this); + Map toJson() { + final _resultData = {}; + final l$freeSpace = freeSpace; + _resultData['freeSpace'] = l$freeSpace; + final l$model = model; + _resultData['model'] = l$model; + final l$name = name; + _resultData['name'] = l$name; + final l$root = root; + _resultData['root'] = l$root; + final l$serial = serial; + _resultData['serial'] = l$serial; + final l$totalSpace = totalSpace; + _resultData['totalSpace'] = l$totalSpace; + final l$type = type; + _resultData['type'] = l$type; + final l$usages = usages; + _resultData['usages'] = l$usages.map((e) => e.toJson()).toList(); + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$freeSpace = freeSpace; final l$model = model; @@ -709,51 +2595,76 @@ class Query$GetServerDiskVolumes$storage$volumes { l$type, Object.hashAll(l$usages.map((v) => v)), l$usedSpace, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$freeSpace = freeSpace; final lOther$freeSpace = other.freeSpace; - if (l$freeSpace != lOther$freeSpace) return false; + if (l$freeSpace != lOther$freeSpace) { + return false; + } final l$model = model; final lOther$model = other.model; - if (l$model != lOther$model) return false; + if (l$model != lOther$model) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$root = root; final lOther$root = other.root; - if (l$root != lOther$root) return false; + if (l$root != lOther$root) { + return false; + } final l$serial = serial; final lOther$serial = other.serial; - if (l$serial != lOther$serial) return false; + if (l$serial != lOther$serial) { + return false; + } final l$totalSpace = totalSpace; final lOther$totalSpace = other.totalSpace; - if (l$totalSpace != lOther$totalSpace) return false; + if (l$totalSpace != lOther$totalSpace) { + return false; + } final l$type = type; final lOther$type = other.type; - if (l$type != lOther$type) return false; + if (l$type != lOther$type) { + return false; + } final l$usages = usages; final lOther$usages = other.usages; - if (l$usages.length != lOther$usages.length) return false; + if (l$usages.length != lOther$usages.length) { + return false; + } for (int i = 0; i < l$usages.length; i++) { final l$usages$entry = l$usages[i]; final lOther$usages$entry = lOther$usages[i]; - if (l$usages$entry != lOther$usages$entry) return false; + if (l$usages$entry != lOther$usages$entry) { + return false; + } } - final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; + if (l$usedSpace != lOther$usedSpace) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -762,30 +2673,33 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes on Query$GetServerDiskVolumes$storage$volumes { CopyWith$Query$GetServerDiskVolumes$storage$volumes< Query$GetServerDiskVolumes$storage$volumes> - get copyWith => - CopyWith$Query$GetServerDiskVolumes$storage$volumes(this, (i) => i); + get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes( - Query$GetServerDiskVolumes$storage$volumes instance, - TRes Function(Query$GetServerDiskVolumes$storage$volumes) then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes; + Query$GetServerDiskVolumes$storage$volumes instance, + TRes Function(Query$GetServerDiskVolumes$storage$volumes) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes.stub(TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes; - TRes call( - {String? freeSpace, - String? model, - String? name, - bool? root, - String? serial, - String? totalSpace, - String? type, - List? usages, - String? usedSpace, - String? $__typename}); + TRes call({ + String? freeSpace, + String? model, + String? name, + bool? root, + String? serial, + String? totalSpace, + String? type, + List? usages, + String? usedSpace, + String? $__typename, + }); TRes usages( Iterable Function( Iterable< @@ -797,7 +2711,9 @@ abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes { class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes implements CopyWith$Query$GetServerDiskVolumes$storage$volumes { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes _instance; @@ -805,45 +2721,47 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes static const _undefined = {}; - TRes call( - {Object? freeSpace = _undefined, - Object? model = _undefined, - Object? name = _undefined, - Object? root = _undefined, - Object? serial = _undefined, - Object? totalSpace = _undefined, - Object? type = _undefined, - Object? usages = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? freeSpace = _undefined, + Object? model = _undefined, + Object? name = _undefined, + Object? root = _undefined, + Object? serial = _undefined, + Object? totalSpace = _undefined, + Object? type = _undefined, + Object? usages = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes$storage$volumes( - freeSpace: freeSpace == _undefined || freeSpace == null - ? _instance.freeSpace - : (freeSpace as String), - model: model == _undefined ? _instance.model : (model as String?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - root: root == _undefined || root == null - ? _instance.root - : (root as bool), - serial: serial == _undefined ? _instance.serial : (serial as String?), - totalSpace: totalSpace == _undefined || totalSpace == null - ? _instance.totalSpace - : (totalSpace as String), - type: type == _undefined || type == null - ? _instance.type - : (type as String), - usages: usages == _undefined || usages == null - ? _instance.usages - : (usages - as List), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + freeSpace: freeSpace == _undefined || freeSpace == null + ? _instance.freeSpace + : (freeSpace as String), + model: model == _undefined ? _instance.model : (model as String?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + root: root == _undefined || root == null + ? _instance.root + : (root as bool), + serial: serial == _undefined ? _instance.serial : (serial as String?), + totalSpace: totalSpace == _undefined || totalSpace == null + ? _instance.totalSpace + : (totalSpace as String), + type: type == _undefined || type == null + ? _instance.type + : (type as String), + usages: usages == _undefined || usages == null + ? _instance.usages + : (usages + as List), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes usages( Iterable Function( Iterable< @@ -851,9 +2769,11 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes Query$GetServerDiskVolumes$storage$volumes$usages>>) _fn) => call( - usages: _fn(_instance.usages.map((e) => - CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( - e, (i) => i))).toList()); + usages: _fn(_instance.usages.map( + (e) => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes @@ -862,38 +2782,45 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes TRes _res; - call( - {String? freeSpace, - String? model, - String? name, - bool? root, - String? serial, - String? totalSpace, - String? type, - List? usages, - String? usedSpace, - String? $__typename}) => + call({ + String? freeSpace, + String? model, + String? name, + bool? root, + String? serial, + String? totalSpace, + String? type, + List? usages, + String? usedSpace, + String? $__typename, + }) => _res; usages(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes$usages { - Query$GetServerDiskVolumes$storage$volumes$usages( - {required this.title, - required this.usedSpace, - required this.$__typename}); + Query$GetServerDiskVolumes$storage$volumes$usages({ + required this.title, + required this.usedSpace, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( Map json) { switch (json["__typename"] as String) { case "ServiceStorageUsage": return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage .fromJson(json); + default: - return _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( - json); + final l$title = json['title']; + final l$usedSpace = json['usedSpace']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage$volumes$usages( + title: (l$title as String), + usedSpace: (l$usedSpace as String), + $__typename: (l$$__typename as String), + ); } } @@ -901,32 +2828,55 @@ class Query$GetServerDiskVolumes$storage$volumes$usages { final String usedSpace; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson(this); + Map toJson() { + final _resultData = {}; + final l$title = title; + _resultData['title'] = l$title; + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$title = title; final l$usedSpace = usedSpace; final l$$__typename = $__typename; - return Object.hashAll([l$title, l$usedSpace, l$$__typename]); + return Object.hashAll([ + l$title, + l$usedSpace, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$title = title; final lOther$title = other.title; - if (l$title != lOther$title) return false; + if (l$title != lOther$title) { + return false; + } final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; + if (l$usedSpace != lOther$usedSpace) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -937,29 +2887,36 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages Query$GetServerDiskVolumes$storage$volumes$usages> get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages< TRes> { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages( - Query$GetServerDiskVolumes$storage$volumes$usages instance, - TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) - then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages; + Query$GetServerDiskVolumes$storage$volumes$usages instance, + TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages.stub( TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages; - TRes call({String? title, String? usedSpace, String? $__typename}); + TRes call({ + String? title, + String? usedSpace, + String? $__typename, + }); } class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages implements CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes$usages _instance; @@ -967,20 +2924,22 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages static const _undefined = {}; - TRes call( - {Object? title = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? title = _undefined, + Object? usedSpace = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetServerDiskVolumes$storage$volumes$usages( - title: title == _undefined || title == null - ? _instance.title - : (title as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages @@ -991,63 +2950,106 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages TRes _res; - call({String? title, String? usedSpace, String? $__typename}) => _res; + call({ + String? title, + String? usedSpace, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage implements Query$GetServerDiskVolumes$storage$volumes$usages { - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - {required this.title, - required this.usedSpace, - required this.$__typename, - this.service}); + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage({ + this.service, + required this.$__typename, + required this.title, + required this.usedSpace, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( - json); + Map json) { + final l$service = json['service']; + final l$$__typename = json['__typename']; + final l$title = json['title']; + final l$usedSpace = json['usedSpace']; + return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + service: l$service == null + ? null + : Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + .fromJson((l$service as Map)), + $__typename: (l$$__typename as String), + title: (l$title as String), + usedSpace: (l$usedSpace as String), + ); + } + + final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service; + + final String $__typename; final String title; final String usedSpace; - @JsonKey(name: '__typename') - final String $__typename; + Map toJson() { + final _resultData = {}; + final l$service = service; + _resultData['service'] = l$service?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$title = title; + _resultData['title'] = l$title; + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + return _resultData; + } - final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? - service; - - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( - this); + @override int get hashCode { + final l$service = service; + final l$$__typename = $__typename; final l$title = title; final l$usedSpace = usedSpace; - final l$$__typename = $__typename; - final l$service = service; - return Object.hashAll([l$title, l$usedSpace, l$$__typename, l$service]); + return Object.hashAll([ + l$service, + l$$__typename, + l$title, + l$usedSpace, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) || - runtimeType != other.runtimeType) return false; - final l$title = title; - final lOther$title = other.title; - if (l$title != lOther$title) return false; - final l$usedSpace = usedSpace; - final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + runtimeType != other.runtimeType) { + return false; + } final l$service = service; final lOther$service = other.service; - if (l$service != lOther$service) return false; + if (l$service != lOther$service) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) { + return false; + } + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) { + return false; + } return true; } } @@ -1058,29 +3060,32 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$Se Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage> get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< TRes> { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage - instance, - TRes Function( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) - then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + instance, + TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) + then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage.stub( TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage; - TRes call( - {String? title, - String? usedSpace, - String? $__typename, - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? - service}); + TRes call({ + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service, + String? $__typename, + String? title, + String? usedSpace, + }); CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> get service; } @@ -1091,7 +3096,9 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage< TRes> { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage _instance; @@ -1102,25 +3109,28 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt static const _undefined = {}; - TRes call( - {Object? title = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined, - Object? service = _undefined}) => - _then(Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - title: title == _undefined || title == null - ? _instance.title - : (title as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - service: service == _undefined - ? _instance.service - : (service - as Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service?))); + TRes call({ + Object? service = _undefined, + Object? $__typename = _undefined, + Object? title = _undefined, + Object? usedSpace = _undefined, + }) => + _then( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + service: service == _undefined + ? _instance.service + : (service + as Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + )); CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> get service { final local$service = _instance.service; @@ -1142,12 +3152,13 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$Servi TRes _res; - call( - {String? title, - String? usedSpace, - String? $__typename, - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? - service}) => + call({ + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service, + String? $__typename, + String? title, + String? usedSpace, + }) => _res; CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> @@ -1156,19 +3167,27 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$Servi .stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service { - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - {required this.id, - required this.isMovable, - required this.displayName, - required this.$__typename}); + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service({ + required this.id, + required this.isMovable, + required this.displayName, + required this.$__typename, + }); - @override factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.fromJson( - Map json) => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( - json); + Map json) { + final l$id = json['id']; + final l$isMovable = json['isMovable']; + final l$displayName = json['displayName']; + final l$$__typename = json['__typename']; + return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + id: (l$id as String), + isMovable: (l$isMovable as bool), + displayName: (l$displayName as String), + $__typename: (l$$__typename as String), + ); + } final String id; @@ -1176,38 +3195,65 @@ class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$ser final String displayName; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( - this); + Map toJson() { + final _resultData = {}; + final l$id = id; + _resultData['id'] = l$id; + final l$isMovable = isMovable; + _resultData['isMovable'] = l$isMovable; + final l$displayName = displayName; + _resultData['displayName'] = l$displayName; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$id = id; final l$isMovable = isMovable; final l$displayName = displayName; final l$$__typename = $__typename; - return Object.hashAll([l$id, l$isMovable, l$displayName, l$$__typename]); + return Object.hashAll([ + l$id, + l$isMovable, + l$displayName, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$id = id; final lOther$id = other.id; - if (l$id != lOther$id) return false; + if (l$id != lOther$id) { + return false; + } final l$isMovable = isMovable; final lOther$isMovable = other.isMovable; - if (l$isMovable != lOther$isMovable) return false; + if (l$isMovable != lOther$isMovable) { + return false; + } final l$displayName = displayName; final lOther$displayName = other.displayName; - if (l$displayName != lOther$displayName) return false; + if (l$displayName != lOther$displayName) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1218,25 +3264,31 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$Se Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service> get copyWith => CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> { factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - instance, - TRes Function( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) - then) = - _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + instance, + TRes Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) + then, + ) = _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; factory CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.stub( TRes res) = _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service; - TRes call( - {String? id, bool? isMovable, String? displayName, String? $__typename}); + TRes call({ + String? id, + bool? isMovable, + String? displayName, + String? $__typename, + }); } class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< @@ -1245,7 +3297,9 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< TRes> { _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - this._instance, this._then); + this._instance, + this._then, + ); final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service _instance; @@ -1256,25 +3310,25 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt static const _undefined = {}; - TRes call( - {Object? id = _undefined, - Object? isMovable = _undefined, - Object? displayName = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? id = _undefined, + Object? isMovable = _undefined, + Object? displayName = _undefined, + Object? $__typename = _undefined, + }) => _then( Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - id: id == _undefined || id == null - ? _instance.id - : (id as String), - isMovable: isMovable == _undefined || isMovable == null - ? _instance.isMovable - : (isMovable as bool), - displayName: displayName == _undefined || displayName == null - ? _instance.displayName - : (displayName as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + id: id == _undefined || id == null ? _instance.id : (id as String), + isMovable: isMovable == _undefined || isMovable == null + ? _instance.isMovable + : (isMovable as bool), + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service< @@ -1287,50 +3341,74 @@ class _CopyWithStubImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$Servi TRes _res; - call( - {String? id, - bool? isMovable, - String? displayName, - String? $__typename}) => + call({ + String? id, + bool? isMovable, + String? displayName, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$MountVolume { - Variables$Mutation$MountVolume({required this.name}); + factory Variables$Mutation$MountVolume({required String name}) => + Variables$Mutation$MountVolume._({ + r'name': name, + }); + + Variables$Mutation$MountVolume._(this._$data); + + factory Variables$Mutation$MountVolume.fromJson(Map data) { + final result$data = {}; + final l$name = data['name']; + result$data['name'] = (l$name as String); + return Variables$Mutation$MountVolume._(result$data); + } + + Map _$data; + + String get name => (_$data['name'] as String); + Map toJson() { + final result$data = {}; + final l$name = name; + result$data['name'] = l$name; + return result$data; + } + + CopyWith$Variables$Mutation$MountVolume + get copyWith => CopyWith$Variables$Mutation$MountVolume( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$MountVolume) || + runtimeType != other.runtimeType) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + return true; + } @override - factory Variables$Mutation$MountVolume.fromJson(Map json) => - _$Variables$Mutation$MountVolumeFromJson(json); - - final String name; - - Map toJson() => _$Variables$Mutation$MountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MountVolume) || - runtimeType != other.runtimeType) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - return true; - } - - CopyWith$Variables$Mutation$MountVolume - get copyWith => CopyWith$Variables$Mutation$MountVolume(this, (i) => i); } abstract class CopyWith$Variables$Mutation$MountVolume { factory CopyWith$Variables$Mutation$MountVolume( - Variables$Mutation$MountVolume instance, - TRes Function(Variables$Mutation$MountVolume) then) = - _CopyWithImpl$Variables$Mutation$MountVolume; + Variables$Mutation$MountVolume instance, + TRes Function(Variables$Mutation$MountVolume) then, + ) = _CopyWithImpl$Variables$Mutation$MountVolume; factory CopyWith$Variables$Mutation$MountVolume.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$MountVolume; @@ -1340,7 +3418,10 @@ abstract class CopyWith$Variables$Mutation$MountVolume { class _CopyWithImpl$Variables$Mutation$MountVolume implements CopyWith$Variables$Mutation$MountVolume { - _CopyWithImpl$Variables$Mutation$MountVolume(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$MountVolume( + this._instance, + this._then, + ); final Variables$Mutation$MountVolume _instance; @@ -1349,10 +3430,10 @@ class _CopyWithImpl$Variables$Mutation$MountVolume static const _undefined = {}; TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$MountVolume( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); + _then(Variables$Mutation$MountVolume._({ + ..._instance._$data, + if (name != _undefined && name != null) 'name': (name as String), + })); } class _CopyWithStubImpl$Variables$Mutation$MountVolume @@ -1364,62 +3445,97 @@ class _CopyWithStubImpl$Variables$Mutation$MountVolume call({String? name}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$MountVolume { - Mutation$MountVolume({required this.mountVolume, required this.$__typename}); + Mutation$MountVolume({ + required this.mountVolume, + required this.$__typename, + }); - @override - factory Mutation$MountVolume.fromJson(Map json) => - _$Mutation$MountVolumeFromJson(json); + factory Mutation$MountVolume.fromJson(Map json) { + final l$mountVolume = json['mountVolume']; + final l$$__typename = json['__typename']; + return Mutation$MountVolume( + mountVolume: Mutation$MountVolume$mountVolume.fromJson( + (l$mountVolume as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$MountVolume$mountVolume mountVolume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$mountVolume = mountVolume; + _resultData['mountVolume'] = l$mountVolume.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$mountVolume = mountVolume; final l$$__typename = $__typename; - return Object.hashAll([l$mountVolume, l$$__typename]); + return Object.hashAll([ + l$mountVolume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$MountVolume) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$MountVolume) || runtimeType != other.runtimeType) { return false; + } final l$mountVolume = mountVolume; final lOther$mountVolume = other.mountVolume; - if (l$mountVolume != lOther$mountVolume) return false; + if (l$mountVolume != lOther$mountVolume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$MountVolume on Mutation$MountVolume { CopyWith$Mutation$MountVolume get copyWith => - CopyWith$Mutation$MountVolume(this, (i) => i); + CopyWith$Mutation$MountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MountVolume { - factory CopyWith$Mutation$MountVolume(Mutation$MountVolume instance, - TRes Function(Mutation$MountVolume) then) = - _CopyWithImpl$Mutation$MountVolume; + factory CopyWith$Mutation$MountVolume( + Mutation$MountVolume instance, + TRes Function(Mutation$MountVolume) then, + ) = _CopyWithImpl$Mutation$MountVolume; factory CopyWith$Mutation$MountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$MountVolume; - TRes call( - {Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}); + TRes call({ + Mutation$MountVolume$mountVolume? mountVolume, + String? $__typename, + }); CopyWith$Mutation$MountVolume$mountVolume get mountVolume; } class _CopyWithImpl$Mutation$MountVolume implements CopyWith$Mutation$MountVolume { - _CopyWithImpl$Mutation$MountVolume(this._instance, this._then); + _CopyWithImpl$Mutation$MountVolume( + this._instance, + this._then, + ); final Mutation$MountVolume _instance; @@ -1427,16 +3543,18 @@ class _CopyWithImpl$Mutation$MountVolume static const _undefined = {}; - TRes call( - {Object? mountVolume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? mountVolume = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MountVolume( - mountVolume: mountVolume == _undefined || mountVolume == null - ? _instance.mountVolume - : (mountVolume as Mutation$MountVolume$mountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + mountVolume: mountVolume == _undefined || mountVolume == null + ? _instance.mountVolume + : (mountVolume as Mutation$MountVolume$mountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$MountVolume$mountVolume get mountVolume { final local$mountVolume = _instance.mountVolume; return CopyWith$Mutation$MountVolume$mountVolume( @@ -1450,7 +3568,10 @@ class _CopyWithStubImpl$Mutation$MountVolume TRes _res; - call({Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}) => + call({ + Mutation$MountVolume$mountVolume? mountVolume, + String? $__typename, + }) => _res; CopyWith$Mutation$MountVolume$mountVolume get mountVolume => CopyWith$Mutation$MountVolume$mountVolume.stub(_res); @@ -1458,83 +3579,97 @@ class _CopyWithStubImpl$Mutation$MountVolume const documentNodeMutationMountVolume = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'MountVolume'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'name')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'mountVolume'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'name'), - value: VariableNode(name: NameNode(value: 'name'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'MountVolume'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'mountVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$MountVolume _parserFn$Mutation$MountVolume( Map data) => Mutation$MountVolume.fromJson(data); typedef OnMutationCompleted$Mutation$MountVolume = FutureOr Function( - dynamic, Mutation$MountVolume?); + dynamic, + Mutation$MountVolume?, +); class Options$Mutation$MountVolume extends graphql.MutationOptions { - Options$Mutation$MountVolume( - {String? operationName, - required Variables$Mutation$MountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$MountVolume? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$MountVolume({ + String? operationName, + required Variables$Mutation$MountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MountVolume? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$MountVolume(data)), - update: update, - onError: onError, - document: documentNodeMutationMountVolume, - parserFn: _parserFn$Mutation$MountVolume); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$MountVolume(data), + ), + update: update, + onError: onError, + document: documentNodeMutationMountVolume, + parserFn: _parserFn$Mutation$MountVolume, + ); final OnMutationCompleted$Mutation$MountVolume? onCompletedWithParsed; @@ -1543,38 +3678,39 @@ class Options$Mutation$MountVolume ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$MountVolume extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MountVolume( - {String? operationName, - required Variables$Mutation$MountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationMountVolume, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MountVolume); + WatchOptions$Mutation$MountVolume({ + String? operationName, + required Variables$Mutation$MountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMountVolume, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MountVolume, + ); } extension ClientExtension$Mutation$MountVolume on graphql.GraphQLClient { @@ -1586,19 +3722,27 @@ extension ClientExtension$Mutation$MountVolume on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$MountVolume$mountVolume - implements Fragment$basicMutationReturnFields { - Mutation$MountVolume$mountVolume( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$MountVolume$mountVolume({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$MountVolume$mountVolume.fromJson( - Map json) => - _$Mutation$MountVolume$mountVolumeFromJson(json); + factory Mutation$MountVolume$mountVolume.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$MountVolume$mountVolume( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1606,36 +3750,64 @@ class Mutation$MountVolume$mountVolume final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$MountVolume$mountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MountVolume$mountVolume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1643,24 +3815,35 @@ class Mutation$MountVolume$mountVolume extension UtilityExtension$Mutation$MountVolume$mountVolume on Mutation$MountVolume$mountVolume { CopyWith$Mutation$MountVolume$mountVolume - get copyWith => CopyWith$Mutation$MountVolume$mountVolume(this, (i) => i); + get copyWith => CopyWith$Mutation$MountVolume$mountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MountVolume$mountVolume { factory CopyWith$Mutation$MountVolume$mountVolume( - Mutation$MountVolume$mountVolume instance, - TRes Function(Mutation$MountVolume$mountVolume) then) = - _CopyWithImpl$Mutation$MountVolume$mountVolume; + Mutation$MountVolume$mountVolume instance, + TRes Function(Mutation$MountVolume$mountVolume) then, + ) = _CopyWithImpl$Mutation$MountVolume$mountVolume; factory CopyWith$Mutation$MountVolume$mountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$MountVolume$mountVolume; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$MountVolume$mountVolume implements CopyWith$Mutation$MountVolume$mountVolume { - _CopyWithImpl$Mutation$MountVolume$mountVolume(this._instance, this._then); + _CopyWithImpl$Mutation$MountVolume$mountVolume( + this._instance, + this._then, + ); final Mutation$MountVolume$mountVolume _instance; @@ -1668,24 +3851,25 @@ class _CopyWithImpl$Mutation$MountVolume$mountVolume static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MountVolume$mountVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$MountVolume$mountVolume @@ -1694,47 +3878,74 @@ class _CopyWithStubImpl$Mutation$MountVolume$mountVolume TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$ResizeVolume { - Variables$Mutation$ResizeVolume({required this.name}); + factory Variables$Mutation$ResizeVolume({required String name}) => + Variables$Mutation$ResizeVolume._({ + r'name': name, + }); + + Variables$Mutation$ResizeVolume._(this._$data); + + factory Variables$Mutation$ResizeVolume.fromJson(Map data) { + final result$data = {}; + final l$name = data['name']; + result$data['name'] = (l$name as String); + return Variables$Mutation$ResizeVolume._(result$data); + } + + Map _$data; + + String get name => (_$data['name'] as String); + Map toJson() { + final result$data = {}; + final l$name = name; + result$data['name'] = l$name; + return result$data; + } + + CopyWith$Variables$Mutation$ResizeVolume + get copyWith => CopyWith$Variables$Mutation$ResizeVolume( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$ResizeVolume) || + runtimeType != other.runtimeType) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + return true; + } @override - factory Variables$Mutation$ResizeVolume.fromJson(Map json) => - _$Variables$Mutation$ResizeVolumeFromJson(json); - - final String name; - - Map toJson() => - _$Variables$Mutation$ResizeVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ResizeVolume) || - runtimeType != other.runtimeType) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - return true; - } - - CopyWith$Variables$Mutation$ResizeVolume - get copyWith => CopyWith$Variables$Mutation$ResizeVolume(this, (i) => i); } abstract class CopyWith$Variables$Mutation$ResizeVolume { factory CopyWith$Variables$Mutation$ResizeVolume( - Variables$Mutation$ResizeVolume instance, - TRes Function(Variables$Mutation$ResizeVolume) then) = - _CopyWithImpl$Variables$Mutation$ResizeVolume; + Variables$Mutation$ResizeVolume instance, + TRes Function(Variables$Mutation$ResizeVolume) then, + ) = _CopyWithImpl$Variables$Mutation$ResizeVolume; factory CopyWith$Variables$Mutation$ResizeVolume.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$ResizeVolume; @@ -1744,7 +3955,10 @@ abstract class CopyWith$Variables$Mutation$ResizeVolume { class _CopyWithImpl$Variables$Mutation$ResizeVolume implements CopyWith$Variables$Mutation$ResizeVolume { - _CopyWithImpl$Variables$Mutation$ResizeVolume(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$ResizeVolume( + this._instance, + this._then, + ); final Variables$Mutation$ResizeVolume _instance; @@ -1753,10 +3967,10 @@ class _CopyWithImpl$Variables$Mutation$ResizeVolume static const _undefined = {}; TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$ResizeVolume( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); + _then(Variables$Mutation$ResizeVolume._({ + ..._instance._$data, + if (name != _undefined && name != null) 'name': (name as String), + })); } class _CopyWithStubImpl$Variables$Mutation$ResizeVolume @@ -1768,63 +3982,97 @@ class _CopyWithStubImpl$Variables$Mutation$ResizeVolume call({String? name}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$ResizeVolume { - Mutation$ResizeVolume( - {required this.resizeVolume, required this.$__typename}); + Mutation$ResizeVolume({ + required this.resizeVolume, + required this.$__typename, + }); - @override - factory Mutation$ResizeVolume.fromJson(Map json) => - _$Mutation$ResizeVolumeFromJson(json); + factory Mutation$ResizeVolume.fromJson(Map json) { + final l$resizeVolume = json['resizeVolume']; + final l$$__typename = json['__typename']; + return Mutation$ResizeVolume( + resizeVolume: Mutation$ResizeVolume$resizeVolume.fromJson( + (l$resizeVolume as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$ResizeVolume$resizeVolume resizeVolume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$ResizeVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$resizeVolume = resizeVolume; + _resultData['resizeVolume'] = l$resizeVolume.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$resizeVolume = resizeVolume; final l$$__typename = $__typename; - return Object.hashAll([l$resizeVolume, l$$__typename]); + return Object.hashAll([ + l$resizeVolume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$ResizeVolume) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ResizeVolume) || runtimeType != other.runtimeType) { return false; + } final l$resizeVolume = resizeVolume; final lOther$resizeVolume = other.resizeVolume; - if (l$resizeVolume != lOther$resizeVolume) return false; + if (l$resizeVolume != lOther$resizeVolume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$ResizeVolume on Mutation$ResizeVolume { CopyWith$Mutation$ResizeVolume get copyWith => - CopyWith$Mutation$ResizeVolume(this, (i) => i); + CopyWith$Mutation$ResizeVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ResizeVolume { - factory CopyWith$Mutation$ResizeVolume(Mutation$ResizeVolume instance, - TRes Function(Mutation$ResizeVolume) then) = - _CopyWithImpl$Mutation$ResizeVolume; + factory CopyWith$Mutation$ResizeVolume( + Mutation$ResizeVolume instance, + TRes Function(Mutation$ResizeVolume) then, + ) = _CopyWithImpl$Mutation$ResizeVolume; factory CopyWith$Mutation$ResizeVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$ResizeVolume; - TRes call( - {Mutation$ResizeVolume$resizeVolume? resizeVolume, String? $__typename}); + TRes call({ + Mutation$ResizeVolume$resizeVolume? resizeVolume, + String? $__typename, + }); CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume; } class _CopyWithImpl$Mutation$ResizeVolume implements CopyWith$Mutation$ResizeVolume { - _CopyWithImpl$Mutation$ResizeVolume(this._instance, this._then); + _CopyWithImpl$Mutation$ResizeVolume( + this._instance, + this._then, + ); final Mutation$ResizeVolume _instance; @@ -1832,16 +4080,18 @@ class _CopyWithImpl$Mutation$ResizeVolume static const _undefined = {}; - TRes call( - {Object? resizeVolume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? resizeVolume = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ResizeVolume( - resizeVolume: resizeVolume == _undefined || resizeVolume == null - ? _instance.resizeVolume - : (resizeVolume as Mutation$ResizeVolume$resizeVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + resizeVolume: resizeVolume == _undefined || resizeVolume == null + ? _instance.resizeVolume + : (resizeVolume as Mutation$ResizeVolume$resizeVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume { final local$resizeVolume = _instance.resizeVolume; return CopyWith$Mutation$ResizeVolume$resizeVolume( @@ -1855,9 +4105,10 @@ class _CopyWithStubImpl$Mutation$ResizeVolume TRes _res; - call( - {Mutation$ResizeVolume$resizeVolume? resizeVolume, - String? $__typename}) => + call({ + Mutation$ResizeVolume$resizeVolume? resizeVolume, + String? $__typename, + }) => _res; CopyWith$Mutation$ResizeVolume$resizeVolume get resizeVolume => CopyWith$Mutation$ResizeVolume$resizeVolume.stub(_res); @@ -1865,86 +4116,97 @@ class _CopyWithStubImpl$Mutation$ResizeVolume const documentNodeMutationResizeVolume = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'ResizeVolume'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'name')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'resizeVolume'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'name'), - value: VariableNode(name: NameNode(value: 'name'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'ResizeVolume'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'resizeVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$ResizeVolume _parserFn$Mutation$ResizeVolume( Map data) => Mutation$ResizeVolume.fromJson(data); typedef OnMutationCompleted$Mutation$ResizeVolume = FutureOr Function( - dynamic, Mutation$ResizeVolume?); + dynamic, + Mutation$ResizeVolume?, +); class Options$Mutation$ResizeVolume extends graphql.MutationOptions { - Options$Mutation$ResizeVolume( - {String? operationName, - required Variables$Mutation$ResizeVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$ResizeVolume? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$ResizeVolume({ + String? operationName, + required Variables$Mutation$ResizeVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ResizeVolume? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$ResizeVolume(data)), - update: update, - onError: onError, - document: documentNodeMutationResizeVolume, - parserFn: _parserFn$Mutation$ResizeVolume); + data == null ? null : _parserFn$Mutation$ResizeVolume(data), + ), + update: update, + onError: onError, + document: documentNodeMutationResizeVolume, + parserFn: _parserFn$Mutation$ResizeVolume, + ); final OnMutationCompleted$Mutation$ResizeVolume? onCompletedWithParsed; @@ -1953,38 +4215,39 @@ class Options$Mutation$ResizeVolume ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$ResizeVolume extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ResizeVolume( - {String? operationName, - required Variables$Mutation$ResizeVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationResizeVolume, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ResizeVolume); + WatchOptions$Mutation$ResizeVolume({ + String? operationName, + required Variables$Mutation$ResizeVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationResizeVolume, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ResizeVolume, + ); } extension ClientExtension$Mutation$ResizeVolume on graphql.GraphQLClient { @@ -1996,19 +4259,28 @@ extension ClientExtension$Mutation$ResizeVolume on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$ResizeVolume$resizeVolume - implements Fragment$basicMutationReturnFields { - Mutation$ResizeVolume$resizeVolume( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$ResizeVolume$resizeVolume({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$ResizeVolume$resizeVolume.fromJson( - Map json) => - _$Mutation$ResizeVolume$resizeVolumeFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$ResizeVolume$resizeVolume( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2016,36 +4288,64 @@ class Mutation$ResizeVolume$resizeVolume final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$ResizeVolume$resizeVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ResizeVolume$resizeVolume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2054,25 +4354,35 @@ extension UtilityExtension$Mutation$ResizeVolume$resizeVolume on Mutation$ResizeVolume$resizeVolume { CopyWith$Mutation$ResizeVolume$resizeVolume< Mutation$ResizeVolume$resizeVolume> - get copyWith => - CopyWith$Mutation$ResizeVolume$resizeVolume(this, (i) => i); + get copyWith => CopyWith$Mutation$ResizeVolume$resizeVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ResizeVolume$resizeVolume { factory CopyWith$Mutation$ResizeVolume$resizeVolume( - Mutation$ResizeVolume$resizeVolume instance, - TRes Function(Mutation$ResizeVolume$resizeVolume) then) = - _CopyWithImpl$Mutation$ResizeVolume$resizeVolume; + Mutation$ResizeVolume$resizeVolume instance, + TRes Function(Mutation$ResizeVolume$resizeVolume) then, + ) = _CopyWithImpl$Mutation$ResizeVolume$resizeVolume; factory CopyWith$Mutation$ResizeVolume$resizeVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$ResizeVolume$resizeVolume implements CopyWith$Mutation$ResizeVolume$resizeVolume { - _CopyWithImpl$Mutation$ResizeVolume$resizeVolume(this._instance, this._then); + _CopyWithImpl$Mutation$ResizeVolume$resizeVolume( + this._instance, + this._then, + ); final Mutation$ResizeVolume$resizeVolume _instance; @@ -2080,24 +4390,25 @@ class _CopyWithImpl$Mutation$ResizeVolume$resizeVolume static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ResizeVolume$resizeVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume @@ -2106,48 +4417,74 @@ class _CopyWithStubImpl$Mutation$ResizeVolume$resizeVolume TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$UnmountVolume { - Variables$Mutation$UnmountVolume({required this.name}); + factory Variables$Mutation$UnmountVolume({required String name}) => + Variables$Mutation$UnmountVolume._({ + r'name': name, + }); + + Variables$Mutation$UnmountVolume._(this._$data); + + factory Variables$Mutation$UnmountVolume.fromJson(Map data) { + final result$data = {}; + final l$name = data['name']; + result$data['name'] = (l$name as String); + return Variables$Mutation$UnmountVolume._(result$data); + } + + Map _$data; + + String get name => (_$data['name'] as String); + Map toJson() { + final result$data = {}; + final l$name = name; + result$data['name'] = l$name; + return result$data; + } + + CopyWith$Variables$Mutation$UnmountVolume + get copyWith => CopyWith$Variables$Mutation$UnmountVolume( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$UnmountVolume) || + runtimeType != other.runtimeType) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + return true; + } @override - factory Variables$Mutation$UnmountVolume.fromJson( - Map json) => - _$Variables$Mutation$UnmountVolumeFromJson(json); - - final String name; - - Map toJson() => - _$Variables$Mutation$UnmountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UnmountVolume) || - runtimeType != other.runtimeType) return false; - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) return false; - return true; - } - - CopyWith$Variables$Mutation$UnmountVolume - get copyWith => CopyWith$Variables$Mutation$UnmountVolume(this, (i) => i); } abstract class CopyWith$Variables$Mutation$UnmountVolume { factory CopyWith$Variables$Mutation$UnmountVolume( - Variables$Mutation$UnmountVolume instance, - TRes Function(Variables$Mutation$UnmountVolume) then) = - _CopyWithImpl$Variables$Mutation$UnmountVolume; + Variables$Mutation$UnmountVolume instance, + TRes Function(Variables$Mutation$UnmountVolume) then, + ) = _CopyWithImpl$Variables$Mutation$UnmountVolume; factory CopyWith$Variables$Mutation$UnmountVolume.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UnmountVolume; @@ -2157,7 +4494,10 @@ abstract class CopyWith$Variables$Mutation$UnmountVolume { class _CopyWithImpl$Variables$Mutation$UnmountVolume implements CopyWith$Variables$Mutation$UnmountVolume { - _CopyWithImpl$Variables$Mutation$UnmountVolume(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$UnmountVolume( + this._instance, + this._then, + ); final Variables$Mutation$UnmountVolume _instance; @@ -2166,10 +4506,10 @@ class _CopyWithImpl$Variables$Mutation$UnmountVolume static const _undefined = {}; TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$UnmountVolume( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); + _then(Variables$Mutation$UnmountVolume._({ + ..._instance._$data, + if (name != _undefined && name != null) 'name': (name as String), + })); } class _CopyWithStubImpl$Variables$Mutation$UnmountVolume @@ -2181,64 +4521,98 @@ class _CopyWithStubImpl$Variables$Mutation$UnmountVolume call({String? name}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$UnmountVolume { - Mutation$UnmountVolume( - {required this.unmountVolume, required this.$__typename}); + Mutation$UnmountVolume({ + required this.unmountVolume, + required this.$__typename, + }); - @override - factory Mutation$UnmountVolume.fromJson(Map json) => - _$Mutation$UnmountVolumeFromJson(json); + factory Mutation$UnmountVolume.fromJson(Map json) { + final l$unmountVolume = json['unmountVolume']; + final l$$__typename = json['__typename']; + return Mutation$UnmountVolume( + unmountVolume: Mutation$UnmountVolume$unmountVolume.fromJson( + (l$unmountVolume as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$UnmountVolume$unmountVolume unmountVolume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UnmountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$unmountVolume = unmountVolume; + _resultData['unmountVolume'] = l$unmountVolume.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$unmountVolume = unmountVolume; final l$$__typename = $__typename; - return Object.hashAll([l$unmountVolume, l$$__typename]); + return Object.hashAll([ + l$unmountVolume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$UnmountVolume) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$UnmountVolume) || + runtimeType != other.runtimeType) { return false; + } final l$unmountVolume = unmountVolume; final lOther$unmountVolume = other.unmountVolume; - if (l$unmountVolume != lOther$unmountVolume) return false; + if (l$unmountVolume != lOther$unmountVolume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$UnmountVolume on Mutation$UnmountVolume { CopyWith$Mutation$UnmountVolume get copyWith => - CopyWith$Mutation$UnmountVolume(this, (i) => i); + CopyWith$Mutation$UnmountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UnmountVolume { - factory CopyWith$Mutation$UnmountVolume(Mutation$UnmountVolume instance, - TRes Function(Mutation$UnmountVolume) then) = - _CopyWithImpl$Mutation$UnmountVolume; + factory CopyWith$Mutation$UnmountVolume( + Mutation$UnmountVolume instance, + TRes Function(Mutation$UnmountVolume) then, + ) = _CopyWithImpl$Mutation$UnmountVolume; factory CopyWith$Mutation$UnmountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$UnmountVolume; - TRes call( - {Mutation$UnmountVolume$unmountVolume? unmountVolume, - String? $__typename}); + TRes call({ + Mutation$UnmountVolume$unmountVolume? unmountVolume, + String? $__typename, + }); CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume; } class _CopyWithImpl$Mutation$UnmountVolume implements CopyWith$Mutation$UnmountVolume { - _CopyWithImpl$Mutation$UnmountVolume(this._instance, this._then); + _CopyWithImpl$Mutation$UnmountVolume( + this._instance, + this._then, + ); final Mutation$UnmountVolume _instance; @@ -2246,16 +4620,18 @@ class _CopyWithImpl$Mutation$UnmountVolume static const _undefined = {}; - TRes call( - {Object? unmountVolume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? unmountVolume = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UnmountVolume( - unmountVolume: unmountVolume == _undefined || unmountVolume == null - ? _instance.unmountVolume - : (unmountVolume as Mutation$UnmountVolume$unmountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + unmountVolume: unmountVolume == _undefined || unmountVolume == null + ? _instance.unmountVolume + : (unmountVolume as Mutation$UnmountVolume$unmountVolume), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume { final local$unmountVolume = _instance.unmountVolume; return CopyWith$Mutation$UnmountVolume$unmountVolume( @@ -2269,9 +4645,10 @@ class _CopyWithStubImpl$Mutation$UnmountVolume TRes _res; - call( - {Mutation$UnmountVolume$unmountVolume? unmountVolume, - String? $__typename}) => + call({ + Mutation$UnmountVolume$unmountVolume? unmountVolume, + String? $__typename, + }) => _res; CopyWith$Mutation$UnmountVolume$unmountVolume get unmountVolume => CopyWith$Mutation$UnmountVolume$unmountVolume.stub(_res); @@ -2279,86 +4656,99 @@ class _CopyWithStubImpl$Mutation$UnmountVolume const documentNodeMutationUnmountVolume = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'UnmountVolume'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'name')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'unmountVolume'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'name'), - value: VariableNode(name: NameNode(value: 'name'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'UnmountVolume'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'name')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'unmountVolume'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'name'), + value: VariableNode(name: NameNode(value: 'name')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$UnmountVolume _parserFn$Mutation$UnmountVolume( Map data) => Mutation$UnmountVolume.fromJson(data); typedef OnMutationCompleted$Mutation$UnmountVolume = FutureOr Function( - dynamic, Mutation$UnmountVolume?); + dynamic, + Mutation$UnmountVolume?, +); class Options$Mutation$UnmountVolume extends graphql.MutationOptions { - Options$Mutation$UnmountVolume( - {String? operationName, - required Variables$Mutation$UnmountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$UnmountVolume? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$UnmountVolume({ + String? operationName, + required Variables$Mutation$UnmountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UnmountVolume? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$UnmountVolume(data)), - update: update, - onError: onError, - document: documentNodeMutationUnmountVolume, - parserFn: _parserFn$Mutation$UnmountVolume); + : _parserFn$Mutation$UnmountVolume(data), + ), + update: update, + onError: onError, + document: documentNodeMutationUnmountVolume, + parserFn: _parserFn$Mutation$UnmountVolume, + ); final OnMutationCompleted$Mutation$UnmountVolume? onCompletedWithParsed; @@ -2367,38 +4757,39 @@ class Options$Mutation$UnmountVolume ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$UnmountVolume extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UnmountVolume( - {String? operationName, - required Variables$Mutation$UnmountVolume variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationUnmountVolume, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UnmountVolume); + WatchOptions$Mutation$UnmountVolume({ + String? operationName, + required Variables$Mutation$UnmountVolume variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUnmountVolume, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UnmountVolume, + ); } extension ClientExtension$Mutation$UnmountVolume on graphql.GraphQLClient { @@ -2410,19 +4801,28 @@ extension ClientExtension$Mutation$UnmountVolume on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$UnmountVolume$unmountVolume - implements Fragment$basicMutationReturnFields { - Mutation$UnmountVolume$unmountVolume( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$UnmountVolume$unmountVolume({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$UnmountVolume$unmountVolume.fromJson( - Map json) => - _$Mutation$UnmountVolume$unmountVolumeFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$UnmountVolume$unmountVolume( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2430,36 +4830,64 @@ class Mutation$UnmountVolume$unmountVolume final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$UnmountVolume$unmountVolumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UnmountVolume$unmountVolume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2468,26 +4896,35 @@ extension UtilityExtension$Mutation$UnmountVolume$unmountVolume on Mutation$UnmountVolume$unmountVolume { CopyWith$Mutation$UnmountVolume$unmountVolume< Mutation$UnmountVolume$unmountVolume> - get copyWith => - CopyWith$Mutation$UnmountVolume$unmountVolume(this, (i) => i); + get copyWith => CopyWith$Mutation$UnmountVolume$unmountVolume( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UnmountVolume$unmountVolume { factory CopyWith$Mutation$UnmountVolume$unmountVolume( - Mutation$UnmountVolume$unmountVolume instance, - TRes Function(Mutation$UnmountVolume$unmountVolume) then) = - _CopyWithImpl$Mutation$UnmountVolume$unmountVolume; + Mutation$UnmountVolume$unmountVolume instance, + TRes Function(Mutation$UnmountVolume$unmountVolume) then, + ) = _CopyWithImpl$Mutation$UnmountVolume$unmountVolume; factory CopyWith$Mutation$UnmountVolume$unmountVolume.stub(TRes res) = _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$UnmountVolume$unmountVolume implements CopyWith$Mutation$UnmountVolume$unmountVolume { _CopyWithImpl$Mutation$UnmountVolume$unmountVolume( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$UnmountVolume$unmountVolume _instance; @@ -2495,24 +4932,25 @@ class _CopyWithImpl$Mutation$UnmountVolume$unmountVolume static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UnmountVolume$unmountVolume( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume @@ -2521,49 +4959,78 @@ class _CopyWithStubImpl$Mutation$UnmountVolume$unmountVolume TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$MigrateToBinds { - Variables$Mutation$MigrateToBinds({required this.input}); + factory Variables$Mutation$MigrateToBinds( + {required Input$MigrateToBindsInput input}) => + Variables$Mutation$MigrateToBinds._({ + r'input': input, + }); + + Variables$Mutation$MigrateToBinds._(this._$data); + + factory Variables$Mutation$MigrateToBinds.fromJson( + Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$MigrateToBindsInput.fromJson((l$input as Map)); + return Variables$Mutation$MigrateToBinds._(result$data); + } + + Map _$data; + + Input$MigrateToBindsInput get input => + (_$data['input'] as Input$MigrateToBindsInput); + Map toJson() { + final result$data = {}; + final l$input = input; + result$data['input'] = l$input.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$MigrateToBinds + get copyWith => CopyWith$Variables$Mutation$MigrateToBinds( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$MigrateToBinds) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } @override - factory Variables$Mutation$MigrateToBinds.fromJson( - Map json) => - _$Variables$Mutation$MigrateToBindsFromJson(json); - - final Input$MigrateToBindsInput input; - - Map toJson() => - _$Variables$Mutation$MigrateToBindsToJson(this); int get hashCode { final l$input = input; return Object.hashAll([l$input]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MigrateToBinds) || - runtimeType != other.runtimeType) return false; - final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; - } - - CopyWith$Variables$Mutation$MigrateToBinds - get copyWith => - CopyWith$Variables$Mutation$MigrateToBinds(this, (i) => i); } abstract class CopyWith$Variables$Mutation$MigrateToBinds { factory CopyWith$Variables$Mutation$MigrateToBinds( - Variables$Mutation$MigrateToBinds instance, - TRes Function(Variables$Mutation$MigrateToBinds) then) = - _CopyWithImpl$Variables$Mutation$MigrateToBinds; + Variables$Mutation$MigrateToBinds instance, + TRes Function(Variables$Mutation$MigrateToBinds) then, + ) = _CopyWithImpl$Variables$Mutation$MigrateToBinds; factory CopyWith$Variables$Mutation$MigrateToBinds.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$MigrateToBinds; @@ -2573,7 +5040,10 @@ abstract class CopyWith$Variables$Mutation$MigrateToBinds { class _CopyWithImpl$Variables$Mutation$MigrateToBinds implements CopyWith$Variables$Mutation$MigrateToBinds { - _CopyWithImpl$Variables$Mutation$MigrateToBinds(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$MigrateToBinds( + this._instance, + this._then, + ); final Variables$Mutation$MigrateToBinds _instance; @@ -2582,10 +5052,11 @@ class _CopyWithImpl$Variables$Mutation$MigrateToBinds static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$MigrateToBinds( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$MigrateToBindsInput))); + _then(Variables$Mutation$MigrateToBinds._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$MigrateToBindsInput), + })); } class _CopyWithStubImpl$Variables$Mutation$MigrateToBinds @@ -2597,64 +5068,98 @@ class _CopyWithStubImpl$Variables$Mutation$MigrateToBinds call({Input$MigrateToBindsInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$MigrateToBinds { - Mutation$MigrateToBinds( - {required this.migrateToBinds, required this.$__typename}); + Mutation$MigrateToBinds({ + required this.migrateToBinds, + required this.$__typename, + }); - @override - factory Mutation$MigrateToBinds.fromJson(Map json) => - _$Mutation$MigrateToBindsFromJson(json); + factory Mutation$MigrateToBinds.fromJson(Map json) { + final l$migrateToBinds = json['migrateToBinds']; + final l$$__typename = json['__typename']; + return Mutation$MigrateToBinds( + migrateToBinds: Mutation$MigrateToBinds$migrateToBinds.fromJson( + (l$migrateToBinds as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$MigrateToBinds$migrateToBinds migrateToBinds; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MigrateToBindsToJson(this); + Map toJson() { + final _resultData = {}; + final l$migrateToBinds = migrateToBinds; + _resultData['migrateToBinds'] = l$migrateToBinds.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$migrateToBinds = migrateToBinds; final l$$__typename = $__typename; - return Object.hashAll([l$migrateToBinds, l$$__typename]); + return Object.hashAll([ + l$migrateToBinds, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$MigrateToBinds) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$MigrateToBinds) || + runtimeType != other.runtimeType) { return false; + } final l$migrateToBinds = migrateToBinds; final lOther$migrateToBinds = other.migrateToBinds; - if (l$migrateToBinds != lOther$migrateToBinds) return false; + if (l$migrateToBinds != lOther$migrateToBinds) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$MigrateToBinds on Mutation$MigrateToBinds { CopyWith$Mutation$MigrateToBinds get copyWith => - CopyWith$Mutation$MigrateToBinds(this, (i) => i); + CopyWith$Mutation$MigrateToBinds( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MigrateToBinds { - factory CopyWith$Mutation$MigrateToBinds(Mutation$MigrateToBinds instance, - TRes Function(Mutation$MigrateToBinds) then) = - _CopyWithImpl$Mutation$MigrateToBinds; + factory CopyWith$Mutation$MigrateToBinds( + Mutation$MigrateToBinds instance, + TRes Function(Mutation$MigrateToBinds) then, + ) = _CopyWithImpl$Mutation$MigrateToBinds; factory CopyWith$Mutation$MigrateToBinds.stub(TRes res) = _CopyWithStubImpl$Mutation$MigrateToBinds; - TRes call( - {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, - String? $__typename}); + TRes call({ + Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, + String? $__typename, + }); CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds; } class _CopyWithImpl$Mutation$MigrateToBinds implements CopyWith$Mutation$MigrateToBinds { - _CopyWithImpl$Mutation$MigrateToBinds(this._instance, this._then); + _CopyWithImpl$Mutation$MigrateToBinds( + this._instance, + this._then, + ); final Mutation$MigrateToBinds _instance; @@ -2662,16 +5167,18 @@ class _CopyWithImpl$Mutation$MigrateToBinds static const _undefined = {}; - TRes call( - {Object? migrateToBinds = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? migrateToBinds = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MigrateToBinds( - migrateToBinds: migrateToBinds == _undefined || migrateToBinds == null - ? _instance.migrateToBinds - : (migrateToBinds as Mutation$MigrateToBinds$migrateToBinds), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + migrateToBinds: migrateToBinds == _undefined || migrateToBinds == null + ? _instance.migrateToBinds + : (migrateToBinds as Mutation$MigrateToBinds$migrateToBinds), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds { final local$migrateToBinds = _instance.migrateToBinds; return CopyWith$Mutation$MigrateToBinds$migrateToBinds( @@ -2685,9 +5192,10 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds TRes _res; - call( - {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, - String? $__typename}) => + call({ + Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, + String? $__typename, + }) => _res; CopyWith$Mutation$MigrateToBinds$migrateToBinds get migrateToBinds => CopyWith$Mutation$MigrateToBinds$migrateToBinds.stub(_res); @@ -2695,165 +5203,191 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'MigrateToBinds'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'MigrateToBindsInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'migrateToBinds'), + type: OperationType.mutation, + name: NameNode(value: 'MigrateToBinds'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MigrateToBindsInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'migrateToBinds'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'job'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), FieldNode( - name: NameNode(value: 'job'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds( Map data) => Mutation$MigrateToBinds.fromJson(data); typedef OnMutationCompleted$Mutation$MigrateToBinds = FutureOr Function( - dynamic, Mutation$MigrateToBinds?); + dynamic, + Mutation$MigrateToBinds?, +); class Options$Mutation$MigrateToBinds extends graphql.MutationOptions { - Options$Mutation$MigrateToBinds( - {String? operationName, - required Variables$Mutation$MigrateToBinds variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$MigrateToBinds? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$MigrateToBinds({ + String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MigrateToBinds? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$MigrateToBinds(data)), - update: update, - onError: onError, - document: documentNodeMutationMigrateToBinds, - parserFn: _parserFn$Mutation$MigrateToBinds); + : _parserFn$Mutation$MigrateToBinds(data), + ), + update: update, + onError: onError, + document: documentNodeMutationMigrateToBinds, + parserFn: _parserFn$Mutation$MigrateToBinds, + ); final OnMutationCompleted$Mutation$MigrateToBinds? onCompletedWithParsed; @@ -2862,38 +5396,39 @@ class Options$Mutation$MigrateToBinds ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$MigrateToBinds extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MigrateToBinds( - {String? operationName, - required Variables$Mutation$MigrateToBinds variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationMigrateToBinds, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MigrateToBinds); + WatchOptions$Mutation$MigrateToBinds({ + String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMigrateToBinds, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MigrateToBinds, + ); } extension ClientExtension$Mutation$MigrateToBinds on graphql.GraphQLClient { @@ -2905,20 +5440,34 @@ extension ClientExtension$Mutation$MigrateToBinds on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$MigrateToBinds$migrateToBinds - implements Fragment$basicMutationReturnFields { - Mutation$MigrateToBinds$migrateToBinds( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.job}); + implements Fragment$basicMutationReturnFields$$GenericJobButationReturn { + Mutation$MigrateToBinds$migrateToBinds({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job, + }); - @override factory Mutation$MigrateToBinds$migrateToBinds.fromJson( - Map json) => - _$Mutation$MigrateToBinds$migrateToBindsFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$job = json['job']; + return Mutation$MigrateToBinds$migrateToBinds( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + job: l$job == null + ? null + : Mutation$MigrateToBinds$migrateToBinds$job.fromJson( + (l$job as Map)), + ); + } final int code; @@ -2926,42 +5475,75 @@ class Mutation$MigrateToBinds$migrateToBinds final bool success; - @JsonKey(name: '__typename') final String $__typename; final Mutation$MigrateToBinds$migrateToBinds$job? job; - Map toJson() => - _$Mutation$MigrateToBinds$migrateToBindsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$job = job; + _resultData['job'] = l$job?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$job = job; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$job, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MigrateToBinds$migrateToBinds) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$job = job; final lOther$job = other.job; - if (l$job != lOther$job) return false; + if (l$job != lOther$job) { + return false; + } return true; } } @@ -2970,32 +5552,37 @@ extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds on Mutation$MigrateToBinds$migrateToBinds { CopyWith$Mutation$MigrateToBinds$migrateToBinds< Mutation$MigrateToBinds$migrateToBinds> - get copyWith => - CopyWith$Mutation$MigrateToBinds$migrateToBinds(this, (i) => i); + get copyWith => CopyWith$Mutation$MigrateToBinds$migrateToBinds( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds { factory CopyWith$Mutation$MigrateToBinds$migrateToBinds( - Mutation$MigrateToBinds$migrateToBinds instance, - TRes Function(Mutation$MigrateToBinds$migrateToBinds) then) = - _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds; + Mutation$MigrateToBinds$migrateToBinds instance, + TRes Function(Mutation$MigrateToBinds$migrateToBinds) then, + ) = _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds; factory CopyWith$Mutation$MigrateToBinds$migrateToBinds.stub(TRes res) = _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MigrateToBinds$migrateToBinds$job? job}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MigrateToBinds$migrateToBinds$job? job, + }); CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job; } class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds implements CopyWith$Mutation$MigrateToBinds$migrateToBinds { _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$MigrateToBinds$migrateToBinds _instance; @@ -3003,28 +5590,29 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? job = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? job = _undefined, + }) => _then(Mutation$MigrateToBinds$migrateToBinds( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - job: job == _undefined - ? _instance.job - : (job as Mutation$MigrateToBinds$migrateToBinds$job?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Mutation$MigrateToBinds$migrateToBinds$job?), + )); CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job { final local$job = _instance.job; return local$job == null @@ -3041,47 +5629,70 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MigrateToBinds$migrateToBinds$job? job}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MigrateToBinds$migrateToBinds$job? job, + }) => _res; CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job => CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(_res); } -@JsonSerializable(explicitToJson: true) class Mutation$MigrateToBinds$migrateToBinds$job { - Mutation$MigrateToBinds$migrateToBinds$job( - {required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - required this.$__typename}); + Mutation$MigrateToBinds$migrateToBinds$job({ + required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename, + }); - @override factory Mutation$MigrateToBinds$migrateToBinds$job.fromJson( - Map json) => - _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson(json); + Map json) { + final l$createdAt = json['createdAt']; + final l$description = json['description']; + final l$error = json['error']; + final l$finishedAt = json['finishedAt']; + final l$name = json['name']; + final l$progress = json['progress']; + final l$result = json['result']; + final l$status = json['status']; + final l$statusText = json['statusText']; + final l$uid = json['uid']; + final l$updatedAt = json['updatedAt']; + final l$$__typename = json['__typename']; + return Mutation$MigrateToBinds$migrateToBinds$job( + createdAt: dateTimeFromJson(l$createdAt), + description: (l$description as String), + error: (l$error as String?), + finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), + name: (l$name as String), + progress: (l$progress as int?), + result: (l$result as String?), + status: (l$status as String), + statusText: (l$statusText as String?), + uid: (l$uid as String), + updatedAt: dateTimeFromJson(l$updatedAt), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime createdAt; final String description; final String? error; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? finishedAt; final String name; @@ -3096,14 +5707,41 @@ class Mutation$MigrateToBinds$migrateToBinds$job { final String uid; - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime updatedAt; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$MigrateToBinds$migrateToBinds$jobToJson(this); + Map toJson() { + final _resultData = {}; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$description = description; + _resultData['description'] = l$description; + final l$error = error; + _resultData['error'] = l$error; + final l$finishedAt = finishedAt; + _resultData['finishedAt'] = + l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); + final l$name = name; + _resultData['name'] = l$name; + final l$progress = progress; + _resultData['progress'] = l$progress; + final l$result = result; + _resultData['result'] = l$result; + final l$status = status; + _resultData['status'] = l$status; + final l$statusText = statusText; + _resultData['statusText'] = l$statusText; + final l$uid = uid; + _resultData['uid'] = l$uid; + final l$updatedAt = updatedAt; + _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createdAt = createdAt; final l$description = description; @@ -3129,51 +5767,79 @@ class Mutation$MigrateToBinds$migrateToBinds$job { l$statusText, l$uid, l$updatedAt, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MigrateToBinds$migrateToBinds$job) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$createdAt = createdAt; final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) return false; + if (l$createdAt != lOther$createdAt) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$error = error; final lOther$error = other.error; - if (l$error != lOther$error) return false; + if (l$error != lOther$error) { + return false; + } final l$finishedAt = finishedAt; final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) return false; + if (l$finishedAt != lOther$finishedAt) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$progress = progress; final lOther$progress = other.progress; - if (l$progress != lOther$progress) return false; + if (l$progress != lOther$progress) { + return false; + } final l$result = result; final lOther$result = other.result; - if (l$result != lOther$result) return false; + if (l$result != lOther$result) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$statusText = statusText; final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) return false; + if (l$statusText != lOther$statusText) { + return false; + } final l$uid = uid; final lOther$uid = other.uid; - if (l$uid != lOther$uid) return false; + if (l$uid != lOther$uid) { + return false; + } final l$updatedAt = updatedAt; final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) return false; + if (l$updatedAt != lOther$updatedAt) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3182,38 +5848,43 @@ extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds$job on Mutation$MigrateToBinds$migrateToBinds$job { CopyWith$Mutation$MigrateToBinds$migrateToBinds$job< Mutation$MigrateToBinds$migrateToBinds$job> - get copyWith => - CopyWith$Mutation$MigrateToBinds$migrateToBinds$job(this, (i) => i); + get copyWith => CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( - Mutation$MigrateToBinds$migrateToBinds$job instance, - TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) then) = - _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job; + Mutation$MigrateToBinds$migrateToBinds$job instance, + TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) then, + ) = _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job; factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(TRes res) = _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job; - TRes call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}); + TRes call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }); } class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$MigrateToBinds$migrateToBinds$job _instance; @@ -3221,51 +5892,51 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job static const _undefined = {}; - TRes call( - {Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MigrateToBinds$migrateToBinds$job( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null - ? _instance.uid - : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job @@ -3274,23 +5945,19 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job TRes _res; - call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}) => + call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }) => _res; } - -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 11d49a43..1b92ccad 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1,61 +1,116 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; -part 'schema.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Input$AutoUpgradeSettingsInput { - Input$AutoUpgradeSettingsInput({this.enableAutoUpgrade, this.allowReboot}); + factory Input$AutoUpgradeSettingsInput({ + bool? enableAutoUpgrade, + bool? allowReboot, + }) => + Input$AutoUpgradeSettingsInput._({ + if (enableAutoUpgrade != null) r'enableAutoUpgrade': enableAutoUpgrade, + if (allowReboot != null) r'allowReboot': allowReboot, + }); - @override - factory Input$AutoUpgradeSettingsInput.fromJson(Map json) => - _$Input$AutoUpgradeSettingsInputFromJson(json); + Input$AutoUpgradeSettingsInput._(this._$data); - final bool? enableAutoUpgrade; - - final bool? allowReboot; - - Map toJson() => _$Input$AutoUpgradeSettingsInputToJson(this); - int get hashCode { - final l$enableAutoUpgrade = enableAutoUpgrade; - final l$allowReboot = allowReboot; - return Object.hashAll([l$enableAutoUpgrade, l$allowReboot]); + factory Input$AutoUpgradeSettingsInput.fromJson(Map data) { + final result$data = {}; + if (data.containsKey('enableAutoUpgrade')) { + final l$enableAutoUpgrade = data['enableAutoUpgrade']; + result$data['enableAutoUpgrade'] = (l$enableAutoUpgrade as bool?); + } + if (data.containsKey('allowReboot')) { + final l$allowReboot = data['allowReboot']; + result$data['allowReboot'] = (l$allowReboot as bool?); + } + return Input$AutoUpgradeSettingsInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$AutoUpgradeSettingsInput) || - runtimeType != other.runtimeType) return false; - final l$enableAutoUpgrade = enableAutoUpgrade; - final lOther$enableAutoUpgrade = other.enableAutoUpgrade; - if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; - final l$allowReboot = allowReboot; - final lOther$allowReboot = other.allowReboot; - if (l$allowReboot != lOther$allowReboot) return false; - return true; + Map _$data; + + bool? get enableAutoUpgrade => (_$data['enableAutoUpgrade'] as bool?); + bool? get allowReboot => (_$data['allowReboot'] as bool?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('enableAutoUpgrade')) { + final l$enableAutoUpgrade = enableAutoUpgrade; + result$data['enableAutoUpgrade'] = l$enableAutoUpgrade; + } + if (_$data.containsKey('allowReboot')) { + final l$allowReboot = allowReboot; + result$data['allowReboot'] = l$allowReboot; + } + return result$data; } CopyWith$Input$AutoUpgradeSettingsInput - get copyWith => CopyWith$Input$AutoUpgradeSettingsInput(this, (i) => i); + get copyWith => CopyWith$Input$AutoUpgradeSettingsInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$AutoUpgradeSettingsInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$enableAutoUpgrade = enableAutoUpgrade; + final lOther$enableAutoUpgrade = other.enableAutoUpgrade; + if (_$data.containsKey('enableAutoUpgrade') != + other._$data.containsKey('enableAutoUpgrade')) { + return false; + } + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) { + return false; + } + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (_$data.containsKey('allowReboot') != + other._$data.containsKey('allowReboot')) { + return false; + } + if (l$allowReboot != lOther$allowReboot) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$enableAutoUpgrade = enableAutoUpgrade; + final l$allowReboot = allowReboot; + return Object.hashAll([ + _$data.containsKey('enableAutoUpgrade') ? l$enableAutoUpgrade : const {}, + _$data.containsKey('allowReboot') ? l$allowReboot : const {}, + ]); + } } abstract class CopyWith$Input$AutoUpgradeSettingsInput { factory CopyWith$Input$AutoUpgradeSettingsInput( - Input$AutoUpgradeSettingsInput instance, - TRes Function(Input$AutoUpgradeSettingsInput) then) = - _CopyWithImpl$Input$AutoUpgradeSettingsInput; + Input$AutoUpgradeSettingsInput instance, + TRes Function(Input$AutoUpgradeSettingsInput) then, + ) = _CopyWithImpl$Input$AutoUpgradeSettingsInput; factory CopyWith$Input$AutoUpgradeSettingsInput.stub(TRes res) = _CopyWithStubImpl$Input$AutoUpgradeSettingsInput; - TRes call({bool? enableAutoUpgrade, bool? allowReboot}); + TRes call({ + bool? enableAutoUpgrade, + bool? allowReboot, + }); } class _CopyWithImpl$Input$AutoUpgradeSettingsInput implements CopyWith$Input$AutoUpgradeSettingsInput { - _CopyWithImpl$Input$AutoUpgradeSettingsInput(this._instance, this._then); + _CopyWithImpl$Input$AutoUpgradeSettingsInput( + this._instance, + this._then, + ); final Input$AutoUpgradeSettingsInput _instance; @@ -63,16 +118,16 @@ class _CopyWithImpl$Input$AutoUpgradeSettingsInput static const _undefined = {}; - TRes call( - {Object? enableAutoUpgrade = _undefined, - Object? allowReboot = _undefined}) => - _then(Input$AutoUpgradeSettingsInput( - enableAutoUpgrade: enableAutoUpgrade == _undefined - ? _instance.enableAutoUpgrade - : (enableAutoUpgrade as bool?), - allowReboot: allowReboot == _undefined - ? _instance.allowReboot - : (allowReboot as bool?))); + TRes call({ + Object? enableAutoUpgrade = _undefined, + Object? allowReboot = _undefined, + }) => + _then(Input$AutoUpgradeSettingsInput._({ + ..._instance._$data, + if (enableAutoUpgrade != _undefined) + 'enableAutoUpgrade': (enableAutoUpgrade as bool?), + if (allowReboot != _undefined) 'allowReboot': (allowReboot as bool?), + })); } class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput @@ -81,33 +136,111 @@ class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput TRes _res; - call({bool? enableAutoUpgrade, bool? allowReboot}) => _res; + call({ + bool? enableAutoUpgrade, + bool? allowReboot, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$MigrateToBindsInput { - Input$MigrateToBindsInput( - {required this.emailBlockDevice, - required this.bitwardenBlockDevice, - required this.giteaBlockDevice, - required this.nextcloudBlockDevice, - required this.pleromaBlockDevice}); + factory Input$MigrateToBindsInput({ + required String emailBlockDevice, + required String bitwardenBlockDevice, + required String giteaBlockDevice, + required String nextcloudBlockDevice, + required String pleromaBlockDevice, + }) => + Input$MigrateToBindsInput._({ + r'emailBlockDevice': emailBlockDevice, + r'bitwardenBlockDevice': bitwardenBlockDevice, + r'giteaBlockDevice': giteaBlockDevice, + r'nextcloudBlockDevice': nextcloudBlockDevice, + r'pleromaBlockDevice': pleromaBlockDevice, + }); + + Input$MigrateToBindsInput._(this._$data); + + factory Input$MigrateToBindsInput.fromJson(Map data) { + final result$data = {}; + final l$emailBlockDevice = data['emailBlockDevice']; + result$data['emailBlockDevice'] = (l$emailBlockDevice as String); + final l$bitwardenBlockDevice = data['bitwardenBlockDevice']; + result$data['bitwardenBlockDevice'] = (l$bitwardenBlockDevice as String); + final l$giteaBlockDevice = data['giteaBlockDevice']; + result$data['giteaBlockDevice'] = (l$giteaBlockDevice as String); + final l$nextcloudBlockDevice = data['nextcloudBlockDevice']; + result$data['nextcloudBlockDevice'] = (l$nextcloudBlockDevice as String); + final l$pleromaBlockDevice = data['pleromaBlockDevice']; + result$data['pleromaBlockDevice'] = (l$pleromaBlockDevice as String); + return Input$MigrateToBindsInput._(result$data); + } + + Map _$data; + + String get emailBlockDevice => (_$data['emailBlockDevice'] as String); + String get bitwardenBlockDevice => (_$data['bitwardenBlockDevice'] as String); + String get giteaBlockDevice => (_$data['giteaBlockDevice'] as String); + String get nextcloudBlockDevice => (_$data['nextcloudBlockDevice'] as String); + String get pleromaBlockDevice => (_$data['pleromaBlockDevice'] as String); + Map toJson() { + final result$data = {}; + final l$emailBlockDevice = emailBlockDevice; + result$data['emailBlockDevice'] = l$emailBlockDevice; + final l$bitwardenBlockDevice = bitwardenBlockDevice; + result$data['bitwardenBlockDevice'] = l$bitwardenBlockDevice; + final l$giteaBlockDevice = giteaBlockDevice; + result$data['giteaBlockDevice'] = l$giteaBlockDevice; + final l$nextcloudBlockDevice = nextcloudBlockDevice; + result$data['nextcloudBlockDevice'] = l$nextcloudBlockDevice; + final l$pleromaBlockDevice = pleromaBlockDevice; + result$data['pleromaBlockDevice'] = l$pleromaBlockDevice; + return result$data; + } + + CopyWith$Input$MigrateToBindsInput get copyWith => + CopyWith$Input$MigrateToBindsInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$MigrateToBindsInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$emailBlockDevice = emailBlockDevice; + final lOther$emailBlockDevice = other.emailBlockDevice; + if (l$emailBlockDevice != lOther$emailBlockDevice) { + return false; + } + final l$bitwardenBlockDevice = bitwardenBlockDevice; + final lOther$bitwardenBlockDevice = other.bitwardenBlockDevice; + if (l$bitwardenBlockDevice != lOther$bitwardenBlockDevice) { + return false; + } + final l$giteaBlockDevice = giteaBlockDevice; + final lOther$giteaBlockDevice = other.giteaBlockDevice; + if (l$giteaBlockDevice != lOther$giteaBlockDevice) { + return false; + } + final l$nextcloudBlockDevice = nextcloudBlockDevice; + final lOther$nextcloudBlockDevice = other.nextcloudBlockDevice; + if (l$nextcloudBlockDevice != lOther$nextcloudBlockDevice) { + return false; + } + final l$pleromaBlockDevice = pleromaBlockDevice; + final lOther$pleromaBlockDevice = other.pleromaBlockDevice; + if (l$pleromaBlockDevice != lOther$pleromaBlockDevice) { + return false; + } + return true; + } @override - factory Input$MigrateToBindsInput.fromJson(Map json) => - _$Input$MigrateToBindsInputFromJson(json); - - final String emailBlockDevice; - - final String bitwardenBlockDevice; - - final String giteaBlockDevice; - - final String nextcloudBlockDevice; - - final String pleromaBlockDevice; - - Map toJson() => _$Input$MigrateToBindsInputToJson(this); int get hashCode { final l$emailBlockDevice = emailBlockDevice; final l$bitwardenBlockDevice = bitwardenBlockDevice; @@ -119,56 +252,35 @@ class Input$MigrateToBindsInput { l$bitwardenBlockDevice, l$giteaBlockDevice, l$nextcloudBlockDevice, - l$pleromaBlockDevice + l$pleromaBlockDevice, ]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$MigrateToBindsInput) || - runtimeType != other.runtimeType) return false; - final l$emailBlockDevice = emailBlockDevice; - final lOther$emailBlockDevice = other.emailBlockDevice; - if (l$emailBlockDevice != lOther$emailBlockDevice) return false; - final l$bitwardenBlockDevice = bitwardenBlockDevice; - final lOther$bitwardenBlockDevice = other.bitwardenBlockDevice; - if (l$bitwardenBlockDevice != lOther$bitwardenBlockDevice) return false; - final l$giteaBlockDevice = giteaBlockDevice; - final lOther$giteaBlockDevice = other.giteaBlockDevice; - if (l$giteaBlockDevice != lOther$giteaBlockDevice) return false; - final l$nextcloudBlockDevice = nextcloudBlockDevice; - final lOther$nextcloudBlockDevice = other.nextcloudBlockDevice; - if (l$nextcloudBlockDevice != lOther$nextcloudBlockDevice) return false; - final l$pleromaBlockDevice = pleromaBlockDevice; - final lOther$pleromaBlockDevice = other.pleromaBlockDevice; - if (l$pleromaBlockDevice != lOther$pleromaBlockDevice) return false; - return true; - } - - CopyWith$Input$MigrateToBindsInput get copyWith => - CopyWith$Input$MigrateToBindsInput(this, (i) => i); } abstract class CopyWith$Input$MigrateToBindsInput { - factory CopyWith$Input$MigrateToBindsInput(Input$MigrateToBindsInput instance, - TRes Function(Input$MigrateToBindsInput) then) = - _CopyWithImpl$Input$MigrateToBindsInput; + factory CopyWith$Input$MigrateToBindsInput( + Input$MigrateToBindsInput instance, + TRes Function(Input$MigrateToBindsInput) then, + ) = _CopyWithImpl$Input$MigrateToBindsInput; factory CopyWith$Input$MigrateToBindsInput.stub(TRes res) = _CopyWithStubImpl$Input$MigrateToBindsInput; - TRes call( - {String? emailBlockDevice, - String? bitwardenBlockDevice, - String? giteaBlockDevice, - String? nextcloudBlockDevice, - String? pleromaBlockDevice}); + TRes call({ + String? emailBlockDevice, + String? bitwardenBlockDevice, + String? giteaBlockDevice, + String? nextcloudBlockDevice, + String? pleromaBlockDevice, + }); } class _CopyWithImpl$Input$MigrateToBindsInput implements CopyWith$Input$MigrateToBindsInput { - _CopyWithImpl$Input$MigrateToBindsInput(this._instance, this._then); + _CopyWithImpl$Input$MigrateToBindsInput( + this._instance, + this._then, + ); final Input$MigrateToBindsInput _instance; @@ -176,33 +288,26 @@ class _CopyWithImpl$Input$MigrateToBindsInput static const _undefined = {}; - TRes call( - {Object? emailBlockDevice = _undefined, - Object? bitwardenBlockDevice = _undefined, - Object? giteaBlockDevice = _undefined, - Object? nextcloudBlockDevice = _undefined, - Object? pleromaBlockDevice = _undefined}) => - _then(Input$MigrateToBindsInput( - emailBlockDevice: - emailBlockDevice == _undefined || emailBlockDevice == null - ? _instance.emailBlockDevice - : (emailBlockDevice as String), - bitwardenBlockDevice: - bitwardenBlockDevice == _undefined || bitwardenBlockDevice == null - ? _instance.bitwardenBlockDevice - : (bitwardenBlockDevice as String), - giteaBlockDevice: - giteaBlockDevice == _undefined || giteaBlockDevice == null - ? _instance.giteaBlockDevice - : (giteaBlockDevice as String), - nextcloudBlockDevice: - nextcloudBlockDevice == _undefined || nextcloudBlockDevice == null - ? _instance.nextcloudBlockDevice - : (nextcloudBlockDevice as String), - pleromaBlockDevice: - pleromaBlockDevice == _undefined || pleromaBlockDevice == null - ? _instance.pleromaBlockDevice - : (pleromaBlockDevice as String))); + TRes call({ + Object? emailBlockDevice = _undefined, + Object? bitwardenBlockDevice = _undefined, + Object? giteaBlockDevice = _undefined, + Object? nextcloudBlockDevice = _undefined, + Object? pleromaBlockDevice = _undefined, + }) => + _then(Input$MigrateToBindsInput._({ + ..._instance._$data, + if (emailBlockDevice != _undefined && emailBlockDevice != null) + 'emailBlockDevice': (emailBlockDevice as String), + if (bitwardenBlockDevice != _undefined && bitwardenBlockDevice != null) + 'bitwardenBlockDevice': (bitwardenBlockDevice as String), + if (giteaBlockDevice != _undefined && giteaBlockDevice != null) + 'giteaBlockDevice': (giteaBlockDevice as String), + if (nextcloudBlockDevice != _undefined && nextcloudBlockDevice != null) + 'nextcloudBlockDevice': (nextcloudBlockDevice as String), + if (pleromaBlockDevice != _undefined && pleromaBlockDevice != null) + 'pleromaBlockDevice': (pleromaBlockDevice as String), + })); } class _CopyWithStubImpl$Input$MigrateToBindsInput @@ -211,66 +316,109 @@ class _CopyWithStubImpl$Input$MigrateToBindsInput TRes _res; - call( - {String? emailBlockDevice, - String? bitwardenBlockDevice, - String? giteaBlockDevice, - String? nextcloudBlockDevice, - String? pleromaBlockDevice}) => + call({ + String? emailBlockDevice, + String? bitwardenBlockDevice, + String? giteaBlockDevice, + String? nextcloudBlockDevice, + String? pleromaBlockDevice, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Input$MoveServiceInput { - Input$MoveServiceInput({required this.serviceId, required this.location}); + factory Input$MoveServiceInput({ + required String serviceId, + required String location, + }) => + Input$MoveServiceInput._({ + r'serviceId': serviceId, + r'location': location, + }); - @override - factory Input$MoveServiceInput.fromJson(Map json) => - _$Input$MoveServiceInputFromJson(json); + Input$MoveServiceInput._(this._$data); - final String serviceId; - - final String location; - - Map toJson() => _$Input$MoveServiceInputToJson(this); - int get hashCode { - final l$serviceId = serviceId; - final l$location = location; - return Object.hashAll([l$serviceId, l$location]); + factory Input$MoveServiceInput.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + final l$location = data['location']; + result$data['location'] = (l$location as String); + return Input$MoveServiceInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$MoveServiceInput) || runtimeType != other.runtimeType) - return false; + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + String get location => (_$data['location'] as String); + Map toJson() { + final result$data = {}; final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; + result$data['serviceId'] = l$serviceId; final l$location = location; - final lOther$location = other.location; - if (l$location != lOther$location) return false; - return true; + result$data['location'] = l$location; + return result$data; } CopyWith$Input$MoveServiceInput get copyWith => - CopyWith$Input$MoveServiceInput(this, (i) => i); + CopyWith$Input$MoveServiceInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$MoveServiceInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + final l$location = location; + final lOther$location = other.location; + if (l$location != lOther$location) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$serviceId = serviceId; + final l$location = location; + return Object.hashAll([ + l$serviceId, + l$location, + ]); + } } abstract class CopyWith$Input$MoveServiceInput { - factory CopyWith$Input$MoveServiceInput(Input$MoveServiceInput instance, - TRes Function(Input$MoveServiceInput) then) = - _CopyWithImpl$Input$MoveServiceInput; + factory CopyWith$Input$MoveServiceInput( + Input$MoveServiceInput instance, + TRes Function(Input$MoveServiceInput) then, + ) = _CopyWithImpl$Input$MoveServiceInput; factory CopyWith$Input$MoveServiceInput.stub(TRes res) = _CopyWithStubImpl$Input$MoveServiceInput; - TRes call({String? serviceId, String? location}); + TRes call({ + String? serviceId, + String? location, + }); } class _CopyWithImpl$Input$MoveServiceInput implements CopyWith$Input$MoveServiceInput { - _CopyWithImpl$Input$MoveServiceInput(this._instance, this._then); + _CopyWithImpl$Input$MoveServiceInput( + this._instance, + this._then, + ); final Input$MoveServiceInput _instance; @@ -278,14 +426,17 @@ class _CopyWithImpl$Input$MoveServiceInput static const _undefined = {}; - TRes call({Object? serviceId = _undefined, Object? location = _undefined}) => - _then(Input$MoveServiceInput( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String), - location: location == _undefined || location == null - ? _instance.location - : (location as String))); + TRes call({ + Object? serviceId = _undefined, + Object? location = _undefined, + }) => + _then(Input$MoveServiceInput._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + if (location != _undefined && location != null) + 'location': (location as String), + })); } class _CopyWithStubImpl$Input$MoveServiceInput @@ -294,63 +445,123 @@ class _CopyWithStubImpl$Input$MoveServiceInput TRes _res; - call({String? serviceId, String? location}) => _res; + call({ + String? serviceId, + String? location, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$RecoveryKeyLimitsInput { - Input$RecoveryKeyLimitsInput({this.expirationDate, this.uses}); + factory Input$RecoveryKeyLimitsInput({ + DateTime? expirationDate, + int? uses, + }) => + Input$RecoveryKeyLimitsInput._({ + if (expirationDate != null) r'expirationDate': expirationDate, + if (uses != null) r'uses': uses, + }); - @override - factory Input$RecoveryKeyLimitsInput.fromJson(Map json) => - _$Input$RecoveryKeyLimitsInputFromJson(json); + Input$RecoveryKeyLimitsInput._(this._$data); - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) - final DateTime? expirationDate; - - final int? uses; - - Map toJson() => _$Input$RecoveryKeyLimitsInputToJson(this); - int get hashCode { - final l$expirationDate = expirationDate; - final l$uses = uses; - return Object.hashAll([l$expirationDate, l$uses]); + factory Input$RecoveryKeyLimitsInput.fromJson(Map data) { + final result$data = {}; + if (data.containsKey('expirationDate')) { + final l$expirationDate = data['expirationDate']; + result$data['expirationDate'] = + l$expirationDate == null ? null : dateTimeFromJson(l$expirationDate); + } + if (data.containsKey('uses')) { + final l$uses = data['uses']; + result$data['uses'] = (l$uses as int?); + } + return Input$RecoveryKeyLimitsInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$RecoveryKeyLimitsInput) || - runtimeType != other.runtimeType) return false; - final l$expirationDate = expirationDate; - final lOther$expirationDate = other.expirationDate; - if (l$expirationDate != lOther$expirationDate) return false; - final l$uses = uses; - final lOther$uses = other.uses; - if (l$uses != lOther$uses) return false; - return true; + Map _$data; + + DateTime? get expirationDate => (_$data['expirationDate'] as DateTime?); + int? get uses => (_$data['uses'] as int?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('expirationDate')) { + final l$expirationDate = expirationDate; + result$data['expirationDate'] = + l$expirationDate == null ? null : dateTimeToJson(l$expirationDate); + } + if (_$data.containsKey('uses')) { + final l$uses = uses; + result$data['uses'] = l$uses; + } + return result$data; } CopyWith$Input$RecoveryKeyLimitsInput - get copyWith => CopyWith$Input$RecoveryKeyLimitsInput(this, (i) => i); + get copyWith => CopyWith$Input$RecoveryKeyLimitsInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$RecoveryKeyLimitsInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$expirationDate = expirationDate; + final lOther$expirationDate = other.expirationDate; + if (_$data.containsKey('expirationDate') != + other._$data.containsKey('expirationDate')) { + return false; + } + if (l$expirationDate != lOther$expirationDate) { + return false; + } + final l$uses = uses; + final lOther$uses = other.uses; + if (_$data.containsKey('uses') != other._$data.containsKey('uses')) { + return false; + } + if (l$uses != lOther$uses) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$expirationDate = expirationDate; + final l$uses = uses; + return Object.hashAll([ + _$data.containsKey('expirationDate') ? l$expirationDate : const {}, + _$data.containsKey('uses') ? l$uses : const {}, + ]); + } } abstract class CopyWith$Input$RecoveryKeyLimitsInput { factory CopyWith$Input$RecoveryKeyLimitsInput( - Input$RecoveryKeyLimitsInput instance, - TRes Function(Input$RecoveryKeyLimitsInput) then) = - _CopyWithImpl$Input$RecoveryKeyLimitsInput; + Input$RecoveryKeyLimitsInput instance, + TRes Function(Input$RecoveryKeyLimitsInput) then, + ) = _CopyWithImpl$Input$RecoveryKeyLimitsInput; factory CopyWith$Input$RecoveryKeyLimitsInput.stub(TRes res) = _CopyWithStubImpl$Input$RecoveryKeyLimitsInput; - TRes call({DateTime? expirationDate, int? uses}); + TRes call({ + DateTime? expirationDate, + int? uses, + }); } class _CopyWithImpl$Input$RecoveryKeyLimitsInput implements CopyWith$Input$RecoveryKeyLimitsInput { - _CopyWithImpl$Input$RecoveryKeyLimitsInput(this._instance, this._then); + _CopyWithImpl$Input$RecoveryKeyLimitsInput( + this._instance, + this._then, + ); final Input$RecoveryKeyLimitsInput _instance; @@ -358,12 +569,16 @@ class _CopyWithImpl$Input$RecoveryKeyLimitsInput static const _undefined = {}; - TRes call({Object? expirationDate = _undefined, Object? uses = _undefined}) => - _then(Input$RecoveryKeyLimitsInput( - expirationDate: expirationDate == _undefined - ? _instance.expirationDate - : (expirationDate as DateTime?), - uses: uses == _undefined ? _instance.uses : (uses as int?))); + TRes call({ + Object? expirationDate = _undefined, + Object? uses = _undefined, + }) => + _then(Input$RecoveryKeyLimitsInput._({ + ..._instance._$data, + if (expirationDate != _undefined) + 'expirationDate': (expirationDate as DateTime?), + if (uses != _undefined) 'uses': (uses as int?), + })); } class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput @@ -372,60 +587,106 @@ class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput TRes _res; - call({DateTime? expirationDate, int? uses}) => _res; + call({ + DateTime? expirationDate, + int? uses, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$SshMutationInput { - Input$SshMutationInput({required this.username, required this.sshKey}); + factory Input$SshMutationInput({ + required String username, + required String sshKey, + }) => + Input$SshMutationInput._({ + r'username': username, + r'sshKey': sshKey, + }); - @override - factory Input$SshMutationInput.fromJson(Map json) => - _$Input$SshMutationInputFromJson(json); + Input$SshMutationInput._(this._$data); - final String username; - - final String sshKey; - - Map toJson() => _$Input$SshMutationInputToJson(this); - int get hashCode { - final l$username = username; - final l$sshKey = sshKey; - return Object.hashAll([l$username, l$sshKey]); + factory Input$SshMutationInput.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + final l$sshKey = data['sshKey']; + result$data['sshKey'] = (l$sshKey as String); + return Input$SshMutationInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$SshMutationInput) || runtimeType != other.runtimeType) - return false; + Map _$data; + + String get username => (_$data['username'] as String); + String get sshKey => (_$data['sshKey'] as String); + Map toJson() { + final result$data = {}; final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; + result$data['username'] = l$username; final l$sshKey = sshKey; - final lOther$sshKey = other.sshKey; - if (l$sshKey != lOther$sshKey) return false; - return true; + result$data['sshKey'] = l$sshKey; + return result$data; } CopyWith$Input$SshMutationInput get copyWith => - CopyWith$Input$SshMutationInput(this, (i) => i); + CopyWith$Input$SshMutationInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$SshMutationInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + final l$sshKey = sshKey; + final lOther$sshKey = other.sshKey; + if (l$sshKey != lOther$sshKey) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$username = username; + final l$sshKey = sshKey; + return Object.hashAll([ + l$username, + l$sshKey, + ]); + } } abstract class CopyWith$Input$SshMutationInput { - factory CopyWith$Input$SshMutationInput(Input$SshMutationInput instance, - TRes Function(Input$SshMutationInput) then) = - _CopyWithImpl$Input$SshMutationInput; + factory CopyWith$Input$SshMutationInput( + Input$SshMutationInput instance, + TRes Function(Input$SshMutationInput) then, + ) = _CopyWithImpl$Input$SshMutationInput; factory CopyWith$Input$SshMutationInput.stub(TRes res) = _CopyWithStubImpl$Input$SshMutationInput; - TRes call({String? username, String? sshKey}); + TRes call({ + String? username, + String? sshKey, + }); } class _CopyWithImpl$Input$SshMutationInput implements CopyWith$Input$SshMutationInput { - _CopyWithImpl$Input$SshMutationInput(this._instance, this._then); + _CopyWithImpl$Input$SshMutationInput( + this._instance, + this._then, + ); final Input$SshMutationInput _instance; @@ -433,14 +694,17 @@ class _CopyWithImpl$Input$SshMutationInput static const _undefined = {}; - TRes call({Object? username = _undefined, Object? sshKey = _undefined}) => - _then(Input$SshMutationInput( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - sshKey: sshKey == _undefined || sshKey == null - ? _instance.sshKey - : (sshKey as String))); + TRes call({ + Object? username = _undefined, + Object? sshKey = _undefined, + }) => + _then(Input$SshMutationInput._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + if (sshKey != _undefined && sshKey != null) + 'sshKey': (sshKey as String), + })); } class _CopyWithStubImpl$Input$SshMutationInput @@ -449,61 +713,106 @@ class _CopyWithStubImpl$Input$SshMutationInput TRes _res; - call({String? username, String? sshKey}) => _res; + call({ + String? username, + String? sshKey, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$UseNewDeviceKeyInput { - Input$UseNewDeviceKeyInput({required this.key, required this.deviceName}); + factory Input$UseNewDeviceKeyInput({ + required String key, + required String deviceName, + }) => + Input$UseNewDeviceKeyInput._({ + r'key': key, + r'deviceName': deviceName, + }); - @override - factory Input$UseNewDeviceKeyInput.fromJson(Map json) => - _$Input$UseNewDeviceKeyInputFromJson(json); + Input$UseNewDeviceKeyInput._(this._$data); - final String key; - - final String deviceName; - - Map toJson() => _$Input$UseNewDeviceKeyInputToJson(this); - int get hashCode { - final l$key = key; - final l$deviceName = deviceName; - return Object.hashAll([l$key, l$deviceName]); + factory Input$UseNewDeviceKeyInput.fromJson(Map data) { + final result$data = {}; + final l$key = data['key']; + result$data['key'] = (l$key as String); + final l$deviceName = data['deviceName']; + result$data['deviceName'] = (l$deviceName as String); + return Input$UseNewDeviceKeyInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$UseNewDeviceKeyInput) || - runtimeType != other.runtimeType) return false; + Map _$data; + + String get key => (_$data['key'] as String); + String get deviceName => (_$data['deviceName'] as String); + Map toJson() { + final result$data = {}; final l$key = key; - final lOther$key = other.key; - if (l$key != lOther$key) return false; + result$data['key'] = l$key; final l$deviceName = deviceName; - final lOther$deviceName = other.deviceName; - if (l$deviceName != lOther$deviceName) return false; - return true; + result$data['deviceName'] = l$deviceName; + return result$data; } CopyWith$Input$UseNewDeviceKeyInput - get copyWith => CopyWith$Input$UseNewDeviceKeyInput(this, (i) => i); + get copyWith => CopyWith$Input$UseNewDeviceKeyInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$UseNewDeviceKeyInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) { + return false; + } + final l$deviceName = deviceName; + final lOther$deviceName = other.deviceName; + if (l$deviceName != lOther$deviceName) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$key = key; + final l$deviceName = deviceName; + return Object.hashAll([ + l$key, + l$deviceName, + ]); + } } abstract class CopyWith$Input$UseNewDeviceKeyInput { factory CopyWith$Input$UseNewDeviceKeyInput( - Input$UseNewDeviceKeyInput instance, - TRes Function(Input$UseNewDeviceKeyInput) then) = - _CopyWithImpl$Input$UseNewDeviceKeyInput; + Input$UseNewDeviceKeyInput instance, + TRes Function(Input$UseNewDeviceKeyInput) then, + ) = _CopyWithImpl$Input$UseNewDeviceKeyInput; factory CopyWith$Input$UseNewDeviceKeyInput.stub(TRes res) = _CopyWithStubImpl$Input$UseNewDeviceKeyInput; - TRes call({String? key, String? deviceName}); + TRes call({ + String? key, + String? deviceName, + }); } class _CopyWithImpl$Input$UseNewDeviceKeyInput implements CopyWith$Input$UseNewDeviceKeyInput { - _CopyWithImpl$Input$UseNewDeviceKeyInput(this._instance, this._then); + _CopyWithImpl$Input$UseNewDeviceKeyInput( + this._instance, + this._then, + ); final Input$UseNewDeviceKeyInput _instance; @@ -511,14 +820,16 @@ class _CopyWithImpl$Input$UseNewDeviceKeyInput static const _undefined = {}; - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseNewDeviceKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); + TRes call({ + Object? key = _undefined, + Object? deviceName = _undefined, + }) => + _then(Input$UseNewDeviceKeyInput._({ + ..._instance._$data, + if (key != _undefined && key != null) 'key': (key as String), + if (deviceName != _undefined && deviceName != null) + 'deviceName': (deviceName as String), + })); } class _CopyWithStubImpl$Input$UseNewDeviceKeyInput @@ -527,60 +838,106 @@ class _CopyWithStubImpl$Input$UseNewDeviceKeyInput TRes _res; - call({String? key, String? deviceName}) => _res; + call({ + String? key, + String? deviceName, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$UseRecoveryKeyInput { - Input$UseRecoveryKeyInput({required this.key, required this.deviceName}); + factory Input$UseRecoveryKeyInput({ + required String key, + required String deviceName, + }) => + Input$UseRecoveryKeyInput._({ + r'key': key, + r'deviceName': deviceName, + }); - @override - factory Input$UseRecoveryKeyInput.fromJson(Map json) => - _$Input$UseRecoveryKeyInputFromJson(json); + Input$UseRecoveryKeyInput._(this._$data); - final String key; - - final String deviceName; - - Map toJson() => _$Input$UseRecoveryKeyInputToJson(this); - int get hashCode { - final l$key = key; - final l$deviceName = deviceName; - return Object.hashAll([l$key, l$deviceName]); + factory Input$UseRecoveryKeyInput.fromJson(Map data) { + final result$data = {}; + final l$key = data['key']; + result$data['key'] = (l$key as String); + final l$deviceName = data['deviceName']; + result$data['deviceName'] = (l$deviceName as String); + return Input$UseRecoveryKeyInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$UseRecoveryKeyInput) || - runtimeType != other.runtimeType) return false; + Map _$data; + + String get key => (_$data['key'] as String); + String get deviceName => (_$data['deviceName'] as String); + Map toJson() { + final result$data = {}; final l$key = key; - final lOther$key = other.key; - if (l$key != lOther$key) return false; + result$data['key'] = l$key; final l$deviceName = deviceName; - final lOther$deviceName = other.deviceName; - if (l$deviceName != lOther$deviceName) return false; - return true; + result$data['deviceName'] = l$deviceName; + return result$data; } CopyWith$Input$UseRecoveryKeyInput get copyWith => - CopyWith$Input$UseRecoveryKeyInput(this, (i) => i); + CopyWith$Input$UseRecoveryKeyInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$UseRecoveryKeyInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) { + return false; + } + final l$deviceName = deviceName; + final lOther$deviceName = other.deviceName; + if (l$deviceName != lOther$deviceName) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$key = key; + final l$deviceName = deviceName; + return Object.hashAll([ + l$key, + l$deviceName, + ]); + } } abstract class CopyWith$Input$UseRecoveryKeyInput { - factory CopyWith$Input$UseRecoveryKeyInput(Input$UseRecoveryKeyInput instance, - TRes Function(Input$UseRecoveryKeyInput) then) = - _CopyWithImpl$Input$UseRecoveryKeyInput; + factory CopyWith$Input$UseRecoveryKeyInput( + Input$UseRecoveryKeyInput instance, + TRes Function(Input$UseRecoveryKeyInput) then, + ) = _CopyWithImpl$Input$UseRecoveryKeyInput; factory CopyWith$Input$UseRecoveryKeyInput.stub(TRes res) = _CopyWithStubImpl$Input$UseRecoveryKeyInput; - TRes call({String? key, String? deviceName}); + TRes call({ + String? key, + String? deviceName, + }); } class _CopyWithImpl$Input$UseRecoveryKeyInput implements CopyWith$Input$UseRecoveryKeyInput { - _CopyWithImpl$Input$UseRecoveryKeyInput(this._instance, this._then); + _CopyWithImpl$Input$UseRecoveryKeyInput( + this._instance, + this._then, + ); final Input$UseRecoveryKeyInput _instance; @@ -588,14 +945,16 @@ class _CopyWithImpl$Input$UseRecoveryKeyInput static const _undefined = {}; - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseRecoveryKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); + TRes call({ + Object? key = _undefined, + Object? deviceName = _undefined, + }) => + _then(Input$UseRecoveryKeyInput._({ + ..._instance._$data, + if (key != _undefined && key != null) 'key': (key as String), + if (deviceName != _undefined && deviceName != null) + 'deviceName': (deviceName as String), + })); } class _CopyWithStubImpl$Input$UseRecoveryKeyInput @@ -604,60 +963,106 @@ class _CopyWithStubImpl$Input$UseRecoveryKeyInput TRes _res; - call({String? key, String? deviceName}) => _res; + call({ + String? key, + String? deviceName, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Input$UserMutationInput { - Input$UserMutationInput({required this.username, required this.password}); + factory Input$UserMutationInput({ + required String username, + required String password, + }) => + Input$UserMutationInput._({ + r'username': username, + r'password': password, + }); - @override - factory Input$UserMutationInput.fromJson(Map json) => - _$Input$UserMutationInputFromJson(json); + Input$UserMutationInput._(this._$data); - final String username; - - final String password; - - Map toJson() => _$Input$UserMutationInputToJson(this); - int get hashCode { - final l$username = username; - final l$password = password; - return Object.hashAll([l$username, l$password]); + factory Input$UserMutationInput.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + final l$password = data['password']; + result$data['password'] = (l$password as String); + return Input$UserMutationInput._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Input$UserMutationInput) || runtimeType != other.runtimeType) - return false; + Map _$data; + + String get username => (_$data['username'] as String); + String get password => (_$data['password'] as String); + Map toJson() { + final result$data = {}; final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; + result$data['username'] = l$username; final l$password = password; - final lOther$password = other.password; - if (l$password != lOther$password) return false; - return true; + result$data['password'] = l$password; + return result$data; } CopyWith$Input$UserMutationInput get copyWith => - CopyWith$Input$UserMutationInput(this, (i) => i); + CopyWith$Input$UserMutationInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$UserMutationInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + final l$password = password; + final lOther$password = other.password; + if (l$password != lOther$password) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$username = username; + final l$password = password; + return Object.hashAll([ + l$username, + l$password, + ]); + } } abstract class CopyWith$Input$UserMutationInput { - factory CopyWith$Input$UserMutationInput(Input$UserMutationInput instance, - TRes Function(Input$UserMutationInput) then) = - _CopyWithImpl$Input$UserMutationInput; + factory CopyWith$Input$UserMutationInput( + Input$UserMutationInput instance, + TRes Function(Input$UserMutationInput) then, + ) = _CopyWithImpl$Input$UserMutationInput; factory CopyWith$Input$UserMutationInput.stub(TRes res) = _CopyWithStubImpl$Input$UserMutationInput; - TRes call({String? username, String? password}); + TRes call({ + String? username, + String? password, + }); } class _CopyWithImpl$Input$UserMutationInput implements CopyWith$Input$UserMutationInput { - _CopyWithImpl$Input$UserMutationInput(this._instance, this._then); + _CopyWithImpl$Input$UserMutationInput( + this._instance, + this._then, + ); final Input$UserMutationInput _instance; @@ -665,14 +1070,17 @@ class _CopyWithImpl$Input$UserMutationInput static const _undefined = {}; - TRes call({Object? username = _undefined, Object? password = _undefined}) => - _then(Input$UserMutationInput( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - password: password == _undefined || password == null - ? _instance.password - : (password as String))); + TRes call({ + Object? username = _undefined, + Object? password = _undefined, + }) => + _then(Input$UserMutationInput._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + if (password != _undefined && password != null) + 'password': (password as String), + })); } class _CopyWithStubImpl$Input$UserMutationInput @@ -681,78 +1089,200 @@ class _CopyWithStubImpl$Input$UserMutationInput TRes _res; - call({String? username, String? password}) => _res; + call({ + String? username, + String? password, + }) => + _res; } -enum Enum$DnsProvider { - @JsonValue('CLOUDFLARE') - CLOUDFLARE, - $unknown +enum Enum$DnsProvider { CLOUDFLARE, $unknown } + +String toJson$Enum$DnsProvider(Enum$DnsProvider e) { + switch (e) { + case Enum$DnsProvider.CLOUDFLARE: + return r'CLOUDFLARE'; + case Enum$DnsProvider.$unknown: + return r'$unknown'; + } } -enum Enum$ServerProvider { - @JsonValue('HETZNER') - HETZNER, - @JsonValue('DIGITALOCEAN') - DIGITALOCEAN, - $unknown +Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { + switch (value) { + case r'CLOUDFLARE': + return Enum$DnsProvider.CLOUDFLARE; + default: + return Enum$DnsProvider.$unknown; + } +} + +enum Enum$ServerProvider { HETZNER, DIGITALOCEAN, $unknown } + +String toJson$Enum$ServerProvider(Enum$ServerProvider e) { + switch (e) { + case Enum$ServerProvider.HETZNER: + return r'HETZNER'; + case Enum$ServerProvider.DIGITALOCEAN: + return r'DIGITALOCEAN'; + case Enum$ServerProvider.$unknown: + return r'$unknown'; + } +} + +Enum$ServerProvider fromJson$Enum$ServerProvider(String value) { + switch (value) { + case r'HETZNER': + return Enum$ServerProvider.HETZNER; + case r'DIGITALOCEAN': + return Enum$ServerProvider.DIGITALOCEAN; + default: + return Enum$ServerProvider.$unknown; + } } enum Enum$ServiceStatusEnum { - @JsonValue('ACTIVATING') ACTIVATING, - @JsonValue('ACTIVE') ACTIVE, - @JsonValue('DEACTIVATING') DEACTIVATING, - @JsonValue('FAILED') FAILED, - @JsonValue('INACTIVE') INACTIVE, - @JsonValue('OFF') OFF, - @JsonValue('RELOADING') RELOADING, $unknown } -enum Enum$Severity { - @JsonValue('CRITICAL') - CRITICAL, - @JsonValue('ERROR') - ERROR, - @JsonValue('INFO') - INFO, - @JsonValue('SUCCESS') - SUCCESS, - @JsonValue('WARNING') - WARNING, - $unknown +String toJson$Enum$ServiceStatusEnum(Enum$ServiceStatusEnum e) { + switch (e) { + case Enum$ServiceStatusEnum.ACTIVATING: + return r'ACTIVATING'; + case Enum$ServiceStatusEnum.ACTIVE: + return r'ACTIVE'; + case Enum$ServiceStatusEnum.DEACTIVATING: + return r'DEACTIVATING'; + case Enum$ServiceStatusEnum.FAILED: + return r'FAILED'; + case Enum$ServiceStatusEnum.INACTIVE: + return r'INACTIVE'; + case Enum$ServiceStatusEnum.OFF: + return r'OFF'; + case Enum$ServiceStatusEnum.RELOADING: + return r'RELOADING'; + case Enum$ServiceStatusEnum.$unknown: + return r'$unknown'; + } } -enum Enum$UserType { - @JsonValue('NORMAL') - NORMAL, - @JsonValue('PRIMARY') - PRIMARY, - @JsonValue('ROOT') - ROOT, - $unknown +Enum$ServiceStatusEnum fromJson$Enum$ServiceStatusEnum(String value) { + switch (value) { + case r'ACTIVATING': + return Enum$ServiceStatusEnum.ACTIVATING; + case r'ACTIVE': + return Enum$ServiceStatusEnum.ACTIVE; + case r'DEACTIVATING': + return Enum$ServiceStatusEnum.DEACTIVATING; + case r'FAILED': + return Enum$ServiceStatusEnum.FAILED; + case r'INACTIVE': + return Enum$ServiceStatusEnum.INACTIVE; + case r'OFF': + return Enum$ServiceStatusEnum.OFF; + case r'RELOADING': + return Enum$ServiceStatusEnum.RELOADING; + default: + return Enum$ServiceStatusEnum.$unknown; + } +} + +enum Enum$Severity { CRITICAL, ERROR, INFO, SUCCESS, WARNING, $unknown } + +String toJson$Enum$Severity(Enum$Severity e) { + switch (e) { + case Enum$Severity.CRITICAL: + return r'CRITICAL'; + case Enum$Severity.ERROR: + return r'ERROR'; + case Enum$Severity.INFO: + return r'INFO'; + case Enum$Severity.SUCCESS: + return r'SUCCESS'; + case Enum$Severity.WARNING: + return r'WARNING'; + case Enum$Severity.$unknown: + return r'$unknown'; + } +} + +Enum$Severity fromJson$Enum$Severity(String value) { + switch (value) { + case r'CRITICAL': + return Enum$Severity.CRITICAL; + case r'ERROR': + return Enum$Severity.ERROR; + case r'INFO': + return Enum$Severity.INFO; + case r'SUCCESS': + return Enum$Severity.SUCCESS; + case r'WARNING': + return Enum$Severity.WARNING; + default: + return Enum$Severity.$unknown; + } +} + +enum Enum$UserType { NORMAL, PRIMARY, ROOT, $unknown } + +String toJson$Enum$UserType(Enum$UserType e) { + switch (e) { + case Enum$UserType.NORMAL: + return r'NORMAL'; + case Enum$UserType.PRIMARY: + return r'PRIMARY'; + case Enum$UserType.ROOT: + return r'ROOT'; + case Enum$UserType.$unknown: + return r'$unknown'; + } +} + +Enum$UserType fromJson$Enum$UserType(String value) { + switch (value) { + case r'NORMAL': + return Enum$UserType.NORMAL; + case r'PRIMARY': + return Enum$UserType.PRIMARY; + case r'ROOT': + return Enum$UserType.ROOT; + default: + return Enum$UserType.$unknown; + } } -@JsonSerializable(explicitToJson: true) class Fragment$dnsRecordFields { - Fragment$dnsRecordFields( - {required this.content, - required this.name, - this.priority, - required this.recordType, - required this.ttl, - required this.$__typename}); + Fragment$dnsRecordFields({ + required this.content, + required this.name, + this.priority, + required this.recordType, + required this.ttl, + required this.$__typename, + }); - @override - factory Fragment$dnsRecordFields.fromJson(Map json) => - _$Fragment$dnsRecordFieldsFromJson(json); + factory Fragment$dnsRecordFields.fromJson(Map json) { + final l$content = json['content']; + final l$name = json['name']; + final l$priority = json['priority']; + final l$recordType = json['recordType']; + final l$ttl = json['ttl']; + final l$$__typename = json['__typename']; + return Fragment$dnsRecordFields( + content: (l$content as String), + name: (l$name as String), + priority: (l$priority as int?), + recordType: (l$recordType as String), + ttl: (l$ttl as int), + $__typename: (l$$__typename as String), + ); + } final String content; @@ -764,10 +1294,26 @@ class Fragment$dnsRecordFields { final int ttl; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Fragment$dnsRecordFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$content = content; + _resultData['content'] = l$content; + final l$name = name; + _resultData['name'] = l$name; + final l$priority = priority; + _resultData['priority'] = l$priority; + final l$recordType = recordType; + _resultData['recordType'] = l$recordType; + final l$ttl = ttl; + _resultData['ttl'] = l$ttl; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$content = content; final l$name = name; @@ -775,33 +1321,55 @@ class Fragment$dnsRecordFields { final l$recordType = recordType; final l$ttl = ttl; final l$$__typename = $__typename; - return Object.hashAll( - [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); + return Object.hashAll([ + l$content, + l$name, + l$priority, + l$recordType, + l$ttl, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$dnsRecordFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$content = content; final lOther$content = other.content; - if (l$content != lOther$content) return false; + if (l$content != lOther$content) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$priority = priority; final lOther$priority = other.priority; - if (l$priority != lOther$priority) return false; + if (l$priority != lOther$priority) { + return false; + } final l$recordType = recordType; final lOther$recordType = other.recordType; - if (l$recordType != lOther$recordType) return false; + if (l$recordType != lOther$recordType) { + return false; + } final l$ttl = ttl; final lOther$ttl = other.ttl; - if (l$ttl != lOther$ttl) return false; + if (l$ttl != lOther$ttl) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -809,29 +1377,37 @@ class Fragment$dnsRecordFields { extension UtilityExtension$Fragment$dnsRecordFields on Fragment$dnsRecordFields { CopyWith$Fragment$dnsRecordFields get copyWith => - CopyWith$Fragment$dnsRecordFields(this, (i) => i); + CopyWith$Fragment$dnsRecordFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$dnsRecordFields { - factory CopyWith$Fragment$dnsRecordFields(Fragment$dnsRecordFields instance, - TRes Function(Fragment$dnsRecordFields) then) = - _CopyWithImpl$Fragment$dnsRecordFields; + factory CopyWith$Fragment$dnsRecordFields( + Fragment$dnsRecordFields instance, + TRes Function(Fragment$dnsRecordFields) then, + ) = _CopyWithImpl$Fragment$dnsRecordFields; factory CopyWith$Fragment$dnsRecordFields.stub(TRes res) = _CopyWithStubImpl$Fragment$dnsRecordFields; - TRes call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}); + TRes call({ + String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename, + }); } class _CopyWithImpl$Fragment$dnsRecordFields implements CopyWith$Fragment$dnsRecordFields { - _CopyWithImpl$Fragment$dnsRecordFields(this._instance, this._then); + _CopyWithImpl$Fragment$dnsRecordFields( + this._instance, + this._then, + ); final Fragment$dnsRecordFields _instance; @@ -839,29 +1415,31 @@ class _CopyWithImpl$Fragment$dnsRecordFields static const _undefined = {}; - TRes call( - {Object? content = _undefined, - Object? name = _undefined, - Object? priority = _undefined, - Object? recordType = _undefined, - Object? ttl = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? content = _undefined, + Object? name = _undefined, + Object? priority = _undefined, + Object? recordType = _undefined, + Object? ttl = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$dnsRecordFields( - content: content == _undefined || content == null - ? _instance.content - : (content as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - priority: - priority == _undefined ? _instance.priority : (priority as int?), - recordType: recordType == _undefined || recordType == null - ? _instance.recordType - : (recordType as String), - ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + content: content == _undefined || content == null + ? _instance.content + : (content as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + priority: + priority == _undefined ? _instance.priority : (priority as int?), + recordType: recordType == _undefined || recordType == null + ? _instance.recordType + : (recordType as String), + ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$dnsRecordFields @@ -870,86 +1448,105 @@ class _CopyWithStubImpl$Fragment$dnsRecordFields TRes _res; - call( - {String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename}) => + call({ + String? content, + String? name, + int? priority, + String? recordType, + int? ttl, + String? $__typename, + }) => _res; } const fragmentDefinitiondnsRecordFields = FragmentDefinitionNode( - name: NameNode(value: 'dnsRecordFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'DnsRecord'), isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'content'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'priority'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'recordType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'ttl'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'dnsRecordFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'DnsRecord'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'ttl'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentdnsRecordFields = DocumentNode(definitions: [ fragmentDefinitiondnsRecordFields, ]); extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient { - void writeFragment$dnsRecordFields( - {required Fragment$dnsRecordFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$dnsRecordFields({ + required Fragment$dnsRecordFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'dnsRecordFields', - document: documentNodeFragmentdnsRecordFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$dnsRecordFields? readFragment$dnsRecordFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'dnsRecordFields', - document: documentNodeFragmentdnsRecordFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'dnsRecordFields', + document: documentNodeFragmentdnsRecordFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$dnsRecordFields? readFragment$dnsRecordFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'dnsRecordFields', + document: documentNodeFragmentdnsRecordFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$dnsRecordFields.fromJson(result); } } @@ -964,11 +1561,7 @@ const possibleTypesMap = { 'ServiceJobMutationReturn', 'ServiceMutationReturn', 'TimezoneMutationReturn', - 'UserMutationReturn' + 'UserMutationReturn', }, - 'StorageUsageInterface': {'ServiceStorageUsage'} + 'StorageUsageInterface': {'ServiceStorageUsage'}, }; -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 325ee89d..7a147cc7 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,23 +1,69 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -part 'server_api.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -25,36 +71,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -63,25 +137,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -89,24 +173,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -115,43 +200,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -159,88 +255,1751 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$GetApiVersion { - Query$GetApiVersion({required this.api, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$GetApiVersion.fromJson(Map json) => - _$Query$GetApiVersionFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$GetApiVersion$api api; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersionToJson(this); - int get hashCode { - final l$api = api; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$api, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiVersion) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { return false; - final l$api = api; - final lOther$api = other.api; - if (l$api != lOther$api) return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$GetApiVersion { + Query$GetApiVersion({ + required this.api, + required this.$__typename, + }); + + factory Query$GetApiVersion.fromJson(Map json) { + final l$api = json['api']; + final l$$__typename = json['__typename']; + return Query$GetApiVersion( + api: Query$GetApiVersion$api.fromJson((l$api as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$GetApiVersion$api api; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$api = api; + _resultData['api'] = l$api.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$api = api; + final l$$__typename = $__typename; + return Object.hashAll([ + l$api, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiVersion) || runtimeType != other.runtimeType) { + return false; + } + final l$api = api; + final lOther$api = other.api; + if (l$api != lOther$api) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiVersion on Query$GetApiVersion { CopyWith$Query$GetApiVersion get copyWith => - CopyWith$Query$GetApiVersion(this, (i) => i); + CopyWith$Query$GetApiVersion( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiVersion { - factory CopyWith$Query$GetApiVersion(Query$GetApiVersion instance, - TRes Function(Query$GetApiVersion) then) = - _CopyWithImpl$Query$GetApiVersion; + factory CopyWith$Query$GetApiVersion( + Query$GetApiVersion instance, + TRes Function(Query$GetApiVersion) then, + ) = _CopyWithImpl$Query$GetApiVersion; factory CopyWith$Query$GetApiVersion.stub(TRes res) = _CopyWithStubImpl$Query$GetApiVersion; - TRes call({Query$GetApiVersion$api? api, String? $__typename}); + TRes call({ + Query$GetApiVersion$api? api, + String? $__typename, + }); CopyWith$Query$GetApiVersion$api get api; } class _CopyWithImpl$Query$GetApiVersion implements CopyWith$Query$GetApiVersion { - _CopyWithImpl$Query$GetApiVersion(this._instance, this._then); + _CopyWithImpl$Query$GetApiVersion( + this._instance, + this._then, + ); final Query$GetApiVersion _instance; @@ -248,14 +2007,18 @@ class _CopyWithImpl$Query$GetApiVersion static const _undefined = {}; - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? api = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiVersion( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiVersion$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiVersion$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetApiVersion$api get api { final local$api = _instance.api; return CopyWith$Query$GetApiVersion$api(local$api, (e) => call(api: e)); @@ -268,103 +2031,116 @@ class _CopyWithStubImpl$Query$GetApiVersion TRes _res; - call({Query$GetApiVersion$api? api, String? $__typename}) => _res; + call({ + Query$GetApiVersion$api? api, + String? $__typename, + }) => + _res; CopyWith$Query$GetApiVersion$api get api => CopyWith$Query$GetApiVersion$api.stub(_res); } const documentNodeQueryGetApiVersion = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetApiVersion'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'api'), + type: OperationType.query, + name: NameNode(value: 'GetApiVersion'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'version'), alias: null, arguments: [], directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'version'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetApiVersion _parserFn$Query$GetApiVersion(Map data) => Query$GetApiVersion.fromJson(data); class Options$Query$GetApiVersion extends graphql.QueryOptions { - Options$Query$GetApiVersion( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetApiVersion, - parserFn: _parserFn$Query$GetApiVersion); + Options$Query$GetApiVersion({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiVersion, + parserFn: _parserFn$Query$GetApiVersion, + ); } class WatchOptions$Query$GetApiVersion extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiVersion( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetApiVersion, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiVersion); + WatchOptions$Query$GetApiVersion({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiVersion, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiVersion, + ); } class FetchMoreOptions$Query$GetApiVersion extends graphql.FetchMoreOptions { FetchMoreOptions$Query$GetApiVersion( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, document: documentNodeQueryGetApiVersion); + updateQuery: updateQuery, + document: documentNodeQueryGetApiVersion, + ); } extension ClientExtension$Query$GetApiVersion on graphql.GraphQLClient { @@ -374,78 +2150,118 @@ extension ClientExtension$Query$GetApiVersion on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetApiVersion( [WatchOptions$Query$GetApiVersion? options]) => this.watchQuery(options ?? WatchOptions$Query$GetApiVersion()); - void writeQuery$GetApiVersion( - {required Query$GetApiVersion data, bool broadcast = true}) => + void writeQuery$GetApiVersion({ + required Query$GetApiVersion data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryGetApiVersion)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiVersion? readQuery$GetApiVersion({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryGetApiVersion)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetApiVersion? readQuery$GetApiVersion({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiVersion)), + optimistic: optimistic, + ); return result == null ? null : Query$GetApiVersion.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetApiVersion$api { - Query$GetApiVersion$api({required this.version, required this.$__typename}); + Query$GetApiVersion$api({ + required this.version, + required this.$__typename, + }); - @override - factory Query$GetApiVersion$api.fromJson(Map json) => - _$Query$GetApiVersion$apiFromJson(json); + factory Query$GetApiVersion$api.fromJson(Map json) { + final l$version = json['version']; + final l$$__typename = json['__typename']; + return Query$GetApiVersion$api( + version: (l$version as String), + $__typename: (l$$__typename as String), + ); + } final String version; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersion$apiToJson(this); + Map toJson() { + final _resultData = {}; + final l$version = version; + _resultData['version'] = l$version; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$version = version; final l$$__typename = $__typename; - return Object.hashAll([l$version, l$$__typename]); + return Object.hashAll([ + l$version, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiVersion$api) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiVersion$api) || + runtimeType != other.runtimeType) { return false; + } final l$version = version; final lOther$version = other.version; - if (l$version != lOther$version) return false; + if (l$version != lOther$version) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiVersion$api on Query$GetApiVersion$api { CopyWith$Query$GetApiVersion$api get copyWith => - CopyWith$Query$GetApiVersion$api(this, (i) => i); + CopyWith$Query$GetApiVersion$api( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiVersion$api { - factory CopyWith$Query$GetApiVersion$api(Query$GetApiVersion$api instance, - TRes Function(Query$GetApiVersion$api) then) = - _CopyWithImpl$Query$GetApiVersion$api; + factory CopyWith$Query$GetApiVersion$api( + Query$GetApiVersion$api instance, + TRes Function(Query$GetApiVersion$api) then, + ) = _CopyWithImpl$Query$GetApiVersion$api; factory CopyWith$Query$GetApiVersion$api.stub(TRes res) = _CopyWithStubImpl$Query$GetApiVersion$api; - TRes call({String? version, String? $__typename}); + TRes call({ + String? version, + String? $__typename, + }); } class _CopyWithImpl$Query$GetApiVersion$api implements CopyWith$Query$GetApiVersion$api { - _CopyWithImpl$Query$GetApiVersion$api(this._instance, this._then); + _CopyWithImpl$Query$GetApiVersion$api( + this._instance, + this._then, + ); final Query$GetApiVersion$api _instance; @@ -453,14 +2269,18 @@ class _CopyWithImpl$Query$GetApiVersion$api static const _undefined = {}; - TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? version = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiVersion$api( - version: version == _undefined || version == null - ? _instance.version - : (version as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + version: version == _undefined || version == null + ? _instance.version + : (version as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetApiVersion$api @@ -469,64 +2289,103 @@ class _CopyWithStubImpl$Query$GetApiVersion$api TRes _res; - call({String? version, String? $__typename}) => _res; + call({ + String? version, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiJobs { - Query$GetApiJobs({required this.jobs, required this.$__typename}); + Query$GetApiJobs({ + required this.jobs, + required this.$__typename, + }); - @override - factory Query$GetApiJobs.fromJson(Map json) => - _$Query$GetApiJobsFromJson(json); + factory Query$GetApiJobs.fromJson(Map json) { + final l$jobs = json['jobs']; + final l$$__typename = json['__typename']; + return Query$GetApiJobs( + jobs: Query$GetApiJobs$jobs.fromJson((l$jobs as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$GetApiJobs$jobs jobs; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiJobsToJson(this); + Map toJson() { + final _resultData = {}; + final l$jobs = jobs; + _resultData['jobs'] = l$jobs.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$jobs = jobs; final l$$__typename = $__typename; - return Object.hashAll([l$jobs, l$$__typename]); + return Object.hashAll([ + l$jobs, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiJobs) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiJobs) || runtimeType != other.runtimeType) { return false; + } final l$jobs = jobs; final lOther$jobs = other.jobs; - if (l$jobs != lOther$jobs) return false; + if (l$jobs != lOther$jobs) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiJobs on Query$GetApiJobs { CopyWith$Query$GetApiJobs get copyWith => - CopyWith$Query$GetApiJobs(this, (i) => i); + CopyWith$Query$GetApiJobs( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiJobs { factory CopyWith$Query$GetApiJobs( - Query$GetApiJobs instance, TRes Function(Query$GetApiJobs) then) = - _CopyWithImpl$Query$GetApiJobs; + Query$GetApiJobs instance, + TRes Function(Query$GetApiJobs) then, + ) = _CopyWithImpl$Query$GetApiJobs; factory CopyWith$Query$GetApiJobs.stub(TRes res) = _CopyWithStubImpl$Query$GetApiJobs; - TRes call({Query$GetApiJobs$jobs? jobs, String? $__typename}); + TRes call({ + Query$GetApiJobs$jobs? jobs, + String? $__typename, + }); CopyWith$Query$GetApiJobs$jobs get jobs; } class _CopyWithImpl$Query$GetApiJobs implements CopyWith$Query$GetApiJobs { - _CopyWithImpl$Query$GetApiJobs(this._instance, this._then); + _CopyWithImpl$Query$GetApiJobs( + this._instance, + this._then, + ); final Query$GetApiJobs _instance; @@ -534,14 +2393,18 @@ class _CopyWithImpl$Query$GetApiJobs static const _undefined = {}; - TRes call({Object? jobs = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? jobs = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiJobs( - jobs: jobs == _undefined || jobs == null - ? _instance.jobs - : (jobs as Query$GetApiJobs$jobs), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + jobs: jobs == _undefined || jobs == null + ? _instance.jobs + : (jobs as Query$GetApiJobs$jobs), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetApiJobs$jobs get jobs { final local$jobs = _instance.jobs; return CopyWith$Query$GetApiJobs$jobs(local$jobs, (e) => call(jobs: e)); @@ -554,173 +2417,199 @@ class _CopyWithStubImpl$Query$GetApiJobs TRes _res; - call({Query$GetApiJobs$jobs? jobs, String? $__typename}) => _res; + call({ + Query$GetApiJobs$jobs? jobs, + String? $__typename, + }) => + _res; CopyWith$Query$GetApiJobs$jobs get jobs => CopyWith$Query$GetApiJobs$jobs.stub(_res); } const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetApiJobs'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'jobs'), + type: OperationType.query, + name: NameNode(value: 'GetApiJobs'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'jobs'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getJobs'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'getJobs'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetApiJobs _parserFn$Query$GetApiJobs(Map data) => Query$GetApiJobs.fromJson(data); class Options$Query$GetApiJobs extends graphql.QueryOptions { - Options$Query$GetApiJobs( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetApiJobs, - parserFn: _parserFn$Query$GetApiJobs); + Options$Query$GetApiJobs({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiJobs, + parserFn: _parserFn$Query$GetApiJobs, + ); } class WatchOptions$Query$GetApiJobs extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiJobs( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetApiJobs, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiJobs); + WatchOptions$Query$GetApiJobs({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiJobs, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiJobs, + ); } class FetchMoreOptions$Query$GetApiJobs extends graphql.FetchMoreOptions { FetchMoreOptions$Query$GetApiJobs({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryGetApiJobs); + : super( + updateQuery: updateQuery, + document: documentNodeQueryGetApiJobs, + ); } extension ClientExtension$Query$GetApiJobs on graphql.GraphQLClient { @@ -730,81 +2619,118 @@ extension ClientExtension$Query$GetApiJobs on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetApiJobs( [WatchOptions$Query$GetApiJobs? options]) => this.watchQuery(options ?? WatchOptions$Query$GetApiJobs()); - void writeQuery$GetApiJobs( - {required Query$GetApiJobs data, bool broadcast = true}) => + void writeQuery$GetApiJobs({ + required Query$GetApiJobs data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryGetApiJobs)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiJobs? readQuery$GetApiJobs({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryGetApiJobs)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetApiJobs? readQuery$GetApiJobs({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetApiJobs)), + optimistic: optimistic, + ); return result == null ? null : Query$GetApiJobs.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetApiJobs$jobs { - Query$GetApiJobs$jobs({required this.getJobs, required this.$__typename}); + Query$GetApiJobs$jobs({ + required this.getJobs, + required this.$__typename, + }); - @override - factory Query$GetApiJobs$jobs.fromJson(Map json) => - _$Query$GetApiJobs$jobsFromJson(json); + factory Query$GetApiJobs$jobs.fromJson(Map json) { + final l$getJobs = json['getJobs']; + final l$$__typename = json['__typename']; + return Query$GetApiJobs$jobs( + getJobs: (l$getJobs as List) + .map((e) => Query$GetApiJobs$jobs$getJobs.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List getJobs; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiJobs$jobsToJson(this); + Map toJson() { + final _resultData = {}; + final l$getJobs = getJobs; + _resultData['getJobs'] = l$getJobs.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getJobs = getJobs; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$getJobs.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$getJobs.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiJobs$jobs) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiJobs$jobs) || runtimeType != other.runtimeType) { return false; + } final l$getJobs = getJobs; final lOther$getJobs = other.getJobs; - if (l$getJobs.length != lOther$getJobs.length) return false; + if (l$getJobs.length != lOther$getJobs.length) { + return false; + } for (int i = 0; i < l$getJobs.length; i++) { final l$getJobs$entry = l$getJobs[i]; final lOther$getJobs$entry = lOther$getJobs[i]; - if (l$getJobs$entry != lOther$getJobs$entry) return false; + if (l$getJobs$entry != lOther$getJobs$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiJobs$jobs on Query$GetApiJobs$jobs { CopyWith$Query$GetApiJobs$jobs get copyWith => - CopyWith$Query$GetApiJobs$jobs(this, (i) => i); + CopyWith$Query$GetApiJobs$jobs( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiJobs$jobs { - factory CopyWith$Query$GetApiJobs$jobs(Query$GetApiJobs$jobs instance, - TRes Function(Query$GetApiJobs$jobs) then) = - _CopyWithImpl$Query$GetApiJobs$jobs; + factory CopyWith$Query$GetApiJobs$jobs( + Query$GetApiJobs$jobs instance, + TRes Function(Query$GetApiJobs$jobs) then, + ) = _CopyWithImpl$Query$GetApiJobs$jobs; factory CopyWith$Query$GetApiJobs$jobs.stub(TRes res) = _CopyWithStubImpl$Query$GetApiJobs$jobs; - TRes call( - {List? getJobs, String? $__typename}); + TRes call({ + List? getJobs, + String? $__typename, + }); TRes getJobs( Iterable Function( Iterable< @@ -815,7 +2741,10 @@ abstract class CopyWith$Query$GetApiJobs$jobs { class _CopyWithImpl$Query$GetApiJobs$jobs implements CopyWith$Query$GetApiJobs$jobs { - _CopyWithImpl$Query$GetApiJobs$jobs(this._instance, this._then); + _CopyWithImpl$Query$GetApiJobs$jobs( + this._instance, + this._then, + ); final Query$GetApiJobs$jobs _instance; @@ -823,14 +2752,18 @@ class _CopyWithImpl$Query$GetApiJobs$jobs static const _undefined = {}; - TRes call({Object? getJobs = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? getJobs = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiJobs$jobs( - getJobs: getJobs == _undefined || getJobs == null - ? _instance.getJobs - : (getJobs as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getJobs: getJobs == _undefined || getJobs == null + ? _instance.getJobs + : (getJobs as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes getJobs( Iterable Function( Iterable< @@ -838,9 +2771,11 @@ class _CopyWithImpl$Query$GetApiJobs$jobs Query$GetApiJobs$jobs$getJobs>>) _fn) => call( - getJobs: _fn(_instance.getJobs.map( - (e) => CopyWith$Query$GetApiJobs$jobs$getJobs(e, (i) => i))) - .toList()); + getJobs: _fn(_instance.getJobs + .map((e) => CopyWith$Query$GetApiJobs$jobs$getJobs( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetApiJobs$jobs @@ -849,40 +2784,65 @@ class _CopyWithStubImpl$Query$GetApiJobs$jobs TRes _res; - call({List? getJobs, String? $__typename}) => + call({ + List? getJobs, + String? $__typename, + }) => _res; getJobs(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiJobs$jobs$getJobs { - Query$GetApiJobs$jobs$getJobs( - {required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - required this.$__typename}); + Query$GetApiJobs$jobs$getJobs({ + required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename, + }); - @override - factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) => - _$Query$GetApiJobs$jobs$getJobsFromJson(json); + factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) { + final l$createdAt = json['createdAt']; + final l$description = json['description']; + final l$error = json['error']; + final l$finishedAt = json['finishedAt']; + final l$name = json['name']; + final l$progress = json['progress']; + final l$result = json['result']; + final l$status = json['status']; + final l$statusText = json['statusText']; + final l$uid = json['uid']; + final l$updatedAt = json['updatedAt']; + final l$$__typename = json['__typename']; + return Query$GetApiJobs$jobs$getJobs( + createdAt: dateTimeFromJson(l$createdAt), + description: (l$description as String), + error: (l$error as String?), + finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), + name: (l$name as String), + progress: (l$progress as int?), + result: (l$result as String?), + status: (l$status as String), + statusText: (l$statusText as String?), + uid: (l$uid as String), + updatedAt: dateTimeFromJson(l$updatedAt), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime createdAt; final String description; final String? error; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? finishedAt; final String name; @@ -897,13 +2857,41 @@ class Query$GetApiJobs$jobs$getJobs { final String uid; - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime updatedAt; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiJobs$jobs$getJobsToJson(this); + Map toJson() { + final _resultData = {}; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$description = description; + _resultData['description'] = l$description; + final l$error = error; + _resultData['error'] = l$error; + final l$finishedAt = finishedAt; + _resultData['finishedAt'] = + l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); + final l$name = name; + _resultData['name'] = l$name; + final l$progress = progress; + _resultData['progress'] = l$progress; + final l$result = result; + _resultData['result'] = l$result; + final l$status = status; + _resultData['status'] = l$status; + final l$statusText = statusText; + _resultData['statusText'] = l$statusText; + final l$uid = uid; + _resultData['uid'] = l$uid; + final l$updatedAt = updatedAt; + _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createdAt = createdAt; final l$description = description; @@ -929,51 +2917,79 @@ class Query$GetApiJobs$jobs$getJobs { l$statusText, l$uid, l$updatedAt, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetApiJobs$jobs$getJobs) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$createdAt = createdAt; final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) return false; + if (l$createdAt != lOther$createdAt) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$error = error; final lOther$error = other.error; - if (l$error != lOther$error) return false; + if (l$error != lOther$error) { + return false; + } final l$finishedAt = finishedAt; final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) return false; + if (l$finishedAt != lOther$finishedAt) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$progress = progress; final lOther$progress = other.progress; - if (l$progress != lOther$progress) return false; + if (l$progress != lOther$progress) { + return false; + } final l$result = result; final lOther$result = other.result; - if (l$result != lOther$result) return false; + if (l$result != lOther$result) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$statusText = statusText; final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) return false; + if (l$statusText != lOther$statusText) { + return false; + } final l$uid = uid; final lOther$uid = other.uid; - if (l$uid != lOther$uid) return false; + if (l$uid != lOther$uid) { + return false; + } final l$updatedAt = updatedAt; final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) return false; + if (l$updatedAt != lOther$updatedAt) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -981,36 +2997,43 @@ class Query$GetApiJobs$jobs$getJobs { extension UtilityExtension$Query$GetApiJobs$jobs$getJobs on Query$GetApiJobs$jobs$getJobs { CopyWith$Query$GetApiJobs$jobs$getJobs - get copyWith => CopyWith$Query$GetApiJobs$jobs$getJobs(this, (i) => i); + get copyWith => CopyWith$Query$GetApiJobs$jobs$getJobs( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiJobs$jobs$getJobs { factory CopyWith$Query$GetApiJobs$jobs$getJobs( - Query$GetApiJobs$jobs$getJobs instance, - TRes Function(Query$GetApiJobs$jobs$getJobs) then) = - _CopyWithImpl$Query$GetApiJobs$jobs$getJobs; + Query$GetApiJobs$jobs$getJobs instance, + TRes Function(Query$GetApiJobs$jobs$getJobs) then, + ) = _CopyWithImpl$Query$GetApiJobs$jobs$getJobs; factory CopyWith$Query$GetApiJobs$jobs$getJobs.stub(TRes res) = _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs; - TRes call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}); + TRes call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }); } class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs implements CopyWith$Query$GetApiJobs$jobs$getJobs { - _CopyWithImpl$Query$GetApiJobs$jobs$getJobs(this._instance, this._then); + _CopyWithImpl$Query$GetApiJobs$jobs$getJobs( + this._instance, + this._then, + ); final Query$GetApiJobs$jobs$getJobs _instance; @@ -1018,51 +3041,51 @@ class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs static const _undefined = {}; - TRes call( - {Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiJobs$jobs$getJobs( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null - ? _instance.uid - : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs @@ -1071,58 +3094,82 @@ class _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs TRes _res; - call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}) => + call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$RemoveJob { - Variables$Mutation$RemoveJob({required this.jobId}); + factory Variables$Mutation$RemoveJob({required String jobId}) => + Variables$Mutation$RemoveJob._({ + r'jobId': jobId, + }); + + Variables$Mutation$RemoveJob._(this._$data); + + factory Variables$Mutation$RemoveJob.fromJson(Map data) { + final result$data = {}; + final l$jobId = data['jobId']; + result$data['jobId'] = (l$jobId as String); + return Variables$Mutation$RemoveJob._(result$data); + } + + Map _$data; + + String get jobId => (_$data['jobId'] as String); + Map toJson() { + final result$data = {}; + final l$jobId = jobId; + result$data['jobId'] = l$jobId; + return result$data; + } + + CopyWith$Variables$Mutation$RemoveJob + get copyWith => CopyWith$Variables$Mutation$RemoveJob( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$RemoveJob) || + runtimeType != other.runtimeType) { + return false; + } + final l$jobId = jobId; + final lOther$jobId = other.jobId; + if (l$jobId != lOther$jobId) { + return false; + } + return true; + } @override - factory Variables$Mutation$RemoveJob.fromJson(Map json) => - _$Variables$Mutation$RemoveJobFromJson(json); - - final String jobId; - - Map toJson() => _$Variables$Mutation$RemoveJobToJson(this); int get hashCode { final l$jobId = jobId; return Object.hashAll([l$jobId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveJob) || - runtimeType != other.runtimeType) return false; - final l$jobId = jobId; - final lOther$jobId = other.jobId; - if (l$jobId != lOther$jobId) return false; - return true; - } - - CopyWith$Variables$Mutation$RemoveJob - get copyWith => CopyWith$Variables$Mutation$RemoveJob(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RemoveJob { factory CopyWith$Variables$Mutation$RemoveJob( - Variables$Mutation$RemoveJob instance, - TRes Function(Variables$Mutation$RemoveJob) then) = - _CopyWithImpl$Variables$Mutation$RemoveJob; + Variables$Mutation$RemoveJob instance, + TRes Function(Variables$Mutation$RemoveJob) then, + ) = _CopyWithImpl$Variables$Mutation$RemoveJob; factory CopyWith$Variables$Mutation$RemoveJob.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RemoveJob; @@ -1132,7 +3179,10 @@ abstract class CopyWith$Variables$Mutation$RemoveJob { class _CopyWithImpl$Variables$Mutation$RemoveJob implements CopyWith$Variables$Mutation$RemoveJob { - _CopyWithImpl$Variables$Mutation$RemoveJob(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$RemoveJob( + this._instance, + this._then, + ); final Variables$Mutation$RemoveJob _instance; @@ -1140,10 +3190,11 @@ class _CopyWithImpl$Variables$Mutation$RemoveJob static const _undefined = {}; - TRes call({Object? jobId = _undefined}) => _then(Variables$Mutation$RemoveJob( - jobId: jobId == _undefined || jobId == null - ? _instance.jobId - : (jobId as String))); + TRes call({Object? jobId = _undefined}) => + _then(Variables$Mutation$RemoveJob._({ + ..._instance._$data, + if (jobId != _undefined && jobId != null) 'jobId': (jobId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$RemoveJob @@ -1155,61 +3206,97 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveJob call({String? jobId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveJob { - Mutation$RemoveJob({required this.removeJob, required this.$__typename}); + Mutation$RemoveJob({ + required this.removeJob, + required this.$__typename, + }); - @override - factory Mutation$RemoveJob.fromJson(Map json) => - _$Mutation$RemoveJobFromJson(json); + factory Mutation$RemoveJob.fromJson(Map json) { + final l$removeJob = json['removeJob']; + final l$$__typename = json['__typename']; + return Mutation$RemoveJob( + removeJob: Mutation$RemoveJob$removeJob.fromJson( + (l$removeJob as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RemoveJob$removeJob removeJob; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RemoveJobToJson(this); + Map toJson() { + final _resultData = {}; + final l$removeJob = removeJob; + _resultData['removeJob'] = l$removeJob.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$removeJob = removeJob; final l$$__typename = $__typename; - return Object.hashAll([l$removeJob, l$$__typename]); + return Object.hashAll([ + l$removeJob, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RemoveJob) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RemoveJob) || runtimeType != other.runtimeType) { return false; + } final l$removeJob = removeJob; final lOther$removeJob = other.removeJob; - if (l$removeJob != lOther$removeJob) return false; + if (l$removeJob != lOther$removeJob) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RemoveJob on Mutation$RemoveJob { CopyWith$Mutation$RemoveJob get copyWith => - CopyWith$Mutation$RemoveJob(this, (i) => i); + CopyWith$Mutation$RemoveJob( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveJob { factory CopyWith$Mutation$RemoveJob( - Mutation$RemoveJob instance, TRes Function(Mutation$RemoveJob) then) = - _CopyWithImpl$Mutation$RemoveJob; + Mutation$RemoveJob instance, + TRes Function(Mutation$RemoveJob) then, + ) = _CopyWithImpl$Mutation$RemoveJob; factory CopyWith$Mutation$RemoveJob.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveJob; - TRes call({Mutation$RemoveJob$removeJob? removeJob, String? $__typename}); + TRes call({ + Mutation$RemoveJob$removeJob? removeJob, + String? $__typename, + }); CopyWith$Mutation$RemoveJob$removeJob get removeJob; } class _CopyWithImpl$Mutation$RemoveJob implements CopyWith$Mutation$RemoveJob { - _CopyWithImpl$Mutation$RemoveJob(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveJob( + this._instance, + this._then, + ); final Mutation$RemoveJob _instance; @@ -1217,15 +3304,18 @@ class _CopyWithImpl$Mutation$RemoveJob static const _undefined = {}; - TRes call( - {Object? removeJob = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? removeJob = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RemoveJob( - removeJob: removeJob == _undefined || removeJob == null - ? _instance.removeJob - : (removeJob as Mutation$RemoveJob$removeJob), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + removeJob: removeJob == _undefined || removeJob == null + ? _instance.removeJob + : (removeJob as Mutation$RemoveJob$removeJob), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RemoveJob$removeJob get removeJob { final local$removeJob = _instance.removeJob; return CopyWith$Mutation$RemoveJob$removeJob( @@ -1239,89 +3329,107 @@ class _CopyWithStubImpl$Mutation$RemoveJob TRes _res; - call({Mutation$RemoveJob$removeJob? removeJob, String? $__typename}) => _res; + call({ + Mutation$RemoveJob$removeJob? removeJob, + String? $__typename, + }) => + _res; CopyWith$Mutation$RemoveJob$removeJob get removeJob => CopyWith$Mutation$RemoveJob$removeJob.stub(_res); } const documentNodeMutationRemoveJob = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RemoveJob'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'jobId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'removeJob'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'jobId'), - value: VariableNode(name: NameNode(value: 'jobId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'RemoveJob'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'jobId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeJob'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'jobId'), + value: VariableNode(name: NameNode(value: 'jobId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RemoveJob _parserFn$Mutation$RemoveJob(Map data) => Mutation$RemoveJob.fromJson(data); typedef OnMutationCompleted$Mutation$RemoveJob = FutureOr Function( - dynamic, Mutation$RemoveJob?); + dynamic, + Mutation$RemoveJob?, +); class Options$Mutation$RemoveJob extends graphql.MutationOptions { - Options$Mutation$RemoveJob( - {String? operationName, - required Variables$Mutation$RemoveJob variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RemoveJob? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RemoveJob({ + String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveJob? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$RemoveJob(data)), - update: update, - onError: onError, - document: documentNodeMutationRemoveJob, - parserFn: _parserFn$Mutation$RemoveJob); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$RemoveJob(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRemoveJob, + parserFn: _parserFn$Mutation$RemoveJob, + ); final OnMutationCompleted$Mutation$RemoveJob? onCompletedWithParsed; @@ -1330,38 +3438,39 @@ class Options$Mutation$RemoveJob ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RemoveJob extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RemoveJob( - {String? operationName, - required Variables$Mutation$RemoveJob variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRemoveJob, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RemoveJob); + WatchOptions$Mutation$RemoveJob({ + String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveJob, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveJob, + ); } extension ClientExtension$Mutation$RemoveJob on graphql.GraphQLClient { @@ -1373,18 +3482,27 @@ extension ClientExtension$Mutation$RemoveJob on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveJob$removeJob - implements Fragment$basicMutationReturnFields { - Mutation$RemoveJob$removeJob( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RemoveJob$removeJob({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$RemoveJob$removeJob.fromJson(Map json) => - _$Mutation$RemoveJob$removeJobFromJson(json); + factory Mutation$RemoveJob$removeJob.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RemoveJob$removeJob( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1392,35 +3510,64 @@ class Mutation$RemoveJob$removeJob final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RemoveJob$removeJobToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RemoveJob$removeJob) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1428,24 +3575,35 @@ class Mutation$RemoveJob$removeJob extension UtilityExtension$Mutation$RemoveJob$removeJob on Mutation$RemoveJob$removeJob { CopyWith$Mutation$RemoveJob$removeJob - get copyWith => CopyWith$Mutation$RemoveJob$removeJob(this, (i) => i); + get copyWith => CopyWith$Mutation$RemoveJob$removeJob( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveJob$removeJob { factory CopyWith$Mutation$RemoveJob$removeJob( - Mutation$RemoveJob$removeJob instance, - TRes Function(Mutation$RemoveJob$removeJob) then) = - _CopyWithImpl$Mutation$RemoveJob$removeJob; + Mutation$RemoveJob$removeJob instance, + TRes Function(Mutation$RemoveJob$removeJob) then, + ) = _CopyWithImpl$Mutation$RemoveJob$removeJob; factory CopyWith$Mutation$RemoveJob$removeJob.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveJob$removeJob; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RemoveJob$removeJob implements CopyWith$Mutation$RemoveJob$removeJob { - _CopyWithImpl$Mutation$RemoveJob$removeJob(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveJob$removeJob( + this._instance, + this._then, + ); final Mutation$RemoveJob$removeJob _instance; @@ -1453,24 +3611,25 @@ class _CopyWithImpl$Mutation$RemoveJob$removeJob static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RemoveJob$removeJob( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RemoveJob$removeJob @@ -1479,42 +3638,73 @@ class _CopyWithStubImpl$Mutation$RemoveJob$removeJob TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRebuild { - Mutation$RunSystemRebuild( - {required this.runSystemRebuild, required this.$__typename}); + Mutation$RunSystemRebuild({ + required this.runSystemRebuild, + required this.$__typename, + }); - @override - factory Mutation$RunSystemRebuild.fromJson(Map json) => - _$Mutation$RunSystemRebuildFromJson(json); + factory Mutation$RunSystemRebuild.fromJson(Map json) { + final l$runSystemRebuild = json['runSystemRebuild']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRebuild( + runSystemRebuild: Mutation$RunSystemRebuild$runSystemRebuild.fromJson( + (l$runSystemRebuild as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RunSystemRebuild$runSystemRebuild runSystemRebuild; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RunSystemRebuildToJson(this); + Map toJson() { + final _resultData = {}; + final l$runSystemRebuild = runSystemRebuild; + _resultData['runSystemRebuild'] = l$runSystemRebuild.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$runSystemRebuild = runSystemRebuild; final l$$__typename = $__typename; - return Object.hashAll([l$runSystemRebuild, l$$__typename]); + return Object.hashAll([ + l$runSystemRebuild, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRebuild) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$runSystemRebuild = runSystemRebuild; final lOther$runSystemRebuild = other.runSystemRebuild; - if (l$runSystemRebuild != lOther$runSystemRebuild) return false; + if (l$runSystemRebuild != lOther$runSystemRebuild) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1522,27 +3712,35 @@ class Mutation$RunSystemRebuild { extension UtilityExtension$Mutation$RunSystemRebuild on Mutation$RunSystemRebuild { CopyWith$Mutation$RunSystemRebuild get copyWith => - CopyWith$Mutation$RunSystemRebuild(this, (i) => i); + CopyWith$Mutation$RunSystemRebuild( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRebuild { - factory CopyWith$Mutation$RunSystemRebuild(Mutation$RunSystemRebuild instance, - TRes Function(Mutation$RunSystemRebuild) then) = - _CopyWithImpl$Mutation$RunSystemRebuild; + factory CopyWith$Mutation$RunSystemRebuild( + Mutation$RunSystemRebuild instance, + TRes Function(Mutation$RunSystemRebuild) then, + ) = _CopyWithImpl$Mutation$RunSystemRebuild; factory CopyWith$Mutation$RunSystemRebuild.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRebuild; - TRes call( - {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, - String? $__typename}); + TRes call({ + Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, + String? $__typename, + }); CopyWith$Mutation$RunSystemRebuild$runSystemRebuild get runSystemRebuild; } class _CopyWithImpl$Mutation$RunSystemRebuild implements CopyWith$Mutation$RunSystemRebuild { - _CopyWithImpl$Mutation$RunSystemRebuild(this._instance, this._then); + _CopyWithImpl$Mutation$RunSystemRebuild( + this._instance, + this._then, + ); final Mutation$RunSystemRebuild _instance; @@ -1550,18 +3748,19 @@ class _CopyWithImpl$Mutation$RunSystemRebuild static const _undefined = {}; - TRes call( - {Object? runSystemRebuild = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? runSystemRebuild = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRebuild( - runSystemRebuild: - runSystemRebuild == _undefined || runSystemRebuild == null - ? _instance.runSystemRebuild - : (runSystemRebuild - as Mutation$RunSystemRebuild$runSystemRebuild), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + runSystemRebuild: runSystemRebuild == _undefined || + runSystemRebuild == null + ? _instance.runSystemRebuild + : (runSystemRebuild as Mutation$RunSystemRebuild$runSystemRebuild), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RunSystemRebuild$runSystemRebuild get runSystemRebuild { final local$runSystemRebuild = _instance.runSystemRebuild; @@ -1576,9 +3775,10 @@ class _CopyWithStubImpl$Mutation$RunSystemRebuild TRes _res; - call( - {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, - String? $__typename}) => + call({ + Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, + String? $__typename, + }) => _res; CopyWith$Mutation$RunSystemRebuild$runSystemRebuild get runSystemRebuild => @@ -1587,73 +3787,82 @@ class _CopyWithStubImpl$Mutation$RunSystemRebuild const documentNodeMutationRunSystemRebuild = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RunSystemRebuild'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'runSystemRebuild'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRebuild'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRebuild'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RunSystemRebuild _parserFn$Mutation$RunSystemRebuild( Map data) => Mutation$RunSystemRebuild.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemRebuild = FutureOr Function( - dynamic, Mutation$RunSystemRebuild?); + dynamic, + Mutation$RunSystemRebuild?, +); class Options$Mutation$RunSystemRebuild extends graphql.MutationOptions { - Options$Mutation$RunSystemRebuild( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RunSystemRebuild? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RunSystemRebuild({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRebuild? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RunSystemRebuild(data)), - update: update, - onError: onError, - document: documentNodeMutationRunSystemRebuild, - parserFn: _parserFn$Mutation$RunSystemRebuild); + : _parserFn$Mutation$RunSystemRebuild(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRebuild, + parserFn: _parserFn$Mutation$RunSystemRebuild, + ); final OnMutationCompleted$Mutation$RunSystemRebuild? onCompletedWithParsed; @@ -1662,36 +3871,37 @@ class Options$Mutation$RunSystemRebuild ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RunSystemRebuild extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RunSystemRebuild( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRunSystemRebuild, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RunSystemRebuild); + WatchOptions$Mutation$RunSystemRebuild({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRebuild, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRebuild, + ); } extension ClientExtension$Mutation$RunSystemRebuild on graphql.GraphQLClient { @@ -1705,19 +3915,28 @@ extension ClientExtension$Mutation$RunSystemRebuild on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRebuild()); } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRebuild$runSystemRebuild - implements Fragment$basicMutationReturnFields { - Mutation$RunSystemRebuild$runSystemRebuild( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RunSystemRebuild$runSystemRebuild({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RunSystemRebuild$runSystemRebuild.fromJson( - Map json) => - _$Mutation$RunSystemRebuild$runSystemRebuildFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRebuild$runSystemRebuild( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1725,36 +3944,64 @@ class Mutation$RunSystemRebuild$runSystemRebuild final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RunSystemRebuild$runSystemRebuildToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRebuild$runSystemRebuild) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1763,26 +4010,35 @@ extension UtilityExtension$Mutation$RunSystemRebuild$runSystemRebuild on Mutation$RunSystemRebuild$runSystemRebuild { CopyWith$Mutation$RunSystemRebuild$runSystemRebuild< Mutation$RunSystemRebuild$runSystemRebuild> - get copyWith => - CopyWith$Mutation$RunSystemRebuild$runSystemRebuild(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemRebuild$runSystemRebuild( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRebuild$runSystemRebuild { factory CopyWith$Mutation$RunSystemRebuild$runSystemRebuild( - Mutation$RunSystemRebuild$runSystemRebuild instance, - TRes Function(Mutation$RunSystemRebuild$runSystemRebuild) then) = - _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild; + Mutation$RunSystemRebuild$runSystemRebuild instance, + TRes Function(Mutation$RunSystemRebuild$runSystemRebuild) then, + ) = _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild; factory CopyWith$Mutation$RunSystemRebuild$runSystemRebuild.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild implements CopyWith$Mutation$RunSystemRebuild$runSystemRebuild { _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RunSystemRebuild$runSystemRebuild _instance; @@ -1790,24 +4046,25 @@ class _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRebuild$runSystemRebuild( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild @@ -1816,42 +4073,73 @@ class _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRollback { - Mutation$RunSystemRollback( - {required this.runSystemRollback, required this.$__typename}); + Mutation$RunSystemRollback({ + required this.runSystemRollback, + required this.$__typename, + }); - @override - factory Mutation$RunSystemRollback.fromJson(Map json) => - _$Mutation$RunSystemRollbackFromJson(json); + factory Mutation$RunSystemRollback.fromJson(Map json) { + final l$runSystemRollback = json['runSystemRollback']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRollback( + runSystemRollback: Mutation$RunSystemRollback$runSystemRollback.fromJson( + (l$runSystemRollback as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RunSystemRollback$runSystemRollback runSystemRollback; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RunSystemRollbackToJson(this); + Map toJson() { + final _resultData = {}; + final l$runSystemRollback = runSystemRollback; + _resultData['runSystemRollback'] = l$runSystemRollback.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$runSystemRollback = runSystemRollback; final l$$__typename = $__typename; - return Object.hashAll([l$runSystemRollback, l$$__typename]); + return Object.hashAll([ + l$runSystemRollback, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRollback) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$runSystemRollback = runSystemRollback; final lOther$runSystemRollback = other.runSystemRollback; - if (l$runSystemRollback != lOther$runSystemRollback) return false; + if (l$runSystemRollback != lOther$runSystemRollback) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1859,28 +4147,35 @@ class Mutation$RunSystemRollback { extension UtilityExtension$Mutation$RunSystemRollback on Mutation$RunSystemRollback { CopyWith$Mutation$RunSystemRollback - get copyWith => CopyWith$Mutation$RunSystemRollback(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemRollback( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRollback { factory CopyWith$Mutation$RunSystemRollback( - Mutation$RunSystemRollback instance, - TRes Function(Mutation$RunSystemRollback) then) = - _CopyWithImpl$Mutation$RunSystemRollback; + Mutation$RunSystemRollback instance, + TRes Function(Mutation$RunSystemRollback) then, + ) = _CopyWithImpl$Mutation$RunSystemRollback; factory CopyWith$Mutation$RunSystemRollback.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRollback; - TRes call( - {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, - String? $__typename}); + TRes call({ + Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, + String? $__typename, + }); CopyWith$Mutation$RunSystemRollback$runSystemRollback get runSystemRollback; } class _CopyWithImpl$Mutation$RunSystemRollback implements CopyWith$Mutation$RunSystemRollback { - _CopyWithImpl$Mutation$RunSystemRollback(this._instance, this._then); + _CopyWithImpl$Mutation$RunSystemRollback( + this._instance, + this._then, + ); final Mutation$RunSystemRollback _instance; @@ -1888,18 +4183,20 @@ class _CopyWithImpl$Mutation$RunSystemRollback static const _undefined = {}; - TRes call( - {Object? runSystemRollback = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? runSystemRollback = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRollback( - runSystemRollback: - runSystemRollback == _undefined || runSystemRollback == null - ? _instance.runSystemRollback - : (runSystemRollback - as Mutation$RunSystemRollback$runSystemRollback), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + runSystemRollback: + runSystemRollback == _undefined || runSystemRollback == null + ? _instance.runSystemRollback + : (runSystemRollback + as Mutation$RunSystemRollback$runSystemRollback), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RunSystemRollback$runSystemRollback get runSystemRollback { final local$runSystemRollback = _instance.runSystemRollback; @@ -1914,9 +4211,10 @@ class _CopyWithStubImpl$Mutation$RunSystemRollback TRes _res; - call( - {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, - String? $__typename}) => + call({ + Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, + String? $__typename, + }) => _res; CopyWith$Mutation$RunSystemRollback$runSystemRollback get runSystemRollback => @@ -1925,73 +4223,83 @@ class _CopyWithStubImpl$Mutation$RunSystemRollback const documentNodeMutationRunSystemRollback = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RunSystemRollback'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'runSystemRollback'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRollback'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRollback'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RunSystemRollback _parserFn$Mutation$RunSystemRollback( Map data) => Mutation$RunSystemRollback.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemRollback = FutureOr - Function(dynamic, Mutation$RunSystemRollback?); + Function( + dynamic, + Mutation$RunSystemRollback?, +); class Options$Mutation$RunSystemRollback extends graphql.MutationOptions { - Options$Mutation$RunSystemRollback( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RunSystemRollback? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RunSystemRollback({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRollback? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RunSystemRollback(data)), - update: update, - onError: onError, - document: documentNodeMutationRunSystemRollback, - parserFn: _parserFn$Mutation$RunSystemRollback); + : _parserFn$Mutation$RunSystemRollback(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRollback, + parserFn: _parserFn$Mutation$RunSystemRollback, + ); final OnMutationCompleted$Mutation$RunSystemRollback? onCompletedWithParsed; @@ -2000,36 +4308,37 @@ class Options$Mutation$RunSystemRollback ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RunSystemRollback extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RunSystemRollback( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRunSystemRollback, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RunSystemRollback); + WatchOptions$Mutation$RunSystemRollback({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRollback, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRollback, + ); } extension ClientExtension$Mutation$RunSystemRollback on graphql.GraphQLClient { @@ -2043,19 +4352,28 @@ extension ClientExtension$Mutation$RunSystemRollback on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRollback()); } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemRollback$runSystemRollback - implements Fragment$basicMutationReturnFields { - Mutation$RunSystemRollback$runSystemRollback( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RunSystemRollback$runSystemRollback({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RunSystemRollback$runSystemRollback.fromJson( - Map json) => - _$Mutation$RunSystemRollback$runSystemRollbackFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemRollback$runSystemRollback( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2063,36 +4381,64 @@ class Mutation$RunSystemRollback$runSystemRollback final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RunSystemRollback$runSystemRollbackToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemRollback$runSystemRollback) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2101,26 +4447,35 @@ extension UtilityExtension$Mutation$RunSystemRollback$runSystemRollback on Mutation$RunSystemRollback$runSystemRollback { CopyWith$Mutation$RunSystemRollback$runSystemRollback< Mutation$RunSystemRollback$runSystemRollback> - get copyWith => - CopyWith$Mutation$RunSystemRollback$runSystemRollback(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemRollback$runSystemRollback( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemRollback$runSystemRollback { factory CopyWith$Mutation$RunSystemRollback$runSystemRollback( - Mutation$RunSystemRollback$runSystemRollback instance, - TRes Function(Mutation$RunSystemRollback$runSystemRollback) then) = - _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback; + Mutation$RunSystemRollback$runSystemRollback instance, + TRes Function(Mutation$RunSystemRollback$runSystemRollback) then, + ) = _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback; factory CopyWith$Mutation$RunSystemRollback$runSystemRollback.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback implements CopyWith$Mutation$RunSystemRollback$runSystemRollback { _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RunSystemRollback$runSystemRollback _instance; @@ -2128,24 +4483,25 @@ class _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemRollback$runSystemRollback( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback @@ -2154,42 +4510,73 @@ class _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemUpgrade { - Mutation$RunSystemUpgrade( - {required this.runSystemUpgrade, required this.$__typename}); + Mutation$RunSystemUpgrade({ + required this.runSystemUpgrade, + required this.$__typename, + }); - @override - factory Mutation$RunSystemUpgrade.fromJson(Map json) => - _$Mutation$RunSystemUpgradeFromJson(json); + factory Mutation$RunSystemUpgrade.fromJson(Map json) { + final l$runSystemUpgrade = json['runSystemUpgrade']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemUpgrade( + runSystemUpgrade: Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( + (l$runSystemUpgrade as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RunSystemUpgrade$runSystemUpgrade runSystemUpgrade; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RunSystemUpgradeToJson(this); + Map toJson() { + final _resultData = {}; + final l$runSystemUpgrade = runSystemUpgrade; + _resultData['runSystemUpgrade'] = l$runSystemUpgrade.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$runSystemUpgrade = runSystemUpgrade; final l$$__typename = $__typename; - return Object.hashAll([l$runSystemUpgrade, l$$__typename]); + return Object.hashAll([ + l$runSystemUpgrade, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemUpgrade) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$runSystemUpgrade = runSystemUpgrade; final lOther$runSystemUpgrade = other.runSystemUpgrade; - if (l$runSystemUpgrade != lOther$runSystemUpgrade) return false; + if (l$runSystemUpgrade != lOther$runSystemUpgrade) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2197,27 +4584,35 @@ class Mutation$RunSystemUpgrade { extension UtilityExtension$Mutation$RunSystemUpgrade on Mutation$RunSystemUpgrade { CopyWith$Mutation$RunSystemUpgrade get copyWith => - CopyWith$Mutation$RunSystemUpgrade(this, (i) => i); + CopyWith$Mutation$RunSystemUpgrade( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemUpgrade { - factory CopyWith$Mutation$RunSystemUpgrade(Mutation$RunSystemUpgrade instance, - TRes Function(Mutation$RunSystemUpgrade) then) = - _CopyWithImpl$Mutation$RunSystemUpgrade; + factory CopyWith$Mutation$RunSystemUpgrade( + Mutation$RunSystemUpgrade instance, + TRes Function(Mutation$RunSystemUpgrade) then, + ) = _CopyWithImpl$Mutation$RunSystemUpgrade; factory CopyWith$Mutation$RunSystemUpgrade.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemUpgrade; - TRes call( - {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, - String? $__typename}); + TRes call({ + Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, + String? $__typename, + }); CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade get runSystemUpgrade; } class _CopyWithImpl$Mutation$RunSystemUpgrade implements CopyWith$Mutation$RunSystemUpgrade { - _CopyWithImpl$Mutation$RunSystemUpgrade(this._instance, this._then); + _CopyWithImpl$Mutation$RunSystemUpgrade( + this._instance, + this._then, + ); final Mutation$RunSystemUpgrade _instance; @@ -2225,18 +4620,19 @@ class _CopyWithImpl$Mutation$RunSystemUpgrade static const _undefined = {}; - TRes call( - {Object? runSystemUpgrade = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? runSystemUpgrade = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemUpgrade( - runSystemUpgrade: - runSystemUpgrade == _undefined || runSystemUpgrade == null - ? _instance.runSystemUpgrade - : (runSystemUpgrade - as Mutation$RunSystemUpgrade$runSystemUpgrade), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + runSystemUpgrade: runSystemUpgrade == _undefined || + runSystemUpgrade == null + ? _instance.runSystemUpgrade + : (runSystemUpgrade as Mutation$RunSystemUpgrade$runSystemUpgrade), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade get runSystemUpgrade { final local$runSystemUpgrade = _instance.runSystemUpgrade; @@ -2251,9 +4647,10 @@ class _CopyWithStubImpl$Mutation$RunSystemUpgrade TRes _res; - call( - {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, - String? $__typename}) => + call({ + Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, + String? $__typename, + }) => _res; CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade get runSystemUpgrade => @@ -2262,73 +4659,82 @@ class _CopyWithStubImpl$Mutation$RunSystemUpgrade const documentNodeMutationRunSystemUpgrade = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RunSystemUpgrade'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'runSystemUpgrade'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RunSystemUpgrade'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RunSystemUpgrade _parserFn$Mutation$RunSystemUpgrade( Map data) => Mutation$RunSystemUpgrade.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemUpgrade = FutureOr Function( - dynamic, Mutation$RunSystemUpgrade?); + dynamic, + Mutation$RunSystemUpgrade?, +); class Options$Mutation$RunSystemUpgrade extends graphql.MutationOptions { - Options$Mutation$RunSystemUpgrade( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RunSystemUpgrade? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RunSystemUpgrade({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemUpgrade? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RunSystemUpgrade(data)), - update: update, - onError: onError, - document: documentNodeMutationRunSystemUpgrade, - parserFn: _parserFn$Mutation$RunSystemUpgrade); + : _parserFn$Mutation$RunSystemUpgrade(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRunSystemUpgrade, + parserFn: _parserFn$Mutation$RunSystemUpgrade, + ); final OnMutationCompleted$Mutation$RunSystemUpgrade? onCompletedWithParsed; @@ -2337,36 +4743,37 @@ class Options$Mutation$RunSystemUpgrade ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RunSystemUpgrade extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RunSystemUpgrade( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRunSystemUpgrade, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RunSystemUpgrade); + WatchOptions$Mutation$RunSystemUpgrade({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemUpgrade, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemUpgrade, + ); } extension ClientExtension$Mutation$RunSystemUpgrade on graphql.GraphQLClient { @@ -2380,19 +4787,28 @@ extension ClientExtension$Mutation$RunSystemUpgrade on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RunSystemUpgrade()); } -@JsonSerializable(explicitToJson: true) class Mutation$RunSystemUpgrade$runSystemUpgrade - implements Fragment$basicMutationReturnFields { - Mutation$RunSystemUpgrade$runSystemUpgrade( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RunSystemUpgrade$runSystemUpgrade({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( - Map json) => - _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RunSystemUpgrade$runSystemUpgrade( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2400,36 +4816,64 @@ class Mutation$RunSystemUpgrade$runSystemUpgrade final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RunSystemUpgrade$runSystemUpgrade) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2438,26 +4882,35 @@ extension UtilityExtension$Mutation$RunSystemUpgrade$runSystemUpgrade on Mutation$RunSystemUpgrade$runSystemUpgrade { CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade< Mutation$RunSystemUpgrade$runSystemUpgrade> - get copyWith => - CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade(this, (i) => i); + get copyWith => CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade { factory CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade( - Mutation$RunSystemUpgrade$runSystemUpgrade instance, - TRes Function(Mutation$RunSystemUpgrade$runSystemUpgrade) then) = - _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; + Mutation$RunSystemUpgrade$runSystemUpgrade instance, + TRes Function(Mutation$RunSystemUpgrade$runSystemUpgrade) then, + ) = _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; factory CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade.stub(TRes res) = _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade implements CopyWith$Mutation$RunSystemUpgrade$runSystemUpgrade { _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RunSystemUpgrade$runSystemUpgrade _instance; @@ -2465,24 +4918,25 @@ class _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RunSystemUpgrade$runSystemUpgrade( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade @@ -2491,43 +4945,75 @@ class _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$PullRepositoryChanges { - Mutation$PullRepositoryChanges( - {required this.pullRepositoryChanges, required this.$__typename}); + Mutation$PullRepositoryChanges({ + required this.pullRepositoryChanges, + required this.$__typename, + }); - @override - factory Mutation$PullRepositoryChanges.fromJson(Map json) => - _$Mutation$PullRepositoryChangesFromJson(json); + factory Mutation$PullRepositoryChanges.fromJson(Map json) { + final l$pullRepositoryChanges = json['pullRepositoryChanges']; + final l$$__typename = json['__typename']; + return Mutation$PullRepositoryChanges( + pullRepositoryChanges: + Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( + (l$pullRepositoryChanges as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$PullRepositoryChanges$pullRepositoryChanges pullRepositoryChanges; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$PullRepositoryChangesToJson(this); + Map toJson() { + final _resultData = {}; + final l$pullRepositoryChanges = pullRepositoryChanges; + _resultData['pullRepositoryChanges'] = l$pullRepositoryChanges.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$pullRepositoryChanges = pullRepositoryChanges; final l$$__typename = $__typename; - return Object.hashAll([l$pullRepositoryChanges, l$$__typename]); + return Object.hashAll([ + l$pullRepositoryChanges, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$PullRepositoryChanges) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$pullRepositoryChanges = pullRepositoryChanges; final lOther$pullRepositoryChanges = other.pullRepositoryChanges; - if (l$pullRepositoryChanges != lOther$pullRepositoryChanges) return false; + if (l$pullRepositoryChanges != lOther$pullRepositoryChanges) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2535,29 +5021,35 @@ class Mutation$PullRepositoryChanges { extension UtilityExtension$Mutation$PullRepositoryChanges on Mutation$PullRepositoryChanges { CopyWith$Mutation$PullRepositoryChanges - get copyWith => CopyWith$Mutation$PullRepositoryChanges(this, (i) => i); + get copyWith => CopyWith$Mutation$PullRepositoryChanges( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$PullRepositoryChanges { factory CopyWith$Mutation$PullRepositoryChanges( - Mutation$PullRepositoryChanges instance, - TRes Function(Mutation$PullRepositoryChanges) then) = - _CopyWithImpl$Mutation$PullRepositoryChanges; + Mutation$PullRepositoryChanges instance, + TRes Function(Mutation$PullRepositoryChanges) then, + ) = _CopyWithImpl$Mutation$PullRepositoryChanges; factory CopyWith$Mutation$PullRepositoryChanges.stub(TRes res) = _CopyWithStubImpl$Mutation$PullRepositoryChanges; - TRes call( - {Mutation$PullRepositoryChanges$pullRepositoryChanges? - pullRepositoryChanges, - String? $__typename}); + TRes call({ + Mutation$PullRepositoryChanges$pullRepositoryChanges? pullRepositoryChanges, + String? $__typename, + }); CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges get pullRepositoryChanges; } class _CopyWithImpl$Mutation$PullRepositoryChanges implements CopyWith$Mutation$PullRepositoryChanges { - _CopyWithImpl$Mutation$PullRepositoryChanges(this._instance, this._then); + _CopyWithImpl$Mutation$PullRepositoryChanges( + this._instance, + this._then, + ); final Mutation$PullRepositoryChanges _instance; @@ -2565,18 +5057,20 @@ class _CopyWithImpl$Mutation$PullRepositoryChanges static const _undefined = {}; - TRes call( - {Object? pullRepositoryChanges = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? pullRepositoryChanges = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$PullRepositoryChanges( - pullRepositoryChanges: pullRepositoryChanges == _undefined || - pullRepositoryChanges == null - ? _instance.pullRepositoryChanges - : (pullRepositoryChanges - as Mutation$PullRepositoryChanges$pullRepositoryChanges), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + pullRepositoryChanges: + pullRepositoryChanges == _undefined || pullRepositoryChanges == null + ? _instance.pullRepositoryChanges + : (pullRepositoryChanges + as Mutation$PullRepositoryChanges$pullRepositoryChanges), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges get pullRepositoryChanges { final local$pullRepositoryChanges = _instance.pullRepositoryChanges; @@ -2591,10 +5085,10 @@ class _CopyWithStubImpl$Mutation$PullRepositoryChanges TRes _res; - call( - {Mutation$PullRepositoryChanges$pullRepositoryChanges? - pullRepositoryChanges, - String? $__typename}) => + call({ + Mutation$PullRepositoryChanges$pullRepositoryChanges? pullRepositoryChanges, + String? $__typename, + }) => _res; CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges get pullRepositoryChanges => @@ -2604,73 +5098,83 @@ class _CopyWithStubImpl$Mutation$PullRepositoryChanges const documentNodeMutationPullRepositoryChanges = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'PullRepositoryChanges'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'pullRepositoryChanges'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'PullRepositoryChanges'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'pullRepositoryChanges'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$PullRepositoryChanges _parserFn$Mutation$PullRepositoryChanges( Map data) => Mutation$PullRepositoryChanges.fromJson(data); typedef OnMutationCompleted$Mutation$PullRepositoryChanges = FutureOr - Function(dynamic, Mutation$PullRepositoryChanges?); + Function( + dynamic, + Mutation$PullRepositoryChanges?, +); class Options$Mutation$PullRepositoryChanges extends graphql.MutationOptions { - Options$Mutation$PullRepositoryChanges( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$PullRepositoryChanges? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$PullRepositoryChanges({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$PullRepositoryChanges? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$PullRepositoryChanges(data)), - update: update, - onError: onError, - document: documentNodeMutationPullRepositoryChanges, - parserFn: _parserFn$Mutation$PullRepositoryChanges); + : _parserFn$Mutation$PullRepositoryChanges(data), + ), + update: update, + onError: onError, + document: documentNodeMutationPullRepositoryChanges, + parserFn: _parserFn$Mutation$PullRepositoryChanges, + ); final OnMutationCompleted$Mutation$PullRepositoryChanges? onCompletedWithParsed; @@ -2680,36 +5184,37 @@ class Options$Mutation$PullRepositoryChanges ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$PullRepositoryChanges extends graphql.WatchQueryOptions { - WatchOptions$Mutation$PullRepositoryChanges( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationPullRepositoryChanges, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$PullRepositoryChanges); + WatchOptions$Mutation$PullRepositoryChanges({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationPullRepositoryChanges, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$PullRepositoryChanges, + ); } extension ClientExtension$Mutation$PullRepositoryChanges @@ -2726,19 +5231,28 @@ extension ClientExtension$Mutation$PullRepositoryChanges options ?? WatchOptions$Mutation$PullRepositoryChanges()); } -@JsonSerializable(explicitToJson: true) class Mutation$PullRepositoryChanges$pullRepositoryChanges - implements Fragment$basicMutationReturnFields { - Mutation$PullRepositoryChanges$pullRepositoryChanges( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$PullRepositoryChanges$pullRepositoryChanges({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( - Map json) => - _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$PullRepositoryChanges$pullRepositoryChanges( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2746,36 +5260,64 @@ class Mutation$PullRepositoryChanges$pullRepositoryChanges final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$PullRepositoryChanges$pullRepositoryChanges) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2786,29 +5328,37 @@ extension UtilityExtension$Mutation$PullRepositoryChanges$pullRepositoryChanges Mutation$PullRepositoryChanges$pullRepositoryChanges> get copyWith => CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges< TRes> { factory CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges( - Mutation$PullRepositoryChanges$pullRepositoryChanges instance, - TRes Function(Mutation$PullRepositoryChanges$pullRepositoryChanges) - then) = - _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; + Mutation$PullRepositoryChanges$pullRepositoryChanges instance, + TRes Function(Mutation$PullRepositoryChanges$pullRepositoryChanges) then, + ) = _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; factory CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges.stub( TRes res) = _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges implements CopyWith$Mutation$PullRepositoryChanges$pullRepositoryChanges { _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$PullRepositoryChanges$pullRepositoryChanges _instance; @@ -2817,24 +5367,25 @@ class _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$PullRepositoryChanges$pullRepositoryChanges( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges< @@ -2846,67 +5397,106 @@ class _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges< TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RebootSystem { - Mutation$RebootSystem( - {required this.rebootSystem, required this.$__typename}); + Mutation$RebootSystem({ + required this.rebootSystem, + required this.$__typename, + }); - @override - factory Mutation$RebootSystem.fromJson(Map json) => - _$Mutation$RebootSystemFromJson(json); + factory Mutation$RebootSystem.fromJson(Map json) { + final l$rebootSystem = json['rebootSystem']; + final l$$__typename = json['__typename']; + return Mutation$RebootSystem( + rebootSystem: Mutation$RebootSystem$rebootSystem.fromJson( + (l$rebootSystem as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RebootSystem$rebootSystem rebootSystem; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RebootSystemToJson(this); + Map toJson() { + final _resultData = {}; + final l$rebootSystem = rebootSystem; + _resultData['rebootSystem'] = l$rebootSystem.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$rebootSystem = rebootSystem; final l$$__typename = $__typename; - return Object.hashAll([l$rebootSystem, l$$__typename]); + return Object.hashAll([ + l$rebootSystem, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RebootSystem) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RebootSystem) || runtimeType != other.runtimeType) { return false; + } final l$rebootSystem = rebootSystem; final lOther$rebootSystem = other.rebootSystem; - if (l$rebootSystem != lOther$rebootSystem) return false; + if (l$rebootSystem != lOther$rebootSystem) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RebootSystem on Mutation$RebootSystem { CopyWith$Mutation$RebootSystem get copyWith => - CopyWith$Mutation$RebootSystem(this, (i) => i); + CopyWith$Mutation$RebootSystem( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RebootSystem { - factory CopyWith$Mutation$RebootSystem(Mutation$RebootSystem instance, - TRes Function(Mutation$RebootSystem) then) = - _CopyWithImpl$Mutation$RebootSystem; + factory CopyWith$Mutation$RebootSystem( + Mutation$RebootSystem instance, + TRes Function(Mutation$RebootSystem) then, + ) = _CopyWithImpl$Mutation$RebootSystem; factory CopyWith$Mutation$RebootSystem.stub(TRes res) = _CopyWithStubImpl$Mutation$RebootSystem; - TRes call( - {Mutation$RebootSystem$rebootSystem? rebootSystem, String? $__typename}); + TRes call({ + Mutation$RebootSystem$rebootSystem? rebootSystem, + String? $__typename, + }); CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem; } class _CopyWithImpl$Mutation$RebootSystem implements CopyWith$Mutation$RebootSystem { - _CopyWithImpl$Mutation$RebootSystem(this._instance, this._then); + _CopyWithImpl$Mutation$RebootSystem( + this._instance, + this._then, + ); final Mutation$RebootSystem _instance; @@ -2914,16 +5504,18 @@ class _CopyWithImpl$Mutation$RebootSystem static const _undefined = {}; - TRes call( - {Object? rebootSystem = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? rebootSystem = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RebootSystem( - rebootSystem: rebootSystem == _undefined || rebootSystem == null - ? _instance.rebootSystem - : (rebootSystem as Mutation$RebootSystem$rebootSystem), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + rebootSystem: rebootSystem == _undefined || rebootSystem == null + ? _instance.rebootSystem + : (rebootSystem as Mutation$RebootSystem$rebootSystem), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem { final local$rebootSystem = _instance.rebootSystem; return CopyWith$Mutation$RebootSystem$rebootSystem( @@ -2937,9 +5529,10 @@ class _CopyWithStubImpl$Mutation$RebootSystem TRes _res; - call( - {Mutation$RebootSystem$rebootSystem? rebootSystem, - String? $__typename}) => + call({ + Mutation$RebootSystem$rebootSystem? rebootSystem, + String? $__typename, + }) => _res; CopyWith$Mutation$RebootSystem$rebootSystem get rebootSystem => CopyWith$Mutation$RebootSystem$rebootSystem.stub(_res); @@ -2947,73 +5540,80 @@ class _CopyWithStubImpl$Mutation$RebootSystem const documentNodeMutationRebootSystem = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RebootSystem'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'rebootSystem'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'RebootSystem'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'rebootSystem'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RebootSystem _parserFn$Mutation$RebootSystem( Map data) => Mutation$RebootSystem.fromJson(data); typedef OnMutationCompleted$Mutation$RebootSystem = FutureOr Function( - dynamic, Mutation$RebootSystem?); + dynamic, + Mutation$RebootSystem?, +); class Options$Mutation$RebootSystem extends graphql.MutationOptions { - Options$Mutation$RebootSystem( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RebootSystem? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RebootSystem({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RebootSystem? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$RebootSystem(data)), - update: update, - onError: onError, - document: documentNodeMutationRebootSystem, - parserFn: _parserFn$Mutation$RebootSystem); + data == null ? null : _parserFn$Mutation$RebootSystem(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRebootSystem, + parserFn: _parserFn$Mutation$RebootSystem, + ); final OnMutationCompleted$Mutation$RebootSystem? onCompletedWithParsed; @@ -3022,36 +5622,37 @@ class Options$Mutation$RebootSystem ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RebootSystem extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RebootSystem( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRebootSystem, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RebootSystem); + WatchOptions$Mutation$RebootSystem({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRebootSystem, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RebootSystem, + ); } extension ClientExtension$Mutation$RebootSystem on graphql.GraphQLClient { @@ -3063,19 +5664,28 @@ extension ClientExtension$Mutation$RebootSystem on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RebootSystem()); } -@JsonSerializable(explicitToJson: true) class Mutation$RebootSystem$rebootSystem - implements Fragment$basicMutationReturnFields { - Mutation$RebootSystem$rebootSystem( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$RebootSystem$rebootSystem({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RebootSystem$rebootSystem.fromJson( - Map json) => - _$Mutation$RebootSystem$rebootSystemFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RebootSystem$rebootSystem( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -3083,36 +5693,64 @@ class Mutation$RebootSystem$rebootSystem final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RebootSystem$rebootSystemToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RebootSystem$rebootSystem) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3121,25 +5759,35 @@ extension UtilityExtension$Mutation$RebootSystem$rebootSystem on Mutation$RebootSystem$rebootSystem { CopyWith$Mutation$RebootSystem$rebootSystem< Mutation$RebootSystem$rebootSystem> - get copyWith => - CopyWith$Mutation$RebootSystem$rebootSystem(this, (i) => i); + get copyWith => CopyWith$Mutation$RebootSystem$rebootSystem( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RebootSystem$rebootSystem { factory CopyWith$Mutation$RebootSystem$rebootSystem( - Mutation$RebootSystem$rebootSystem instance, - TRes Function(Mutation$RebootSystem$rebootSystem) then) = - _CopyWithImpl$Mutation$RebootSystem$rebootSystem; + Mutation$RebootSystem$rebootSystem instance, + TRes Function(Mutation$RebootSystem$rebootSystem) then, + ) = _CopyWithImpl$Mutation$RebootSystem$rebootSystem; factory CopyWith$Mutation$RebootSystem$rebootSystem.stub(TRes res) = _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RebootSystem$rebootSystem implements CopyWith$Mutation$RebootSystem$rebootSystem { - _CopyWithImpl$Mutation$RebootSystem$rebootSystem(this._instance, this._then); + _CopyWithImpl$Mutation$RebootSystem$rebootSystem( + this._instance, + this._then, + ); final Mutation$RebootSystem$rebootSystem _instance; @@ -3147,24 +5795,25 @@ class _CopyWithImpl$Mutation$RebootSystem$rebootSystem static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RebootSystem$rebootSystem( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem @@ -3173,41 +5822,73 @@ class _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Query$SystemServerProvider { - Query$SystemServerProvider({required this.system, required this.$__typename}); + Query$SystemServerProvider({ + required this.system, + required this.$__typename, + }); - @override - factory Query$SystemServerProvider.fromJson(Map json) => - _$Query$SystemServerProviderFromJson(json); + factory Query$SystemServerProvider.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemServerProvider( + system: Query$SystemServerProvider$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemServerProvider$system system; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemServerProviderToJson(this); + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$system = system; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + return Object.hashAll([ + l$system, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemServerProvider) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$system = system; final lOther$system = other.system; - if (l$system != lOther$system) return false; + if (l$system != lOther$system) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3215,25 +5896,34 @@ class Query$SystemServerProvider { extension UtilityExtension$Query$SystemServerProvider on Query$SystemServerProvider { CopyWith$Query$SystemServerProvider - get copyWith => CopyWith$Query$SystemServerProvider(this, (i) => i); + get copyWith => CopyWith$Query$SystemServerProvider( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemServerProvider { factory CopyWith$Query$SystemServerProvider( - Query$SystemServerProvider instance, - TRes Function(Query$SystemServerProvider) then) = - _CopyWithImpl$Query$SystemServerProvider; + Query$SystemServerProvider instance, + TRes Function(Query$SystemServerProvider) then, + ) = _CopyWithImpl$Query$SystemServerProvider; factory CopyWith$Query$SystemServerProvider.stub(TRes res) = _CopyWithStubImpl$Query$SystemServerProvider; - TRes call({Query$SystemServerProvider$system? system, String? $__typename}); + TRes call({ + Query$SystemServerProvider$system? system, + String? $__typename, + }); CopyWith$Query$SystemServerProvider$system get system; } class _CopyWithImpl$Query$SystemServerProvider implements CopyWith$Query$SystemServerProvider { - _CopyWithImpl$Query$SystemServerProvider(this._instance, this._then); + _CopyWithImpl$Query$SystemServerProvider( + this._instance, + this._then, + ); final Query$SystemServerProvider _instance; @@ -3241,14 +5931,18 @@ class _CopyWithImpl$Query$SystemServerProvider static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemServerProvider( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$SystemServerProvider$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemServerProvider$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemServerProvider$system get system { final local$system = _instance.system; return CopyWith$Query$SystemServerProvider$system( @@ -3262,7 +5956,10 @@ class _CopyWithStubImpl$Query$SystemServerProvider TRes _res; - call({Query$SystemServerProvider$system? system, String? $__typename}) => + call({ + Query$SystemServerProvider$system? system, + String? $__typename, + }) => _res; CopyWith$Query$SystemServerProvider$system get system => CopyWith$Query$SystemServerProvider$system.stub(_res); @@ -3270,50 +5967,57 @@ class _CopyWithStubImpl$Query$SystemServerProvider const documentNodeQuerySystemServerProvider = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'SystemServerProvider'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'SystemServerProvider'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'provider'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'provider'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$SystemServerProvider _parserFn$Query$SystemServerProvider( Map data) => @@ -3321,52 +6025,54 @@ Query$SystemServerProvider _parserFn$Query$SystemServerProvider( class Options$Query$SystemServerProvider extends graphql.QueryOptions { - Options$Query$SystemServerProvider( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQuerySystemServerProvider, - parserFn: _parserFn$Query$SystemServerProvider); + Options$Query$SystemServerProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemServerProvider, + parserFn: _parserFn$Query$SystemServerProvider, + ); } class WatchOptions$Query$SystemServerProvider extends graphql.WatchQueryOptions { - WatchOptions$Query$SystemServerProvider( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQuerySystemServerProvider, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$SystemServerProvider); + WatchOptions$Query$SystemServerProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemServerProvider, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemServerProvider, + ); } class FetchMoreOptions$Query$SystemServerProvider @@ -3374,8 +6080,9 @@ class FetchMoreOptions$Query$SystemServerProvider FetchMoreOptions$Query$SystemServerProvider( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQuerySystemServerProvider); + updateQuery: updateQuery, + document: documentNodeQuerySystemServerProvider, + ); } extension ClientExtension$Query$SystemServerProvider on graphql.GraphQLClient { @@ -3387,59 +6094,88 @@ extension ClientExtension$Query$SystemServerProvider on graphql.GraphQLClient { watchQuery$SystemServerProvider( [WatchOptions$Query$SystemServerProvider? options]) => this.watchQuery(options ?? WatchOptions$Query$SystemServerProvider()); - void writeQuery$SystemServerProvider( - {required Query$SystemServerProvider data, bool broadcast = true}) => + void writeQuery$SystemServerProvider({ + required Query$SystemServerProvider data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQuerySystemServerProvider)), - data: data.toJson(), - broadcast: broadcast); - Query$SystemServerProvider? readQuery$SystemServerProvider( - {bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation( document: documentNodeQuerySystemServerProvider)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemServerProvider? readQuery$SystemServerProvider( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemServerProvider)), + optimistic: optimistic, + ); return result == null ? null : Query$SystemServerProvider.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$SystemServerProvider$system { - Query$SystemServerProvider$system( - {required this.provider, required this.$__typename}); + Query$SystemServerProvider$system({ + required this.provider, + required this.$__typename, + }); - @override factory Query$SystemServerProvider$system.fromJson( - Map json) => - _$Query$SystemServerProvider$systemFromJson(json); + Map json) { + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$SystemServerProvider$system( + provider: Query$SystemServerProvider$system$provider.fromJson( + (l$provider as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemServerProvider$system$provider provider; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemServerProvider$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = l$provider.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$provider = provider; final l$$__typename = $__typename; - return Object.hashAll([l$provider, l$$__typename]); + return Object.hashAll([ + l$provider, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemServerProvider$system) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$provider = provider; final lOther$provider = other.provider; - if (l$provider != lOther$provider) return false; + if (l$provider != lOther$provider) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3447,28 +6183,34 @@ class Query$SystemServerProvider$system { extension UtilityExtension$Query$SystemServerProvider$system on Query$SystemServerProvider$system { CopyWith$Query$SystemServerProvider$system - get copyWith => - CopyWith$Query$SystemServerProvider$system(this, (i) => i); + get copyWith => CopyWith$Query$SystemServerProvider$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemServerProvider$system { factory CopyWith$Query$SystemServerProvider$system( - Query$SystemServerProvider$system instance, - TRes Function(Query$SystemServerProvider$system) then) = - _CopyWithImpl$Query$SystemServerProvider$system; + Query$SystemServerProvider$system instance, + TRes Function(Query$SystemServerProvider$system) then, + ) = _CopyWithImpl$Query$SystemServerProvider$system; factory CopyWith$Query$SystemServerProvider$system.stub(TRes res) = _CopyWithStubImpl$Query$SystemServerProvider$system; - TRes call( - {Query$SystemServerProvider$system$provider? provider, - String? $__typename}); + TRes call({ + Query$SystemServerProvider$system$provider? provider, + String? $__typename, + }); CopyWith$Query$SystemServerProvider$system$provider get provider; } class _CopyWithImpl$Query$SystemServerProvider$system implements CopyWith$Query$SystemServerProvider$system { - _CopyWithImpl$Query$SystemServerProvider$system(this._instance, this._then); + _CopyWithImpl$Query$SystemServerProvider$system( + this._instance, + this._then, + ); final Query$SystemServerProvider$system _instance; @@ -3476,15 +6218,18 @@ class _CopyWithImpl$Query$SystemServerProvider$system static const _undefined = {}; - TRes call( - {Object? provider = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemServerProvider$system( - provider: provider == _undefined || provider == null - ? _instance.provider - : (provider as Query$SystemServerProvider$system$provider), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Query$SystemServerProvider$system$provider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemServerProvider$system$provider get provider { final local$provider = _instance.provider; return CopyWith$Query$SystemServerProvider$system$provider( @@ -3498,49 +6243,73 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system TRes _res; - call( - {Query$SystemServerProvider$system$provider? provider, - String? $__typename}) => + call({ + Query$SystemServerProvider$system$provider? provider, + String? $__typename, + }) => _res; CopyWith$Query$SystemServerProvider$system$provider get provider => CopyWith$Query$SystemServerProvider$system$provider.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemServerProvider$system$provider { - Query$SystemServerProvider$system$provider( - {required this.provider, required this.$__typename}); + Query$SystemServerProvider$system$provider({ + required this.provider, + required this.$__typename, + }); - @override factory Query$SystemServerProvider$system$provider.fromJson( - Map json) => - _$Query$SystemServerProvider$system$providerFromJson(json); + Map json) { + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$SystemServerProvider$system$provider( + provider: fromJson$Enum$ServerProvider((l$provider as String)), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(unknownEnumValue: Enum$ServerProvider.$unknown) final Enum$ServerProvider provider; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemServerProvider$system$providerToJson(this); + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$ServerProvider(l$provider); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$provider = provider; final l$$__typename = $__typename; - return Object.hashAll([l$provider, l$$__typename]); + return Object.hashAll([ + l$provider, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemServerProvider$system$provider) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$provider = provider; final lOther$provider = other.provider; - if (l$provider != lOther$provider) return false; + if (l$provider != lOther$provider) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3549,26 +6318,33 @@ extension UtilityExtension$Query$SystemServerProvider$system$provider on Query$SystemServerProvider$system$provider { CopyWith$Query$SystemServerProvider$system$provider< Query$SystemServerProvider$system$provider> - get copyWith => - CopyWith$Query$SystemServerProvider$system$provider(this, (i) => i); + get copyWith => CopyWith$Query$SystemServerProvider$system$provider( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemServerProvider$system$provider { factory CopyWith$Query$SystemServerProvider$system$provider( - Query$SystemServerProvider$system$provider instance, - TRes Function(Query$SystemServerProvider$system$provider) then) = - _CopyWithImpl$Query$SystemServerProvider$system$provider; + Query$SystemServerProvider$system$provider instance, + TRes Function(Query$SystemServerProvider$system$provider) then, + ) = _CopyWithImpl$Query$SystemServerProvider$system$provider; factory CopyWith$Query$SystemServerProvider$system$provider.stub(TRes res) = _CopyWithStubImpl$Query$SystemServerProvider$system$provider; - TRes call({Enum$ServerProvider? provider, String? $__typename}); + TRes call({ + Enum$ServerProvider? provider, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemServerProvider$system$provider implements CopyWith$Query$SystemServerProvider$system$provider { _CopyWithImpl$Query$SystemServerProvider$system$provider( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemServerProvider$system$provider _instance; @@ -3576,15 +6352,18 @@ class _CopyWithImpl$Query$SystemServerProvider$system$provider static const _undefined = {}; - TRes call( - {Object? provider = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemServerProvider$system$provider( - provider: provider == _undefined || provider == null - ? _instance.provider - : (provider as Enum$ServerProvider), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$ServerProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemServerProvider$system$provider @@ -3593,64 +6372,103 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system$provider TRes _res; - call({Enum$ServerProvider? provider, String? $__typename}) => _res; + call({ + Enum$ServerProvider? provider, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiTokens { - Query$GetApiTokens({required this.api, required this.$__typename}); + Query$GetApiTokens({ + required this.api, + required this.$__typename, + }); - @override - factory Query$GetApiTokens.fromJson(Map json) => - _$Query$GetApiTokensFromJson(json); + factory Query$GetApiTokens.fromJson(Map json) { + final l$api = json['api']; + final l$$__typename = json['__typename']; + return Query$GetApiTokens( + api: Query$GetApiTokens$api.fromJson((l$api as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$GetApiTokens$api api; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokensToJson(this); + Map toJson() { + final _resultData = {}; + final l$api = api; + _resultData['api'] = l$api.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$api = api; final l$$__typename = $__typename; - return Object.hashAll([l$api, l$$__typename]); + return Object.hashAll([ + l$api, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiTokens) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiTokens) || runtimeType != other.runtimeType) { return false; + } final l$api = api; final lOther$api = other.api; - if (l$api != lOther$api) return false; + if (l$api != lOther$api) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiTokens on Query$GetApiTokens { CopyWith$Query$GetApiTokens get copyWith => - CopyWith$Query$GetApiTokens(this, (i) => i); + CopyWith$Query$GetApiTokens( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiTokens { factory CopyWith$Query$GetApiTokens( - Query$GetApiTokens instance, TRes Function(Query$GetApiTokens) then) = - _CopyWithImpl$Query$GetApiTokens; + Query$GetApiTokens instance, + TRes Function(Query$GetApiTokens) then, + ) = _CopyWithImpl$Query$GetApiTokens; factory CopyWith$Query$GetApiTokens.stub(TRes res) = _CopyWithStubImpl$Query$GetApiTokens; - TRes call({Query$GetApiTokens$api? api, String? $__typename}); + TRes call({ + Query$GetApiTokens$api? api, + String? $__typename, + }); CopyWith$Query$GetApiTokens$api get api; } class _CopyWithImpl$Query$GetApiTokens implements CopyWith$Query$GetApiTokens { - _CopyWithImpl$Query$GetApiTokens(this._instance, this._then); + _CopyWithImpl$Query$GetApiTokens( + this._instance, + this._then, + ); final Query$GetApiTokens _instance; @@ -3658,14 +6476,18 @@ class _CopyWithImpl$Query$GetApiTokens static const _undefined = {}; - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? api = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiTokens( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiTokens$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + api: api == _undefined || api == null + ? _instance.api + : (api as Query$GetApiTokens$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetApiTokens$api get api { final local$api = _instance.api; return CopyWith$Query$GetApiTokens$api(local$api, (e) => call(api: e)); @@ -3678,128 +6500,145 @@ class _CopyWithStubImpl$Query$GetApiTokens TRes _res; - call({Query$GetApiTokens$api? api, String? $__typename}) => _res; + call({ + Query$GetApiTokens$api? api, + String? $__typename, + }) => + _res; CopyWith$Query$GetApiTokens$api get api => CopyWith$Query$GetApiTokens$api.stub(_res); } const documentNodeQueryGetApiTokens = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetApiTokens'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'api'), + type: OperationType.query, + name: NameNode(value: 'GetApiTokens'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'devices'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'devices'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'creationDate'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isCaller'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'creationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'isCaller'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$GetApiTokens _parserFn$Query$GetApiTokens(Map data) => Query$GetApiTokens.fromJson(data); class Options$Query$GetApiTokens extends graphql.QueryOptions { - Options$Query$GetApiTokens( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetApiTokens, - parserFn: _parserFn$Query$GetApiTokens); + Options$Query$GetApiTokens({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiTokens, + parserFn: _parserFn$Query$GetApiTokens, + ); } class WatchOptions$Query$GetApiTokens extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiTokens( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetApiTokens, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiTokens); + WatchOptions$Query$GetApiTokens({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiTokens, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiTokens, + ); } class FetchMoreOptions$Query$GetApiTokens extends graphql.FetchMoreOptions { FetchMoreOptions$Query$GetApiTokens( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, document: documentNodeQueryGetApiTokens); + updateQuery: updateQuery, + document: documentNodeQueryGetApiTokens, + ); } extension ClientExtension$Query$GetApiTokens on graphql.GraphQLClient { @@ -3809,81 +6648,120 @@ extension ClientExtension$Query$GetApiTokens on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetApiTokens( [WatchOptions$Query$GetApiTokens? options]) => this.watchQuery(options ?? WatchOptions$Query$GetApiTokens()); - void writeQuery$GetApiTokens( - {required Query$GetApiTokens data, bool broadcast = true}) => + void writeQuery$GetApiTokens({ + required Query$GetApiTokens data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryGetApiTokens)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiTokens? readQuery$GetApiTokens({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryGetApiTokens)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetApiTokens? readQuery$GetApiTokens({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiTokens)), + optimistic: optimistic, + ); return result == null ? null : Query$GetApiTokens.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetApiTokens$api { - Query$GetApiTokens$api({required this.devices, required this.$__typename}); + Query$GetApiTokens$api({ + required this.devices, + required this.$__typename, + }); - @override - factory Query$GetApiTokens$api.fromJson(Map json) => - _$Query$GetApiTokens$apiFromJson(json); + factory Query$GetApiTokens$api.fromJson(Map json) { + final l$devices = json['devices']; + final l$$__typename = json['__typename']; + return Query$GetApiTokens$api( + devices: (l$devices as List) + .map((e) => Query$GetApiTokens$api$devices.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List devices; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokens$apiToJson(this); + Map toJson() { + final _resultData = {}; + final l$devices = devices; + _resultData['devices'] = l$devices.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$devices = devices; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$devices.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$devices.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetApiTokens$api) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetApiTokens$api) || + runtimeType != other.runtimeType) { return false; + } final l$devices = devices; final lOther$devices = other.devices; - if (l$devices.length != lOther$devices.length) return false; + if (l$devices.length != lOther$devices.length) { + return false; + } for (int i = 0; i < l$devices.length; i++) { final l$devices$entry = l$devices[i]; final lOther$devices$entry = lOther$devices[i]; - if (l$devices$entry != lOther$devices$entry) return false; + if (l$devices$entry != lOther$devices$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetApiTokens$api on Query$GetApiTokens$api { CopyWith$Query$GetApiTokens$api get copyWith => - CopyWith$Query$GetApiTokens$api(this, (i) => i); + CopyWith$Query$GetApiTokens$api( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiTokens$api { - factory CopyWith$Query$GetApiTokens$api(Query$GetApiTokens$api instance, - TRes Function(Query$GetApiTokens$api) then) = - _CopyWithImpl$Query$GetApiTokens$api; + factory CopyWith$Query$GetApiTokens$api( + Query$GetApiTokens$api instance, + TRes Function(Query$GetApiTokens$api) then, + ) = _CopyWithImpl$Query$GetApiTokens$api; factory CopyWith$Query$GetApiTokens$api.stub(TRes res) = _CopyWithStubImpl$Query$GetApiTokens$api; - TRes call( - {List? devices, String? $__typename}); + TRes call({ + List? devices, + String? $__typename, + }); TRes devices( Iterable Function( Iterable< @@ -3894,7 +6772,10 @@ abstract class CopyWith$Query$GetApiTokens$api { class _CopyWithImpl$Query$GetApiTokens$api implements CopyWith$Query$GetApiTokens$api { - _CopyWithImpl$Query$GetApiTokens$api(this._instance, this._then); + _CopyWithImpl$Query$GetApiTokens$api( + this._instance, + this._then, + ); final Query$GetApiTokens$api _instance; @@ -3902,14 +6783,18 @@ class _CopyWithImpl$Query$GetApiTokens$api static const _undefined = {}; - TRes call({Object? devices = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? devices = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiTokens$api( - devices: devices == _undefined || devices == null - ? _instance.devices - : (devices as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + devices: devices == _undefined || devices == null + ? _instance.devices + : (devices as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes devices( Iterable Function( Iterable< @@ -3917,9 +6802,11 @@ class _CopyWithImpl$Query$GetApiTokens$api Query$GetApiTokens$api$devices>>) _fn) => call( - devices: _fn(_instance.devices.map( - (e) => CopyWith$Query$GetApiTokens$api$devices(e, (i) => i))) - .toList()); + devices: _fn(_instance.devices + .map((e) => CopyWith$Query$GetApiTokens$api$devices( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$GetApiTokens$api @@ -3928,59 +6815,99 @@ class _CopyWithStubImpl$Query$GetApiTokens$api TRes _res; - call({List? devices, String? $__typename}) => + call({ + List? devices, + String? $__typename, + }) => _res; devices(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetApiTokens$api$devices { - Query$GetApiTokens$api$devices( - {required this.creationDate, - required this.isCaller, - required this.name, - required this.$__typename}); + Query$GetApiTokens$api$devices({ + required this.creationDate, + required this.isCaller, + required this.name, + required this.$__typename, + }); - @override - factory Query$GetApiTokens$api$devices.fromJson(Map json) => - _$Query$GetApiTokens$api$devicesFromJson(json); + factory Query$GetApiTokens$api$devices.fromJson(Map json) { + final l$creationDate = json['creationDate']; + final l$isCaller = json['isCaller']; + final l$name = json['name']; + final l$$__typename = json['__typename']; + return Query$GetApiTokens$api$devices( + creationDate: dateTimeFromJson(l$creationDate), + isCaller: (l$isCaller as bool), + name: (l$name as String), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime creationDate; final bool isCaller; final String name; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokens$api$devicesToJson(this); + Map toJson() { + final _resultData = {}; + final l$creationDate = creationDate; + _resultData['creationDate'] = dateTimeToJson(l$creationDate); + final l$isCaller = isCaller; + _resultData['isCaller'] = l$isCaller; + final l$name = name; + _resultData['name'] = l$name; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$creationDate = creationDate; final l$isCaller = isCaller; final l$name = name; final l$$__typename = $__typename; - return Object.hashAll([l$creationDate, l$isCaller, l$name, l$$__typename]); + return Object.hashAll([ + l$creationDate, + l$isCaller, + l$name, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$GetApiTokens$api$devices) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$creationDate = creationDate; final lOther$creationDate = other.creationDate; - if (l$creationDate != lOther$creationDate) return false; + if (l$creationDate != lOther$creationDate) { + return false; + } final l$isCaller = isCaller; final lOther$isCaller = other.isCaller; - if (l$isCaller != lOther$isCaller) return false; + if (l$isCaller != lOther$isCaller) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3988,28 +6915,35 @@ class Query$GetApiTokens$api$devices { extension UtilityExtension$Query$GetApiTokens$api$devices on Query$GetApiTokens$api$devices { CopyWith$Query$GetApiTokens$api$devices - get copyWith => CopyWith$Query$GetApiTokens$api$devices(this, (i) => i); + get copyWith => CopyWith$Query$GetApiTokens$api$devices( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetApiTokens$api$devices { factory CopyWith$Query$GetApiTokens$api$devices( - Query$GetApiTokens$api$devices instance, - TRes Function(Query$GetApiTokens$api$devices) then) = - _CopyWithImpl$Query$GetApiTokens$api$devices; + Query$GetApiTokens$api$devices instance, + TRes Function(Query$GetApiTokens$api$devices) then, + ) = _CopyWithImpl$Query$GetApiTokens$api$devices; factory CopyWith$Query$GetApiTokens$api$devices.stub(TRes res) = _CopyWithStubImpl$Query$GetApiTokens$api$devices; - TRes call( - {DateTime? creationDate, - bool? isCaller, - String? name, - String? $__typename}); + TRes call({ + DateTime? creationDate, + bool? isCaller, + String? name, + String? $__typename, + }); } class _CopyWithImpl$Query$GetApiTokens$api$devices implements CopyWith$Query$GetApiTokens$api$devices { - _CopyWithImpl$Query$GetApiTokens$api$devices(this._instance, this._then); + _CopyWithImpl$Query$GetApiTokens$api$devices( + this._instance, + this._then, + ); final Query$GetApiTokens$api$devices _instance; @@ -4017,24 +6951,26 @@ class _CopyWithImpl$Query$GetApiTokens$api$devices static const _undefined = {}; - TRes call( - {Object? creationDate = _undefined, - Object? isCaller = _undefined, - Object? name = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? creationDate = _undefined, + Object? isCaller = _undefined, + Object? name = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetApiTokens$api$devices( - creationDate: creationDate == _undefined || creationDate == null - ? _instance.creationDate - : (creationDate as DateTime), - isCaller: isCaller == _undefined || isCaller == null - ? _instance.isCaller - : (isCaller as bool), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + creationDate: creationDate == _undefined || creationDate == null + ? _instance.creationDate + : (creationDate as DateTime), + isCaller: isCaller == _undefined || isCaller == null + ? _instance.isCaller + : (isCaller as bool), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$GetApiTokens$api$devices @@ -4043,69 +6979,105 @@ class _CopyWithStubImpl$Query$GetApiTokens$api$devices TRes _res; - call( - {DateTime? creationDate, - bool? isCaller, - String? name, - String? $__typename}) => + call({ + DateTime? creationDate, + bool? isCaller, + String? name, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Query$RecoveryKey { - Query$RecoveryKey({required this.api, required this.$__typename}); + Query$RecoveryKey({ + required this.api, + required this.$__typename, + }); - @override - factory Query$RecoveryKey.fromJson(Map json) => - _$Query$RecoveryKeyFromJson(json); + factory Query$RecoveryKey.fromJson(Map json) { + final l$api = json['api']; + final l$$__typename = json['__typename']; + return Query$RecoveryKey( + api: Query$RecoveryKey$api.fromJson((l$api as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$RecoveryKey$api api; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$RecoveryKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$api = api; + _resultData['api'] = l$api.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$api = api; final l$$__typename = $__typename; - return Object.hashAll([l$api, l$$__typename]); + return Object.hashAll([ + l$api, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$RecoveryKey) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$RecoveryKey) || runtimeType != other.runtimeType) { return false; + } final l$api = api; final lOther$api = other.api; - if (l$api != lOther$api) return false; + if (l$api != lOther$api) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$RecoveryKey on Query$RecoveryKey { CopyWith$Query$RecoveryKey get copyWith => - CopyWith$Query$RecoveryKey(this, (i) => i); + CopyWith$Query$RecoveryKey( + this, + (i) => i, + ); } abstract class CopyWith$Query$RecoveryKey { factory CopyWith$Query$RecoveryKey( - Query$RecoveryKey instance, TRes Function(Query$RecoveryKey) then) = - _CopyWithImpl$Query$RecoveryKey; + Query$RecoveryKey instance, + TRes Function(Query$RecoveryKey) then, + ) = _CopyWithImpl$Query$RecoveryKey; factory CopyWith$Query$RecoveryKey.stub(TRes res) = _CopyWithStubImpl$Query$RecoveryKey; - TRes call({Query$RecoveryKey$api? api, String? $__typename}); + TRes call({ + Query$RecoveryKey$api? api, + String? $__typename, + }); CopyWith$Query$RecoveryKey$api get api; } class _CopyWithImpl$Query$RecoveryKey implements CopyWith$Query$RecoveryKey { - _CopyWithImpl$Query$RecoveryKey(this._instance, this._then); + _CopyWithImpl$Query$RecoveryKey( + this._instance, + this._then, + ); final Query$RecoveryKey _instance; @@ -4113,14 +7085,18 @@ class _CopyWithImpl$Query$RecoveryKey static const _undefined = {}; - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? api = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$RecoveryKey( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$RecoveryKey$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + api: api == _undefined || api == null + ? _instance.api + : (api as Query$RecoveryKey$api), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$RecoveryKey$api get api { final local$api = _instance.api; return CopyWith$Query$RecoveryKey$api(local$api, (e) => call(api: e)); @@ -4133,138 +7109,158 @@ class _CopyWithStubImpl$Query$RecoveryKey TRes _res; - call({Query$RecoveryKey$api? api, String? $__typename}) => _res; + call({ + Query$RecoveryKey$api? api, + String? $__typename, + }) => + _res; CopyWith$Query$RecoveryKey$api get api => CopyWith$Query$RecoveryKey$api.stub(_res); } const documentNodeQueryRecoveryKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'RecoveryKey'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'api'), + type: OperationType.query, + name: NameNode(value: 'RecoveryKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'recoveryKey'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'recoveryKey'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'creationDate'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'exists'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'expirationDate'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'usesLeft'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'valid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'creationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'exists'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'expirationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usesLeft'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'valid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$RecoveryKey _parserFn$Query$RecoveryKey(Map data) => Query$RecoveryKey.fromJson(data); class Options$Query$RecoveryKey extends graphql.QueryOptions { - Options$Query$RecoveryKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryRecoveryKey, - parserFn: _parserFn$Query$RecoveryKey); + Options$Query$RecoveryKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryRecoveryKey, + parserFn: _parserFn$Query$RecoveryKey, + ); } class WatchOptions$Query$RecoveryKey extends graphql.WatchQueryOptions { - WatchOptions$Query$RecoveryKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryRecoveryKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$RecoveryKey); + WatchOptions$Query$RecoveryKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryRecoveryKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$RecoveryKey, + ); } class FetchMoreOptions$Query$RecoveryKey extends graphql.FetchMoreOptions { FetchMoreOptions$Query$RecoveryKey({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryRecoveryKey); + : super( + updateQuery: updateQuery, + document: documentNodeQueryRecoveryKey, + ); } extension ClientExtension$Query$RecoveryKey on graphql.GraphQLClient { @@ -4274,80 +7270,118 @@ extension ClientExtension$Query$RecoveryKey on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$RecoveryKey( [WatchOptions$Query$RecoveryKey? options]) => this.watchQuery(options ?? WatchOptions$Query$RecoveryKey()); - void writeQuery$RecoveryKey( - {required Query$RecoveryKey data, bool broadcast = true}) => + void writeQuery$RecoveryKey({ + required Query$RecoveryKey data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryRecoveryKey)), - data: data.toJson(), - broadcast: broadcast); - Query$RecoveryKey? readQuery$RecoveryKey({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryRecoveryKey)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$RecoveryKey? readQuery$RecoveryKey({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryRecoveryKey)), + optimistic: optimistic, + ); return result == null ? null : Query$RecoveryKey.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$RecoveryKey$api { - Query$RecoveryKey$api({required this.recoveryKey, required this.$__typename}); + Query$RecoveryKey$api({ + required this.recoveryKey, + required this.$__typename, + }); - @override - factory Query$RecoveryKey$api.fromJson(Map json) => - _$Query$RecoveryKey$apiFromJson(json); + factory Query$RecoveryKey$api.fromJson(Map json) { + final l$recoveryKey = json['recoveryKey']; + final l$$__typename = json['__typename']; + return Query$RecoveryKey$api( + recoveryKey: Query$RecoveryKey$api$recoveryKey.fromJson( + (l$recoveryKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$RecoveryKey$api$recoveryKey recoveryKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$RecoveryKey$apiToJson(this); + Map toJson() { + final _resultData = {}; + final l$recoveryKey = recoveryKey; + _resultData['recoveryKey'] = l$recoveryKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$recoveryKey = recoveryKey; final l$$__typename = $__typename; - return Object.hashAll([l$recoveryKey, l$$__typename]); + return Object.hashAll([ + l$recoveryKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$RecoveryKey$api) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$RecoveryKey$api) || runtimeType != other.runtimeType) { return false; + } final l$recoveryKey = recoveryKey; final lOther$recoveryKey = other.recoveryKey; - if (l$recoveryKey != lOther$recoveryKey) return false; + if (l$recoveryKey != lOther$recoveryKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$RecoveryKey$api on Query$RecoveryKey$api { CopyWith$Query$RecoveryKey$api get copyWith => - CopyWith$Query$RecoveryKey$api(this, (i) => i); + CopyWith$Query$RecoveryKey$api( + this, + (i) => i, + ); } abstract class CopyWith$Query$RecoveryKey$api { - factory CopyWith$Query$RecoveryKey$api(Query$RecoveryKey$api instance, - TRes Function(Query$RecoveryKey$api) then) = - _CopyWithImpl$Query$RecoveryKey$api; + factory CopyWith$Query$RecoveryKey$api( + Query$RecoveryKey$api instance, + TRes Function(Query$RecoveryKey$api) then, + ) = _CopyWithImpl$Query$RecoveryKey$api; factory CopyWith$Query$RecoveryKey$api.stub(TRes res) = _CopyWithStubImpl$Query$RecoveryKey$api; - TRes call( - {Query$RecoveryKey$api$recoveryKey? recoveryKey, String? $__typename}); + TRes call({ + Query$RecoveryKey$api$recoveryKey? recoveryKey, + String? $__typename, + }); CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey; } class _CopyWithImpl$Query$RecoveryKey$api implements CopyWith$Query$RecoveryKey$api { - _CopyWithImpl$Query$RecoveryKey$api(this._instance, this._then); + _CopyWithImpl$Query$RecoveryKey$api( + this._instance, + this._then, + ); final Query$RecoveryKey$api _instance; @@ -4355,16 +7389,18 @@ class _CopyWithImpl$Query$RecoveryKey$api static const _undefined = {}; - TRes call( - {Object? recoveryKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? recoveryKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$RecoveryKey$api( - recoveryKey: recoveryKey == _undefined || recoveryKey == null - ? _instance.recoveryKey - : (recoveryKey as Query$RecoveryKey$api$recoveryKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + recoveryKey: recoveryKey == _undefined || recoveryKey == null + ? _instance.recoveryKey + : (recoveryKey as Query$RecoveryKey$api$recoveryKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey { final local$recoveryKey = _instance.recoveryKey; return CopyWith$Query$RecoveryKey$api$recoveryKey( @@ -4378,46 +7414,77 @@ class _CopyWithStubImpl$Query$RecoveryKey$api TRes _res; - call({Query$RecoveryKey$api$recoveryKey? recoveryKey, String? $__typename}) => + call({ + Query$RecoveryKey$api$recoveryKey? recoveryKey, + String? $__typename, + }) => _res; CopyWith$Query$RecoveryKey$api$recoveryKey get recoveryKey => CopyWith$Query$RecoveryKey$api$recoveryKey.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$RecoveryKey$api$recoveryKey { - Query$RecoveryKey$api$recoveryKey( - {this.creationDate, - required this.exists, - this.expirationDate, - this.usesLeft, - required this.valid, - required this.$__typename}); + Query$RecoveryKey$api$recoveryKey({ + this.creationDate, + required this.exists, + this.expirationDate, + this.usesLeft, + required this.valid, + required this.$__typename, + }); - @override factory Query$RecoveryKey$api$recoveryKey.fromJson( - Map json) => - _$Query$RecoveryKey$api$recoveryKeyFromJson(json); + Map json) { + final l$creationDate = json['creationDate']; + final l$exists = json['exists']; + final l$expirationDate = json['expirationDate']; + final l$usesLeft = json['usesLeft']; + final l$valid = json['valid']; + final l$$__typename = json['__typename']; + return Query$RecoveryKey$api$recoveryKey( + creationDate: + l$creationDate == null ? null : dateTimeFromJson(l$creationDate), + exists: (l$exists as bool), + expirationDate: + l$expirationDate == null ? null : dateTimeFromJson(l$expirationDate), + usesLeft: (l$usesLeft as int?), + valid: (l$valid as bool), + $__typename: (l$$__typename as String), + ); + } - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? creationDate; final bool exists; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? expirationDate; final int? usesLeft; final bool valid; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$RecoveryKey$api$recoveryKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$creationDate = creationDate; + _resultData['creationDate'] = + l$creationDate == null ? null : dateTimeToJson(l$creationDate); + final l$exists = exists; + _resultData['exists'] = l$exists; + final l$expirationDate = expirationDate; + _resultData['expirationDate'] = + l$expirationDate == null ? null : dateTimeToJson(l$expirationDate); + final l$usesLeft = usesLeft; + _resultData['usesLeft'] = l$usesLeft; + final l$valid = valid; + _resultData['valid'] = l$valid; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$creationDate = creationDate; final l$exists = exists; @@ -4431,33 +7498,49 @@ class Query$RecoveryKey$api$recoveryKey { l$expirationDate, l$usesLeft, l$valid, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$RecoveryKey$api$recoveryKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$creationDate = creationDate; final lOther$creationDate = other.creationDate; - if (l$creationDate != lOther$creationDate) return false; + if (l$creationDate != lOther$creationDate) { + return false; + } final l$exists = exists; final lOther$exists = other.exists; - if (l$exists != lOther$exists) return false; + if (l$exists != lOther$exists) { + return false; + } final l$expirationDate = expirationDate; final lOther$expirationDate = other.expirationDate; - if (l$expirationDate != lOther$expirationDate) return false; + if (l$expirationDate != lOther$expirationDate) { + return false; + } final l$usesLeft = usesLeft; final lOther$usesLeft = other.usesLeft; - if (l$usesLeft != lOther$usesLeft) return false; + if (l$usesLeft != lOther$usesLeft) { + return false; + } final l$valid = valid; final lOther$valid = other.valid; - if (l$valid != lOther$valid) return false; + if (l$valid != lOther$valid) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -4465,31 +7548,37 @@ class Query$RecoveryKey$api$recoveryKey { extension UtilityExtension$Query$RecoveryKey$api$recoveryKey on Query$RecoveryKey$api$recoveryKey { CopyWith$Query$RecoveryKey$api$recoveryKey - get copyWith => - CopyWith$Query$RecoveryKey$api$recoveryKey(this, (i) => i); + get copyWith => CopyWith$Query$RecoveryKey$api$recoveryKey( + this, + (i) => i, + ); } abstract class CopyWith$Query$RecoveryKey$api$recoveryKey { factory CopyWith$Query$RecoveryKey$api$recoveryKey( - Query$RecoveryKey$api$recoveryKey instance, - TRes Function(Query$RecoveryKey$api$recoveryKey) then) = - _CopyWithImpl$Query$RecoveryKey$api$recoveryKey; + Query$RecoveryKey$api$recoveryKey instance, + TRes Function(Query$RecoveryKey$api$recoveryKey) then, + ) = _CopyWithImpl$Query$RecoveryKey$api$recoveryKey; factory CopyWith$Query$RecoveryKey$api$recoveryKey.stub(TRes res) = _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey; - TRes call( - {DateTime? creationDate, - bool? exists, - DateTime? expirationDate, - int? usesLeft, - bool? valid, - String? $__typename}); + TRes call({ + DateTime? creationDate, + bool? exists, + DateTime? expirationDate, + int? usesLeft, + bool? valid, + String? $__typename, + }); } class _CopyWithImpl$Query$RecoveryKey$api$recoveryKey implements CopyWith$Query$RecoveryKey$api$recoveryKey { - _CopyWithImpl$Query$RecoveryKey$api$recoveryKey(this._instance, this._then); + _CopyWithImpl$Query$RecoveryKey$api$recoveryKey( + this._instance, + this._then, + ); final Query$RecoveryKey$api$recoveryKey _instance; @@ -4497,31 +7586,33 @@ class _CopyWithImpl$Query$RecoveryKey$api$recoveryKey static const _undefined = {}; - TRes call( - {Object? creationDate = _undefined, - Object? exists = _undefined, - Object? expirationDate = _undefined, - Object? usesLeft = _undefined, - Object? valid = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? creationDate = _undefined, + Object? exists = _undefined, + Object? expirationDate = _undefined, + Object? usesLeft = _undefined, + Object? valid = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$RecoveryKey$api$recoveryKey( - creationDate: creationDate == _undefined - ? _instance.creationDate - : (creationDate as DateTime?), - exists: exists == _undefined || exists == null - ? _instance.exists - : (exists as bool), - expirationDate: expirationDate == _undefined - ? _instance.expirationDate - : (expirationDate as DateTime?), - usesLeft: - usesLeft == _undefined ? _instance.usesLeft : (usesLeft as int?), - valid: valid == _undefined || valid == null - ? _instance.valid - : (valid as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + creationDate: creationDate == _undefined + ? _instance.creationDate + : (creationDate as DateTime?), + exists: exists == _undefined || exists == null + ? _instance.exists + : (exists as bool), + expirationDate: expirationDate == _undefined + ? _instance.expirationDate + : (expirationDate as DateTime?), + usesLeft: + usesLeft == _undefined ? _instance.usesLeft : (usesLeft as int?), + valid: valid == _undefined || valid == null + ? _instance.valid + : (valid as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey @@ -4530,56 +7621,90 @@ class _CopyWithStubImpl$Query$RecoveryKey$api$recoveryKey TRes _res; - call( - {DateTime? creationDate, - bool? exists, - DateTime? expirationDate, - int? usesLeft, - bool? valid, - String? $__typename}) => + call({ + DateTime? creationDate, + bool? exists, + DateTime? expirationDate, + int? usesLeft, + bool? valid, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$GetNewRecoveryApiKey { - Variables$Mutation$GetNewRecoveryApiKey({this.limits}); + factory Variables$Mutation$GetNewRecoveryApiKey( + {Input$RecoveryKeyLimitsInput? limits}) => + Variables$Mutation$GetNewRecoveryApiKey._({ + if (limits != null) r'limits': limits, + }); + + Variables$Mutation$GetNewRecoveryApiKey._(this._$data); - @override factory Variables$Mutation$GetNewRecoveryApiKey.fromJson( - Map json) => - _$Variables$Mutation$GetNewRecoveryApiKeyFromJson(json); - - final Input$RecoveryKeyLimitsInput? limits; - - Map toJson() => - _$Variables$Mutation$GetNewRecoveryApiKeyToJson(this); - int get hashCode { - final l$limits = limits; - return Object.hashAll([l$limits]); + Map data) { + final result$data = {}; + if (data.containsKey('limits')) { + final l$limits = data['limits']; + result$data['limits'] = l$limits == null + ? null + : Input$RecoveryKeyLimitsInput.fromJson( + (l$limits as Map)); + } + return Variables$Mutation$GetNewRecoveryApiKey._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$GetNewRecoveryApiKey) || - runtimeType != other.runtimeType) return false; - final l$limits = limits; - final lOther$limits = other.limits; - if (l$limits != lOther$limits) return false; - return true; + Map _$data; + + Input$RecoveryKeyLimitsInput? get limits => + (_$data['limits'] as Input$RecoveryKeyLimitsInput?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('limits')) { + final l$limits = limits; + result$data['limits'] = l$limits?.toJson(); + } + return result$data; } CopyWith$Variables$Mutation$GetNewRecoveryApiKey< Variables$Mutation$GetNewRecoveryApiKey> - get copyWith => - CopyWith$Variables$Mutation$GetNewRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$GetNewRecoveryApiKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$GetNewRecoveryApiKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$limits = limits; + final lOther$limits = other.limits; + if (_$data.containsKey('limits') != other._$data.containsKey('limits')) { + return false; + } + if (l$limits != lOther$limits) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$limits = limits; + return Object.hashAll([_$data.containsKey('limits') ? l$limits : const {}]); + } } abstract class CopyWith$Variables$Mutation$GetNewRecoveryApiKey { factory CopyWith$Variables$Mutation$GetNewRecoveryApiKey( - Variables$Mutation$GetNewRecoveryApiKey instance, - TRes Function(Variables$Mutation$GetNewRecoveryApiKey) then) = - _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey; + Variables$Mutation$GetNewRecoveryApiKey instance, + TRes Function(Variables$Mutation$GetNewRecoveryApiKey) then, + ) = _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey; factory CopyWith$Variables$Mutation$GetNewRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey; @@ -4590,7 +7715,9 @@ abstract class CopyWith$Variables$Mutation$GetNewRecoveryApiKey { class _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey implements CopyWith$Variables$Mutation$GetNewRecoveryApiKey { _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$GetNewRecoveryApiKey _instance; @@ -4599,10 +7726,11 @@ class _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey static const _undefined = {}; TRes call({Object? limits = _undefined}) => - _then(Variables$Mutation$GetNewRecoveryApiKey( - limits: limits == _undefined - ? _instance.limits - : (limits as Input$RecoveryKeyLimitsInput?))); + _then(Variables$Mutation$GetNewRecoveryApiKey._({ + ..._instance._$data, + if (limits != _undefined) + 'limits': (limits as Input$RecoveryKeyLimitsInput?), + })); } class _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey @@ -4614,38 +7742,65 @@ class _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey call({Input$RecoveryKeyLimitsInput? limits}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewRecoveryApiKey { - Mutation$GetNewRecoveryApiKey( - {required this.getNewRecoveryApiKey, required this.$__typename}); + Mutation$GetNewRecoveryApiKey({ + required this.getNewRecoveryApiKey, + required this.$__typename, + }); - @override - factory Mutation$GetNewRecoveryApiKey.fromJson(Map json) => - _$Mutation$GetNewRecoveryApiKeyFromJson(json); + factory Mutation$GetNewRecoveryApiKey.fromJson(Map json) { + final l$getNewRecoveryApiKey = json['getNewRecoveryApiKey']; + final l$$__typename = json['__typename']; + return Mutation$GetNewRecoveryApiKey( + getNewRecoveryApiKey: + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( + (l$getNewRecoveryApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey getNewRecoveryApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$GetNewRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$getNewRecoveryApiKey = getNewRecoveryApiKey; + _resultData['getNewRecoveryApiKey'] = l$getNewRecoveryApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getNewRecoveryApiKey = getNewRecoveryApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$getNewRecoveryApiKey, l$$__typename]); + return Object.hashAll([ + l$getNewRecoveryApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$getNewRecoveryApiKey = getNewRecoveryApiKey; final lOther$getNewRecoveryApiKey = other.getNewRecoveryApiKey; - if (l$getNewRecoveryApiKey != lOther$getNewRecoveryApiKey) return false; + if (l$getNewRecoveryApiKey != lOther$getNewRecoveryApiKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -4653,28 +7808,35 @@ class Mutation$GetNewRecoveryApiKey { extension UtilityExtension$Mutation$GetNewRecoveryApiKey on Mutation$GetNewRecoveryApiKey { CopyWith$Mutation$GetNewRecoveryApiKey - get copyWith => CopyWith$Mutation$GetNewRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$GetNewRecoveryApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewRecoveryApiKey { factory CopyWith$Mutation$GetNewRecoveryApiKey( - Mutation$GetNewRecoveryApiKey instance, - TRes Function(Mutation$GetNewRecoveryApiKey) then) = - _CopyWithImpl$Mutation$GetNewRecoveryApiKey; + Mutation$GetNewRecoveryApiKey instance, + TRes Function(Mutation$GetNewRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewRecoveryApiKey; factory CopyWith$Mutation$GetNewRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey; - TRes call( - {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, - String? $__typename}); + TRes call({ + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, + String? $__typename, + }); CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey get getNewRecoveryApiKey; } class _CopyWithImpl$Mutation$GetNewRecoveryApiKey implements CopyWith$Mutation$GetNewRecoveryApiKey { - _CopyWithImpl$Mutation$GetNewRecoveryApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$GetNewRecoveryApiKey( + this._instance, + this._then, + ); final Mutation$GetNewRecoveryApiKey _instance; @@ -4682,18 +7844,20 @@ class _CopyWithImpl$Mutation$GetNewRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? getNewRecoveryApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? getNewRecoveryApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$GetNewRecoveryApiKey( - getNewRecoveryApiKey: - getNewRecoveryApiKey == _undefined || getNewRecoveryApiKey == null - ? _instance.getNewRecoveryApiKey - : (getNewRecoveryApiKey - as Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getNewRecoveryApiKey: + getNewRecoveryApiKey == _undefined || getNewRecoveryApiKey == null + ? _instance.getNewRecoveryApiKey + : (getNewRecoveryApiKey + as Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey get getNewRecoveryApiKey { final local$getNewRecoveryApiKey = _instance.getNewRecoveryApiKey; @@ -4708,10 +7872,10 @@ class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey TRes _res; - call( - {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? - getNewRecoveryApiKey, - String? $__typename}) => + call({ + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? getNewRecoveryApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey get getNewRecoveryApiKey => @@ -4721,93 +7885,107 @@ class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey const documentNodeMutationGetNewRecoveryApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'GetNewRecoveryApiKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'limits')), - type: NamedTypeNode( - name: NameNode(value: 'RecoveryKeyLimitsInput'), - isNonNull: false), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'getNewRecoveryApiKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'limits'), - value: VariableNode(name: NameNode(value: 'limits'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'GetNewRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'limits')), + type: NamedTypeNode( + name: NameNode(value: 'RecoveryKeyLimitsInput'), + isNonNull: false, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'limits'), + value: VariableNode(name: NameNode(value: 'limits')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'key'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'key'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$GetNewRecoveryApiKey _parserFn$Mutation$GetNewRecoveryApiKey( Map data) => Mutation$GetNewRecoveryApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$GetNewRecoveryApiKey = FutureOr - Function(dynamic, Mutation$GetNewRecoveryApiKey?); + Function( + dynamic, + Mutation$GetNewRecoveryApiKey?, +); class Options$Mutation$GetNewRecoveryApiKey extends graphql.MutationOptions { - Options$Mutation$GetNewRecoveryApiKey( - {String? operationName, - Variables$Mutation$GetNewRecoveryApiKey? variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$GetNewRecoveryApiKey({ + String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables?.toJson() ?? {}, - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$GetNewRecoveryApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationGetNewRecoveryApiKey, - parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); + : _parserFn$Mutation$GetNewRecoveryApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationGetNewRecoveryApiKey, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey, + ); final OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompletedWithParsed; @@ -4817,38 +7995,39 @@ class Options$Mutation$GetNewRecoveryApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$GetNewRecoveryApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$GetNewRecoveryApiKey( - {String? operationName, - Variables$Mutation$GetNewRecoveryApiKey? variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables?.toJson() ?? {}, - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationGetNewRecoveryApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); + WatchOptions$Mutation$GetNewRecoveryApiKey({ + String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey, + ); } extension ClientExtension$Mutation$GetNewRecoveryApiKey @@ -4864,20 +8043,31 @@ extension ClientExtension$Mutation$GetNewRecoveryApiKey options ?? WatchOptions$Mutation$GetNewRecoveryApiKey()); } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey - implements Fragment$basicMutationReturnFields { - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.key}); + implements Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key, + }); - @override factory Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( - Map json) => - _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$key = json['key']; + return Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + key: (l$key as String?), + ); + } final int code; @@ -4885,42 +8075,75 @@ class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? key; - Map toJson() => - _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$key = key; + _resultData['key'] = l$key; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$key = key; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$key, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$key = key; final lOther$key = other.key; - if (l$key != lOther$key) return false; + if (l$key != lOther$key) { + return false; + } return true; } } @@ -4931,34 +8154,38 @@ extension UtilityExtension$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey> get copyWith => CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey< TRes> { factory CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance, - TRes Function(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) - then) = - _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance, + TRes Function(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; factory CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }); } class _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey implements CopyWith$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey { _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey _instance; @@ -4966,26 +8193,27 @@ class _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? key = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? key = _undefined, + }) => _then(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - key: key == _undefined ? _instance.key : (key as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + key: key == _undefined ? _instance.key : (key as String?), + )); } class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey @@ -4996,55 +8224,80 @@ class _CopyWithStubImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$UseRecoveryApiKey { - Variables$Mutation$UseRecoveryApiKey({required this.input}); + factory Variables$Mutation$UseRecoveryApiKey( + {required Input$UseRecoveryKeyInput input}) => + Variables$Mutation$UseRecoveryApiKey._({ + r'input': input, + }); + + Variables$Mutation$UseRecoveryApiKey._(this._$data); - @override factory Variables$Mutation$UseRecoveryApiKey.fromJson( - Map json) => - _$Variables$Mutation$UseRecoveryApiKeyFromJson(json); - - final Input$UseRecoveryKeyInput input; - - Map toJson() => - _$Variables$Mutation$UseRecoveryApiKeyToJson(this); - int get hashCode { - final l$input = input; - return Object.hashAll([l$input]); + Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$UseRecoveryKeyInput.fromJson((l$input as Map)); + return Variables$Mutation$UseRecoveryApiKey._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UseRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + Map _$data; + + Input$UseRecoveryKeyInput get input => + (_$data['input'] as Input$UseRecoveryKeyInput); + Map toJson() { + final result$data = {}; final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; + result$data['input'] = l$input.toJson(); + return result$data; } CopyWith$Variables$Mutation$UseRecoveryApiKey< Variables$Mutation$UseRecoveryApiKey> - get copyWith => - CopyWith$Variables$Mutation$UseRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$UseRecoveryApiKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$UseRecoveryApiKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } } abstract class CopyWith$Variables$Mutation$UseRecoveryApiKey { factory CopyWith$Variables$Mutation$UseRecoveryApiKey( - Variables$Mutation$UseRecoveryApiKey instance, - TRes Function(Variables$Mutation$UseRecoveryApiKey) then) = - _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey; + Variables$Mutation$UseRecoveryApiKey instance, + TRes Function(Variables$Mutation$UseRecoveryApiKey) then, + ) = _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey; factory CopyWith$Variables$Mutation$UseRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey; @@ -5055,7 +8308,9 @@ abstract class CopyWith$Variables$Mutation$UseRecoveryApiKey { class _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey implements CopyWith$Variables$Mutation$UseRecoveryApiKey { _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$UseRecoveryApiKey _instance; @@ -5064,10 +8319,11 @@ class _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$UseRecoveryApiKey( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$UseRecoveryKeyInput))); + _then(Variables$Mutation$UseRecoveryApiKey._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$UseRecoveryKeyInput), + })); } class _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey @@ -5079,38 +8335,64 @@ class _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey call({Input$UseRecoveryKeyInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$UseRecoveryApiKey { - Mutation$UseRecoveryApiKey( - {required this.useRecoveryApiKey, required this.$__typename}); + Mutation$UseRecoveryApiKey({ + required this.useRecoveryApiKey, + required this.$__typename, + }); - @override - factory Mutation$UseRecoveryApiKey.fromJson(Map json) => - _$Mutation$UseRecoveryApiKeyFromJson(json); + factory Mutation$UseRecoveryApiKey.fromJson(Map json) { + final l$useRecoveryApiKey = json['useRecoveryApiKey']; + final l$$__typename = json['__typename']; + return Mutation$UseRecoveryApiKey( + useRecoveryApiKey: Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( + (l$useRecoveryApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$UseRecoveryApiKey$useRecoveryApiKey useRecoveryApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UseRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$useRecoveryApiKey = useRecoveryApiKey; + _resultData['useRecoveryApiKey'] = l$useRecoveryApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$useRecoveryApiKey = useRecoveryApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$useRecoveryApiKey, l$$__typename]); + return Object.hashAll([ + l$useRecoveryApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UseRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$useRecoveryApiKey = useRecoveryApiKey; final lOther$useRecoveryApiKey = other.useRecoveryApiKey; - if (l$useRecoveryApiKey != lOther$useRecoveryApiKey) return false; + if (l$useRecoveryApiKey != lOther$useRecoveryApiKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -5118,28 +8400,35 @@ class Mutation$UseRecoveryApiKey { extension UtilityExtension$Mutation$UseRecoveryApiKey on Mutation$UseRecoveryApiKey { CopyWith$Mutation$UseRecoveryApiKey - get copyWith => CopyWith$Mutation$UseRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$UseRecoveryApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UseRecoveryApiKey { factory CopyWith$Mutation$UseRecoveryApiKey( - Mutation$UseRecoveryApiKey instance, - TRes Function(Mutation$UseRecoveryApiKey) then) = - _CopyWithImpl$Mutation$UseRecoveryApiKey; + Mutation$UseRecoveryApiKey instance, + TRes Function(Mutation$UseRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$UseRecoveryApiKey; factory CopyWith$Mutation$UseRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$UseRecoveryApiKey; - TRes call( - {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, - String? $__typename}); + TRes call({ + Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, + String? $__typename, + }); CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey get useRecoveryApiKey; } class _CopyWithImpl$Mutation$UseRecoveryApiKey implements CopyWith$Mutation$UseRecoveryApiKey { - _CopyWithImpl$Mutation$UseRecoveryApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$UseRecoveryApiKey( + this._instance, + this._then, + ); final Mutation$UseRecoveryApiKey _instance; @@ -5147,18 +8436,20 @@ class _CopyWithImpl$Mutation$UseRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? useRecoveryApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? useRecoveryApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UseRecoveryApiKey( - useRecoveryApiKey: - useRecoveryApiKey == _undefined || useRecoveryApiKey == null - ? _instance.useRecoveryApiKey - : (useRecoveryApiKey - as Mutation$UseRecoveryApiKey$useRecoveryApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + useRecoveryApiKey: + useRecoveryApiKey == _undefined || useRecoveryApiKey == null + ? _instance.useRecoveryApiKey + : (useRecoveryApiKey + as Mutation$UseRecoveryApiKey$useRecoveryApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey get useRecoveryApiKey { final local$useRecoveryApiKey = _instance.useRecoveryApiKey; @@ -5173,9 +8464,10 @@ class _CopyWithStubImpl$Mutation$UseRecoveryApiKey TRes _res; - call( - {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, - String? $__typename}) => + call({ + Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey get useRecoveryApiKey => @@ -5184,92 +8476,107 @@ class _CopyWithStubImpl$Mutation$UseRecoveryApiKey const documentNodeMutationUseRecoveryApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'UseRecoveryApiKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'UseRecoveryKeyInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'useRecoveryApiKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'UseRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseRecoveryKeyInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'useRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'token'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'token'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$UseRecoveryApiKey _parserFn$Mutation$UseRecoveryApiKey( Map data) => Mutation$UseRecoveryApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$UseRecoveryApiKey = FutureOr - Function(dynamic, Mutation$UseRecoveryApiKey?); + Function( + dynamic, + Mutation$UseRecoveryApiKey?, +); class Options$Mutation$UseRecoveryApiKey extends graphql.MutationOptions { - Options$Mutation$UseRecoveryApiKey( - {String? operationName, - required Variables$Mutation$UseRecoveryApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$UseRecoveryApiKey({ + String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$UseRecoveryApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationUseRecoveryApiKey, - parserFn: _parserFn$Mutation$UseRecoveryApiKey); + : _parserFn$Mutation$UseRecoveryApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationUseRecoveryApiKey, + parserFn: _parserFn$Mutation$UseRecoveryApiKey, + ); final OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompletedWithParsed; @@ -5278,38 +8585,39 @@ class Options$Mutation$UseRecoveryApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$UseRecoveryApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UseRecoveryApiKey( - {String? operationName, - required Variables$Mutation$UseRecoveryApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationUseRecoveryApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UseRecoveryApiKey); + WatchOptions$Mutation$UseRecoveryApiKey({ + String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUseRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UseRecoveryApiKey, + ); } extension ClientExtension$Mutation$UseRecoveryApiKey on graphql.GraphQLClient { @@ -5323,20 +8631,32 @@ extension ClientExtension$Mutation$UseRecoveryApiKey on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$UseRecoveryApiKey$useRecoveryApiKey - implements Fragment$basicMutationReturnFields { - Mutation$UseRecoveryApiKey$useRecoveryApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.token}); + implements + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + Mutation$UseRecoveryApiKey$useRecoveryApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token, + }); - @override factory Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( - Map json) => - _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$token = json['token']; + return Mutation$UseRecoveryApiKey$useRecoveryApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + token: (l$token as String?), + ); + } final int code; @@ -5344,43 +8664,75 @@ class Mutation$UseRecoveryApiKey$useRecoveryApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? token; - Map toJson() => - _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$token = token; + _resultData['token'] = l$token; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$token = token; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$token]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$token, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UseRecoveryApiKey$useRecoveryApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$token = token; final lOther$token = other.token; - if (l$token != lOther$token) return false; + if (l$token != lOther$token) { + return false; + } return true; } } @@ -5389,31 +8741,36 @@ extension UtilityExtension$Mutation$UseRecoveryApiKey$useRecoveryApiKey on Mutation$UseRecoveryApiKey$useRecoveryApiKey { CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey< Mutation$UseRecoveryApiKey$useRecoveryApiKey> - get copyWith => - CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey { factory CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey( - Mutation$UseRecoveryApiKey$useRecoveryApiKey instance, - TRes Function(Mutation$UseRecoveryApiKey$useRecoveryApiKey) then) = - _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; + Mutation$UseRecoveryApiKey$useRecoveryApiKey instance, + TRes Function(Mutation$UseRecoveryApiKey$useRecoveryApiKey) then, + ) = _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; factory CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }); } class _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey implements CopyWith$Mutation$UseRecoveryApiKey$useRecoveryApiKey { _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$UseRecoveryApiKey$useRecoveryApiKey _instance; @@ -5421,26 +8778,27 @@ class _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? token = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined, + }) => _then(Mutation$UseRecoveryApiKey$useRecoveryApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - token: token == _undefined ? _instance.token : (token as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?), + )); } class _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey @@ -5449,48 +8807,76 @@ class _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RefreshDeviceApiToken { - Mutation$RefreshDeviceApiToken( - {required this.refreshDeviceApiToken, required this.$__typename}); + Mutation$RefreshDeviceApiToken({ + required this.refreshDeviceApiToken, + required this.$__typename, + }); - @override - factory Mutation$RefreshDeviceApiToken.fromJson(Map json) => - _$Mutation$RefreshDeviceApiTokenFromJson(json); + factory Mutation$RefreshDeviceApiToken.fromJson(Map json) { + final l$refreshDeviceApiToken = json['refreshDeviceApiToken']; + final l$$__typename = json['__typename']; + return Mutation$RefreshDeviceApiToken( + refreshDeviceApiToken: + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( + (l$refreshDeviceApiToken as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RefreshDeviceApiToken$refreshDeviceApiToken refreshDeviceApiToken; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RefreshDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$refreshDeviceApiToken = refreshDeviceApiToken; + _resultData['refreshDeviceApiToken'] = l$refreshDeviceApiToken.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$refreshDeviceApiToken = refreshDeviceApiToken; final l$$__typename = $__typename; - return Object.hashAll([l$refreshDeviceApiToken, l$$__typename]); + return Object.hashAll([ + l$refreshDeviceApiToken, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RefreshDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$refreshDeviceApiToken = refreshDeviceApiToken; final lOther$refreshDeviceApiToken = other.refreshDeviceApiToken; - if (l$refreshDeviceApiToken != lOther$refreshDeviceApiToken) return false; + if (l$refreshDeviceApiToken != lOther$refreshDeviceApiToken) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -5498,29 +8884,35 @@ class Mutation$RefreshDeviceApiToken { extension UtilityExtension$Mutation$RefreshDeviceApiToken on Mutation$RefreshDeviceApiToken { CopyWith$Mutation$RefreshDeviceApiToken - get copyWith => CopyWith$Mutation$RefreshDeviceApiToken(this, (i) => i); + get copyWith => CopyWith$Mutation$RefreshDeviceApiToken( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RefreshDeviceApiToken { factory CopyWith$Mutation$RefreshDeviceApiToken( - Mutation$RefreshDeviceApiToken instance, - TRes Function(Mutation$RefreshDeviceApiToken) then) = - _CopyWithImpl$Mutation$RefreshDeviceApiToken; + Mutation$RefreshDeviceApiToken instance, + TRes Function(Mutation$RefreshDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$RefreshDeviceApiToken; factory CopyWith$Mutation$RefreshDeviceApiToken.stub(TRes res) = _CopyWithStubImpl$Mutation$RefreshDeviceApiToken; - TRes call( - {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? - refreshDeviceApiToken, - String? $__typename}); + TRes call({ + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? refreshDeviceApiToken, + String? $__typename, + }); CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken get refreshDeviceApiToken; } class _CopyWithImpl$Mutation$RefreshDeviceApiToken implements CopyWith$Mutation$RefreshDeviceApiToken { - _CopyWithImpl$Mutation$RefreshDeviceApiToken(this._instance, this._then); + _CopyWithImpl$Mutation$RefreshDeviceApiToken( + this._instance, + this._then, + ); final Mutation$RefreshDeviceApiToken _instance; @@ -5528,18 +8920,20 @@ class _CopyWithImpl$Mutation$RefreshDeviceApiToken static const _undefined = {}; - TRes call( - {Object? refreshDeviceApiToken = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? refreshDeviceApiToken = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RefreshDeviceApiToken( - refreshDeviceApiToken: refreshDeviceApiToken == _undefined || - refreshDeviceApiToken == null - ? _instance.refreshDeviceApiToken - : (refreshDeviceApiToken - as Mutation$RefreshDeviceApiToken$refreshDeviceApiToken), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + refreshDeviceApiToken: + refreshDeviceApiToken == _undefined || refreshDeviceApiToken == null + ? _instance.refreshDeviceApiToken + : (refreshDeviceApiToken + as Mutation$RefreshDeviceApiToken$refreshDeviceApiToken), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken get refreshDeviceApiToken { final local$refreshDeviceApiToken = _instance.refreshDeviceApiToken; @@ -5554,10 +8948,10 @@ class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken TRes _res; - call( - {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? - refreshDeviceApiToken, - String? $__typename}) => + call({ + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? refreshDeviceApiToken, + String? $__typename, + }) => _res; CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken get refreshDeviceApiToken => @@ -5567,79 +8961,90 @@ class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken const documentNodeMutationRefreshDeviceApiToken = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RefreshDeviceApiToken'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'refreshDeviceApiToken'), + type: OperationType.mutation, + name: NameNode(value: 'RefreshDeviceApiToken'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'refreshDeviceApiToken'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'token'), alias: null, arguments: [], directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'token'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RefreshDeviceApiToken _parserFn$Mutation$RefreshDeviceApiToken( Map data) => Mutation$RefreshDeviceApiToken.fromJson(data); typedef OnMutationCompleted$Mutation$RefreshDeviceApiToken = FutureOr - Function(dynamic, Mutation$RefreshDeviceApiToken?); + Function( + dynamic, + Mutation$RefreshDeviceApiToken?, +); class Options$Mutation$RefreshDeviceApiToken extends graphql.MutationOptions { - Options$Mutation$RefreshDeviceApiToken( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RefreshDeviceApiToken({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RefreshDeviceApiToken(data)), - update: update, - onError: onError, - document: documentNodeMutationRefreshDeviceApiToken, - parserFn: _parserFn$Mutation$RefreshDeviceApiToken); + : _parserFn$Mutation$RefreshDeviceApiToken(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRefreshDeviceApiToken, + parserFn: _parserFn$Mutation$RefreshDeviceApiToken, + ); final OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompletedWithParsed; @@ -5649,36 +9054,37 @@ class Options$Mutation$RefreshDeviceApiToken ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RefreshDeviceApiToken extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RefreshDeviceApiToken( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRefreshDeviceApiToken, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RefreshDeviceApiToken); + WatchOptions$Mutation$RefreshDeviceApiToken({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRefreshDeviceApiToken, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RefreshDeviceApiToken, + ); } extension ClientExtension$Mutation$RefreshDeviceApiToken @@ -5695,20 +9101,32 @@ extension ClientExtension$Mutation$RefreshDeviceApiToken options ?? WatchOptions$Mutation$RefreshDeviceApiToken()); } -@JsonSerializable(explicitToJson: true) class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken - implements Fragment$basicMutationReturnFields { - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.token}); + implements + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token, + }); - @override factory Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( - Map json) => - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$token = json['token']; + return Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + token: (l$token as String?), + ); + } final int code; @@ -5716,43 +9134,75 @@ class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? token; - Map toJson() => - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$token = token; + _resultData['token'] = l$token; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$token = token; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$token]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$token, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$token = token; final lOther$token = other.token; - if (l$token != lOther$token) return false; + if (l$token != lOther$token) { + return false; + } return true; } } @@ -5763,34 +9213,38 @@ extension UtilityExtension$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken Mutation$RefreshDeviceApiToken$refreshDeviceApiToken> get copyWith => CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< TRes> { factory CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance, - TRes Function(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) - then) = - _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance, + TRes Function(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; factory CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.stub( TRes res) = _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }); } class _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken implements CopyWith$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken { _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RefreshDeviceApiToken$refreshDeviceApiToken _instance; @@ -5799,26 +9253,27 @@ class _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? token = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined, + }) => _then(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - token: token == _undefined ? _instance.token : (token as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?), + )); } class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< @@ -5830,55 +9285,77 @@ class _CopyWithStubImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken< TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$DeleteDeviceApiToken { - Variables$Mutation$DeleteDeviceApiToken({required this.device}); + factory Variables$Mutation$DeleteDeviceApiToken({required String device}) => + Variables$Mutation$DeleteDeviceApiToken._({ + r'device': device, + }); + + Variables$Mutation$DeleteDeviceApiToken._(this._$data); - @override factory Variables$Mutation$DeleteDeviceApiToken.fromJson( - Map json) => - _$Variables$Mutation$DeleteDeviceApiTokenFromJson(json); - - final String device; - - Map toJson() => - _$Variables$Mutation$DeleteDeviceApiTokenToJson(this); - int get hashCode { - final l$device = device; - return Object.hashAll([l$device]); + Map data) { + final result$data = {}; + final l$device = data['device']; + result$data['device'] = (l$device as String); + return Variables$Mutation$DeleteDeviceApiToken._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DeleteDeviceApiToken) || - runtimeType != other.runtimeType) return false; + Map _$data; + + String get device => (_$data['device'] as String); + Map toJson() { + final result$data = {}; final l$device = device; - final lOther$device = other.device; - if (l$device != lOther$device) return false; - return true; + result$data['device'] = l$device; + return result$data; } CopyWith$Variables$Mutation$DeleteDeviceApiToken< Variables$Mutation$DeleteDeviceApiToken> - get copyWith => - CopyWith$Variables$Mutation$DeleteDeviceApiToken(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$DeleteDeviceApiToken( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$DeleteDeviceApiToken) || + runtimeType != other.runtimeType) { + return false; + } + final l$device = device; + final lOther$device = other.device; + if (l$device != lOther$device) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$device = device; + return Object.hashAll([l$device]); + } } abstract class CopyWith$Variables$Mutation$DeleteDeviceApiToken { factory CopyWith$Variables$Mutation$DeleteDeviceApiToken( - Variables$Mutation$DeleteDeviceApiToken instance, - TRes Function(Variables$Mutation$DeleteDeviceApiToken) then) = - _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken; + Variables$Mutation$DeleteDeviceApiToken instance, + TRes Function(Variables$Mutation$DeleteDeviceApiToken) then, + ) = _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken; factory CopyWith$Variables$Mutation$DeleteDeviceApiToken.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken; @@ -5889,7 +9366,9 @@ abstract class CopyWith$Variables$Mutation$DeleteDeviceApiToken { class _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken implements CopyWith$Variables$Mutation$DeleteDeviceApiToken { _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$DeleteDeviceApiToken _instance; @@ -5898,10 +9377,11 @@ class _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken static const _undefined = {}; TRes call({Object? device = _undefined}) => - _then(Variables$Mutation$DeleteDeviceApiToken( - device: device == _undefined || device == null - ? _instance.device - : (device as String))); + _then(Variables$Mutation$DeleteDeviceApiToken._({ + ..._instance._$data, + if (device != _undefined && device != null) + 'device': (device as String), + })); } class _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken @@ -5913,38 +9393,65 @@ class _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken call({String? device}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteDeviceApiToken { - Mutation$DeleteDeviceApiToken( - {required this.deleteDeviceApiToken, required this.$__typename}); + Mutation$DeleteDeviceApiToken({ + required this.deleteDeviceApiToken, + required this.$__typename, + }); - @override - factory Mutation$DeleteDeviceApiToken.fromJson(Map json) => - _$Mutation$DeleteDeviceApiTokenFromJson(json); + factory Mutation$DeleteDeviceApiToken.fromJson(Map json) { + final l$deleteDeviceApiToken = json['deleteDeviceApiToken']; + final l$$__typename = json['__typename']; + return Mutation$DeleteDeviceApiToken( + deleteDeviceApiToken: + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( + (l$deleteDeviceApiToken as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$DeleteDeviceApiToken$deleteDeviceApiToken deleteDeviceApiToken; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DeleteDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$deleteDeviceApiToken = deleteDeviceApiToken; + _resultData['deleteDeviceApiToken'] = l$deleteDeviceApiToken.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$deleteDeviceApiToken = deleteDeviceApiToken; final l$$__typename = $__typename; - return Object.hashAll([l$deleteDeviceApiToken, l$$__typename]); + return Object.hashAll([ + l$deleteDeviceApiToken, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DeleteDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$deleteDeviceApiToken = deleteDeviceApiToken; final lOther$deleteDeviceApiToken = other.deleteDeviceApiToken; - if (l$deleteDeviceApiToken != lOther$deleteDeviceApiToken) return false; + if (l$deleteDeviceApiToken != lOther$deleteDeviceApiToken) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -5952,28 +9459,35 @@ class Mutation$DeleteDeviceApiToken { extension UtilityExtension$Mutation$DeleteDeviceApiToken on Mutation$DeleteDeviceApiToken { CopyWith$Mutation$DeleteDeviceApiToken - get copyWith => CopyWith$Mutation$DeleteDeviceApiToken(this, (i) => i); + get copyWith => CopyWith$Mutation$DeleteDeviceApiToken( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteDeviceApiToken { factory CopyWith$Mutation$DeleteDeviceApiToken( - Mutation$DeleteDeviceApiToken instance, - TRes Function(Mutation$DeleteDeviceApiToken) then) = - _CopyWithImpl$Mutation$DeleteDeviceApiToken; + Mutation$DeleteDeviceApiToken instance, + TRes Function(Mutation$DeleteDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$DeleteDeviceApiToken; factory CopyWith$Mutation$DeleteDeviceApiToken.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteDeviceApiToken; - TRes call( - {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, - String? $__typename}); + TRes call({ + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, + String? $__typename, + }); CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken get deleteDeviceApiToken; } class _CopyWithImpl$Mutation$DeleteDeviceApiToken implements CopyWith$Mutation$DeleteDeviceApiToken { - _CopyWithImpl$Mutation$DeleteDeviceApiToken(this._instance, this._then); + _CopyWithImpl$Mutation$DeleteDeviceApiToken( + this._instance, + this._then, + ); final Mutation$DeleteDeviceApiToken _instance; @@ -5981,18 +9495,20 @@ class _CopyWithImpl$Mutation$DeleteDeviceApiToken static const _undefined = {}; - TRes call( - {Object? deleteDeviceApiToken = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? deleteDeviceApiToken = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteDeviceApiToken( - deleteDeviceApiToken: - deleteDeviceApiToken == _undefined || deleteDeviceApiToken == null - ? _instance.deleteDeviceApiToken - : (deleteDeviceApiToken - as Mutation$DeleteDeviceApiToken$deleteDeviceApiToken), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + deleteDeviceApiToken: + deleteDeviceApiToken == _undefined || deleteDeviceApiToken == null + ? _instance.deleteDeviceApiToken + : (deleteDeviceApiToken + as Mutation$DeleteDeviceApiToken$deleteDeviceApiToken), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken get deleteDeviceApiToken { final local$deleteDeviceApiToken = _instance.deleteDeviceApiToken; @@ -6007,10 +9523,10 @@ class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken TRes _res; - call( - {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? - deleteDeviceApiToken, - String? $__typename}) => + call({ + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? deleteDeviceApiToken, + String? $__typename, + }) => _res; CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken get deleteDeviceApiToken => @@ -6020,86 +9536,100 @@ class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken const documentNodeMutationDeleteDeviceApiToken = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'DeleteDeviceApiToken'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'device')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'deleteDeviceApiToken'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'device'), - value: VariableNode(name: NameNode(value: 'device'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'DeleteDeviceApiToken'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'device')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteDeviceApiToken'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'device'), + value: VariableNode(name: NameNode(value: 'device')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$DeleteDeviceApiToken _parserFn$Mutation$DeleteDeviceApiToken( Map data) => Mutation$DeleteDeviceApiToken.fromJson(data); typedef OnMutationCompleted$Mutation$DeleteDeviceApiToken = FutureOr - Function(dynamic, Mutation$DeleteDeviceApiToken?); + Function( + dynamic, + Mutation$DeleteDeviceApiToken?, +); class Options$Mutation$DeleteDeviceApiToken extends graphql.MutationOptions { - Options$Mutation$DeleteDeviceApiToken( - {String? operationName, - required Variables$Mutation$DeleteDeviceApiToken variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$DeleteDeviceApiToken({ + String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$DeleteDeviceApiToken(data)), - update: update, - onError: onError, - document: documentNodeMutationDeleteDeviceApiToken, - parserFn: _parserFn$Mutation$DeleteDeviceApiToken); + : _parserFn$Mutation$DeleteDeviceApiToken(data), + ), + update: update, + onError: onError, + document: documentNodeMutationDeleteDeviceApiToken, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken, + ); final OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompletedWithParsed; @@ -6109,38 +9639,39 @@ class Options$Mutation$DeleteDeviceApiToken ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$DeleteDeviceApiToken extends graphql.WatchQueryOptions { - WatchOptions$Mutation$DeleteDeviceApiToken( - {String? operationName, - required Variables$Mutation$DeleteDeviceApiToken variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationDeleteDeviceApiToken, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$DeleteDeviceApiToken); + WatchOptions$Mutation$DeleteDeviceApiToken({ + String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteDeviceApiToken, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken, + ); } extension ClientExtension$Mutation$DeleteDeviceApiToken @@ -6155,19 +9686,28 @@ extension ClientExtension$Mutation$DeleteDeviceApiToken this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken - implements Fragment$basicMutationReturnFields { - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( - Map json) => - _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -6175,36 +9715,64 @@ class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -6215,29 +9783,37 @@ extension UtilityExtension$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken Mutation$DeleteDeviceApiToken$deleteDeviceApiToken> get copyWith => CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken< TRes> { factory CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance, - TRes Function(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) - then) = - _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance, + TRes Function(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) then, + ) = _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; factory CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.stub( TRes res) = _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken implements CopyWith$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken { _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$DeleteDeviceApiToken$deleteDeviceApiToken _instance; @@ -6245,24 +9821,25 @@ class _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken @@ -6273,42 +9850,74 @@ class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewDeviceApiKey { - Mutation$GetNewDeviceApiKey( - {required this.getNewDeviceApiKey, required this.$__typename}); + Mutation$GetNewDeviceApiKey({ + required this.getNewDeviceApiKey, + required this.$__typename, + }); - @override - factory Mutation$GetNewDeviceApiKey.fromJson(Map json) => - _$Mutation$GetNewDeviceApiKeyFromJson(json); + factory Mutation$GetNewDeviceApiKey.fromJson(Map json) { + final l$getNewDeviceApiKey = json['getNewDeviceApiKey']; + final l$$__typename = json['__typename']; + return Mutation$GetNewDeviceApiKey( + getNewDeviceApiKey: + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( + (l$getNewDeviceApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$GetNewDeviceApiKey$getNewDeviceApiKey getNewDeviceApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$GetNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$getNewDeviceApiKey = getNewDeviceApiKey; + _resultData['getNewDeviceApiKey'] = l$getNewDeviceApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getNewDeviceApiKey = getNewDeviceApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$getNewDeviceApiKey, l$$__typename]); + return Object.hashAll([ + l$getNewDeviceApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$getNewDeviceApiKey = getNewDeviceApiKey; final lOther$getNewDeviceApiKey = other.getNewDeviceApiKey; - if (l$getNewDeviceApiKey != lOther$getNewDeviceApiKey) return false; + if (l$getNewDeviceApiKey != lOther$getNewDeviceApiKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -6316,28 +9925,35 @@ class Mutation$GetNewDeviceApiKey { extension UtilityExtension$Mutation$GetNewDeviceApiKey on Mutation$GetNewDeviceApiKey { CopyWith$Mutation$GetNewDeviceApiKey - get copyWith => CopyWith$Mutation$GetNewDeviceApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$GetNewDeviceApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewDeviceApiKey { factory CopyWith$Mutation$GetNewDeviceApiKey( - Mutation$GetNewDeviceApiKey instance, - TRes Function(Mutation$GetNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$GetNewDeviceApiKey; + Mutation$GetNewDeviceApiKey instance, + TRes Function(Mutation$GetNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewDeviceApiKey; factory CopyWith$Mutation$GetNewDeviceApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$GetNewDeviceApiKey; - TRes call( - {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, - String? $__typename}); + TRes call({ + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, + String? $__typename, + }); CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey get getNewDeviceApiKey; } class _CopyWithImpl$Mutation$GetNewDeviceApiKey implements CopyWith$Mutation$GetNewDeviceApiKey { - _CopyWithImpl$Mutation$GetNewDeviceApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$GetNewDeviceApiKey( + this._instance, + this._then, + ); final Mutation$GetNewDeviceApiKey _instance; @@ -6345,18 +9961,20 @@ class _CopyWithImpl$Mutation$GetNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? getNewDeviceApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? getNewDeviceApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$GetNewDeviceApiKey( - getNewDeviceApiKey: - getNewDeviceApiKey == _undefined || getNewDeviceApiKey == null - ? _instance.getNewDeviceApiKey - : (getNewDeviceApiKey - as Mutation$GetNewDeviceApiKey$getNewDeviceApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getNewDeviceApiKey: + getNewDeviceApiKey == _undefined || getNewDeviceApiKey == null + ? _instance.getNewDeviceApiKey + : (getNewDeviceApiKey + as Mutation$GetNewDeviceApiKey$getNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey get getNewDeviceApiKey { final local$getNewDeviceApiKey = _instance.getNewDeviceApiKey; @@ -6371,9 +9989,10 @@ class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey TRes _res; - call( - {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, - String? $__typename}) => + call({ + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey get getNewDeviceApiKey => @@ -6382,79 +10001,90 @@ class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey const documentNodeMutationGetNewDeviceApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'GetNewDeviceApiKey'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'getNewDeviceApiKey'), + type: OperationType.mutation, + name: NameNode(value: 'GetNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'key'), alias: null, arguments: [], directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'key'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$GetNewDeviceApiKey _parserFn$Mutation$GetNewDeviceApiKey( Map data) => Mutation$GetNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$GetNewDeviceApiKey = FutureOr - Function(dynamic, Mutation$GetNewDeviceApiKey?); + Function( + dynamic, + Mutation$GetNewDeviceApiKey?, +); class Options$Mutation$GetNewDeviceApiKey extends graphql.MutationOptions { - Options$Mutation$GetNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$GetNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$GetNewDeviceApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationGetNewDeviceApiKey, - parserFn: _parserFn$Mutation$GetNewDeviceApiKey); + : _parserFn$Mutation$GetNewDeviceApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationGetNewDeviceApiKey, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey, + ); final OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompletedWithParsed; @@ -6463,36 +10093,37 @@ class Options$Mutation$GetNewDeviceApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$GetNewDeviceApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$GetNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationGetNewDeviceApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$GetNewDeviceApiKey); + WatchOptions$Mutation$GetNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey, + ); } extension ClientExtension$Mutation$GetNewDeviceApiKey on graphql.GraphQLClient { @@ -6506,20 +10137,31 @@ extension ClientExtension$Mutation$GetNewDeviceApiKey on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$GetNewDeviceApiKey()); } -@JsonSerializable(explicitToJson: true) class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey - implements Fragment$basicMutationReturnFields { - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.key}); + implements Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key, + }); - @override factory Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$key = json['key']; + return Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + key: (l$key as String?), + ); + } final int code; @@ -6527,42 +10169,75 @@ class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? key; - Map toJson() => - _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$key = key; + _resultData['key'] = l$key; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$key = key; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$key, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$key = key; final lOther$key = other.key; - if (l$key != lOther$key) return false; + if (l$key != lOther$key) { + return false; + } return true; } } @@ -6572,31 +10247,36 @@ extension UtilityExtension$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey< Mutation$GetNewDeviceApiKey$getNewDeviceApiKey> get copyWith => CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { factory CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance, - TRes Function(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance, + TRes Function(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; factory CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }); } class _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey implements CopyWith$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$GetNewDeviceApiKey$getNewDeviceApiKey _instance; @@ -6604,26 +10284,27 @@ class _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? key = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? key = _undefined, + }) => _then(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - key: key == _undefined ? _instance.key : (key as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + key: key == _undefined ? _instance.key : (key as String?), + )); } class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey @@ -6632,51 +10313,78 @@ class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? key}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? key, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$InvalidateNewDeviceApiKey { - Mutation$InvalidateNewDeviceApiKey( - {required this.invalidateNewDeviceApiKey, required this.$__typename}); + Mutation$InvalidateNewDeviceApiKey({ + required this.invalidateNewDeviceApiKey, + required this.$__typename, + }); - @override factory Mutation$InvalidateNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$InvalidateNewDeviceApiKeyFromJson(json); + Map json) { + final l$invalidateNewDeviceApiKey = json['invalidateNewDeviceApiKey']; + final l$$__typename = json['__typename']; + return Mutation$InvalidateNewDeviceApiKey( + invalidateNewDeviceApiKey: + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( + (l$invalidateNewDeviceApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey invalidateNewDeviceApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$InvalidateNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; + _resultData['invalidateNewDeviceApiKey'] = + l$invalidateNewDeviceApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$invalidateNewDeviceApiKey, l$$__typename]); + return Object.hashAll([ + l$invalidateNewDeviceApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$InvalidateNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; final lOther$invalidateNewDeviceApiKey = other.invalidateNewDeviceApiKey; - if (l$invalidateNewDeviceApiKey != lOther$invalidateNewDeviceApiKey) + if (l$invalidateNewDeviceApiKey != lOther$invalidateNewDeviceApiKey) { return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -6685,30 +10393,36 @@ extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey on Mutation$InvalidateNewDeviceApiKey { CopyWith$Mutation$InvalidateNewDeviceApiKey< Mutation$InvalidateNewDeviceApiKey> - get copyWith => - CopyWith$Mutation$InvalidateNewDeviceApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$InvalidateNewDeviceApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$InvalidateNewDeviceApiKey { factory CopyWith$Mutation$InvalidateNewDeviceApiKey( - Mutation$InvalidateNewDeviceApiKey instance, - TRes Function(Mutation$InvalidateNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey; + Mutation$InvalidateNewDeviceApiKey instance, + TRes Function(Mutation$InvalidateNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey; factory CopyWith$Mutation$InvalidateNewDeviceApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey; - TRes call( - {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? - invalidateNewDeviceApiKey, - String? $__typename}); + TRes call({ + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? + invalidateNewDeviceApiKey, + String? $__typename, + }); CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey get invalidateNewDeviceApiKey; } class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey implements CopyWith$Mutation$InvalidateNewDeviceApiKey { - _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey(this._instance, this._then); + _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey( + this._instance, + this._then, + ); final Mutation$InvalidateNewDeviceApiKey _instance; @@ -6716,18 +10430,20 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? invalidateNewDeviceApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? invalidateNewDeviceApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$InvalidateNewDeviceApiKey( - invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == _undefined || - invalidateNewDeviceApiKey == null - ? _instance.invalidateNewDeviceApiKey - : (invalidateNewDeviceApiKey - as Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == _undefined || + invalidateNewDeviceApiKey == null + ? _instance.invalidateNewDeviceApiKey + : (invalidateNewDeviceApiKey + as Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey get invalidateNewDeviceApiKey { final local$invalidateNewDeviceApiKey = _instance.invalidateNewDeviceApiKey; @@ -6743,10 +10459,11 @@ class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey TRes _res; - call( - {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? - invalidateNewDeviceApiKey, - String? $__typename}) => + call({ + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? + invalidateNewDeviceApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey get invalidateNewDeviceApiKey => @@ -6757,73 +10474,83 @@ class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey const documentNodeMutationInvalidateNewDeviceApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'InvalidateNewDeviceApiKey'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'invalidateNewDeviceApiKey'), - alias: null, - arguments: [], + type: OperationType.mutation, + name: NameNode(value: 'InvalidateNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'invalidateNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$InvalidateNewDeviceApiKey _parserFn$Mutation$InvalidateNewDeviceApiKey( Map data) => Mutation$InvalidateNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey = FutureOr - Function(dynamic, Mutation$InvalidateNewDeviceApiKey?); + Function( + dynamic, + Mutation$InvalidateNewDeviceApiKey?, +); class Options$Mutation$InvalidateNewDeviceApiKey extends graphql.MutationOptions { - Options$Mutation$InvalidateNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$InvalidateNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$InvalidateNewDeviceApiKey(data)), - update: update, - onError: onError, - document: documentNodeMutationInvalidateNewDeviceApiKey, - parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); + : _parserFn$Mutation$InvalidateNewDeviceApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationInvalidateNewDeviceApiKey, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey, + ); final OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompletedWithParsed; @@ -6833,36 +10560,37 @@ class Options$Mutation$InvalidateNewDeviceApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$InvalidateNewDeviceApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$InvalidateNewDeviceApiKey( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationInvalidateNewDeviceApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); + WatchOptions$Mutation$InvalidateNewDeviceApiKey({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationInvalidateNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey, + ); } extension ClientExtension$Mutation$InvalidateNewDeviceApiKey @@ -6879,20 +10607,28 @@ extension ClientExtension$Mutation$InvalidateNewDeviceApiKey options ?? WatchOptions$Mutation$InvalidateNewDeviceApiKey()); } -@JsonSerializable(explicitToJson: true) class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey - implements Fragment$basicMutationReturnFields { - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( - json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -6900,38 +10636,65 @@ class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( - this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -6942,23 +10705,29 @@ extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey$invalidateNewDevic Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey> get copyWith => CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< TRes> { factory CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey instance, - TRes Function( - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) - then) = - _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey instance, + TRes Function(Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) + then, + ) = _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; factory CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< @@ -6967,7 +10736,9 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey CopyWith$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< TRes> { _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey _instance; @@ -6976,24 +10747,25 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey< @@ -7006,50 +10778,79 @@ class _CopyWithStubImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceAp TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$AuthorizeWithNewDeviceApiKey { - Variables$Mutation$AuthorizeWithNewDeviceApiKey({required this.input}); + factory Variables$Mutation$AuthorizeWithNewDeviceApiKey( + {required Input$UseNewDeviceKeyInput input}) => + Variables$Mutation$AuthorizeWithNewDeviceApiKey._({ + r'input': input, + }); + + Variables$Mutation$AuthorizeWithNewDeviceApiKey._(this._$data); - @override factory Variables$Mutation$AuthorizeWithNewDeviceApiKey.fromJson( - Map json) => - _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); - - final Input$UseNewDeviceKeyInput input; - - Map toJson() => - _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); - int get hashCode { - final l$input = input; - return Object.hashAll([l$input]); + Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$UseNewDeviceKeyInput.fromJson((l$input as Map)); + return Variables$Mutation$AuthorizeWithNewDeviceApiKey._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AuthorizeWithNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + Map _$data; + + Input$UseNewDeviceKeyInput get input => + (_$data['input'] as Input$UseNewDeviceKeyInput); + Map toJson() { + final result$data = {}; final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; + result$data['input'] = l$input.toJson(); + return result$data; } CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey< Variables$Mutation$AuthorizeWithNewDeviceApiKey> get copyWith => CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$AuthorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } } abstract class CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { factory CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey( - Variables$Mutation$AuthorizeWithNewDeviceApiKey instance, - TRes Function(Variables$Mutation$AuthorizeWithNewDeviceApiKey) then) = - _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey; + Variables$Mutation$AuthorizeWithNewDeviceApiKey instance, + TRes Function(Variables$Mutation$AuthorizeWithNewDeviceApiKey) then, + ) = _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey; factory CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey.stub( TRes res) = @@ -7061,7 +10862,9 @@ abstract class CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { class _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey implements CopyWith$Variables$Mutation$AuthorizeWithNewDeviceApiKey { _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$AuthorizeWithNewDeviceApiKey _instance; @@ -7070,10 +10873,11 @@ class _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$AuthorizeWithNewDeviceApiKey( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$UseNewDeviceKeyInput))); + _then(Variables$Mutation$AuthorizeWithNewDeviceApiKey._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$UseNewDeviceKeyInput), + })); } class _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey @@ -7085,43 +10889,70 @@ class _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey call({Input$UseNewDeviceKeyInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$AuthorizeWithNewDeviceApiKey { - Mutation$AuthorizeWithNewDeviceApiKey( - {required this.authorizeWithNewDeviceApiKey, required this.$__typename}); + Mutation$AuthorizeWithNewDeviceApiKey({ + required this.authorizeWithNewDeviceApiKey, + required this.$__typename, + }); - @override factory Mutation$AuthorizeWithNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); + Map json) { + final l$authorizeWithNewDeviceApiKey = json['authorizeWithNewDeviceApiKey']; + final l$$__typename = json['__typename']; + return Mutation$AuthorizeWithNewDeviceApiKey( + authorizeWithNewDeviceApiKey: + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + .fromJson( + (l$authorizeWithNewDeviceApiKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey authorizeWithNewDeviceApiKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; + _resultData['authorizeWithNewDeviceApiKey'] = + l$authorizeWithNewDeviceApiKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; final l$$__typename = $__typename; - return Object.hashAll([l$authorizeWithNewDeviceApiKey, l$$__typename]); + return Object.hashAll([ + l$authorizeWithNewDeviceApiKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$AuthorizeWithNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; final lOther$authorizeWithNewDeviceApiKey = other.authorizeWithNewDeviceApiKey; - if (l$authorizeWithNewDeviceApiKey != lOther$authorizeWithNewDeviceApiKey) + if (l$authorizeWithNewDeviceApiKey != lOther$authorizeWithNewDeviceApiKey) { return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -7130,23 +10961,26 @@ extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey on Mutation$AuthorizeWithNewDeviceApiKey { CopyWith$Mutation$AuthorizeWithNewDeviceApiKey< Mutation$AuthorizeWithNewDeviceApiKey> - get copyWith => - CopyWith$Mutation$AuthorizeWithNewDeviceApiKey(this, (i) => i); + get copyWith => CopyWith$Mutation$AuthorizeWithNewDeviceApiKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey( - Mutation$AuthorizeWithNewDeviceApiKey instance, - TRes Function(Mutation$AuthorizeWithNewDeviceApiKey) then) = - _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey; + Mutation$AuthorizeWithNewDeviceApiKey instance, + TRes Function(Mutation$AuthorizeWithNewDeviceApiKey) then, + ) = _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey; factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey; - TRes call( - {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? - authorizeWithNewDeviceApiKey, - String? $__typename}); + TRes call({ + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? + authorizeWithNewDeviceApiKey, + String? $__typename, + }); CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> get authorizeWithNewDeviceApiKey; } @@ -7154,7 +10988,9 @@ abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey implements CopyWith$Mutation$AuthorizeWithNewDeviceApiKey { _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$AuthorizeWithNewDeviceApiKey _instance; @@ -7162,19 +10998,21 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey static const _undefined = {}; - TRes call( - {Object? authorizeWithNewDeviceApiKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? authorizeWithNewDeviceApiKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$AuthorizeWithNewDeviceApiKey( - authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == - _undefined || - authorizeWithNewDeviceApiKey == null - ? _instance.authorizeWithNewDeviceApiKey - : (authorizeWithNewDeviceApiKey - as Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == + _undefined || + authorizeWithNewDeviceApiKey == null + ? _instance.authorizeWithNewDeviceApiKey + : (authorizeWithNewDeviceApiKey + as Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> get authorizeWithNewDeviceApiKey { final local$authorizeWithNewDeviceApiKey = @@ -7191,10 +11029,11 @@ class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey TRes _res; - call( - {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? - authorizeWithNewDeviceApiKey, - String? $__typename}) => + call({ + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? + authorizeWithNewDeviceApiKey, + String? $__typename, + }) => _res; CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> @@ -7206,51 +11045,61 @@ class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey const documentNodeMutationAuthorizeWithNewDeviceApiKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'AuthorizeWithNewDeviceApiKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'UseNewDeviceKeyInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'authorizeWithNewDeviceApiKey'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'AuthorizeWithNewDeviceApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseNewDeviceKeyInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'authorizeWithNewDeviceApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'token'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'token'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$AuthorizeWithNewDeviceApiKey @@ -7258,42 +11107,46 @@ Mutation$AuthorizeWithNewDeviceApiKey Map data) => Mutation$AuthorizeWithNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey - = FutureOr Function(dynamic, Mutation$AuthorizeWithNewDeviceApiKey?); + = FutureOr Function( + dynamic, + Mutation$AuthorizeWithNewDeviceApiKey?, +); class Options$Mutation$AuthorizeWithNewDeviceApiKey extends graphql.MutationOptions { - Options$Mutation$AuthorizeWithNewDeviceApiKey( - {String? operationName, - required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$AuthorizeWithNewDeviceApiKey({ + String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$AuthorizeWithNewDeviceApiKey( - data)), - update: update, - onError: onError, - document: documentNodeMutationAuthorizeWithNewDeviceApiKey, - parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); + : _parserFn$Mutation$AuthorizeWithNewDeviceApiKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey, + ); final OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompletedWithParsed; @@ -7303,38 +11156,39 @@ class Options$Mutation$AuthorizeWithNewDeviceApiKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey( - {String? operationName, - required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationAuthorizeWithNewDeviceApiKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); + WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey({ + String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey, + ); } extension ClientExtension$Mutation$AuthorizeWithNewDeviceApiKey @@ -7349,21 +11203,32 @@ extension ClientExtension$Mutation$AuthorizeWithNewDeviceApiKey this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - implements Fragment$basicMutationReturnFields { - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.token}); + implements + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token, + }); - @override factory Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey.fromJson( - Map json) => - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( - json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$token = json['token']; + return Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + token: (l$token as String?), + ); + } final int code; @@ -7371,45 +11236,76 @@ class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? token; - Map toJson() => - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( - this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$token = token; + _resultData['token'] = l$token; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$token = token; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$token]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$token, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$token = token; final lOther$token = other.token; - if (l$token != lOther$token) return false; + if (l$token != lOther$token) { + return false; + } return true; } } @@ -7420,29 +11316,31 @@ extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNe Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey> get copyWith => CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> { factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - instance, - TRes Function( - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) - then) = - _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey instance, + TRes Function( + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) + then, + ) = _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; factory CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey.stub( TRes res) = _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }); } class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< @@ -7451,7 +11349,9 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDevice CopyWith$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< TRes> { _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey _instance; @@ -7461,26 +11361,27 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDevice static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? token = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? token = _undefined, + }) => _then(Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - token: token == _undefined ? _instance.token : (token as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + token: token == _undefined ? _instance.token : (token as String?), + )); } class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey< @@ -7493,16 +11394,12 @@ class _CopyWithStubImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDe TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? token}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? token, + }) => _res; } - -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index a077cf7d..457de628 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,23 +1,69 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; -part 'server_settings.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -25,36 +71,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -63,25 +137,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -89,24 +173,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -115,43 +200,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -159,88 +255,1752 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$SystemSettings { - Query$SystemSettings({required this.system, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$SystemSettings.fromJson(Map json) => - _$Query$SystemSettingsFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$SystemSettings$system system; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemSettingsToJson(this); - int get hashCode { - final l$system = system; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$SystemSettings) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { return false; - final l$system = system; - final lOther$system = other.system; - if (l$system != lOther$system) return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$SystemSettings { + Query$SystemSettings({ + required this.system, + required this.$__typename, + }); + + factory Query$SystemSettings.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemSettings( + system: Query$SystemSettings$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$SystemSettings$system system; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([ + l$system, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemSettings) || runtimeType != other.runtimeType) { + return false; + } + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$SystemSettings on Query$SystemSettings { CopyWith$Query$SystemSettings get copyWith => - CopyWith$Query$SystemSettings(this, (i) => i); + CopyWith$Query$SystemSettings( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings { - factory CopyWith$Query$SystemSettings(Query$SystemSettings instance, - TRes Function(Query$SystemSettings) then) = - _CopyWithImpl$Query$SystemSettings; + factory CopyWith$Query$SystemSettings( + Query$SystemSettings instance, + TRes Function(Query$SystemSettings) then, + ) = _CopyWithImpl$Query$SystemSettings; factory CopyWith$Query$SystemSettings.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings; - TRes call({Query$SystemSettings$system? system, String? $__typename}); + TRes call({ + Query$SystemSettings$system? system, + String? $__typename, + }); CopyWith$Query$SystemSettings$system get system; } class _CopyWithImpl$Query$SystemSettings implements CopyWith$Query$SystemSettings { - _CopyWithImpl$Query$SystemSettings(this._instance, this._then); + _CopyWithImpl$Query$SystemSettings( + this._instance, + this._then, + ); final Query$SystemSettings _instance; @@ -248,14 +2008,18 @@ class _CopyWithImpl$Query$SystemSettings static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$SystemSettings$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemSettings$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemSettings$system get system { final local$system = _instance.system; return CopyWith$Query$SystemSettings$system( @@ -269,107 +2033,126 @@ class _CopyWithStubImpl$Query$SystemSettings TRes _res; - call({Query$SystemSettings$system? system, String? $__typename}) => _res; + call({ + Query$SystemSettings$system? system, + String? $__typename, + }) => + _res; CopyWith$Query$SystemSettings$system get system => CopyWith$Query$SystemSettings$system.stub(_res); } const documentNodeQuerySystemSettings = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'SystemSettings'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'SystemSettings'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'settings'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'settings'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'autoUpgrade'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'allowReboot'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'enable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'ssh'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'enable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'passwordAuthentication'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'timezone'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'autoUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'ssh'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'passwordAuthentication'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: 'timezone'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$SystemSettings _parserFn$Query$SystemSettings( Map data) => @@ -377,60 +2160,63 @@ Query$SystemSettings _parserFn$Query$SystemSettings( class Options$Query$SystemSettings extends graphql.QueryOptions { - Options$Query$SystemSettings( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQuerySystemSettings, - parserFn: _parserFn$Query$SystemSettings); + Options$Query$SystemSettings({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemSettings, + parserFn: _parserFn$Query$SystemSettings, + ); } class WatchOptions$Query$SystemSettings extends graphql.WatchQueryOptions { - WatchOptions$Query$SystemSettings( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQuerySystemSettings, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$SystemSettings); + WatchOptions$Query$SystemSettings({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemSettings, + ); } class FetchMoreOptions$Query$SystemSettings extends graphql.FetchMoreOptions { FetchMoreOptions$Query$SystemSettings( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQuerySystemSettings); + updateQuery: updateQuery, + document: documentNodeQuerySystemSettings, + ); } extension ClientExtension$Query$SystemSettings on graphql.GraphQLClient { @@ -440,56 +2226,86 @@ extension ClientExtension$Query$SystemSettings on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$SystemSettings( [WatchOptions$Query$SystemSettings? options]) => this.watchQuery(options ?? WatchOptions$Query$SystemSettings()); - void writeQuery$SystemSettings( - {required Query$SystemSettings data, bool broadcast = true}) => + void writeQuery$SystemSettings({ + required Query$SystemSettings data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQuerySystemSettings)), - data: data.toJson(), - broadcast: broadcast); - Query$SystemSettings? readQuery$SystemSettings({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQuerySystemSettings)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemSettings? readQuery$SystemSettings({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemSettings)), + optimistic: optimistic, + ); return result == null ? null : Query$SystemSettings.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system { - Query$SystemSettings$system( - {required this.settings, required this.$__typename}); + Query$SystemSettings$system({ + required this.settings, + required this.$__typename, + }); - @override - factory Query$SystemSettings$system.fromJson(Map json) => - _$Query$SystemSettings$systemFromJson(json); + factory Query$SystemSettings$system.fromJson(Map json) { + final l$settings = json['settings']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system( + settings: Query$SystemSettings$system$settings.fromJson( + (l$settings as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemSettings$system$settings settings; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemSettings$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$settings = settings; + _resultData['settings'] = l$settings.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$settings = settings; final l$$__typename = $__typename; - return Object.hashAll([l$settings, l$$__typename]); + return Object.hashAll([ + l$settings, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$settings = settings; final lOther$settings = other.settings; - if (l$settings != lOther$settings) return false; + if (l$settings != lOther$settings) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -497,26 +2313,34 @@ class Query$SystemSettings$system { extension UtilityExtension$Query$SystemSettings$system on Query$SystemSettings$system { CopyWith$Query$SystemSettings$system - get copyWith => CopyWith$Query$SystemSettings$system(this, (i) => i); + get copyWith => CopyWith$Query$SystemSettings$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system { factory CopyWith$Query$SystemSettings$system( - Query$SystemSettings$system instance, - TRes Function(Query$SystemSettings$system) then) = - _CopyWithImpl$Query$SystemSettings$system; + Query$SystemSettings$system instance, + TRes Function(Query$SystemSettings$system) then, + ) = _CopyWithImpl$Query$SystemSettings$system; factory CopyWith$Query$SystemSettings$system.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings$system; - TRes call( - {Query$SystemSettings$system$settings? settings, String? $__typename}); + TRes call({ + Query$SystemSettings$system$settings? settings, + String? $__typename, + }); CopyWith$Query$SystemSettings$system$settings get settings; } class _CopyWithImpl$Query$SystemSettings$system implements CopyWith$Query$SystemSettings$system { - _CopyWithImpl$Query$SystemSettings$system(this._instance, this._then); + _CopyWithImpl$Query$SystemSettings$system( + this._instance, + this._then, + ); final Query$SystemSettings$system _instance; @@ -524,15 +2348,18 @@ class _CopyWithImpl$Query$SystemSettings$system static const _undefined = {}; - TRes call( - {Object? settings = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? settings = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system( - settings: settings == _undefined || settings == null - ? _instance.settings - : (settings as Query$SystemSettings$system$settings), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + settings: settings == _undefined || settings == null + ? _instance.settings + : (settings as Query$SystemSettings$system$settings), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemSettings$system$settings get settings { final local$settings = _instance.settings; return CopyWith$Query$SystemSettings$system$settings( @@ -546,24 +2373,38 @@ class _CopyWithStubImpl$Query$SystemSettings$system TRes _res; - call({Query$SystemSettings$system$settings? settings, String? $__typename}) => + call({ + Query$SystemSettings$system$settings? settings, + String? $__typename, + }) => _res; CopyWith$Query$SystemSettings$system$settings get settings => CopyWith$Query$SystemSettings$system$settings.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system$settings { - Query$SystemSettings$system$settings( - {required this.autoUpgrade, - required this.ssh, - required this.timezone, - required this.$__typename}); + Query$SystemSettings$system$settings({ + required this.autoUpgrade, + required this.ssh, + required this.timezone, + required this.$__typename, + }); - @override factory Query$SystemSettings$system$settings.fromJson( - Map json) => - _$Query$SystemSettings$system$settingsFromJson(json); + Map json) { + final l$autoUpgrade = json['autoUpgrade']; + final l$ssh = json['ssh']; + final l$timezone = json['timezone']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system$settings( + autoUpgrade: Query$SystemSettings$system$settings$autoUpgrade.fromJson( + (l$autoUpgrade as Map)), + ssh: Query$SystemSettings$system$settings$ssh.fromJson( + (l$ssh as Map)), + timezone: (l$timezone as String), + $__typename: (l$$__typename as String), + ); + } final Query$SystemSettings$system$settings$autoUpgrade autoUpgrade; @@ -571,36 +2412,64 @@ class Query$SystemSettings$system$settings { final String timezone; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemSettings$system$settingsToJson(this); + Map toJson() { + final _resultData = {}; + final l$autoUpgrade = autoUpgrade; + _resultData['autoUpgrade'] = l$autoUpgrade.toJson(); + final l$ssh = ssh; + _resultData['ssh'] = l$ssh.toJson(); + final l$timezone = timezone; + _resultData['timezone'] = l$timezone; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$autoUpgrade = autoUpgrade; final l$ssh = ssh; final l$timezone = timezone; final l$$__typename = $__typename; - return Object.hashAll([l$autoUpgrade, l$ssh, l$timezone, l$$__typename]); + return Object.hashAll([ + l$autoUpgrade, + l$ssh, + l$timezone, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system$settings) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$autoUpgrade = autoUpgrade; final lOther$autoUpgrade = other.autoUpgrade; - if (l$autoUpgrade != lOther$autoUpgrade) return false; + if (l$autoUpgrade != lOther$autoUpgrade) { + return false; + } final l$ssh = ssh; final lOther$ssh = other.ssh; - if (l$ssh != lOther$ssh) return false; + if (l$ssh != lOther$ssh) { + return false; + } final l$timezone = timezone; final lOther$timezone = other.timezone; - if (l$timezone != lOther$timezone) return false; + if (l$timezone != lOther$timezone) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -609,24 +2478,27 @@ extension UtilityExtension$Query$SystemSettings$system$settings on Query$SystemSettings$system$settings { CopyWith$Query$SystemSettings$system$settings< Query$SystemSettings$system$settings> - get copyWith => - CopyWith$Query$SystemSettings$system$settings(this, (i) => i); + get copyWith => CopyWith$Query$SystemSettings$system$settings( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system$settings { factory CopyWith$Query$SystemSettings$system$settings( - Query$SystemSettings$system$settings instance, - TRes Function(Query$SystemSettings$system$settings) then) = - _CopyWithImpl$Query$SystemSettings$system$settings; + Query$SystemSettings$system$settings instance, + TRes Function(Query$SystemSettings$system$settings) then, + ) = _CopyWithImpl$Query$SystemSettings$system$settings; factory CopyWith$Query$SystemSettings$system$settings.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings$system$settings; - TRes call( - {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, - Query$SystemSettings$system$settings$ssh? ssh, - String? timezone, - String? $__typename}); + TRes call({ + Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, + Query$SystemSettings$system$settings$ssh? ssh, + String? timezone, + String? $__typename, + }); CopyWith$Query$SystemSettings$system$settings$autoUpgrade get autoUpgrade; CopyWith$Query$SystemSettings$system$settings$ssh get ssh; @@ -635,7 +2507,9 @@ abstract class CopyWith$Query$SystemSettings$system$settings { class _CopyWithImpl$Query$SystemSettings$system$settings implements CopyWith$Query$SystemSettings$system$settings { _CopyWithImpl$Query$SystemSettings$system$settings( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemSettings$system$settings _instance; @@ -643,25 +2517,26 @@ class _CopyWithImpl$Query$SystemSettings$system$settings static const _undefined = {}; - TRes call( - {Object? autoUpgrade = _undefined, - Object? ssh = _undefined, - Object? timezone = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? autoUpgrade = _undefined, + Object? ssh = _undefined, + Object? timezone = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system$settings( - autoUpgrade: autoUpgrade == _undefined || autoUpgrade == null - ? _instance.autoUpgrade - : (autoUpgrade - as Query$SystemSettings$system$settings$autoUpgrade), - ssh: ssh == _undefined || ssh == null - ? _instance.ssh - : (ssh as Query$SystemSettings$system$settings$ssh), - timezone: timezone == _undefined || timezone == null - ? _instance.timezone - : (timezone as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + autoUpgrade: autoUpgrade == _undefined || autoUpgrade == null + ? _instance.autoUpgrade + : (autoUpgrade as Query$SystemSettings$system$settings$autoUpgrade), + ssh: ssh == _undefined || ssh == null + ? _instance.ssh + : (ssh as Query$SystemSettings$system$settings$ssh), + timezone: timezone == _undefined || timezone == null + ? _instance.timezone + : (timezone as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemSettings$system$settings$autoUpgrade get autoUpgrade { final local$autoUpgrade = _instance.autoUpgrade; @@ -682,11 +2557,12 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings TRes _res; - call( - {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, - Query$SystemSettings$system$settings$ssh? ssh, - String? timezone, - String? $__typename}) => + call({ + Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, + Query$SystemSettings$system$settings$ssh? ssh, + String? timezone, + String? $__typename, + }) => _res; CopyWith$Query$SystemSettings$system$settings$autoUpgrade get autoUpgrade => @@ -695,48 +2571,78 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings CopyWith$Query$SystemSettings$system$settings$ssh.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system$settings$autoUpgrade { - Query$SystemSettings$system$settings$autoUpgrade( - {required this.allowReboot, - required this.enable, - required this.$__typename}); + Query$SystemSettings$system$settings$autoUpgrade({ + required this.allowReboot, + required this.enable, + required this.$__typename, + }); - @override factory Query$SystemSettings$system$settings$autoUpgrade.fromJson( - Map json) => - _$Query$SystemSettings$system$settings$autoUpgradeFromJson(json); + Map json) { + final l$allowReboot = json['allowReboot']; + final l$enable = json['enable']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system$settings$autoUpgrade( + allowReboot: (l$allowReboot as bool), + enable: (l$enable as bool), + $__typename: (l$$__typename as String), + ); + } final bool allowReboot; final bool enable; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemSettings$system$settings$autoUpgradeToJson(this); + Map toJson() { + final _resultData = {}; + final l$allowReboot = allowReboot; + _resultData['allowReboot'] = l$allowReboot; + final l$enable = enable; + _resultData['enable'] = l$enable; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$allowReboot = allowReboot; final l$enable = enable; final l$$__typename = $__typename; - return Object.hashAll([l$allowReboot, l$enable, l$$__typename]); + return Object.hashAll([ + l$allowReboot, + l$enable, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system$settings$autoUpgrade) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$allowReboot = allowReboot; final lOther$allowReboot = other.allowReboot; - if (l$allowReboot != lOther$allowReboot) return false; + if (l$allowReboot != lOther$allowReboot) { + return false; + } final l$enable = enable; final lOther$enable = other.enable; - if (l$enable != lOther$enable) return false; + if (l$enable != lOther$enable) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -746,27 +2652,34 @@ extension UtilityExtension$Query$SystemSettings$system$settings$autoUpgrade CopyWith$Query$SystemSettings$system$settings$autoUpgrade< Query$SystemSettings$system$settings$autoUpgrade> get copyWith => CopyWith$Query$SystemSettings$system$settings$autoUpgrade( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system$settings$autoUpgrade { factory CopyWith$Query$SystemSettings$system$settings$autoUpgrade( - Query$SystemSettings$system$settings$autoUpgrade instance, - TRes Function(Query$SystemSettings$system$settings$autoUpgrade) - then) = - _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade; + Query$SystemSettings$system$settings$autoUpgrade instance, + TRes Function(Query$SystemSettings$system$settings$autoUpgrade) then, + ) = _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade; factory CopyWith$Query$SystemSettings$system$settings$autoUpgrade.stub( TRes res) = _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade; - TRes call({bool? allowReboot, bool? enable, String? $__typename}); + TRes call({ + bool? allowReboot, + bool? enable, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade implements CopyWith$Query$SystemSettings$system$settings$autoUpgrade { _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemSettings$system$settings$autoUpgrade _instance; @@ -774,20 +2687,22 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade static const _undefined = {}; - TRes call( - {Object? allowReboot = _undefined, - Object? enable = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? allowReboot = _undefined, + Object? enable = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system$settings$autoUpgrade( - allowReboot: allowReboot == _undefined || allowReboot == null - ? _instance.allowReboot - : (allowReboot as bool), - enable: enable == _undefined || enable == null - ? _instance.enable - : (enable as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + allowReboot: allowReboot == _undefined || allowReboot == null + ? _instance.allowReboot + : (allowReboot as bool), + enable: enable == _undefined || enable == null + ? _instance.enable + : (enable as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade @@ -796,51 +2711,86 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$autoUpgrade TRes _res; - call({bool? allowReboot, bool? enable, String? $__typename}) => _res; + call({ + bool? allowReboot, + bool? enable, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$SystemSettings$system$settings$ssh { - Query$SystemSettings$system$settings$ssh( - {required this.enable, - required this.passwordAuthentication, - required this.$__typename}); + Query$SystemSettings$system$settings$ssh({ + required this.enable, + required this.passwordAuthentication, + required this.$__typename, + }); - @override factory Query$SystemSettings$system$settings$ssh.fromJson( - Map json) => - _$Query$SystemSettings$system$settings$sshFromJson(json); + Map json) { + final l$enable = json['enable']; + final l$passwordAuthentication = json['passwordAuthentication']; + final l$$__typename = json['__typename']; + return Query$SystemSettings$system$settings$ssh( + enable: (l$enable as bool), + passwordAuthentication: (l$passwordAuthentication as bool), + $__typename: (l$$__typename as String), + ); + } final bool enable; final bool passwordAuthentication; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemSettings$system$settings$sshToJson(this); + Map toJson() { + final _resultData = {}; + final l$enable = enable; + _resultData['enable'] = l$enable; + final l$passwordAuthentication = passwordAuthentication; + _resultData['passwordAuthentication'] = l$passwordAuthentication; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$enable = enable; final l$passwordAuthentication = passwordAuthentication; final l$$__typename = $__typename; - return Object.hashAll([l$enable, l$passwordAuthentication, l$$__typename]); + return Object.hashAll([ + l$enable, + l$passwordAuthentication, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemSettings$system$settings$ssh) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$enable = enable; final lOther$enable = other.enable; - if (l$enable != lOther$enable) return false; + if (l$enable != lOther$enable) { + return false; + } final l$passwordAuthentication = passwordAuthentication; final lOther$passwordAuthentication = other.passwordAuthentication; - if (l$passwordAuthentication != lOther$passwordAuthentication) return false; + if (l$passwordAuthentication != lOther$passwordAuthentication) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -849,26 +2799,34 @@ extension UtilityExtension$Query$SystemSettings$system$settings$ssh on Query$SystemSettings$system$settings$ssh { CopyWith$Query$SystemSettings$system$settings$ssh< Query$SystemSettings$system$settings$ssh> - get copyWith => - CopyWith$Query$SystemSettings$system$settings$ssh(this, (i) => i); + get copyWith => CopyWith$Query$SystemSettings$system$settings$ssh( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemSettings$system$settings$ssh { factory CopyWith$Query$SystemSettings$system$settings$ssh( - Query$SystemSettings$system$settings$ssh instance, - TRes Function(Query$SystemSettings$system$settings$ssh) then) = - _CopyWithImpl$Query$SystemSettings$system$settings$ssh; + Query$SystemSettings$system$settings$ssh instance, + TRes Function(Query$SystemSettings$system$settings$ssh) then, + ) = _CopyWithImpl$Query$SystemSettings$system$settings$ssh; factory CopyWith$Query$SystemSettings$system$settings$ssh.stub(TRes res) = _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh; - TRes call({bool? enable, bool? passwordAuthentication, String? $__typename}); + TRes call({ + bool? enable, + bool? passwordAuthentication, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemSettings$system$settings$ssh implements CopyWith$Query$SystemSettings$system$settings$ssh { _CopyWithImpl$Query$SystemSettings$system$settings$ssh( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemSettings$system$settings$ssh _instance; @@ -876,21 +2834,23 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$ssh static const _undefined = {}; - TRes call( - {Object? enable = _undefined, - Object? passwordAuthentication = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? enable = _undefined, + Object? passwordAuthentication = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemSettings$system$settings$ssh( - enable: enable == _undefined || enable == null - ? _instance.enable - : (enable as bool), - passwordAuthentication: passwordAuthentication == _undefined || - passwordAuthentication == null - ? _instance.passwordAuthentication - : (passwordAuthentication as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + enable: enable == _undefined || enable == null + ? _instance.enable + : (enable as bool), + passwordAuthentication: passwordAuthentication == _undefined || + passwordAuthentication == null + ? _instance.passwordAuthentication + : (passwordAuthentication as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh @@ -899,41 +2859,72 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh TRes _res; - call({bool? enable, bool? passwordAuthentication, String? $__typename}) => + call({ + bool? enable, + bool? passwordAuthentication, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Query$SystemIsUsingBinds { - Query$SystemIsUsingBinds({required this.system, required this.$__typename}); + Query$SystemIsUsingBinds({ + required this.system, + required this.$__typename, + }); - @override - factory Query$SystemIsUsingBinds.fromJson(Map json) => - _$Query$SystemIsUsingBindsFromJson(json); + factory Query$SystemIsUsingBinds.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemIsUsingBinds( + system: Query$SystemIsUsingBinds$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemIsUsingBinds$system system; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$SystemIsUsingBindsToJson(this); + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$system = system; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + return Object.hashAll([ + l$system, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemIsUsingBinds) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$system = system; final lOther$system = other.system; - if (l$system != lOther$system) return false; + if (l$system != lOther$system) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -941,24 +2932,34 @@ class Query$SystemIsUsingBinds { extension UtilityExtension$Query$SystemIsUsingBinds on Query$SystemIsUsingBinds { CopyWith$Query$SystemIsUsingBinds get copyWith => - CopyWith$Query$SystemIsUsingBinds(this, (i) => i); + CopyWith$Query$SystemIsUsingBinds( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemIsUsingBinds { - factory CopyWith$Query$SystemIsUsingBinds(Query$SystemIsUsingBinds instance, - TRes Function(Query$SystemIsUsingBinds) then) = - _CopyWithImpl$Query$SystemIsUsingBinds; + factory CopyWith$Query$SystemIsUsingBinds( + Query$SystemIsUsingBinds instance, + TRes Function(Query$SystemIsUsingBinds) then, + ) = _CopyWithImpl$Query$SystemIsUsingBinds; factory CopyWith$Query$SystemIsUsingBinds.stub(TRes res) = _CopyWithStubImpl$Query$SystemIsUsingBinds; - TRes call({Query$SystemIsUsingBinds$system? system, String? $__typename}); + TRes call({ + Query$SystemIsUsingBinds$system? system, + String? $__typename, + }); CopyWith$Query$SystemIsUsingBinds$system get system; } class _CopyWithImpl$Query$SystemIsUsingBinds implements CopyWith$Query$SystemIsUsingBinds { - _CopyWithImpl$Query$SystemIsUsingBinds(this._instance, this._then); + _CopyWithImpl$Query$SystemIsUsingBinds( + this._instance, + this._then, + ); final Query$SystemIsUsingBinds _instance; @@ -966,14 +2967,18 @@ class _CopyWithImpl$Query$SystemIsUsingBinds static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemIsUsingBinds( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$SystemIsUsingBinds$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemIsUsingBinds$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemIsUsingBinds$system get system { final local$system = _instance.system; return CopyWith$Query$SystemIsUsingBinds$system( @@ -987,57 +2992,68 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds TRes _res; - call({Query$SystemIsUsingBinds$system? system, String? $__typename}) => _res; + call({ + Query$SystemIsUsingBinds$system? system, + String? $__typename, + }) => + _res; CopyWith$Query$SystemIsUsingBinds$system get system => CopyWith$Query$SystemIsUsingBinds$system.stub(_res); } const documentNodeQuerySystemIsUsingBinds = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'SystemIsUsingBinds'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'SystemIsUsingBinds'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'info'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'info'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'usingBinds'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'usingBinds'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), ]); Query$SystemIsUsingBinds _parserFn$Query$SystemIsUsingBinds( Map data) => @@ -1045,52 +3061,54 @@ Query$SystemIsUsingBinds _parserFn$Query$SystemIsUsingBinds( class Options$Query$SystemIsUsingBinds extends graphql.QueryOptions { - Options$Query$SystemIsUsingBinds( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQuerySystemIsUsingBinds, - parserFn: _parserFn$Query$SystemIsUsingBinds); + Options$Query$SystemIsUsingBinds({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemIsUsingBinds, + parserFn: _parserFn$Query$SystemIsUsingBinds, + ); } class WatchOptions$Query$SystemIsUsingBinds extends graphql.WatchQueryOptions { - WatchOptions$Query$SystemIsUsingBinds( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQuerySystemIsUsingBinds, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$SystemIsUsingBinds); + WatchOptions$Query$SystemIsUsingBinds({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemIsUsingBinds, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemIsUsingBinds, + ); } class FetchMoreOptions$Query$SystemIsUsingBinds @@ -1098,8 +3116,9 @@ class FetchMoreOptions$Query$SystemIsUsingBinds FetchMoreOptions$Query$SystemIsUsingBinds( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQuerySystemIsUsingBinds); + updateQuery: updateQuery, + document: documentNodeQuerySystemIsUsingBinds, + ); } extension ClientExtension$Query$SystemIsUsingBinds on graphql.GraphQLClient { @@ -1111,58 +3130,87 @@ extension ClientExtension$Query$SystemIsUsingBinds on graphql.GraphQLClient { watchQuery$SystemIsUsingBinds( [WatchOptions$Query$SystemIsUsingBinds? options]) => this.watchQuery(options ?? WatchOptions$Query$SystemIsUsingBinds()); - void writeQuery$SystemIsUsingBinds( - {required Query$SystemIsUsingBinds data, bool broadcast = true}) => + void writeQuery$SystemIsUsingBinds({ + required Query$SystemIsUsingBinds data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQuerySystemIsUsingBinds)), - data: data.toJson(), - broadcast: broadcast); - Query$SystemIsUsingBinds? readQuery$SystemIsUsingBinds( - {bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation( document: documentNodeQuerySystemIsUsingBinds)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemIsUsingBinds? readQuery$SystemIsUsingBinds( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemIsUsingBinds)), + optimistic: optimistic, + ); return result == null ? null : Query$SystemIsUsingBinds.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$SystemIsUsingBinds$system { - Query$SystemIsUsingBinds$system( - {required this.info, required this.$__typename}); + Query$SystemIsUsingBinds$system({ + required this.info, + required this.$__typename, + }); - @override - factory Query$SystemIsUsingBinds$system.fromJson(Map json) => - _$Query$SystemIsUsingBinds$systemFromJson(json); + factory Query$SystemIsUsingBinds$system.fromJson(Map json) { + final l$info = json['info']; + final l$$__typename = json['__typename']; + return Query$SystemIsUsingBinds$system( + info: Query$SystemIsUsingBinds$system$info.fromJson( + (l$info as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$SystemIsUsingBinds$system$info info; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemIsUsingBinds$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$info = info; + _resultData['info'] = l$info.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$info = info; final l$$__typename = $__typename; - return Object.hashAll([l$info, l$$__typename]); + return Object.hashAll([ + l$info, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemIsUsingBinds$system) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$info = info; final lOther$info = other.info; - if (l$info != lOther$info) return false; + if (l$info != lOther$info) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1170,25 +3218,34 @@ class Query$SystemIsUsingBinds$system { extension UtilityExtension$Query$SystemIsUsingBinds$system on Query$SystemIsUsingBinds$system { CopyWith$Query$SystemIsUsingBinds$system - get copyWith => CopyWith$Query$SystemIsUsingBinds$system(this, (i) => i); + get copyWith => CopyWith$Query$SystemIsUsingBinds$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemIsUsingBinds$system { factory CopyWith$Query$SystemIsUsingBinds$system( - Query$SystemIsUsingBinds$system instance, - TRes Function(Query$SystemIsUsingBinds$system) then) = - _CopyWithImpl$Query$SystemIsUsingBinds$system; + Query$SystemIsUsingBinds$system instance, + TRes Function(Query$SystemIsUsingBinds$system) then, + ) = _CopyWithImpl$Query$SystemIsUsingBinds$system; factory CopyWith$Query$SystemIsUsingBinds$system.stub(TRes res) = _CopyWithStubImpl$Query$SystemIsUsingBinds$system; - TRes call({Query$SystemIsUsingBinds$system$info? info, String? $__typename}); + TRes call({ + Query$SystemIsUsingBinds$system$info? info, + String? $__typename, + }); CopyWith$Query$SystemIsUsingBinds$system$info get info; } class _CopyWithImpl$Query$SystemIsUsingBinds$system implements CopyWith$Query$SystemIsUsingBinds$system { - _CopyWithImpl$Query$SystemIsUsingBinds$system(this._instance, this._then); + _CopyWithImpl$Query$SystemIsUsingBinds$system( + this._instance, + this._then, + ); final Query$SystemIsUsingBinds$system _instance; @@ -1196,14 +3253,18 @@ class _CopyWithImpl$Query$SystemIsUsingBinds$system static const _undefined = {}; - TRes call({Object? info = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? info = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemIsUsingBinds$system( - info: info == _undefined || info == null - ? _instance.info - : (info as Query$SystemIsUsingBinds$system$info), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + info: info == _undefined || info == null + ? _instance.info + : (info as Query$SystemIsUsingBinds$system$info), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$SystemIsUsingBinds$system$info get info { final local$info = _instance.info; return CopyWith$Query$SystemIsUsingBinds$system$info( @@ -1217,46 +3278,73 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system TRes _res; - call({Query$SystemIsUsingBinds$system$info? info, String? $__typename}) => + call({ + Query$SystemIsUsingBinds$system$info? info, + String? $__typename, + }) => _res; CopyWith$Query$SystemIsUsingBinds$system$info get info => CopyWith$Query$SystemIsUsingBinds$system$info.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$SystemIsUsingBinds$system$info { - Query$SystemIsUsingBinds$system$info( - {required this.usingBinds, required this.$__typename}); + Query$SystemIsUsingBinds$system$info({ + required this.usingBinds, + required this.$__typename, + }); - @override factory Query$SystemIsUsingBinds$system$info.fromJson( - Map json) => - _$Query$SystemIsUsingBinds$system$infoFromJson(json); + Map json) { + final l$usingBinds = json['usingBinds']; + final l$$__typename = json['__typename']; + return Query$SystemIsUsingBinds$system$info( + usingBinds: (l$usingBinds as bool), + $__typename: (l$$__typename as String), + ); + } final bool usingBinds; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$SystemIsUsingBinds$system$infoToJson(this); + Map toJson() { + final _resultData = {}; + final l$usingBinds = usingBinds; + _resultData['usingBinds'] = l$usingBinds; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$usingBinds = usingBinds; final l$$__typename = $__typename; - return Object.hashAll([l$usingBinds, l$$__typename]); + return Object.hashAll([ + l$usingBinds, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$SystemIsUsingBinds$system$info) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$usingBinds = usingBinds; final lOther$usingBinds = other.usingBinds; - if (l$usingBinds != lOther$usingBinds) return false; + if (l$usingBinds != lOther$usingBinds) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1265,26 +3353,33 @@ extension UtilityExtension$Query$SystemIsUsingBinds$system$info on Query$SystemIsUsingBinds$system$info { CopyWith$Query$SystemIsUsingBinds$system$info< Query$SystemIsUsingBinds$system$info> - get copyWith => - CopyWith$Query$SystemIsUsingBinds$system$info(this, (i) => i); + get copyWith => CopyWith$Query$SystemIsUsingBinds$system$info( + this, + (i) => i, + ); } abstract class CopyWith$Query$SystemIsUsingBinds$system$info { factory CopyWith$Query$SystemIsUsingBinds$system$info( - Query$SystemIsUsingBinds$system$info instance, - TRes Function(Query$SystemIsUsingBinds$system$info) then) = - _CopyWithImpl$Query$SystemIsUsingBinds$system$info; + Query$SystemIsUsingBinds$system$info instance, + TRes Function(Query$SystemIsUsingBinds$system$info) then, + ) = _CopyWithImpl$Query$SystemIsUsingBinds$system$info; factory CopyWith$Query$SystemIsUsingBinds$system$info.stub(TRes res) = _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info; - TRes call({bool? usingBinds, String? $__typename}); + TRes call({ + bool? usingBinds, + String? $__typename, + }); } class _CopyWithImpl$Query$SystemIsUsingBinds$system$info implements CopyWith$Query$SystemIsUsingBinds$system$info { _CopyWithImpl$Query$SystemIsUsingBinds$system$info( - this._instance, this._then); + this._instance, + this._then, + ); final Query$SystemIsUsingBinds$system$info _instance; @@ -1292,16 +3387,18 @@ class _CopyWithImpl$Query$SystemIsUsingBinds$system$info static const _undefined = {}; - TRes call( - {Object? usingBinds = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? usingBinds = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$SystemIsUsingBinds$system$info( - usingBinds: usingBinds == _undefined || usingBinds == null - ? _instance.usingBinds - : (usingBinds as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + usingBinds: usingBinds == _undefined || usingBinds == null + ? _instance.usingBinds + : (usingBinds as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info @@ -1310,64 +3407,104 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info TRes _res; - call({bool? usingBinds, String? $__typename}) => _res; + call({ + bool? usingBinds, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Query$DomainInfo { - Query$DomainInfo({required this.system, required this.$__typename}); + Query$DomainInfo({ + required this.system, + required this.$__typename, + }); - @override - factory Query$DomainInfo.fromJson(Map json) => - _$Query$DomainInfoFromJson(json); + factory Query$DomainInfo.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$DomainInfo( + system: + Query$DomainInfo$system.fromJson((l$system as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$DomainInfo$system system; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$DomainInfoToJson(this); + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$system = system; final l$$__typename = $__typename; - return Object.hashAll([l$system, l$$__typename]); + return Object.hashAll([ + l$system, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$DomainInfo) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$DomainInfo) || runtimeType != other.runtimeType) { return false; + } final l$system = system; final lOther$system = other.system; - if (l$system != lOther$system) return false; + if (l$system != lOther$system) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$DomainInfo on Query$DomainInfo { CopyWith$Query$DomainInfo get copyWith => - CopyWith$Query$DomainInfo(this, (i) => i); + CopyWith$Query$DomainInfo( + this, + (i) => i, + ); } abstract class CopyWith$Query$DomainInfo { factory CopyWith$Query$DomainInfo( - Query$DomainInfo instance, TRes Function(Query$DomainInfo) then) = - _CopyWithImpl$Query$DomainInfo; + Query$DomainInfo instance, + TRes Function(Query$DomainInfo) then, + ) = _CopyWithImpl$Query$DomainInfo; factory CopyWith$Query$DomainInfo.stub(TRes res) = _CopyWithStubImpl$Query$DomainInfo; - TRes call({Query$DomainInfo$system? system, String? $__typename}); + TRes call({ + Query$DomainInfo$system? system, + String? $__typename, + }); CopyWith$Query$DomainInfo$system get system; } class _CopyWithImpl$Query$DomainInfo implements CopyWith$Query$DomainInfo { - _CopyWithImpl$Query$DomainInfo(this._instance, this._then); + _CopyWithImpl$Query$DomainInfo( + this._instance, + this._then, + ); final Query$DomainInfo _instance; @@ -1375,14 +3512,18 @@ class _CopyWithImpl$Query$DomainInfo static const _undefined = {}; - TRes call({Object? system = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$DomainInfo( - system: system == _undefined || system == null - ? _instance.system - : (system as Query$DomainInfo$system), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + system: system == _undefined || system == null + ? _instance.system + : (system as Query$DomainInfo$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$DomainInfo$system get system { final local$system = _instance.system; return CopyWith$Query$DomainInfo$system( @@ -1396,142 +3537,163 @@ class _CopyWithStubImpl$Query$DomainInfo TRes _res; - call({Query$DomainInfo$system? system, String? $__typename}) => _res; + call({ + Query$DomainInfo$system? system, + String? $__typename, + }) => + _res; CopyWith$Query$DomainInfo$system get system => CopyWith$Query$DomainInfo$system.stub(_res); } const documentNodeQueryDomainInfo = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'DomainInfo'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'system'), + type: OperationType.query, + name: NameNode(value: 'DomainInfo'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'domainInfo'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'domain'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'hostname'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'provider'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'requiredDnsRecords'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'dnsRecordFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'domain'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'hostname'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'requiredDnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'dnsRecordFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitiondnsRecordFields, ]); Query$DomainInfo _parserFn$Query$DomainInfo(Map data) => Query$DomainInfo.fromJson(data); class Options$Query$DomainInfo extends graphql.QueryOptions { - Options$Query$DomainInfo( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryDomainInfo, - parserFn: _parserFn$Query$DomainInfo); + Options$Query$DomainInfo({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryDomainInfo, + parserFn: _parserFn$Query$DomainInfo, + ); } class WatchOptions$Query$DomainInfo extends graphql.WatchQueryOptions { - WatchOptions$Query$DomainInfo( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryDomainInfo, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$DomainInfo); + WatchOptions$Query$DomainInfo({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryDomainInfo, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$DomainInfo, + ); } class FetchMoreOptions$Query$DomainInfo extends graphql.FetchMoreOptions { FetchMoreOptions$Query$DomainInfo({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryDomainInfo); + : super( + updateQuery: updateQuery, + document: documentNodeQueryDomainInfo, + ); } extension ClientExtension$Query$DomainInfo on graphql.GraphQLClient { @@ -1541,81 +3703,119 @@ extension ClientExtension$Query$DomainInfo on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$DomainInfo( [WatchOptions$Query$DomainInfo? options]) => this.watchQuery(options ?? WatchOptions$Query$DomainInfo()); - void writeQuery$DomainInfo( - {required Query$DomainInfo data, bool broadcast = true}) => + void writeQuery$DomainInfo({ + required Query$DomainInfo data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryDomainInfo)), - data: data.toJson(), - broadcast: broadcast); - Query$DomainInfo? readQuery$DomainInfo({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryDomainInfo)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$DomainInfo? readQuery$DomainInfo({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryDomainInfo)), + optimistic: optimistic, + ); return result == null ? null : Query$DomainInfo.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$DomainInfo$system { - Query$DomainInfo$system( - {required this.domainInfo, required this.$__typename}); + Query$DomainInfo$system({ + required this.domainInfo, + required this.$__typename, + }); - @override - factory Query$DomainInfo$system.fromJson(Map json) => - _$Query$DomainInfo$systemFromJson(json); + factory Query$DomainInfo$system.fromJson(Map json) { + final l$domainInfo = json['domainInfo']; + final l$$__typename = json['__typename']; + return Query$DomainInfo$system( + domainInfo: Query$DomainInfo$system$domainInfo.fromJson( + (l$domainInfo as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$DomainInfo$system$domainInfo domainInfo; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$DomainInfo$systemToJson(this); + Map toJson() { + final _resultData = {}; + final l$domainInfo = domainInfo; + _resultData['domainInfo'] = l$domainInfo.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$domainInfo = domainInfo; final l$$__typename = $__typename; - return Object.hashAll([l$domainInfo, l$$__typename]); + return Object.hashAll([ + l$domainInfo, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$DomainInfo$system) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$DomainInfo$system) || + runtimeType != other.runtimeType) { return false; + } final l$domainInfo = domainInfo; final lOther$domainInfo = other.domainInfo; - if (l$domainInfo != lOther$domainInfo) return false; + if (l$domainInfo != lOther$domainInfo) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$DomainInfo$system on Query$DomainInfo$system { CopyWith$Query$DomainInfo$system get copyWith => - CopyWith$Query$DomainInfo$system(this, (i) => i); + CopyWith$Query$DomainInfo$system( + this, + (i) => i, + ); } abstract class CopyWith$Query$DomainInfo$system { - factory CopyWith$Query$DomainInfo$system(Query$DomainInfo$system instance, - TRes Function(Query$DomainInfo$system) then) = - _CopyWithImpl$Query$DomainInfo$system; + factory CopyWith$Query$DomainInfo$system( + Query$DomainInfo$system instance, + TRes Function(Query$DomainInfo$system) then, + ) = _CopyWithImpl$Query$DomainInfo$system; factory CopyWith$Query$DomainInfo$system.stub(TRes res) = _CopyWithStubImpl$Query$DomainInfo$system; - TRes call( - {Query$DomainInfo$system$domainInfo? domainInfo, String? $__typename}); + TRes call({ + Query$DomainInfo$system$domainInfo? domainInfo, + String? $__typename, + }); CopyWith$Query$DomainInfo$system$domainInfo get domainInfo; } class _CopyWithImpl$Query$DomainInfo$system implements CopyWith$Query$DomainInfo$system { - _CopyWithImpl$Query$DomainInfo$system(this._instance, this._then); + _CopyWithImpl$Query$DomainInfo$system( + this._instance, + this._then, + ); final Query$DomainInfo$system _instance; @@ -1623,16 +3823,18 @@ class _CopyWithImpl$Query$DomainInfo$system static const _undefined = {}; - TRes call( - {Object? domainInfo = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? domainInfo = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$DomainInfo$system( - domainInfo: domainInfo == _undefined || domainInfo == null - ? _instance.domainInfo - : (domainInfo as Query$DomainInfo$system$domainInfo), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + domainInfo: domainInfo == _undefined || domainInfo == null + ? _instance.domainInfo + : (domainInfo as Query$DomainInfo$system$domainInfo), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$DomainInfo$system$domainInfo get domainInfo { final local$domainInfo = _instance.domainInfo; return CopyWith$Query$DomainInfo$system$domainInfo( @@ -1646,40 +3848,70 @@ class _CopyWithStubImpl$Query$DomainInfo$system TRes _res; - call({Query$DomainInfo$system$domainInfo? domainInfo, String? $__typename}) => + call({ + Query$DomainInfo$system$domainInfo? domainInfo, + String? $__typename, + }) => _res; CopyWith$Query$DomainInfo$system$domainInfo get domainInfo => CopyWith$Query$DomainInfo$system$domainInfo.stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$DomainInfo$system$domainInfo { - Query$DomainInfo$system$domainInfo( - {required this.domain, - required this.hostname, - required this.provider, - required this.requiredDnsRecords, - required this.$__typename}); + Query$DomainInfo$system$domainInfo({ + required this.domain, + required this.hostname, + required this.provider, + required this.requiredDnsRecords, + required this.$__typename, + }); - @override factory Query$DomainInfo$system$domainInfo.fromJson( - Map json) => - _$Query$DomainInfo$system$domainInfoFromJson(json); + Map json) { + final l$domain = json['domain']; + final l$hostname = json['hostname']; + final l$provider = json['provider']; + final l$requiredDnsRecords = json['requiredDnsRecords']; + final l$$__typename = json['__typename']; + return Query$DomainInfo$system$domainInfo( + domain: (l$domain as String), + hostname: (l$hostname as String), + provider: fromJson$Enum$DnsProvider((l$provider as String)), + requiredDnsRecords: (l$requiredDnsRecords as List) + .map((e) => + Fragment$dnsRecordFields.fromJson((e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final String domain; final String hostname; - @JsonKey(unknownEnumValue: Enum$DnsProvider.$unknown) final Enum$DnsProvider provider; final List requiredDnsRecords; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$DomainInfo$system$domainInfoToJson(this); + Map toJson() { + final _resultData = {}; + final l$domain = domain; + _resultData['domain'] = l$domain; + final l$hostname = hostname; + _resultData['hostname'] = l$hostname; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$DnsProvider(l$provider); + final l$requiredDnsRecords = requiredDnsRecords; + _resultData['requiredDnsRecords'] = + l$requiredDnsRecords.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$domain = domain; final l$hostname = hostname; @@ -1691,38 +3923,51 @@ class Query$DomainInfo$system$domainInfo { l$hostname, l$provider, Object.hashAll(l$requiredDnsRecords.map((v) => v)), - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$DomainInfo$system$domainInfo) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$domain = domain; final lOther$domain = other.domain; - if (l$domain != lOther$domain) return false; + if (l$domain != lOther$domain) { + return false; + } final l$hostname = hostname; final lOther$hostname = other.hostname; - if (l$hostname != lOther$hostname) return false; + if (l$hostname != lOther$hostname) { + return false; + } final l$provider = provider; final lOther$provider = other.provider; - if (l$provider != lOther$provider) return false; + if (l$provider != lOther$provider) { + return false; + } final l$requiredDnsRecords = requiredDnsRecords; final lOther$requiredDnsRecords = other.requiredDnsRecords; - if (l$requiredDnsRecords.length != lOther$requiredDnsRecords.length) + if (l$requiredDnsRecords.length != lOther$requiredDnsRecords.length) { return false; + } for (int i = 0; i < l$requiredDnsRecords.length; i++) { final l$requiredDnsRecords$entry = l$requiredDnsRecords[i]; final lOther$requiredDnsRecords$entry = lOther$requiredDnsRecords[i]; - if (l$requiredDnsRecords$entry != lOther$requiredDnsRecords$entry) + if (l$requiredDnsRecords$entry != lOther$requiredDnsRecords$entry) { return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1731,25 +3976,28 @@ extension UtilityExtension$Query$DomainInfo$system$domainInfo on Query$DomainInfo$system$domainInfo { CopyWith$Query$DomainInfo$system$domainInfo< Query$DomainInfo$system$domainInfo> - get copyWith => - CopyWith$Query$DomainInfo$system$domainInfo(this, (i) => i); + get copyWith => CopyWith$Query$DomainInfo$system$domainInfo( + this, + (i) => i, + ); } abstract class CopyWith$Query$DomainInfo$system$domainInfo { factory CopyWith$Query$DomainInfo$system$domainInfo( - Query$DomainInfo$system$domainInfo instance, - TRes Function(Query$DomainInfo$system$domainInfo) then) = - _CopyWithImpl$Query$DomainInfo$system$domainInfo; + Query$DomainInfo$system$domainInfo instance, + TRes Function(Query$DomainInfo$system$domainInfo) then, + ) = _CopyWithImpl$Query$DomainInfo$system$domainInfo; factory CopyWith$Query$DomainInfo$system$domainInfo.stub(TRes res) = _CopyWithStubImpl$Query$DomainInfo$system$domainInfo; - TRes call( - {String? domain, - String? hostname, - Enum$DnsProvider? provider, - List? requiredDnsRecords, - String? $__typename}); + TRes call({ + String? domain, + String? hostname, + Enum$DnsProvider? provider, + List? requiredDnsRecords, + String? $__typename, + }); TRes requiredDnsRecords( Iterable Function( Iterable< @@ -1759,7 +4007,10 @@ abstract class CopyWith$Query$DomainInfo$system$domainInfo { class _CopyWithImpl$Query$DomainInfo$system$domainInfo implements CopyWith$Query$DomainInfo$system$domainInfo { - _CopyWithImpl$Query$DomainInfo$system$domainInfo(this._instance, this._then); + _CopyWithImpl$Query$DomainInfo$system$domainInfo( + this._instance, + this._then, + ); final Query$DomainInfo$system$domainInfo _instance; @@ -1767,29 +4018,31 @@ class _CopyWithImpl$Query$DomainInfo$system$domainInfo static const _undefined = {}; - TRes call( - {Object? domain = _undefined, - Object? hostname = _undefined, - Object? provider = _undefined, - Object? requiredDnsRecords = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? domain = _undefined, + Object? hostname = _undefined, + Object? provider = _undefined, + Object? requiredDnsRecords = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$DomainInfo$system$domainInfo( - domain: domain == _undefined || domain == null - ? _instance.domain - : (domain as String), - hostname: hostname == _undefined || hostname == null - ? _instance.hostname - : (hostname as String), - provider: provider == _undefined || provider == null - ? _instance.provider - : (provider as Enum$DnsProvider), - requiredDnsRecords: - requiredDnsRecords == _undefined || requiredDnsRecords == null - ? _instance.requiredDnsRecords - : (requiredDnsRecords as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + domain: domain == _undefined || domain == null + ? _instance.domain + : (domain as String), + hostname: hostname == _undefined || hostname == null + ? _instance.hostname + : (hostname as String), + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$DnsProvider), + requiredDnsRecords: + requiredDnsRecords == _undefined || requiredDnsRecords == null + ? _instance.requiredDnsRecords + : (requiredDnsRecords as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes requiredDnsRecords( Iterable Function( Iterable< @@ -1798,8 +4051,10 @@ class _CopyWithImpl$Query$DomainInfo$system$domainInfo _fn) => call( requiredDnsRecords: _fn(_instance.requiredDnsRecords - .map((e) => CopyWith$Fragment$dnsRecordFields(e, (i) => i))) - .toList()); + .map((e) => CopyWith$Fragment$dnsRecordFields( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo @@ -1808,55 +4063,77 @@ class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo TRes _res; - call( - {String? domain, - String? hostname, - Enum$DnsProvider? provider, - List? requiredDnsRecords, - String? $__typename}) => + call({ + String? domain, + String? hostname, + Enum$DnsProvider? provider, + List? requiredDnsRecords, + String? $__typename, + }) => _res; requiredDnsRecords(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$ChangeTimezone { - Variables$Mutation$ChangeTimezone({required this.timezone}); + factory Variables$Mutation$ChangeTimezone({required String timezone}) => + Variables$Mutation$ChangeTimezone._({ + r'timezone': timezone, + }); + + Variables$Mutation$ChangeTimezone._(this._$data); + + factory Variables$Mutation$ChangeTimezone.fromJson( + Map data) { + final result$data = {}; + final l$timezone = data['timezone']; + result$data['timezone'] = (l$timezone as String); + return Variables$Mutation$ChangeTimezone._(result$data); + } + + Map _$data; + + String get timezone => (_$data['timezone'] as String); + Map toJson() { + final result$data = {}; + final l$timezone = timezone; + result$data['timezone'] = l$timezone; + return result$data; + } + + CopyWith$Variables$Mutation$ChangeTimezone + get copyWith => CopyWith$Variables$Mutation$ChangeTimezone( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$ChangeTimezone) || + runtimeType != other.runtimeType) { + return false; + } + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) { + return false; + } + return true; + } @override - factory Variables$Mutation$ChangeTimezone.fromJson( - Map json) => - _$Variables$Mutation$ChangeTimezoneFromJson(json); - - final String timezone; - - Map toJson() => - _$Variables$Mutation$ChangeTimezoneToJson(this); int get hashCode { final l$timezone = timezone; return Object.hashAll([l$timezone]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ChangeTimezone) || - runtimeType != other.runtimeType) return false; - final l$timezone = timezone; - final lOther$timezone = other.timezone; - if (l$timezone != lOther$timezone) return false; - return true; - } - - CopyWith$Variables$Mutation$ChangeTimezone - get copyWith => - CopyWith$Variables$Mutation$ChangeTimezone(this, (i) => i); } abstract class CopyWith$Variables$Mutation$ChangeTimezone { factory CopyWith$Variables$Mutation$ChangeTimezone( - Variables$Mutation$ChangeTimezone instance, - TRes Function(Variables$Mutation$ChangeTimezone) then) = - _CopyWithImpl$Variables$Mutation$ChangeTimezone; + Variables$Mutation$ChangeTimezone instance, + TRes Function(Variables$Mutation$ChangeTimezone) then, + ) = _CopyWithImpl$Variables$Mutation$ChangeTimezone; factory CopyWith$Variables$Mutation$ChangeTimezone.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$ChangeTimezone; @@ -1866,7 +4143,10 @@ abstract class CopyWith$Variables$Mutation$ChangeTimezone { class _CopyWithImpl$Variables$Mutation$ChangeTimezone implements CopyWith$Variables$Mutation$ChangeTimezone { - _CopyWithImpl$Variables$Mutation$ChangeTimezone(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$ChangeTimezone( + this._instance, + this._then, + ); final Variables$Mutation$ChangeTimezone _instance; @@ -1875,10 +4155,11 @@ class _CopyWithImpl$Variables$Mutation$ChangeTimezone static const _undefined = {}; TRes call({Object? timezone = _undefined}) => - _then(Variables$Mutation$ChangeTimezone( - timezone: timezone == _undefined || timezone == null - ? _instance.timezone - : (timezone as String))); + _then(Variables$Mutation$ChangeTimezone._({ + ..._instance._$data, + if (timezone != _undefined && timezone != null) + 'timezone': (timezone as String), + })); } class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone @@ -1890,64 +4171,98 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone call({String? timezone}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeTimezone { - Mutation$ChangeTimezone( - {required this.changeTimezone, required this.$__typename}); + Mutation$ChangeTimezone({ + required this.changeTimezone, + required this.$__typename, + }); - @override - factory Mutation$ChangeTimezone.fromJson(Map json) => - _$Mutation$ChangeTimezoneFromJson(json); + factory Mutation$ChangeTimezone.fromJson(Map json) { + final l$changeTimezone = json['changeTimezone']; + final l$$__typename = json['__typename']; + return Mutation$ChangeTimezone( + changeTimezone: Mutation$ChangeTimezone$changeTimezone.fromJson( + (l$changeTimezone as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$ChangeTimezone$changeTimezone changeTimezone; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$ChangeTimezoneToJson(this); + Map toJson() { + final _resultData = {}; + final l$changeTimezone = changeTimezone; + _resultData['changeTimezone'] = l$changeTimezone.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$changeTimezone = changeTimezone; final l$$__typename = $__typename; - return Object.hashAll([l$changeTimezone, l$$__typename]); + return Object.hashAll([ + l$changeTimezone, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$ChangeTimezone) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ChangeTimezone) || + runtimeType != other.runtimeType) { return false; + } final l$changeTimezone = changeTimezone; final lOther$changeTimezone = other.changeTimezone; - if (l$changeTimezone != lOther$changeTimezone) return false; + if (l$changeTimezone != lOther$changeTimezone) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$ChangeTimezone on Mutation$ChangeTimezone { CopyWith$Mutation$ChangeTimezone get copyWith => - CopyWith$Mutation$ChangeTimezone(this, (i) => i); + CopyWith$Mutation$ChangeTimezone( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeTimezone { - factory CopyWith$Mutation$ChangeTimezone(Mutation$ChangeTimezone instance, - TRes Function(Mutation$ChangeTimezone) then) = - _CopyWithImpl$Mutation$ChangeTimezone; + factory CopyWith$Mutation$ChangeTimezone( + Mutation$ChangeTimezone instance, + TRes Function(Mutation$ChangeTimezone) then, + ) = _CopyWithImpl$Mutation$ChangeTimezone; factory CopyWith$Mutation$ChangeTimezone.stub(TRes res) = _CopyWithStubImpl$Mutation$ChangeTimezone; - TRes call( - {Mutation$ChangeTimezone$changeTimezone? changeTimezone, - String? $__typename}); + TRes call({ + Mutation$ChangeTimezone$changeTimezone? changeTimezone, + String? $__typename, + }); CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone; } class _CopyWithImpl$Mutation$ChangeTimezone implements CopyWith$Mutation$ChangeTimezone { - _CopyWithImpl$Mutation$ChangeTimezone(this._instance, this._then); + _CopyWithImpl$Mutation$ChangeTimezone( + this._instance, + this._then, + ); final Mutation$ChangeTimezone _instance; @@ -1955,16 +4270,18 @@ class _CopyWithImpl$Mutation$ChangeTimezone static const _undefined = {}; - TRes call( - {Object? changeTimezone = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? changeTimezone = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ChangeTimezone( - changeTimezone: changeTimezone == _undefined || changeTimezone == null - ? _instance.changeTimezone - : (changeTimezone as Mutation$ChangeTimezone$changeTimezone), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + changeTimezone: changeTimezone == _undefined || changeTimezone == null + ? _instance.changeTimezone + : (changeTimezone as Mutation$ChangeTimezone$changeTimezone), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone { final local$changeTimezone = _instance.changeTimezone; return CopyWith$Mutation$ChangeTimezone$changeTimezone( @@ -1978,9 +4295,10 @@ class _CopyWithStubImpl$Mutation$ChangeTimezone TRes _res; - call( - {Mutation$ChangeTimezone$changeTimezone? changeTimezone, - String? $__typename}) => + call({ + Mutation$ChangeTimezone$changeTimezone? changeTimezone, + String? $__typename, + }) => _res; CopyWith$Mutation$ChangeTimezone$changeTimezone get changeTimezone => CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(_res); @@ -1988,92 +4306,106 @@ class _CopyWithStubImpl$Mutation$ChangeTimezone const documentNodeMutationChangeTimezone = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'ChangeTimezone'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'timezone')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'changeTimezone'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'timezone'), - value: VariableNode(name: NameNode(value: 'timezone'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'ChangeTimezone'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'timezone')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeTimezone'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'timezone'), + value: VariableNode(name: NameNode(value: 'timezone')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'timezone'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'timezone'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$ChangeTimezone _parserFn$Mutation$ChangeTimezone( Map data) => Mutation$ChangeTimezone.fromJson(data); typedef OnMutationCompleted$Mutation$ChangeTimezone = FutureOr Function( - dynamic, Mutation$ChangeTimezone?); + dynamic, + Mutation$ChangeTimezone?, +); class Options$Mutation$ChangeTimezone extends graphql.MutationOptions { - Options$Mutation$ChangeTimezone( - {String? operationName, - required Variables$Mutation$ChangeTimezone variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$ChangeTimezone? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$ChangeTimezone({ + String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeTimezone? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$ChangeTimezone(data)), - update: update, - onError: onError, - document: documentNodeMutationChangeTimezone, - parserFn: _parserFn$Mutation$ChangeTimezone); + : _parserFn$Mutation$ChangeTimezone(data), + ), + update: update, + onError: onError, + document: documentNodeMutationChangeTimezone, + parserFn: _parserFn$Mutation$ChangeTimezone, + ); final OnMutationCompleted$Mutation$ChangeTimezone? onCompletedWithParsed; @@ -2082,38 +4414,39 @@ class Options$Mutation$ChangeTimezone ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$ChangeTimezone extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ChangeTimezone( - {String? operationName, - required Variables$Mutation$ChangeTimezone variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationChangeTimezone, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ChangeTimezone); + WatchOptions$Mutation$ChangeTimezone({ + String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeTimezone, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeTimezone, + ); } extension ClientExtension$Mutation$ChangeTimezone on graphql.GraphQLClient { @@ -2125,20 +4458,31 @@ extension ClientExtension$Mutation$ChangeTimezone on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeTimezone$changeTimezone - implements Fragment$basicMutationReturnFields { - Mutation$ChangeTimezone$changeTimezone( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.timezone}); + implements Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + Mutation$ChangeTimezone$changeTimezone({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.timezone, + }); - @override factory Mutation$ChangeTimezone$changeTimezone.fromJson( - Map json) => - _$Mutation$ChangeTimezone$changeTimezoneFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$timezone = json['timezone']; + return Mutation$ChangeTimezone$changeTimezone( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + timezone: (l$timezone as String?), + ); + } final int code; @@ -2146,43 +4490,75 @@ class Mutation$ChangeTimezone$changeTimezone final bool success; - @JsonKey(name: '__typename') final String $__typename; final String? timezone; - Map toJson() => - _$Mutation$ChangeTimezone$changeTimezoneToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$timezone = timezone; + _resultData['timezone'] = l$timezone; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$timezone = timezone; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$timezone]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$timezone, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ChangeTimezone$changeTimezone) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$timezone = timezone; final lOther$timezone = other.timezone; - if (l$timezone != lOther$timezone) return false; + if (l$timezone != lOther$timezone) { + return false; + } return true; } } @@ -2191,31 +4567,36 @@ extension UtilityExtension$Mutation$ChangeTimezone$changeTimezone on Mutation$ChangeTimezone$changeTimezone { CopyWith$Mutation$ChangeTimezone$changeTimezone< Mutation$ChangeTimezone$changeTimezone> - get copyWith => - CopyWith$Mutation$ChangeTimezone$changeTimezone(this, (i) => i); + get copyWith => CopyWith$Mutation$ChangeTimezone$changeTimezone( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeTimezone$changeTimezone { factory CopyWith$Mutation$ChangeTimezone$changeTimezone( - Mutation$ChangeTimezone$changeTimezone instance, - TRes Function(Mutation$ChangeTimezone$changeTimezone) then) = - _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone; + Mutation$ChangeTimezone$changeTimezone instance, + TRes Function(Mutation$ChangeTimezone$changeTimezone) then, + ) = _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone; factory CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(TRes res) = _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? timezone}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? timezone, + }); } class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone implements CopyWith$Mutation$ChangeTimezone$changeTimezone { _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$ChangeTimezone$changeTimezone _instance; @@ -2223,28 +4604,28 @@ class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? timezone = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? timezone = _undefined, + }) => _then(Mutation$ChangeTimezone$changeTimezone( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - timezone: timezone == _undefined - ? _instance.timezone - : (timezone as String?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + timezone: + timezone == _undefined ? _instance.timezone : (timezone as String?), + )); } class _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone @@ -2253,55 +4634,80 @@ class _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - String? timezone}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + String? timezone, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$ChangeAutoUpgradeSettings { - Variables$Mutation$ChangeAutoUpgradeSettings({required this.settings}); + factory Variables$Mutation$ChangeAutoUpgradeSettings( + {required Input$AutoUpgradeSettingsInput settings}) => + Variables$Mutation$ChangeAutoUpgradeSettings._({ + r'settings': settings, + }); + + Variables$Mutation$ChangeAutoUpgradeSettings._(this._$data); - @override factory Variables$Mutation$ChangeAutoUpgradeSettings.fromJson( - Map json) => - _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson(json); - - final Input$AutoUpgradeSettingsInput settings; - - Map toJson() => - _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson(this); - int get hashCode { - final l$settings = settings; - return Object.hashAll([l$settings]); + Map data) { + final result$data = {}; + final l$settings = data['settings']; + result$data['settings'] = Input$AutoUpgradeSettingsInput.fromJson( + (l$settings as Map)); + return Variables$Mutation$ChangeAutoUpgradeSettings._(result$data); } - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ChangeAutoUpgradeSettings) || - runtimeType != other.runtimeType) return false; + Map _$data; + + Input$AutoUpgradeSettingsInput get settings => + (_$data['settings'] as Input$AutoUpgradeSettingsInput); + Map toJson() { + final result$data = {}; final l$settings = settings; - final lOther$settings = other.settings; - if (l$settings != lOther$settings) return false; - return true; + result$data['settings'] = l$settings.toJson(); + return result$data; } CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings< Variables$Mutation$ChangeAutoUpgradeSettings> - get copyWith => - CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings(this, (i) => i); + get copyWith => CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$ChangeAutoUpgradeSettings) || + runtimeType != other.runtimeType) { + return false; + } + final l$settings = settings; + final lOther$settings = other.settings; + if (l$settings != lOther$settings) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$settings = settings; + return Object.hashAll([l$settings]); + } } abstract class CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { factory CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings( - Variables$Mutation$ChangeAutoUpgradeSettings instance, - TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) then) = - _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings; + Variables$Mutation$ChangeAutoUpgradeSettings instance, + TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) then, + ) = _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings; factory CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings; @@ -2312,7 +4718,9 @@ abstract class CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { class _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings implements CopyWith$Variables$Mutation$ChangeAutoUpgradeSettings { _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings( - this._instance, this._then); + this._instance, + this._then, + ); final Variables$Mutation$ChangeAutoUpgradeSettings _instance; @@ -2321,10 +4729,11 @@ class _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings static const _undefined = {}; TRes call({Object? settings = _undefined}) => - _then(Variables$Mutation$ChangeAutoUpgradeSettings( - settings: settings == _undefined || settings == null - ? _instance.settings - : (settings as Input$AutoUpgradeSettingsInput))); + _then(Variables$Mutation$ChangeAutoUpgradeSettings._({ + ..._instance._$data, + if (settings != _undefined && settings != null) + 'settings': (settings as Input$AutoUpgradeSettingsInput), + })); } class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings @@ -2336,42 +4745,68 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings call({Input$AutoUpgradeSettingsInput? settings}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeAutoUpgradeSettings { - Mutation$ChangeAutoUpgradeSettings( - {required this.changeAutoUpgradeSettings, required this.$__typename}); + Mutation$ChangeAutoUpgradeSettings({ + required this.changeAutoUpgradeSettings, + required this.$__typename, + }); - @override factory Mutation$ChangeAutoUpgradeSettings.fromJson( - Map json) => - _$Mutation$ChangeAutoUpgradeSettingsFromJson(json); + Map json) { + final l$changeAutoUpgradeSettings = json['changeAutoUpgradeSettings']; + final l$$__typename = json['__typename']; + return Mutation$ChangeAutoUpgradeSettings( + changeAutoUpgradeSettings: + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( + (l$changeAutoUpgradeSettings as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings changeAutoUpgradeSettings; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$ChangeAutoUpgradeSettingsToJson(this); + Map toJson() { + final _resultData = {}; + final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; + _resultData['changeAutoUpgradeSettings'] = + l$changeAutoUpgradeSettings.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; final l$$__typename = $__typename; - return Object.hashAll([l$changeAutoUpgradeSettings, l$$__typename]); + return Object.hashAll([ + l$changeAutoUpgradeSettings, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ChangeAutoUpgradeSettings) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; final lOther$changeAutoUpgradeSettings = other.changeAutoUpgradeSettings; - if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) + if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) { return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2380,30 +4815,36 @@ extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings on Mutation$ChangeAutoUpgradeSettings { CopyWith$Mutation$ChangeAutoUpgradeSettings< Mutation$ChangeAutoUpgradeSettings> - get copyWith => - CopyWith$Mutation$ChangeAutoUpgradeSettings(this, (i) => i); + get copyWith => CopyWith$Mutation$ChangeAutoUpgradeSettings( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings { factory CopyWith$Mutation$ChangeAutoUpgradeSettings( - Mutation$ChangeAutoUpgradeSettings instance, - TRes Function(Mutation$ChangeAutoUpgradeSettings) then) = - _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings; + Mutation$ChangeAutoUpgradeSettings instance, + TRes Function(Mutation$ChangeAutoUpgradeSettings) then, + ) = _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings; factory CopyWith$Mutation$ChangeAutoUpgradeSettings.stub(TRes res) = _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings; - TRes call( - {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? - changeAutoUpgradeSettings, - String? $__typename}); + TRes call({ + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? + changeAutoUpgradeSettings, + String? $__typename, + }); CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings get changeAutoUpgradeSettings; } class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings implements CopyWith$Mutation$ChangeAutoUpgradeSettings { - _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings(this._instance, this._then); + _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings( + this._instance, + this._then, + ); final Mutation$ChangeAutoUpgradeSettings _instance; @@ -2411,18 +4852,20 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings static const _undefined = {}; - TRes call( - {Object? changeAutoUpgradeSettings = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? changeAutoUpgradeSettings = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$ChangeAutoUpgradeSettings( - changeAutoUpgradeSettings: changeAutoUpgradeSettings == _undefined || - changeAutoUpgradeSettings == null - ? _instance.changeAutoUpgradeSettings - : (changeAutoUpgradeSettings - as Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + changeAutoUpgradeSettings: changeAutoUpgradeSettings == _undefined || + changeAutoUpgradeSettings == null + ? _instance.changeAutoUpgradeSettings + : (changeAutoUpgradeSettings + as Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings get changeAutoUpgradeSettings { final local$changeAutoUpgradeSettings = _instance.changeAutoUpgradeSettings; @@ -2438,10 +4881,11 @@ class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings TRes _res; - call( - {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? - changeAutoUpgradeSettings, - String? $__typename}) => + call({ + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? + changeAutoUpgradeSettings, + String? $__typename, + }) => _res; CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings get changeAutoUpgradeSettings => @@ -2452,99 +4896,114 @@ class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings const documentNodeMutationChangeAutoUpgradeSettings = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'ChangeAutoUpgradeSettings'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'settings')), - type: NamedTypeNode( - name: NameNode(value: 'AutoUpgradeSettingsInput'), - isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'changeAutoUpgradeSettings'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'settings'), - value: VariableNode(name: NameNode(value: 'settings'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'ChangeAutoUpgradeSettings'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'settings')), + type: NamedTypeNode( + name: NameNode(value: 'AutoUpgradeSettingsInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeAutoUpgradeSettings'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'settings'), + value: VariableNode(name: NameNode(value: 'settings')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: 'allowReboot'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'enableAutoUpgrade'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'enableAutoUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$ChangeAutoUpgradeSettings _parserFn$Mutation$ChangeAutoUpgradeSettings( Map data) => Mutation$ChangeAutoUpgradeSettings.fromJson(data); typedef OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings = FutureOr - Function(dynamic, Mutation$ChangeAutoUpgradeSettings?); + Function( + dynamic, + Mutation$ChangeAutoUpgradeSettings?, +); class Options$Mutation$ChangeAutoUpgradeSettings extends graphql.MutationOptions { - Options$Mutation$ChangeAutoUpgradeSettings( - {String? operationName, - required Variables$Mutation$ChangeAutoUpgradeSettings variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$ChangeAutoUpgradeSettings({ + String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$ChangeAutoUpgradeSettings(data)), - update: update, - onError: onError, - document: documentNodeMutationChangeAutoUpgradeSettings, - parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); + : _parserFn$Mutation$ChangeAutoUpgradeSettings(data), + ), + update: update, + onError: onError, + document: documentNodeMutationChangeAutoUpgradeSettings, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings, + ); final OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompletedWithParsed; @@ -2554,38 +5013,39 @@ class Options$Mutation$ChangeAutoUpgradeSettings ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$ChangeAutoUpgradeSettings extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ChangeAutoUpgradeSettings( - {String? operationName, - required Variables$Mutation$ChangeAutoUpgradeSettings variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationChangeAutoUpgradeSettings, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); + WatchOptions$Mutation$ChangeAutoUpgradeSettings({ + String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeAutoUpgradeSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings, + ); } extension ClientExtension$Mutation$ChangeAutoUpgradeSettings @@ -2600,22 +5060,35 @@ extension ClientExtension$Mutation$ChangeAutoUpgradeSettings this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings - implements Fragment$basicMutationReturnFields { - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - required this.allowReboot, - required this.enableAutoUpgrade}); + implements + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + required this.allowReboot, + required this.enableAutoUpgrade, + }); - @override factory Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( - Map json) => - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( - json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$allowReboot = json['allowReboot']; + final l$enableAutoUpgrade = json['enableAutoUpgrade']; + return Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + allowReboot: (l$allowReboot as bool), + enableAutoUpgrade: (l$enableAutoUpgrade as bool), + ); + } final int code; @@ -2623,16 +5096,30 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings final bool success; - @JsonKey(name: '__typename') final String $__typename; final bool allowReboot; final bool enableAutoUpgrade; - Map toJson() => - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( - this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$allowReboot = allowReboot; + _resultData['allowReboot'] = l$allowReboot; + final l$enableAutoUpgrade = enableAutoUpgrade; + _resultData['enableAutoUpgrade'] = l$enableAutoUpgrade; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; @@ -2646,34 +5133,50 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings l$success, l$$__typename, l$allowReboot, - l$enableAutoUpgrade + l$enableAutoUpgrade, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$allowReboot = allowReboot; final lOther$allowReboot = other.allowReboot; - if (l$allowReboot != lOther$allowReboot) return false; + if (l$allowReboot != lOther$allowReboot) { + return false; + } final l$enableAutoUpgrade = enableAutoUpgrade; final lOther$enableAutoUpgrade = other.enableAutoUpgrade; - if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) { + return false; + } return true; } } @@ -2684,29 +5187,31 @@ extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeS Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings> get copyWith => CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< TRes> { factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings instance, - TRes Function( - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) - then) = - _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings instance, + TRes Function(Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) + then, + ) = _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.stub( TRes res) = _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - bool? allowReboot, - bool? enableAutoUpgrade}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + bool? allowReboot, + bool? enableAutoUpgrade, + }); } class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< @@ -2715,7 +5220,9 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< TRes> { _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings _instance; @@ -2724,33 +5231,34 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? allowReboot = _undefined, - Object? enableAutoUpgrade = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? allowReboot = _undefined, + Object? enableAutoUpgrade = _undefined, + }) => _then(Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - allowReboot: allowReboot == _undefined || allowReboot == null - ? _instance.allowReboot - : (allowReboot as bool), - enableAutoUpgrade: - enableAutoUpgrade == _undefined || enableAutoUpgrade == null - ? _instance.enableAutoUpgrade - : (enableAutoUpgrade as bool))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + allowReboot: allowReboot == _undefined || allowReboot == null + ? _instance.allowReboot + : (allowReboot as bool), + enableAutoUpgrade: + enableAutoUpgrade == _undefined || enableAutoUpgrade == null + ? _instance.enableAutoUpgrade + : (enableAutoUpgrade as bool), + )); } class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< @@ -2763,12 +5271,13 @@ class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSett TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - bool? allowReboot, - bool? enableAutoUpgrade}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + bool? allowReboot, + bool? enableAutoUpgrade, + }) => _res; } diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 92138d02..a7998aa5 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,24 +1,70 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; -part 'services.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -26,36 +72,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -64,25 +138,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -90,24 +174,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -116,43 +201,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -160,88 +256,1752 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Query$AllServices { - Query$AllServices({required this.services, required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Query$AllServices.fromJson(Map json) => - _$Query$AllServicesFromJson(json); + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } - final Query$AllServices$services services; + final int code; + + final String message; + + final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllServicesToJson(this); - int get hashCode { - final l$services = services; + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; final l$$__typename = $__typename; - return Object.hashAll([l$services, l$$__typename]); + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllServices) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { return false; - final l$services = services; - final lOther$services = other.services; - if (l$services != lOther$services) return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Query$AllServices { + Query$AllServices({ + required this.services, + required this.$__typename, + }); + + factory Query$AllServices.fromJson(Map json) { + final l$services = json['services']; + final l$$__typename = json['__typename']; + return Query$AllServices( + services: Query$AllServices$services.fromJson( + (l$services as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$AllServices$services services; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$services = services; + _resultData['services'] = l$services.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$services = services; + final l$$__typename = $__typename; + return Object.hashAll([ + l$services, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllServices) || runtimeType != other.runtimeType) { + return false; + } + final l$services = services; + final lOther$services = other.services; + if (l$services != lOther$services) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$AllServices on Query$AllServices { CopyWith$Query$AllServices get copyWith => - CopyWith$Query$AllServices(this, (i) => i); + CopyWith$Query$AllServices( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices { factory CopyWith$Query$AllServices( - Query$AllServices instance, TRes Function(Query$AllServices) then) = - _CopyWithImpl$Query$AllServices; + Query$AllServices instance, + TRes Function(Query$AllServices) then, + ) = _CopyWithImpl$Query$AllServices; factory CopyWith$Query$AllServices.stub(TRes res) = _CopyWithStubImpl$Query$AllServices; - TRes call({Query$AllServices$services? services, String? $__typename}); + TRes call({ + Query$AllServices$services? services, + String? $__typename, + }); CopyWith$Query$AllServices$services get services; } class _CopyWithImpl$Query$AllServices implements CopyWith$Query$AllServices { - _CopyWithImpl$Query$AllServices(this._instance, this._then); + _CopyWithImpl$Query$AllServices( + this._instance, + this._then, + ); final Query$AllServices _instance; @@ -249,15 +2009,18 @@ class _CopyWithImpl$Query$AllServices static const _undefined = {}; - TRes call( - {Object? services = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? services = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices( - services: services == _undefined || services == null - ? _instance.services - : (services as Query$AllServices$services), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + services: services == _undefined || services == null + ? _instance.services + : (services as Query$AllServices$services), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$AllServices$services get services { final local$services = _instance.services; return CopyWith$Query$AllServices$services( @@ -271,165 +2034,194 @@ class _CopyWithStubImpl$Query$AllServices TRes _res; - call({Query$AllServices$services? services, String? $__typename}) => _res; + call({ + Query$AllServices$services? services, + String? $__typename, + }) => + _res; CopyWith$Query$AllServices$services get services => CopyWith$Query$AllServices$services.stub(_res); } const documentNodeQueryAllServices = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'AllServices'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'services'), + type: OperationType.query, + name: NameNode(value: 'AllServices'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'services'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allServices'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'allServices'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'description'), + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'dnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'dnsRecordFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isEnabled'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isRequired'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'storageUsage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'volume'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'name'), alias: null, arguments: [], directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'displayName'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'dnsRecords'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'dnsRecordFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'id'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isEnabled'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isMovable'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'isRequired'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'storageUsage'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'title'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'usedSpace'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'volume'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: 'svgIcon'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'url'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( + selectionSet: null, + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'svgIcon'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'url'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitiondnsRecordFields, ]); Query$AllServices _parserFn$Query$AllServices(Map data) => @@ -437,57 +2229,62 @@ Query$AllServices _parserFn$Query$AllServices(Map data) => class Options$Query$AllServices extends graphql.QueryOptions { - Options$Query$AllServices( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryAllServices, - parserFn: _parserFn$Query$AllServices); + Options$Query$AllServices({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllServices, + parserFn: _parserFn$Query$AllServices, + ); } class WatchOptions$Query$AllServices extends graphql.WatchQueryOptions { - WatchOptions$Query$AllServices( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryAllServices, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$AllServices); + WatchOptions$Query$AllServices({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllServices, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllServices, + ); } class FetchMoreOptions$Query$AllServices extends graphql.FetchMoreOptions { FetchMoreOptions$Query$AllServices({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryAllServices); + : super( + updateQuery: updateQuery, + document: documentNodeQueryAllServices, + ); } extension ClientExtension$Query$AllServices on graphql.GraphQLClient { @@ -497,63 +2294,94 @@ extension ClientExtension$Query$AllServices on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$AllServices( [WatchOptions$Query$AllServices? options]) => this.watchQuery(options ?? WatchOptions$Query$AllServices()); - void writeQuery$AllServices( - {required Query$AllServices data, bool broadcast = true}) => + void writeQuery$AllServices({ + required Query$AllServices data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryAllServices)), - data: data.toJson(), - broadcast: broadcast); - Query$AllServices? readQuery$AllServices({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryAllServices)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$AllServices? readQuery$AllServices({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllServices)), + optimistic: optimistic, + ); return result == null ? null : Query$AllServices.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services { - Query$AllServices$services( - {required this.allServices, required this.$__typename}); + Query$AllServices$services({ + required this.allServices, + required this.$__typename, + }); - @override - factory Query$AllServices$services.fromJson(Map json) => - _$Query$AllServices$servicesFromJson(json); + factory Query$AllServices$services.fromJson(Map json) { + final l$allServices = json['allServices']; + final l$$__typename = json['__typename']; + return Query$AllServices$services( + allServices: (l$allServices as List) + .map((e) => Query$AllServices$services$allServices.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } final List allServices; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllServices$servicesToJson(this); + Map toJson() { + final _resultData = {}; + final l$allServices = allServices; + _resultData['allServices'] = l$allServices.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$allServices = allServices; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$allServices.map((v) => v)), l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$allServices.map((v) => v)), + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$allServices = allServices; final lOther$allServices = other.allServices; - if (l$allServices.length != lOther$allServices.length) return false; + if (l$allServices.length != lOther$allServices.length) { + return false; + } for (int i = 0; i < l$allServices.length; i++) { final l$allServices$entry = l$allServices[i]; final lOther$allServices$entry = lOther$allServices[i]; - if (l$allServices$entry != lOther$allServices$entry) return false; + if (l$allServices$entry != lOther$allServices$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -561,21 +2389,25 @@ class Query$AllServices$services { extension UtilityExtension$Query$AllServices$services on Query$AllServices$services { CopyWith$Query$AllServices$services - get copyWith => CopyWith$Query$AllServices$services(this, (i) => i); + get copyWith => CopyWith$Query$AllServices$services( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services { factory CopyWith$Query$AllServices$services( - Query$AllServices$services instance, - TRes Function(Query$AllServices$services) then) = - _CopyWithImpl$Query$AllServices$services; + Query$AllServices$services instance, + TRes Function(Query$AllServices$services) then, + ) = _CopyWithImpl$Query$AllServices$services; factory CopyWith$Query$AllServices$services.stub(TRes res) = _CopyWithStubImpl$Query$AllServices$services; - TRes call( - {List? allServices, - String? $__typename}); + TRes call({ + List? allServices, + String? $__typename, + }); TRes allServices( Iterable Function( Iterable< @@ -586,7 +2418,10 @@ abstract class CopyWith$Query$AllServices$services { class _CopyWithImpl$Query$AllServices$services implements CopyWith$Query$AllServices$services { - _CopyWithImpl$Query$AllServices$services(this._instance, this._then); + _CopyWithImpl$Query$AllServices$services( + this._instance, + this._then, + ); final Query$AllServices$services _instance; @@ -594,16 +2429,18 @@ class _CopyWithImpl$Query$AllServices$services static const _undefined = {}; - TRes call( - {Object? allServices = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? allServices = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services( - allServices: allServices == _undefined || allServices == null - ? _instance.allServices - : (allServices as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + allServices: allServices == _undefined || allServices == null + ? _instance.allServices + : (allServices as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes allServices( Iterable Function( Iterable< @@ -611,9 +2448,11 @@ class _CopyWithImpl$Query$AllServices$services Query$AllServices$services$allServices>>) _fn) => call( - allServices: _fn(_instance.allServices.map((e) => - CopyWith$Query$AllServices$services$allServices(e, (i) => i))) - .toList()); + allServices: _fn(_instance.allServices + .map((e) => CopyWith$Query$AllServices$services$allServices( + e, + (i) => i, + ))).toList()); } class _CopyWithStubImpl$Query$AllServices$services @@ -622,33 +2461,64 @@ class _CopyWithStubImpl$Query$AllServices$services TRes _res; - call( - {List? allServices, - String? $__typename}) => + call({ + List? allServices, + String? $__typename, + }) => _res; allServices(_fn) => _res; } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services$allServices { - Query$AllServices$services$allServices( - {required this.description, - required this.displayName, - this.dnsRecords, - required this.id, - required this.isEnabled, - required this.isMovable, - required this.isRequired, - required this.status, - required this.storageUsage, - required this.svgIcon, - this.url, - required this.$__typename}); + Query$AllServices$services$allServices({ + required this.description, + required this.displayName, + this.dnsRecords, + required this.id, + required this.isEnabled, + required this.isMovable, + required this.isRequired, + required this.status, + required this.storageUsage, + required this.svgIcon, + this.url, + required this.$__typename, + }); - @override factory Query$AllServices$services$allServices.fromJson( - Map json) => - _$Query$AllServices$services$allServicesFromJson(json); + Map json) { + final l$description = json['description']; + final l$displayName = json['displayName']; + final l$dnsRecords = json['dnsRecords']; + final l$id = json['id']; + final l$isEnabled = json['isEnabled']; + final l$isMovable = json['isMovable']; + final l$isRequired = json['isRequired']; + final l$status = json['status']; + final l$storageUsage = json['storageUsage']; + final l$svgIcon = json['svgIcon']; + final l$url = json['url']; + final l$$__typename = json['__typename']; + return Query$AllServices$services$allServices( + description: (l$description as String), + displayName: (l$displayName as String), + dnsRecords: (l$dnsRecords as List?) + ?.map((e) => + Fragment$dnsRecordFields.fromJson((e as Map))) + .toList(), + id: (l$id as String), + isEnabled: (l$isEnabled as bool), + isMovable: (l$isMovable as bool), + isRequired: (l$isRequired as bool), + status: fromJson$Enum$ServiceStatusEnum((l$status as String)), + storageUsage: + Query$AllServices$services$allServices$storageUsage.fromJson( + (l$storageUsage as Map)), + svgIcon: (l$svgIcon as String), + url: (l$url as String?), + $__typename: (l$$__typename as String), + ); + } final String description; @@ -664,7 +2534,6 @@ class Query$AllServices$services$allServices { final bool isRequired; - @JsonKey(unknownEnumValue: Enum$ServiceStatusEnum.$unknown) final Enum$ServiceStatusEnum status; final Query$AllServices$services$allServices$storageUsage storageUsage; @@ -673,11 +2542,38 @@ class Query$AllServices$services$allServices { final String? url; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$AllServices$services$allServicesToJson(this); + Map toJson() { + final _resultData = {}; + final l$description = description; + _resultData['description'] = l$description; + final l$displayName = displayName; + _resultData['displayName'] = l$displayName; + final l$dnsRecords = dnsRecords; + _resultData['dnsRecords'] = l$dnsRecords?.map((e) => e.toJson()).toList(); + final l$id = id; + _resultData['id'] = l$id; + final l$isEnabled = isEnabled; + _resultData['isEnabled'] = l$isEnabled; + final l$isMovable = isMovable; + _resultData['isMovable'] = l$isMovable; + final l$isRequired = isRequired; + _resultData['isRequired'] = l$isRequired; + final l$status = status; + _resultData['status'] = toJson$Enum$ServiceStatusEnum(l$status); + final l$storageUsage = storageUsage; + _resultData['storageUsage'] = l$storageUsage.toJson(); + final l$svgIcon = svgIcon; + _resultData['svgIcon'] = l$svgIcon; + final l$url = url; + _resultData['url'] = l$url; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$description = description; final l$displayName = displayName; @@ -703,61 +2599,90 @@ class Query$AllServices$services$allServices { l$storageUsage, l$svgIcon, l$url, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services$allServices) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$displayName = displayName; final lOther$displayName = other.displayName; - if (l$displayName != lOther$displayName) return false; + if (l$displayName != lOther$displayName) { + return false; + } final l$dnsRecords = dnsRecords; final lOther$dnsRecords = other.dnsRecords; if (l$dnsRecords != null && lOther$dnsRecords != null) { - if (l$dnsRecords.length != lOther$dnsRecords.length) return false; + if (l$dnsRecords.length != lOther$dnsRecords.length) { + return false; + } for (int i = 0; i < l$dnsRecords.length; i++) { final l$dnsRecords$entry = l$dnsRecords[i]; final lOther$dnsRecords$entry = lOther$dnsRecords[i]; - if (l$dnsRecords$entry != lOther$dnsRecords$entry) return false; + if (l$dnsRecords$entry != lOther$dnsRecords$entry) { + return false; + } } } else if (l$dnsRecords != lOther$dnsRecords) { return false; } - final l$id = id; final lOther$id = other.id; - if (l$id != lOther$id) return false; + if (l$id != lOther$id) { + return false; + } final l$isEnabled = isEnabled; final lOther$isEnabled = other.isEnabled; - if (l$isEnabled != lOther$isEnabled) return false; + if (l$isEnabled != lOther$isEnabled) { + return false; + } final l$isMovable = isMovable; final lOther$isMovable = other.isMovable; - if (l$isMovable != lOther$isMovable) return false; + if (l$isMovable != lOther$isMovable) { + return false; + } final l$isRequired = isRequired; final lOther$isRequired = other.isRequired; - if (l$isRequired != lOther$isRequired) return false; + if (l$isRequired != lOther$isRequired) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$storageUsage = storageUsage; final lOther$storageUsage = other.storageUsage; - if (l$storageUsage != lOther$storageUsage) return false; + if (l$storageUsage != lOther$storageUsage) { + return false; + } final l$svgIcon = svgIcon; final lOther$svgIcon = other.svgIcon; - if (l$svgIcon != lOther$svgIcon) return false; + if (l$svgIcon != lOther$svgIcon) { + return false; + } final l$url = url; final lOther$url = other.url; - if (l$url != lOther$url) return false; + if (l$url != lOther$url) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -766,32 +2691,35 @@ extension UtilityExtension$Query$AllServices$services$allServices on Query$AllServices$services$allServices { CopyWith$Query$AllServices$services$allServices< Query$AllServices$services$allServices> - get copyWith => - CopyWith$Query$AllServices$services$allServices(this, (i) => i); + get copyWith => CopyWith$Query$AllServices$services$allServices( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services$allServices { factory CopyWith$Query$AllServices$services$allServices( - Query$AllServices$services$allServices instance, - TRes Function(Query$AllServices$services$allServices) then) = - _CopyWithImpl$Query$AllServices$services$allServices; + Query$AllServices$services$allServices instance, + TRes Function(Query$AllServices$services$allServices) then, + ) = _CopyWithImpl$Query$AllServices$services$allServices; factory CopyWith$Query$AllServices$services$allServices.stub(TRes res) = _CopyWithStubImpl$Query$AllServices$services$allServices; - TRes call( - {String? description, - String? displayName, - List? dnsRecords, - String? id, - bool? isEnabled, - bool? isMovable, - bool? isRequired, - Enum$ServiceStatusEnum? status, - Query$AllServices$services$allServices$storageUsage? storageUsage, - String? svgIcon, - String? url, - String? $__typename}); + TRes call({ + String? description, + String? displayName, + List? dnsRecords, + String? id, + bool? isEnabled, + bool? isMovable, + bool? isRequired, + Enum$ServiceStatusEnum? status, + Query$AllServices$services$allServices$storageUsage? storageUsage, + String? svgIcon, + String? url, + String? $__typename, + }); TRes dnsRecords( Iterable? Function( Iterable< @@ -804,7 +2732,9 @@ abstract class CopyWith$Query$AllServices$services$allServices { class _CopyWithImpl$Query$AllServices$services$allServices implements CopyWith$Query$AllServices$services$allServices { _CopyWithImpl$Query$AllServices$services$allServices( - this._instance, this._then); + this._instance, + this._then, + ); final Query$AllServices$services$allServices _instance; @@ -812,53 +2742,55 @@ class _CopyWithImpl$Query$AllServices$services$allServices static const _undefined = {}; - TRes call( - {Object? description = _undefined, - Object? displayName = _undefined, - Object? dnsRecords = _undefined, - Object? id = _undefined, - Object? isEnabled = _undefined, - Object? isMovable = _undefined, - Object? isRequired = _undefined, - Object? status = _undefined, - Object? storageUsage = _undefined, - Object? svgIcon = _undefined, - Object? url = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? description = _undefined, + Object? displayName = _undefined, + Object? dnsRecords = _undefined, + Object? id = _undefined, + Object? isEnabled = _undefined, + Object? isMovable = _undefined, + Object? isRequired = _undefined, + Object? status = _undefined, + Object? storageUsage = _undefined, + Object? svgIcon = _undefined, + Object? url = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services$allServices( - description: description == _undefined || description == null - ? _instance.description - : (description as String), - displayName: displayName == _undefined || displayName == null - ? _instance.displayName - : (displayName as String), - dnsRecords: dnsRecords == _undefined - ? _instance.dnsRecords - : (dnsRecords as List?), - id: id == _undefined || id == null ? _instance.id : (id as String), - isEnabled: isEnabled == _undefined || isEnabled == null - ? _instance.isEnabled - : (isEnabled as bool), - isMovable: isMovable == _undefined || isMovable == null - ? _instance.isMovable - : (isMovable as bool), - isRequired: isRequired == _undefined || isRequired == null - ? _instance.isRequired - : (isRequired as bool), - status: status == _undefined || status == null - ? _instance.status - : (status as Enum$ServiceStatusEnum), - storageUsage: storageUsage == _undefined || storageUsage == null - ? _instance.storageUsage - : (storageUsage - as Query$AllServices$services$allServices$storageUsage), - svgIcon: svgIcon == _undefined || svgIcon == null - ? _instance.svgIcon - : (svgIcon as String), - url: url == _undefined ? _instance.url : (url as String?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + description: description == _undefined || description == null + ? _instance.description + : (description as String), + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + dnsRecords: dnsRecords == _undefined + ? _instance.dnsRecords + : (dnsRecords as List?), + id: id == _undefined || id == null ? _instance.id : (id as String), + isEnabled: isEnabled == _undefined || isEnabled == null + ? _instance.isEnabled + : (isEnabled as bool), + isMovable: isMovable == _undefined || isMovable == null + ? _instance.isMovable + : (isMovable as bool), + isRequired: isRequired == _undefined || isRequired == null + ? _instance.isRequired + : (isRequired as bool), + status: status == _undefined || status == null + ? _instance.status + : (status as Enum$ServiceStatusEnum), + storageUsage: storageUsage == _undefined || storageUsage == null + ? _instance.storageUsage + : (storageUsage + as Query$AllServices$services$allServices$storageUsage), + svgIcon: svgIcon == _undefined || svgIcon == null + ? _instance.svgIcon + : (svgIcon as String), + url: url == _undefined ? _instance.url : (url as String?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes dnsRecords( Iterable? Function( Iterable< @@ -867,8 +2799,10 @@ class _CopyWithImpl$Query$AllServices$services$allServices _fn) => call( dnsRecords: _fn(_instance.dnsRecords - ?.map((e) => CopyWith$Fragment$dnsRecordFields(e, (i) => i))) - ?.toList()); + ?.map((e) => CopyWith$Fragment$dnsRecordFields( + e, + (i) => i, + )))?.toList()); CopyWith$Query$AllServices$services$allServices$storageUsage get storageUsage { final local$storageUsage = _instance.storageUsage; @@ -883,19 +2817,20 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices TRes _res; - call( - {String? description, - String? displayName, - List? dnsRecords, - String? id, - bool? isEnabled, - bool? isMovable, - bool? isRequired, - Enum$ServiceStatusEnum? status, - Query$AllServices$services$allServices$storageUsage? storageUsage, - String? svgIcon, - String? url, - String? $__typename}) => + call({ + String? description, + String? displayName, + List? dnsRecords, + String? id, + bool? isEnabled, + bool? isMovable, + bool? isRequired, + Enum$ServiceStatusEnum? status, + Query$AllServices$services$allServices$storageUsage? storageUsage, + String? svgIcon, + String? url, + String? $__typename, + }) => _res; dnsRecords(_fn) => _res; CopyWith$Query$AllServices$services$allServices$storageUsage @@ -904,18 +2839,30 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices _res); } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services$allServices$storageUsage { - Query$AllServices$services$allServices$storageUsage( - {required this.title, - required this.usedSpace, - this.volume, - required this.$__typename}); + Query$AllServices$services$allServices$storageUsage({ + required this.title, + required this.usedSpace, + this.volume, + required this.$__typename, + }); - @override factory Query$AllServices$services$allServices$storageUsage.fromJson( - Map json) => - _$Query$AllServices$services$allServices$storageUsageFromJson(json); + Map json) { + final l$title = json['title']; + final l$usedSpace = json['usedSpace']; + final l$volume = json['volume']; + final l$$__typename = json['__typename']; + return Query$AllServices$services$allServices$storageUsage( + title: (l$title as String), + usedSpace: (l$usedSpace as String), + volume: l$volume == null + ? null + : Query$AllServices$services$allServices$storageUsage$volume.fromJson( + (l$volume as Map)), + $__typename: (l$$__typename as String), + ); + } final String title; @@ -923,36 +2870,64 @@ class Query$AllServices$services$allServices$storageUsage { final Query$AllServices$services$allServices$storageUsage$volume? volume; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$AllServices$services$allServices$storageUsageToJson(this); + Map toJson() { + final _resultData = {}; + final l$title = title; + _resultData['title'] = l$title; + final l$usedSpace = usedSpace; + _resultData['usedSpace'] = l$usedSpace; + final l$volume = volume; + _resultData['volume'] = l$volume?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$title = title; final l$usedSpace = usedSpace; final l$volume = volume; final l$$__typename = $__typename; - return Object.hashAll([l$title, l$usedSpace, l$volume, l$$__typename]); + return Object.hashAll([ + l$title, + l$usedSpace, + l$volume, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services$allServices$storageUsage) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$title = title; final lOther$title = other.title; - if (l$title != lOther$title) return false; + if (l$title != lOther$title) { + return false; + } final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; - if (l$usedSpace != lOther$usedSpace) return false; + if (l$usedSpace != lOther$usedSpace) { + return false; + } final l$volume = volume; final lOther$volume = other.volume; - if (l$volume != lOther$volume) return false; + if (l$volume != lOther$volume) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -963,26 +2938,28 @@ extension UtilityExtension$Query$AllServices$services$allServices$storageUsage Query$AllServices$services$allServices$storageUsage> get copyWith => CopyWith$Query$AllServices$services$allServices$storageUsage( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services$allServices$storageUsage< TRes> { factory CopyWith$Query$AllServices$services$allServices$storageUsage( - Query$AllServices$services$allServices$storageUsage instance, - TRes Function(Query$AllServices$services$allServices$storageUsage) - then) = - _CopyWithImpl$Query$AllServices$services$allServices$storageUsage; + Query$AllServices$services$allServices$storageUsage instance, + TRes Function(Query$AllServices$services$allServices$storageUsage) then, + ) = _CopyWithImpl$Query$AllServices$services$allServices$storageUsage; factory CopyWith$Query$AllServices$services$allServices$storageUsage.stub( TRes res) = _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage; - TRes call( - {String? title, - String? usedSpace, - Query$AllServices$services$allServices$storageUsage$volume? volume, - String? $__typename}); + TRes call({ + String? title, + String? usedSpace, + Query$AllServices$services$allServices$storageUsage$volume? volume, + String? $__typename, + }); CopyWith$Query$AllServices$services$allServices$storageUsage$volume get volume; } @@ -991,7 +2968,9 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage implements CopyWith$Query$AllServices$services$allServices$storageUsage { _CopyWithImpl$Query$AllServices$services$allServices$storageUsage( - this._instance, this._then); + this._instance, + this._then, + ); final Query$AllServices$services$allServices$storageUsage _instance; @@ -1000,25 +2979,27 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage static const _undefined = {}; - TRes call( - {Object? title = _undefined, - Object? usedSpace = _undefined, - Object? volume = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? title = _undefined, + Object? usedSpace = _undefined, + Object? volume = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services$allServices$storageUsage( - title: title == _undefined || title == null - ? _instance.title - : (title as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - volume: volume == _undefined - ? _instance.volume - : (volume - as Query$AllServices$services$allServices$storageUsage$volume?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + title: title == _undefined || title == null + ? _instance.title + : (title as String), + usedSpace: usedSpace == _undefined || usedSpace == null + ? _instance.usedSpace + : (usedSpace as String), + volume: volume == _undefined + ? _instance.volume + : (volume + as Query$AllServices$services$allServices$storageUsage$volume?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$AllServices$services$allServices$storageUsage$volume get volume { final local$volume = _instance.volume; @@ -1039,11 +3020,12 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage< TRes _res; - call( - {String? title, - String? usedSpace, - Query$AllServices$services$allServices$storageUsage$volume? volume, - String? $__typename}) => + call({ + String? title, + String? usedSpace, + Query$AllServices$services$allServices$storageUsage$volume? volume, + String? $__typename, + }) => _res; CopyWith$Query$AllServices$services$allServices$storageUsage$volume get volume => @@ -1051,42 +3033,65 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage< .stub(_res); } -@JsonSerializable(explicitToJson: true) class Query$AllServices$services$allServices$storageUsage$volume { - Query$AllServices$services$allServices$storageUsage$volume( - {required this.name, required this.$__typename}); + Query$AllServices$services$allServices$storageUsage$volume({ + required this.name, + required this.$__typename, + }); - @override factory Query$AllServices$services$allServices$storageUsage$volume.fromJson( - Map json) => - _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( - json); + Map json) { + final l$name = json['name']; + final l$$__typename = json['__typename']; + return Query$AllServices$services$allServices$storageUsage$volume( + name: (l$name as String), + $__typename: (l$$__typename as String), + ); + } final String name; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$AllServices$services$allServices$storageUsage$volumeToJson(this); + Map toJson() { + final _resultData = {}; + final l$name = name; + _resultData['name'] = l$name; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$name = name; final l$$__typename = $__typename; - return Object.hashAll([l$name, l$$__typename]); + return Object.hashAll([ + l$name, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Query$AllServices$services$allServices$storageUsage$volume) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1097,23 +3102,27 @@ extension UtilityExtension$Query$AllServices$services$allServices$storageUsage$v Query$AllServices$services$allServices$storageUsage$volume> get copyWith => CopyWith$Query$AllServices$services$allServices$storageUsage$volume( - this, (i) => i); + this, + (i) => i, + ); } abstract class CopyWith$Query$AllServices$services$allServices$storageUsage$volume< TRes> { factory CopyWith$Query$AllServices$services$allServices$storageUsage$volume( - Query$AllServices$services$allServices$storageUsage$volume instance, - TRes Function( - Query$AllServices$services$allServices$storageUsage$volume) - then) = - _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume; + Query$AllServices$services$allServices$storageUsage$volume instance, + TRes Function(Query$AllServices$services$allServices$storageUsage$volume) + then, + ) = _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume; factory CopyWith$Query$AllServices$services$allServices$storageUsage$volume.stub( TRes res) = _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volume; - TRes call({String? name, String? $__typename}); + TRes call({ + String? name, + String? $__typename, + }); } class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< @@ -1122,7 +3131,9 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< CopyWith$Query$AllServices$services$allServices$storageUsage$volume< TRes> { _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume( - this._instance, this._then); + this._instance, + this._then, + ); final Query$AllServices$services$allServices$storageUsage$volume _instance; @@ -1131,14 +3142,18 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< static const _undefined = {}; - TRes call({Object? name = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? name = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllServices$services$allServices$storageUsage$volume( - name: name == _undefined || name == null - ? _instance.name - : (name as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + name: name == _undefined || name == null + ? _instance.name + : (name as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volume< @@ -1151,47 +3166,72 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage$volu TRes _res; - call({String? name, String? $__typename}) => _res; + call({ + String? name, + String? $__typename, + }) => + _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$EnableService { - Variables$Mutation$EnableService({required this.serviceId}); + factory Variables$Mutation$EnableService({required String serviceId}) => + Variables$Mutation$EnableService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$EnableService._(this._$data); + + factory Variables$Mutation$EnableService.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$EnableService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$EnableService + get copyWith => CopyWith$Variables$Mutation$EnableService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$EnableService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$EnableService.fromJson( - Map json) => - _$Variables$Mutation$EnableServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$EnableServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$EnableService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$EnableService - get copyWith => CopyWith$Variables$Mutation$EnableService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$EnableService { factory CopyWith$Variables$Mutation$EnableService( - Variables$Mutation$EnableService instance, - TRes Function(Variables$Mutation$EnableService) then) = - _CopyWithImpl$Variables$Mutation$EnableService; + Variables$Mutation$EnableService instance, + TRes Function(Variables$Mutation$EnableService) then, + ) = _CopyWithImpl$Variables$Mutation$EnableService; factory CopyWith$Variables$Mutation$EnableService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$EnableService; @@ -1201,7 +3241,10 @@ abstract class CopyWith$Variables$Mutation$EnableService { class _CopyWithImpl$Variables$Mutation$EnableService implements CopyWith$Variables$Mutation$EnableService { - _CopyWithImpl$Variables$Mutation$EnableService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$EnableService( + this._instance, + this._then, + ); final Variables$Mutation$EnableService _instance; @@ -1210,10 +3253,11 @@ class _CopyWithImpl$Variables$Mutation$EnableService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$EnableService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$EnableService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$EnableService @@ -1225,64 +3269,98 @@ class _CopyWithStubImpl$Variables$Mutation$EnableService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$EnableService { - Mutation$EnableService( - {required this.enableService, required this.$__typename}); + Mutation$EnableService({ + required this.enableService, + required this.$__typename, + }); - @override - factory Mutation$EnableService.fromJson(Map json) => - _$Mutation$EnableServiceFromJson(json); + factory Mutation$EnableService.fromJson(Map json) { + final l$enableService = json['enableService']; + final l$$__typename = json['__typename']; + return Mutation$EnableService( + enableService: Mutation$EnableService$enableService.fromJson( + (l$enableService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$EnableService$enableService enableService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$EnableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$enableService = enableService; + _resultData['enableService'] = l$enableService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$enableService = enableService; final l$$__typename = $__typename; - return Object.hashAll([l$enableService, l$$__typename]); + return Object.hashAll([ + l$enableService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$EnableService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$EnableService) || + runtimeType != other.runtimeType) { return false; + } final l$enableService = enableService; final lOther$enableService = other.enableService; - if (l$enableService != lOther$enableService) return false; + if (l$enableService != lOther$enableService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$EnableService on Mutation$EnableService { CopyWith$Mutation$EnableService get copyWith => - CopyWith$Mutation$EnableService(this, (i) => i); + CopyWith$Mutation$EnableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$EnableService { - factory CopyWith$Mutation$EnableService(Mutation$EnableService instance, - TRes Function(Mutation$EnableService) then) = - _CopyWithImpl$Mutation$EnableService; + factory CopyWith$Mutation$EnableService( + Mutation$EnableService instance, + TRes Function(Mutation$EnableService) then, + ) = _CopyWithImpl$Mutation$EnableService; factory CopyWith$Mutation$EnableService.stub(TRes res) = _CopyWithStubImpl$Mutation$EnableService; - TRes call( - {Mutation$EnableService$enableService? enableService, - String? $__typename}); + TRes call({ + Mutation$EnableService$enableService? enableService, + String? $__typename, + }); CopyWith$Mutation$EnableService$enableService get enableService; } class _CopyWithImpl$Mutation$EnableService implements CopyWith$Mutation$EnableService { - _CopyWithImpl$Mutation$EnableService(this._instance, this._then); + _CopyWithImpl$Mutation$EnableService( + this._instance, + this._then, + ); final Mutation$EnableService _instance; @@ -1290,16 +3368,18 @@ class _CopyWithImpl$Mutation$EnableService static const _undefined = {}; - TRes call( - {Object? enableService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? enableService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$EnableService( - enableService: enableService == _undefined || enableService == null - ? _instance.enableService - : (enableService as Mutation$EnableService$enableService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + enableService: enableService == _undefined || enableService == null + ? _instance.enableService + : (enableService as Mutation$EnableService$enableService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$EnableService$enableService get enableService { final local$enableService = _instance.enableService; return CopyWith$Mutation$EnableService$enableService( @@ -1313,9 +3393,10 @@ class _CopyWithStubImpl$Mutation$EnableService TRes _res; - call( - {Mutation$EnableService$enableService? enableService, - String? $__typename}) => + call({ + Mutation$EnableService$enableService? enableService, + String? $__typename, + }) => _res; CopyWith$Mutation$EnableService$enableService get enableService => CopyWith$Mutation$EnableService$enableService.stub(_res); @@ -1323,86 +3404,99 @@ class _CopyWithStubImpl$Mutation$EnableService const documentNodeMutationEnableService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'EnableService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'enableService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'EnableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$EnableService _parserFn$Mutation$EnableService( Map data) => Mutation$EnableService.fromJson(data); typedef OnMutationCompleted$Mutation$EnableService = FutureOr Function( - dynamic, Mutation$EnableService?); + dynamic, + Mutation$EnableService?, +); class Options$Mutation$EnableService extends graphql.MutationOptions { - Options$Mutation$EnableService( - {String? operationName, - required Variables$Mutation$EnableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$EnableService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$EnableService({ + String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$EnableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$EnableService(data)), - update: update, - onError: onError, - document: documentNodeMutationEnableService, - parserFn: _parserFn$Mutation$EnableService); + : _parserFn$Mutation$EnableService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationEnableService, + parserFn: _parserFn$Mutation$EnableService, + ); final OnMutationCompleted$Mutation$EnableService? onCompletedWithParsed; @@ -1411,38 +3505,39 @@ class Options$Mutation$EnableService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$EnableService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$EnableService( - {String? operationName, - required Variables$Mutation$EnableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationEnableService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$EnableService); + WatchOptions$Mutation$EnableService({ + String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationEnableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$EnableService, + ); } extension ClientExtension$Mutation$EnableService on graphql.GraphQLClient { @@ -1454,19 +3549,28 @@ extension ClientExtension$Mutation$EnableService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$EnableService$enableService - implements Fragment$basicMutationReturnFields { - Mutation$EnableService$enableService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$EnableService$enableService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$EnableService$enableService.fromJson( - Map json) => - _$Mutation$EnableService$enableServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$EnableService$enableService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1474,36 +3578,64 @@ class Mutation$EnableService$enableService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$EnableService$enableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$EnableService$enableService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1512,26 +3644,35 @@ extension UtilityExtension$Mutation$EnableService$enableService on Mutation$EnableService$enableService { CopyWith$Mutation$EnableService$enableService< Mutation$EnableService$enableService> - get copyWith => - CopyWith$Mutation$EnableService$enableService(this, (i) => i); + get copyWith => CopyWith$Mutation$EnableService$enableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$EnableService$enableService { factory CopyWith$Mutation$EnableService$enableService( - Mutation$EnableService$enableService instance, - TRes Function(Mutation$EnableService$enableService) then) = - _CopyWithImpl$Mutation$EnableService$enableService; + Mutation$EnableService$enableService instance, + TRes Function(Mutation$EnableService$enableService) then, + ) = _CopyWithImpl$Mutation$EnableService$enableService; factory CopyWith$Mutation$EnableService$enableService.stub(TRes res) = _CopyWithStubImpl$Mutation$EnableService$enableService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$EnableService$enableService implements CopyWith$Mutation$EnableService$enableService { _CopyWithImpl$Mutation$EnableService$enableService( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$EnableService$enableService _instance; @@ -1539,24 +3680,25 @@ class _CopyWithImpl$Mutation$EnableService$enableService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$EnableService$enableService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$EnableService$enableService @@ -1565,49 +3707,75 @@ class _CopyWithStubImpl$Mutation$EnableService$enableService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$DisableService { - Variables$Mutation$DisableService({required this.serviceId}); + factory Variables$Mutation$DisableService({required String serviceId}) => + Variables$Mutation$DisableService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$DisableService._(this._$data); + + factory Variables$Mutation$DisableService.fromJson( + Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$DisableService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$DisableService + get copyWith => CopyWith$Variables$Mutation$DisableService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$DisableService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$DisableService.fromJson( - Map json) => - _$Variables$Mutation$DisableServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$DisableServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DisableService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$DisableService - get copyWith => - CopyWith$Variables$Mutation$DisableService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$DisableService { factory CopyWith$Variables$Mutation$DisableService( - Variables$Mutation$DisableService instance, - TRes Function(Variables$Mutation$DisableService) then) = - _CopyWithImpl$Variables$Mutation$DisableService; + Variables$Mutation$DisableService instance, + TRes Function(Variables$Mutation$DisableService) then, + ) = _CopyWithImpl$Variables$Mutation$DisableService; factory CopyWith$Variables$Mutation$DisableService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DisableService; @@ -1617,7 +3785,10 @@ abstract class CopyWith$Variables$Mutation$DisableService { class _CopyWithImpl$Variables$Mutation$DisableService implements CopyWith$Variables$Mutation$DisableService { - _CopyWithImpl$Variables$Mutation$DisableService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$DisableService( + this._instance, + this._then, + ); final Variables$Mutation$DisableService _instance; @@ -1626,10 +3797,11 @@ class _CopyWithImpl$Variables$Mutation$DisableService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$DisableService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$DisableService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$DisableService @@ -1641,64 +3813,98 @@ class _CopyWithStubImpl$Variables$Mutation$DisableService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$DisableService { - Mutation$DisableService( - {required this.disableService, required this.$__typename}); + Mutation$DisableService({ + required this.disableService, + required this.$__typename, + }); - @override - factory Mutation$DisableService.fromJson(Map json) => - _$Mutation$DisableServiceFromJson(json); + factory Mutation$DisableService.fromJson(Map json) { + final l$disableService = json['disableService']; + final l$$__typename = json['__typename']; + return Mutation$DisableService( + disableService: Mutation$DisableService$disableService.fromJson( + (l$disableService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$DisableService$disableService disableService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DisableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$disableService = disableService; + _resultData['disableService'] = l$disableService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$disableService = disableService; final l$$__typename = $__typename; - return Object.hashAll([l$disableService, l$$__typename]); + return Object.hashAll([ + l$disableService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$DisableService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$DisableService) || + runtimeType != other.runtimeType) { return false; + } final l$disableService = disableService; final lOther$disableService = other.disableService; - if (l$disableService != lOther$disableService) return false; + if (l$disableService != lOther$disableService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$DisableService on Mutation$DisableService { CopyWith$Mutation$DisableService get copyWith => - CopyWith$Mutation$DisableService(this, (i) => i); + CopyWith$Mutation$DisableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DisableService { - factory CopyWith$Mutation$DisableService(Mutation$DisableService instance, - TRes Function(Mutation$DisableService) then) = - _CopyWithImpl$Mutation$DisableService; + factory CopyWith$Mutation$DisableService( + Mutation$DisableService instance, + TRes Function(Mutation$DisableService) then, + ) = _CopyWithImpl$Mutation$DisableService; factory CopyWith$Mutation$DisableService.stub(TRes res) = _CopyWithStubImpl$Mutation$DisableService; - TRes call( - {Mutation$DisableService$disableService? disableService, - String? $__typename}); + TRes call({ + Mutation$DisableService$disableService? disableService, + String? $__typename, + }); CopyWith$Mutation$DisableService$disableService get disableService; } class _CopyWithImpl$Mutation$DisableService implements CopyWith$Mutation$DisableService { - _CopyWithImpl$Mutation$DisableService(this._instance, this._then); + _CopyWithImpl$Mutation$DisableService( + this._instance, + this._then, + ); final Mutation$DisableService _instance; @@ -1706,16 +3912,18 @@ class _CopyWithImpl$Mutation$DisableService static const _undefined = {}; - TRes call( - {Object? disableService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? disableService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DisableService( - disableService: disableService == _undefined || disableService == null - ? _instance.disableService - : (disableService as Mutation$DisableService$disableService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + disableService: disableService == _undefined || disableService == null + ? _instance.disableService + : (disableService as Mutation$DisableService$disableService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$DisableService$disableService get disableService { final local$disableService = _instance.disableService; return CopyWith$Mutation$DisableService$disableService( @@ -1729,9 +3937,10 @@ class _CopyWithStubImpl$Mutation$DisableService TRes _res; - call( - {Mutation$DisableService$disableService? disableService, - String? $__typename}) => + call({ + Mutation$DisableService$disableService? disableService, + String? $__typename, + }) => _res; CopyWith$Mutation$DisableService$disableService get disableService => CopyWith$Mutation$DisableService$disableService.stub(_res); @@ -1739,86 +3948,99 @@ class _CopyWithStubImpl$Mutation$DisableService const documentNodeMutationDisableService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'DisableService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'disableService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'DisableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'disableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$DisableService _parserFn$Mutation$DisableService( Map data) => Mutation$DisableService.fromJson(data); typedef OnMutationCompleted$Mutation$DisableService = FutureOr Function( - dynamic, Mutation$DisableService?); + dynamic, + Mutation$DisableService?, +); class Options$Mutation$DisableService extends graphql.MutationOptions { - Options$Mutation$DisableService( - {String? operationName, - required Variables$Mutation$DisableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$DisableService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$DisableService({ + String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DisableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$DisableService(data)), - update: update, - onError: onError, - document: documentNodeMutationDisableService, - parserFn: _parserFn$Mutation$DisableService); + : _parserFn$Mutation$DisableService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationDisableService, + parserFn: _parserFn$Mutation$DisableService, + ); final OnMutationCompleted$Mutation$DisableService? onCompletedWithParsed; @@ -1827,38 +4049,39 @@ class Options$Mutation$DisableService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$DisableService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$DisableService( - {String? operationName, - required Variables$Mutation$DisableService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationDisableService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$DisableService); + WatchOptions$Mutation$DisableService({ + String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDisableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DisableService, + ); } extension ClientExtension$Mutation$DisableService on graphql.GraphQLClient { @@ -1870,19 +4093,28 @@ extension ClientExtension$Mutation$DisableService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$DisableService$disableService - implements Fragment$basicMutationReturnFields { - Mutation$DisableService$disableService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$DisableService$disableService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$DisableService$disableService.fromJson( - Map json) => - _$Mutation$DisableService$disableServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$DisableService$disableService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1890,36 +4122,64 @@ class Mutation$DisableService$disableService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$DisableService$disableServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DisableService$disableService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1928,26 +4188,35 @@ extension UtilityExtension$Mutation$DisableService$disableService on Mutation$DisableService$disableService { CopyWith$Mutation$DisableService$disableService< Mutation$DisableService$disableService> - get copyWith => - CopyWith$Mutation$DisableService$disableService(this, (i) => i); + get copyWith => CopyWith$Mutation$DisableService$disableService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DisableService$disableService { factory CopyWith$Mutation$DisableService$disableService( - Mutation$DisableService$disableService instance, - TRes Function(Mutation$DisableService$disableService) then) = - _CopyWithImpl$Mutation$DisableService$disableService; + Mutation$DisableService$disableService instance, + TRes Function(Mutation$DisableService$disableService) then, + ) = _CopyWithImpl$Mutation$DisableService$disableService; factory CopyWith$Mutation$DisableService$disableService.stub(TRes res) = _CopyWithStubImpl$Mutation$DisableService$disableService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$DisableService$disableService implements CopyWith$Mutation$DisableService$disableService { _CopyWithImpl$Mutation$DisableService$disableService( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$DisableService$disableService _instance; @@ -1955,24 +4224,25 @@ class _CopyWithImpl$Mutation$DisableService$disableService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DisableService$disableService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$DisableService$disableService @@ -1981,46 +4251,74 @@ class _CopyWithStubImpl$Mutation$DisableService$disableService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$StopService { - Variables$Mutation$StopService({required this.serviceId}); + factory Variables$Mutation$StopService({required String serviceId}) => + Variables$Mutation$StopService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$StopService._(this._$data); + + factory Variables$Mutation$StopService.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$StopService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$StopService + get copyWith => CopyWith$Variables$Mutation$StopService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$StopService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$StopService.fromJson(Map json) => - _$Variables$Mutation$StopServiceFromJson(json); - - final String serviceId; - - Map toJson() => _$Variables$Mutation$StopServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$StopService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$StopService - get copyWith => CopyWith$Variables$Mutation$StopService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$StopService { factory CopyWith$Variables$Mutation$StopService( - Variables$Mutation$StopService instance, - TRes Function(Variables$Mutation$StopService) then) = - _CopyWithImpl$Variables$Mutation$StopService; + Variables$Mutation$StopService instance, + TRes Function(Variables$Mutation$StopService) then, + ) = _CopyWithImpl$Variables$Mutation$StopService; factory CopyWith$Variables$Mutation$StopService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$StopService; @@ -2030,7 +4328,10 @@ abstract class CopyWith$Variables$Mutation$StopService { class _CopyWithImpl$Variables$Mutation$StopService implements CopyWith$Variables$Mutation$StopService { - _CopyWithImpl$Variables$Mutation$StopService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$StopService( + this._instance, + this._then, + ); final Variables$Mutation$StopService _instance; @@ -2039,10 +4340,11 @@ class _CopyWithImpl$Variables$Mutation$StopService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$StopService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$StopService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$StopService @@ -2054,62 +4356,97 @@ class _CopyWithStubImpl$Variables$Mutation$StopService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$StopService { - Mutation$StopService({required this.stopService, required this.$__typename}); + Mutation$StopService({ + required this.stopService, + required this.$__typename, + }); - @override - factory Mutation$StopService.fromJson(Map json) => - _$Mutation$StopServiceFromJson(json); + factory Mutation$StopService.fromJson(Map json) { + final l$stopService = json['stopService']; + final l$$__typename = json['__typename']; + return Mutation$StopService( + stopService: Mutation$StopService$stopService.fromJson( + (l$stopService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$StopService$stopService stopService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$StopServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$stopService = stopService; + _resultData['stopService'] = l$stopService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$stopService = stopService; final l$$__typename = $__typename; - return Object.hashAll([l$stopService, l$$__typename]); + return Object.hashAll([ + l$stopService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$StopService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$StopService) || runtimeType != other.runtimeType) { return false; + } final l$stopService = stopService; final lOther$stopService = other.stopService; - if (l$stopService != lOther$stopService) return false; + if (l$stopService != lOther$stopService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$StopService on Mutation$StopService { CopyWith$Mutation$StopService get copyWith => - CopyWith$Mutation$StopService(this, (i) => i); + CopyWith$Mutation$StopService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StopService { - factory CopyWith$Mutation$StopService(Mutation$StopService instance, - TRes Function(Mutation$StopService) then) = - _CopyWithImpl$Mutation$StopService; + factory CopyWith$Mutation$StopService( + Mutation$StopService instance, + TRes Function(Mutation$StopService) then, + ) = _CopyWithImpl$Mutation$StopService; factory CopyWith$Mutation$StopService.stub(TRes res) = _CopyWithStubImpl$Mutation$StopService; - TRes call( - {Mutation$StopService$stopService? stopService, String? $__typename}); + TRes call({ + Mutation$StopService$stopService? stopService, + String? $__typename, + }); CopyWith$Mutation$StopService$stopService get stopService; } class _CopyWithImpl$Mutation$StopService implements CopyWith$Mutation$StopService { - _CopyWithImpl$Mutation$StopService(this._instance, this._then); + _CopyWithImpl$Mutation$StopService( + this._instance, + this._then, + ); final Mutation$StopService _instance; @@ -2117,16 +4454,18 @@ class _CopyWithImpl$Mutation$StopService static const _undefined = {}; - TRes call( - {Object? stopService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? stopService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StopService( - stopService: stopService == _undefined || stopService == null - ? _instance.stopService - : (stopService as Mutation$StopService$stopService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + stopService: stopService == _undefined || stopService == null + ? _instance.stopService + : (stopService as Mutation$StopService$stopService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$StopService$stopService get stopService { final local$stopService = _instance.stopService; return CopyWith$Mutation$StopService$stopService( @@ -2140,7 +4479,10 @@ class _CopyWithStubImpl$Mutation$StopService TRes _res; - call({Mutation$StopService$stopService? stopService, String? $__typename}) => + call({ + Mutation$StopService$stopService? stopService, + String? $__typename, + }) => _res; CopyWith$Mutation$StopService$stopService get stopService => CopyWith$Mutation$StopService$stopService.stub(_res); @@ -2148,83 +4490,97 @@ class _CopyWithStubImpl$Mutation$StopService const documentNodeMutationStopService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'StopService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'stopService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'StopService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'stopService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$StopService _parserFn$Mutation$StopService( Map data) => Mutation$StopService.fromJson(data); typedef OnMutationCompleted$Mutation$StopService = FutureOr Function( - dynamic, Mutation$StopService?); + dynamic, + Mutation$StopService?, +); class Options$Mutation$StopService extends graphql.MutationOptions { - Options$Mutation$StopService( - {String? operationName, - required Variables$Mutation$StopService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$StopService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$StopService({ + String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StopService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$StopService(data)), - update: update, - onError: onError, - document: documentNodeMutationStopService, - parserFn: _parserFn$Mutation$StopService); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$StopService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationStopService, + parserFn: _parserFn$Mutation$StopService, + ); final OnMutationCompleted$Mutation$StopService? onCompletedWithParsed; @@ -2233,38 +4589,39 @@ class Options$Mutation$StopService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$StopService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$StopService( - {String? operationName, - required Variables$Mutation$StopService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationStopService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$StopService); + WatchOptions$Mutation$StopService({ + String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStopService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StopService, + ); } extension ClientExtension$Mutation$StopService on graphql.GraphQLClient { @@ -2276,19 +4633,27 @@ extension ClientExtension$Mutation$StopService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$StopService$stopService - implements Fragment$basicMutationReturnFields { - Mutation$StopService$stopService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$StopService$stopService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$StopService$stopService.fromJson( - Map json) => - _$Mutation$StopService$stopServiceFromJson(json); + factory Mutation$StopService$stopService.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$StopService$stopService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2296,36 +4661,64 @@ class Mutation$StopService$stopService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$StopService$stopServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$StopService$stopService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2333,24 +4726,35 @@ class Mutation$StopService$stopService extension UtilityExtension$Mutation$StopService$stopService on Mutation$StopService$stopService { CopyWith$Mutation$StopService$stopService - get copyWith => CopyWith$Mutation$StopService$stopService(this, (i) => i); + get copyWith => CopyWith$Mutation$StopService$stopService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StopService$stopService { factory CopyWith$Mutation$StopService$stopService( - Mutation$StopService$stopService instance, - TRes Function(Mutation$StopService$stopService) then) = - _CopyWithImpl$Mutation$StopService$stopService; + Mutation$StopService$stopService instance, + TRes Function(Mutation$StopService$stopService) then, + ) = _CopyWithImpl$Mutation$StopService$stopService; factory CopyWith$Mutation$StopService$stopService.stub(TRes res) = _CopyWithStubImpl$Mutation$StopService$stopService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$StopService$stopService implements CopyWith$Mutation$StopService$stopService { - _CopyWithImpl$Mutation$StopService$stopService(this._instance, this._then); + _CopyWithImpl$Mutation$StopService$stopService( + this._instance, + this._then, + ); final Mutation$StopService$stopService _instance; @@ -2358,24 +4762,25 @@ class _CopyWithImpl$Mutation$StopService$stopService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StopService$stopService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$StopService$stopService @@ -2384,47 +4789,74 @@ class _CopyWithStubImpl$Mutation$StopService$stopService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$StartService { - Variables$Mutation$StartService({required this.serviceId}); + factory Variables$Mutation$StartService({required String serviceId}) => + Variables$Mutation$StartService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$StartService._(this._$data); + + factory Variables$Mutation$StartService.fromJson(Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$StartService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$StartService + get copyWith => CopyWith$Variables$Mutation$StartService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$StartService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$StartService.fromJson(Map json) => - _$Variables$Mutation$StartServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$StartServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$StartService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$StartService - get copyWith => CopyWith$Variables$Mutation$StartService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$StartService { factory CopyWith$Variables$Mutation$StartService( - Variables$Mutation$StartService instance, - TRes Function(Variables$Mutation$StartService) then) = - _CopyWithImpl$Variables$Mutation$StartService; + Variables$Mutation$StartService instance, + TRes Function(Variables$Mutation$StartService) then, + ) = _CopyWithImpl$Variables$Mutation$StartService; factory CopyWith$Variables$Mutation$StartService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$StartService; @@ -2434,7 +4866,10 @@ abstract class CopyWith$Variables$Mutation$StartService { class _CopyWithImpl$Variables$Mutation$StartService implements CopyWith$Variables$Mutation$StartService { - _CopyWithImpl$Variables$Mutation$StartService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$StartService( + this._instance, + this._then, + ); final Variables$Mutation$StartService _instance; @@ -2443,10 +4878,11 @@ class _CopyWithImpl$Variables$Mutation$StartService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$StartService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$StartService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$StartService @@ -2458,63 +4894,97 @@ class _CopyWithStubImpl$Variables$Mutation$StartService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$StartService { - Mutation$StartService( - {required this.startService, required this.$__typename}); + Mutation$StartService({ + required this.startService, + required this.$__typename, + }); - @override - factory Mutation$StartService.fromJson(Map json) => - _$Mutation$StartServiceFromJson(json); + factory Mutation$StartService.fromJson(Map json) { + final l$startService = json['startService']; + final l$$__typename = json['__typename']; + return Mutation$StartService( + startService: Mutation$StartService$startService.fromJson( + (l$startService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$StartService$startService startService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$StartServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$startService = startService; + _resultData['startService'] = l$startService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$startService = startService; final l$$__typename = $__typename; - return Object.hashAll([l$startService, l$$__typename]); + return Object.hashAll([ + l$startService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$StartService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$StartService) || runtimeType != other.runtimeType) { return false; + } final l$startService = startService; final lOther$startService = other.startService; - if (l$startService != lOther$startService) return false; + if (l$startService != lOther$startService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$StartService on Mutation$StartService { CopyWith$Mutation$StartService get copyWith => - CopyWith$Mutation$StartService(this, (i) => i); + CopyWith$Mutation$StartService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StartService { - factory CopyWith$Mutation$StartService(Mutation$StartService instance, - TRes Function(Mutation$StartService) then) = - _CopyWithImpl$Mutation$StartService; + factory CopyWith$Mutation$StartService( + Mutation$StartService instance, + TRes Function(Mutation$StartService) then, + ) = _CopyWithImpl$Mutation$StartService; factory CopyWith$Mutation$StartService.stub(TRes res) = _CopyWithStubImpl$Mutation$StartService; - TRes call( - {Mutation$StartService$startService? startService, String? $__typename}); + TRes call({ + Mutation$StartService$startService? startService, + String? $__typename, + }); CopyWith$Mutation$StartService$startService get startService; } class _CopyWithImpl$Mutation$StartService implements CopyWith$Mutation$StartService { - _CopyWithImpl$Mutation$StartService(this._instance, this._then); + _CopyWithImpl$Mutation$StartService( + this._instance, + this._then, + ); final Mutation$StartService _instance; @@ -2522,16 +4992,18 @@ class _CopyWithImpl$Mutation$StartService static const _undefined = {}; - TRes call( - {Object? startService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? startService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StartService( - startService: startService == _undefined || startService == null - ? _instance.startService - : (startService as Mutation$StartService$startService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + startService: startService == _undefined || startService == null + ? _instance.startService + : (startService as Mutation$StartService$startService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$StartService$startService get startService { final local$startService = _instance.startService; return CopyWith$Mutation$StartService$startService( @@ -2545,9 +5017,10 @@ class _CopyWithStubImpl$Mutation$StartService TRes _res; - call( - {Mutation$StartService$startService? startService, - String? $__typename}) => + call({ + Mutation$StartService$startService? startService, + String? $__typename, + }) => _res; CopyWith$Mutation$StartService$startService get startService => CopyWith$Mutation$StartService$startService.stub(_res); @@ -2555,86 +5028,97 @@ class _CopyWithStubImpl$Mutation$StartService const documentNodeMutationStartService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'StartService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'startService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'StartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'startService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$StartService _parserFn$Mutation$StartService( Map data) => Mutation$StartService.fromJson(data); typedef OnMutationCompleted$Mutation$StartService = FutureOr Function( - dynamic, Mutation$StartService?); + dynamic, + Mutation$StartService?, +); class Options$Mutation$StartService extends graphql.MutationOptions { - Options$Mutation$StartService( - {String? operationName, - required Variables$Mutation$StartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$StartService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$StartService({ + String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$StartService(data)), - update: update, - onError: onError, - document: documentNodeMutationStartService, - parserFn: _parserFn$Mutation$StartService); + data == null ? null : _parserFn$Mutation$StartService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationStartService, + parserFn: _parserFn$Mutation$StartService, + ); final OnMutationCompleted$Mutation$StartService? onCompletedWithParsed; @@ -2643,38 +5127,39 @@ class Options$Mutation$StartService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$StartService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$StartService( - {String? operationName, - required Variables$Mutation$StartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationStartService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$StartService); + WatchOptions$Mutation$StartService({ + String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StartService, + ); } extension ClientExtension$Mutation$StartService on graphql.GraphQLClient { @@ -2686,19 +5171,28 @@ extension ClientExtension$Mutation$StartService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$StartService$startService - implements Fragment$basicMutationReturnFields { - Mutation$StartService$startService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$StartService$startService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$StartService$startService.fromJson( - Map json) => - _$Mutation$StartService$startServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$StartService$startService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -2706,36 +5200,64 @@ class Mutation$StartService$startService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$StartService$startServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$StartService$startService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -2744,25 +5266,35 @@ extension UtilityExtension$Mutation$StartService$startService on Mutation$StartService$startService { CopyWith$Mutation$StartService$startService< Mutation$StartService$startService> - get copyWith => - CopyWith$Mutation$StartService$startService(this, (i) => i); + get copyWith => CopyWith$Mutation$StartService$startService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$StartService$startService { factory CopyWith$Mutation$StartService$startService( - Mutation$StartService$startService instance, - TRes Function(Mutation$StartService$startService) then) = - _CopyWithImpl$Mutation$StartService$startService; + Mutation$StartService$startService instance, + TRes Function(Mutation$StartService$startService) then, + ) = _CopyWithImpl$Mutation$StartService$startService; factory CopyWith$Mutation$StartService$startService.stub(TRes res) = _CopyWithStubImpl$Mutation$StartService$startService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$StartService$startService implements CopyWith$Mutation$StartService$startService { - _CopyWithImpl$Mutation$StartService$startService(this._instance, this._then); + _CopyWithImpl$Mutation$StartService$startService( + this._instance, + this._then, + ); final Mutation$StartService$startService _instance; @@ -2770,24 +5302,25 @@ class _CopyWithImpl$Mutation$StartService$startService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$StartService$startService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$StartService$startService @@ -2796,49 +5329,75 @@ class _CopyWithStubImpl$Mutation$StartService$startService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$RestartService { - Variables$Mutation$RestartService({required this.serviceId}); + factory Variables$Mutation$RestartService({required String serviceId}) => + Variables$Mutation$RestartService._({ + r'serviceId': serviceId, + }); + + Variables$Mutation$RestartService._(this._$data); + + factory Variables$Mutation$RestartService.fromJson( + Map data) { + final result$data = {}; + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); + return Variables$Mutation$RestartService._(result$data); + } + + Map _$data; + + String get serviceId => (_$data['serviceId'] as String); + Map toJson() { + final result$data = {}; + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + return result$data; + } + + CopyWith$Variables$Mutation$RestartService + get copyWith => CopyWith$Variables$Mutation$RestartService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$RestartService) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } @override - factory Variables$Mutation$RestartService.fromJson( - Map json) => - _$Variables$Mutation$RestartServiceFromJson(json); - - final String serviceId; - - Map toJson() => - _$Variables$Mutation$RestartServiceToJson(this); int get hashCode { final l$serviceId = serviceId; return Object.hashAll([l$serviceId]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RestartService) || - runtimeType != other.runtimeType) return false; - final l$serviceId = serviceId; - final lOther$serviceId = other.serviceId; - if (l$serviceId != lOther$serviceId) return false; - return true; - } - - CopyWith$Variables$Mutation$RestartService - get copyWith => - CopyWith$Variables$Mutation$RestartService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RestartService { factory CopyWith$Variables$Mutation$RestartService( - Variables$Mutation$RestartService instance, - TRes Function(Variables$Mutation$RestartService) then) = - _CopyWithImpl$Variables$Mutation$RestartService; + Variables$Mutation$RestartService instance, + TRes Function(Variables$Mutation$RestartService) then, + ) = _CopyWithImpl$Variables$Mutation$RestartService; factory CopyWith$Variables$Mutation$RestartService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RestartService; @@ -2848,7 +5407,10 @@ abstract class CopyWith$Variables$Mutation$RestartService { class _CopyWithImpl$Variables$Mutation$RestartService implements CopyWith$Variables$Mutation$RestartService { - _CopyWithImpl$Variables$Mutation$RestartService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$RestartService( + this._instance, + this._then, + ); final Variables$Mutation$RestartService _instance; @@ -2857,10 +5419,11 @@ class _CopyWithImpl$Variables$Mutation$RestartService static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => - _then(Variables$Mutation$RestartService( - serviceId: serviceId == _undefined || serviceId == null - ? _instance.serviceId - : (serviceId as String))); + _then(Variables$Mutation$RestartService._({ + ..._instance._$data, + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), + })); } class _CopyWithStubImpl$Variables$Mutation$RestartService @@ -2872,64 +5435,98 @@ class _CopyWithStubImpl$Variables$Mutation$RestartService call({String? serviceId}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RestartService { - Mutation$RestartService( - {required this.restartService, required this.$__typename}); + Mutation$RestartService({ + required this.restartService, + required this.$__typename, + }); - @override - factory Mutation$RestartService.fromJson(Map json) => - _$Mutation$RestartServiceFromJson(json); + factory Mutation$RestartService.fromJson(Map json) { + final l$restartService = json['restartService']; + final l$$__typename = json['__typename']; + return Mutation$RestartService( + restartService: Mutation$RestartService$restartService.fromJson( + (l$restartService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RestartService$restartService restartService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RestartServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$restartService = restartService; + _resultData['restartService'] = l$restartService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$restartService = restartService; final l$$__typename = $__typename; - return Object.hashAll([l$restartService, l$$__typename]); + return Object.hashAll([ + l$restartService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RestartService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RestartService) || + runtimeType != other.runtimeType) { return false; + } final l$restartService = restartService; final lOther$restartService = other.restartService; - if (l$restartService != lOther$restartService) return false; + if (l$restartService != lOther$restartService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RestartService on Mutation$RestartService { CopyWith$Mutation$RestartService get copyWith => - CopyWith$Mutation$RestartService(this, (i) => i); + CopyWith$Mutation$RestartService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RestartService { - factory CopyWith$Mutation$RestartService(Mutation$RestartService instance, - TRes Function(Mutation$RestartService) then) = - _CopyWithImpl$Mutation$RestartService; + factory CopyWith$Mutation$RestartService( + Mutation$RestartService instance, + TRes Function(Mutation$RestartService) then, + ) = _CopyWithImpl$Mutation$RestartService; factory CopyWith$Mutation$RestartService.stub(TRes res) = _CopyWithStubImpl$Mutation$RestartService; - TRes call( - {Mutation$RestartService$restartService? restartService, - String? $__typename}); + TRes call({ + Mutation$RestartService$restartService? restartService, + String? $__typename, + }); CopyWith$Mutation$RestartService$restartService get restartService; } class _CopyWithImpl$Mutation$RestartService implements CopyWith$Mutation$RestartService { - _CopyWithImpl$Mutation$RestartService(this._instance, this._then); + _CopyWithImpl$Mutation$RestartService( + this._instance, + this._then, + ); final Mutation$RestartService _instance; @@ -2937,16 +5534,18 @@ class _CopyWithImpl$Mutation$RestartService static const _undefined = {}; - TRes call( - {Object? restartService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? restartService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RestartService( - restartService: restartService == _undefined || restartService == null - ? _instance.restartService - : (restartService as Mutation$RestartService$restartService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + restartService: restartService == _undefined || restartService == null + ? _instance.restartService + : (restartService as Mutation$RestartService$restartService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RestartService$restartService get restartService { final local$restartService = _instance.restartService; return CopyWith$Mutation$RestartService$restartService( @@ -2960,9 +5559,10 @@ class _CopyWithStubImpl$Mutation$RestartService TRes _res; - call( - {Mutation$RestartService$restartService? restartService, - String? $__typename}) => + call({ + Mutation$RestartService$restartService? restartService, + String? $__typename, + }) => _res; CopyWith$Mutation$RestartService$restartService get restartService => CopyWith$Mutation$RestartService$restartService.stub(_res); @@ -2970,86 +5570,99 @@ class _CopyWithStubImpl$Mutation$RestartService const documentNodeMutationRestartService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RestartService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'serviceId')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'restartService'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'RestartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'restartService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$RestartService _parserFn$Mutation$RestartService( Map data) => Mutation$RestartService.fromJson(data); typedef OnMutationCompleted$Mutation$RestartService = FutureOr Function( - dynamic, Mutation$RestartService?); + dynamic, + Mutation$RestartService?, +); class Options$Mutation$RestartService extends graphql.MutationOptions { - Options$Mutation$RestartService( - {String? operationName, - required Variables$Mutation$RestartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RestartService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RestartService({ + String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RestartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, data == null ? null - : _parserFn$Mutation$RestartService(data)), - update: update, - onError: onError, - document: documentNodeMutationRestartService, - parserFn: _parserFn$Mutation$RestartService); + : _parserFn$Mutation$RestartService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRestartService, + parserFn: _parserFn$Mutation$RestartService, + ); final OnMutationCompleted$Mutation$RestartService? onCompletedWithParsed; @@ -3058,38 +5671,39 @@ class Options$Mutation$RestartService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RestartService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RestartService( - {String? operationName, - required Variables$Mutation$RestartService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRestartService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RestartService); + WatchOptions$Mutation$RestartService({ + String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRestartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RestartService, + ); } extension ClientExtension$Mutation$RestartService on graphql.GraphQLClient { @@ -3101,19 +5715,28 @@ extension ClientExtension$Mutation$RestartService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$RestartService$restartService - implements Fragment$basicMutationReturnFields { - Mutation$RestartService$restartService( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$ServiceMutationReturn { + Mutation$RestartService$restartService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Mutation$RestartService$restartService.fromJson( - Map json) => - _$Mutation$RestartService$restartServiceFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$RestartService$restartService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -3121,36 +5744,64 @@ class Mutation$RestartService$restartService final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$RestartService$restartServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RestartService$restartService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3159,26 +5810,35 @@ extension UtilityExtension$Mutation$RestartService$restartService on Mutation$RestartService$restartService { CopyWith$Mutation$RestartService$restartService< Mutation$RestartService$restartService> - get copyWith => - CopyWith$Mutation$RestartService$restartService(this, (i) => i); + get copyWith => CopyWith$Mutation$RestartService$restartService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RestartService$restartService { factory CopyWith$Mutation$RestartService$restartService( - Mutation$RestartService$restartService instance, - TRes Function(Mutation$RestartService$restartService) then) = - _CopyWithImpl$Mutation$RestartService$restartService; + Mutation$RestartService$restartService instance, + TRes Function(Mutation$RestartService$restartService) then, + ) = _CopyWithImpl$Mutation$RestartService$restartService; factory CopyWith$Mutation$RestartService$restartService.stub(TRes res) = _CopyWithStubImpl$Mutation$RestartService$restartService; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$RestartService$restartService implements CopyWith$Mutation$RestartService$restartService { _CopyWithImpl$Mutation$RestartService$restartService( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$RestartService$restartService _instance; @@ -3186,24 +5846,25 @@ class _CopyWithImpl$Mutation$RestartService$restartService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RestartService$restartService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$RestartService$restartService @@ -3212,46 +5873,77 @@ class _CopyWithStubImpl$Mutation$RestartService$restartService TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$MoveService { - Variables$Mutation$MoveService({required this.input}); + factory Variables$Mutation$MoveService( + {required Input$MoveServiceInput input}) => + Variables$Mutation$MoveService._({ + r'input': input, + }); + + Variables$Mutation$MoveService._(this._$data); + + factory Variables$Mutation$MoveService.fromJson(Map data) { + final result$data = {}; + final l$input = data['input']; + result$data['input'] = + Input$MoveServiceInput.fromJson((l$input as Map)); + return Variables$Mutation$MoveService._(result$data); + } + + Map _$data; + + Input$MoveServiceInput get input => + (_$data['input'] as Input$MoveServiceInput); + Map toJson() { + final result$data = {}; + final l$input = input; + result$data['input'] = l$input.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$MoveService + get copyWith => CopyWith$Variables$Mutation$MoveService( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$MoveService) || + runtimeType != other.runtimeType) { + return false; + } + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) { + return false; + } + return true; + } @override - factory Variables$Mutation$MoveService.fromJson(Map json) => - _$Variables$Mutation$MoveServiceFromJson(json); - - final Input$MoveServiceInput input; - - Map toJson() => _$Variables$Mutation$MoveServiceToJson(this); int get hashCode { final l$input = input; return Object.hashAll([l$input]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MoveService) || - runtimeType != other.runtimeType) return false; - final l$input = input; - final lOther$input = other.input; - if (l$input != lOther$input) return false; - return true; - } - - CopyWith$Variables$Mutation$MoveService - get copyWith => CopyWith$Variables$Mutation$MoveService(this, (i) => i); } abstract class CopyWith$Variables$Mutation$MoveService { factory CopyWith$Variables$Mutation$MoveService( - Variables$Mutation$MoveService instance, - TRes Function(Variables$Mutation$MoveService) then) = - _CopyWithImpl$Variables$Mutation$MoveService; + Variables$Mutation$MoveService instance, + TRes Function(Variables$Mutation$MoveService) then, + ) = _CopyWithImpl$Variables$Mutation$MoveService; factory CopyWith$Variables$Mutation$MoveService.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$MoveService; @@ -3261,7 +5953,10 @@ abstract class CopyWith$Variables$Mutation$MoveService { class _CopyWithImpl$Variables$Mutation$MoveService implements CopyWith$Variables$Mutation$MoveService { - _CopyWithImpl$Variables$Mutation$MoveService(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$MoveService( + this._instance, + this._then, + ); final Variables$Mutation$MoveService _instance; @@ -3270,10 +5965,11 @@ class _CopyWithImpl$Variables$Mutation$MoveService static const _undefined = {}; TRes call({Object? input = _undefined}) => - _then(Variables$Mutation$MoveService( - input: input == _undefined || input == null - ? _instance.input - : (input as Input$MoveServiceInput))); + _then(Variables$Mutation$MoveService._({ + ..._instance._$data, + if (input != _undefined && input != null) + 'input': (input as Input$MoveServiceInput), + })); } class _CopyWithStubImpl$Variables$Mutation$MoveService @@ -3285,62 +5981,97 @@ class _CopyWithStubImpl$Variables$Mutation$MoveService call({Input$MoveServiceInput? input}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$MoveService { - Mutation$MoveService({required this.moveService, required this.$__typename}); + Mutation$MoveService({ + required this.moveService, + required this.$__typename, + }); - @override - factory Mutation$MoveService.fromJson(Map json) => - _$Mutation$MoveServiceFromJson(json); + factory Mutation$MoveService.fromJson(Map json) { + final l$moveService = json['moveService']; + final l$$__typename = json['__typename']; + return Mutation$MoveService( + moveService: Mutation$MoveService$moveService.fromJson( + (l$moveService as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$MoveService$moveService moveService; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MoveServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$moveService = moveService; + _resultData['moveService'] = l$moveService.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$moveService = moveService; final l$$__typename = $__typename; - return Object.hashAll([l$moveService, l$$__typename]); + return Object.hashAll([ + l$moveService, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$MoveService) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$MoveService) || runtimeType != other.runtimeType) { return false; + } final l$moveService = moveService; final lOther$moveService = other.moveService; - if (l$moveService != lOther$moveService) return false; + if (l$moveService != lOther$moveService) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$MoveService on Mutation$MoveService { CopyWith$Mutation$MoveService get copyWith => - CopyWith$Mutation$MoveService(this, (i) => i); + CopyWith$Mutation$MoveService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MoveService { - factory CopyWith$Mutation$MoveService(Mutation$MoveService instance, - TRes Function(Mutation$MoveService) then) = - _CopyWithImpl$Mutation$MoveService; + factory CopyWith$Mutation$MoveService( + Mutation$MoveService instance, + TRes Function(Mutation$MoveService) then, + ) = _CopyWithImpl$Mutation$MoveService; factory CopyWith$Mutation$MoveService.stub(TRes res) = _CopyWithStubImpl$Mutation$MoveService; - TRes call( - {Mutation$MoveService$moveService? moveService, String? $__typename}); + TRes call({ + Mutation$MoveService$moveService? moveService, + String? $__typename, + }); CopyWith$Mutation$MoveService$moveService get moveService; } class _CopyWithImpl$Mutation$MoveService implements CopyWith$Mutation$MoveService { - _CopyWithImpl$Mutation$MoveService(this._instance, this._then); + _CopyWithImpl$Mutation$MoveService( + this._instance, + this._then, + ); final Mutation$MoveService _instance; @@ -3348,16 +6079,18 @@ class _CopyWithImpl$Mutation$MoveService static const _undefined = {}; - TRes call( - {Object? moveService = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? moveService = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MoveService( - moveService: moveService == _undefined || moveService == null - ? _instance.moveService - : (moveService as Mutation$MoveService$moveService), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + moveService: moveService == _undefined || moveService == null + ? _instance.moveService + : (moveService as Mutation$MoveService$moveService), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$MoveService$moveService get moveService { final local$moveService = _instance.moveService; return CopyWith$Mutation$MoveService$moveService( @@ -3371,7 +6104,10 @@ class _CopyWithStubImpl$Mutation$MoveService TRes _res; - call({Mutation$MoveService$moveService? moveService, String? $__typename}) => + call({ + Mutation$MoveService$moveService? moveService, + String? $__typename, + }) => _res; CopyWith$Mutation$MoveService$moveService get moveService => CopyWith$Mutation$MoveService$moveService.stub(_res); @@ -3379,162 +6115,189 @@ class _CopyWithStubImpl$Mutation$MoveService const documentNodeMutationMoveService = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'MoveService'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'input')), - type: NamedTypeNode( - name: NameNode(value: 'MoveServiceInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'moveService'), + type: OperationType.mutation, + name: NameNode(value: 'MoveService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MoveServiceInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'moveService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'job'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'input'), - value: VariableNode(name: NameNode(value: 'input'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), FieldNode( - name: NameNode(value: 'job'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$MoveService _parserFn$Mutation$MoveService( Map data) => Mutation$MoveService.fromJson(data); typedef OnMutationCompleted$Mutation$MoveService = FutureOr Function( - dynamic, Mutation$MoveService?); + dynamic, + Mutation$MoveService?, +); class Options$Mutation$MoveService extends graphql.MutationOptions { - Options$Mutation$MoveService( - {String? operationName, - required Variables$Mutation$MoveService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$MoveService? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$MoveService({ + String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MoveService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$MoveService(data)), - update: update, - onError: onError, - document: documentNodeMutationMoveService, - parserFn: _parserFn$Mutation$MoveService); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$MoveService(data), + ), + update: update, + onError: onError, + document: documentNodeMutationMoveService, + parserFn: _parserFn$Mutation$MoveService, + ); final OnMutationCompleted$Mutation$MoveService? onCompletedWithParsed; @@ -3543,38 +6306,39 @@ class Options$Mutation$MoveService ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$MoveService extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MoveService( - {String? operationName, - required Variables$Mutation$MoveService variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationMoveService, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MoveService); + WatchOptions$Mutation$MoveService({ + String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMoveService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MoveService, + ); } extension ClientExtension$Mutation$MoveService on graphql.GraphQLClient { @@ -3586,20 +6350,33 @@ extension ClientExtension$Mutation$MoveService on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$MoveService$moveService - implements Fragment$basicMutationReturnFields { - Mutation$MoveService$moveService( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.job}); + implements Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + Mutation$MoveService$moveService({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job, + }); - @override - factory Mutation$MoveService$moveService.fromJson( - Map json) => - _$Mutation$MoveService$moveServiceFromJson(json); + factory Mutation$MoveService$moveService.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$job = json['job']; + return Mutation$MoveService$moveService( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + job: l$job == null + ? null + : Mutation$MoveService$moveService$job.fromJson( + (l$job as Map)), + ); + } final int code; @@ -3607,42 +6384,75 @@ class Mutation$MoveService$moveService final bool success; - @JsonKey(name: '__typename') final String $__typename; final Mutation$MoveService$moveService$job? job; - Map toJson() => - _$Mutation$MoveService$moveServiceToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$job = job; + _resultData['job'] = l$job?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$job = job; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$job, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MoveService$moveService) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$job = job; final lOther$job = other.job; - if (l$job != lOther$job) return false; + if (l$job != lOther$job) { + return false; + } return true; } } @@ -3650,30 +6460,37 @@ class Mutation$MoveService$moveService extension UtilityExtension$Mutation$MoveService$moveService on Mutation$MoveService$moveService { CopyWith$Mutation$MoveService$moveService - get copyWith => CopyWith$Mutation$MoveService$moveService(this, (i) => i); + get copyWith => CopyWith$Mutation$MoveService$moveService( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MoveService$moveService { factory CopyWith$Mutation$MoveService$moveService( - Mutation$MoveService$moveService instance, - TRes Function(Mutation$MoveService$moveService) then) = - _CopyWithImpl$Mutation$MoveService$moveService; + Mutation$MoveService$moveService instance, + TRes Function(Mutation$MoveService$moveService) then, + ) = _CopyWithImpl$Mutation$MoveService$moveService; factory CopyWith$Mutation$MoveService$moveService.stub(TRes res) = _CopyWithStubImpl$Mutation$MoveService$moveService; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MoveService$moveService$job? job}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MoveService$moveService$job? job, + }); CopyWith$Mutation$MoveService$moveService$job get job; } class _CopyWithImpl$Mutation$MoveService$moveService implements CopyWith$Mutation$MoveService$moveService { - _CopyWithImpl$Mutation$MoveService$moveService(this._instance, this._then); + _CopyWithImpl$Mutation$MoveService$moveService( + this._instance, + this._then, + ); final Mutation$MoveService$moveService _instance; @@ -3681,28 +6498,29 @@ class _CopyWithImpl$Mutation$MoveService$moveService static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? job = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? job = _undefined, + }) => _then(Mutation$MoveService$moveService( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - job: job == _undefined - ? _instance.job - : (job as Mutation$MoveService$moveService$job?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Mutation$MoveService$moveService$job?), + )); CopyWith$Mutation$MoveService$moveService$job get job { final local$job = _instance.job; return local$job == null @@ -3718,47 +6536,70 @@ class _CopyWithStubImpl$Mutation$MoveService$moveService TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Mutation$MoveService$moveService$job? job}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MoveService$moveService$job? job, + }) => _res; CopyWith$Mutation$MoveService$moveService$job get job => CopyWith$Mutation$MoveService$moveService$job.stub(_res); } -@JsonSerializable(explicitToJson: true) class Mutation$MoveService$moveService$job { - Mutation$MoveService$moveService$job( - {required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - required this.$__typename}); + Mutation$MoveService$moveService$job({ + required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename, + }); - @override factory Mutation$MoveService$moveService$job.fromJson( - Map json) => - _$Mutation$MoveService$moveService$jobFromJson(json); + Map json) { + final l$createdAt = json['createdAt']; + final l$description = json['description']; + final l$error = json['error']; + final l$finishedAt = json['finishedAt']; + final l$name = json['name']; + final l$progress = json['progress']; + final l$result = json['result']; + final l$status = json['status']; + final l$statusText = json['statusText']; + final l$uid = json['uid']; + final l$updatedAt = json['updatedAt']; + final l$$__typename = json['__typename']; + return Mutation$MoveService$moveService$job( + createdAt: dateTimeFromJson(l$createdAt), + description: (l$description as String), + error: (l$error as String?), + finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), + name: (l$name as String), + progress: (l$progress as int?), + result: (l$result as String?), + status: (l$status as String), + statusText: (l$statusText as String?), + uid: (l$uid as String), + updatedAt: dateTimeFromJson(l$updatedAt), + $__typename: (l$$__typename as String), + ); + } - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime createdAt; final String description; final String? error; - @JsonKey( - fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) final DateTime? finishedAt; final String name; @@ -3773,14 +6614,41 @@ class Mutation$MoveService$moveService$job { final String uid; - @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime updatedAt; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Mutation$MoveService$moveService$jobToJson(this); + Map toJson() { + final _resultData = {}; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$description = description; + _resultData['description'] = l$description; + final l$error = error; + _resultData['error'] = l$error; + final l$finishedAt = finishedAt; + _resultData['finishedAt'] = + l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); + final l$name = name; + _resultData['name'] = l$name; + final l$progress = progress; + _resultData['progress'] = l$progress; + final l$result = result; + _resultData['result'] = l$result; + final l$status = status; + _resultData['status'] = l$status; + final l$statusText = statusText; + _resultData['statusText'] = l$statusText; + final l$uid = uid; + _resultData['uid'] = l$uid; + final l$updatedAt = updatedAt; + _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createdAt = createdAt; final l$description = description; @@ -3806,51 +6674,79 @@ class Mutation$MoveService$moveService$job { l$statusText, l$uid, l$updatedAt, - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$MoveService$moveService$job) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$createdAt = createdAt; final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) return false; + if (l$createdAt != lOther$createdAt) { + return false; + } final l$description = description; final lOther$description = other.description; - if (l$description != lOther$description) return false; + if (l$description != lOther$description) { + return false; + } final l$error = error; final lOther$error = other.error; - if (l$error != lOther$error) return false; + if (l$error != lOther$error) { + return false; + } final l$finishedAt = finishedAt; final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) return false; + if (l$finishedAt != lOther$finishedAt) { + return false; + } final l$name = name; final lOther$name = other.name; - if (l$name != lOther$name) return false; + if (l$name != lOther$name) { + return false; + } final l$progress = progress; final lOther$progress = other.progress; - if (l$progress != lOther$progress) return false; + if (l$progress != lOther$progress) { + return false; + } final l$result = result; final lOther$result = other.result; - if (l$result != lOther$result) return false; + if (l$result != lOther$result) { + return false; + } final l$status = status; final lOther$status = other.status; - if (l$status != lOther$status) return false; + if (l$status != lOther$status) { + return false; + } final l$statusText = statusText; final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) return false; + if (l$statusText != lOther$statusText) { + return false; + } final l$uid = uid; final lOther$uid = other.uid; - if (l$uid != lOther$uid) return false; + if (l$uid != lOther$uid) { + return false; + } final l$updatedAt = updatedAt; final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) return false; + if (l$updatedAt != lOther$updatedAt) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -3859,38 +6755,43 @@ extension UtilityExtension$Mutation$MoveService$moveService$job on Mutation$MoveService$moveService$job { CopyWith$Mutation$MoveService$moveService$job< Mutation$MoveService$moveService$job> - get copyWith => - CopyWith$Mutation$MoveService$moveService$job(this, (i) => i); + get copyWith => CopyWith$Mutation$MoveService$moveService$job( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$MoveService$moveService$job { factory CopyWith$Mutation$MoveService$moveService$job( - Mutation$MoveService$moveService$job instance, - TRes Function(Mutation$MoveService$moveService$job) then) = - _CopyWithImpl$Mutation$MoveService$moveService$job; + Mutation$MoveService$moveService$job instance, + TRes Function(Mutation$MoveService$moveService$job) then, + ) = _CopyWithImpl$Mutation$MoveService$moveService$job; factory CopyWith$Mutation$MoveService$moveService$job.stub(TRes res) = _CopyWithStubImpl$Mutation$MoveService$moveService$job; - TRes call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}); + TRes call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }); } class _CopyWithImpl$Mutation$MoveService$moveService$job implements CopyWith$Mutation$MoveService$moveService$job { _CopyWithImpl$Mutation$MoveService$moveService$job( - this._instance, this._then); + this._instance, + this._then, + ); final Mutation$MoveService$moveService$job _instance; @@ -3898,51 +6799,51 @@ class _CopyWithImpl$Mutation$MoveService$moveService$job static const _undefined = {}; - TRes call( - {Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$MoveService$moveService$job( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null - ? _instance.uid - : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$MoveService$moveService$job @@ -3951,23 +6852,19 @@ class _CopyWithStubImpl$Mutation$MoveService$moveService$job TRes _res; - call( - {DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename}) => + call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename, + }) => _res; } - -DateTime? _nullable$dateTimeFromJson(dynamic data) => - data == null ? null : dateTimeFromJson(data); -dynamic _nullable$dateTimeToJson(DateTime? data) => - data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index ce846b30..3521ce2e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,23 +1,69 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:json_annotation/json_annotation.dart'; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; -part 'users.graphql.g.dart'; -@JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + Fragment$basicMutationReturnFields({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override factory Fragment$basicMutationReturnFields.fromJson( - Map json) => - _$Fragment$basicMutationReturnFieldsFromJson(json); + Map json) { + switch (json["__typename"] as String) { + case "ApiKeyMutationReturn": + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + .fromJson(json); + + case "AutoUpgradeSettingsMutationReturn": + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + .fromJson(json); + + case "DeviceApiTokenMutationReturn": + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + .fromJson(json); + + case "GenericJobButationReturn": + return Fragment$basicMutationReturnFields$$GenericJobButationReturn + .fromJson(json); + + case "GenericMutationReturn": + return Fragment$basicMutationReturnFields$$GenericMutationReturn + .fromJson(json); + + case "ServiceJobMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + .fromJson(json); + + case "ServiceMutationReturn": + return Fragment$basicMutationReturnFields$$ServiceMutationReturn + .fromJson(json); + + case "TimezoneMutationReturn": + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn + .fromJson(json); + + case "UserMutationReturn": + return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + json); + + default: + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + } final int code; @@ -25,36 +71,64 @@ class Fragment$basicMutationReturnFields { final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -63,25 +137,35 @@ extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { CopyWith$Fragment$basicMutationReturnFields< Fragment$basicMutationReturnFields> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); + get copyWith => CopyWith$Fragment$basicMutationReturnFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then) = - _CopyWithImpl$Fragment$basicMutationReturnFields; + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields; factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); + _CopyWithImpl$Fragment$basicMutationReturnFields( + this._instance, + this._then, + ); final Fragment$basicMutationReturnFields _instance; @@ -89,24 +173,25 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$basicMutationReturnFields @@ -115,43 +200,54 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'basicMutationReturnFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, @@ -159,56 +255,1704 @@ const documentNodeFragmentbasicMutationReturnFields = extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$basicMutationReturnFields({ + required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) -class Fragment$userFields { - Fragment$userFields( - {required this.username, - required this.userType, - required this.sshKeys, - required this.$__typename}); +class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } @override - factory Fragment$userFields.fromJson(Map json) => - _$Fragment$userFieldsFromJson(json); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn + on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + instance, + TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, + TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn + _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericJobButationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn + on Fragment$basicMutationReturnFields$$GenericJobButationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + Fragment$basicMutationReturnFields$$GenericJobButationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$GenericMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn + on Fragment$basicMutationReturnFields$$GenericMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + Fragment$basicMutationReturnFields$$GenericMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( + Fragment$basicMutationReturnFields$$GenericMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn + on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$ServiceMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$ServiceMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn + on Fragment$basicMutationReturnFields$$ServiceMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + Fragment$basicMutationReturnFields$$ServiceMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$TimezoneMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn + on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + Fragment$basicMutationReturnFields$$TimezoneMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$basicMutationReturnFields$$UserMutationReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$UserMutationReturn({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); + + factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$UserMutationReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn + on Fragment$basicMutationReturnFields$$UserMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + Fragment$basicMutationReturnFields$$UserMutationReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( + Fragment$basicMutationReturnFields$$UserMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; + + final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$UserMutationReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Fragment$userFields { + Fragment$userFields({ + required this.username, + required this.userType, + required this.sshKeys, + required this.$__typename, + }); + + factory Fragment$userFields.fromJson(Map json) { + final l$username = json['username']; + final l$userType = json['userType']; + final l$sshKeys = json['sshKeys']; + final l$$__typename = json['__typename']; + return Fragment$userFields( + username: (l$username as String), + userType: fromJson$Enum$UserType((l$userType as String)), + sshKeys: (l$sshKeys as List).map((e) => (e as String)).toList(), + $__typename: (l$$__typename as String), + ); + } final String username; - @JsonKey(unknownEnumValue: Enum$UserType.$unknown) final Enum$UserType userType; final List sshKeys; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Fragment$userFieldsToJson(this); + Map toJson() { + final _resultData = {}; + final l$username = username; + _resultData['username'] = l$username; + final l$userType = userType; + _resultData['userType'] = toJson$Enum$UserType(l$userType); + final l$sshKeys = sshKeys; + _resultData['sshKeys'] = l$sshKeys.map((e) => e).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$username = username; final l$userType = userType; @@ -218,60 +1962,80 @@ class Fragment$userFields { l$username, l$userType, Object.hashAll(l$sshKeys.map((v) => v)), - l$$__typename + l$$__typename, ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) { return false; + } final l$username = username; final lOther$username = other.username; - if (l$username != lOther$username) return false; + if (l$username != lOther$username) { + return false; + } final l$userType = userType; final lOther$userType = other.userType; - if (l$userType != lOther$userType) return false; + if (l$userType != lOther$userType) { + return false; + } final l$sshKeys = sshKeys; final lOther$sshKeys = other.sshKeys; - if (l$sshKeys.length != lOther$sshKeys.length) return false; + if (l$sshKeys.length != lOther$sshKeys.length) { + return false; + } for (int i = 0; i < l$sshKeys.length; i++) { final l$sshKeys$entry = l$sshKeys[i]; final lOther$sshKeys$entry = lOther$sshKeys[i]; - if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + if (l$sshKeys$entry != lOther$sshKeys$entry) { + return false; + } } - final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Fragment$userFields on Fragment$userFields { CopyWith$Fragment$userFields get copyWith => - CopyWith$Fragment$userFields(this, (i) => i); + CopyWith$Fragment$userFields( + this, + (i) => i, + ); } abstract class CopyWith$Fragment$userFields { - factory CopyWith$Fragment$userFields(Fragment$userFields instance, - TRes Function(Fragment$userFields) then) = - _CopyWithImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields( + Fragment$userFields instance, + TRes Function(Fragment$userFields) then, + ) = _CopyWithImpl$Fragment$userFields; factory CopyWith$Fragment$userFields.stub(TRes res) = _CopyWithStubImpl$Fragment$userFields; - TRes call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}); + TRes call({ + String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename, + }); } class _CopyWithImpl$Fragment$userFields implements CopyWith$Fragment$userFields { - _CopyWithImpl$Fragment$userFields(this._instance, this._then); + _CopyWithImpl$Fragment$userFields( + this._instance, + this._then, + ); final Fragment$userFields _instance; @@ -279,24 +2043,26 @@ class _CopyWithImpl$Fragment$userFields static const _undefined = {}; - TRes call( - {Object? username = _undefined, - Object? userType = _undefined, - Object? sshKeys = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? username = _undefined, + Object? userType = _undefined, + Object? sshKeys = _undefined, + Object? $__typename = _undefined, + }) => _then(Fragment$userFields( - username: username == _undefined || username == null - ? _instance.username - : (username as String), - userType: userType == _undefined || userType == null - ? _instance.userType - : (userType as Enum$UserType), - sshKeys: sshKeys == _undefined || sshKeys == null - ? _instance.sshKeys - : (sshKeys as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + username: username == _undefined || username == null + ? _instance.username + : (username as String), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Fragment$userFields @@ -305,130 +2071,183 @@ class _CopyWithStubImpl$Fragment$userFields TRes _res; - call( - {String? username, - Enum$UserType? userType, - List? sshKeys, - String? $__typename}) => + call({ + String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename, + }) => _res; } const fragmentDefinitionuserFields = FragmentDefinitionNode( - name: NameNode(value: 'userFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'username'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'userType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: 'sshKeys'), - alias: null, - arguments: [], - directives: [], - selectionSet: null), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])); + name: NameNode(value: 'userFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'User'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); const documentNodeFragmentuserFields = DocumentNode(definitions: [ fragmentDefinitionuserFields, ]); extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { - void writeFragment$userFields( - {required Fragment$userFields data, - required Map idFields, - bool broadcast = true}) => + void writeFragment$userFields({ + required Fragment$userFields data, + required Map idFields, + bool broadcast = true, + }) => this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'userFields', - document: documentNodeFragmentuserFields)), - data: data.toJson(), - broadcast: broadcast); - Fragment$userFields? readFragment$userFields( - {required Map idFields, bool optimistic = true}) { - final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'userFields', - document: documentNodeFragmentuserFields)), - optimistic: optimistic); + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$userFields? readFragment$userFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields, + ), + ), + optimistic: optimistic, + ); return result == null ? null : Fragment$userFields.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$AllUsers { - Query$AllUsers({required this.users, required this.$__typename}); + Query$AllUsers({ + required this.users, + required this.$__typename, + }); - @override - factory Query$AllUsers.fromJson(Map json) => - _$Query$AllUsersFromJson(json); + factory Query$AllUsers.fromJson(Map json) { + final l$users = json['users']; + final l$$__typename = json['__typename']; + return Query$AllUsers( + users: Query$AllUsers$users.fromJson((l$users as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$AllUsers$users users; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllUsersToJson(this); + Map toJson() { + final _resultData = {}; + final l$users = users; + _resultData['users'] = l$users.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$users = users; final l$$__typename = $__typename; - return Object.hashAll([l$users, l$$__typename]); + return Object.hashAll([ + l$users, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) { return false; + } final l$users = users; final lOther$users = other.users; - if (l$users != lOther$users) return false; + if (l$users != lOther$users) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$AllUsers on Query$AllUsers { CopyWith$Query$AllUsers get copyWith => - CopyWith$Query$AllUsers(this, (i) => i); + CopyWith$Query$AllUsers( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllUsers { factory CopyWith$Query$AllUsers( - Query$AllUsers instance, TRes Function(Query$AllUsers) then) = - _CopyWithImpl$Query$AllUsers; + Query$AllUsers instance, + TRes Function(Query$AllUsers) then, + ) = _CopyWithImpl$Query$AllUsers; factory CopyWith$Query$AllUsers.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers; - TRes call({Query$AllUsers$users? users, String? $__typename}); + TRes call({ + Query$AllUsers$users? users, + String? $__typename, + }); CopyWith$Query$AllUsers$users get users; } class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers { - _CopyWithImpl$Query$AllUsers(this._instance, this._then); + _CopyWithImpl$Query$AllUsers( + this._instance, + this._then, + ); final Query$AllUsers _instance; @@ -436,14 +2255,18 @@ class _CopyWithImpl$Query$AllUsers static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? users = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllUsers( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$AllUsers$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + users: users == _undefined || users == null + ? _instance.users + : (users as Query$AllUsers$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$AllUsers$users get users { final local$users = _instance.users; return CopyWith$Query$AllUsers$users(local$users, (e) => call(users: e)); @@ -456,129 +2279,154 @@ class _CopyWithStubImpl$Query$AllUsers TRes _res; - call({Query$AllUsers$users? users, String? $__typename}) => _res; + call({ + Query$AllUsers$users? users, + String? $__typename, + }) => + _res; CopyWith$Query$AllUsers$users get users => CopyWith$Query$AllUsers$users.stub(_res); } const documentNodeQueryAllUsers = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'AllUsers'), - variableDefinitions: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'users'), + type: OperationType.query, + name: NameNode(value: 'AllUsers'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allUsers'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'allUsers'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: 'getUser'), + alias: NameNode(value: 'rootUser'), + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: StringValueNode( + value: 'root', + isBlock: false, + ), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'getUser'), - alias: NameNode(value: 'rootUser'), - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: StringValueNode(value: 'root', isBlock: false)) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionuserFields, ]); Query$AllUsers _parserFn$Query$AllUsers(Map data) => Query$AllUsers.fromJson(data); class Options$Query$AllUsers extends graphql.QueryOptions { - Options$Query$AllUsers( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryAllUsers, - parserFn: _parserFn$Query$AllUsers); + Options$Query$AllUsers({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllUsers, + parserFn: _parserFn$Query$AllUsers, + ); } class WatchOptions$Query$AllUsers extends graphql.WatchQueryOptions { - WatchOptions$Query$AllUsers( - {String? operationName, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryAllUsers, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$AllUsers); + WatchOptions$Query$AllUsers({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllUsers, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllUsers, + ); } class FetchMoreOptions$Query$AllUsers extends graphql.FetchMoreOptions { FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) - : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); + : super( + updateQuery: updateQuery, + document: documentNodeQueryAllUsers, + ); } extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { @@ -588,89 +2436,133 @@ extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$AllUsers( [WatchOptions$Query$AllUsers? options]) => this.watchQuery(options ?? WatchOptions$Query$AllUsers()); - void writeQuery$AllUsers( - {required Query$AllUsers data, bool broadcast = true}) => + void writeQuery$AllUsers({ + required Query$AllUsers data, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: - graphql.Operation(document: documentNodeQueryAllUsers)), - data: data.toJson(), - broadcast: broadcast); - Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { - final result = this.readQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryAllUsers)), - optimistic: optimistic); + data: data.toJson(), + broadcast: broadcast, + ); + Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllUsers)), + optimistic: optimistic, + ); return result == null ? null : Query$AllUsers.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$AllUsers$users { - Query$AllUsers$users( - {required this.allUsers, this.rootUser, required this.$__typename}); + Query$AllUsers$users({ + required this.allUsers, + this.rootUser, + required this.$__typename, + }); - @override - factory Query$AllUsers$users.fromJson(Map json) => - _$Query$AllUsers$usersFromJson(json); + factory Query$AllUsers$users.fromJson(Map json) { + final l$allUsers = json['allUsers']; + final l$rootUser = json['rootUser']; + final l$$__typename = json['__typename']; + return Query$AllUsers$users( + allUsers: (l$allUsers as List) + .map((e) => Fragment$userFields.fromJson((e as Map))) + .toList(), + rootUser: l$rootUser == null + ? null + : Fragment$userFields.fromJson((l$rootUser as Map)), + $__typename: (l$$__typename as String), + ); + } final List allUsers; final Fragment$userFields? rootUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$AllUsers$usersToJson(this); + Map toJson() { + final _resultData = {}; + final l$allUsers = allUsers; + _resultData['allUsers'] = l$allUsers.map((e) => e.toJson()).toList(); + final l$rootUser = rootUser; + _resultData['rootUser'] = l$rootUser?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$allUsers = allUsers; final l$rootUser = rootUser; final l$$__typename = $__typename; - return Object.hashAll( - [Object.hashAll(l$allUsers.map((v) => v)), l$rootUser, l$$__typename]); + return Object.hashAll([ + Object.hashAll(l$allUsers.map((v) => v)), + l$rootUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) { return false; + } final l$allUsers = allUsers; final lOther$allUsers = other.allUsers; - if (l$allUsers.length != lOther$allUsers.length) return false; + if (l$allUsers.length != lOther$allUsers.length) { + return false; + } for (int i = 0; i < l$allUsers.length; i++) { final l$allUsers$entry = l$allUsers[i]; final lOther$allUsers$entry = lOther$allUsers[i]; - if (l$allUsers$entry != lOther$allUsers$entry) return false; + if (l$allUsers$entry != lOther$allUsers$entry) { + return false; + } } - final l$rootUser = rootUser; final lOther$rootUser = other.rootUser; - if (l$rootUser != lOther$rootUser) return false; + if (l$rootUser != lOther$rootUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { CopyWith$Query$AllUsers$users get copyWith => - CopyWith$Query$AllUsers$users(this, (i) => i); + CopyWith$Query$AllUsers$users( + this, + (i) => i, + ); } abstract class CopyWith$Query$AllUsers$users { - factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, - TRes Function(Query$AllUsers$users) then) = - _CopyWithImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users( + Query$AllUsers$users instance, + TRes Function(Query$AllUsers$users) then, + ) = _CopyWithImpl$Query$AllUsers$users; factory CopyWith$Query$AllUsers$users.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers$users; - TRes call( - {List? allUsers, - Fragment$userFields? rootUser, - String? $__typename}); + TRes call({ + List? allUsers, + Fragment$userFields? rootUser, + String? $__typename, + }); TRes allUsers( Iterable Function( Iterable>) @@ -680,7 +2572,10 @@ abstract class CopyWith$Query$AllUsers$users { class _CopyWithImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { - _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); + _CopyWithImpl$Query$AllUsers$users( + this._instance, + this._then, + ); final Query$AllUsers$users _instance; @@ -688,27 +2583,32 @@ class _CopyWithImpl$Query$AllUsers$users static const _undefined = {}; - TRes call( - {Object? allUsers = _undefined, - Object? rootUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? allUsers = _undefined, + Object? rootUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$AllUsers$users( - allUsers: allUsers == _undefined || allUsers == null - ? _instance.allUsers - : (allUsers as List), - rootUser: rootUser == _undefined - ? _instance.rootUser - : (rootUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + allUsers: allUsers == _undefined || allUsers == null + ? _instance.allUsers + : (allUsers as List), + rootUser: rootUser == _undefined + ? _instance.rootUser + : (rootUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); TRes allUsers( Iterable Function( Iterable>) _fn) => call( - allUsers: _fn(_instance.allUsers - .map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); + allUsers: + _fn(_instance.allUsers.map((e) => CopyWith$Fragment$userFields( + e, + (i) => i, + ))).toList()); CopyWith$Fragment$userFields get rootUser { final local$rootUser = _instance.rootUser; return local$rootUser == null @@ -724,51 +2624,76 @@ class _CopyWithStubImpl$Query$AllUsers$users TRes _res; - call( - {List? allUsers, - Fragment$userFields? rootUser, - String? $__typename}) => + call({ + List? allUsers, + Fragment$userFields? rootUser, + String? $__typename, + }) => _res; allUsers(_fn) => _res; CopyWith$Fragment$userFields get rootUser => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Query$GetUser { - Variables$Query$GetUser({required this.username}); + factory Variables$Query$GetUser({required String username}) => + Variables$Query$GetUser._({ + r'username': username, + }); + + Variables$Query$GetUser._(this._$data); + + factory Variables$Query$GetUser.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + return Variables$Query$GetUser._(result$data); + } + + Map _$data; + + String get username => (_$data['username'] as String); + Map toJson() { + final result$data = {}; + final l$username = username; + result$data['username'] = l$username; + return result$data; + } + + CopyWith$Variables$Query$GetUser get copyWith => + CopyWith$Variables$Query$GetUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Query$GetUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + return true; + } @override - factory Variables$Query$GetUser.fromJson(Map json) => - _$Variables$Query$GetUserFromJson(json); - - final String username; - - Map toJson() => _$Variables$Query$GetUserToJson(this); int get hashCode { final l$username = username; return Object.hashAll([l$username]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) - return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - return true; - } - - CopyWith$Variables$Query$GetUser get copyWith => - CopyWith$Variables$Query$GetUser(this, (i) => i); } abstract class CopyWith$Variables$Query$GetUser { - factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, - TRes Function(Variables$Query$GetUser) then) = - _CopyWithImpl$Variables$Query$GetUser; + factory CopyWith$Variables$Query$GetUser( + Variables$Query$GetUser instance, + TRes Function(Variables$Query$GetUser) then, + ) = _CopyWithImpl$Variables$Query$GetUser; factory CopyWith$Variables$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Variables$Query$GetUser; @@ -778,7 +2703,10 @@ abstract class CopyWith$Variables$Query$GetUser { class _CopyWithImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { - _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); + _CopyWithImpl$Variables$Query$GetUser( + this._instance, + this._then, + ); final Variables$Query$GetUser _instance; @@ -786,10 +2714,12 @@ class _CopyWithImpl$Variables$Query$GetUser static const _undefined = {}; - TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( - username: username == _undefined || username == null - ? _instance.username - : (username as String))); + TRes call({Object? username = _undefined}) => + _then(Variables$Query$GetUser._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + })); } class _CopyWithStubImpl$Variables$Query$GetUser @@ -801,61 +2731,95 @@ class _CopyWithStubImpl$Variables$Query$GetUser call({String? username}) => _res; } -@JsonSerializable(explicitToJson: true) class Query$GetUser { - Query$GetUser({required this.users, required this.$__typename}); + Query$GetUser({ + required this.users, + required this.$__typename, + }); - @override - factory Query$GetUser.fromJson(Map json) => - _$Query$GetUserFromJson(json); + factory Query$GetUser.fromJson(Map json) { + final l$users = json['users']; + final l$$__typename = json['__typename']; + return Query$GetUser( + users: Query$GetUser$users.fromJson((l$users as Map)), + $__typename: (l$$__typename as String), + ); + } final Query$GetUser$users users; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$users = users; + _resultData['users'] = l$users.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$users = users; final l$$__typename = $__typename; - return Object.hashAll([l$users, l$$__typename]); + return Object.hashAll([ + l$users, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetUser) || runtimeType != other.runtimeType) { return false; + } final l$users = users; final lOther$users = other.users; - if (l$users != lOther$users) return false; + if (l$users != lOther$users) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetUser on Query$GetUser { - CopyWith$Query$GetUser get copyWith => - CopyWith$Query$GetUser(this, (i) => i); + CopyWith$Query$GetUser get copyWith => CopyWith$Query$GetUser( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetUser { factory CopyWith$Query$GetUser( - Query$GetUser instance, TRes Function(Query$GetUser) then) = - _CopyWithImpl$Query$GetUser; + Query$GetUser instance, + TRes Function(Query$GetUser) then, + ) = _CopyWithImpl$Query$GetUser; factory CopyWith$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Query$GetUser; - TRes call({Query$GetUser$users? users, String? $__typename}); + TRes call({ + Query$GetUser$users? users, + String? $__typename, + }); CopyWith$Query$GetUser$users get users; } class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser { - _CopyWithImpl$Query$GetUser(this._instance, this._then); + _CopyWithImpl$Query$GetUser( + this._instance, + this._then, + ); final Query$GetUser _instance; @@ -863,14 +2827,18 @@ class _CopyWithImpl$Query$GetUser static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? users = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetUser( - users: users == _undefined || users == null - ? _instance.users - : (users as Query$GetUser$users), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + users: users == _undefined || users == null + ? _instance.users + : (users as Query$GetUser$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Query$GetUser$users get users { final local$users = _instance.users; return CopyWith$Query$GetUser$users(local$users, (e) => call(users: e)); @@ -883,130 +2851,149 @@ class _CopyWithStubImpl$Query$GetUser TRes _res; - call({Query$GetUser$users? users, String? $__typename}) => _res; + call({ + Query$GetUser$users? users, + String? $__typename, + }) => + _res; CopyWith$Query$GetUser$users get users => CopyWith$Query$GetUser$users.stub(_res); } const documentNodeQueryGetUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.query, - name: NameNode(value: 'GetUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'username')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'users'), + type: OperationType.query, + name: NameNode(value: 'GetUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getUser'), alias: null, - arguments: [], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username')), + ) + ], directives: [], selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'getUser'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: VariableNode(name: NameNode(value: 'username'))) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionuserFields, ]); Query$GetUser _parserFn$Query$GetUser(Map data) => Query$GetUser.fromJson(data); class Options$Query$GetUser extends graphql.QueryOptions { - Options$Query$GetUser( - {String? operationName, - required Variables$Query$GetUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - pollInterval: pollInterval, - context: context, - document: documentNodeQueryGetUser, - parserFn: _parserFn$Query$GetUser); + Options$Query$GetUser({ + String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetUser, + parserFn: _parserFn$Query$GetUser, + ); } class WatchOptions$Query$GetUser extends graphql.WatchQueryOptions { - WatchOptions$Query$GetUser( - {String? operationName, - required Variables$Query$GetUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeQueryGetUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Query$GetUser); + WatchOptions$Query$GetUser({ + String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetUser, + ); } class FetchMoreOptions$Query$GetUser extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetUser( - {required graphql.UpdateQuery updateQuery, - required Variables$Query$GetUser variables}) - : super( - updateQuery: updateQuery, - variables: variables.toJson(), - document: documentNodeQueryGetUser); + FetchMoreOptions$Query$GetUser({ + required graphql.UpdateQuery updateQuery, + required Variables$Query$GetUser variables, + }) : super( + updateQuery: updateQuery, + variables: variables.toJson(), + document: documentNodeQueryGetUser, + ); } extension ClientExtension$Query$GetUser on graphql.GraphQLClient { @@ -1016,82 +3003,126 @@ extension ClientExtension$Query$GetUser on graphql.GraphQLClient { graphql.ObservableQuery watchQuery$GetUser( WatchOptions$Query$GetUser options) => this.watchQuery(options); - void writeQuery$GetUser( - {required Query$GetUser data, - required Variables$Query$GetUser variables, - bool broadcast = true}) => + void writeQuery$GetUser({ + required Query$GetUser data, + required Variables$Query$GetUser variables, + bool broadcast = true, + }) => this.writeQuery( - graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), - data: data.toJson(), - broadcast: broadcast); - Query$GetUser? readQuery$GetUser( - {required Variables$Query$GetUser variables, bool optimistic = true}) { - final result = this.readQuery( graphql.Request( - operation: graphql.Operation(document: documentNodeQueryGetUser), - variables: variables.toJson()), - optimistic: optimistic); + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson(), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Query$GetUser? readQuery$GetUser({ + required Variables$Query$GetUser variables, + bool optimistic = true, + }) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson(), + ), + optimistic: optimistic, + ); return result == null ? null : Query$GetUser.fromJson(result); } } -@JsonSerializable(explicitToJson: true) class Query$GetUser$users { - Query$GetUser$users({this.getUser, required this.$__typename}); + Query$GetUser$users({ + this.getUser, + required this.$__typename, + }); - @override - factory Query$GetUser$users.fromJson(Map json) => - _$Query$GetUser$usersFromJson(json); + factory Query$GetUser$users.fromJson(Map json) { + final l$getUser = json['getUser']; + final l$$__typename = json['__typename']; + return Query$GetUser$users( + getUser: l$getUser == null + ? null + : Fragment$userFields.fromJson((l$getUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Fragment$userFields? getUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetUser$usersToJson(this); + Map toJson() { + final _resultData = {}; + final l$getUser = getUser; + _resultData['getUser'] = l$getUser?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$getUser = getUser; final l$$__typename = $__typename; - return Object.hashAll([l$getUser, l$$__typename]); + return Object.hashAll([ + l$getUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) { return false; + } final l$getUser = getUser; final lOther$getUser = other.getUser; - if (l$getUser != lOther$getUser) return false; + if (l$getUser != lOther$getUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { CopyWith$Query$GetUser$users get copyWith => - CopyWith$Query$GetUser$users(this, (i) => i); + CopyWith$Query$GetUser$users( + this, + (i) => i, + ); } abstract class CopyWith$Query$GetUser$users { - factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, - TRes Function(Query$GetUser$users) then) = - _CopyWithImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users( + Query$GetUser$users instance, + TRes Function(Query$GetUser$users) then, + ) = _CopyWithImpl$Query$GetUser$users; factory CopyWith$Query$GetUser$users.stub(TRes res) = _CopyWithStubImpl$Query$GetUser$users; - TRes call({Fragment$userFields? getUser, String? $__typename}); + TRes call({ + Fragment$userFields? getUser, + String? $__typename, + }); CopyWith$Fragment$userFields get getUser; } class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { - _CopyWithImpl$Query$GetUser$users(this._instance, this._then); + _CopyWithImpl$Query$GetUser$users( + this._instance, + this._then, + ); final Query$GetUser$users _instance; @@ -1099,14 +3130,18 @@ class _CopyWithImpl$Query$GetUser$users static const _undefined = {}; - TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? getUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Query$GetUser$users( - getUser: getUser == _undefined - ? _instance.getUser - : (getUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + getUser: getUser == _undefined + ? _instance.getUser + : (getUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Fragment$userFields get getUser { final local$getUser = _instance.getUser; return local$getUser == null @@ -1121,47 +3156,77 @@ class _CopyWithStubImpl$Query$GetUser$users TRes _res; - call({Fragment$userFields? getUser, String? $__typename}) => _res; + call({ + Fragment$userFields? getUser, + String? $__typename, + }) => + _res; CopyWith$Fragment$userFields get getUser => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$CreateUser { - Variables$Mutation$CreateUser({required this.user}); + factory Variables$Mutation$CreateUser( + {required Input$UserMutationInput user}) => + Variables$Mutation$CreateUser._({ + r'user': user, + }); + + Variables$Mutation$CreateUser._(this._$data); + + factory Variables$Mutation$CreateUser.fromJson(Map data) { + final result$data = {}; + final l$user = data['user']; + result$data['user'] = + Input$UserMutationInput.fromJson((l$user as Map)); + return Variables$Mutation$CreateUser._(result$data); + } + + Map _$data; + + Input$UserMutationInput get user => + (_$data['user'] as Input$UserMutationInput); + Map toJson() { + final result$data = {}; + final l$user = user; + result$data['user'] = l$user.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$CreateUser + get copyWith => CopyWith$Variables$Mutation$CreateUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$CreateUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) { + return false; + } + return true; + } @override - factory Variables$Mutation$CreateUser.fromJson(Map json) => - _$Variables$Mutation$CreateUserFromJson(json); - - final Input$UserMutationInput user; - - Map toJson() => _$Variables$Mutation$CreateUserToJson(this); int get hashCode { final l$user = user; return Object.hashAll([l$user]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$CreateUser) || - runtimeType != other.runtimeType) return false; - final l$user = user; - final lOther$user = other.user; - if (l$user != lOther$user) return false; - return true; - } - - CopyWith$Variables$Mutation$CreateUser - get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$CreateUser { factory CopyWith$Variables$Mutation$CreateUser( - Variables$Mutation$CreateUser instance, - TRes Function(Variables$Mutation$CreateUser) then) = - _CopyWithImpl$Variables$Mutation$CreateUser; + Variables$Mutation$CreateUser instance, + TRes Function(Variables$Mutation$CreateUser) then, + ) = _CopyWithImpl$Variables$Mutation$CreateUser; factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$CreateUser; @@ -1171,7 +3236,10 @@ abstract class CopyWith$Variables$Mutation$CreateUser { class _CopyWithImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { - _CopyWithImpl$Variables$Mutation$CreateUser(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$CreateUser( + this._instance, + this._then, + ); final Variables$Mutation$CreateUser _instance; @@ -1179,10 +3247,12 @@ class _CopyWithImpl$Variables$Mutation$CreateUser static const _undefined = {}; - TRes call({Object? user = _undefined}) => _then(Variables$Mutation$CreateUser( - user: user == _undefined || user == null - ? _instance.user - : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => + _then(Variables$Mutation$CreateUser._({ + ..._instance._$data, + if (user != _undefined && user != null) + 'user': (user as Input$UserMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$CreateUser @@ -1194,61 +3264,97 @@ class _CopyWithStubImpl$Variables$Mutation$CreateUser call({Input$UserMutationInput? user}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$CreateUser { - Mutation$CreateUser({required this.createUser, required this.$__typename}); + Mutation$CreateUser({ + required this.createUser, + required this.$__typename, + }); - @override - factory Mutation$CreateUser.fromJson(Map json) => - _$Mutation$CreateUserFromJson(json); + factory Mutation$CreateUser.fromJson(Map json) { + final l$createUser = json['createUser']; + final l$$__typename = json['__typename']; + return Mutation$CreateUser( + createUser: Mutation$CreateUser$createUser.fromJson( + (l$createUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$CreateUser$createUser createUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$CreateUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$createUser = createUser; + _resultData['createUser'] = l$createUser.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$createUser = createUser; final l$$__typename = $__typename; - return Object.hashAll([l$createUser, l$$__typename]); + return Object.hashAll([ + l$createUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) { return false; + } final l$createUser = createUser; final lOther$createUser = other.createUser; - if (l$createUser != lOther$createUser) return false; + if (l$createUser != lOther$createUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { CopyWith$Mutation$CreateUser get copyWith => - CopyWith$Mutation$CreateUser(this, (i) => i); + CopyWith$Mutation$CreateUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$CreateUser { - factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, - TRes Function(Mutation$CreateUser) then) = - _CopyWithImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser( + Mutation$CreateUser instance, + TRes Function(Mutation$CreateUser) then, + ) = _CopyWithImpl$Mutation$CreateUser; factory CopyWith$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser; - TRes call({Mutation$CreateUser$createUser? createUser, String? $__typename}); + TRes call({ + Mutation$CreateUser$createUser? createUser, + String? $__typename, + }); CopyWith$Mutation$CreateUser$createUser get createUser; } class _CopyWithImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { - _CopyWithImpl$Mutation$CreateUser(this._instance, this._then); + _CopyWithImpl$Mutation$CreateUser( + this._instance, + this._then, + ); final Mutation$CreateUser _instance; @@ -1256,16 +3362,18 @@ class _CopyWithImpl$Mutation$CreateUser static const _undefined = {}; - TRes call( - {Object? createUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? createUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$CreateUser( - createUser: createUser == _undefined || createUser == null - ? _instance.createUser - : (createUser as Mutation$CreateUser$createUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + createUser: createUser == _undefined || createUser == null + ? _instance.createUser + : (createUser as Mutation$CreateUser$createUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$CreateUser$createUser get createUser { final local$createUser = _instance.createUser; return CopyWith$Mutation$CreateUser$createUser( @@ -1279,7 +3387,10 @@ class _CopyWithStubImpl$Mutation$CreateUser TRes _res; - call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => + call({ + Mutation$CreateUser$createUser? createUser, + String? $__typename, + }) => _res; CopyWith$Mutation$CreateUser$createUser get createUser => CopyWith$Mutation$CreateUser$createUser.stub(_res); @@ -1287,98 +3398,116 @@ class _CopyWithStubImpl$Mutation$CreateUser const documentNodeMutationCreateUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'CreateUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode( - name: NameNode(value: 'UserMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createUser'), + type: OperationType.mutation, + name: NameNode(value: 'CreateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'user'), - value: VariableNode(name: NameNode(value: 'user'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( - dynamic, Mutation$CreateUser?); + dynamic, + Mutation$CreateUser?, +); class Options$Mutation$CreateUser extends graphql.MutationOptions { - Options$Mutation$CreateUser( - {String? operationName, - required Variables$Mutation$CreateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$CreateUser? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$CreateUser({ + String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$CreateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$CreateUser(data)), - update: update, - onError: onError, - document: documentNodeMutationCreateUser, - parserFn: _parserFn$Mutation$CreateUser); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$CreateUser(data), + ), + update: update, + onError: onError, + document: documentNodeMutationCreateUser, + parserFn: _parserFn$Mutation$CreateUser, + ); final OnMutationCompleted$Mutation$CreateUser? onCompletedWithParsed; @@ -1387,38 +3516,39 @@ class Options$Mutation$CreateUser ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$CreateUser extends graphql.WatchQueryOptions { - WatchOptions$Mutation$CreateUser( - {String? operationName, - required Variables$Mutation$CreateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationCreateUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$CreateUser); + WatchOptions$Mutation$CreateUser({ + String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationCreateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$CreateUser, + ); } extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { @@ -1430,19 +3560,32 @@ extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$CreateUser$createUser - implements Fragment$basicMutationReturnFields { - Mutation$CreateUser$createUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$CreateUser$createUser({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override - factory Mutation$CreateUser$createUser.fromJson(Map json) => - _$Mutation$CreateUser$createUserFromJson(json); + factory Mutation$CreateUser$createUser.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$CreateUser$createUser( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -1450,42 +3593,75 @@ class Mutation$CreateUser$createUser final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => _$Mutation$CreateUser$createUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$CreateUser$createUser) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -1493,30 +3669,37 @@ class Mutation$CreateUser$createUser extension UtilityExtension$Mutation$CreateUser$createUser on Mutation$CreateUser$createUser { CopyWith$Mutation$CreateUser$createUser - get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); + get copyWith => CopyWith$Mutation$CreateUser$createUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$CreateUser$createUser { factory CopyWith$Mutation$CreateUser$createUser( - Mutation$CreateUser$createUser instance, - TRes Function(Mutation$CreateUser$createUser) then) = - _CopyWithImpl$Mutation$CreateUser$createUser; + Mutation$CreateUser$createUser instance, + TRes Function(Mutation$CreateUser$createUser) then, + ) = _CopyWithImpl$Mutation$CreateUser$createUser; factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser$createUser; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { - _CopyWithImpl$Mutation$CreateUser$createUser(this._instance, this._then); + _CopyWithImpl$Mutation$CreateUser$createUser( + this._instance, + this._then, + ); final Mutation$CreateUser$createUser _instance; @@ -1524,28 +3707,29 @@ class _CopyWithImpl$Mutation$CreateUser$createUser static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$CreateUser$createUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -1560,53 +3744,77 @@ class _CopyWithStubImpl$Mutation$CreateUser$createUser TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$DeleteUser { - Variables$Mutation$DeleteUser({required this.username}); + factory Variables$Mutation$DeleteUser({required String username}) => + Variables$Mutation$DeleteUser._({ + r'username': username, + }); + + Variables$Mutation$DeleteUser._(this._$data); + + factory Variables$Mutation$DeleteUser.fromJson(Map data) { + final result$data = {}; + final l$username = data['username']; + result$data['username'] = (l$username as String); + return Variables$Mutation$DeleteUser._(result$data); + } + + Map _$data; + + String get username => (_$data['username'] as String); + Map toJson() { + final result$data = {}; + final l$username = username; + result$data['username'] = l$username; + return result$data; + } + + CopyWith$Variables$Mutation$DeleteUser + get copyWith => CopyWith$Variables$Mutation$DeleteUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$DeleteUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) { + return false; + } + return true; + } @override - factory Variables$Mutation$DeleteUser.fromJson(Map json) => - _$Variables$Mutation$DeleteUserFromJson(json); - - final String username; - - Map toJson() => _$Variables$Mutation$DeleteUserToJson(this); int get hashCode { final l$username = username; return Object.hashAll([l$username]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DeleteUser) || - runtimeType != other.runtimeType) return false; - final l$username = username; - final lOther$username = other.username; - if (l$username != lOther$username) return false; - return true; - } - - CopyWith$Variables$Mutation$DeleteUser - get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$DeleteUser { factory CopyWith$Variables$Mutation$DeleteUser( - Variables$Mutation$DeleteUser instance, - TRes Function(Variables$Mutation$DeleteUser) then) = - _CopyWithImpl$Variables$Mutation$DeleteUser; + Variables$Mutation$DeleteUser instance, + TRes Function(Variables$Mutation$DeleteUser) then, + ) = _CopyWithImpl$Variables$Mutation$DeleteUser; factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DeleteUser; @@ -1616,7 +3824,10 @@ abstract class CopyWith$Variables$Mutation$DeleteUser { class _CopyWithImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { - _CopyWithImpl$Variables$Mutation$DeleteUser(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$DeleteUser( + this._instance, + this._then, + ); final Variables$Mutation$DeleteUser _instance; @@ -1624,11 +3835,12 @@ class _CopyWithImpl$Variables$Mutation$DeleteUser static const _undefined = {}; - TRes call({Object? username = _undefined}) => _then( - Variables$Mutation$DeleteUser( - username: username == _undefined || username == null - ? _instance.username - : (username as String))); + TRes call({Object? username = _undefined}) => + _then(Variables$Mutation$DeleteUser._({ + ..._instance._$data, + if (username != _undefined && username != null) + 'username': (username as String), + })); } class _CopyWithStubImpl$Variables$Mutation$DeleteUser @@ -1640,61 +3852,97 @@ class _CopyWithStubImpl$Variables$Mutation$DeleteUser call({String? username}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteUser { - Mutation$DeleteUser({required this.deleteUser, required this.$__typename}); + Mutation$DeleteUser({ + required this.deleteUser, + required this.$__typename, + }); - @override - factory Mutation$DeleteUser.fromJson(Map json) => - _$Mutation$DeleteUserFromJson(json); + factory Mutation$DeleteUser.fromJson(Map json) { + final l$deleteUser = json['deleteUser']; + final l$$__typename = json['__typename']; + return Mutation$DeleteUser( + deleteUser: Mutation$DeleteUser$deleteUser.fromJson( + (l$deleteUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$DeleteUser$deleteUser deleteUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DeleteUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$deleteUser = deleteUser; + _resultData['deleteUser'] = l$deleteUser.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$deleteUser = deleteUser; final l$$__typename = $__typename; - return Object.hashAll([l$deleteUser, l$$__typename]); + return Object.hashAll([ + l$deleteUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) { return false; + } final l$deleteUser = deleteUser; final lOther$deleteUser = other.deleteUser; - if (l$deleteUser != lOther$deleteUser) return false; + if (l$deleteUser != lOther$deleteUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { CopyWith$Mutation$DeleteUser get copyWith => - CopyWith$Mutation$DeleteUser(this, (i) => i); + CopyWith$Mutation$DeleteUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteUser { - factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, - TRes Function(Mutation$DeleteUser) then) = - _CopyWithImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser( + Mutation$DeleteUser instance, + TRes Function(Mutation$DeleteUser) then, + ) = _CopyWithImpl$Mutation$DeleteUser; factory CopyWith$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser; - TRes call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}); + TRes call({ + Mutation$DeleteUser$deleteUser? deleteUser, + String? $__typename, + }); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser; } class _CopyWithImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { - _CopyWithImpl$Mutation$DeleteUser(this._instance, this._then); + _CopyWithImpl$Mutation$DeleteUser( + this._instance, + this._then, + ); final Mutation$DeleteUser _instance; @@ -1702,16 +3950,18 @@ class _CopyWithImpl$Mutation$DeleteUser static const _undefined = {}; - TRes call( - {Object? deleteUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? deleteUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteUser( - deleteUser: deleteUser == _undefined || deleteUser == null - ? _instance.deleteUser - : (deleteUser as Mutation$DeleteUser$deleteUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + deleteUser: deleteUser == _undefined || deleteUser == null + ? _instance.deleteUser + : (deleteUser as Mutation$DeleteUser$deleteUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser { final local$deleteUser = _instance.deleteUser; return CopyWith$Mutation$DeleteUser$deleteUser( @@ -1725,7 +3975,10 @@ class _CopyWithStubImpl$Mutation$DeleteUser TRes _res; - call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => + call({ + Mutation$DeleteUser$deleteUser? deleteUser, + String? $__typename, + }) => _res; CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); @@ -1733,82 +3986,96 @@ class _CopyWithStubImpl$Mutation$DeleteUser const documentNodeMutationDeleteUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'DeleteUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'username')), - type: - NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'deleteUser'), - alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'username'), - value: VariableNode(name: NameNode(value: 'username'))) - ], + type: OperationType.mutation, + name: NameNode(value: 'DeleteUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, ]); Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => Mutation$DeleteUser.fromJson(data); typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( - dynamic, Mutation$DeleteUser?); + dynamic, + Mutation$DeleteUser?, +); class Options$Mutation$DeleteUser extends graphql.MutationOptions { - Options$Mutation$DeleteUser( - {String? operationName, - required Variables$Mutation$DeleteUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$DeleteUser? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$DeleteUser({ + String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$DeleteUser(data)), - update: update, - onError: onError, - document: documentNodeMutationDeleteUser, - parserFn: _parserFn$Mutation$DeleteUser); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$DeleteUser(data), + ), + update: update, + onError: onError, + document: documentNodeMutationDeleteUser, + parserFn: _parserFn$Mutation$DeleteUser, + ); final OnMutationCompleted$Mutation$DeleteUser? onCompletedWithParsed; @@ -1817,38 +4084,39 @@ class Options$Mutation$DeleteUser ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$DeleteUser extends graphql.WatchQueryOptions { - WatchOptions$Mutation$DeleteUser( - {String? operationName, - required Variables$Mutation$DeleteUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationDeleteUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$DeleteUser); + WatchOptions$Mutation$DeleteUser({ + String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteUser, + ); } extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { @@ -1860,18 +4128,27 @@ extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$DeleteUser$deleteUser - implements Fragment$basicMutationReturnFields { - Mutation$DeleteUser$deleteUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename}); + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$DeleteUser$deleteUser({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + }); - @override - factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => - _$Mutation$DeleteUser$deleteUserFromJson(json); + factory Mutation$DeleteUser$deleteUser.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$DeleteUser$deleteUser( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } final int code; @@ -1879,35 +4156,64 @@ class Mutation$DeleteUser$deleteUser final bool success; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$DeleteUser$deleteUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$DeleteUser$deleteUser) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1915,24 +4221,35 @@ class Mutation$DeleteUser$deleteUser extension UtilityExtension$Mutation$DeleteUser$deleteUser on Mutation$DeleteUser$deleteUser { CopyWith$Mutation$DeleteUser$deleteUser - get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); + get copyWith => CopyWith$Mutation$DeleteUser$deleteUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$DeleteUser$deleteUser { factory CopyWith$Mutation$DeleteUser$deleteUser( - Mutation$DeleteUser$deleteUser instance, - TRes Function(Mutation$DeleteUser$deleteUser) then) = - _CopyWithImpl$Mutation$DeleteUser$deleteUser; + Mutation$DeleteUser$deleteUser instance, + TRes Function(Mutation$DeleteUser$deleteUser) then, + ) = _CopyWithImpl$Mutation$DeleteUser$deleteUser; factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; - TRes call({int? code, String? message, bool? success, String? $__typename}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); } class _CopyWithImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { - _CopyWithImpl$Mutation$DeleteUser$deleteUser(this._instance, this._then); + _CopyWithImpl$Mutation$DeleteUser$deleteUser( + this._instance, + this._then, + ); final Mutation$DeleteUser$deleteUser _instance; @@ -1940,24 +4257,25 @@ class _CopyWithImpl$Mutation$DeleteUser$deleteUser static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$DeleteUser$deleteUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); } class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser @@ -1966,46 +4284,77 @@ class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => _res; } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$UpdateUser { - Variables$Mutation$UpdateUser({required this.user}); + factory Variables$Mutation$UpdateUser( + {required Input$UserMutationInput user}) => + Variables$Mutation$UpdateUser._({ + r'user': user, + }); + + Variables$Mutation$UpdateUser._(this._$data); + + factory Variables$Mutation$UpdateUser.fromJson(Map data) { + final result$data = {}; + final l$user = data['user']; + result$data['user'] = + Input$UserMutationInput.fromJson((l$user as Map)); + return Variables$Mutation$UpdateUser._(result$data); + } + + Map _$data; + + Input$UserMutationInput get user => + (_$data['user'] as Input$UserMutationInput); + Map toJson() { + final result$data = {}; + final l$user = user; + result$data['user'] = l$user.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$UpdateUser + get copyWith => CopyWith$Variables$Mutation$UpdateUser( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$UpdateUser) || + runtimeType != other.runtimeType) { + return false; + } + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) { + return false; + } + return true; + } @override - factory Variables$Mutation$UpdateUser.fromJson(Map json) => - _$Variables$Mutation$UpdateUserFromJson(json); - - final Input$UserMutationInput user; - - Map toJson() => _$Variables$Mutation$UpdateUserToJson(this); int get hashCode { final l$user = user; return Object.hashAll([l$user]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UpdateUser) || - runtimeType != other.runtimeType) return false; - final l$user = user; - final lOther$user = other.user; - if (l$user != lOther$user) return false; - return true; - } - - CopyWith$Variables$Mutation$UpdateUser - get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$UpdateUser { factory CopyWith$Variables$Mutation$UpdateUser( - Variables$Mutation$UpdateUser instance, - TRes Function(Variables$Mutation$UpdateUser) then) = - _CopyWithImpl$Variables$Mutation$UpdateUser; + Variables$Mutation$UpdateUser instance, + TRes Function(Variables$Mutation$UpdateUser) then, + ) = _CopyWithImpl$Variables$Mutation$UpdateUser; factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UpdateUser; @@ -2015,7 +4364,10 @@ abstract class CopyWith$Variables$Mutation$UpdateUser { class _CopyWithImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { - _CopyWithImpl$Variables$Mutation$UpdateUser(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$UpdateUser( + this._instance, + this._then, + ); final Variables$Mutation$UpdateUser _instance; @@ -2023,10 +4375,12 @@ class _CopyWithImpl$Variables$Mutation$UpdateUser static const _undefined = {}; - TRes call({Object? user = _undefined}) => _then(Variables$Mutation$UpdateUser( - user: user == _undefined || user == null - ? _instance.user - : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => + _then(Variables$Mutation$UpdateUser._({ + ..._instance._$data, + if (user != _undefined && user != null) + 'user': (user as Input$UserMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$UpdateUser @@ -2038,61 +4392,97 @@ class _CopyWithStubImpl$Variables$Mutation$UpdateUser call({Input$UserMutationInput? user}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$UpdateUser { - Mutation$UpdateUser({required this.updateUser, required this.$__typename}); + Mutation$UpdateUser({ + required this.updateUser, + required this.$__typename, + }); - @override - factory Mutation$UpdateUser.fromJson(Map json) => - _$Mutation$UpdateUserFromJson(json); + factory Mutation$UpdateUser.fromJson(Map json) { + final l$updateUser = json['updateUser']; + final l$$__typename = json['__typename']; + return Mutation$UpdateUser( + updateUser: Mutation$UpdateUser$updateUser.fromJson( + (l$updateUser as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$UpdateUser$updateUser updateUser; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UpdateUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$updateUser = updateUser; + _resultData['updateUser'] = l$updateUser.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$updateUser = updateUser; final l$$__typename = $__typename; - return Object.hashAll([l$updateUser, l$$__typename]); + return Object.hashAll([ + l$updateUser, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) { return false; + } final l$updateUser = updateUser; final lOther$updateUser = other.updateUser; - if (l$updateUser != lOther$updateUser) return false; + if (l$updateUser != lOther$updateUser) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { CopyWith$Mutation$UpdateUser get copyWith => - CopyWith$Mutation$UpdateUser(this, (i) => i); + CopyWith$Mutation$UpdateUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UpdateUser { - factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, - TRes Function(Mutation$UpdateUser) then) = - _CopyWithImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser( + Mutation$UpdateUser instance, + TRes Function(Mutation$UpdateUser) then, + ) = _CopyWithImpl$Mutation$UpdateUser; factory CopyWith$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser; - TRes call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}); + TRes call({ + Mutation$UpdateUser$updateUser? updateUser, + String? $__typename, + }); CopyWith$Mutation$UpdateUser$updateUser get updateUser; } class _CopyWithImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { - _CopyWithImpl$Mutation$UpdateUser(this._instance, this._then); + _CopyWithImpl$Mutation$UpdateUser( + this._instance, + this._then, + ); final Mutation$UpdateUser _instance; @@ -2100,16 +4490,18 @@ class _CopyWithImpl$Mutation$UpdateUser static const _undefined = {}; - TRes call( - {Object? updateUser = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? updateUser = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$UpdateUser( - updateUser: updateUser == _undefined || updateUser == null - ? _instance.updateUser - : (updateUser as Mutation$UpdateUser$updateUser), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + updateUser: updateUser == _undefined || updateUser == null + ? _instance.updateUser + : (updateUser as Mutation$UpdateUser$updateUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$UpdateUser$updateUser get updateUser { final local$updateUser = _instance.updateUser; return CopyWith$Mutation$UpdateUser$updateUser( @@ -2123,7 +4515,10 @@ class _CopyWithStubImpl$Mutation$UpdateUser TRes _res; - call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => + call({ + Mutation$UpdateUser$updateUser? updateUser, + String? $__typename, + }) => _res; CopyWith$Mutation$UpdateUser$updateUser get updateUser => CopyWith$Mutation$UpdateUser$updateUser.stub(_res); @@ -2131,98 +4526,116 @@ class _CopyWithStubImpl$Mutation$UpdateUser const documentNodeMutationUpdateUser = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'UpdateUser'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode( - name: NameNode(value: 'UserMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'updateUser'), + type: OperationType.mutation, + name: NameNode(value: 'UpdateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'updateUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'user'), - value: VariableNode(name: NameNode(value: 'user'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( - dynamic, Mutation$UpdateUser?); + dynamic, + Mutation$UpdateUser?, +); class Options$Mutation$UpdateUser extends graphql.MutationOptions { - Options$Mutation$UpdateUser( - {String? operationName, - required Variables$Mutation$UpdateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$UpdateUser? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$UpdateUser({ + String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UpdateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$UpdateUser(data)), - update: update, - onError: onError, - document: documentNodeMutationUpdateUser, - parserFn: _parserFn$Mutation$UpdateUser); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$UpdateUser(data), + ), + update: update, + onError: onError, + document: documentNodeMutationUpdateUser, + parserFn: _parserFn$Mutation$UpdateUser, + ); final OnMutationCompleted$Mutation$UpdateUser? onCompletedWithParsed; @@ -2231,38 +4644,39 @@ class Options$Mutation$UpdateUser ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$UpdateUser extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UpdateUser( - {String? operationName, - required Variables$Mutation$UpdateUser variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationUpdateUser, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UpdateUser); + WatchOptions$Mutation$UpdateUser({ + String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUpdateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UpdateUser, + ); } extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { @@ -2274,19 +4688,32 @@ extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$UpdateUser$updateUser - implements Fragment$basicMutationReturnFields { - Mutation$UpdateUser$updateUser( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$UpdateUser$updateUser({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override - factory Mutation$UpdateUser$updateUser.fromJson(Map json) => - _$Mutation$UpdateUser$updateUserFromJson(json); + factory Mutation$UpdateUser$updateUser.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$UpdateUser$updateUser( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -2294,42 +4721,75 @@ class Mutation$UpdateUser$updateUser final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => _$Mutation$UpdateUser$updateUserToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$UpdateUser$updateUser) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -2337,30 +4797,37 @@ class Mutation$UpdateUser$updateUser extension UtilityExtension$Mutation$UpdateUser$updateUser on Mutation$UpdateUser$updateUser { CopyWith$Mutation$UpdateUser$updateUser - get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); + get copyWith => CopyWith$Mutation$UpdateUser$updateUser( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$UpdateUser$updateUser { factory CopyWith$Mutation$UpdateUser$updateUser( - Mutation$UpdateUser$updateUser instance, - TRes Function(Mutation$UpdateUser$updateUser) then) = - _CopyWithImpl$Mutation$UpdateUser$updateUser; + Mutation$UpdateUser$updateUser instance, + TRes Function(Mutation$UpdateUser$updateUser) then, + ) = _CopyWithImpl$Mutation$UpdateUser$updateUser; factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser$updateUser; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { - _CopyWithImpl$Mutation$UpdateUser$updateUser(this._instance, this._then); + _CopyWithImpl$Mutation$UpdateUser$updateUser( + this._instance, + this._then, + ); final Mutation$UpdateUser$updateUser _instance; @@ -2368,28 +4835,29 @@ class _CopyWithImpl$Mutation$UpdateUser$updateUser static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$UpdateUser$updateUser( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -2404,53 +4872,80 @@ class _CopyWithStubImpl$Mutation$UpdateUser$updateUser TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$AddSshKey { - Variables$Mutation$AddSshKey({required this.sshInput}); + factory Variables$Mutation$AddSshKey( + {required Input$SshMutationInput sshInput}) => + Variables$Mutation$AddSshKey._({ + r'sshInput': sshInput, + }); + + Variables$Mutation$AddSshKey._(this._$data); + + factory Variables$Mutation$AddSshKey.fromJson(Map data) { + final result$data = {}; + final l$sshInput = data['sshInput']; + result$data['sshInput'] = + Input$SshMutationInput.fromJson((l$sshInput as Map)); + return Variables$Mutation$AddSshKey._(result$data); + } + + Map _$data; + + Input$SshMutationInput get sshInput => + (_$data['sshInput'] as Input$SshMutationInput); + Map toJson() { + final result$data = {}; + final l$sshInput = sshInput; + result$data['sshInput'] = l$sshInput.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$AddSshKey + get copyWith => CopyWith$Variables$Mutation$AddSshKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$AddSshKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) { + return false; + } + return true; + } @override - factory Variables$Mutation$AddSshKey.fromJson(Map json) => - _$Variables$Mutation$AddSshKeyFromJson(json); - - final Input$SshMutationInput sshInput; - - Map toJson() => _$Variables$Mutation$AddSshKeyToJson(this); int get hashCode { final l$sshInput = sshInput; return Object.hashAll([l$sshInput]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AddSshKey) || - runtimeType != other.runtimeType) return false; - final l$sshInput = sshInput; - final lOther$sshInput = other.sshInput; - if (l$sshInput != lOther$sshInput) return false; - return true; - } - - CopyWith$Variables$Mutation$AddSshKey - get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$AddSshKey { factory CopyWith$Variables$Mutation$AddSshKey( - Variables$Mutation$AddSshKey instance, - TRes Function(Variables$Mutation$AddSshKey) then) = - _CopyWithImpl$Variables$Mutation$AddSshKey; + Variables$Mutation$AddSshKey instance, + TRes Function(Variables$Mutation$AddSshKey) then, + ) = _CopyWithImpl$Variables$Mutation$AddSshKey; factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$AddSshKey; @@ -2460,7 +4955,10 @@ abstract class CopyWith$Variables$Mutation$AddSshKey { class _CopyWithImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { - _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$AddSshKey( + this._instance, + this._then, + ); final Variables$Mutation$AddSshKey _instance; @@ -2469,10 +4967,11 @@ class _CopyWithImpl$Variables$Mutation$AddSshKey static const _undefined = {}; TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$AddSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); + _then(Variables$Mutation$AddSshKey._({ + ..._instance._$data, + if (sshInput != _undefined && sshInput != null) + 'sshInput': (sshInput as Input$SshMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$AddSshKey @@ -2484,61 +4983,97 @@ class _CopyWithStubImpl$Variables$Mutation$AddSshKey call({Input$SshMutationInput? sshInput}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$AddSshKey { - Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); + Mutation$AddSshKey({ + required this.addSshKey, + required this.$__typename, + }); - @override - factory Mutation$AddSshKey.fromJson(Map json) => - _$Mutation$AddSshKeyFromJson(json); + factory Mutation$AddSshKey.fromJson(Map json) { + final l$addSshKey = json['addSshKey']; + final l$$__typename = json['__typename']; + return Mutation$AddSshKey( + addSshKey: Mutation$AddSshKey$addSshKey.fromJson( + (l$addSshKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$AddSshKey$addSshKey addSshKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$AddSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$addSshKey = addSshKey; + _resultData['addSshKey'] = l$addSshKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$addSshKey = addSshKey; final l$$__typename = $__typename; - return Object.hashAll([l$addSshKey, l$$__typename]); + return Object.hashAll([ + l$addSshKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) { return false; + } final l$addSshKey = addSshKey; final lOther$addSshKey = other.addSshKey; - if (l$addSshKey != lOther$addSshKey) return false; + if (l$addSshKey != lOther$addSshKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { CopyWith$Mutation$AddSshKey get copyWith => - CopyWith$Mutation$AddSshKey(this, (i) => i); + CopyWith$Mutation$AddSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AddSshKey { factory CopyWith$Mutation$AddSshKey( - Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = - _CopyWithImpl$Mutation$AddSshKey; + Mutation$AddSshKey instance, + TRes Function(Mutation$AddSshKey) then, + ) = _CopyWithImpl$Mutation$AddSshKey; factory CopyWith$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey; - TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); + TRes call({ + Mutation$AddSshKey$addSshKey? addSshKey, + String? $__typename, + }); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; } class _CopyWithImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { - _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$AddSshKey( + this._instance, + this._then, + ); final Mutation$AddSshKey _instance; @@ -2546,15 +5081,18 @@ class _CopyWithImpl$Mutation$AddSshKey static const _undefined = {}; - TRes call( - {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => + TRes call({ + Object? addSshKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$AddSshKey( - addSshKey: addSshKey == _undefined || addSshKey == null - ? _instance.addSshKey - : (addSshKey as Mutation$AddSshKey$addSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + addSshKey: addSshKey == _undefined || addSshKey == null + ? _instance.addSshKey + : (addSshKey as Mutation$AddSshKey$addSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { final local$addSshKey = _instance.addSshKey; return CopyWith$Mutation$AddSshKey$addSshKey( @@ -2568,105 +5106,127 @@ class _CopyWithStubImpl$Mutation$AddSshKey TRes _res; - call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; + call({ + Mutation$AddSshKey$addSshKey? addSshKey, + String? $__typename, + }) => + _res; CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); } const documentNodeMutationAddSshKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'AddSshKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'addSshKey'), + type: OperationType.mutation, + name: NameNode(value: 'AddSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'addSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => Mutation$AddSshKey.fromJson(data); typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( - dynamic, Mutation$AddSshKey?); + dynamic, + Mutation$AddSshKey?, +); class Options$Mutation$AddSshKey extends graphql.MutationOptions { - Options$Mutation$AddSshKey( - {String? operationName, - required Variables$Mutation$AddSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$AddSshKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$AddSshKey({ + String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AddSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted(data, - data == null ? null : _parserFn$Mutation$AddSshKey(data)), - update: update, - onError: onError, - document: documentNodeMutationAddSshKey, - parserFn: _parserFn$Mutation$AddSshKey); + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$AddSshKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationAddSshKey, + parserFn: _parserFn$Mutation$AddSshKey, + ); final OnMutationCompleted$Mutation$AddSshKey? onCompletedWithParsed; @@ -2675,38 +5235,39 @@ class Options$Mutation$AddSshKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$AddSshKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$AddSshKey( - {String? operationName, - required Variables$Mutation$AddSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationAddSshKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$AddSshKey); + WatchOptions$Mutation$AddSshKey({ + String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAddSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AddSshKey, + ); } extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { @@ -2718,19 +5279,32 @@ extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$AddSshKey$addSshKey - implements Fragment$basicMutationReturnFields { - Mutation$AddSshKey$addSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$AddSshKey$addSshKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override - factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => - _$Mutation$AddSshKey$addSshKeyFromJson(json); + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$AddSshKey$addSshKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -2738,42 +5312,75 @@ class Mutation$AddSshKey$addSshKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => _$Mutation$AddSshKey$addSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$AddSshKey$addSshKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -2781,30 +5388,37 @@ class Mutation$AddSshKey$addSshKey extension UtilityExtension$Mutation$AddSshKey$addSshKey on Mutation$AddSshKey$addSshKey { CopyWith$Mutation$AddSshKey$addSshKey - get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); + get copyWith => CopyWith$Mutation$AddSshKey$addSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$AddSshKey$addSshKey { factory CopyWith$Mutation$AddSshKey$addSshKey( - Mutation$AddSshKey$addSshKey instance, - TRes Function(Mutation$AddSshKey$addSshKey) then) = - _CopyWithImpl$Mutation$AddSshKey$addSshKey; + Mutation$AddSshKey$addSshKey instance, + TRes Function(Mutation$AddSshKey$addSshKey) then, + ) = _CopyWithImpl$Mutation$AddSshKey$addSshKey; factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { - _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$AddSshKey$addSshKey( + this._instance, + this._then, + ); final Mutation$AddSshKey$addSshKey _instance; @@ -2812,28 +5426,29 @@ class _CopyWithImpl$Mutation$AddSshKey$addSshKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$AddSshKey$addSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -2848,54 +5463,80 @@ class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); } -@JsonSerializable(explicitToJson: true) class Variables$Mutation$RemoveSshKey { - Variables$Mutation$RemoveSshKey({required this.sshInput}); + factory Variables$Mutation$RemoveSshKey( + {required Input$SshMutationInput sshInput}) => + Variables$Mutation$RemoveSshKey._({ + r'sshInput': sshInput, + }); + + Variables$Mutation$RemoveSshKey._(this._$data); + + factory Variables$Mutation$RemoveSshKey.fromJson(Map data) { + final result$data = {}; + final l$sshInput = data['sshInput']; + result$data['sshInput'] = + Input$SshMutationInput.fromJson((l$sshInput as Map)); + return Variables$Mutation$RemoveSshKey._(result$data); + } + + Map _$data; + + Input$SshMutationInput get sshInput => + (_$data['sshInput'] as Input$SshMutationInput); + Map toJson() { + final result$data = {}; + final l$sshInput = sshInput; + result$data['sshInput'] = l$sshInput.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$RemoveSshKey + get copyWith => CopyWith$Variables$Mutation$RemoveSshKey( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$RemoveSshKey) || + runtimeType != other.runtimeType) { + return false; + } + final l$sshInput = sshInput; + final lOther$sshInput = other.sshInput; + if (l$sshInput != lOther$sshInput) { + return false; + } + return true; + } @override - factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => - _$Variables$Mutation$RemoveSshKeyFromJson(json); - - final Input$SshMutationInput sshInput; - - Map toJson() => - _$Variables$Mutation$RemoveSshKeyToJson(this); int get hashCode { final l$sshInput = sshInput; return Object.hashAll([l$sshInput]); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveSshKey) || - runtimeType != other.runtimeType) return false; - final l$sshInput = sshInput; - final lOther$sshInput = other.sshInput; - if (l$sshInput != lOther$sshInput) return false; - return true; - } - - CopyWith$Variables$Mutation$RemoveSshKey - get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RemoveSshKey { factory CopyWith$Variables$Mutation$RemoveSshKey( - Variables$Mutation$RemoveSshKey instance, - TRes Function(Variables$Mutation$RemoveSshKey) then) = - _CopyWithImpl$Variables$Mutation$RemoveSshKey; + Variables$Mutation$RemoveSshKey instance, + TRes Function(Variables$Mutation$RemoveSshKey) then, + ) = _CopyWithImpl$Variables$Mutation$RemoveSshKey; factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; @@ -2905,7 +5546,10 @@ abstract class CopyWith$Variables$Mutation$RemoveSshKey { class _CopyWithImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { - _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); + _CopyWithImpl$Variables$Mutation$RemoveSshKey( + this._instance, + this._then, + ); final Variables$Mutation$RemoveSshKey _instance; @@ -2914,10 +5558,11 @@ class _CopyWithImpl$Variables$Mutation$RemoveSshKey static const _undefined = {}; TRes call({Object? sshInput = _undefined}) => - _then(Variables$Mutation$RemoveSshKey( - sshInput: sshInput == _undefined || sshInput == null - ? _instance.sshInput - : (sshInput as Input$SshMutationInput))); + _then(Variables$Mutation$RemoveSshKey._({ + ..._instance._$data, + if (sshInput != _undefined && sshInput != null) + 'sshInput': (sshInput as Input$SshMutationInput), + })); } class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey @@ -2929,63 +5574,97 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey call({Input$SshMutationInput? sshInput}) => _res; } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveSshKey { - Mutation$RemoveSshKey( - {required this.removeSshKey, required this.$__typename}); + Mutation$RemoveSshKey({ + required this.removeSshKey, + required this.$__typename, + }); - @override - factory Mutation$RemoveSshKey.fromJson(Map json) => - _$Mutation$RemoveSshKeyFromJson(json); + factory Mutation$RemoveSshKey.fromJson(Map json) { + final l$removeSshKey = json['removeSshKey']; + final l$$__typename = json['__typename']; + return Mutation$RemoveSshKey( + removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( + (l$removeSshKey as Map)), + $__typename: (l$$__typename as String), + ); + } final Mutation$RemoveSshKey$removeSshKey removeSshKey; - @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$RemoveSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$removeSshKey = removeSshKey; + _resultData['removeSshKey'] = l$removeSshKey.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override int get hashCode { final l$removeSshKey = removeSshKey; final l$$__typename = $__typename; - return Object.hashAll([l$removeSshKey, l$$__typename]); + return Object.hashAll([ + l$removeSshKey, + l$$__typename, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) { return false; + } final l$removeSshKey = removeSshKey; final lOther$removeSshKey = other.removeSshKey; - if (l$removeSshKey != lOther$removeSshKey) return false; + if (l$removeSshKey != lOther$removeSshKey) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { CopyWith$Mutation$RemoveSshKey get copyWith => - CopyWith$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Mutation$RemoveSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveSshKey { - factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, - TRes Function(Mutation$RemoveSshKey) then) = - _CopyWithImpl$Mutation$RemoveSshKey; + factory CopyWith$Mutation$RemoveSshKey( + Mutation$RemoveSshKey instance, + TRes Function(Mutation$RemoveSshKey) then, + ) = _CopyWithImpl$Mutation$RemoveSshKey; factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey; - TRes call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); + TRes call({ + Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename, + }); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; } class _CopyWithImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { - _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveSshKey( + this._instance, + this._then, + ); final Mutation$RemoveSshKey _instance; @@ -2993,16 +5672,18 @@ class _CopyWithImpl$Mutation$RemoveSshKey static const _undefined = {}; - TRes call( - {Object? removeSshKey = _undefined, - Object? $__typename = _undefined}) => + TRes call({ + Object? removeSshKey = _undefined, + Object? $__typename = _undefined, + }) => _then(Mutation$RemoveSshKey( - removeSshKey: removeSshKey == _undefined || removeSshKey == null - ? _instance.removeSshKey - : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); + removeSshKey: removeSshKey == _undefined || removeSshKey == null + ? _instance.removeSshKey + : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { final local$removeSshKey = _instance.removeSshKey; return CopyWith$Mutation$RemoveSshKey$removeSshKey( @@ -3016,9 +5697,10 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey TRes _res; - call( - {Mutation$RemoveSshKey$removeSshKey? removeSshKey, - String? $__typename}) => + call({ + Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename, + }) => _res; CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); @@ -3026,60 +5708,73 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ OperationDefinitionNode( - type: OperationType.mutation, - name: NameNode(value: 'RemoveSshKey'), - variableDefinitions: [ - VariableDefinitionNode( - variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode( - name: NameNode(value: 'SshMutationInput'), isNonNull: true), - defaultValue: DefaultValueNode(value: null), - directives: []) - ], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'removeSshKey'), + type: OperationType.mutation, + name: NameNode(value: 'RemoveSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'user'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'sshInput'), - value: VariableNode(name: NameNode(value: 'sshInput'))) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), - directives: []), + name: NameNode(value: 'userFields'), + directives: [], + ), FieldNode( - name: NameNode(value: 'user'), - alias: null, - arguments: [], - directives: [], - selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'userFields'), directives: []), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null) - ])), - FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], - selectionSet: null) - ])), + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); @@ -3087,41 +5782,43 @@ Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( Map data) => Mutation$RemoveSshKey.fromJson(data); typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( - dynamic, Mutation$RemoveSshKey?); + dynamic, + Mutation$RemoveSshKey?, +); class Options$Mutation$RemoveSshKey extends graphql.MutationOptions { - Options$Mutation$RemoveSshKey( - {String? operationName, - required Variables$Mutation$RemoveSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, - graphql.OnMutationUpdate? update, - graphql.OnError? onError}) - : onCompletedWithParsed = onCompleted, + Options$Mutation$RemoveSshKey({ + String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - onCompleted: onCompleted == null - ? null - : (data) => onCompleted( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( data, - data == null - ? null - : _parserFn$Mutation$RemoveSshKey(data)), - update: update, - onError: onError, - document: documentNodeMutationRemoveSshKey, - parserFn: _parserFn$Mutation$RemoveSshKey); + data == null ? null : _parserFn$Mutation$RemoveSshKey(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRemoveSshKey, + parserFn: _parserFn$Mutation$RemoveSshKey, + ); final OnMutationCompleted$Mutation$RemoveSshKey? onCompletedWithParsed; @@ -3130,38 +5827,39 @@ class Options$Mutation$RemoveSshKey ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), - onCompletedWithParsed + onCompletedWithParsed, ]; } class WatchOptions$Mutation$RemoveSshKey extends graphql.WatchQueryOptions { - WatchOptions$Mutation$RemoveSshKey( - {String? operationName, - required Variables$Mutation$RemoveSshKey variables, - graphql.FetchPolicy? fetchPolicy, - graphql.ErrorPolicy? errorPolicy, - graphql.CacheRereadPolicy? cacheRereadPolicy, - Object? optimisticResult, - graphql.Context? context, - Duration? pollInterval, - bool? eagerlyFetchResults, - bool carryForwardDataOnException = true, - bool fetchResults = false}) - : super( - variables: variables.toJson(), - operationName: operationName, - fetchPolicy: fetchPolicy, - errorPolicy: errorPolicy, - cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, - context: context, - document: documentNodeMutationRemoveSshKey, - pollInterval: pollInterval, - eagerlyFetchResults: eagerlyFetchResults, - carryForwardDataOnException: carryForwardDataOnException, - fetchResults: fetchResults, - parserFn: _parserFn$Mutation$RemoveSshKey); + WatchOptions$Mutation$RemoveSshKey({ + String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveSshKey, + ); } extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { @@ -3173,20 +5871,33 @@ extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { this.watchMutation(options); } -@JsonSerializable(explicitToJson: true) class Mutation$RemoveSshKey$removeSshKey - implements Fragment$basicMutationReturnFields { - Mutation$RemoveSshKey$removeSshKey( - {required this.code, - required this.message, - required this.success, - required this.$__typename, - this.user}); + implements Fragment$basicMutationReturnFields$$UserMutationReturn { + Mutation$RemoveSshKey$removeSshKey({ + required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user, + }); - @override factory Mutation$RemoveSshKey$removeSshKey.fromJson( - Map json) => - _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$user = json['user']; + return Mutation$RemoveSshKey$removeSshKey( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + user: l$user == null + ? null + : Fragment$userFields.fromJson((l$user as Map)), + ); + } final int code; @@ -3194,43 +5905,75 @@ class Mutation$RemoveSshKey$removeSshKey final bool success; - @JsonKey(name: '__typename') final String $__typename; final Fragment$userFields? user; - Map toJson() => - _$Mutation$RemoveSshKey$removeSshKeyToJson(this); + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$user = user; + _resultData['user'] = l$user?.toJson(); + return _resultData; + } + + @override int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll( - [l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$user, + ]); } @override bool operator ==(Object other) { - if (identical(this, other)) return true; + if (identical(this, other)) { + return true; + } if (!(other is Mutation$RemoveSshKey$removeSshKey) || - runtimeType != other.runtimeType) return false; + runtimeType != other.runtimeType) { + return false; + } final l$code = code; final lOther$code = other.code; - if (l$code != lOther$code) return false; + if (l$code != lOther$code) { + return false; + } final l$message = message; final lOther$message = other.message; - if (l$message != lOther$message) return false; + if (l$message != lOther$message) { + return false; + } final l$success = success; final lOther$success = other.success; - if (l$success != lOther$success) return false; + if (l$success != lOther$success) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) return false; + if (l$$__typename != lOther$$__typename) { + return false; + } final l$user = user; final lOther$user = other.user; - if (l$user != lOther$user) return false; + if (l$user != lOther$user) { + return false; + } return true; } } @@ -3239,31 +5982,37 @@ extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey on Mutation$RemoveSshKey$removeSshKey { CopyWith$Mutation$RemoveSshKey$removeSshKey< Mutation$RemoveSshKey$removeSshKey> - get copyWith => - CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); + get copyWith => CopyWith$Mutation$RemoveSshKey$removeSshKey( + this, + (i) => i, + ); } abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { factory CopyWith$Mutation$RemoveSshKey$removeSshKey( - Mutation$RemoveSshKey$removeSshKey instance, - TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; + Mutation$RemoveSshKey$removeSshKey instance, + TRes Function(Mutation$RemoveSshKey$removeSshKey) then, + ) = _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; - TRes call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}); + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }); CopyWith$Fragment$userFields get user; } class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { - _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); + _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey( + this._instance, + this._then, + ); final Mutation$RemoveSshKey$removeSshKey _instance; @@ -3271,28 +6020,29 @@ class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey static const _undefined = {}; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - Object? user = _undefined}) => + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? user = _undefined, + }) => _then(Mutation$RemoveSshKey$removeSshKey( - code: code == _undefined || code == null - ? _instance.code - : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - user: user == _undefined - ? _instance.user - : (user as Fragment$userFields?))); + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?), + )); CopyWith$Fragment$userFields get user { final local$user = _instance.user; return local$user == null @@ -3307,12 +6057,13 @@ class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey TRes _res; - call( - {int? code, - String? message, - bool? success, - String? $__typename, - Fragment$userFields? user}) => + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user, + }) => _res; CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); From 9d6721d58bc9288db9760abf452338931fba2195 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 24 Feb 2023 15:12:03 +0300 Subject: [PATCH 441/732] refactor: Deprecate showFab on BrandHeroScreen --- lib/ui/layouts/brand_hero_screen.dart | 3 ++- lib/ui/layouts/root_scaffold_with_navigation.dart | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ui/layouts/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart index d51bca4f..6782880a 100644 --- a/lib/ui/layouts/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -9,7 +9,7 @@ class BrandHeroScreen extends StatelessWidget { required this.children, super.key, this.hasBackButton = true, - this.hasFlashButton = true, + this.hasFlashButton = false, this.heroIcon, this.heroIconWidget, this.heroTitle = '', @@ -20,6 +20,7 @@ class BrandHeroScreen extends StatelessWidget { final List children; final bool hasBackButton; + @Deprecated('Flash button is now provided by root scaffold') final bool hasFlashButton; final IconData? heroIcon; final Widget? heroIconWidget; diff --git a/lib/ui/layouts/root_scaffold_with_navigation.dart b/lib/ui/layouts/root_scaffold_with_navigation.dart index 6401a783..ca0010d5 100644 --- a/lib/ui/layouts/root_scaffold_with_navigation.dart +++ b/lib/ui/layouts/root_scaffold_with_navigation.dart @@ -52,6 +52,9 @@ class RootScaffoldWithNavigation extends StatelessWidget { hidden: !(Breakpoints.small.isActive(context) && showBottomBar), key: const Key('bottomBar'), ), + floatingActionButton: showFab && Breakpoints.small.isActive(context) + ? const BrandFab() + : null, ); } } From 9a8965f56928b3558497ad40db2bc6ac2aa97394 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 24 Feb 2023 15:13:17 +0300 Subject: [PATCH 442/732] fix: Fix BottomBar showing incorrect animation when navigating from sibling routes --- .../root_scaffold_with_navigation.dart | 21 +++++++++---------- lib/ui/pages/root_route.dart | 5 ++++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/ui/layouts/root_scaffold_with_navigation.dart b/lib/ui/layouts/root_scaffold_with_navigation.dart index ca0010d5..ae4574fe 100644 --- a/lib/ui/layouts/root_scaffold_with_navigation.dart +++ b/lib/ui/layouts/root_scaffold_with_navigation.dart @@ -36,18 +36,19 @@ class RootScaffoldWithNavigation extends StatelessWidget { body: Row( children: [ if (Breakpoints.medium.isActive(context)) - MainScreenNavigationRail( + _MainScreenNavigationRail( destinations: destinations, showFab: showFab, ), if (Breakpoints.large.isActive(context)) - MainScreenNavigationDrawer( + _MainScreenNavigationDrawer( destinations: destinations, + showFab: showFab, ), Expanded(child: child), ], ), - bottomNavigationBar: BottomBar( + bottomNavigationBar: _BottomBar( destinations: destinations, hidden: !(Breakpoints.small.isActive(context) && showBottomBar), key: const Key('bottomBar'), @@ -104,11 +105,10 @@ class _RootAppBar extends StatelessWidget { ); } -class MainScreenNavigationRail extends StatelessWidget { - const MainScreenNavigationRail({ +class _MainScreenNavigationRail extends StatelessWidget { + const _MainScreenNavigationRail({ required this.destinations, this.showFab = true, - super.key, }); final List destinations; @@ -173,8 +173,8 @@ class MainScreenNavigationRail extends StatelessWidget { } } -class BottomBar extends StatelessWidget { - const BottomBar({ +class _BottomBar extends StatelessWidget { + const _BottomBar({ required this.destinations, required this.hidden, super.key, @@ -219,11 +219,10 @@ class BottomBar extends StatelessWidget { } } -class MainScreenNavigationDrawer extends StatelessWidget { - const MainScreenNavigationDrawer({ +class _MainScreenNavigationDrawer extends StatelessWidget { + const _MainScreenNavigationDrawer({ required this.destinations, this.showFab = true, - super.key, }); final List destinations; diff --git a/lib/ui/pages/root_route.dart b/lib/ui/pages/root_route.dart index 5fd2645f..80b57ece 100644 --- a/lib/ui/pages/root_route.dart +++ b/lib/ui/pages/root_route.dart @@ -38,11 +38,14 @@ class _RootPageState extends State with TickerProviderStateMixin { (final destination) => context.router.isRouteActive(destination.route.routeName), ); + final isOtherRouterActive = + context.router.root.current.name != RootRoute.name; final routeName = getRouteTitle(context.router.current.name).tr(); return RootScaffoldWithNavigation( title: routeName, destinations: destinations, - showBottomBar: !(currentDestinationIndex == -1), + showBottomBar: + !(currentDestinationIndex == -1 && !isOtherRouterActive), showFab: isReady, child: child, ); From 999c8346bea1f689e0b0139befb022654807dca7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 24 Feb 2023 15:15:01 +0300 Subject: [PATCH 443/732] style: Fix formatting --- lib/ui/pages/recovery_key/recovery_key.dart | 2 +- lib/ui/pages/services/service_page.dart | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index 006f72d0..9b83cd9e 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -28,7 +28,7 @@ class _RecoveryKeyPageState extends State { @override Widget build(final BuildContext context) { final RecoveryKeyState keyStatus = context.watch().state; - + final List widgets; String? subtitle = keyStatus.exists ? null : 'recovery_key.key_main_description'.tr(); diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 8f344a85..289af2b1 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -53,8 +53,7 @@ class _ServicePageState extends State { colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.onBackground, BlendMode.srcIn, - ) - // color: Theme.of(context).colorScheme.onBackground, + ), ), heroTitle: service.displayName, children: [ From ee9b8a4e315062a9b18fb70af00e3b9c515027fc Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 24 Feb 2023 19:45:32 +0300 Subject: [PATCH 444/732] refactor(router): Move more pages to new router --- assets/translations/en.json | 1 + .../components/brand_header/brand_header.dart | 3 + .../root_scaffold_with_navigation.dart | 9 +- .../pages/backup_details/backup_details.dart | 8 +- lib/ui/pages/providers/providers.dart | 18 +- .../server_storage/extending_volume.dart | 8 +- .../pages/server_storage/server_storage.dart | 14 +- lib/ui/pages/server_storage/storage_card.dart | 13 +- lib/ui/pages/services/service_page.dart | 18 +- lib/ui/pages/services/services.dart | 145 ++++++----- lib/ui/pages/users/add_user_fab.dart | 22 -- lib/ui/pages/users/new_user.dart | 179 ++++++------- lib/ui/pages/users/user.dart | 4 +- lib/ui/pages/users/user_details.dart | 8 +- lib/ui/pages/users/users.dart | 42 ++- lib/ui/router/router.dart | 30 ++- lib/ui/router/router.gr.dart | 245 ++++++++++++++++++ 17 files changed, 500 insertions(+), 267 deletions(-) delete mode 100644 lib/ui/pages/users/add_user_fab.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 15727826..a6a2f05c 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -255,6 +255,7 @@ "subtitle": "Private VPN server" }, "users": { + "details_title": "User details", "add_new_user": "Add a first user", "new_user": "New user", "delete_user": "Delete user", diff --git a/lib/ui/components/brand_header/brand_header.dart b/lib/ui/components/brand_header/brand_header.dart index abdabc6f..3151aff7 100644 --- a/lib/ui/components/brand_header/brand_header.dart +++ b/lib/ui/components/brand_header/brand_header.dart @@ -25,5 +25,8 @@ class BrandHeader extends StatelessWidget { onBackButtonPressed ?? () => Navigator.of(context).pop(), ) : null, + actions: const [ + SizedBox.shrink(), + ], ); } diff --git a/lib/ui/layouts/root_scaffold_with_navigation.dart b/lib/ui/layouts/root_scaffold_with_navigation.dart index ae4574fe..8fd3d7a7 100644 --- a/lib/ui/layouts/root_scaffold_with_navigation.dart +++ b/lib/ui/layouts/root_scaffold_with_navigation.dart @@ -53,9 +53,10 @@ class RootScaffoldWithNavigation extends StatelessWidget { hidden: !(Breakpoints.small.isActive(context) && showBottomBar), key: const Key('bottomBar'), ), - floatingActionButton: showFab && Breakpoints.small.isActive(context) - ? const BrandFab() - : null, + floatingActionButton: + showFab && Breakpoints.small.isActive(context) && showBottomBar + ? const BrandFab() + : null, ); } } @@ -190,8 +191,6 @@ class _BottomBar extends StatelessWidget { .any((final route) => route.name == destination.route.routeName), ); - print(prevActiveIndex); - return AnimatedContainer( duration: const Duration(milliseconds: 500), height: hidden ? 0 : 80, diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index fd2757f8..8ba7ad30 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -13,14 +13,14 @@ import 'package:selfprivacy/ui/helpers/modals.dart'; GlobalKey navigatorKey = GlobalKey(); -class BackupDetails extends StatefulWidget { - const BackupDetails({super.key}); +class BackupDetailsPage extends StatefulWidget { + const BackupDetailsPage({super.key}); @override - State createState() => _BackupDetailsState(); + State createState() => _BackupDetailsPageState(); } -class _BackupDetailsState extends State +class _BackupDetailsPageState extends State with SingleTickerProviderStateMixin { @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 1b9ffb47..c6cb3179 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; @@ -10,11 +11,8 @@ import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; -import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; -import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; -import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; +import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -84,8 +82,7 @@ class _ProvidersPageState extends State { subtitle: diskStatus.isDiskOkay ? 'storage.status_ok'.tr() : 'storage.status_error'.tr(), - onTap: () => Navigator.of(context) - .push(materialRoute(const ServerDetailsScreen())), + onTap: () => context.pushRoute(const ServerDetailsRoute()), ), const SizedBox(height: 16), _Card( @@ -95,11 +92,7 @@ class _ProvidersPageState extends State { subtitle: appConfig.isDomainSelected ? appConfig.serverDomain!.domainName : '', - onTap: () => Navigator.of(context).push( - materialRoute( - const DnsDetailsPage(), - ), - ), + onTap: () => context.pushRoute(const DnsDetailsRoute()), ), const SizedBox(height: 16), // TODO: When backups are fixed, show this card @@ -111,8 +104,7 @@ class _ProvidersPageState extends State { icon: BrandIcons.save, title: 'backup.card_title'.tr(), subtitle: isBackupInitialized ? 'backup.card_subtitle'.tr() : '', - onTap: () => Navigator.of(context) - .push(materialRoute(const BackupDetails())), + onTap: () => context.pushRoute(const BackupDetailsRoute()), ), ], ), diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 808cd6d5..41b7b36f 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; @@ -8,8 +9,6 @@ import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; -import 'package:selfprivacy/ui/pages/root_route.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ExtendingVolumePage extends StatefulWidget { const ExtendingVolumePage({ @@ -155,10 +154,7 @@ class _ExtendingVolumePageState extends State { DiskSize.fromGibibyte(_currentSliderGbValue), context.read().reload, ); - Navigator.of(context).pushAndRemoveUntil( - materialRoute(const RootPage()), - (final predicate) => false, - ); + context.router.popUntilRoot(); }, child: Text('storage.extend_volume_button.title'.tr()), ), diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 313fb5de..c7606b8e 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -7,9 +8,8 @@ import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; -import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/router/router.dart'; class ServerStoragePage extends StatefulWidget { const ServerStoragePage({ @@ -105,12 +105,10 @@ class ServerStorageSection extends StatelessWidget { const SizedBox(height: 16), BrandOutlinedButton( title: 'storage.extend_volume_button.title'.tr(), - onPressed: () => Navigator.of(context).push( - materialRoute( - ExtendingVolumePage( - diskVolumeToResize: volume, - diskStatus: diskStatus, - ), + onPressed: () => context.pushRoute( + ExtendingVolumeRoute( + diskVolumeToResize: volume, + diskStatus: diskStatus, ), ), ), diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index ae0c2369..ac633463 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -1,12 +1,12 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; -import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/router/router.dart'; class StorageCard extends StatelessWidget { const StorageCard({ @@ -45,13 +45,8 @@ class StorageCard extends StatelessWidget { clipBehavior: Clip.antiAlias, child: InkResponse( highlightShape: BoxShape.rectangle, - onTap: () => Navigator.of(context).push( - materialRoute( - ServerStoragePage( - diskStatus: diskStatus, - ), - ), - ), + onTap: () => + context.pushRoute(ServerStorageRoute(diskStatus: diskStatus)), child: Padding( padding: const EdgeInsets.all(16.0), child: Column( diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 289af2b1..88fedddd 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -8,9 +9,8 @@ import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; +import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/launch_url.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ServicePage extends StatefulWidget { const ServicePage({required this.serviceId, super.key}); @@ -111,14 +111,12 @@ class _ServicePageState extends State { ListTile( iconColor: Theme.of(context).colorScheme.onBackground, // Open page ServicesMigrationPage - onTap: () => Navigator.of(context).push( - materialRoute( - ServicesMigrationPage( - services: [service], - diskStatus: - context.read().state.diskStatus, - isMigration: false, - ), + onTap: () => context.pushRoute( + ServicesMigrationRoute( + services: [service], + diskStatus: + context.read().state.diskStatus, + isMigration: false, ), ), leading: const Icon(Icons.drive_file_move_outlined), diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 3e919158..3d6b185e 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; @@ -5,16 +6,14 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/ui/pages/services/service_page.dart'; +import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/launch_url.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; class ServicesPage extends StatefulWidget { @@ -101,79 +100,81 @@ class _Card extends StatelessWidget { } } - return GestureDetector( - onTap: isReady - ? () => Navigator.of(context) - .push(materialRoute(ServicePage(serviceId: service.id))) - : null, - child: BrandCards.big( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - IconStatusMask( - status: getStatus(service.status), - icon: SvgPicture.string( - service.svgIcon, - width: 30.0, - height: 30.0, - color: Theme.of(context).colorScheme.onBackground, - ), - ), - ], - ), - ClipRect( - child: Stack( + return Card( + clipBehavior: Clip.antiAlias, + child: InkResponse( + highlightShape: BoxShape.rectangle, + onTap: isReady + ? () => context.pushRoute( + ServiceRoute(serviceId: service.id), + ) + : null, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox(height: 10), - BrandText.h2(service.displayName), - const SizedBox(height: 10), - if (service.url != '' && service.url != null) - Column( - children: [ - GestureDetector( - onTap: () => launchURL( - service.url, - ), - child: Text( - '${service.url}', - style: TextStyle( - color: - Theme.of(context).colorScheme.secondary, - decoration: TextDecoration.underline, - ), - ), - ), - const SizedBox(height: 10), - ], - ), - if (service.id == 'mailserver') - Column( - children: [ - Text( - domainName, - style: TextStyle( - color: Theme.of(context).colorScheme.primary, - decoration: TextDecoration.underline, - ), - ), - const SizedBox(height: 10), - ], - ), - BrandText.body2(service.loginInfo), - const SizedBox(height: 10), - BrandText.body2(service.description), - const SizedBox(height: 10), - ], + IconStatusMask( + status: getStatus(service.status), + icon: SvgPicture.string( + service.svgIcon, + width: 30.0, + height: 30.0, + colorFilter: const ColorFilter.mode( + Colors.white, + BlendMode.srcIn, + ), + ), ), ], ), - ) - ], + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 10), + BrandText.h2(service.displayName), + const SizedBox(height: 10), + if (service.url != '' && service.url != null) + Column( + children: [ + GestureDetector( + onTap: () => launchURL( + service.url, + ), + child: Text( + '${service.url}', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + decoration: TextDecoration.underline, + ), + ), + ), + const SizedBox(height: 10), + ], + ), + if (service.id == 'mailserver') + Column( + children: [ + Text( + domainName, + style: TextStyle( + color: Theme.of(context).colorScheme.primary, + decoration: TextDecoration.underline, + ), + ), + const SizedBox(height: 10), + ], + ), + BrandText.body2(service.loginInfo), + const SizedBox(height: 10), + BrandText.body2(service.description), + const SizedBox(height: 10), + ], + ) + ], + ), ), ), ); diff --git a/lib/ui/pages/users/add_user_fab.dart b/lib/ui/pages/users/add_user_fab.dart deleted file mode 100644 index 7e87e51d..00000000 --- a/lib/ui/pages/users/add_user_fab.dart +++ /dev/null @@ -1,22 +0,0 @@ -part of 'users.dart'; - -class AddUserFab extends StatelessWidget { - const AddUserFab({super.key}); - - @override - Widget build(final BuildContext context) => FloatingActionButton.small( - heroTag: 'new_user_fab', - onPressed: () { - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: MediaQuery.of(context).viewInsets, - child: const NewUser(), - ), - ); - }, - child: const Icon(Icons.person_add_outlined), - ); -} diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 7c393296..484ce174 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -1,7 +1,7 @@ part of 'users.dart'; -class NewUser extends StatelessWidget { - const NewUser({super.key}); +class NewUserPage extends StatelessWidget { + const NewUserPage({super.key}); @override Widget build(final BuildContext context) { @@ -10,108 +10,89 @@ class NewUser extends StatelessWidget { final String domainName = UiHelpers.getDomainName(config); - return BrandBottomSheet( - child: BlocProvider( - create: (final BuildContext context) { - final jobCubit = context.read(); - final jobState = jobCubit.state; - final users = []; - users.addAll(context.read().state.users); - if (jobState is JobsStateWithJobs) { - final jobs = jobState.clientJobList; - for (final job in jobs) { - if (job is CreateUserJob) { - users.add(job.user); - } + return BlocProvider( + create: (final BuildContext context) { + final jobCubit = context.read(); + final jobState = jobCubit.state; + final users = []; + users.addAll(context.read().state.users); + if (jobState is JobsStateWithJobs) { + final jobs = jobState.clientJobList; + for (final job in jobs) { + if (job is CreateUserJob) { + users.add(job.user); } } - return UserFormCubit( - jobsCubit: jobCubit, - fieldFactory: FieldCubitFactory(context), - ); - }, - child: Builder( - builder: (final BuildContext context) { - final FormCubitState formCubitState = - context.watch().state; + } + return UserFormCubit( + jobsCubit: jobCubit, + fieldFactory: FieldCubitFactory(context), + ); + }, + child: Builder( + builder: (final BuildContext context) { + final FormCubitState formCubitState = + context.watch().state; - return BlocListener( - listener: - (final BuildContext context, final FormCubitState state) { - if (state.isSubmitted) { - Navigator.pop(context); - } - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - BrandHeader( - title: 'users.new_user'.tr(), - ), - const SizedBox(width: 14), - Padding( - padding: paddingH15V0, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (formCubitState.isErrorShown) - Text( - 'users.username_rule'.tr(), - style: TextStyle( - color: Theme.of(context).colorScheme.error, - ), - ), - const SizedBox(width: 14), - IntrinsicHeight( - child: CubitFormTextField( - formFieldCubit: context.read().login, - decoration: InputDecoration( - labelText: 'users.login'.tr(), - suffixText: '@$domainName', - ), - ), - ), - const SizedBox(height: 20), - CubitFormTextField( - formFieldCubit: - context.read().password, - decoration: InputDecoration( - alignLabelWithHint: false, - labelText: 'basis.password'.tr(), - suffixIcon: Padding( - padding: const EdgeInsets.only(right: 8), - child: IconButton( - icon: Icon( - BrandIcons.refresh, - color: - Theme.of(context).colorScheme.secondary, - ), - onPressed: context - .read() - .genNewPassword, - ), - ), - ), - ), - const SizedBox(height: 30), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), - text: 'basis.create'.tr(), - ), - const SizedBox(height: 40), - Text('users.new_user_info_note'.tr()), - const SizedBox(height: 30), - ], + return BlocListener( + listener: (final BuildContext context, final FormCubitState state) { + if (state.isSubmitted) { + context.router.pop(); + } + }, + child: BrandHeroScreen( + heroTitle: 'users.new_user'.tr(), + heroIcon: Icons.person_add_outlined, + children: [ + if (formCubitState.isErrorShown) + Text( + 'users.username_rule'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.error, ), ), - ], - ), - ); - }, - ), + const SizedBox(width: 14), + IntrinsicHeight( + child: CubitFormTextField( + formFieldCubit: context.read().login, + decoration: InputDecoration( + labelText: 'users.login'.tr(), + suffixText: '@$domainName', + ), + ), + ), + const SizedBox(height: 20), + CubitFormTextField( + formFieldCubit: context.read().password, + decoration: InputDecoration( + alignLabelWithHint: false, + labelText: 'basis.password'.tr(), + suffixIcon: Padding( + padding: const EdgeInsets.only(right: 8), + child: IconButton( + icon: Icon( + BrandIcons.refresh, + color: Theme.of(context).colorScheme.secondary, + ), + onPressed: context.read().genNewPassword, + ), + ), + ), + ), + const SizedBox(height: 30), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => context.read().trySubmit(), + text: 'basis.create'.tr(), + ), + const SizedBox(height: 40), + Text('users.new_user_info_note'.tr()), + const SizedBox(height: 30), + ], + ), + ); + }, ), ); } diff --git a/lib/ui/pages/users/user.dart b/lib/ui/pages/users/user.dart index 2658d3cc..0ce6d8cc 100644 --- a/lib/ui/pages/users/user.dart +++ b/lib/ui/pages/users/user.dart @@ -11,9 +11,7 @@ class _User extends StatelessWidget { @override Widget build(final BuildContext context) => InkWell( onTap: () { - Navigator.of(context).push( - materialRoute(UserDetailsPage(login: user.login)), - ); + context.pushRoute(UserDetailsRoute(login: user.login)); }, child: Container( padding: paddingH15V0, diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 0fc0447c..e7bb1995 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -87,6 +87,7 @@ class _DeleteUserTile extends StatelessWidget { onTap: () => { showDialog( context: context, + // useRootNavigator: false, builder: (final BuildContext context) => AlertDialog( title: Text('basis.confirmation'.tr()), content: SingleChildScrollView( @@ -102,7 +103,7 @@ class _DeleteUserTile extends StatelessWidget { TextButton( child: Text('basis.cancel'.tr()), onPressed: () { - Navigator.of(context).pop(); + context.router.pop(); }, ), TextButton( @@ -114,9 +115,8 @@ class _DeleteUserTile extends StatelessWidget { ), onPressed: () { context.read().addJob(DeleteUserJob(user: user)); - Navigator.of(context) - ..pop() - ..pop(); + context.router.childControllers.first.pop(); + context.router.pop(); }, ), ], diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 51b29828..7ed3d929 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -22,16 +23,14 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; +import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; - part 'empty.dart'; part 'new_user.dart'; part 'user.dart'; part 'user_details.dart'; -part 'add_user_fab.dart'; part 'reset_password.dart'; class UsersPage extends StatelessWidget { @@ -93,13 +92,36 @@ class UsersPage extends StatelessWidget { onRefresh: () async { context.read().refresh(); }, - child: ListView.builder( - itemCount: users.length, - itemBuilder: (final BuildContext context, final int index) => - _User( - user: users[index], - isRootUser: users[index].type == UserType.primary, - ), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: FilledButton.tonal( + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.person_add_outlined), + const SizedBox(width: 8), + Text('users.new_user'.tr()), + ], + ), + onPressed: () { + context.pushRoute(const NewUserRoute()); + }, + ), + ), + Expanded( + child: ListView.builder( + itemCount: users.length, + itemBuilder: + (final BuildContext context, final int index) => _User( + user: users[index], + isRootUser: users[index].type == UserType.primary, + ), + ), + ), + ], ), ); }, diff --git a/lib/ui/router/router.dart b/lib/ui/router/router.dart index d6f8043f..13141fd5 100644 --- a/lib/ui/router/router.dart +++ b/lib/ui/router/router.dart @@ -3,7 +3,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; +import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; import 'package:selfprivacy/ui/pages/more/about_application.dart'; import 'package:selfprivacy/ui/pages/more/app_settings/app_settings.dart'; import 'package:selfprivacy/ui/pages/more/app_settings/developer_settings.dart'; @@ -13,7 +15,11 @@ import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart'; import 'package:selfprivacy/ui/pages/providers/providers.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; +import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart'; +import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; +import 'package:selfprivacy/ui/pages/services/service_page.dart'; import 'package:selfprivacy/ui/pages/services/services.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; @@ -75,10 +81,17 @@ Widget fadeThroughTransition( ), AutoRoute(page: AppSettingsPage), AutoRoute(page: UserDetailsPage), + AutoRoute(page: NewUserPage), AutoRoute(page: RecoveryKeyPage), AutoRoute(page: DevicesScreen), AutoRoute(page: AboutApplicationPage), AutoRoute(page: DeveloperSettingsPage), + AutoRoute(page: ServicePage), + AutoRoute(page: ServerDetailsScreen), + AutoRoute(page: DnsDetailsPage), + AutoRoute(page: BackupDetailsPage), + AutoRoute(page: ServerStoragePage), + AutoRoute(page: ExtendingVolumePage), ], ), AutoRoute(page: ServicesMigrationPage), @@ -97,6 +110,7 @@ String getRouteTitle(final String routeName) { case 'ProvidersRoute': return 'basis.providers_title'; case 'ServicesRoute': + case 'ServiceRoute': return 'basis.services'; case 'UsersRoute': return 'basis.users'; @@ -105,7 +119,9 @@ String getRouteTitle(final String routeName) { case 'AppSettingsRoute': return 'application_settings.title'; case 'UserDetailsRoute': - return '[User Details]'; + return 'users.details_title'; + case 'NewUserRoute': + return 'users.new_user'; case 'RecoveryKeyRoute': return 'recovery_key.key_main_header'; case 'DevicesRoute': @@ -113,9 +129,19 @@ String getRouteTitle(final String routeName) { case 'AboutApplicationRoute': return 'about_us_page.title'; case 'ConsoleRoute': - return '[Console]'; + return 'console_page.title'; case 'DeveloperSettingsRoute': return 'developer_settings.title'; + case 'DnsDetailsRoute': + return 'domain.screen_title'; + case 'ServerDetailsRoute': + return 'server.card_title'; + case 'BackupDetailsRoute': + return 'backup.card_title'; + case 'ServerStorageRoute': + return 'storage.card_title'; + case 'ExtendingVolumeRoute': + return 'storage.extending_volume_title'; default: return routeName; } diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index e2655f39..acbc7830 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -115,6 +115,12 @@ class _$RootRouter extends RootStackRouter { ), ); }, + NewUserRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const NewUserPage(), + ); + }, RecoveryKeyRoute.name: (routeData) { return MaterialPageX( routeData: routeData, @@ -139,6 +145,55 @@ class _$RootRouter extends RootStackRouter { child: const DeveloperSettingsPage(), ); }, + ServiceRoute.name: (routeData) { + final args = routeData.argsAs(); + return MaterialPageX( + routeData: routeData, + child: ServicePage( + serviceId: args.serviceId, + key: args.key, + ), + ); + }, + ServerDetailsRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const ServerDetailsScreen(), + ); + }, + DnsDetailsRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const DnsDetailsPage(), + ); + }, + BackupDetailsRoute.name: (routeData) { + return MaterialPageX( + routeData: routeData, + child: const BackupDetailsPage(), + ); + }, + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); + return MaterialPageX( + routeData: routeData, + child: ServerStoragePage( + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + ExtendingVolumeRoute.name: (routeData) { + final args = routeData.argsAs(); + return MaterialPageX( + routeData: routeData, + child: ExtendingVolumePage( + diskVolumeToResize: args.diskVolumeToResize, + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, }; @override @@ -193,6 +248,11 @@ class _$RootRouter extends RootStackRouter { path: 'user-details-page', parent: RootRoute.name, ), + RouteConfig( + NewUserRoute.name, + path: 'new-user-page', + parent: RootRoute.name, + ), RouteConfig( RecoveryKeyRoute.name, path: 'recovery-key-page', @@ -213,6 +273,36 @@ class _$RootRouter extends RootStackRouter { path: 'developer-settings-page', parent: RootRoute.name, ), + RouteConfig( + ServiceRoute.name, + path: 'service-page', + parent: RootRoute.name, + ), + RouteConfig( + ServerDetailsRoute.name, + path: 'server-details-screen', + parent: RootRoute.name, + ), + RouteConfig( + DnsDetailsRoute.name, + path: 'dns-details-page', + parent: RootRoute.name, + ), + RouteConfig( + BackupDetailsRoute.name, + path: 'backup-details-page', + parent: RootRoute.name, + ), + RouteConfig( + ServerStorageRoute.name, + path: 'server-storage-page', + parent: RootRoute.name, + ), + RouteConfig( + ExtendingVolumeRoute.name, + path: 'extending-volume-page', + parent: RootRoute.name, + ), ], ), RouteConfig( @@ -425,6 +515,18 @@ class UserDetailsRouteArgs { } } +/// generated route for +/// [NewUserPage] +class NewUserRoute extends PageRouteInfo { + const NewUserRoute() + : super( + NewUserRoute.name, + path: 'new-user-page', + ); + + static const String name = 'NewUserRoute'; +} + /// generated route for /// [RecoveryKeyPage] class RecoveryKeyRoute extends PageRouteInfo { @@ -472,3 +574,146 @@ class DeveloperSettingsRoute extends PageRouteInfo { static const String name = 'DeveloperSettingsRoute'; } + +/// generated route for +/// [ServicePage] +class ServiceRoute extends PageRouteInfo { + ServiceRoute({ + required String serviceId, + Key? key, + }) : super( + ServiceRoute.name, + path: 'service-page', + args: ServiceRouteArgs( + serviceId: serviceId, + key: key, + ), + ); + + static const String name = 'ServiceRoute'; +} + +class ServiceRouteArgs { + const ServiceRouteArgs({ + required this.serviceId, + this.key, + }); + + final String serviceId; + + final Key? key; + + @override + String toString() { + return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; + } +} + +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute() + : super( + ServerDetailsRoute.name, + path: 'server-details-screen', + ); + + static const String name = 'ServerDetailsRoute'; +} + +/// generated route for +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute() + : super( + DnsDetailsRoute.name, + path: 'dns-details-page', + ); + + static const String name = 'DnsDetailsRoute'; +} + +/// generated route for +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute() + : super( + BackupDetailsRoute.name, + path: 'backup-details-page', + ); + + static const String name = 'BackupDetailsRoute'; +} + +/// generated route for +/// [ServerStoragePage] +class ServerStorageRoute extends PageRouteInfo { + ServerStorageRoute({ + required DiskStatus diskStatus, + Key? key, + }) : super( + ServerStorageRoute.name, + path: 'server-storage-page', + args: ServerStorageRouteArgs( + diskStatus: diskStatus, + key: key, + ), + ); + + static const String name = 'ServerStorageRoute'; +} + +class ServerStorageRouteArgs { + const ServerStorageRouteArgs({ + required this.diskStatus, + this.key, + }); + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; + } +} + +/// generated route for +/// [ExtendingVolumePage] +class ExtendingVolumeRoute extends PageRouteInfo { + ExtendingVolumeRoute({ + required DiskVolume diskVolumeToResize, + required DiskStatus diskStatus, + Key? key, + }) : super( + ExtendingVolumeRoute.name, + path: 'extending-volume-page', + args: ExtendingVolumeRouteArgs( + diskVolumeToResize: diskVolumeToResize, + diskStatus: diskStatus, + key: key, + ), + ); + + static const String name = 'ExtendingVolumeRoute'; +} + +class ExtendingVolumeRouteArgs { + const ExtendingVolumeRouteArgs({ + required this.diskVolumeToResize, + required this.diskStatus, + this.key, + }); + + final DiskVolume diskVolumeToResize; + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; + } +} From 3366585d769470450b1deb200244d5b8bfa6873f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 21 Mar 2023 20:44:52 +0300 Subject: [PATCH 445/732] fix(router): PopUpDialogs couldn't find the context. --- lib/logic/get_it/navigation.dart | 10 ++-- lib/main.dart | 69 +++++++++++++--------------- lib/ui/pages/users/user_details.dart | 4 +- lib/ui/router/router.dart | 2 +- 4 files changed, 42 insertions(+), 43 deletions(-) diff --git a/lib/logic/get_it/navigation.dart b/lib/logic/get_it/navigation.dart index 15adc982..aef86d63 100644 --- a/lib/logic/get_it/navigation.dart +++ b/lib/logic/get_it/navigation.dart @@ -7,10 +7,14 @@ class NavigationService { GlobalKey(); final GlobalKey navigatorKey = GlobalKey(); - NavigatorState? get navigator => navigatorKey.currentState; - void showPopUpDialog(final AlertDialog dialog) { - final BuildContext context = navigatorKey.currentState!.overlay!.context; + final BuildContext? context = navigatorKey.currentContext; + + if (context == null) { + showSnackBar( + 'Could not show dialog. This should not happen, please report this.'); + return; + } showDialog( context: context, diff --git a/lib/main.dart b/lib/main.dart index 702d8280..b6e1dc31 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -63,45 +63,42 @@ class SelfprivacyApp extends StatelessWidget { final ThemeData lightThemeData; final ThemeData darkThemeData; - final _appRouter = RootRouter(); + final _appRouter = RootRouter(getIt.get().navigatorKey); @override Widget build(final BuildContext context) => Localization( - child: AnnotatedRegion( - value: SystemUiOverlayStyle.light, // Manually changing appbar color - child: BlocAndProviderConfig( - child: BlocBuilder( - builder: ( - final BuildContext context, - final AppSettingsState appSettings, - ) => - MaterialApp.router( - routeInformationParser: _appRouter.defaultRouteParser(), - routerDelegate: _appRouter.delegate(), - scaffoldMessengerKey: - getIt.get().scaffoldMessengerKey, - localizationsDelegates: context.localizationDelegates, - supportedLocales: context.supportedLocales, - locale: context.locale, - debugShowCheckedModeBanner: false, - title: 'SelfPrivacy', - theme: lightThemeData, - darkTheme: darkThemeData, - themeMode: appSettings.isAutoDarkModeOn - ? ThemeMode.system - : appSettings.isDarkModeOn - ? ThemeMode.dark - : ThemeMode.light, - builder: (final BuildContext context, final Widget? widget) { - Widget error = const Text('...rendering error...'); - if (widget is Scaffold || widget is Navigator) { - error = Scaffold(body: Center(child: error)); - } - ErrorWidget.builder = - (final FlutterErrorDetails errorDetails) => error; - return widget!; - }, - ), + child: BlocAndProviderConfig( + child: BlocBuilder( + builder: ( + final BuildContext context, + final AppSettingsState appSettings, + ) => + MaterialApp.router( + routeInformationParser: _appRouter.defaultRouteParser(), + routerDelegate: _appRouter.delegate(), + scaffoldMessengerKey: + getIt.get().scaffoldMessengerKey, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + debugShowCheckedModeBanner: false, + title: 'SelfPrivacy', + theme: lightThemeData, + darkTheme: darkThemeData, + themeMode: appSettings.isAutoDarkModeOn + ? ThemeMode.system + : appSettings.isDarkModeOn + ? ThemeMode.dark + : ThemeMode.light, + builder: (final BuildContext context, final Widget? widget) { + Widget error = const Text('...rendering error...'); + if (widget is Scaffold || widget is Navigator) { + error = Scaffold(body: Center(child: error)); + } + ErrorWidget.builder = + (final FlutterErrorDetails errorDetails) => error; + return widget!; + }, ), ), ), diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index e7bb1995..63a7b171 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -231,9 +231,7 @@ class _SshKeysCard extends StatelessWidget { publicKey: key, ), ); - Navigator.of(context) - ..pop() - ..pop(); + context.popRoute(); }, ), ], diff --git a/lib/ui/router/router.dart b/lib/ui/router/router.dart index 13141fd5..c0afd0d6 100644 --- a/lib/ui/router/router.dart +++ b/lib/ui/router/router.dart @@ -99,7 +99,7 @@ Widget fadeThroughTransition( ], ) class RootRouter extends _$RootRouter { - RootRouter(); + RootRouter(GlobalKey super.navigatorKey); } // Function to map route names to route titles From af7196d84b14d17dedbafc5f3776def8fa0d974e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 22 Mar 2023 14:38:18 +0300 Subject: [PATCH 446/732] refactor(router): Migrate to AutoRouter v6 --- lib/logic/get_it/navigation.dart | 3 +- .../pages/backup_details/backup_details.dart | 2 + lib/ui/pages/devices/devices.dart | 2 + lib/ui/pages/dns_details/dns_details.dart | 2 + lib/ui/pages/more/about_application.dart | 2 + .../pages/more/app_settings/app_settings.dart | 2 + .../more/app_settings/developer_settings.dart | 2 + lib/ui/pages/more/console.dart | 2 + lib/ui/pages/more/more.dart | 1 + lib/ui/pages/onboarding/onboarding.dart | 1 + lib/ui/pages/providers/providers.dart | 1 + lib/ui/pages/recovery_key/recovery_key.dart | 2 + lib/ui/pages/root_route.dart | 1 + .../server_details/server_details_screen.dart | 2 + .../binds_migration/services_migration.dart | 2 + .../server_storage/extending_volume.dart | 1 + .../pages/server_storage/server_storage.dart | 1 + lib/ui/pages/services/service_page.dart | 1 + lib/ui/pages/services/services.dart | 1 + .../setup/initializing/initializing.dart | 1 + .../setup/recovering/recovery_routing.dart | 2 + lib/ui/pages/users/new_user.dart | 1 + lib/ui/pages/users/user_details.dart | 1 + lib/ui/pages/users/users.dart | 1 + lib/ui/router/router.dart | 110 +- lib/ui/router/router.gr.dart | 1035 ++++++++--------- 26 files changed, 568 insertions(+), 614 deletions(-) diff --git a/lib/logic/get_it/navigation.dart b/lib/logic/get_it/navigation.dart index aef86d63..7a43bcd7 100644 --- a/lib/logic/get_it/navigation.dart +++ b/lib/logic/get_it/navigation.dart @@ -12,7 +12,8 @@ class NavigationService { if (context == null) { showSnackBar( - 'Could not show dialog. This should not happen, please report this.'); + 'Could not show dialog. This should not happen, please report this.', + ); return; } diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 8ba7ad30..26e2dacc 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; @@ -13,6 +14,7 @@ import 'package:selfprivacy/ui/helpers/modals.dart'; GlobalKey navigatorKey = GlobalKey(); +@RoutePage() class BackupDetailsPage extends StatefulWidget { const BackupDetailsPage({super.key}); diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index fe37418c..e3279b46 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -10,6 +11,7 @@ import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/pages/devices/new_device.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; +@RoutePage() class DevicesScreen extends StatefulWidget { const DevicesScreen({super.key}); diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index be11f4ef..4f52c482 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/get_it_config.dart'; @@ -8,6 +9,7 @@ import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/utils/network_utils.dart'; +@RoutePage() class DnsDetailsPage extends StatefulWidget { const DnsDetailsPage({super.key}); diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 110a944c..7feab555 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; @@ -8,6 +9,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:url_launcher/url_launcher.dart'; +@RoutePage() class AboutApplicationPage extends StatelessWidget { const AboutApplicationPage({super.key}); diff --git a/lib/ui/pages/more/app_settings/app_settings.dart b/lib/ui/pages/more/app_settings/app_settings.dart index 08be5393..be8cc40e 100644 --- a/lib/ui/pages/more/app_settings/app_settings.dart +++ b/lib/ui/pages/more/app_settings/app_settings.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; @@ -6,6 +7,7 @@ import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:easy_localization/easy_localization.dart'; +@RoutePage() class AppSettingsPage extends StatefulWidget { const AppSettingsPage({super.key}); diff --git a/lib/ui/pages/more/app_settings/developer_settings.dart b/lib/ui/pages/more/app_settings/developer_settings.dart index 09ab8840..220cb791 100644 --- a/lib/ui/pages/more/app_settings/developer_settings.dart +++ b/lib/ui/pages/more/app_settings/developer_settings.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; @@ -6,6 +7,7 @@ import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:easy_localization/easy_localization.dart'; +@RoutePage() class DeveloperSettingsPage extends StatefulWidget { const DeveloperSettingsPage({super.key}); diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index 6811e39a..cd13ca62 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'dart:collection'; import 'package:easy_localization/easy_localization.dart'; @@ -7,6 +8,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +@RoutePage() class ConsolePage extends StatefulWidget { const ConsolePage({super.key}); diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 9ea2c49b..20eaeb2d 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -12,6 +12,7 @@ import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/ui/router/router.dart'; +@RoutePage() class MorePage extends StatelessWidget { const MorePage({super.key}); diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index 9da66e9d..efa38da4 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:easy_localization/easy_localization.dart'; +@RoutePage() class OnboardingPage extends StatefulWidget { const OnboardingPage({super.key}); diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index c6cb3179..25533a43 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -16,6 +16,7 @@ import 'package:selfprivacy/utils/breakpoints.dart'; GlobalKey navigatorKey = GlobalKey(); +@RoutePage() class ProvidersPage extends StatefulWidget { const ProvidersPage({super.key}); diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index 9b83cd9e..a7742b6d 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -11,6 +12,7 @@ import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; +@RoutePage() class RecoveryKeyPage extends StatefulWidget { const RecoveryKeyPage({super.key}); diff --git a/lib/ui/pages/root_route.dart b/lib/ui/pages/root_route.dart index 80b57ece..65d4cd8d 100644 --- a/lib/ui/pages/root_route.dart +++ b/lib/ui/pages/root_route.dart @@ -8,6 +8,7 @@ import 'package:selfprivacy/ui/router/root_destinations.dart'; import 'package:selfprivacy/ui/router/router.dart'; +@RoutePage() class RootPage extends StatefulWidget implements AutoRouteWrapper { const RootPage({super.key}); diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index a0891630..e1f8f713 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -32,6 +33,7 @@ part 'time_zone/time_zone.dart'; var navigatorKey = GlobalKey(); +@RoutePage() class ServerDetailsScreen extends StatefulWidget { const ServerDetailsScreen({super.key}); diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index bb95ae94..71859116 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; @@ -16,6 +17,7 @@ import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; +@RoutePage() class ServicesMigrationPage extends StatefulWidget { const ServicesMigrationPage({ required this.services, diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 41b7b36f..50cb93be 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; +@RoutePage() class ExtendingVolumePage extends StatefulWidget { const ExtendingVolumePage({ required this.diskVolumeToResize, diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index c7606b8e..7b23e275 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/ui/router/router.dart'; +@RoutePage() class ServerStoragePage extends StatefulWidget { const ServerStoragePage({ required this.diskStatus, diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 88fedddd..a015a51a 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -12,6 +12,7 @@ import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/launch_url.dart'; +@RoutePage() class ServicePage extends StatefulWidget { const ServicePage({required this.serviceId, super.key}); diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 3d6b185e..80e03101 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -16,6 +16,7 @@ import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/launch_url.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; +@RoutePage() class ServicesPage extends StatefulWidget { const ServicesPage({super.key}); diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index fe512ee2..e589e4f7 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -23,6 +23,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; +@RoutePage() class InitializingPage extends StatelessWidget { const InitializingPage({super.key}); diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 23f72f8f..2fee7297 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -17,6 +18,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recovery_server_provider_c import 'package:selfprivacy/ui/pages/setup/recovering/recovery_method_select.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; +@RoutePage() class RecoveryRouting extends StatelessWidget { const RecoveryRouting({super.key}); diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 484ce174..d7ed2aca 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -1,5 +1,6 @@ part of 'users.dart'; +@RoutePage() class NewUserPage extends StatelessWidget { const NewUserPage({super.key}); diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 63a7b171..f20ff543 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -1,5 +1,6 @@ part of 'users.dart'; +@RoutePage() class UserDetailsPage extends StatelessWidget { const UserDetailsPage({ required this.login, diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 7ed3d929..8b3c5dfd 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -33,6 +33,7 @@ part 'user.dart'; part 'user_details.dart'; part 'reset_password.dart'; +@RoutePage() class UsersPage extends StatelessWidget { const UsersPage({super.key}); diff --git a/lib/ui/router/router.dart b/lib/ui/router/router.dart index c0afd0d6..23a4ec0e 100644 --- a/lib/ui/router/router.dart +++ b/lib/ui/router/router.dart @@ -41,65 +41,67 @@ Widget fadeThroughTransition( child: child, ); -@MaterialAutoRouter( +@AutoRouterConfig( // transitionsBuilder: fadeThroughTransition, replaceInRouteName: 'Page|Screen|Routing,Route', - routes: [ - AutoRoute( - page: OnboardingPage, - ), - AutoRoute(page: InitializingPage), - AutoRoute(page: RecoveryRouting), - AutoRoute( - page: RootPage, - initial: true, - children: [ - CustomRoute( - page: ProvidersPage, - usesPathAsKey: true, - initial: true, - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - ), - CustomRoute( - page: ServicesPage, - usesPathAsKey: true, - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - ), - CustomRoute( - page: UsersPage, - usesPathAsKey: true, - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - ), - CustomRoute( - page: MorePage, - usesPathAsKey: true, - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - ), - AutoRoute(page: AppSettingsPage), - AutoRoute(page: UserDetailsPage), - AutoRoute(page: NewUserPage), - AutoRoute(page: RecoveryKeyPage), - AutoRoute(page: DevicesScreen), - AutoRoute(page: AboutApplicationPage), - AutoRoute(page: DeveloperSettingsPage), - AutoRoute(page: ServicePage), - AutoRoute(page: ServerDetailsScreen), - AutoRoute(page: DnsDetailsPage), - AutoRoute(page: BackupDetailsPage), - AutoRoute(page: ServerStoragePage), - AutoRoute(page: ExtendingVolumePage), - ], - ), - AutoRoute(page: ServicesMigrationPage), - AutoRoute(page: ConsolePage), - ], ) class RootRouter extends _$RootRouter { RootRouter(GlobalKey super.navigatorKey); + + @override + RouteType get defaultRouteType => const RouteType.material(); + @override + final List routes = [ + AutoRoute(page: OnboardingRoute.page), + AutoRoute(page: InitializingRoute.page), + AutoRoute(page: RecoveryRoute.page), + AutoRoute( + page: RootRoute.page, + path: '/', + children: [ + CustomRoute( + page: ProvidersRoute.page, + usesPathAsKey: true, + path: '', + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 400, + ), + CustomRoute( + page: ServicesRoute.page, + usesPathAsKey: true, + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 400, + ), + CustomRoute( + page: UsersRoute.page, + usesPathAsKey: true, + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 400, + ), + CustomRoute( + page: MoreRoute.page, + usesPathAsKey: true, + transitionsBuilder: fadeThroughTransition, + durationInMilliseconds: 400, + ), + AutoRoute(page: AppSettingsRoute.page), + AutoRoute(page: UserDetailsRoute.page), + AutoRoute(page: NewUserRoute.page), + AutoRoute(page: RecoveryKeyRoute.page), + AutoRoute(page: DevicesRoute.page), + AutoRoute(page: AboutApplicationRoute.page), + AutoRoute(page: DeveloperSettingsRoute.page), + AutoRoute(page: ServiceRoute.page), + AutoRoute(page: ServerDetailsRoute.page), + AutoRoute(page: DnsDetailsRoute.page), + AutoRoute(page: BackupDetailsRoute.page), + AutoRoute(page: ServerStorageRoute.page), + AutoRoute(page: ExtendingVolumeRoute.page), + ], + ), + AutoRoute(page: ServicesMigrationRoute.page), + AutoRoute(page: ConsoleRoute.page), + ]; } // Function to map route names to route titles diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index acbc7830..328c5f76 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -1,49 +1,144 @@ -// ************************************************************************** -// AutoRouteGenerator -// ************************************************************************** - // GENERATED CODE - DO NOT MODIFY BY HAND // ************************************************************************** -// AutoRouteGenerator +// AutoRouterGenerator // ************************************************************************** -// + // ignore_for_file: type=lint +// coverage:ignore-file part of 'router.dart'; -class _$RootRouter extends RootStackRouter { +abstract class _$RootRouter extends RootStackRouter { _$RootRouter([GlobalKey? navigatorKey]) : super(navigatorKey); @override final Map pagesMap = { + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + AppSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AppSettingsPage(), + ); + }, + DeveloperSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DeveloperSettingsPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, OnboardingRoute.name: (routeData) { - return MaterialPageX( + return AutoRoutePage( routeData: routeData, child: const OnboardingPage(), ); }, - InitializingRoute.name: (routeData) { - return MaterialPageX( + ProvidersRoute.name: (routeData) { + return AutoRoutePage( routeData: routeData, - child: const InitializingPage(), + child: const ProvidersPage(), + ); + }, + ServerDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServerDetailsScreen(), + ); + }, + ServiceRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServicePage( + serviceId: args.serviceId, + key: args.key, + ), + ); + }, + ServicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServicesPage(), + ); + }, + UsersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const UsersPage(), + ); + }, + NewUserRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const NewUserPage(), + ); + }, + UserDetailsRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: UserDetailsPage( + login: args.login, + key: args.key, + ), + ); + }, + BackupDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const BackupDetailsPage(), + ); + }, + DnsDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DnsDetailsPage(), ); }, RecoveryRoute.name: (routeData) { - return MaterialPageX( + return AutoRoutePage( routeData: routeData, child: const RecoveryRouting(), ); }, - RootRoute.name: (routeData) { - return MaterialPageX( + InitializingRoute.name: (routeData) { + return AutoRoutePage( routeData: routeData, - child: WrappedRoute(child: const RootPage()), + child: const InitializingPage(), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), + ); + }, + DevicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DevicesScreen(), ); }, ServicesMigrationRoute.name: (routeData) { final args = routeData.argsAs(); - return MaterialPageX( + return AutoRoutePage( routeData: routeData, child: ServicesMigrationPage( services: args.services, @@ -53,139 +148,9 @@ class _$RootRouter extends RootStackRouter { ), ); }, - ConsoleRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const ConsolePage(), - ); - }, - ProvidersRoute.name: (routeData) { - return CustomPage( - routeData: routeData, - child: const ProvidersPage(), - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - opaque: true, - barrierDismissible: false, - ); - }, - ServicesRoute.name: (routeData) { - return CustomPage( - routeData: routeData, - child: const ServicesPage(), - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - opaque: true, - barrierDismissible: false, - ); - }, - UsersRoute.name: (routeData) { - return CustomPage( - routeData: routeData, - child: const UsersPage(), - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - opaque: true, - barrierDismissible: false, - ); - }, - MoreRoute.name: (routeData) { - return CustomPage( - routeData: routeData, - child: const MorePage(), - transitionsBuilder: fadeThroughTransition, - durationInMilliseconds: 400, - opaque: true, - barrierDismissible: false, - ); - }, - AppSettingsRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const AppSettingsPage(), - ); - }, - UserDetailsRoute.name: (routeData) { - final args = routeData.argsAs(); - return MaterialPageX( - routeData: routeData, - child: UserDetailsPage( - login: args.login, - key: args.key, - ), - ); - }, - NewUserRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const NewUserPage(), - ); - }, - RecoveryKeyRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const RecoveryKeyPage(), - ); - }, - DevicesRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const DevicesScreen(), - ); - }, - AboutApplicationRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const AboutApplicationPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - ServiceRoute.name: (routeData) { - final args = routeData.argsAs(); - return MaterialPageX( - routeData: routeData, - child: ServicePage( - serviceId: args.serviceId, - key: args.key, - ), - ); - }, - ServerDetailsRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const ServerDetailsScreen(), - ); - }, - DnsDetailsRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const DnsDetailsPage(), - ); - }, - BackupDetailsRoute.name: (routeData) { - return MaterialPageX( - routeData: routeData, - child: const BackupDetailsPage(), - ); - }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); - return MaterialPageX( - routeData: routeData, - child: ServerStoragePage( - diskStatus: args.diskStatus, - key: args.key, - ), - ); - }, ExtendingVolumeRoute.name: (routeData) { final args = routeData.argsAs(); - return MaterialPageX( + return AutoRoutePage( routeData: routeData, child: ExtendingVolumePage( diskVolumeToResize: args.diskVolumeToResize, @@ -194,175 +159,337 @@ class _$RootRouter extends RootStackRouter { ), ); }, + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServerStoragePage( + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + RootRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: WrappedRoute(child: const RootPage()), + ); + }, }; +} - @override - List get routes => [ - RouteConfig( - OnboardingRoute.name, - path: '/onboarding-page', - ), - RouteConfig( - InitializingRoute.name, - path: '/initializing-page', - ), - RouteConfig( - RecoveryRoute.name, - path: '/recovery-routing', - ), - RouteConfig( - RootRoute.name, - path: '/', - children: [ - RouteConfig( - ProvidersRoute.name, - path: '', - parent: RootRoute.name, - usesPathAsKey: true, - ), - RouteConfig( - ServicesRoute.name, - path: 'services-page', - parent: RootRoute.name, - usesPathAsKey: true, - ), - RouteConfig( - UsersRoute.name, - path: 'users-page', - parent: RootRoute.name, - usesPathAsKey: true, - ), - RouteConfig( - MoreRoute.name, - path: 'more-page', - parent: RootRoute.name, - usesPathAsKey: true, - ), - RouteConfig( - AppSettingsRoute.name, - path: 'app-settings-page', - parent: RootRoute.name, - ), - RouteConfig( - UserDetailsRoute.name, - path: 'user-details-page', - parent: RootRoute.name, - ), - RouteConfig( - NewUserRoute.name, - path: 'new-user-page', - parent: RootRoute.name, - ), - RouteConfig( - RecoveryKeyRoute.name, - path: 'recovery-key-page', - parent: RootRoute.name, - ), - RouteConfig( - DevicesRoute.name, - path: 'devices-screen', - parent: RootRoute.name, - ), - RouteConfig( - AboutApplicationRoute.name, - path: 'about-application-page', - parent: RootRoute.name, - ), - RouteConfig( - DeveloperSettingsRoute.name, - path: 'developer-settings-page', - parent: RootRoute.name, - ), - RouteConfig( - ServiceRoute.name, - path: 'service-page', - parent: RootRoute.name, - ), - RouteConfig( - ServerDetailsRoute.name, - path: 'server-details-screen', - parent: RootRoute.name, - ), - RouteConfig( - DnsDetailsRoute.name, - path: 'dns-details-page', - parent: RootRoute.name, - ), - RouteConfig( - BackupDetailsRoute.name, - path: 'backup-details-page', - parent: RootRoute.name, - ), - RouteConfig( - ServerStorageRoute.name, - path: 'server-storage-page', - parent: RootRoute.name, - ), - RouteConfig( - ExtendingVolumeRoute.name, - path: 'extending-volume-page', - parent: RootRoute.name, - ), - ], - ), - RouteConfig( - ServicesMigrationRoute.name, - path: '/services-migration-page', - ), - RouteConfig( +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [AppSettingsPage] +class AppSettingsRoute extends PageRouteInfo { + const AppSettingsRoute({List? children}) + : super( + AppSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'AppSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DeveloperSettingsPage] +class DeveloperSettingsRoute extends PageRouteInfo { + const DeveloperSettingsRoute({List? children}) + : super( + DeveloperSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'DeveloperSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute({List? children}) + : super( ConsoleRoute.name, - path: '/console-page', - ), - ]; + initialChildren: children, + ); + + static const String name = 'ConsoleRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute({List? children}) + : super( + MoreRoute.name, + initialChildren: children, + ); + + static const String name = 'MoreRoute'; + + static const PageInfo page = PageInfo(name); } /// generated route for /// [OnboardingPage] class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute() + const OnboardingRoute({List? children}) : super( OnboardingRoute.name, - path: '/onboarding-page', + initialChildren: children, ); static const String name = 'OnboardingRoute'; + + static const PageInfo page = PageInfo(name); } /// generated route for -/// [InitializingPage] -class InitializingRoute extends PageRouteInfo { - const InitializingRoute() +/// [ProvidersPage] +class ProvidersRoute extends PageRouteInfo { + const ProvidersRoute({List? children}) : super( - InitializingRoute.name, - path: '/initializing-page', + ProvidersRoute.name, + initialChildren: children, ); - static const String name = 'InitializingRoute'; + static const String name = 'ProvidersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) + : super( + ServerDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'ServerDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ServicePage] +class ServiceRoute extends PageRouteInfo { + ServiceRoute({ + required String serviceId, + Key? key, + List? children, + }) : super( + ServiceRoute.name, + args: ServiceRouteArgs( + serviceId: serviceId, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'ServiceRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServiceRouteArgs { + const ServiceRouteArgs({ + required this.serviceId, + this.key, + }); + + final String serviceId; + + final Key? key; + + @override + String toString() { + return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; + } +} + +/// generated route for +/// [ServicesPage] +class ServicesRoute extends PageRouteInfo { + const ServicesRoute({List? children}) + : super( + ServicesRoute.name, + initialChildren: children, + ); + + static const String name = 'ServicesRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UsersPage] +class UsersRoute extends PageRouteInfo { + const UsersRoute({List? children}) + : super( + UsersRoute.name, + initialChildren: children, + ); + + static const String name = 'UsersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [NewUserPage] +class NewUserRoute extends PageRouteInfo { + const NewUserRoute({List? children}) + : super( + NewUserRoute.name, + initialChildren: children, + ); + + static const String name = 'NewUserRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UserDetailsPage] +class UserDetailsRoute extends PageRouteInfo { + UserDetailsRoute({ + required String login, + Key? key, + List? children, + }) : super( + UserDetailsRoute.name, + args: UserDetailsRouteArgs( + login: login, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'UserDetailsRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class UserDetailsRouteArgs { + const UserDetailsRouteArgs({ + required this.login, + this.key, + }); + + final String login; + + final Key? key; + + @override + String toString() { + return 'UserDetailsRouteArgs{login: $login, key: $key}'; + } +} + +/// generated route for +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) + : super( + BackupDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'BackupDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute({List? children}) + : super( + DnsDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'DnsDetailsRoute'; + + static const PageInfo page = PageInfo(name); } /// generated route for /// [RecoveryRouting] class RecoveryRoute extends PageRouteInfo { - const RecoveryRoute() + const RecoveryRoute({List? children}) : super( RecoveryRoute.name, - path: '/recovery-routing', - ); - - static const String name = 'RecoveryRoute'; -} - -/// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) - : super( - RootRoute.name, - path: '/', initialChildren: children, ); - static const String name = 'RootRoute'; + static const String name = 'RecoveryRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute({List? children}) + : super( + InitializingRoute.name, + initialChildren: children, + ); + + static const String name = 'InitializingRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [RecoveryKeyPage] +class RecoveryKeyRoute extends PageRouteInfo { + const RecoveryKeyRoute({List? children}) + : super( + RecoveryKeyRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryKeyRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) + : super( + DevicesRoute.name, + initialChildren: children, + ); + + static const String name = 'DevicesRoute'; + + static const PageInfo page = PageInfo(name); } /// generated route for @@ -373,18 +500,22 @@ class ServicesMigrationRoute extends PageRouteInfo { required DiskStatus diskStatus, required bool isMigration, Key? key, + List? children, }) : super( ServicesMigrationRoute.name, - path: '/services-migration-page', args: ServicesMigrationRouteArgs( services: services, diskStatus: diskStatus, isMigration: isMigration, key: key, ), + initialChildren: children, ); static const String name = 'ServicesMigrationRoute'; + + static const PageInfo page = + PageInfo(name); } class ServicesMigrationRouteArgs { @@ -409,276 +540,6 @@ class ServicesMigrationRouteArgs { } } -/// generated route for -/// [ConsolePage] -class ConsoleRoute extends PageRouteInfo { - const ConsoleRoute() - : super( - ConsoleRoute.name, - path: '/console-page', - ); - - static const String name = 'ConsoleRoute'; -} - -/// generated route for -/// [ProvidersPage] -class ProvidersRoute extends PageRouteInfo { - const ProvidersRoute() - : super( - ProvidersRoute.name, - path: '', - ); - - static const String name = 'ProvidersRoute'; -} - -/// generated route for -/// [ServicesPage] -class ServicesRoute extends PageRouteInfo { - const ServicesRoute() - : super( - ServicesRoute.name, - path: 'services-page', - ); - - static const String name = 'ServicesRoute'; -} - -/// generated route for -/// [UsersPage] -class UsersRoute extends PageRouteInfo { - const UsersRoute() - : super( - UsersRoute.name, - path: 'users-page', - ); - - static const String name = 'UsersRoute'; -} - -/// generated route for -/// [MorePage] -class MoreRoute extends PageRouteInfo { - const MoreRoute() - : super( - MoreRoute.name, - path: 'more-page', - ); - - static const String name = 'MoreRoute'; -} - -/// generated route for -/// [AppSettingsPage] -class AppSettingsRoute extends PageRouteInfo { - const AppSettingsRoute() - : super( - AppSettingsRoute.name, - path: 'app-settings-page', - ); - - static const String name = 'AppSettingsRoute'; -} - -/// generated route for -/// [UserDetailsPage] -class UserDetailsRoute extends PageRouteInfo { - UserDetailsRoute({ - required String login, - Key? key, - }) : super( - UserDetailsRoute.name, - path: 'user-details-page', - args: UserDetailsRouteArgs( - login: login, - key: key, - ), - ); - - static const String name = 'UserDetailsRoute'; -} - -class UserDetailsRouteArgs { - const UserDetailsRouteArgs({ - required this.login, - this.key, - }); - - final String login; - - final Key? key; - - @override - String toString() { - return 'UserDetailsRouteArgs{login: $login, key: $key}'; - } -} - -/// generated route for -/// [NewUserPage] -class NewUserRoute extends PageRouteInfo { - const NewUserRoute() - : super( - NewUserRoute.name, - path: 'new-user-page', - ); - - static const String name = 'NewUserRoute'; -} - -/// generated route for -/// [RecoveryKeyPage] -class RecoveryKeyRoute extends PageRouteInfo { - const RecoveryKeyRoute() - : super( - RecoveryKeyRoute.name, - path: 'recovery-key-page', - ); - - static const String name = 'RecoveryKeyRoute'; -} - -/// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute() - : super( - DevicesRoute.name, - path: 'devices-screen', - ); - - static const String name = 'DevicesRoute'; -} - -/// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute() - : super( - AboutApplicationRoute.name, - path: 'about-application-page', - ); - - static const String name = 'AboutApplicationRoute'; -} - -/// generated route for -/// [DeveloperSettingsPage] -class DeveloperSettingsRoute extends PageRouteInfo { - const DeveloperSettingsRoute() - : super( - DeveloperSettingsRoute.name, - path: 'developer-settings-page', - ); - - static const String name = 'DeveloperSettingsRoute'; -} - -/// generated route for -/// [ServicePage] -class ServiceRoute extends PageRouteInfo { - ServiceRoute({ - required String serviceId, - Key? key, - }) : super( - ServiceRoute.name, - path: 'service-page', - args: ServiceRouteArgs( - serviceId: serviceId, - key: key, - ), - ); - - static const String name = 'ServiceRoute'; -} - -class ServiceRouteArgs { - const ServiceRouteArgs({ - required this.serviceId, - this.key, - }); - - final String serviceId; - - final Key? key; - - @override - String toString() { - return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; - } -} - -/// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute() - : super( - ServerDetailsRoute.name, - path: 'server-details-screen', - ); - - static const String name = 'ServerDetailsRoute'; -} - -/// generated route for -/// [DnsDetailsPage] -class DnsDetailsRoute extends PageRouteInfo { - const DnsDetailsRoute() - : super( - DnsDetailsRoute.name, - path: 'dns-details-page', - ); - - static const String name = 'DnsDetailsRoute'; -} - -/// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute() - : super( - BackupDetailsRoute.name, - path: 'backup-details-page', - ); - - static const String name = 'BackupDetailsRoute'; -} - -/// generated route for -/// [ServerStoragePage] -class ServerStorageRoute extends PageRouteInfo { - ServerStorageRoute({ - required DiskStatus diskStatus, - Key? key, - }) : super( - ServerStorageRoute.name, - path: 'server-storage-page', - args: ServerStorageRouteArgs( - diskStatus: diskStatus, - key: key, - ), - ); - - static const String name = 'ServerStorageRoute'; -} - -class ServerStorageRouteArgs { - const ServerStorageRouteArgs({ - required this.diskStatus, - this.key, - }); - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; - } -} - /// generated route for /// [ExtendingVolumePage] class ExtendingVolumeRoute extends PageRouteInfo { @@ -686,17 +547,21 @@ class ExtendingVolumeRoute extends PageRouteInfo { required DiskVolume diskVolumeToResize, required DiskStatus diskStatus, Key? key, + List? children, }) : super( ExtendingVolumeRoute.name, - path: 'extending-volume-page', args: ExtendingVolumeRouteArgs( diskVolumeToResize: diskVolumeToResize, diskStatus: diskStatus, key: key, ), + initialChildren: children, ); static const String name = 'ExtendingVolumeRoute'; + + static const PageInfo page = + PageInfo(name); } class ExtendingVolumeRouteArgs { @@ -717,3 +582,55 @@ class ExtendingVolumeRouteArgs { return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; } } + +/// generated route for +/// [ServerStoragePage] +class ServerStorageRoute extends PageRouteInfo { + ServerStorageRoute({ + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ServerStorageRoute.name, + args: ServerStorageRouteArgs( + diskStatus: diskStatus, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'ServerStorageRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServerStorageRouteArgs { + const ServerStorageRouteArgs({ + required this.diskStatus, + this.key, + }); + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; + } +} + +/// generated route for +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) + : super( + RootRoute.name, + initialChildren: children, + ); + + static const String name = 'RootRoute'; + + static const PageInfo page = PageInfo(name); +} From 3a77864a64e005dbf6c83cdce75438eb69015007 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 22 Mar 2023 15:13:11 +0300 Subject: [PATCH 447/732] chore(router): Bump router version --- pubspec.lock | 12 ++++++------ pubspec.yaml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 44d368aa..61417bab 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -53,18 +53,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: "12047baeca0e01df93165ef33275b32119d72699ab9a49dc64c20e78f586f96d" + sha256: "70b2461cc58d6a46c20859f23148b370165da183d21a82b783156f9a91d9c38b" url: "https://pub.dev" source: hosted - version: "5.0.4" + version: "6.0.1" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: de5bfbc02ae4eebb339dd90d325749ae7536e903f6513ef72b88954072d72b0e + sha256: a3f11c3b1e6e884d1592924f3b7212855f1c7c8791c12d3b41b87ab81fb9d3b8 url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.0" auto_size_text: dependency: "direct main" description: @@ -261,10 +261,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + sha256: "5be16bf1707658e4c03078d4a9b90208ded217fb02c163e207d334082412f2fb" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.5" dbus: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0dd3f199..2055494c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: animations: ^2.0.7 - auto_route: ^5.0.4 + auto_route: ^6.0.1 auto_size_text: ^3.0.0 basic_utils: ^5.4.2 crypt: ^4.2.1 @@ -51,7 +51,7 @@ dependencies: wakelock: ^0.6.2 dev_dependencies: - auto_route_generator: ^5.0.3 + auto_route_generator: ^6.0.0 flutter_test: sdk: flutter build_runner: ^2.3.3 From c18191f639f8b8f3af48f664fb0d6c2f3458db1f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 22 Mar 2023 15:13:47 +0300 Subject: [PATCH 448/732] feat: Add jobs button to the app bar of HeroScreen --- lib/logic/get_it/navigation.dart | 2 +- lib/ui/layouts/brand_hero_screen.dart | 36 +++++++++++++++++-- .../server_details/server_details_screen.dart | 1 + lib/ui/pages/services/service_page.dart | 1 + lib/ui/pages/users/user_details.dart | 2 ++ 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/lib/logic/get_it/navigation.dart b/lib/logic/get_it/navigation.dart index 7a43bcd7..977b4a86 100644 --- a/lib/logic/get_it/navigation.dart +++ b/lib/logic/get_it/navigation.dart @@ -12,7 +12,7 @@ class NavigationService { if (context == null) { showSnackBar( - 'Could not show dialog. This should not happen, please report this.', + 'Could not show dialog. This should not happen, please report this.', ); return; } diff --git a/lib/ui/layouts/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart index 6782880a..37b1f3ea 100644 --- a/lib/ui/layouts/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -1,6 +1,10 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; +import 'package:ionicons/ionicons.dart'; +import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; +import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; +import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/helpers/widget_size.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; @@ -20,7 +24,6 @@ class BrandHeroScreen extends StatelessWidget { final List children; final bool hasBackButton; - @Deprecated('Flash button is now provided by root scaffold') final bool hasFlashButton; final IconData? heroIcon; final Widget? heroIconWidget; @@ -40,7 +43,6 @@ class BrandHeroScreen extends StatelessWidget { final bool hasHeroIcon = heroIcon != null || this.heroIconWidget != null; return Scaffold( - floatingActionButton: hasFlashButton ? const BrandFab() : null, body: CustomScrollView( slivers: [ HeroSliverAppBar( @@ -49,6 +51,7 @@ class BrandHeroScreen extends StatelessWidget { hasBackButton: hasBackButton, onBackButtonPressed: onBackButtonPressed, heroIconWidget: heroIconWidget, + hasFlashButton: hasFlashButton, ), if (heroSubtitle != null) SliverPadding( @@ -87,12 +90,14 @@ class HeroSliverAppBar extends StatefulWidget { required this.hasBackButton, required this.onBackButtonPressed, required this.heroIconWidget, + required this.hasFlashButton, super.key, }); final String heroTitle; final bool hasHeroIcon; final bool hasBackButton; + final bool hasFlashButton; final VoidCallback? onBackButtonPressed; final Widget heroIconWidget; @@ -105,6 +110,7 @@ class _HeroSliverAppBarState extends State { @override Widget build(final BuildContext context) { final isMobile = Breakpoints.small.isActive(context); + final isJobsListEmpty = context.watch().state is JobsStateEmpty; return SliverAppBar( expandedHeight: widget.hasHeroIcon ? 148.0 + _size.height : 72.0 + _size.height, @@ -115,6 +121,30 @@ class _HeroSliverAppBarState extends State { leading: (widget.hasBackButton && isMobile) ? const AutoLeadingButton() : const SizedBox.shrink(), + actions: [ + if (widget.hasFlashButton && isMobile) + AnimatedSwitcher( + duration: const Duration(milliseconds: 300), + child: IconButton( + onPressed: () { + showBrandBottomSheet( + context: context, + builder: (final BuildContext context) => + const BrandBottomSheet( + isExpended: true, + child: JobsContent(), + ), + ); + }, + icon: Icon( + isJobsListEmpty ? Ionicons.flash_outline : Ionicons.flash, + ), + color: isJobsListEmpty + ? Theme.of(context).colorScheme.onBackground + : Theme.of(context).colorScheme.primary, + ), + ), + ], flexibleSpace: FlexibleSpaceBar( title: LayoutBuilder( builder: (final context, final constraints) => SizedBox( diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index e1f8f713..aa843b6c 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -77,6 +77,7 @@ class _ServerDetailsScreenState extends State return BlocProvider( create: (final context) => context.read()..check(), child: BrandHeroScreen( + hasFlashButton: true, heroIcon: BrandIcons.server, heroTitle: 'server.card_title'.tr(), heroSubtitle: 'server.description'.tr(), diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index a015a51a..ff3b0e38 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -47,6 +47,7 @@ class _ServicePageState extends State { return BrandHeroScreen( hasBackButton: true, + hasFlashButton: true, heroIconWidget: SvgPicture.string( service.svgIcon, width: 48.0, diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index f20ff543..38743878 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -26,6 +26,7 @@ class UserDetailsPage extends StatelessWidget { if (user.type == UserType.root) { return BrandHeroScreen( hasBackButton: true, + hasFlashButton: true, heroTitle: 'ssh.root_title'.tr(), heroSubtitle: 'ssh.root_subtitle'.tr(), children: [ @@ -36,6 +37,7 @@ class UserDetailsPage extends StatelessWidget { return BrandHeroScreen( hasBackButton: true, + hasFlashButton: true, heroTitle: user.login, children: [ _UserLogins(user: user, domainName: domainName), From f0f1e8cacce0d63dfb05a3346d691ac8d473140f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 27 Mar 2023 20:02:44 +0300 Subject: [PATCH 449/732] refactor(ui): Get rid of BrandText and restructure the buttons --- lib/config/brand_colors.dart | 37 --- lib/config/text_themes.dart | 80 ------ lib/logic/get_it/navigation.dart | 5 +- .../brand_bottom_sheet.dart | 3 +- lib/ui/components/brand_md/brand_md.dart | 21 +- .../components/brand_radio/brand_radio.dart | 40 --- lib/ui/components/brand_text/brand_text.dart | 238 ------------------ .../components/brand_timer/brand_timer.dart | 12 +- .../brand_button.dart | 52 ---- .../dialog_action_button.dart} | 5 +- .../outlined_button.dart | 0 .../segmented_buttons.dart | 21 +- .../components/jobs_content/jobs_content.dart | 13 +- .../components/progress_bar/progress_bar.dart | 13 +- .../components/switch_block/switch_bloc.dart | 36 --- lib/ui/helpers/modals.dart | 6 +- .../pages/backup_details/backup_details.dart | 13 +- lib/ui/pages/devices/new_device.dart | 2 +- lib/ui/pages/more/about_application.dart | 7 +- .../pages/more/app_settings/app_settings.dart | 10 +- lib/ui/pages/more/console.dart | 7 +- lib/ui/pages/onboarding/onboarding.dart | 2 +- lib/ui/pages/recovery_key/recovery_key.dart | 2 +- .../recovery_key/recovery_key_receiving.dart | 2 +- .../server_details/server_details_screen.dart | 6 +- lib/ui/pages/server_details/text_details.dart | 39 +-- .../server_details/time_zone/time_zone.dart | 167 ++++++------ .../migration_process_page.dart | 2 +- .../binds_migration/services_migration.dart | 2 +- .../server_storage/extending_volume.dart | 2 +- .../pages/server_storage/server_storage.dart | 2 +- lib/ui/pages/services/services.dart | 101 +++++--- .../setup/initializing/initializing.dart | 16 +- .../initializing/server_provider_picker.dart | 4 +- .../initializing/server_type_picker.dart | 2 +- .../recovering/recover_by_new_device_key.dart | 2 +- .../recovering/recover_by_old_token.dart | 2 +- .../recovering/recover_by_recovery_key.dart | 2 +- .../recovery_confirm_backblaze.dart | 2 +- .../recovery_confirm_cloudflare.dart | 2 +- .../recovering/recovery_confirm_server.dart | 2 +- .../recovering/recovery_method_select.dart | 2 +- .../setup/recovering/recovery_routing.dart | 2 +- .../recovery_server_provider_connected.dart | 2 +- lib/ui/pages/users/empty.dart | 44 ++-- lib/ui/pages/users/user.dart | 20 +- lib/ui/pages/users/users.dart | 5 +- lib/utils/extensions/text_extensions.dart | 2 +- 48 files changed, 297 insertions(+), 762 deletions(-) delete mode 100644 lib/config/text_themes.dart delete mode 100644 lib/ui/components/brand_radio/brand_radio.dart delete mode 100644 lib/ui/components/brand_text/brand_text.dart rename lib/ui/components/{brand_button => buttons}/brand_button.dart (54%) rename lib/ui/components/{action_button/action_button.dart => buttons/dialog_action_button.dart} (81%) rename lib/ui/components/{brand_button => buttons}/outlined_button.dart (100%) rename lib/ui/components/{brand_button => buttons}/segmented_buttons.dart (70%) delete mode 100644 lib/ui/components/switch_block/switch_bloc.dart diff --git a/lib/config/brand_colors.dart b/lib/config/brand_colors.dart index 15d1433a..335e652e 100644 --- a/lib/config/brand_colors.dart +++ b/lib/config/brand_colors.dart @@ -2,53 +2,16 @@ import 'package:flutter/material.dart'; class BrandColors { static const Color blue = Color(0xFF093CEF); - static const Color white = Colors.white; - static const Color black = Colors.black; - - static const Color gray1 = Color(0xFF555555); - static const Color gray2 = Color(0xFF7C7C7C); - static const Color gray3 = Color(0xFFFAFAFA); - static const Color gray4 = Color(0xFFDDDDDD); - static const Color gray5 = Color(0xFFEDEEF1); - static Color gray6 = const Color(0xFF181818).withOpacity(0.7); - static const Color grey7 = Color(0xFFABABAB); - - static const Color red1 = Color(0xFFFA0E0E); - static const Color red2 = Color(0xFFE65527); - - static const Color green1 = Color(0xFF00AF54); - - static const Color green2 = Color(0xFF0F8849); - - static Color get navBackgroundLight => white.withOpacity(0.8); - static Color get navBackgroundDark => black.withOpacity(0.8); static const List uninitializedGradientColors = [ Color(0xFF555555), Color(0xFFABABAB), ]; - static const List stableGradientColors = [ - Color(0xFF093CEF), - Color(0xFF14A1CB), - ]; - static const List progressGradientColors = [ - Color(0xFF093CEF), - Color(0xFF14A1CB), - ]; static const List warningGradientColors = [ Color(0xFFEF4E09), Color(0xFFEFD135), ]; static const Color primary = blue; - static const Color headlineColor = black; - static const Color inactive = gray2; - static const Color scaffoldBackground = gray3; - static const Color inputInactive = gray4; - - static const Color textColor1 = black; - static const Color textColor2 = gray1; - static const Color dividerColor = gray5; - static const Color warning = red1; } diff --git a/lib/config/text_themes.dart b/lib/config/text_themes.dart deleted file mode 100644 index 63b4b99c..00000000 --- a/lib/config/text_themes.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/utils/named_font_weight.dart'; - -import 'package:selfprivacy/config/brand_colors.dart'; - -const TextStyle defaultTextStyle = TextStyle( - fontSize: 15, - color: BrandColors.textColor1, -); - -final TextStyle headline1Style = defaultTextStyle.copyWith( - fontSize: 40, - fontWeight: NamedFontWeight.extraBold, - color: BrandColors.headlineColor, -); - -final TextStyle headline2Style = defaultTextStyle.copyWith( - fontSize: 24, - fontWeight: NamedFontWeight.extraBold, - color: BrandColors.headlineColor, -); - -final TextStyle onboardingTitle = defaultTextStyle.copyWith( - fontSize: 30, - fontWeight: NamedFontWeight.extraBold, - color: BrandColors.headlineColor, -); - -final TextStyle headline3Style = defaultTextStyle.copyWith( - fontSize: 20, - fontWeight: NamedFontWeight.extraBold, - color: BrandColors.headlineColor, -); - -final TextStyle headline4Style = defaultTextStyle.copyWith( - fontSize: 18, - fontWeight: NamedFontWeight.medium, - color: BrandColors.headlineColor, -); - -final TextStyle headline4UnderlinedStyle = defaultTextStyle.copyWith( - fontSize: 18, - fontWeight: NamedFontWeight.medium, - color: BrandColors.headlineColor, - decoration: TextDecoration.underline, -); - -final TextStyle headline5Style = defaultTextStyle.copyWith( - fontSize: 15, - fontWeight: NamedFontWeight.medium, - color: BrandColors.headlineColor.withOpacity(0.8), -); - -const TextStyle body1Style = defaultTextStyle; -final TextStyle body2Style = defaultTextStyle.copyWith( - color: BrandColors.textColor2, -); - -final TextStyle buttonTitleText = defaultTextStyle.copyWith( - color: BrandColors.white, - fontSize: 16, - fontWeight: FontWeight.bold, - height: 1, -); - -final TextStyle mediumStyle = - defaultTextStyle.copyWith(fontSize: 13, height: 1.53); - -final TextStyle smallStyle = - defaultTextStyle.copyWith(fontSize: 11, height: 1.45); - -const TextStyle progressTextStyleLight = TextStyle( - fontSize: 11, - color: BrandColors.textColor1, - height: 1.7, -); - -final TextStyle progressTextStyleDark = progressTextStyleLight.copyWith( - color: BrandColors.white, -); diff --git a/lib/logic/get_it/navigation.dart b/lib/logic/get_it/navigation.dart index 977b4a86..90f67203 100644 --- a/lib/logic/get_it/navigation.dart +++ b/lib/logic/get_it/navigation.dart @@ -1,6 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/text_themes.dart'; class NavigationService { final GlobalKey scaffoldMessengerKey = @@ -26,8 +24,7 @@ class NavigationService { void showSnackBar(final String text) { final ScaffoldMessengerState state = scaffoldMessengerKey.currentState!; final SnackBar snack = SnackBar( - backgroundColor: BrandColors.black.withOpacity(0.8), - content: Text(text, style: buttonTitleText), + content: Text(text), duration: const Duration(seconds: 2), ); state.showSnackBar(snack); diff --git a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart index d53b5ced..420ba32b 100644 --- a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart +++ b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; class BrandBottomSheet extends StatelessWidget { const BrandBottomSheet({ @@ -38,7 +37,7 @@ class BrandBottomSheet extends StatelessWidget { width: 30, decoration: BoxDecoration( borderRadius: BorderRadius.circular(2), - color: BrandColors.gray4, + color: const Color(0xFFDDDDDD), ), ), ), diff --git a/lib/ui/components/brand_md/brand_md.dart b/lib/ui/components/brand_md/brand_md.dart index 457bb5c3..67c3e2ea 100644 --- a/lib/ui/components/brand_md/brand_md.dart +++ b/lib/ui/components/brand_md/brand_md.dart @@ -2,8 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:flutter/services.dart' show rootBundle; import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/text_themes.dart'; import 'package:url_launcher/url_launcher_string.dart'; class BrandMarkdown extends StatefulWidget { @@ -37,24 +35,7 @@ class _BrandMarkdownState extends State { @override Widget build(final BuildContext context) { - final bool isDark = Theme.of(context).brightness == Brightness.dark; - final MarkdownStyleSheet markdown = MarkdownStyleSheet( - p: defaultTextStyle.copyWith( - color: isDark ? BrandColors.white : null, - ), - h1: headline1Style.copyWith( - color: isDark ? BrandColors.white : null, - ), - h2: headline2Style.copyWith( - color: isDark ? BrandColors.white : null, - ), - h3: headline3Style.copyWith( - color: isDark ? BrandColors.white : null, - ), - h4: headline4Style.copyWith( - color: isDark ? BrandColors.white : null, - ), - ); + final MarkdownStyleSheet markdown = MarkdownStyleSheet(); return MarkdownBody( shrinkWrap: true, styleSheet: markdown, diff --git a/lib/ui/components/brand_radio/brand_radio.dart b/lib/ui/components/brand_radio/brand_radio.dart deleted file mode 100644 index 494c3e81..00000000 --- a/lib/ui/components/brand_radio/brand_radio.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; - -// TODO: Delete this file. - -class BrandRadio extends StatelessWidget { - const BrandRadio({ - required this.isChecked, - super.key, - }); - - final bool isChecked; - - @override - Widget build(final BuildContext context) => Container( - height: 20, - width: 20, - alignment: Alignment.center, - padding: const EdgeInsets.all(2), - decoration: BoxDecoration( - shape: BoxShape.circle, - border: _getBorder(), - ), - child: isChecked - ? Container( - height: 10, - width: 10, - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: BrandColors.primary, - ), - ) - : null, - ); - - BoxBorder? _getBorder() => Border.all( - color: isChecked ? BrandColors.primary : BrandColors.gray1, - width: 2, - ); -} diff --git a/lib/ui/components/brand_text/brand_text.dart b/lib/ui/components/brand_text/brand_text.dart deleted file mode 100644 index 15307577..00000000 --- a/lib/ui/components/brand_text/brand_text.dart +++ /dev/null @@ -1,238 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/text_themes.dart'; -export 'package:selfprivacy/utils/extensions/text_extensions.dart'; - -// TODO: Delete this file - -enum TextType { - h1, // right now only at onboarding and opened providers - h2, // cards titles - h3, // titles in about page - h4, // caption - h5, // Table data - body1, // normal - body2, // with opacity - medium, - small, - onboardingTitle, - buttonTitleText, // risen button title text, - h4Underlined, -} - -class BrandText extends StatelessWidget { - factory BrandText.h4( - final String? text, { - final TextStyle? style, - final TextAlign? textAlign, - }) => - BrandText( - text, - type: TextType.h4, - style: style, - softWrap: true, - overflow: TextOverflow.ellipsis, - maxLines: 2, - textAlign: textAlign, - ); - - factory BrandText.onboardingTitle( - final String text, { - final TextStyle? style, - }) => - BrandText( - text, - type: TextType.onboardingTitle, - style: style, - ); - factory BrandText.h3( - final String text, { - final TextStyle? style, - final TextAlign? textAlign, - }) => - BrandText( - text, - type: TextType.h3, - style: style, - textAlign: textAlign, - overflow: TextOverflow.ellipsis, - ); - - factory BrandText.h4Underlined( - final String? text, { - final TextStyle? style, - final TextAlign? textAlign, - }) => - BrandText( - text, - type: TextType.h4Underlined, - style: style, - softWrap: true, - overflow: TextOverflow.ellipsis, - maxLines: 2, - textAlign: textAlign, - ); - - factory BrandText.h1( - final String? text, { - final TextStyle? style, - final TextOverflow? overflow, - final bool? softWrap, - }) => - BrandText( - text, - type: TextType.h1, - style: style, - ); - factory BrandText.h2( - final String? text, { - final TextStyle? style, - final TextAlign? textAlign, - }) => - BrandText( - text, - type: TextType.h2, - style: style, - textAlign: textAlign, - ); - factory BrandText.body1(final String? text, {final TextStyle? style}) => - BrandText( - text, - type: TextType.body1, - style: style, - ); - factory BrandText.small(final String text, {final TextStyle? style}) => - BrandText( - text, - type: TextType.small, - style: style, - ); - factory BrandText.body2(final String? text, {final TextStyle? style}) => - BrandText( - text, - type: TextType.body2, - style: style, - ); - factory BrandText.buttonTitleText( - final String? text, { - final TextStyle? style, - }) => - BrandText( - text, - type: TextType.buttonTitleText, - style: style, - ); - - factory BrandText.h5( - final String? text, { - final TextStyle? style, - final TextAlign? textAlign, - }) => - BrandText( - text, - type: TextType.h5, - style: style, - textAlign: textAlign, - ); - factory BrandText.medium( - final String? text, { - final TextStyle? style, - final TextAlign? textAlign, - }) => - BrandText( - text, - type: TextType.medium, - style: style, - textAlign: textAlign, - ); - const BrandText( - this.text, { - required this.type, - super.key, - this.style, - this.overflow, - this.softWrap, - this.textAlign, - this.maxLines, - }); - - final String? text; - final TextStyle? style; - final TextType type; - final TextOverflow? overflow; - final bool? softWrap; - final TextAlign? textAlign; - final int? maxLines; - @override - Text build(final BuildContext context) { - TextStyle style; - final bool isDark = Theme.of(context).brightness == Brightness.dark; - switch (type) { - case TextType.h1: - style = isDark - ? headline1Style.copyWith(color: Colors.white) - : headline1Style; - break; - case TextType.h2: - style = isDark - ? headline2Style.copyWith(color: Colors.white) - : headline2Style; - break; - case TextType.h3: - style = isDark - ? headline3Style.copyWith(color: Colors.white) - : headline3Style; - break; - case TextType.h4: - style = isDark - ? headline4Style.copyWith(color: Colors.white) - : headline4Style; - break; - case TextType.h4Underlined: - style = isDark - ? headline4UnderlinedStyle.copyWith(color: Colors.white) - : headline4UnderlinedStyle; - break; - case TextType.h5: - style = isDark - ? headline5Style.copyWith(color: Colors.white) - : headline5Style; - break; - case TextType.body1: - style = isDark ? body1Style.copyWith(color: Colors.white) : body1Style; - break; - case TextType.body2: - style = isDark - ? body2Style.copyWith(color: Colors.white.withOpacity(0.6)) - : body2Style; - break; - case TextType.small: - style = isDark ? smallStyle.copyWith(color: Colors.white) : smallStyle; - break; - case TextType.onboardingTitle: - style = isDark - ? onboardingTitle.copyWith(color: Colors.white) - : onboardingTitle; - break; - case TextType.medium: - style = - isDark ? mediumStyle.copyWith(color: Colors.white) : mediumStyle; - break; - case TextType.buttonTitleText: - style = !isDark - ? buttonTitleText.copyWith(color: Colors.white) - : buttonTitleText; - break; - } - if (this.style != null) { - style = style.merge(this.style); - } - return Text( - text!, - style: style, - maxLines: maxLines, - overflow: overflow, - softWrap: softWrap, - textAlign: textAlign, - ); - } -} diff --git a/lib/ui/components/brand_timer/brand_timer.dart b/lib/ui/components/brand_timer/brand_timer.dart index 3ccf9a63..4d744cfc 100644 --- a/lib/ui/components/brand_timer/brand_timer.dart +++ b/lib/ui/components/brand_timer/brand_timer.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/utils/named_font_weight.dart'; class BrandTimer extends StatefulWidget { @@ -52,11 +51,12 @@ class _BrandTimerState extends State { } @override - Widget build(final BuildContext context) => BrandText.medium( - _timeString, - style: const TextStyle( - fontWeight: NamedFontWeight.demiBold, - ), + Widget build(final BuildContext context) => Text( + _timeString ?? '', + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: NamedFontWeight.demiBold, + color: Theme.of(context).colorScheme.onSurface, + ), ); void _getTime() { diff --git a/lib/ui/components/brand_button/brand_button.dart b/lib/ui/components/buttons/brand_button.dart similarity index 54% rename from lib/ui/components/brand_button/brand_button.dart rename to lib/ui/components/buttons/brand_button.dart index 28edd6b8..12c7c132 100644 --- a/lib/ui/components/brand_button/brand_button.dart +++ b/lib/ui/components/buttons/brand_button.dart @@ -1,7 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; - -enum BrandButtonTypes { rised, text, iconText } class BrandButton { static ConstrainedBox rised({ @@ -58,53 +55,4 @@ class BrandButton { ), child: TextButton(onPressed: onPressed, child: Text(title)), ); - - static IconTextButton emptyWithIconText({ - required final VoidCallback onPressed, - required final String title, - required final Icon icon, - final Key? key, - }) => - IconTextButton( - key: key, - title: title, - onPressed: onPressed, - icon: icon, - ); -} - -class IconTextButton extends StatelessWidget { - const IconTextButton({ - super.key, - this.onPressed, - this.title, - this.icon, - }); - - final VoidCallback? onPressed; - final String? title; - final Icon? icon; - - @override - Widget build(final BuildContext context) => Material( - color: Colors.transparent, - child: InkWell( - onTap: onPressed, - child: Container( - height: 48, - width: double.infinity, - alignment: Alignment.center, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - BrandText.body1(title), - Padding( - padding: const EdgeInsets.all(12.0), - child: icon, - ) - ], - ), - ), - ), - ); } diff --git a/lib/ui/components/action_button/action_button.dart b/lib/ui/components/buttons/dialog_action_button.dart similarity index 81% rename from lib/ui/components/action_button/action_button.dart rename to lib/ui/components/buttons/dialog_action_button.dart index 4073393f..260cd493 100644 --- a/lib/ui/components/action_button/action_button.dart +++ b/lib/ui/components/buttons/dialog_action_button.dart @@ -1,7 +1,8 @@ import 'package:flutter/material.dart'; -class ActionButton extends StatelessWidget { - const ActionButton({ +/// Basically a [TextButton] to be used in dialogs +class DialogActionButton extends StatelessWidget { + const DialogActionButton({ super.key, this.text, this.onPressed, diff --git a/lib/ui/components/brand_button/outlined_button.dart b/lib/ui/components/buttons/outlined_button.dart similarity index 100% rename from lib/ui/components/brand_button/outlined_button.dart rename to lib/ui/components/buttons/outlined_button.dart diff --git a/lib/ui/components/brand_button/segmented_buttons.dart b/lib/ui/components/buttons/segmented_buttons.dart similarity index 70% rename from lib/ui/components/brand_button/segmented_buttons.dart rename to lib/ui/components/buttons/segmented_buttons.dart index 6dcf611b..b876f71d 100644 --- a/lib/ui/components/brand_button/segmented_buttons.dart +++ b/lib/ui/components/buttons/segmented_buttons.dart @@ -1,6 +1,16 @@ import 'package:flutter/material.dart'; +/// For some reason original [SegmentedButton] does not have animations. +/// +/// The [SegmentedButtons] was written for SelfPrivacy before [SegmentedButton] was introduced. +/// While it doesn't have that much options to pass, it has cute little animation. +/// It is based on [ToggleButtons]. class SegmentedButtons extends StatelessWidget { + /// Creates a segmented buttons widget. This is a SelfPrivacy implementation. + /// + /// Provide the button titles in [titles] as a [List]. + /// Current selection is provided in [isSelected] as a [List]. + /// This widget will call [onPressed] with the index of the button that was pressed. const SegmentedButtons({ required this.isSelected, required this.onPressed, @@ -8,15 +18,24 @@ class SegmentedButtons extends StatelessWidget { super.key, }); + /// The current selection state of the buttons. + /// + /// The length of this list must be equal to the length of [titles]. + /// Several buttons can be selected at the same time. final List isSelected; + + /// The callback that is called when a button is pressed. + /// It will be called with the index of the button that was pressed. final Function(int)? onPressed; + + /// The titles of the buttons. final List titles; @override Widget build(final BuildContext context) => LayoutBuilder( builder: (final context, final constraints) => ToggleButtons( constraints: BoxConstraints( - minWidth: (constraints.maxWidth - 8) / 3, + minWidth: (constraints.maxWidth - 8) / titles.length, minHeight: 40 + Theme.of(context).visualDensity.vertical * 4, ), borderRadius: BorderRadius.circular(48), diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index bafe94a7..32cd845c 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -6,10 +6,9 @@ import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; @@ -32,7 +31,12 @@ class JobsContent extends StatelessWidget { if (state is JobsStateEmpty) { widgets = [ const SizedBox(height: 80), - Center(child: BrandText.body1('jobs.empty'.tr())), + Center( + child: Text( + 'jobs.empty'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + ), ]; if (installationState is ServerInstallationFinished) { @@ -109,8 +113,9 @@ class JobsContent extends StatelessWidget { children: [ const SizedBox(height: 15), Center( - child: BrandText.h2( + child: Text( 'jobs.title'.tr(), + style: Theme.of(context).textTheme.headlineSmall, ), ), const SizedBox(height: 20), diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index 00f1388e..5264adb7 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/text_themes.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; class ProgressBar extends StatefulWidget { @@ -65,7 +64,7 @@ class _ProgressBarState extends State { Container( alignment: Alignment.centerLeft, decoration: BoxDecoration( - color: BrandColors.gray4, + color: const Color(0xFFDDDDDD), borderRadius: BorderRadius.circular(5), ), child: LayoutBuilder( @@ -119,3 +118,13 @@ class _ProgressBarState extends State { ); } } + +const TextStyle progressTextStyleLight = TextStyle( + fontSize: 11, + color: Colors.black, + height: 1.7, +); + +final TextStyle progressTextStyleDark = progressTextStyleLight.copyWith( + color: Colors.white, +); diff --git a/lib/ui/components/switch_block/switch_bloc.dart b/lib/ui/components/switch_block/switch_bloc.dart deleted file mode 100644 index 85ac2c68..00000000 --- a/lib/ui/components/switch_block/switch_bloc.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; - -// TODO: Delete this file. - -class SwitcherBlock extends StatelessWidget { - const SwitcherBlock({ - required this.child, - required this.isActive, - required this.onChange, - super.key, - }); - - final Widget child; - final bool isActive; - final ValueChanged onChange; - - @override - Widget build(final BuildContext context) => Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible(child: child), - const SizedBox(width: 5), - Switch( - activeColor: BrandColors.green1, - activeTrackColor: BrandColors.green2, - onChanged: onChange, - value: isActive, - ), - ], - ), - ); -} diff --git a/lib/ui/helpers/modals.dart b/lib/ui/helpers/modals.dart index 1750c2aa..77ddf2cb 100644 --- a/lib/ui/helpers/modals.dart +++ b/lib/ui/helpers/modals.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/ui/components/action_button/action_button.dart'; +import 'package:selfprivacy/ui/components/buttons/dialog_action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; Future showBrandBottomSheet({ @@ -30,12 +30,12 @@ void showPopUpAlert({ title: alertTitle ?? 'basis.alert'.tr(), contentText: description, actions: [ - ActionButton( + DialogActionButton( text: actionButtonTitle, isRed: true, onPressed: actionButtonOnPressed, ), - ActionButton( + DialogActionButton( text: cancelButtonTitle ?? 'basis.cancel'.tr(), onPressed: cancelButtonOnPressed, ), diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 26e2dacc..36d76c29 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -5,11 +5,10 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -59,7 +58,10 @@ class _BackupDetailsPageState extends State text: 'backup.initialize'.tr(), ), if (backupStatus == BackupStatusEnum.initializing) - BrandText.body1('backup.waiting_for_rebuild'.tr()), + Text( + 'backup.waiting_for_rebuild'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), if (backupStatus != BackupStatusEnum.initializing && backupStatus != BackupStatusEnum.noKey) OutlinedCard( @@ -229,7 +231,10 @@ class _BackupDetailsPageState extends State ), ), if (backupStatus == BackupStatusEnum.error) - BrandText.body1(backupError.toString()), + Text( + backupError.toString(), + style: Theme.of(context).textTheme.bodyMedium, + ), ], ); } diff --git a/lib/ui/pages/devices/new_device.dart b/lib/ui/pages/devices/new_device.dart index 3d16101f..9a64fa72 100644 --- a/lib/ui/pages/devices/new_device.dart +++ b/lib/ui/pages/devices/new_device.dart @@ -3,7 +3,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class NewDeviceScreen extends StatelessWidget { diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 7feab555..54e493de 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:package_info/package_info.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; @@ -25,17 +24,19 @@ class AboutApplicationPage extends StatelessWidget { children: [ FutureBuilder( future: _packageVersion(), - builder: (final context, final snapshot) => BrandText.body1( + builder: (final context, final snapshot) => Text( 'about_application_page.application_version_text' .tr(args: [snapshot.data.toString()]), + style: Theme.of(context).textTheme.bodyLarge, ), ), if (isReady) FutureBuilder( future: _apiVersion(), - builder: (final context, final snapshot) => BrandText.body1( + builder: (final context, final snapshot) => Text( 'about_application_page.api_version_text' .tr(args: [snapshot.data.toString()]), + style: Theme.of(context).textTheme.bodyLarge, ), ), const SizedBox(height: 10), diff --git a/lib/ui/pages/more/app_settings/app_settings.dart b/lib/ui/pages/more/app_settings/app_settings.dart index be8cc40e..fc3ad75a 100644 --- a/lib/ui/pages/more/app_settings/app_settings.dart +++ b/lib/ui/pages/more/app_settings/app_settings.dart @@ -2,7 +2,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/action_button/action_button.dart'; +import 'package:selfprivacy/ui/components/buttons/dialog_action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -84,7 +84,7 @@ class _AppSettingsPageState extends State { title: 'modals.are_you_sure'.tr(), contentText: 'modals.delete_server_volume'.tr(), actions: [ - ActionButton( + DialogActionButton( text: 'modals.yes'.tr(), isRed: true, onPressed: () async { @@ -104,7 +104,7 @@ class _AppSettingsPageState extends State { Navigator.of(context).pop(); }, ), - ActionButton( + DialogActionButton( text: 'basis.cancel'.tr(), ), ], @@ -129,7 +129,7 @@ class _ResetAppTile extends StatelessWidget { title: 'modals.are_you_sure'.tr(), contentText: 'modals.purge_all_keys'.tr(), actions: [ - ActionButton( + DialogActionButton( text: 'modals.purge_all_keys_confirm'.tr(), isRed: true, onPressed: () { @@ -137,7 +137,7 @@ class _ResetAppTile extends StatelessWidget { Navigator.of(context).pop(); }, ), - ActionButton( + DialogActionButton( text: 'basis.cancel'.tr(), ), ], diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index cd13ca62..aca76bd1 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -77,8 +77,11 @@ class _ConsolePageState extends State { '${message.timeString}${isError ? '(Error)' : ''}: \n', style: TextStyle( fontWeight: FontWeight.bold, - color: - isError ? BrandColors.red1 : null, + color: isError + ? Theme.of(context) + .colorScheme + .error + : null, ), ), TextSpan(text: message.text), diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index efa38da4..2e035d53 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:easy_localization/easy_localization.dart'; diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index a7742b6d..ae153f64 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index 85c4939f..10f2e7c0 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -1,6 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index aa843b6c..6707d287 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -2,7 +2,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/metrics/metrics_cubit.dart'; @@ -11,18 +10,17 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; -import 'package:selfprivacy/ui/components/brand_button/segmented_buttons.dart'; +import 'package:selfprivacy/ui/components/buttons/segmented_buttons.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/cpu_chart.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/network_charts.dart'; import 'package:selfprivacy/ui/pages/server_storage/storage_card.dart'; +import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; -import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:timezone/timezone.dart'; diff --git a/lib/ui/pages/server_details/text_details.dart b/lib/ui/pages/server_details/text_details.dart index 5f447901..03126ba5 100644 --- a/lib/ui/pages/server_details/text_details.dart +++ b/lib/ui/pages/server_details/text_details.dart @@ -23,15 +23,13 @@ class _TextDetails extends StatelessWidget { ), ), ), - ...details.metadata - .map( - (final metadata) => ListTileOnSurfaceVariant( - leadingIcon: metadata.type.icon, - title: metadata.name, - subtitle: metadata.value, - ), - ) - .toList(), + ...details.metadata.map( + (final metadata) => ListTileOnSurfaceVariant( + leadingIcon: metadata.type.icon, + title: metadata.name, + subtitle: metadata.value, + ), + ), ], ), ); @@ -39,24 +37,6 @@ class _TextDetails extends StatelessWidget { throw Exception('wrong state'); } } - - Widget getRowTitle(final String title) => Padding( - padding: const EdgeInsets.only(right: 10), - child: BrandText.h5( - title, - textAlign: TextAlign.right, - ), - ); - - Widget getRowValue(final String title, {final bool isBold = false}) => - BrandText.body1( - title, - style: isBold - ? const TextStyle( - fontWeight: NamedFontWeight.demiBold, - ) - : null, - ); } class _TempMessage extends StatelessWidget { @@ -69,7 +49,10 @@ class _TempMessage extends StatelessWidget { Widget build(final BuildContext context) => SizedBox( height: MediaQuery.of(context).size.height - 100, child: Center( - child: BrandText.body2(message), + child: Text( + message, + style: Theme.of(context).textTheme.bodyMedium, + ), ), ); } diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index a93b8f23..6863bfe8 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -57,66 +57,72 @@ class _SelectTimezoneState extends State { } @override - Widget build(final BuildContext context) => Scaffold( - appBar: AppBar( - title: isSearching - ? TextField( - readOnly: false, - textAlign: TextAlign.start, - textInputAction: TextInputAction.next, - enabled: true, - controller: searchController, - decoration: InputDecoration( - errorText: null, - hintText: 'server.timezone_search_bar'.tr(), - ), - ) - : Padding( - padding: const EdgeInsets.only(top: 4.0), - child: Text('server.select_timezone'.tr()), + Widget build(final BuildContext context) { + final isDesktop = Breakpoints.mediumAndUp.isActive(context); + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + title: (isDesktop || isSearching) + ? TextField( + readOnly: false, + textAlign: TextAlign.start, + textInputAction: TextInputAction.next, + enabled: true, + controller: searchController, + decoration: InputDecoration( + errorText: null, + hintText: 'server.timezone_search_bar'.tr(), ), - leading: IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: isSearching - ? () => setState(() => isSearching = false) - : () => Navigator.of(context).pop(), - ), - actions: [ - if (!isSearching) - IconButton( - icon: const Icon(Icons.search), - onPressed: () => setState(() => isSearching = true), + ) + : Padding( + padding: const EdgeInsets.only(top: 4.0), + child: Text('server.select_timezone'.tr()), ), - ], + leading: !isDesktop + ? IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: isSearching + ? () => setState(() => isSearching = false) + : () => Navigator.of(context).pop(), + ) + : null, + actions: [ + if (!isSearching && !isDesktop) + IconButton( + icon: const Icon(Icons.search), + onPressed: () => setState(() => isSearching = true), + ), + ], + ), + body: SafeArea( + child: ListView( + controller: scrollController, + children: locations + .where( + (final Location location) => timezoneFilterValue == null + ? true + : location.name + .toLowerCase() + .contains(timezoneFilterValue!) || + Duration( + milliseconds: location.currentTimeZone.offset, + ) + .toDayHourMinuteFormat() + .contains(timezoneFilterValue!), + ) + .toList() + .asMap() + .map( + (final key, final value) => locationToListTile(key, value), + ) + .values + .toList(), ), - body: SafeArea( - child: ListView( - controller: scrollController, - children: locations - .where( - (final Location location) => timezoneFilterValue == null - ? true - : location.name - .toLowerCase() - .contains(timezoneFilterValue!) || - Duration( - milliseconds: location.currentTimeZone.offset, - ) - .toDayHourMinuteFormat() - .contains(timezoneFilterValue!), - ) - .toList() - .asMap() - .map( - (final key, final value) => locationToListTile(key, value), - ) - .values - .toList(), - ), - ), - ); + ), + ); + } - MapEntry locationToListTile( + MapEntry locationToListTile( final int key, final Location location, ) { @@ -126,46 +132,19 @@ class _SelectTimezoneState extends State { return MapEntry( key, - Container( - height: 75, - padding: const EdgeInsets.symmetric(horizontal: 20), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: BrandColors.dividerColor, - ), - ), + ListTile( + title: Text( + location.name, ), - child: InkWell( - onTap: () { - context.read().repository.setTimezone( - location.name, - ); - Navigator.of(context).pop(); - }, - child: Container( - padding: const EdgeInsets.symmetric(vertical: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - BrandText.body1( - location.name, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - ), - ), - BrandText.small( - 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', - style: const TextStyle( - fontSize: 13, - ), - ), - ], - ), - ), + subtitle: Text( + 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', ), + onTap: () { + context.read().repository.setTimezone( + location.name, + ); + Navigator.of(context).pop(); + }, ), ); } diff --git a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index 227fb501..8d42cb6f 100644 --- a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index 71859116..5c3e4eb6 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 50cb93be..41c81140 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.d import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/price.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 7b23e275..81e0fc07 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -5,7 +5,7 @@ import 'package:flutter_svg/svg.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; +import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 80e03101..e5320a35 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -7,7 +9,6 @@ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -45,24 +46,25 @@ class _ServicesPageState extends State { : null, body: RefreshIndicator( onRefresh: () async { - context.read().reload(); + unawaited(context.read().reload()); }, child: ListView( padding: paddingH15V0, children: [ - BrandText.body1('basis.services_title'.tr()), + Text( + 'basis.services_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), const SizedBox(height: 24), if (!isReady) ...[const NotReadyCard(), const SizedBox(height: 24)], - ...services - .map( - (final service) => Padding( - padding: const EdgeInsets.only( - bottom: 30, - ), - child: _Card(service: service), - ), - ) - .toList() + ...services.map( + (final service) => Padding( + padding: const EdgeInsets.only( + bottom: 30, + ), + child: _Card(service: service), + ), + ) ], ), ), @@ -106,8 +108,10 @@ class _Card extends StatelessWidget { child: InkResponse( highlightShape: BoxShape.rectangle, onTap: isReady - ? () => context.pushRoute( - ServiceRoute(serviceId: service.id), + ? () => unawaited( + context.pushRoute( + ServiceRoute(serviceId: service.id), + ), ) : null, child: Padding( @@ -134,23 +138,17 @@ class _Card extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 10), - BrandText.h2(service.displayName), - const SizedBox(height: 10), + const SizedBox(height: 12), + Text( + service.displayName, + style: Theme.of(context).textTheme.headlineMedium, + ), + const SizedBox(height: 8), if (service.url != '' && service.url != null) Column( children: [ - GestureDetector( - onTap: () => launchURL( - service.url, - ), - child: Text( - '${service.url}', - style: TextStyle( - color: Theme.of(context).colorScheme.secondary, - decoration: TextDecoration.underline, - ), - ), + _ServiceLink( + url: service.url ?? '', ), const SizedBox(height: 10), ], @@ -158,19 +156,22 @@ class _Card extends StatelessWidget { if (service.id == 'mailserver') Column( children: [ - Text( - domainName, - style: TextStyle( - color: Theme.of(context).colorScheme.primary, - decoration: TextDecoration.underline, - ), + _ServiceLink( + url: domainName, + isActive: false, ), const SizedBox(height: 10), ], ), - BrandText.body2(service.loginInfo), + Text( + service.loginInfo, + style: Theme.of(context).textTheme.bodyMedium, + ), const SizedBox(height: 10), - BrandText.body2(service.description), + Text( + service.description, + style: Theme.of(context).textTheme.bodyMedium, + ), const SizedBox(height: 10), ], ) @@ -181,3 +182,29 @@ class _Card extends StatelessWidget { ); } } + +class _ServiceLink extends StatelessWidget { + const _ServiceLink({ + required this.url, + this.isActive = true, + }); + + final String url; + final bool isActive; + + @override + Widget build(final BuildContext context) => GestureDetector( + onTap: isActive + ? () => launchURL( + url, + ) + : null, + child: Text( + url, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: Theme.of(context).colorScheme.primary, + decoration: TextDecoration.underline, + ), + ), + ); +} diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index e589e4f7..5b598af0 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -10,9 +12,8 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_fo import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/components/support_drawer/support_drawer.dart'; @@ -395,7 +396,10 @@ class InitializingPage extends StatelessWidget { color: Colors.white, ), const SizedBox(width: 10), - BrandText.buttonTitleText('domain.update_list'.tr()), + Text( + 'domain.update_list'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), ], ), ), @@ -403,8 +407,8 @@ class InitializingPage extends StatelessWidget { if (state is Loaded) ...[ const SizedBox(height: 32), BrandButton.filled( - onPressed: () => - context.read().saveDomain(), + onPressed: () => unawaited( + context.read().saveDomain()), text: 'initializing.save_domain'.tr(), ), ], diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 6813d9cd..4e09ae82 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -6,8 +6,8 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 2b9f1748..3c1c5380 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_depe import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index 7eeb2812..ea264749 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:cubit_form/cubit_form.dart'; diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index d9dbba3a..d08e6bf7 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:cubit_form/cubit_form.dart'; diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index bd308f31..859a6eca 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoverByRecoveryKey extends StatelessWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index 12c23d54..f758f5d2 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index 4bf670a3..e8969173 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 948e2288..9ad22ebc 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index 8aaefe35..72f557d3 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 2fee7297..193e3292 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 50c99ca7..a892efc1 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; diff --git a/lib/ui/pages/users/empty.dart b/lib/ui/pages/users/empty.dart index dc2d292b..f58dc740 100644 --- a/lib/ui/pages/users/empty.dart +++ b/lib/ui/pages/users/empty.dart @@ -11,21 +11,25 @@ class _NoUsers extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(BrandIcons.users, size: 50, color: BrandColors.grey7), + Icon( + BrandIcons.users, + size: 50, + color: Theme.of(context).colorScheme.onBackground, + ), const SizedBox(height: 20), - BrandText.h2( + Text( 'users.nobody_here'.tr(), - style: const TextStyle( - color: BrandColors.grey7, - ), + style: Theme.of(context).textTheme.headlineMedium?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), ), const SizedBox(height: 10), - BrandText.medium( + Text( text, textAlign: TextAlign.center, - style: const TextStyle( - color: BrandColors.grey7, - ), + style: Theme.of(context).textTheme.titleSmall?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), ), ], ), @@ -43,21 +47,25 @@ class _CouldNotLoadUsers extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(BrandIcons.users, size: 50, color: BrandColors.grey7), + Icon( + BrandIcons.users, + size: 50, + color: Theme.of(context).colorScheme.onBackground, + ), const SizedBox(height: 20), - BrandText.h2( + Text( 'users.could_not_fetch_users'.tr(), - style: const TextStyle( - color: BrandColors.grey7, - ), + style: Theme.of(context).textTheme.headlineMedium?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), ), const SizedBox(height: 10), - BrandText.medium( + Text( text, textAlign: TextAlign.center, - style: const TextStyle( - color: BrandColors.grey7, - ), + style: Theme.of(context).textTheme.titleSmall?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), ), ], ), diff --git a/lib/ui/pages/users/user.dart b/lib/ui/pages/users/user.dart index 0ce6d8cc..bbc01012 100644 --- a/lib/ui/pages/users/user.dart +++ b/lib/ui/pages/users/user.dart @@ -28,17 +28,17 @@ class _User extends StatelessWidget { ), const SizedBox(width: 20), Flexible( - child: isRootUser - ? BrandText.h4Underlined(user.login) - // cross out text if user not found on server - : BrandText.h4( - user.login, - style: user.isFoundOnServer - ? null - : const TextStyle( - decoration: TextDecoration.lineThrough, - ), + child: Text( + user.login, + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + decoration: isRootUser + ? TextDecoration.underline + : user.isFoundOnServer + ? TextDecoration.none + : TextDecoration.lineThrough, ), + ), ), ], ), diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 8b3c5dfd..2ae93648 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -13,13 +13,12 @@ import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; -import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; diff --git a/lib/utils/extensions/text_extensions.dart b/lib/utils/extensions/text_extensions.dart index bfacc600..a00f7096 100644 --- a/lib/utils/extensions/text_extensions.dart +++ b/lib/utils/extensions/text_extensions.dart @@ -1,4 +1,4 @@ -import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; extension TextExtension on Text { Text withColor(final Color color) => Text( From 805f12b9e9c5711c2b49730d632acf402ebc54f7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 27 Mar 2023 20:03:16 +0300 Subject: [PATCH 450/732] docs: Document WidgetSize widget --- lib/ui/helpers/widget_size.dart | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/ui/helpers/widget_size.dart b/lib/ui/helpers/widget_size.dart index 2b9eb962..bbd1529f 100644 --- a/lib/ui/helpers/widget_size.dart +++ b/lib/ui/helpers/widget_size.dart @@ -1,14 +1,26 @@ import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; +/// A helper widget that calls a callback when its size changes. +/// +/// This is useful when you want to know the size of a widget, and use it in +/// another leaf of the tree. +/// +/// The [onChange] callback is called after the widget is rendered, and the +/// size of the widget is different from the previous render. class WidgetSize extends StatefulWidget { + /// Creates a helper widget that calls a callback when its size changes. const WidgetSize({ required this.onChange, required this.child, super.key, }); + + /// The child widget, the size of which is to be measured. final Widget child; - final Function onChange; + + /// The callback to be called when the size of the widget changes. + final Function(Size) onChange; @override State createState() => _WidgetSizeState(); @@ -34,6 +46,11 @@ class _WidgetSizeState extends State { } final newSize = context.size; + + if (newSize == null) { + return; + } + if (oldSize == newSize) { return; } From f5313a814867989a4fe195db9358af8b107efc1f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 27 Mar 2023 20:29:02 +0300 Subject: [PATCH 451/732] chore: New lints --- analysis_options.yaml | 17 +- .../schema/disk_volumes.graphql.dart | 1 - .../schema/disk_volumes.graphql.g.dart | 376 --------- .../graphql_maps/schema/schema.graphql.g.dart | 147 ---- .../schema/server_api.graphql.dart | 1 + .../schema/server_api.graphql.g.dart | 797 ------------------ .../schema/server_settings.graphql.dart | 2 +- .../schema/server_settings.graphql.g.dart | 315 ------- .../graphql_maps/schema/services.graphql.dart | 2 +- .../schema/services.graphql.g.dart | 458 ---------- .../graphql_maps/schema/users.graphql.dart | 2 +- .../graphql_maps/schema/users.graphql.g.dart | 366 -------- .../components/jobs_content/jobs_content.dart | 58 +- .../components/progress_bar/progress_bar.dart | 1 - lib/ui/pages/devices/devices.dart | 5 +- lib/ui/pages/dns_details/dns_details.dart | 6 +- .../pages/more/app_settings/app_settings.dart | 14 +- lib/ui/pages/more/console.dart | 1 - lib/ui/pages/recovery_key/recovery_key.dart | 2 +- .../binds_migration/services_migration.dart | 58 +- .../pages/server_storage/server_storage.dart | 54 +- lib/ui/pages/services/services.dart | 10 +- .../setup/initializing/initializing.dart | 8 +- lib/ui/pages/users/users.dart | 5 +- 24 files changed, 117 insertions(+), 2589 deletions(-) delete mode 100644 lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart delete mode 100644 lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart diff --git a/analysis_options.yaml b/analysis_options.yaml index 72343f80..ff0f9356 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -29,16 +29,16 @@ linter: # producing the lint. rules: avoid_print: false # Uncomment to disable the `avoid_print` rule - prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - always_use_package_imports: true - no_adjacent_strings_in_list: true - unnecessary_statements: true always_declare_return_types: true - always_put_required_named_parameters_first: true always_put_control_body_on_new_line: true + always_put_required_named_parameters_first: true + always_use_package_imports: true avoid_escaping_inner_quotes: true avoid_setters_without_getters: true + collection_methods_unrelated_type: true + combinators_ordering: true eol_at_end_of_file: true + no_adjacent_strings_in_list: true prefer_constructors_over_static_methods: true prefer_expression_function_bodies: true prefer_final_in_for_each: true @@ -48,12 +48,18 @@ linter: prefer_if_elements_to_conditional_expressions: true prefer_mixin: true prefer_null_aware_method_calls: true + prefer_single_quotes: true require_trailing_commas: true sized_box_shrink_expand: true sort_constructors_first: true + unawaited_futures: true unnecessary_await_in_return: true + unnecessary_null_aware_operator_on_extension_on_nullable: true unnecessary_null_checks: true unnecessary_parenthesis: true + unnecessary_statements: true + unnecessary_to_list_in_spreads: true + unreachable_from_main: true use_enums: true use_if_null_to_convert_nulls_to_bools: true use_is_even_rather_than_modulo: true @@ -61,6 +67,7 @@ linter: use_named_constants: true use_setters_to_change_properties: true use_string_buffers: true + use_string_in_part_of_directives: true use_super_parameters: true use_to_and_as_if_applicable: true diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 9035da4f..22409ef9 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -3,7 +3,6 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart deleted file mode 100644 index c1ab4fba..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart +++ /dev/null @@ -1,376 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'disk_volumes.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes _$Query$GetServerDiskVolumesFromJson( - Map json) => - Query$GetServerDiskVolumes( - storage: Query$GetServerDiskVolumes$storage.fromJson( - json['storage'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumesToJson( - Query$GetServerDiskVolumes instance) => - { - 'storage': instance.storage.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage _$Query$GetServerDiskVolumes$storageFromJson( - Map json) => - Query$GetServerDiskVolumes$storage( - volumes: (json['volumes'] as List) - .map((e) => Query$GetServerDiskVolumes$storage$volumes.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumes$storageToJson( - Query$GetServerDiskVolumes$storage instance) => - { - 'volumes': instance.volumes.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage$volumes - _$Query$GetServerDiskVolumes$storage$volumesFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes( - freeSpace: json['freeSpace'] as String, - model: json['model'] as String?, - name: json['name'] as String, - root: json['root'] as bool, - serial: json['serial'] as String?, - totalSpace: json['totalSpace'] as String, - type: json['type'] as String, - usages: (json['usages'] as List) - .map((e) => - Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( - e as Map)) - .toList(), - usedSpace: json['usedSpace'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumes$storage$volumesToJson( - Query$GetServerDiskVolumes$storage$volumes instance) => - { - 'freeSpace': instance.freeSpace, - 'model': instance.model, - 'name': instance.name, - 'root': instance.root, - 'serial': instance.serial, - 'totalSpace': instance.totalSpace, - 'type': instance.type, - 'usages': instance.usages.map((e) => e.toJson()).toList(), - 'usedSpace': instance.usedSpace, - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage$volumes$usages - _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes$usages( - title: json['title'] as String, - usedSpace: json['usedSpace'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson( - Query$GetServerDiskVolumes$storage$volumes$usages instance) => - { - 'title': instance.title, - 'usedSpace': instance.usedSpace, - '__typename': instance.$__typename, - }; - -Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( - title: json['title'] as String, - usedSpace: json['usedSpace'] as String, - $__typename: json['__typename'] as String, - service: json['service'] == null - ? null - : Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - .fromJson(json['service'] as Map), - ); - -Map - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage - instance) => - { - 'title': instance.title, - 'usedSpace': instance.usedSpace, - '__typename': instance.$__typename, - 'service': instance.service?.toJson(), - }; - -Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( - Map json) => - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( - id: json['id'] as String, - isMovable: json['isMovable'] as bool, - displayName: json['displayName'] as String, - $__typename: json['__typename'] as String, - ); - -Map - _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( - Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service - instance) => - { - 'id': instance.id, - 'isMovable': instance.isMovable, - 'displayName': instance.displayName, - '__typename': instance.$__typename, - }; - -Variables$Mutation$MountVolume _$Variables$Mutation$MountVolumeFromJson( - Map json) => - Variables$Mutation$MountVolume( - name: json['name'] as String, - ); - -Map _$Variables$Mutation$MountVolumeToJson( - Variables$Mutation$MountVolume instance) => - { - 'name': instance.name, - }; - -Mutation$MountVolume _$Mutation$MountVolumeFromJson( - Map json) => - Mutation$MountVolume( - mountVolume: Mutation$MountVolume$mountVolume.fromJson( - json['mountVolume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MountVolumeToJson( - Mutation$MountVolume instance) => - { - 'mountVolume': instance.mountVolume.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$MountVolume$mountVolume _$Mutation$MountVolume$mountVolumeFromJson( - Map json) => - Mutation$MountVolume$mountVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MountVolume$mountVolumeToJson( - Mutation$MountVolume$mountVolume instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$ResizeVolume _$Variables$Mutation$ResizeVolumeFromJson( - Map json) => - Variables$Mutation$ResizeVolume( - name: json['name'] as String, - ); - -Map _$Variables$Mutation$ResizeVolumeToJson( - Variables$Mutation$ResizeVolume instance) => - { - 'name': instance.name, - }; - -Mutation$ResizeVolume _$Mutation$ResizeVolumeFromJson( - Map json) => - Mutation$ResizeVolume( - resizeVolume: Mutation$ResizeVolume$resizeVolume.fromJson( - json['resizeVolume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ResizeVolumeToJson( - Mutation$ResizeVolume instance) => - { - 'resizeVolume': instance.resizeVolume.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$ResizeVolume$resizeVolume _$Mutation$ResizeVolume$resizeVolumeFromJson( - Map json) => - Mutation$ResizeVolume$resizeVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ResizeVolume$resizeVolumeToJson( - Mutation$ResizeVolume$resizeVolume instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$UnmountVolume _$Variables$Mutation$UnmountVolumeFromJson( - Map json) => - Variables$Mutation$UnmountVolume( - name: json['name'] as String, - ); - -Map _$Variables$Mutation$UnmountVolumeToJson( - Variables$Mutation$UnmountVolume instance) => - { - 'name': instance.name, - }; - -Mutation$UnmountVolume _$Mutation$UnmountVolumeFromJson( - Map json) => - Mutation$UnmountVolume( - unmountVolume: Mutation$UnmountVolume$unmountVolume.fromJson( - json['unmountVolume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UnmountVolumeToJson( - Mutation$UnmountVolume instance) => - { - 'unmountVolume': instance.unmountVolume.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$UnmountVolume$unmountVolume - _$Mutation$UnmountVolume$unmountVolumeFromJson(Map json) => - Mutation$UnmountVolume$unmountVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UnmountVolume$unmountVolumeToJson( - Mutation$UnmountVolume$unmountVolume instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$MigrateToBinds _$Variables$Mutation$MigrateToBindsFromJson( - Map json) => - Variables$Mutation$MigrateToBinds( - input: Input$MigrateToBindsInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$MigrateToBindsToJson( - Variables$Mutation$MigrateToBinds instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$MigrateToBinds _$Mutation$MigrateToBindsFromJson( - Map json) => - Mutation$MigrateToBinds( - migrateToBinds: Mutation$MigrateToBinds$migrateToBinds.fromJson( - json['migrateToBinds'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MigrateToBindsToJson( - Mutation$MigrateToBinds instance) => - { - 'migrateToBinds': instance.migrateToBinds.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$MigrateToBinds$migrateToBinds - _$Mutation$MigrateToBinds$migrateToBindsFromJson( - Map json) => - Mutation$MigrateToBinds$migrateToBinds( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - job: json['job'] == null - ? null - : Mutation$MigrateToBinds$migrateToBinds$job.fromJson( - json['job'] as Map), - ); - -Map _$Mutation$MigrateToBinds$migrateToBindsToJson( - Mutation$MigrateToBinds$migrateToBinds instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'job': instance.job?.toJson(), - }; - -Mutation$MigrateToBinds$migrateToBinds$job - _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson( - Map json) => - Mutation$MigrateToBinds$migrateToBinds$job( - createdAt: dateTimeFromJson(json['createdAt']), - description: json['description'] as String, - error: json['error'] as String?, - finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), - name: json['name'] as String, - progress: json['progress'] as int?, - result: json['result'] as String?, - status: json['status'] as String, - statusText: json['statusText'] as String?, - uid: json['uid'] as String, - updatedAt: dateTimeFromJson(json['updatedAt']), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MigrateToBinds$migrateToBinds$jobToJson( - Mutation$MigrateToBinds$migrateToBinds$job instance) => - { - 'createdAt': dateTimeToJson(instance.createdAt), - 'description': instance.description, - 'error': instance.error, - 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), - 'name': instance.name, - 'progress': instance.progress, - 'result': instance.result, - 'status': instance.status, - 'statusText': instance.statusText, - 'uid': instance.uid, - 'updatedAt': dateTimeToJson(instance.updatedAt), - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart deleted file mode 100644 index 7d1280c8..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart +++ /dev/null @@ -1,147 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'schema.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Input$AutoUpgradeSettingsInput _$Input$AutoUpgradeSettingsInputFromJson( - Map json) => - Input$AutoUpgradeSettingsInput( - enableAutoUpgrade: json['enableAutoUpgrade'] as bool?, - allowReboot: json['allowReboot'] as bool?, - ); - -Map _$Input$AutoUpgradeSettingsInputToJson( - Input$AutoUpgradeSettingsInput instance) => - { - 'enableAutoUpgrade': instance.enableAutoUpgrade, - 'allowReboot': instance.allowReboot, - }; - -Input$MigrateToBindsInput _$Input$MigrateToBindsInputFromJson( - Map json) => - Input$MigrateToBindsInput( - emailBlockDevice: json['emailBlockDevice'] as String, - bitwardenBlockDevice: json['bitwardenBlockDevice'] as String, - giteaBlockDevice: json['giteaBlockDevice'] as String, - nextcloudBlockDevice: json['nextcloudBlockDevice'] as String, - pleromaBlockDevice: json['pleromaBlockDevice'] as String, - ); - -Map _$Input$MigrateToBindsInputToJson( - Input$MigrateToBindsInput instance) => - { - 'emailBlockDevice': instance.emailBlockDevice, - 'bitwardenBlockDevice': instance.bitwardenBlockDevice, - 'giteaBlockDevice': instance.giteaBlockDevice, - 'nextcloudBlockDevice': instance.nextcloudBlockDevice, - 'pleromaBlockDevice': instance.pleromaBlockDevice, - }; - -Input$MoveServiceInput _$Input$MoveServiceInputFromJson( - Map json) => - Input$MoveServiceInput( - serviceId: json['serviceId'] as String, - location: json['location'] as String, - ); - -Map _$Input$MoveServiceInputToJson( - Input$MoveServiceInput instance) => - { - 'serviceId': instance.serviceId, - 'location': instance.location, - }; - -Input$RecoveryKeyLimitsInput _$Input$RecoveryKeyLimitsInputFromJson( - Map json) => - Input$RecoveryKeyLimitsInput( - expirationDate: _nullable$dateTimeFromJson(json['expirationDate']), - uses: json['uses'] as int?, - ); - -Map _$Input$RecoveryKeyLimitsInputToJson( - Input$RecoveryKeyLimitsInput instance) => - { - 'expirationDate': _nullable$dateTimeToJson(instance.expirationDate), - 'uses': instance.uses, - }; - -Input$SshMutationInput _$Input$SshMutationInputFromJson( - Map json) => - Input$SshMutationInput( - username: json['username'] as String, - sshKey: json['sshKey'] as String, - ); - -Map _$Input$SshMutationInputToJson( - Input$SshMutationInput instance) => - { - 'username': instance.username, - 'sshKey': instance.sshKey, - }; - -Input$UseNewDeviceKeyInput _$Input$UseNewDeviceKeyInputFromJson( - Map json) => - Input$UseNewDeviceKeyInput( - key: json['key'] as String, - deviceName: json['deviceName'] as String, - ); - -Map _$Input$UseNewDeviceKeyInputToJson( - Input$UseNewDeviceKeyInput instance) => - { - 'key': instance.key, - 'deviceName': instance.deviceName, - }; - -Input$UseRecoveryKeyInput _$Input$UseRecoveryKeyInputFromJson( - Map json) => - Input$UseRecoveryKeyInput( - key: json['key'] as String, - deviceName: json['deviceName'] as String, - ); - -Map _$Input$UseRecoveryKeyInputToJson( - Input$UseRecoveryKeyInput instance) => - { - 'key': instance.key, - 'deviceName': instance.deviceName, - }; - -Input$UserMutationInput _$Input$UserMutationInputFromJson( - Map json) => - Input$UserMutationInput( - username: json['username'] as String, - password: json['password'] as String, - ); - -Map _$Input$UserMutationInputToJson( - Input$UserMutationInput instance) => - { - 'username': instance.username, - 'password': instance.password, - }; - -Fragment$dnsRecordFields _$Fragment$dnsRecordFieldsFromJson( - Map json) => - Fragment$dnsRecordFields( - content: json['content'] as String, - name: json['name'] as String, - priority: json['priority'] as int?, - recordType: json['recordType'] as String, - ttl: json['ttl'] as int, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$dnsRecordFieldsToJson( - Fragment$dnsRecordFields instance) => - { - 'content': instance.content, - 'name': instance.name, - 'priority': instance.priority, - 'recordType': instance.recordType, - 'ttl': instance.ttl, - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 7a147cc7..4bb33228 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart deleted file mode 100644 index f0ec390c..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart +++ /dev/null @@ -1,797 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'server_api.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$GetApiVersion _$Query$GetApiVersionFromJson(Map json) => - Query$GetApiVersion( - api: - Query$GetApiVersion$api.fromJson(json['api'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiVersionToJson( - Query$GetApiVersion instance) => - { - 'api': instance.api.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetApiVersion$api _$Query$GetApiVersion$apiFromJson( - Map json) => - Query$GetApiVersion$api( - version: json['version'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiVersion$apiToJson( - Query$GetApiVersion$api instance) => - { - 'version': instance.version, - '__typename': instance.$__typename, - }; - -Query$GetApiJobs _$Query$GetApiJobsFromJson(Map json) => - Query$GetApiJobs( - jobs: - Query$GetApiJobs$jobs.fromJson(json['jobs'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiJobsToJson(Query$GetApiJobs instance) => - { - 'jobs': instance.jobs.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetApiJobs$jobs _$Query$GetApiJobs$jobsFromJson( - Map json) => - Query$GetApiJobs$jobs( - getJobs: (json['getJobs'] as List) - .map((e) => - Query$GetApiJobs$jobs$getJobs.fromJson(e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiJobs$jobsToJson( - Query$GetApiJobs$jobs instance) => - { - 'getJobs': instance.getJobs.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$GetApiJobs$jobs$getJobs _$Query$GetApiJobs$jobs$getJobsFromJson( - Map json) => - Query$GetApiJobs$jobs$getJobs( - createdAt: dateTimeFromJson(json['createdAt']), - description: json['description'] as String, - error: json['error'] as String?, - finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), - name: json['name'] as String, - progress: json['progress'] as int?, - result: json['result'] as String?, - status: json['status'] as String, - statusText: json['statusText'] as String?, - uid: json['uid'] as String, - updatedAt: dateTimeFromJson(json['updatedAt']), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiJobs$jobs$getJobsToJson( - Query$GetApiJobs$jobs$getJobs instance) => - { - 'createdAt': dateTimeToJson(instance.createdAt), - 'description': instance.description, - 'error': instance.error, - 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), - 'name': instance.name, - 'progress': instance.progress, - 'result': instance.result, - 'status': instance.status, - 'statusText': instance.statusText, - 'uid': instance.uid, - 'updatedAt': dateTimeToJson(instance.updatedAt), - '__typename': instance.$__typename, - }; - -Variables$Mutation$RemoveJob _$Variables$Mutation$RemoveJobFromJson( - Map json) => - Variables$Mutation$RemoveJob( - jobId: json['jobId'] as String, - ); - -Map _$Variables$Mutation$RemoveJobToJson( - Variables$Mutation$RemoveJob instance) => - { - 'jobId': instance.jobId, - }; - -Mutation$RemoveJob _$Mutation$RemoveJobFromJson(Map json) => - Mutation$RemoveJob( - removeJob: Mutation$RemoveJob$removeJob.fromJson( - json['removeJob'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveJobToJson(Mutation$RemoveJob instance) => - { - 'removeJob': instance.removeJob.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RemoveJob$removeJob _$Mutation$RemoveJob$removeJobFromJson( - Map json) => - Mutation$RemoveJob$removeJob( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveJob$removeJobToJson( - Mutation$RemoveJob$removeJob instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRebuild _$Mutation$RunSystemRebuildFromJson( - Map json) => - Mutation$RunSystemRebuild( - runSystemRebuild: Mutation$RunSystemRebuild$runSystemRebuild.fromJson( - json['runSystemRebuild'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRebuildToJson( - Mutation$RunSystemRebuild instance) => - { - 'runSystemRebuild': instance.runSystemRebuild.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRebuild$runSystemRebuild - _$Mutation$RunSystemRebuild$runSystemRebuildFromJson( - Map json) => - Mutation$RunSystemRebuild$runSystemRebuild( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRebuild$runSystemRebuildToJson( - Mutation$RunSystemRebuild$runSystemRebuild instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRollback _$Mutation$RunSystemRollbackFromJson( - Map json) => - Mutation$RunSystemRollback( - runSystemRollback: Mutation$RunSystemRollback$runSystemRollback.fromJson( - json['runSystemRollback'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRollbackToJson( - Mutation$RunSystemRollback instance) => - { - 'runSystemRollback': instance.runSystemRollback.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RunSystemRollback$runSystemRollback - _$Mutation$RunSystemRollback$runSystemRollbackFromJson( - Map json) => - Mutation$RunSystemRollback$runSystemRollback( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemRollback$runSystemRollbackToJson( - Mutation$RunSystemRollback$runSystemRollback instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RunSystemUpgrade _$Mutation$RunSystemUpgradeFromJson( - Map json) => - Mutation$RunSystemUpgrade( - runSystemUpgrade: Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( - json['runSystemUpgrade'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemUpgradeToJson( - Mutation$RunSystemUpgrade instance) => - { - 'runSystemUpgrade': instance.runSystemUpgrade.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RunSystemUpgrade$runSystemUpgrade - _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson( - Map json) => - Mutation$RunSystemUpgrade$runSystemUpgrade( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson( - Mutation$RunSystemUpgrade$runSystemUpgrade instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$PullRepositoryChanges _$Mutation$PullRepositoryChangesFromJson( - Map json) => - Mutation$PullRepositoryChanges( - pullRepositoryChanges: - Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( - json['pullRepositoryChanges'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$PullRepositoryChangesToJson( - Mutation$PullRepositoryChanges instance) => - { - 'pullRepositoryChanges': instance.pullRepositoryChanges.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$PullRepositoryChanges$pullRepositoryChanges - _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson( - Map json) => - Mutation$PullRepositoryChanges$pullRepositoryChanges( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map - _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson( - Mutation$PullRepositoryChanges$pullRepositoryChanges instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$RebootSystem _$Mutation$RebootSystemFromJson( - Map json) => - Mutation$RebootSystem( - rebootSystem: Mutation$RebootSystem$rebootSystem.fromJson( - json['rebootSystem'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RebootSystemToJson( - Mutation$RebootSystem instance) => - { - 'rebootSystem': instance.rebootSystem.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RebootSystem$rebootSystem _$Mutation$RebootSystem$rebootSystemFromJson( - Map json) => - Mutation$RebootSystem$rebootSystem( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RebootSystem$rebootSystemToJson( - Mutation$RebootSystem$rebootSystem instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$SystemServerProvider _$Query$SystemServerProviderFromJson( - Map json) => - Query$SystemServerProvider( - system: Query$SystemServerProvider$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemServerProviderToJson( - Query$SystemServerProvider instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemServerProvider$system _$Query$SystemServerProvider$systemFromJson( - Map json) => - Query$SystemServerProvider$system( - provider: Query$SystemServerProvider$system$provider.fromJson( - json['provider'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemServerProvider$systemToJson( - Query$SystemServerProvider$system instance) => - { - 'provider': instance.provider.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemServerProvider$system$provider - _$Query$SystemServerProvider$system$providerFromJson( - Map json) => - Query$SystemServerProvider$system$provider( - provider: $enumDecode(_$Enum$ServerProviderEnumMap, json['provider'], - unknownValue: Enum$ServerProvider.$unknown), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemServerProvider$system$providerToJson( - Query$SystemServerProvider$system$provider instance) => - { - 'provider': _$Enum$ServerProviderEnumMap[instance.provider]!, - '__typename': instance.$__typename, - }; - -const _$Enum$ServerProviderEnumMap = { - Enum$ServerProvider.HETZNER: 'HETZNER', - Enum$ServerProvider.DIGITALOCEAN: 'DIGITALOCEAN', - Enum$ServerProvider.$unknown: r'$unknown', -}; - -Query$GetApiTokens _$Query$GetApiTokensFromJson(Map json) => - Query$GetApiTokens( - api: Query$GetApiTokens$api.fromJson(json['api'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiTokensToJson(Query$GetApiTokens instance) => - { - 'api': instance.api.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetApiTokens$api _$Query$GetApiTokens$apiFromJson( - Map json) => - Query$GetApiTokens$api( - devices: (json['devices'] as List) - .map((e) => Query$GetApiTokens$api$devices.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiTokens$apiToJson( - Query$GetApiTokens$api instance) => - { - 'devices': instance.devices.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$GetApiTokens$api$devices _$Query$GetApiTokens$api$devicesFromJson( - Map json) => - Query$GetApiTokens$api$devices( - creationDate: dateTimeFromJson(json['creationDate']), - isCaller: json['isCaller'] as bool, - name: json['name'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetApiTokens$api$devicesToJson( - Query$GetApiTokens$api$devices instance) => - { - 'creationDate': dateTimeToJson(instance.creationDate), - 'isCaller': instance.isCaller, - 'name': instance.name, - '__typename': instance.$__typename, - }; - -Query$RecoveryKey _$Query$RecoveryKeyFromJson(Map json) => - Query$RecoveryKey( - api: Query$RecoveryKey$api.fromJson(json['api'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$RecoveryKeyToJson(Query$RecoveryKey instance) => - { - 'api': instance.api.toJson(), - '__typename': instance.$__typename, - }; - -Query$RecoveryKey$api _$Query$RecoveryKey$apiFromJson( - Map json) => - Query$RecoveryKey$api( - recoveryKey: Query$RecoveryKey$api$recoveryKey.fromJson( - json['recoveryKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$RecoveryKey$apiToJson( - Query$RecoveryKey$api instance) => - { - 'recoveryKey': instance.recoveryKey.toJson(), - '__typename': instance.$__typename, - }; - -Query$RecoveryKey$api$recoveryKey _$Query$RecoveryKey$api$recoveryKeyFromJson( - Map json) => - Query$RecoveryKey$api$recoveryKey( - creationDate: _nullable$dateTimeFromJson(json['creationDate']), - exists: json['exists'] as bool, - expirationDate: _nullable$dateTimeFromJson(json['expirationDate']), - usesLeft: json['usesLeft'] as int?, - valid: json['valid'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$RecoveryKey$api$recoveryKeyToJson( - Query$RecoveryKey$api$recoveryKey instance) => - { - 'creationDate': _nullable$dateTimeToJson(instance.creationDate), - 'exists': instance.exists, - 'expirationDate': _nullable$dateTimeToJson(instance.expirationDate), - 'usesLeft': instance.usesLeft, - 'valid': instance.valid, - '__typename': instance.$__typename, - }; - -Variables$Mutation$GetNewRecoveryApiKey - _$Variables$Mutation$GetNewRecoveryApiKeyFromJson( - Map json) => - Variables$Mutation$GetNewRecoveryApiKey( - limits: json['limits'] == null - ? null - : Input$RecoveryKeyLimitsInput.fromJson( - json['limits'] as Map), - ); - -Map _$Variables$Mutation$GetNewRecoveryApiKeyToJson( - Variables$Mutation$GetNewRecoveryApiKey instance) => - { - 'limits': instance.limits?.toJson(), - }; - -Mutation$GetNewRecoveryApiKey _$Mutation$GetNewRecoveryApiKeyFromJson( - Map json) => - Mutation$GetNewRecoveryApiKey( - getNewRecoveryApiKey: - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( - json['getNewRecoveryApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$GetNewRecoveryApiKeyToJson( - Mutation$GetNewRecoveryApiKey instance) => - { - 'getNewRecoveryApiKey': instance.getNewRecoveryApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey - _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson( - Map json) => - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - key: json['key'] as String?, - ); - -Map _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson( - Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'key': instance.key, - }; - -Variables$Mutation$UseRecoveryApiKey - _$Variables$Mutation$UseRecoveryApiKeyFromJson(Map json) => - Variables$Mutation$UseRecoveryApiKey( - input: Input$UseRecoveryKeyInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$UseRecoveryApiKeyToJson( - Variables$Mutation$UseRecoveryApiKey instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$UseRecoveryApiKey _$Mutation$UseRecoveryApiKeyFromJson( - Map json) => - Mutation$UseRecoveryApiKey( - useRecoveryApiKey: Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( - json['useRecoveryApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UseRecoveryApiKeyToJson( - Mutation$UseRecoveryApiKey instance) => - { - 'useRecoveryApiKey': instance.useRecoveryApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$UseRecoveryApiKey$useRecoveryApiKey - _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson( - Map json) => - Mutation$UseRecoveryApiKey$useRecoveryApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - token: json['token'] as String?, - ); - -Map _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson( - Mutation$UseRecoveryApiKey$useRecoveryApiKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'token': instance.token, - }; - -Mutation$RefreshDeviceApiToken _$Mutation$RefreshDeviceApiTokenFromJson( - Map json) => - Mutation$RefreshDeviceApiToken( - refreshDeviceApiToken: - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( - json['refreshDeviceApiToken'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RefreshDeviceApiTokenToJson( - Mutation$RefreshDeviceApiToken instance) => - { - 'refreshDeviceApiToken': instance.refreshDeviceApiToken.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RefreshDeviceApiToken$refreshDeviceApiToken - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson( - Map json) => - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - token: json['token'] as String?, - ); - -Map - _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson( - Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'token': instance.token, - }; - -Variables$Mutation$DeleteDeviceApiToken - _$Variables$Mutation$DeleteDeviceApiTokenFromJson( - Map json) => - Variables$Mutation$DeleteDeviceApiToken( - device: json['device'] as String, - ); - -Map _$Variables$Mutation$DeleteDeviceApiTokenToJson( - Variables$Mutation$DeleteDeviceApiToken instance) => - { - 'device': instance.device, - }; - -Mutation$DeleteDeviceApiToken _$Mutation$DeleteDeviceApiTokenFromJson( - Map json) => - Mutation$DeleteDeviceApiToken( - deleteDeviceApiToken: - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( - json['deleteDeviceApiToken'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteDeviceApiTokenToJson( - Mutation$DeleteDeviceApiToken instance) => - { - 'deleteDeviceApiToken': instance.deleteDeviceApiToken.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$DeleteDeviceApiToken$deleteDeviceApiToken - _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson( - Map json) => - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson( - Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Mutation$GetNewDeviceApiKey _$Mutation$GetNewDeviceApiKeyFromJson( - Map json) => - Mutation$GetNewDeviceApiKey( - getNewDeviceApiKey: - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( - json['getNewDeviceApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$GetNewDeviceApiKeyToJson( - Mutation$GetNewDeviceApiKey instance) => - { - 'getNewDeviceApiKey': instance.getNewDeviceApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$GetNewDeviceApiKey$getNewDeviceApiKey - _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson( - Map json) => - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - key: json['key'] as String?, - ); - -Map _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson( - Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'key': instance.key, - }; - -Mutation$InvalidateNewDeviceApiKey _$Mutation$InvalidateNewDeviceApiKeyFromJson( - Map json) => - Mutation$InvalidateNewDeviceApiKey( - invalidateNewDeviceApiKey: - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( - json['invalidateNewDeviceApiKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$InvalidateNewDeviceApiKeyToJson( - Mutation$InvalidateNewDeviceApiKey instance) => - { - 'invalidateNewDeviceApiKey': instance.invalidateNewDeviceApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( - Map json) => - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map - _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( - Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey - instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$AuthorizeWithNewDeviceApiKey - _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( - Map json) => - Variables$Mutation$AuthorizeWithNewDeviceApiKey( - input: Input$UseNewDeviceKeyInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson( - Variables$Mutation$AuthorizeWithNewDeviceApiKey instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$AuthorizeWithNewDeviceApiKey - _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( - Map json) => - Mutation$AuthorizeWithNewDeviceApiKey( - authorizeWithNewDeviceApiKey: - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - .fromJson(json['authorizeWithNewDeviceApiKey'] - as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$AuthorizeWithNewDeviceApiKeyToJson( - Mutation$AuthorizeWithNewDeviceApiKey instance) => - { - 'authorizeWithNewDeviceApiKey': - instance.authorizeWithNewDeviceApiKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( - Map json) => - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - token: json['token'] as String?, - ); - -Map - _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( - Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey - instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'token': instance.token, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 457de628..14996423 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart deleted file mode 100644 index c928b177..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart +++ /dev/null @@ -1,315 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'server_settings.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$SystemSettings _$Query$SystemSettingsFromJson( - Map json) => - Query$SystemSettings( - system: Query$SystemSettings$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettingsToJson( - Query$SystemSettings instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system _$Query$SystemSettings$systemFromJson( - Map json) => - Query$SystemSettings$system( - settings: Query$SystemSettings$system$settings.fromJson( - json['settings'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$systemToJson( - Query$SystemSettings$system instance) => - { - 'settings': instance.settings.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system$settings - _$Query$SystemSettings$system$settingsFromJson(Map json) => - Query$SystemSettings$system$settings( - autoUpgrade: - Query$SystemSettings$system$settings$autoUpgrade.fromJson( - json['autoUpgrade'] as Map), - ssh: Query$SystemSettings$system$settings$ssh.fromJson( - json['ssh'] as Map), - timezone: json['timezone'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$system$settingsToJson( - Query$SystemSettings$system$settings instance) => - { - 'autoUpgrade': instance.autoUpgrade.toJson(), - 'ssh': instance.ssh.toJson(), - 'timezone': instance.timezone, - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system$settings$autoUpgrade - _$Query$SystemSettings$system$settings$autoUpgradeFromJson( - Map json) => - Query$SystemSettings$system$settings$autoUpgrade( - allowReboot: json['allowReboot'] as bool, - enable: json['enable'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$system$settings$autoUpgradeToJson( - Query$SystemSettings$system$settings$autoUpgrade instance) => - { - 'allowReboot': instance.allowReboot, - 'enable': instance.enable, - '__typename': instance.$__typename, - }; - -Query$SystemSettings$system$settings$ssh - _$Query$SystemSettings$system$settings$sshFromJson( - Map json) => - Query$SystemSettings$system$settings$ssh( - enable: json['enable'] as bool, - passwordAuthentication: json['passwordAuthentication'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemSettings$system$settings$sshToJson( - Query$SystemSettings$system$settings$ssh instance) => - { - 'enable': instance.enable, - 'passwordAuthentication': instance.passwordAuthentication, - '__typename': instance.$__typename, - }; - -Query$SystemIsUsingBinds _$Query$SystemIsUsingBindsFromJson( - Map json) => - Query$SystemIsUsingBinds( - system: Query$SystemIsUsingBinds$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemIsUsingBindsToJson( - Query$SystemIsUsingBinds instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemIsUsingBinds$system _$Query$SystemIsUsingBinds$systemFromJson( - Map json) => - Query$SystemIsUsingBinds$system( - info: Query$SystemIsUsingBinds$system$info.fromJson( - json['info'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemIsUsingBinds$systemToJson( - Query$SystemIsUsingBinds$system instance) => - { - 'info': instance.info.toJson(), - '__typename': instance.$__typename, - }; - -Query$SystemIsUsingBinds$system$info - _$Query$SystemIsUsingBinds$system$infoFromJson(Map json) => - Query$SystemIsUsingBinds$system$info( - usingBinds: json['usingBinds'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Query$SystemIsUsingBinds$system$infoToJson( - Query$SystemIsUsingBinds$system$info instance) => - { - 'usingBinds': instance.usingBinds, - '__typename': instance.$__typename, - }; - -Query$DomainInfo _$Query$DomainInfoFromJson(Map json) => - Query$DomainInfo( - system: Query$DomainInfo$system.fromJson( - json['system'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$DomainInfoToJson(Query$DomainInfo instance) => - { - 'system': instance.system.toJson(), - '__typename': instance.$__typename, - }; - -Query$DomainInfo$system _$Query$DomainInfo$systemFromJson( - Map json) => - Query$DomainInfo$system( - domainInfo: Query$DomainInfo$system$domainInfo.fromJson( - json['domainInfo'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$DomainInfo$systemToJson( - Query$DomainInfo$system instance) => - { - 'domainInfo': instance.domainInfo.toJson(), - '__typename': instance.$__typename, - }; - -Query$DomainInfo$system$domainInfo _$Query$DomainInfo$system$domainInfoFromJson( - Map json) => - Query$DomainInfo$system$domainInfo( - domain: json['domain'] as String, - hostname: json['hostname'] as String, - provider: $enumDecode(_$Enum$DnsProviderEnumMap, json['provider'], - unknownValue: Enum$DnsProvider.$unknown), - requiredDnsRecords: (json['requiredDnsRecords'] as List) - .map((e) => - Fragment$dnsRecordFields.fromJson(e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$DomainInfo$system$domainInfoToJson( - Query$DomainInfo$system$domainInfo instance) => - { - 'domain': instance.domain, - 'hostname': instance.hostname, - 'provider': _$Enum$DnsProviderEnumMap[instance.provider]!, - 'requiredDnsRecords': - instance.requiredDnsRecords.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -const _$Enum$DnsProviderEnumMap = { - Enum$DnsProvider.CLOUDFLARE: 'CLOUDFLARE', - Enum$DnsProvider.$unknown: r'$unknown', -}; - -Variables$Mutation$ChangeTimezone _$Variables$Mutation$ChangeTimezoneFromJson( - Map json) => - Variables$Mutation$ChangeTimezone( - timezone: json['timezone'] as String, - ); - -Map _$Variables$Mutation$ChangeTimezoneToJson( - Variables$Mutation$ChangeTimezone instance) => - { - 'timezone': instance.timezone, - }; - -Mutation$ChangeTimezone _$Mutation$ChangeTimezoneFromJson( - Map json) => - Mutation$ChangeTimezone( - changeTimezone: Mutation$ChangeTimezone$changeTimezone.fromJson( - json['changeTimezone'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ChangeTimezoneToJson( - Mutation$ChangeTimezone instance) => - { - 'changeTimezone': instance.changeTimezone.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$ChangeTimezone$changeTimezone - _$Mutation$ChangeTimezone$changeTimezoneFromJson( - Map json) => - Mutation$ChangeTimezone$changeTimezone( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - timezone: json['timezone'] as String?, - ); - -Map _$Mutation$ChangeTimezone$changeTimezoneToJson( - Mutation$ChangeTimezone$changeTimezone instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'timezone': instance.timezone, - }; - -Variables$Mutation$ChangeAutoUpgradeSettings - _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson( - Map json) => - Variables$Mutation$ChangeAutoUpgradeSettings( - settings: Input$AutoUpgradeSettingsInput.fromJson( - json['settings'] as Map), - ); - -Map _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson( - Variables$Mutation$ChangeAutoUpgradeSettings instance) => - { - 'settings': instance.settings.toJson(), - }; - -Mutation$ChangeAutoUpgradeSettings _$Mutation$ChangeAutoUpgradeSettingsFromJson( - Map json) => - Mutation$ChangeAutoUpgradeSettings( - changeAutoUpgradeSettings: - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( - json['changeAutoUpgradeSettings'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$ChangeAutoUpgradeSettingsToJson( - Mutation$ChangeAutoUpgradeSettings instance) => - { - 'changeAutoUpgradeSettings': instance.changeAutoUpgradeSettings.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( - Map json) => - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - allowReboot: json['allowReboot'] as bool, - enableAutoUpgrade: json['enableAutoUpgrade'] as bool, - ); - -Map - _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( - Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings - instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'allowReboot': instance.allowReboot, - 'enableAutoUpgrade': instance.enableAutoUpgrade, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index a7998aa5..dfea309c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart deleted file mode 100644 index 52663401..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart +++ /dev/null @@ -1,458 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'services.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Query$AllServices _$Query$AllServicesFromJson(Map json) => - Query$AllServices( - services: Query$AllServices$services.fromJson( - json['services'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServicesToJson(Query$AllServices instance) => - { - 'services': instance.services.toJson(), - '__typename': instance.$__typename, - }; - -Query$AllServices$services _$Query$AllServices$servicesFromJson( - Map json) => - Query$AllServices$services( - allServices: (json['allServices'] as List) - .map((e) => Query$AllServices$services$allServices.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServices$servicesToJson( - Query$AllServices$services instance) => - { - 'allServices': instance.allServices.map((e) => e.toJson()).toList(), - '__typename': instance.$__typename, - }; - -Query$AllServices$services$allServices - _$Query$AllServices$services$allServicesFromJson( - Map json) => - Query$AllServices$services$allServices( - description: json['description'] as String, - displayName: json['displayName'] as String, - dnsRecords: (json['dnsRecords'] as List?) - ?.map((e) => - Fragment$dnsRecordFields.fromJson(e as Map)) - .toList(), - id: json['id'] as String, - isEnabled: json['isEnabled'] as bool, - isMovable: json['isMovable'] as bool, - isRequired: json['isRequired'] as bool, - status: $enumDecode(_$Enum$ServiceStatusEnumEnumMap, json['status'], - unknownValue: Enum$ServiceStatusEnum.$unknown), - storageUsage: - Query$AllServices$services$allServices$storageUsage.fromJson( - json['storageUsage'] as Map), - svgIcon: json['svgIcon'] as String, - url: json['url'] as String?, - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServices$services$allServicesToJson( - Query$AllServices$services$allServices instance) => - { - 'description': instance.description, - 'displayName': instance.displayName, - 'dnsRecords': instance.dnsRecords?.map((e) => e.toJson()).toList(), - 'id': instance.id, - 'isEnabled': instance.isEnabled, - 'isMovable': instance.isMovable, - 'isRequired': instance.isRequired, - 'status': _$Enum$ServiceStatusEnumEnumMap[instance.status]!, - 'storageUsage': instance.storageUsage.toJson(), - 'svgIcon': instance.svgIcon, - 'url': instance.url, - '__typename': instance.$__typename, - }; - -const _$Enum$ServiceStatusEnumEnumMap = { - Enum$ServiceStatusEnum.ACTIVATING: 'ACTIVATING', - Enum$ServiceStatusEnum.ACTIVE: 'ACTIVE', - Enum$ServiceStatusEnum.DEACTIVATING: 'DEACTIVATING', - Enum$ServiceStatusEnum.FAILED: 'FAILED', - Enum$ServiceStatusEnum.INACTIVE: 'INACTIVE', - Enum$ServiceStatusEnum.OFF: 'OFF', - Enum$ServiceStatusEnum.RELOADING: 'RELOADING', - Enum$ServiceStatusEnum.$unknown: r'$unknown', -}; - -Query$AllServices$services$allServices$storageUsage - _$Query$AllServices$services$allServices$storageUsageFromJson( - Map json) => - Query$AllServices$services$allServices$storageUsage( - title: json['title'] as String, - usedSpace: json['usedSpace'] as String, - volume: json['volume'] == null - ? null - : Query$AllServices$services$allServices$storageUsage$volume - .fromJson(json['volume'] as Map), - $__typename: json['__typename'] as String, - ); - -Map - _$Query$AllServices$services$allServices$storageUsageToJson( - Query$AllServices$services$allServices$storageUsage instance) => - { - 'title': instance.title, - 'usedSpace': instance.usedSpace, - 'volume': instance.volume?.toJson(), - '__typename': instance.$__typename, - }; - -Query$AllServices$services$allServices$storageUsage$volume - _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( - Map json) => - Query$AllServices$services$allServices$storageUsage$volume( - name: json['name'] as String, - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllServices$services$allServices$storageUsage$volumeToJson( - Query$AllServices$services$allServices$storageUsage$volume instance) => - { - 'name': instance.name, - '__typename': instance.$__typename, - }; - -Variables$Mutation$EnableService _$Variables$Mutation$EnableServiceFromJson( - Map json) => - Variables$Mutation$EnableService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$EnableServiceToJson( - Variables$Mutation$EnableService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$EnableService _$Mutation$EnableServiceFromJson( - Map json) => - Mutation$EnableService( - enableService: Mutation$EnableService$enableService.fromJson( - json['enableService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$EnableServiceToJson( - Mutation$EnableService instance) => - { - 'enableService': instance.enableService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$EnableService$enableService - _$Mutation$EnableService$enableServiceFromJson(Map json) => - Mutation$EnableService$enableService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$EnableService$enableServiceToJson( - Mutation$EnableService$enableService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$DisableService _$Variables$Mutation$DisableServiceFromJson( - Map json) => - Variables$Mutation$DisableService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$DisableServiceToJson( - Variables$Mutation$DisableService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$DisableService _$Mutation$DisableServiceFromJson( - Map json) => - Mutation$DisableService( - disableService: Mutation$DisableService$disableService.fromJson( - json['disableService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DisableServiceToJson( - Mutation$DisableService instance) => - { - 'disableService': instance.disableService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$DisableService$disableService - _$Mutation$DisableService$disableServiceFromJson( - Map json) => - Mutation$DisableService$disableService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DisableService$disableServiceToJson( - Mutation$DisableService$disableService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$StopService _$Variables$Mutation$StopServiceFromJson( - Map json) => - Variables$Mutation$StopService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$StopServiceToJson( - Variables$Mutation$StopService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$StopService _$Mutation$StopServiceFromJson( - Map json) => - Mutation$StopService( - stopService: Mutation$StopService$stopService.fromJson( - json['stopService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StopServiceToJson( - Mutation$StopService instance) => - { - 'stopService': instance.stopService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$StopService$stopService _$Mutation$StopService$stopServiceFromJson( - Map json) => - Mutation$StopService$stopService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StopService$stopServiceToJson( - Mutation$StopService$stopService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$StartService _$Variables$Mutation$StartServiceFromJson( - Map json) => - Variables$Mutation$StartService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$StartServiceToJson( - Variables$Mutation$StartService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$StartService _$Mutation$StartServiceFromJson( - Map json) => - Mutation$StartService( - startService: Mutation$StartService$startService.fromJson( - json['startService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StartServiceToJson( - Mutation$StartService instance) => - { - 'startService': instance.startService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$StartService$startService _$Mutation$StartService$startServiceFromJson( - Map json) => - Mutation$StartService$startService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$StartService$startServiceToJson( - Mutation$StartService$startService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$RestartService _$Variables$Mutation$RestartServiceFromJson( - Map json) => - Variables$Mutation$RestartService( - serviceId: json['serviceId'] as String, - ); - -Map _$Variables$Mutation$RestartServiceToJson( - Variables$Mutation$RestartService instance) => - { - 'serviceId': instance.serviceId, - }; - -Mutation$RestartService _$Mutation$RestartServiceFromJson( - Map json) => - Mutation$RestartService( - restartService: Mutation$RestartService$restartService.fromJson( - json['restartService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RestartServiceToJson( - Mutation$RestartService instance) => - { - 'restartService': instance.restartService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RestartService$restartService - _$Mutation$RestartService$restartServiceFromJson( - Map json) => - Mutation$RestartService$restartService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RestartService$restartServiceToJson( - Mutation$RestartService$restartService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$MoveService _$Variables$Mutation$MoveServiceFromJson( - Map json) => - Variables$Mutation$MoveService( - input: Input$MoveServiceInput.fromJson( - json['input'] as Map), - ); - -Map _$Variables$Mutation$MoveServiceToJson( - Variables$Mutation$MoveService instance) => - { - 'input': instance.input.toJson(), - }; - -Mutation$MoveService _$Mutation$MoveServiceFromJson( - Map json) => - Mutation$MoveService( - moveService: Mutation$MoveService$moveService.fromJson( - json['moveService'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MoveServiceToJson( - Mutation$MoveService instance) => - { - 'moveService': instance.moveService.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$MoveService$moveService _$Mutation$MoveService$moveServiceFromJson( - Map json) => - Mutation$MoveService$moveService( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - job: json['job'] == null - ? null - : Mutation$MoveService$moveService$job.fromJson( - json['job'] as Map), - ); - -Map _$Mutation$MoveService$moveServiceToJson( - Mutation$MoveService$moveService instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'job': instance.job?.toJson(), - }; - -Mutation$MoveService$moveService$job - _$Mutation$MoveService$moveService$jobFromJson(Map json) => - Mutation$MoveService$moveService$job( - createdAt: dateTimeFromJson(json['createdAt']), - description: json['description'] as String, - error: json['error'] as String?, - finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), - name: json['name'] as String, - progress: json['progress'] as int?, - result: json['result'] as String?, - status: json['status'] as String, - statusText: json['statusText'] as String?, - uid: json['uid'] as String, - updatedAt: dateTimeFromJson(json['updatedAt']), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$MoveService$moveService$jobToJson( - Mutation$MoveService$moveService$job instance) => - { - 'createdAt': dateTimeToJson(instance.createdAt), - 'description': instance.description, - 'error': instance.error, - 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), - 'name': instance.name, - 'progress': instance.progress, - 'result': instance.result, - 'status': instance.status, - 'statusText': instance.statusText, - 'uid': instance.uid, - 'updatedAt': dateTimeToJson(instance.updatedAt), - '__typename': instance.$__typename, - }; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 3521ce2e..c2d0027f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'server_api.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart deleted file mode 100644 index 7fb93e4e..00000000 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart +++ /dev/null @@ -1,366 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'users.graphql.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( - Map json) => - Fragment$basicMutationReturnFields( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$basicMutationReturnFieldsToJson( - Fragment$basicMutationReturnFields instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => - Fragment$userFields( - username: json['username'] as String, - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], - unknownValue: Enum$UserType.$unknown), - sshKeys: - (json['sshKeys'] as List).map((e) => e as String).toList(), - $__typename: json['__typename'] as String, - ); - -Map _$Fragment$userFieldsToJson( - Fragment$userFields instance) => - { - 'username': instance.username, - 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, - 'sshKeys': instance.sshKeys, - '__typename': instance.$__typename, - }; - -const _$Enum$UserTypeEnumMap = { - Enum$UserType.NORMAL: 'NORMAL', - Enum$UserType.PRIMARY: 'PRIMARY', - Enum$UserType.ROOT: 'ROOT', - Enum$UserType.$unknown: r'$unknown', -}; - -Query$AllUsers _$Query$AllUsersFromJson(Map json) => - Query$AllUsers( - users: - Query$AllUsers$users.fromJson(json['users'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllUsersToJson(Query$AllUsers instance) => - { - 'users': instance.users.toJson(), - '__typename': instance.$__typename, - }; - -Query$AllUsers$users _$Query$AllUsers$usersFromJson( - Map json) => - Query$AllUsers$users( - allUsers: (json['allUsers'] as List) - .map((e) => Fragment$userFields.fromJson(e as Map)) - .toList(), - rootUser: json['rootUser'] == null - ? null - : Fragment$userFields.fromJson( - json['rootUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$AllUsers$usersToJson( - Query$AllUsers$users instance) => - { - 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), - 'rootUser': instance.rootUser?.toJson(), - '__typename': instance.$__typename, - }; - -Variables$Query$GetUser _$Variables$Query$GetUserFromJson( - Map json) => - Variables$Query$GetUser( - username: json['username'] as String, - ); - -Map _$Variables$Query$GetUserToJson( - Variables$Query$GetUser instance) => - { - 'username': instance.username, - }; - -Query$GetUser _$Query$GetUserFromJson(Map json) => - Query$GetUser( - users: - Query$GetUser$users.fromJson(json['users'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetUserToJson(Query$GetUser instance) => - { - 'users': instance.users.toJson(), - '__typename': instance.$__typename, - }; - -Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => - Query$GetUser$users( - getUser: json['getUser'] == null - ? null - : Fragment$userFields.fromJson( - json['getUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Query$GetUser$usersToJson( - Query$GetUser$users instance) => - { - 'getUser': instance.getUser?.toJson(), - '__typename': instance.$__typename, - }; - -Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson( - Map json) => - Variables$Mutation$CreateUser( - user: Input$UserMutationInput.fromJson( - json['user'] as Map), - ); - -Map _$Variables$Mutation$CreateUserToJson( - Variables$Mutation$CreateUser instance) => - { - 'user': instance.user.toJson(), - }; - -Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => - Mutation$CreateUser( - createUser: Mutation$CreateUser$createUser.fromJson( - json['createUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$CreateUserToJson( - Mutation$CreateUser instance) => - { - 'createUser': instance.createUser.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson( - Map json) => - Mutation$CreateUser$createUser( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$CreateUser$createUserToJson( - Mutation$CreateUser$createUser instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( - Map json) => - Variables$Mutation$DeleteUser( - username: json['username'] as String, - ); - -Map _$Variables$Mutation$DeleteUserToJson( - Variables$Mutation$DeleteUser instance) => - { - 'username': instance.username, - }; - -Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => - Mutation$DeleteUser( - deleteUser: Mutation$DeleteUser$deleteUser.fromJson( - json['deleteUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteUserToJson( - Mutation$DeleteUser instance) => - { - 'deleteUser': instance.deleteUser.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson( - Map json) => - Mutation$DeleteUser$deleteUser( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$DeleteUser$deleteUserToJson( - Mutation$DeleteUser$deleteUser instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - }; - -Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson( - Map json) => - Variables$Mutation$UpdateUser( - user: Input$UserMutationInput.fromJson( - json['user'] as Map), - ); - -Map _$Variables$Mutation$UpdateUserToJson( - Variables$Mutation$UpdateUser instance) => - { - 'user': instance.user.toJson(), - }; - -Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => - Mutation$UpdateUser( - updateUser: Mutation$UpdateUser$updateUser.fromJson( - json['updateUser'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$UpdateUserToJson( - Mutation$UpdateUser instance) => - { - 'updateUser': instance.updateUser.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson( - Map json) => - Mutation$UpdateUser$updateUser( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$UpdateUser$updateUserToJson( - Mutation$UpdateUser$updateUser instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( - Map json) => - Variables$Mutation$AddSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), - ); - -Map _$Variables$Mutation$AddSshKeyToJson( - Variables$Mutation$AddSshKey instance) => - { - 'sshInput': instance.sshInput.toJson(), - }; - -Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => - Mutation$AddSshKey( - addSshKey: Mutation$AddSshKey$addSshKey.fromJson( - json['addSshKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => - { - 'addSshKey': instance.addSshKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( - Map json) => - Mutation$AddSshKey$addSshKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$AddSshKey$addSshKeyToJson( - Mutation$AddSshKey$addSshKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; - -Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( - Map json) => - Variables$Mutation$RemoveSshKey( - sshInput: Input$SshMutationInput.fromJson( - json['sshInput'] as Map), - ); - -Map _$Variables$Mutation$RemoveSshKeyToJson( - Variables$Mutation$RemoveSshKey instance) => - { - 'sshInput': instance.sshInput.toJson(), - }; - -Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey( - removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( - json['removeSshKey'] as Map), - $__typename: json['__typename'] as String, - ); - -Map _$Mutation$RemoveSshKeyToJson( - Mutation$RemoveSshKey instance) => - { - 'removeSshKey': instance.removeSshKey.toJson(), - '__typename': instance.$__typename, - }; - -Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( - Map json) => - Mutation$RemoveSshKey$removeSshKey( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - user: json['user'] == null - ? null - : Fragment$userFields.fromJson(json['user'] as Map), - ); - -Map _$Mutation$RemoveSshKey$removeSshKeyToJson( - Mutation$RemoveSshKey$removeSshKey instance) => - { - 'code': instance.code, - 'message': instance.message, - 'success': instance.success, - '__typename': instance.$__typename, - 'user': instance.user?.toJson(), - }; diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index 32cd845c..5d609d65 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -69,38 +69,34 @@ class JobsContent extends StatelessWidget { ]; } else if (state is JobsStateWithJobs) { widgets = [ - ...state.clientJobList - .map( - (final j) => Row( - children: [ - Expanded( - child: BrandCards.small( - child: Text(j.title), - ), - ), - const SizedBox(width: 10), - ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: - Theme.of(context).colorScheme.errorContainer, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), - onPressed: () => - context.read().removeJob(j.id), - child: Text( - 'basis.remove'.tr(), - style: TextStyle( - color: - Theme.of(context).colorScheme.onErrorContainer, - ), - ), - ), - ], + ...state.clientJobList.map( + (final j) => Row( + children: [ + Expanded( + child: BrandCards.small( + child: Text(j.title), + ), ), - ) - .toList(), + const SizedBox(width: 10), + ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: + Theme.of(context).colorScheme.errorContainer, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + onPressed: () => context.read().removeJob(j.id), + child: Text( + 'basis.remove'.tr(), + style: TextStyle( + color: Theme.of(context).colorScheme.onErrorContainer, + ), + ), + ), + ], + ), + ), const SizedBox(height: 20), BrandButton.rised( onPressed: () => context.read().applyAll(), diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index 5264adb7..7f743f44 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; class ProgressBar extends StatefulWidget { diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index e3279b46..52fffdbe 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -27,7 +27,7 @@ class _DevicesScreenState extends State { return RefreshIndicator( onRefresh: () async { - context.read().refresh(); + await context.read().refresh(); }, child: BrandHeroScreen( heroTitle: 'devices.main_screen.header'.tr(), @@ -92,8 +92,7 @@ class _DevicesInfo extends StatelessWidget { ), ), ...devicesStatus.otherDevices - .map((final device) => _DeviceTile(device: device)) - .toList(), + .map((final device) => _DeviceTile(device: device)), ], ); } diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 4f52c482..61aace92 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -157,8 +157,7 @@ class _DnsDetailsPageState extends State { ), ], ), - ) - .toList(), + ), const SizedBox(height: 16.0), ListTile( title: Text( @@ -199,8 +198,7 @@ class _DnsDetailsPageState extends State { ), ], ), - ) - .toList(), + ), ], ); } diff --git a/lib/ui/pages/more/app_settings/app_settings.dart b/lib/ui/pages/more/app_settings/app_settings.dart index fc3ad75a..7c97f373 100644 --- a/lib/ui/pages/more/app_settings/app_settings.dart +++ b/lib/ui/pages/more/app_settings/app_settings.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; @@ -88,11 +90,13 @@ class _AppSettingsPageState extends State { text: 'modals.yes'.tr(), isRed: true, onPressed: () async { - showDialog( - context: context, - builder: (final context) => Container( - alignment: Alignment.center, - child: const CircularProgressIndicator(), + unawaited( + showDialog( + context: context, + builder: (final context) => Container( + alignment: Alignment.center, + child: const CircularProgressIndicator(), + ), ), ); await context diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index aca76bd1..85df0ffa 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -3,7 +3,6 @@ import 'dart:collection'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index ae153f64..e96d2f44 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -251,7 +251,7 @@ class _RecoveryKeyConfigurationState extends State { setState(() { _isLoading = false; }); - Navigator.of(context).push( + await Navigator.of(context).push( materialRoute( RecoveryKeyReceiving(recoveryKey: token), // TO DO ), diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index 5c3e4eb6..71471e4b 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -112,22 +112,20 @@ class _ServicesMigrationPageState extends State { ), child: Column( children: [ - ...widget.diskStatus.diskVolumes - .map( - (final volume) => Column( - children: [ - ServerStorageListItem( - volume: recalculatedDiskUsages( - volume, - widget.services, - ), - dense: true, - ), - const SizedBox(height: headerVerticalPadding), - ], + ...widget.diskStatus.diskVolumes.map( + (final volume) => Column( + children: [ + ServerStorageListItem( + volume: recalculatedDiskUsages( + volume, + widget.services, + ), + dense: true, ), - ) - .toList(), + const SizedBox(height: headerVerticalPadding), + ], + ), + ), ], ), ), @@ -140,23 +138,21 @@ class _ServicesMigrationPageState extends State { children: [ if (widget.services.isEmpty) const Center(child: CircularProgressIndicator()), - ...widget.services - .map( - (final service) => Column( - children: [ - const SizedBox(height: 8), - ServiceMigrationListItem( - service: service, - diskStatus: widget.diskStatus, - selectedVolume: serviceToDisk[service.id]!, - onChange: onChange, - ), - const SizedBox(height: 4), - const Divider(), - ], + ...widget.services.map( + (final service) => Column( + children: [ + const SizedBox(height: 8), + ServiceMigrationListItem( + service: service, + diskStatus: widget.diskStatus, + selectedVolume: serviceToDisk[service.id]!, + onChange: onChange, ), - ) - .toList(), + const SizedBox(height: 4), + const Divider(), + ], + ), + ), Padding( padding: const EdgeInsets.all(8.0), child: InfoBox( diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 81e0fc07..e3391070 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -46,28 +46,26 @@ class _ServerStoragePageState extends State { heroTitle: 'storage.card_title'.tr(), children: [ // ...sections, - ...widget.diskStatus.diskVolumes - .map( - (final volume) => Column( - mainAxisSize: MainAxisSize.min, - children: [ - ServerStorageSection( - volume: volume, - diskStatus: widget.diskStatus, - services: services - .where( - (final service) => - service.storageUsage.volume == volume.name, - ) - .toList(), - ), - const SizedBox(height: 16), - const Divider(), - const SizedBox(height: 16), - ], + ...widget.diskStatus.diskVolumes.map( + (final volume) => Column( + mainAxisSize: MainAxisSize.min, + children: [ + ServerStorageSection( + volume: volume, + diskStatus: widget.diskStatus, + services: services + .where( + (final service) => + service.storageUsage.volume == volume.name, + ) + .toList(), ), - ) - .toList(), + const SizedBox(height: 16), + const Divider(), + const SizedBox(height: 16), + ], + ), + ), const SizedBox(height: 8), ], ); @@ -94,14 +92,12 @@ class ServerStorageSection extends StatelessWidget { volume: volume, ), const SizedBox(height: 16), - ...services - .map( - (final service) => ServerConsumptionListTile( - service: service, - volume: volume, - ), - ) - .toList(), + ...services.map( + (final service) => ServerConsumptionListTile( + service: service, + volume: volume, + ), + ), if (volume.isResizable) ...[ const SizedBox(height: 16), BrandOutlinedButton( diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index e5320a35..99bb848e 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -1,5 +1,3 @@ -import 'dart:async'; - import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -46,7 +44,7 @@ class _ServicesPageState extends State { : null, body: RefreshIndicator( onRefresh: () async { - unawaited(context.read().reload()); + await context.read().reload(); }, child: ListView( padding: paddingH15V0, @@ -108,10 +106,8 @@ class _Card extends StatelessWidget { child: InkResponse( highlightShape: BoxShape.rectangle, onTap: isReady - ? () => unawaited( - context.pushRoute( - ServiceRoute(serviceId: service.id), - ), + ? () => context.pushRoute( + ServiceRoute(serviceId: service.id), ) : null, child: Padding( diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 5b598af0..27ca4f5a 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -1,5 +1,3 @@ -import 'dart:async'; - import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -407,8 +405,8 @@ class InitializingPage extends StatelessWidget { if (state is Loaded) ...[ const SizedBox(height: 32), BrandButton.filled( - onPressed: () => unawaited( - context.read().saveDomain()), + onPressed: () => + context.read().saveDomain(), text: 'initializing.save_domain'.tr(), ), ], @@ -666,7 +664,7 @@ class _ProgressDrawer extends StatelessWidget { isCurrent: index == cubit.state.progress.index, isCompleted: index < cubit.state.progress.index, ); - }).toList(), + }), ], ), ), diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 2ae93648..5ea1fcbb 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -2,7 +2,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/user/ssh_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; @@ -64,7 +63,7 @@ class UsersPage extends StatelessWidget { } return RefreshIndicator( onRefresh: () async { - context.read().refresh(); + await context.read().refresh(); }, child: Container( padding: const EdgeInsets.symmetric(horizontal: 15), @@ -90,7 +89,7 @@ class UsersPage extends StatelessWidget { } return RefreshIndicator( onRefresh: () async { - context.read().refresh(); + await context.read().refresh(); }, child: Column( children: [ From d242f5141ea386a49eeecd122344744bc2af73d7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 31 Mar 2023 17:17:22 +0300 Subject: [PATCH 452/732] refactor(ui): Remove brand alert dialogs and bottom sheet --- .../components/brand_alert/brand_alert.dart | 13 -- .../brand_bottom_sheet.dart | 55 -------- .../pre_styled_buttons/flash_fab.dart | 9 +- lib/ui/helpers/modals.dart | 20 +-- lib/ui/layouts/brand_hero_screen.dart | 9 +- .../pages/more/app_settings/app_settings.dart | 13 +- .../binds_migration/services_migration.dart | 9 +- .../recovery_confirm_backblaze.dart | 6 +- .../recovery_confirm_cloudflare.dart | 22 ++-- .../recovery_server_provider_connected.dart | 22 ++-- lib/ui/pages/users/reset_password.dart | 120 +++++++++--------- lib/ui/pages/users/user_details.dart | 116 +++++++++-------- lib/ui/pages/users/users.dart | 1 - 13 files changed, 150 insertions(+), 265 deletions(-) delete mode 100644 lib/ui/components/brand_alert/brand_alert.dart delete mode 100644 lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart diff --git a/lib/ui/components/brand_alert/brand_alert.dart b/lib/ui/components/brand_alert/brand_alert.dart deleted file mode 100644 index 352b091c..00000000 --- a/lib/ui/components/brand_alert/brand_alert.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; - -class BrandAlert extends AlertDialog { - BrandAlert({ - super.key, - final String? title, - final String? contentText, - super.actions, - }) : super( - title: title != null ? Text(title) : null, - content: title != null ? Text(contentText!) : null, - ); -} diff --git a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart deleted file mode 100644 index 420ba32b..00000000 --- a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/material.dart'; - -class BrandBottomSheet extends StatelessWidget { - const BrandBottomSheet({ - required this.child, - super.key, - this.isExpended = false, - }); - - final Widget child; - final bool isExpended; - - @override - Widget build(final BuildContext context) { - final double mainHeight = MediaQuery.of(context).size.height - - MediaQuery.of(context).padding.top - - 300; - late Widget innerWidget; - if (isExpended) { - innerWidget = Scaffold( - body: child, - ); - } else { - final ThemeData themeData = Theme.of(context); - - innerWidget = Material( - color: themeData.scaffoldBackgroundColor, - child: IntrinsicHeight(child: child), - ); - } - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - Center( - child: Container( - height: 4, - width: 30, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: const Color(0xFFDDDDDD), - ), - ), - ), - const SizedBox(height: 6), - ClipRRect( - borderRadius: const BorderRadius.vertical(top: Radius.circular(20)), - child: ConstrainedBox( - constraints: BoxConstraints(maxHeight: mainHeight), - child: innerWidget, - ), - ), - ], - ); - } -} diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/components/pre_styled_buttons/flash_fab.dart index e069bcec..2098f79e 100644 --- a/lib/ui/components/pre_styled_buttons/flash_fab.dart +++ b/lib/ui/components/pre_styled_buttons/flash_fab.dart @@ -3,9 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:ionicons/ionicons.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; class BrandFab extends StatefulWidget { const BrandFab({ @@ -62,12 +60,9 @@ class _BrandFabState extends State child: FloatingActionButton( onPressed: () { // TODO: Make a hero animation to the screen - showBrandBottomSheet( + showModalBottomSheet( context: context, - builder: (final BuildContext context) => const BrandBottomSheet( - isExpended: true, - child: JobsContent(), - ), + builder: (final BuildContext context) => const JobsContent(), ); }, isExtended: widget.extended, diff --git a/lib/ui/helpers/modals.dart b/lib/ui/helpers/modals.dart index 77ddf2cb..b744e323 100644 --- a/lib/ui/helpers/modals.dart +++ b/lib/ui/helpers/modals.dart @@ -1,21 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/ui/components/buttons/dialog_action_button.dart'; -import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; - -Future showBrandBottomSheet({ - required final BuildContext context, - required final WidgetBuilder builder, -}) => - showCupertinoModalBottomSheet( - builder: builder, - barrierColor: Colors.black45, - context: context, - shadow: const BoxShadow(color: Colors.transparent), - backgroundColor: Colors.transparent, - ); void showPopUpAlert({ required final String description, @@ -26,9 +12,9 @@ void showPopUpAlert({ final String? cancelButtonTitle, }) { getIt.get().showPopUpDialog( - BrandAlert( - title: alertTitle ?? 'basis.alert'.tr(), - contentText: description, + AlertDialog( + title: Text(alertTitle ?? 'basis.alert'.tr()), + content: Text(description), actions: [ DialogActionButton( text: actionButtonTitle, diff --git a/lib/ui/layouts/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart index 37b1f3ea..cc916b87 100644 --- a/lib/ui/layouts/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -2,9 +2,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:ionicons/ionicons.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/helpers/widget_size.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; @@ -127,13 +125,10 @@ class _HeroSliverAppBarState extends State { duration: const Duration(milliseconds: 300), child: IconButton( onPressed: () { - showBrandBottomSheet( + showModalBottomSheet( context: context, builder: (final BuildContext context) => - const BrandBottomSheet( - isExpended: true, - child: JobsContent(), - ), + const JobsContent(), ); }, icon: Icon( diff --git a/lib/ui/pages/more/app_settings/app_settings.dart b/lib/ui/pages/more/app_settings/app_settings.dart index 7c97f373..6ab69f40 100644 --- a/lib/ui/pages/more/app_settings/app_settings.dart +++ b/lib/ui/pages/more/app_settings/app_settings.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/dialog_action_button.dart'; -import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -82,9 +81,9 @@ class _AppSettingsPageState extends State { : () { showDialog( context: context, - builder: (final _) => BrandAlert( - title: 'modals.are_you_sure'.tr(), - contentText: 'modals.delete_server_volume'.tr(), + builder: (final _) => AlertDialog( + title: Text('modals.are_you_sure'.tr()), + content: Text('modals.delete_server_volume'.tr()), actions: [ DialogActionButton( text: 'modals.yes'.tr(), @@ -129,9 +128,9 @@ class _ResetAppTile extends StatelessWidget { onTap: () { showDialog( context: context, - builder: (final _) => BrandAlert( - title: 'modals.are_you_sure'.tr(), - contentText: 'modals.purge_all_keys'.tr(), + builder: (final _) => AlertDialog( + title: Text('modals.are_you_sure'.tr()), + content: Text('modals.purge_all_keys'.tr()), actions: [ DialogActionButton( text: 'modals.purge_all_keys_confirm'.tr(), diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index 71471e4b..ed03e896 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -5,7 +5,6 @@ import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; @@ -13,7 +12,6 @@ import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/ui/components/storage_list_items/service_migration_list_item.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; @@ -182,13 +180,10 @@ class _ServicesMigrationPageState extends State { materialRoute(const RootPage()), (final predicate) => false, ); - showBrandBottomSheet( + showModalBottomSheet( context: context, builder: (final BuildContext context) => - const BrandBottomSheet( - isExpended: true, - child: JobsContent(), - ), + const JobsContent(), ); }, ), diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index f758f5d2..dac2d7e1 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; @@ -62,9 +61,7 @@ class RecoveryConfirmBackblaze extends StatelessWidget { context: context, isScrollControlled: true, backgroundColor: Colors.transparent, - builder: (final BuildContext context) => BrandBottomSheet( - isExpended: true, - child: Padding( + builder: (final BuildContext context) => Padding( padding: paddingH15V0, child: ListView( padding: const EdgeInsets.symmetric(vertical: 16), @@ -73,7 +70,6 @@ class RecoveryConfirmBackblaze extends StatelessWidget { fileName: 'how_backblaze', ), ], - ), ), ), ), diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index e8969173..8ffc6dfa 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; @@ -54,18 +53,15 @@ class RecoveryConfirmCloudflare extends StatelessWidget { context: context, isScrollControlled: true, backgroundColor: Colors.transparent, - builder: (final BuildContext context) => BrandBottomSheet( - isExpended: true, - child: Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: const [ - BrandMarkdown( - fileName: 'how_cloudflare', - ), - ], - ), + builder: (final BuildContext context) => Padding( + padding: paddingH15V0, + child: ListView( + padding: const EdgeInsets.symmetric(vertical: 16), + children: const [ + BrandMarkdown( + fileName: 'how_cloudflare', + ), + ], ), ), ), diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index a892efc1..4cf4bdec 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -2,7 +2,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:cubit_form/cubit_form.dart'; @@ -57,18 +56,15 @@ class RecoveryServerProviderConnected extends StatelessWidget { context: context, isScrollControlled: true, backgroundColor: Colors.transparent, - builder: (final BuildContext context) => BrandBottomSheet( - isExpended: true, - child: Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: const [ - BrandMarkdown( - fileName: 'how_hetzner', - ), - ], - ), + builder: (final BuildContext context) => Padding( + padding: paddingH15V0, + child: ListView( + padding: const EdgeInsets.symmetric(vertical: 16), + children: const [ + BrandMarkdown( + fileName: 'how_hetzner', + ), + ], ), ), ), diff --git a/lib/ui/pages/users/reset_password.dart b/lib/ui/pages/users/reset_password.dart index 87f95902..56670803 100644 --- a/lib/ui/pages/users/reset_password.dart +++ b/lib/ui/pages/users/reset_password.dart @@ -9,76 +9,74 @@ class ResetPassword extends StatelessWidget { final User user; @override - Widget build(final BuildContext context) => BrandBottomSheet( - child: BlocProvider( - create: (final BuildContext context) => UserFormCubit( - jobsCubit: context.read(), - fieldFactory: FieldCubitFactory(context), - initialUser: user, - ), - child: Builder( - builder: (final BuildContext context) { - final FormCubitState formCubitState = - context.watch().state; + Widget build(final BuildContext context) => BlocProvider( + create: (final BuildContext context) => UserFormCubit( + jobsCubit: context.read(), + fieldFactory: FieldCubitFactory(context), + initialUser: user, + ), + child: Builder( + builder: (final BuildContext context) { + final FormCubitState formCubitState = + context.watch().state; - return BlocListener( - listener: - (final BuildContext context, final FormCubitState state) { - if (state.isSubmitted) { - Navigator.pop(context); - } - }, + return BlocListener( + listener: + (final BuildContext context, final FormCubitState state) { + if (state.isSubmitted) { + Navigator.pop(context); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + BrandHeader( + title: 'users.reset_password'.tr(), + ), + const SizedBox(width: 14), + Padding( + padding: paddingH15V0, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - BrandHeader( - title: 'users.reset_password'.tr(), - ), - const SizedBox(width: 14), - Padding( - padding: paddingH15V0, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - CubitFormTextField( - formFieldCubit: - context.read().password, - decoration: InputDecoration( - alignLabelWithHint: false, - labelText: 'basis.password'.tr(), - suffixIcon: Padding( - padding: const EdgeInsets.only(right: 8), - child: IconButton( - icon: Icon( - BrandIcons.refresh, - color: - Theme.of(context).colorScheme.secondary, - ), - onPressed: context - .read() - .genNewPassword, - ), - ), + CubitFormTextField( + formFieldCubit: + context.read().password, + decoration: InputDecoration( + alignLabelWithHint: false, + labelText: 'basis.password'.tr(), + suffixIcon: Padding( + padding: const EdgeInsets.only(right: 8), + child: IconButton( + icon: Icon( + BrandIcons.refresh, + color: + Theme.of(context).colorScheme.secondary, ), + onPressed: context + .read() + .genNewPassword, ), - const SizedBox(height: 30), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => - context.read().trySubmit(), - text: 'basis.apply'.tr(), - ), - const SizedBox(height: 30), - ], + ), ), ), + const SizedBox(height: 30), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => + context.read().trySubmit(), + text: 'basis.apply'.tr(), + ), + const SizedBox(height: 30), ], ), - ); - }, + ), + ], ), - ), - ); + ); + }, + ), + ); } diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 38743878..c6ef2a8c 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -254,72 +254,70 @@ class NewSshKey extends StatelessWidget { final User user; @override - Widget build(final BuildContext context) => BrandBottomSheet( - child: BlocProvider( - create: (final context) { - final jobCubit = context.read(); - final jobState = jobCubit.state; - if (jobState is JobsStateWithJobs) { - final jobs = jobState.clientJobList; - for (final job in jobs) { - if (job is CreateSSHKeyJob && job.user.login == user.login) { - user.sshKeys.add(job.publicKey); - } - } - } - return SshFormCubit( - jobsCubit: jobCubit, - user: user, - ); - }, - child: Builder( - builder: (final context) { - final formCubitState = context.watch().state; + Widget build(final BuildContext context) => BlocProvider( + create: (final context) { + final jobCubit = context.read(); + final jobState = jobCubit.state; + if (jobState is JobsStateWithJobs) { + final jobs = jobState.clientJobList; + for (final job in jobs) { + if (job is CreateSSHKeyJob && job.user.login == user.login) { + user.sshKeys.add(job.publicKey); + } + } + } + return SshFormCubit( + jobsCubit: jobCubit, + user: user, + ); + }, + child: Builder( + builder: (final context) { + final formCubitState = context.watch().state; - return BlocListener( - listener: (final context, final state) { - if (state.isSubmitted) { - Navigator.pop(context); - } - }, + return BlocListener( + listener: (final context, final state) { + if (state.isSubmitted) { + Navigator.pop(context); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + BrandHeader( + title: user.login, + ), + const SizedBox(width: 14), + Padding( + padding: paddingH15V0, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - BrandHeader( - title: user.login, - ), - const SizedBox(width: 14), - Padding( - padding: paddingH15V0, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - IntrinsicHeight( - child: CubitFormTextField( - formFieldCubit: context.read().key, - decoration: InputDecoration( - labelText: 'ssh.input_label'.tr(), - ), - ), - ), - const SizedBox(height: 30), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => - context.read().trySubmit(), - text: 'ssh.create'.tr(), - ), - const SizedBox(height: 30), - ], + IntrinsicHeight( + child: CubitFormTextField( + formFieldCubit: context.read().key, + decoration: InputDecoration( + labelText: 'ssh.input_label'.tr(), + ), ), ), + const SizedBox(height: 30), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => + context.read().trySubmit(), + text: 'ssh.create'.tr(), + ), + const SizedBox(height: 30), ], ), - ); - }, + ), + ], ), - ), - ); + ); + }, + ), + ); } diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 5ea1fcbb..fdba2cb5 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -11,7 +11,6 @@ import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; From a9d7a27e9d7e64bc355e9c9ee3759df32cb10c56 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Apr 2023 17:31:35 +0300 Subject: [PATCH 453/732] refactor(ui): Update recovery flow to use new support drawer --- .../components/drawers/progress_drawer.dart | 113 ++++++++++++ .../support_drawer.dart | 0 lib/ui/layouts/brand_hero_screen.dart | 24 ++- .../root_scaffold_with_navigation.dart | 2 +- .../binds_migration/services_migration.dart | 3 +- .../setup/initializing/initializing.dart | 172 ++++-------------- .../recovering/recover_by_new_device_key.dart | 2 + .../recovering/recover_by_old_token.dart | 2 + .../recovering/recover_by_recovery_key.dart | 1 + .../recovery_confirm_backblaze.dart | 28 +-- .../recovery_confirm_cloudflare.dart | 30 ++- .../recovering/recovery_confirm_server.dart | 1 + .../recovering/recovery_method_select.dart | 2 + .../setup/recovering/recovery_routing.dart | 1 + .../recovery_server_provider_connected.dart | 30 ++- lib/ui/pages/users/reset_password.dart | 125 +++++++------ lib/ui/pages/users/user_details.dart | 121 ++++++------ 17 files changed, 335 insertions(+), 322 deletions(-) create mode 100644 lib/ui/components/drawers/progress_drawer.dart rename lib/ui/components/{support_drawer => drawers}/support_drawer.dart (100%) diff --git a/lib/ui/components/drawers/progress_drawer.dart b/lib/ui/components/drawers/progress_drawer.dart new file mode 100644 index 00000000..d886da02 --- /dev/null +++ b/lib/ui/components/drawers/progress_drawer.dart @@ -0,0 +1,113 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +class ProgressDrawer extends StatelessWidget { + /// A [Drawer] that displays a list of steps and the current step. + /// Used in setup wizards. The [trailing] widget is displayed at the bottom. + /// The [steps] are translated using [EasyLocalization]. + const ProgressDrawer({ + required this.steps, + required this.currentStep, + required this.constraints, + required this.trailing, + required this.title, + super.key, + }); + + final List steps; + final int currentStep; + final Widget trailing; + final BoxConstraints constraints; + final String title; + + @override + Widget build(final BuildContext context) => SizedBox( + width: 300, + height: constraints.maxHeight, + child: Drawer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(16.0), + child: Text( + title, + style: Theme.of(context).textTheme.titleLarge, + ), + ), + Flexible( + fit: FlexFit.tight, + child: SingleChildScrollView( + child: Column( + children: [ + ...steps.map((final step) { + final index = steps.indexOf(step); + return _StepIndicator( + title: step.tr(), + isCurrent: index == currentStep, + isCompleted: index < currentStep, + ); + }), + ], + ), + ), + ), + // const Spacer(), + Padding( + padding: const EdgeInsets.all(16.0), + child: trailing, + ), + ], + ), + ), + ); +} + +class _StepIndicator extends StatelessWidget { + const _StepIndicator({ + required this.title, + required this.isCompleted, + required this.isCurrent, + }); + + final String title; + final bool isCompleted; + final bool isCurrent; + + @override + Widget build(final BuildContext context) => ListTile( + selected: isCurrent, + leading: isCurrent + ? const _StepCurrentIcon() + : isCompleted + ? const _StepCompletedIcon() + : const _StepPendingIcon(), + title: Text( + title, + ), + textColor: Theme.of(context).colorScheme.onSurfaceVariant, + iconColor: Theme.of(context).colorScheme.onSurfaceVariant, + ); +} + +class _StepCompletedIcon extends StatelessWidget { + const _StepCompletedIcon(); + + @override + Widget build(final BuildContext context) => const Icon(Icons.check_circle); +} + +class _StepPendingIcon extends StatelessWidget { + const _StepPendingIcon(); + + @override + Widget build(final BuildContext context) => const Icon(Icons.circle_outlined); +} + +class _StepCurrentIcon extends StatelessWidget { + const _StepCurrentIcon(); + + @override + Widget build(final BuildContext context) => + const Icon(Icons.build_circle_outlined); +} diff --git a/lib/ui/components/support_drawer/support_drawer.dart b/lib/ui/components/drawers/support_drawer.dart similarity index 100% rename from lib/ui/components/support_drawer/support_drawer.dart rename to lib/ui/components/drawers/support_drawer.dart diff --git a/lib/ui/layouts/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart index cc916b87..adb94902 100644 --- a/lib/ui/layouts/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:ionicons/ionicons.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; +import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/helpers/widget_size.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; @@ -18,6 +19,8 @@ class BrandHeroScreen extends StatelessWidget { this.heroSubtitle, this.onBackButtonPressed, this.bodyPadding = const EdgeInsets.all(16.0), + this.ignoreBreakpoints = false, + this.hasSupportDrawer = false, }); final List children; @@ -30,6 +33,15 @@ class BrandHeroScreen extends StatelessWidget { final VoidCallback? onBackButtonPressed; final EdgeInsetsGeometry bodyPadding; + /// On non-mobile screens the buttons of the app bar are hidden. + /// This is because this widget implies that it is nested inside a bigger layout. + /// If it is not nested, set this to true. + final bool ignoreBreakpoints; + + /// Usually support drawer is provided by the parent layout. + /// If it is not provided, set this to true. + final bool hasSupportDrawer; + @override Widget build(final BuildContext context) { final Widget heroIconWidget = this.heroIconWidget ?? @@ -41,6 +53,8 @@ class BrandHeroScreen extends StatelessWidget { final bool hasHeroIcon = heroIcon != null || this.heroIconWidget != null; return Scaffold( + endDrawerEnableOpenDragGesture: false, + endDrawer: hasSupportDrawer ? const SupportDrawer() : null, body: CustomScrollView( slivers: [ HeroSliverAppBar( @@ -50,6 +64,7 @@ class BrandHeroScreen extends StatelessWidget { onBackButtonPressed: onBackButtonPressed, heroIconWidget: heroIconWidget, hasFlashButton: hasFlashButton, + ignoreBreakpoints: ignoreBreakpoints, ), if (heroSubtitle != null) SliverPadding( @@ -89,6 +104,7 @@ class HeroSliverAppBar extends StatefulWidget { required this.onBackButtonPressed, required this.heroIconWidget, required this.hasFlashButton, + required this.ignoreBreakpoints, super.key, }); @@ -98,6 +114,7 @@ class HeroSliverAppBar extends StatefulWidget { final bool hasFlashButton; final VoidCallback? onBackButtonPressed; final Widget heroIconWidget; + final bool ignoreBreakpoints; @override State createState() => _HeroSliverAppBarState(); @@ -107,7 +124,8 @@ class _HeroSliverAppBarState extends State { Size _size = Size.zero; @override Widget build(final BuildContext context) { - final isMobile = Breakpoints.small.isActive(context); + final isMobile = + widget.ignoreBreakpoints ? true : Breakpoints.small.isActive(context); final isJobsListEmpty = context.watch().state is JobsStateEmpty; return SliverAppBar( expandedHeight: @@ -127,8 +145,7 @@ class _HeroSliverAppBarState extends State { onPressed: () { showModalBottomSheet( context: context, - builder: (final BuildContext context) => - const JobsContent(), + builder: (final BuildContext context) => const JobsContent(), ); }, icon: Icon( @@ -139,6 +156,7 @@ class _HeroSliverAppBarState extends State { : Theme.of(context).colorScheme.primary, ), ), + const SizedBox.shrink(), ], flexibleSpace: FlexibleSpaceBar( title: LayoutBuilder( diff --git a/lib/ui/layouts/root_scaffold_with_navigation.dart b/lib/ui/layouts/root_scaffold_with_navigation.dart index 8fd3d7a7..fcc58515 100644 --- a/lib/ui/layouts/root_scaffold_with_navigation.dart +++ b/lib/ui/layouts/root_scaffold_with_navigation.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; -import 'package:selfprivacy/ui/components/support_drawer/support_drawer.dart'; +import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/router/root_destinations.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index ed03e896..d747cafa 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -182,8 +182,7 @@ class _ServicesMigrationPageState extends State { ); showModalBottomSheet( context: context, - builder: (final BuildContext context) => - const JobsContent(), + builder: (final BuildContext context) => const JobsContent(), ); }, ), diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 27ca4f5a..199203c3 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -13,8 +13,9 @@ import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; +import 'package:selfprivacy/ui/components/drawers/progress_drawer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; -import 'package:selfprivacy/ui/components/support_drawer/support_drawer.dart'; +import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_type_picker.dart'; @@ -113,10 +114,42 @@ class InitializingPage extends StatelessWidget { builder: (final context, final constraints) => Row( children: [ if (Breakpoints.large.isActive(context)) - _ProgressDrawer( + ProgressDrawer( steps: steps, - cubit: cubit, + currentStep: cubit.state.progress.index, + title: 'more_page.configuration_wizard'.tr(), constraints: constraints, + trailing: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (cubit.state is ServerInstallationEmpty || + cubit.state is ServerInstallationNotFinished) + Container( + alignment: Alignment.center, + child: BrandButton.filled( + text: 'basis.connect_to_existing'.tr(), + onPressed: () { + context.router.replace(const RecoveryRoute()); + }, + ), + ), + ConstrainedBox( + constraints: const BoxConstraints( + minWidth: double.infinity, + ), + child: OutlinedButton( + child: Text( + cubit.state is ServerInstallationFinished + ? 'basis.close'.tr() + : 'basis.later'.tr(), + ), + onPressed: () { + context.router.popUntilRoot(); + }, + ), + ), + ], + ), ), SizedBox( width: constraints.maxWidth - @@ -625,136 +658,3 @@ class InitializingPage extends StatelessWidget { ); } } - -class _ProgressDrawer extends StatelessWidget { - const _ProgressDrawer({ - required this.steps, - required this.cubit, - required this.constraints, - }); - - final List steps; - final ServerInstallationCubit cubit; - final BoxConstraints constraints; - - @override - Widget build(final BuildContext context) => SizedBox( - width: 300, - height: constraints.maxHeight, - child: Drawer( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(16.0), - child: Text( - 'more_page.configuration_wizard'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - ), - Flexible( - fit: FlexFit.tight, - child: SingleChildScrollView( - child: Column( - children: [ - ...steps.map((final step) { - final index = steps.indexOf(step); - return _StepIndicator( - title: step.tr(), - isCurrent: index == cubit.state.progress.index, - isCompleted: index < cubit.state.progress.index, - ); - }), - ], - ), - ), - ), - // const Spacer(), - Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (cubit.state is ServerInstallationEmpty || - cubit.state is ServerInstallationNotFinished) - Container( - alignment: Alignment.center, - child: BrandButton.filled( - text: 'basis.connect_to_existing'.tr(), - onPressed: () { - context.router.replace(const RecoveryRoute()); - }, - ), - ), - ConstrainedBox( - constraints: const BoxConstraints( - minWidth: double.infinity, - ), - child: OutlinedButton( - child: Text( - cubit.state is ServerInstallationFinished - ? 'basis.close'.tr() - : 'basis.later'.tr(), - ), - onPressed: () { - context.router.popUntilRoot(); - }, - ), - ), - ], - ), - ), - ], - ), - ), - ); -} - -class _StepIndicator extends StatelessWidget { - const _StepIndicator({ - required this.title, - required this.isCompleted, - required this.isCurrent, - }); - - final String title; - final bool isCompleted; - final bool isCurrent; - - @override - Widget build(final BuildContext context) => ListTile( - selected: isCurrent, - leading: isCurrent - ? const _StepCurrentIcon() - : isCompleted - ? const _StepCompletedIcon() - : const _StepPendingIcon(), - title: Text( - title, - ), - textColor: Theme.of(context).colorScheme.onSurfaceVariant, - iconColor: Theme.of(context).colorScheme.onSurfaceVariant, - ); -} - -class _StepCompletedIcon extends StatelessWidget { - const _StepCompletedIcon(); - - @override - Widget build(final BuildContext context) => const Icon(Icons.check_circle); -} - -class _StepPendingIcon extends StatelessWidget { - const _StepPendingIcon(); - - @override - Widget build(final BuildContext context) => const Icon(Icons.circle_outlined); -} - -class _StepCurrentIcon extends StatelessWidget { - const _StepCurrentIcon(); - - @override - Widget build(final BuildContext context) => - const Icon(Icons.build_circle_outlined); -} diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index ea264749..4f6cf352 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -17,6 +17,7 @@ class RecoverByNewDeviceKeyInstruction extends StatelessWidget { heroSubtitle: 'recovering.method_device_description'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, onBackButtonPressed: context.read().revertRecoveryStep, children: [ @@ -61,6 +62,7 @@ class RecoverByNewDeviceKeyInput extends StatelessWidget { heroSubtitle: 'recovering.method_device_input_description'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, children: [ CubitFormTextField( formFieldCubit: diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index d08e6bf7..42d60f34 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -28,6 +28,7 @@ class RecoverByOldTokenInstruction extends StatelessWidget { heroTitle: 'recovering.recovery_main_header'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, onBackButtonPressed: context.read().revertRecoveryStep, children: [ @@ -72,6 +73,7 @@ class RecoverByOldToken extends StatelessWidget { heroSubtitle: 'recovering.method_device_input_description'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, children: [ CubitFormTextField( formFieldCubit: diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index 859a6eca..b39dc2da 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -31,6 +31,7 @@ class RecoverByRecoveryKey extends StatelessWidget { heroSubtitle: 'recovering.method_recovery_input_description'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, onBackButtonPressed: context.read().revertRecoveryStep, children: [ diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index dac2d7e1..f7216a74 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -1,12 +1,11 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmBackblaze extends StatelessWidget { const RecoveryConfirmBackblaze({super.key}); @@ -27,6 +26,8 @@ class RecoveryConfirmBackblaze extends StatelessWidget { heroTitle: 'recovering.confirm_backblaze'.tr(), heroSubtitle: 'recovering.confirm_backblaze_description'.tr(), hasBackButton: true, + ignoreBreakpoints: true, + hasSupportDrawer: true, onBackButtonPressed: () { Navigator.of(context).popUntil((final route) => route.isFirst); }, @@ -56,24 +57,15 @@ class RecoveryConfirmBackblaze extends StatelessWidget { text: 'basis.connect'.tr(), ), const SizedBox(height: 16), - BrandButton.text( - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: const [ - BrandMarkdown( - fileName: 'how_backblaze', + Builder( + builder: (final context) => BrandButton.text( + onPressed: () => + context.read().showArticle( + article: 'how_backblaze', + context: context, ), - ], - ), - ), + title: 'initializing.how'.tr(), ), - title: 'initializing.how'.tr(), ), ], ); diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index 8ffc6dfa..93c889a5 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -1,12 +1,11 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmCloudflare extends StatelessWidget { const RecoveryConfirmCloudflare({super.key}); @@ -30,6 +29,8 @@ class RecoveryConfirmCloudflare extends StatelessWidget { ), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, + hasSupportDrawer: true, onBackButtonPressed: context.read().revertRecoveryStep, children: [ @@ -48,24 +49,15 @@ class RecoveryConfirmCloudflare extends StatelessWidget { text: 'basis.connect'.tr(), ), const SizedBox(height: 16), - BrandButton.text( - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: const [ - BrandMarkdown( - fileName: 'how_cloudflare', - ), - ], - ), - ), + Builder( + builder: (final context) => BrandButton.text( + onPressed: () => + context.read().showArticle( + article: 'how_cloudflare', + context: context, + ), + title: 'initializing.how'.tr(), ), - title: 'initializing.how'.tr(), ), ], ); diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 9ad22ebc..1c75ad75 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -38,6 +38,7 @@ class _RecoveryConfirmServerState extends State { ? 'recovering.choose_server_description'.tr() : 'recovering.confirm_server_description'.tr(), hasBackButton: true, + ignoreBreakpoints: true, onBackButtonPressed: () { Navigator.of(context).popUntil((final route) => route.isFirst); }, diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index 72f557d3..8713685d 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -17,6 +17,7 @@ class RecoveryMethodSelect extends StatelessWidget { heroSubtitle: 'recovering.method_select_description'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, onBackButtonPressed: context.read().revertRecoveryStep, children: [ @@ -74,6 +75,7 @@ class RecoveryFallbackMethodSelect extends StatelessWidget { heroSubtitle: 'recovering.fallback_select_description'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, children: [ OutlinedCard( child: ListTile( diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 193e3292..14c3f9a7 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -112,6 +112,7 @@ class SelectDomainToRecover extends StatelessWidget { heroSubtitle: 'recovering.domain_recovery_description'.tr(), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, onBackButtonPressed: () { Navigator.of(context).pushAndRemoveUntil( materialRoute(const RootPage()), diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 4cf4bdec..91999fb9 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -1,12 +1,11 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryServerProviderConnected extends StatelessWidget { const RecoveryServerProviderConnected({super.key}); @@ -30,6 +29,8 @@ class RecoveryServerProviderConnected extends StatelessWidget { ), hasBackButton: true, hasFlashButton: false, + ignoreBreakpoints: true, + hasSupportDrawer: true, onBackButtonPressed: () { Navigator.of(context).popUntil((final route) => route.isFirst); }, @@ -50,23 +51,14 @@ class RecoveryServerProviderConnected extends StatelessWidget { child: Text('basis.continue'.tr()), ), const SizedBox(height: 16), - BrandButton.text( - title: 'initializing.how'.tr(), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: const [ - BrandMarkdown( - fileName: 'how_hetzner', - ), - ], - ), - ), + Builder( + builder: (final context) => BrandButton.text( + title: 'initializing.how'.tr(), + onPressed: () => + context.read().showArticle( + article: 'how_hetzner', + context: context, + ), ), ), ], diff --git a/lib/ui/pages/users/reset_password.dart b/lib/ui/pages/users/reset_password.dart index 56670803..64785d3a 100644 --- a/lib/ui/pages/users/reset_password.dart +++ b/lib/ui/pages/users/reset_password.dart @@ -10,73 +10,72 @@ class ResetPassword extends StatelessWidget { @override Widget build(final BuildContext context) => BlocProvider( - create: (final BuildContext context) => UserFormCubit( - jobsCubit: context.read(), - fieldFactory: FieldCubitFactory(context), - initialUser: user, - ), - child: Builder( - builder: (final BuildContext context) { - final FormCubitState formCubitState = - context.watch().state; + create: (final BuildContext context) => UserFormCubit( + jobsCubit: context.read(), + fieldFactory: FieldCubitFactory(context), + initialUser: user, + ), + child: Builder( + builder: (final BuildContext context) { + final FormCubitState formCubitState = + context.watch().state; - return BlocListener( - listener: - (final BuildContext context, final FormCubitState state) { - if (state.isSubmitted) { - Navigator.pop(context); - } - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - BrandHeader( - title: 'users.reset_password'.tr(), - ), - const SizedBox(width: 14), - Padding( - padding: paddingH15V0, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - CubitFormTextField( - formFieldCubit: - context.read().password, - decoration: InputDecoration( - alignLabelWithHint: false, - labelText: 'basis.password'.tr(), - suffixIcon: Padding( - padding: const EdgeInsets.only(right: 8), - child: IconButton( - icon: Icon( - BrandIcons.refresh, - color: - Theme.of(context).colorScheme.secondary, + return BlocListener( + listener: + (final BuildContext context, final FormCubitState state) { + if (state.isSubmitted) { + Navigator.pop(context); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + BrandHeader( + title: 'users.reset_password'.tr(), + ), + const SizedBox(width: 14), + Padding( + padding: paddingH15V0, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + CubitFormTextField( + formFieldCubit: + context.read().password, + decoration: InputDecoration( + alignLabelWithHint: false, + labelText: 'basis.password'.tr(), + suffixIcon: Padding( + padding: const EdgeInsets.only(right: 8), + child: IconButton( + icon: Icon( + BrandIcons.refresh, + color: + Theme.of(context).colorScheme.secondary, + ), + onPressed: context + .read() + .genNewPassword, + ), ), - onPressed: context - .read() - .genNewPassword, ), ), - ), + const SizedBox(height: 30), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => context.read().trySubmit(), + text: 'basis.apply'.tr(), + ), + const SizedBox(height: 30), + ], ), - const SizedBox(height: 30), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => - context.read().trySubmit(), - text: 'basis.apply'.tr(), - ), - const SizedBox(height: 30), - ], - ), + ), + ], ), - ], - ), - ); - }, - ), - ); + ); + }, + ), + ); } diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index c6ef2a8c..be7205fb 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -255,69 +255,68 @@ class NewSshKey extends StatelessWidget { @override Widget build(final BuildContext context) => BlocProvider( - create: (final context) { - final jobCubit = context.read(); - final jobState = jobCubit.state; - if (jobState is JobsStateWithJobs) { - final jobs = jobState.clientJobList; - for (final job in jobs) { - if (job is CreateSSHKeyJob && job.user.login == user.login) { - user.sshKeys.add(job.publicKey); - } - } - } - return SshFormCubit( - jobsCubit: jobCubit, - user: user, - ); - }, - child: Builder( - builder: (final context) { - final formCubitState = context.watch().state; - - return BlocListener( - listener: (final context, final state) { - if (state.isSubmitted) { - Navigator.pop(context); + create: (final context) { + final jobCubit = context.read(); + final jobState = jobCubit.state; + if (jobState is JobsStateWithJobs) { + final jobs = jobState.clientJobList; + for (final job in jobs) { + if (job is CreateSSHKeyJob && job.user.login == user.login) { + user.sshKeys.add(job.publicKey); + } } - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - BrandHeader( - title: user.login, - ), - const SizedBox(width: 14), - Padding( - padding: paddingH15V0, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - IntrinsicHeight( - child: CubitFormTextField( - formFieldCubit: context.read().key, - decoration: InputDecoration( - labelText: 'ssh.input_label'.tr(), + } + return SshFormCubit( + jobsCubit: jobCubit, + user: user, + ); + }, + child: Builder( + builder: (final context) { + final formCubitState = context.watch().state; + + return BlocListener( + listener: (final context, final state) { + if (state.isSubmitted) { + Navigator.pop(context); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + BrandHeader( + title: user.login, + ), + const SizedBox(width: 14), + Padding( + padding: paddingH15V0, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + IntrinsicHeight( + child: CubitFormTextField( + formFieldCubit: context.read().key, + decoration: InputDecoration( + labelText: 'ssh.input_label'.tr(), + ), + ), ), - ), + const SizedBox(height: 30), + BrandButton.rised( + onPressed: formCubitState.isSubmitting + ? null + : () => context.read().trySubmit(), + text: 'ssh.create'.tr(), + ), + const SizedBox(height: 30), + ], ), - const SizedBox(height: 30), - BrandButton.rised( - onPressed: formCubitState.isSubmitting - ? null - : () => - context.read().trySubmit(), - text: 'ssh.create'.tr(), - ), - const SizedBox(height: 30), - ], - ), + ), + ], ), - ], - ), - ); - }, - ), - ); + ); + }, + ), + ); } From 4fde8160239640feb0393e98beb6499332c60557 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Apr 2023 17:40:29 +0300 Subject: [PATCH 454/732] refactor(ui): Remove unused components --- .../components/brand_switch/brand_switch.dart | 19 ------ .../brand_tab_bar/brand_tab_bar.dart | 60 ------------------- lib/ui/components/error/error.dart | 26 -------- 3 files changed, 105 deletions(-) delete mode 100644 lib/ui/components/brand_switch/brand_switch.dart delete mode 100644 lib/ui/components/brand_tab_bar/brand_tab_bar.dart delete mode 100644 lib/ui/components/error/error.dart diff --git a/lib/ui/components/brand_switch/brand_switch.dart b/lib/ui/components/brand_switch/brand_switch.dart deleted file mode 100644 index 4ded47dd..00000000 --- a/lib/ui/components/brand_switch/brand_switch.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:flutter/material.dart'; - -class BrandSwitch extends StatelessWidget { - const BrandSwitch({ - required this.onChanged, - required this.value, - super.key, - }); - - final ValueChanged onChanged; - final bool value; - - @override - Widget build(final BuildContext context) => Switch( - activeColor: Theme.of(context).colorScheme.primary, - value: value, - onChanged: onChanged, - ); -} diff --git a/lib/ui/components/brand_tab_bar/brand_tab_bar.dart b/lib/ui/components/brand_tab_bar/brand_tab_bar.dart deleted file mode 100644 index 8362bedb..00000000 --- a/lib/ui/components/brand_tab_bar/brand_tab_bar.dart +++ /dev/null @@ -1,60 +0,0 @@ -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; - -class BrandTabBar extends StatefulWidget { - const BrandTabBar({super.key, this.controller}); - - final TabController? controller; - @override - State createState() => _BrandTabBarState(); -} - -class _BrandTabBarState extends State { - int? currentIndex; - @override - void initState() { - currentIndex = widget.controller!.index; - widget.controller!.addListener(_listener); - super.initState(); - } - - void _listener() { - if (currentIndex != widget.controller!.index) { - setState(() { - currentIndex = widget.controller!.index; - }); - } - } - - @override - void dispose() { - widget.controller ?? widget.controller!.removeListener(_listener); - super.dispose(); - } - - @override - Widget build(final BuildContext context) => NavigationBar( - destinations: [ - _getIconButton('basis.providers'.tr(), BrandIcons.server, 0), - _getIconButton('basis.services'.tr(), BrandIcons.box, 1), - _getIconButton('basis.users'.tr(), BrandIcons.users, 2), - _getIconButton('basis.more'.tr(), Icons.menu_rounded, 3), - ], - onDestinationSelected: (final index) { - widget.controller!.animateTo(index); - }, - selectedIndex: currentIndex ?? 0, - labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected, - ); - - NavigationDestination _getIconButton( - final String label, - final IconData iconData, - final int index, - ) => - NavigationDestination( - icon: Icon(iconData), - label: label, - ); -} diff --git a/lib/ui/components/error/error.dart b/lib/ui/components/error/error.dart deleted file mode 100644 index 402ce512..00000000 --- a/lib/ui/components/error/error.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter/material.dart'; - -class BrandError extends StatelessWidget { - const BrandError({super.key, this.error, this.stackTrace}); - - final Object? error; - final StackTrace? stackTrace; - - @override - Widget build(final BuildContext context) => SafeArea( - child: Scaffold( - body: Center( - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text(error.toString()), - const Text('stackTrace: '), - Text(stackTrace.toString()), - ], - ), - ), - ), - ), - ); -} From 466a221dd09fc93eb8ffb5c02d1b1b561a528398 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 4 Apr 2023 19:06:14 +0300 Subject: [PATCH 455/732] refactor(ui): More compact view of console.dart --- assets/translations/en.json | 3 +- lib/logic/api_maps/graphql_maps/api_map.dart | 16 +- lib/logic/api_maps/rest_maps/api_map.dart | 16 +- lib/logic/models/message.dart | 62 +++- .../components/list_tiles/log_list_tile.dart | 292 ++++++++++++++++++ lib/ui/pages/more/console.dart | 58 ++-- 6 files changed, 396 insertions(+), 51 deletions(-) create mode 100644 lib/ui/components/list_tiles/log_list_tile.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index a6a2f05c..0d825bff 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -47,7 +47,8 @@ }, "console_page": { "title": "Console", - "waiting": "Waiting for initialization…" + "waiting": "Waiting for initialization…", + "copy": "Copy" }, "about_us_page": { "title": "About us" diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index 02b9bc04..a633866e 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -20,7 +20,13 @@ class RequestLoggingLink extends Link { final Request request, [ final NextLink? forward, ]) async* { - _logToAppConsole(request); + getIt.get().addMessage( + GraphQlRequestMessage( + operation: request.operation, + variables: request.variables, + context: request.context, + ), + ); yield* forward!(request); } } @@ -29,7 +35,13 @@ class ResponseLoggingParser extends ResponseParser { @override Response parseResponse(final Map body) { final response = super.parseResponse(body); - _logToAppConsole(response); + getIt.get().addMessage( + GraphQlResponseMessage( + data: response.data, + errors: response.errors, + context: response.context, + ), + ); return response; } diff --git a/lib/logic/api_maps/rest_maps/api_map.dart b/lib/logic/api_maps/rest_maps/api_map.dart index 6fd0bdda..299837fa 100644 --- a/lib/logic/api_maps/rest_maps/api_map.dart +++ b/lib/logic/api_maps/rest_maps/api_map.dart @@ -65,9 +65,11 @@ class ConsoleInterceptor extends InterceptorsWrapper { final RequestInterceptorHandler handler, ) async { addMessage( - Message( - text: - 'request-uri: ${options.uri}\nheaders: ${options.headers}\ndata: ${options.data}', + RestApiRequestMessage( + method: options.method, + data: options.data.toString(), + headers: options.headers, + uri: options.uri, ), ); return super.onRequest(options, handler); @@ -79,9 +81,11 @@ class ConsoleInterceptor extends InterceptorsWrapper { final ResponseInterceptorHandler handler, ) async { addMessage( - Message( - text: - 'response-uri: ${response.realUri}\ncode: ${response.statusCode}\ndata: ${response.toString()}\n', + RestApiResponseMessage( + method: response.requestOptions.method, + statusCode: response.statusCode, + data: response.data.toString(), + uri: response.realUri, ), ); return super.onResponse( diff --git a/lib/logic/models/message.dart b/lib/logic/models/message.dart index 8bbc6dfd..aaaf0930 100644 --- a/lib/logic/models/message.dart +++ b/lib/logic/models/message.dart @@ -1,20 +1,74 @@ +import 'package:graphql/client.dart'; import 'package:intl/intl.dart'; final DateFormat formatter = DateFormat('hh:mm'); class Message { - Message({this.text, this.type = MessageType.normal}) : time = DateTime.now(); + Message({this.text, this.severity = MessageSeverity.normal}) + : time = DateTime.now(); Message.warn({this.text}) - : type = MessageType.warning, + : severity = MessageSeverity.warning, time = DateTime.now(); final String? text; final DateTime time; - final MessageType type; + final MessageSeverity severity; String get timeString => formatter.format(time); } -enum MessageType { +enum MessageSeverity { normal, warning, } + +class RestApiRequestMessage extends Message { + RestApiRequestMessage({ + this.method, + this.uri, + this.data, + this.headers, + }) : super(text: 'request-uri: $uri\nheaders: $headers\ndata: $data'); + + final String? method; + final Uri? uri; + final String? data; + final Map? headers; +} + +class RestApiResponseMessage extends Message { + RestApiResponseMessage({ + this.method, + this.uri, + this.statusCode, + this.data, + }) : super(text: 'response-uri: $uri\ncode: $statusCode\ndata: $data'); + + final String? method; + final Uri? uri; + final int? statusCode; + final String? data; +} + +class GraphQlResponseMessage extends Message { + GraphQlResponseMessage({ + this.data, + this.errors, + this.context, + }) : super(text: 'GraphQL Response\ndata: $data'); + + final Map? data; + final List? errors; + final Context? context; +} + +class GraphQlRequestMessage extends Message { + GraphQlRequestMessage({ + this.operation, + this.variables, + this.context, + }) : super(text: 'GraphQL Request\noperation: $operation'); + + final Operation? operation; + final Map? variables; + final Context? context; +} diff --git a/lib/ui/components/list_tiles/log_list_tile.dart b/lib/ui/components/list_tiles/log_list_tile.dart new file mode 100644 index 00000000..1165ff25 --- /dev/null +++ b/lib/ui/components/list_tiles/log_list_tile.dart @@ -0,0 +1,292 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:selfprivacy/logic/models/message.dart'; + +class LogListItem extends StatelessWidget { + const LogListItem({ + required this.message, + super.key, + }); + + final Message message; + + @override + Widget build(final BuildContext context) { + final messageItem = message; + if (messageItem is RestApiRequestMessage) { + return _RestApiRequestMessageItem(message: messageItem); + } else if (messageItem is RestApiResponseMessage) { + return _RestApiResponseMessageItem(message: messageItem); + } else if (messageItem is GraphQlResponseMessage) { + return _GraphQlResponseMessageItem(message: messageItem); + } else if (messageItem is GraphQlRequestMessage) { + return _GraphQlRequestMessageItem(message: messageItem); + } else { + return _DefaultMessageItem(message: messageItem); + } + } +} + +class _RestApiRequestMessageItem extends StatelessWidget { + const _RestApiRequestMessageItem({required this.message}); + + final RestApiRequestMessage message; + + @override + Widget build(final BuildContext context) => ListTile( + title: Text( + '${message.method}\n${message.uri}', + ), + subtitle: Text(message.timeString), + leading: const Icon(Icons.upload_outlined), + iconColor: Theme.of(context).colorScheme.secondary, + onTap: () => showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + scrollable: true, + title: Text( + '${message.method}\n${message.uri}', + ), + content: Column( + children: [ + Text(message.timeString), + const SizedBox(height: 16), + // Headers is a map of key-value pairs + if (message.headers != null) const Text('Headers'), + if (message.headers != null) + Text( + message.headers!.entries + .map((final entry) => '${entry.key}: ${entry.value}') + .join('\n'), + ), + if (message.data != null && message.data != 'null') + const Text('Data'), + if (message.data != null && message.data != 'null') + Text(message.data!), + ], + ), + actions: [ + // A button to copy the request to the clipboard + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text)); + }, + child: Text('console_page.copy'.tr()), + ), + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: Text('basis.close'.tr()), + ), + ], + ), + ), + ); +} + +class _RestApiResponseMessageItem extends StatelessWidget { + const _RestApiResponseMessageItem({required this.message}); + + final RestApiResponseMessage message; + + @override + Widget build(final BuildContext context) => ListTile( + title: Text( + '${message.statusCode} ${message.method}\n${message.uri}', + ), + subtitle: Text(message.timeString), + leading: const Icon(Icons.download_outlined), + iconColor: Theme.of(context).colorScheme.primary, + onTap: () => showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + scrollable: true, + title: Text( + '${message.statusCode} ${message.method}\n${message.uri}', + ), + content: Column( + children: [ + Text(message.timeString), + const SizedBox(height: 16), + // Headers is a map of key-value pairs + if (message.data != null && message.data != 'null') + const Text('Data'), + if (message.data != null && message.data != 'null') + Text(message.data!), + ], + ), + actions: [ + // A button to copy the request to the clipboard + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text)); + }, + child: Text('console_page.copy'.tr()), + ), + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: Text('basis.close'.tr()), + ), + ], + ), + ), + ); +} + +class _GraphQlResponseMessageItem extends StatelessWidget { + const _GraphQlResponseMessageItem({required this.message}); + + final GraphQlResponseMessage message; + + @override + Widget build(final BuildContext context) => ListTile( + title: Text( + 'GraphQL Response at ${message.timeString}', + ), + subtitle: Text(message.data.toString(), + overflow: TextOverflow.ellipsis, maxLines: 1,), + leading: const Icon(Icons.arrow_circle_down_outlined), + iconColor: Theme.of(context).colorScheme.tertiary, + onTap: () => showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + scrollable: true, + title: Text( + 'GraphQL Response at ${message.timeString}', + ), + content: Column( + children: [ + Text(message.timeString), + const Divider(), + if (message.data != null) const Text('Data'), + // Data is a map of key-value pairs + if (message.data != null) + Text( + message.data!.entries + .map((final entry) => '${entry.key}: ${entry.value}') + .join('\n'), + ), + const Divider(), + if (message.errors != null) const Text('Errors'), + if (message.errors != null) + Text( + message.errors! + .map((final entry) => + '${entry.message} at ${entry.locations}',) + .join('\n'), + ), + const Divider(), + if (message.context != null) const Text('Context'), + if (message.context != null) + Text( + message.context!.toString(), + ), + ], + ), + actions: [ + // A button to copy the request to the clipboard + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text)); + }, + child: Text('console_page.copy'.tr()), + ), + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: Text('basis.close'.tr()), + ), + ], + ), + ), + ); +} + +class _GraphQlRequestMessageItem extends StatelessWidget { + const _GraphQlRequestMessageItem({required this.message}); + + final GraphQlRequestMessage message; + + @override + Widget build(final BuildContext context) => ListTile( + title: Text( + 'GraphQL Request at ${message.timeString}', + ), + subtitle: Text(message.operation.toString(), + overflow: TextOverflow.ellipsis, maxLines: 1,), + leading: const Icon(Icons.arrow_circle_up_outlined), + iconColor: Theme.of(context).colorScheme.secondary, + onTap: () => showDialog( + context: context, + builder: (final BuildContext context) => AlertDialog( + scrollable: true, + title: Text( + 'GraphQL Response at ${message.timeString}', + ), + content: Column( + children: [ + Text(message.timeString), + const Divider(), + if (message.operation != null) const Text('Operation'), + // Data is a map of key-value pairs + if (message.operation != null) + Text( + message.operation!.toString(), + ), + const Divider(), + if (message.variables != null) const Text('Variables'), + if (message.variables != null) + Text( + message.variables!.entries + .map((final entry) => '${entry.key}: ${entry.value}') + .join('\n'), + ), + const Divider(), + if (message.context != null) const Text('Context'), + if (message.context != null) + Text( + message.context!.toString(), + ), + ], + ), + actions: [ + // A button to copy the request to the clipboard + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text)); + }, + child: Text('console_page.copy'.tr()), + ), + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: Text('basis.close'.tr()), + ), + ], + ), + ), + ); +} + +class _DefaultMessageItem extends StatelessWidget { + const _DefaultMessageItem({required this.message}); + + final Message message; + + @override + Widget build(final BuildContext context) => Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: RichText( + text: TextSpan( + style: DefaultTextStyle.of(context).style, + children: [ + TextSpan( + text: '${message.timeString}: \n', + style: const TextStyle( + fontWeight: FontWeight.bold, + ), + ), + TextSpan(text: message.text), + ], + ), + ), + ); +} diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index 85df0ffa..59ad514a 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -5,7 +5,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/ui/components/list_tiles/log_list_tile.dart'; @RoutePage() class ConsolePage extends StatefulWidget { @@ -29,21 +29,29 @@ class _ConsolePageState extends State { super.dispose(); } - void update() => setState(() => {}); + bool paused = false; + + void update() { + if (!paused) { + setState(() => {}); + } + } @override Widget build(final BuildContext context) => SafeArea( child: Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(53), - child: Column( - children: [ - BrandHeader( - title: 'console_page.title'.tr(), - hasBackButton: true, - ), - ], + appBar: AppBar( + title: Text('console_page.title'.tr()), + leading: IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: () => Navigator.of(context).pop(), ), + actions: [ + IconButton( + icon: Icon(paused ? Icons.play_arrow_outlined : Icons.pause_outlined), + onPressed: () => setState(() => paused = !paused), + ), + ], ), body: FutureBuilder( future: getIt.allReady(), @@ -62,33 +70,7 @@ class _ConsolePageState extends State { const SizedBox(height: 20), ...UnmodifiableListView( messages - .map((final message) { - final bool isError = - message.type == MessageType.warning; - return Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: RichText( - text: TextSpan( - style: DefaultTextStyle.of(context).style, - children: [ - TextSpan( - text: - '${message.timeString}${isError ? '(Error)' : ''}: \n', - style: TextStyle( - fontWeight: FontWeight.bold, - color: isError - ? Theme.of(context) - .colorScheme - .error - : null, - ), - ), - TextSpan(text: message.text), - ], - ), - ), - ); - }) + .map((final message) => LogListItem(message: message)) .toList() .reversed, ), From 931da1443d3b91e71f108e2e49a6b4e93e422311 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 5 Apr 2023 13:33:53 +0300 Subject: [PATCH 456/732] refactor(ui): Delete BrandCards --- .../components/brand_cards/brand_cards.dart | 55 ------------------- .../{brand_cards => cards}/filled_card.dart | 0 .../{brand_cards => cards}/outlined_card.dart | 0 .../components/jobs_content/jobs_content.dart | 20 ++++++- .../components/list_tiles/log_list_tile.dart | 20 +++++-- .../not_ready_card/not_ready_card.dart | 2 +- .../pages/backup_details/backup_details.dart | 2 +- lib/ui/pages/dns_details/dns_details.dart | 2 +- lib/ui/pages/more/console.dart | 3 +- lib/ui/pages/more/more.dart | 2 +- lib/ui/pages/recovery_key/recovery_key.dart | 2 +- .../server_details/server_details_screen.dart | 2 +- .../binds_migration/services_migration.dart | 7 +-- lib/ui/pages/services/service_page.dart | 2 +- .../initializing/server_provider_picker.dart | 2 +- .../recovering/recovery_confirm_server.dart | 2 +- .../recovering/recovery_method_select.dart | 2 +- lib/ui/pages/users/users.dart | 2 +- 18 files changed, 45 insertions(+), 82 deletions(-) delete mode 100644 lib/ui/components/brand_cards/brand_cards.dart rename lib/ui/components/{brand_cards => cards}/filled_card.dart (100%) rename lib/ui/components/{brand_cards => cards}/outlined_card.dart (100%) diff --git a/lib/ui/components/brand_cards/brand_cards.dart b/lib/ui/components/brand_cards/brand_cards.dart deleted file mode 100644 index 67e7f725..00000000 --- a/lib/ui/components/brand_cards/brand_cards.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/material.dart'; - -class BrandCards { - static Widget big({required final Widget child}) => _BrandCard( - padding: const EdgeInsets.symmetric( - horizontal: 20, - vertical: 15, - ), - shadow: bigShadow, - borderRadius: BorderRadius.circular(20), - child: child, - ); - static Widget small({required final Widget child}) => _BrandCard( - padding: const EdgeInsets.symmetric( - horizontal: 15, - vertical: 10, - ), - shadow: bigShadow, - borderRadius: BorderRadius.circular(10), - child: child, - ); -} - -class _BrandCard extends StatelessWidget { - const _BrandCard({ - required this.child, - required this.padding, - required this.shadow, - required this.borderRadius, - }); - - final Widget child; - final EdgeInsets padding; - final List shadow; - final BorderRadius borderRadius; - - @override - Widget build(final BuildContext context) => Container( - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - borderRadius: borderRadius, - boxShadow: shadow, - ), - padding: padding, - child: child, - ); -} - -final List bigShadow = [ - BoxShadow( - offset: const Offset(0, 4), - blurRadius: 8, - color: Colors.black.withOpacity(.08), - ) -]; diff --git a/lib/ui/components/brand_cards/filled_card.dart b/lib/ui/components/cards/filled_card.dart similarity index 100% rename from lib/ui/components/brand_cards/filled_card.dart rename to lib/ui/components/cards/filled_card.dart diff --git a/lib/ui/components/brand_cards/outlined_card.dart b/lib/ui/components/cards/outlined_card.dart similarity index 100% rename from lib/ui/components/brand_cards/outlined_card.dart rename to lib/ui/components/cards/outlined_card.dart diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index 5d609d65..5ba00f89 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -7,7 +7,6 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; @@ -73,8 +72,23 @@ class JobsContent extends StatelessWidget { (final j) => Row( children: [ Expanded( - child: BrandCards.small( - child: Text(j.title), + child: Card( + color: Theme.of(context).colorScheme.surfaceVariant, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Text( + j.title, + style: + Theme.of(context).textTheme.labelLarge?.copyWith( + color: Theme.of(context) + .colorScheme + .onSurfaceVariant, + ), + ), + ), ), ), const SizedBox(width: 10), diff --git a/lib/ui/components/list_tiles/log_list_tile.dart b/lib/ui/components/list_tiles/log_list_tile.dart index 1165ff25..88505d8f 100644 --- a/lib/ui/components/list_tiles/log_list_tile.dart +++ b/lib/ui/components/list_tiles/log_list_tile.dart @@ -143,8 +143,11 @@ class _GraphQlResponseMessageItem extends StatelessWidget { title: Text( 'GraphQL Response at ${message.timeString}', ), - subtitle: Text(message.data.toString(), - overflow: TextOverflow.ellipsis, maxLines: 1,), + subtitle: Text( + message.data.toString(), + overflow: TextOverflow.ellipsis, + maxLines: 1, + ), leading: const Icon(Icons.arrow_circle_down_outlined), iconColor: Theme.of(context).colorScheme.tertiary, onTap: () => showDialog( @@ -171,8 +174,10 @@ class _GraphQlResponseMessageItem extends StatelessWidget { if (message.errors != null) Text( message.errors! - .map((final entry) => - '${entry.message} at ${entry.locations}',) + .map( + (final entry) => + '${entry.message} at ${entry.locations}', + ) .join('\n'), ), const Divider(), @@ -211,8 +216,11 @@ class _GraphQlRequestMessageItem extends StatelessWidget { title: Text( 'GraphQL Request at ${message.timeString}', ), - subtitle: Text(message.operation.toString(), - overflow: TextOverflow.ellipsis, maxLines: 1,), + subtitle: Text( + message.operation.toString(), + overflow: TextOverflow.ellipsis, + maxLines: 1, + ), leading: const Icon(Icons.arrow_circle_up_outlined), iconColor: Theme.of(context).colorScheme.secondary, onTap: () => showDialog( diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index 5e62e093..4b174a41 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -1,6 +1,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:easy_localization/easy_localization.dart'; diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 36d76c29..f909e481 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; +import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 61aace92..5efc4164 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/utils/network_utils.dart'; diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index 59ad514a..95670475 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -48,7 +48,8 @@ class _ConsolePageState extends State { ), actions: [ IconButton( - icon: Icon(paused ? Icons.play_arrow_outlined : Icons.pause_outlined), + icon: Icon( + paused ? Icons.play_arrow_outlined : Icons.pause_outlined), onPressed: () => setState(() => paused = !paused), ), ], diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 20eaeb2d..3d85b093 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index e96d2f44..86d678bb 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 6707d287..a3a521b5 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -11,7 +11,7 @@ import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart' import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/ui/components/buttons/segmented_buttons.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index d747cafa..cdb3339b 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -12,8 +12,6 @@ import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/ui/components/storage_list_items/service_migration_list_item.dart'; -import 'package:selfprivacy/ui/pages/root_route.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; @RoutePage() class ServicesMigrationPage extends StatefulWidget { @@ -176,10 +174,7 @@ class _ServicesMigrationPageState extends State { } } } - Navigator.of(context).pushAndRemoveUntil( - materialRoute(const RootPage()), - (final predicate) => false, - ); + context.router.popUntilRoot(); showModalBottomSheet( context: context, builder: (final BuildContext context) => const JobsContent(), diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index ff3b0e38..0c7beafb 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart' import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/launch_url.dart'; diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 4e09ae82..1257cc75 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; +import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; import 'package:selfprivacy/utils/launch_url.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 1c75ad75..2efcff87 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoveryConfirmServer extends StatefulWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index 8713685d..f8cec44a 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart'; +import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index fdba2cb5..58cb3b7d 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -13,7 +13,7 @@ import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; -import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; +import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; From f6591cbfc65f7d9dec193f54987afe447f4096d2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 19 Apr 2023 10:41:30 -0300 Subject: [PATCH 457/732] chore: Implement server installation for Digital Ocean --- .../digital_ocean/digital_ocean_api.dart | 95 ------------------- .../server_providers/digital_ocean.dart | 67 ++++++++++++- 2 files changed, 65 insertions(+), 97 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 264f227d..f6ba941a 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; @@ -7,13 +6,9 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_pro import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; -import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; -import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @@ -315,7 +310,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final String databasePassword, required final String domainName, required final String hostName, - required final int volumeId, required final String serverType, }) async { final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; @@ -360,95 +354,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - Future> creatfgdfeServer({ - required final String dnsApiToken, - required final User rootUser, - required final String domainName, - required final String serverType, - required final DnsProviderType dnsProvider, - }) async { - ServerHostingDetails? serverDetails; - - final String dbPassword = StringGenerators.dbPassword(); - final String apiToken = StringGenerators.apiToken(); - - final String base64Password = - base64.encode(utf8.encode(rootUser.password ?? 'PASS')); - - final String formattedHostname = getHostnameFromDomain(domainName); - const String infectBranch = 'testing/digital-ocean'; - final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; - final String dnsProviderType = dnsProviderToInfectName(dnsProvider); - - final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; - print(userdataString); - - Response? serverCreateResponse; - final Dio client = await getClient(); - try { - final Map data = { - 'name': formattedHostname, - 'size': serverType, - 'image': 'ubuntu-20-04-x64', - 'user_data': userdataString, - 'region': region!, - }; - print('Decoded data: $data'); - - serverCreateResponse = await client.post( - '/droplets', - data: data, - ); - - final int serverId = serverCreateResponse.data['droplet']['id']; - final ServerVolume? newVolume = (await createVolume()).data; - final bool attachedVolume = - (await attachVolume(newVolume!, serverId)).data; - - String? ipv4; - int attempts = 0; - while (attempts < 5 && ipv4 == null) { - await Future.delayed(const Duration(seconds: 20)); - final List servers = await getServers(); - for (final server in servers) { - if (server.name == formattedHostname && server.ip != '0.0.0.0') { - ipv4 = server.ip; - break; - } - } - ++attempts; - } - - if (attachedVolume && ipv4 != null) { - serverDetails = ServerHostingDetails( - id: serverId, - ip4: ipv4, - createTime: DateTime.now(), - volume: newVolume, - apiToken: apiToken, - provider: ServerProviderType.digitalOcean, - ); - } - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult( - data: serverDetails, - success: true, - code: serverCreateResponse.statusCode, - message: serverCreateResponse.statusMessage, - ); - } - Future> deleteServer(final int serverId) async { final Dio client = await getClient(); try { diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 4393f80e..c883ac8c 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -133,6 +133,9 @@ class DigitalOceanServerProvider extends ServerProvider { Future> launchInstallation( final LaunchInstallationData installationData, ) async { + ServerHostingDetails? serverDetails; + final serverApiToken = StringGenerators.apiToken(); + final hostname = getHostnameFromDomain(installationData.domainName); final serverResult = await _adapter.api().createServer( dnsApiToken: installationData.dnsApiToken, rootUser: installationData.rootUser, @@ -140,12 +143,12 @@ class DigitalOceanServerProvider extends ServerProvider { serverType: installationData.serverTypeId, dnsProviderType: dnsProviderToInfectName(installationData.dnsProviderType), - hostName: getHostnameFromDomain(installationData.domainName), + hostName: hostname, base64Password: base64.encode( utf8.encode(installationData.rootUser.password ?? 'PASS'), ), databasePassword: StringGenerators.dbPassword(), - serverApiToken: StringGenerators.apiToken(), + serverApiToken: serverApiToken, ); if (!serverResult.success || serverResult.data == null) { @@ -169,6 +172,66 @@ class DigitalOceanServerProvider extends ServerProvider { code: serverResult.code, ); } + + try { + final int dropletId = serverResult.data['droplet']['id']; + final ServerVolume? newVolume = (await createVolume()).data; + final bool attachedVolume = + (await attachVolume(newVolume!, dropletId)).data; + + String? ipv4; + int attempts = 0; + while (attempts < 5 && ipv4 == null) { + await Future.delayed(const Duration(seconds: 20)); + final servers = await getServers(); + for (final server in servers.data) { + if (server.name == hostname && server.ip != '0.0.0.0') { + ipv4 = server.ip; + break; + } + } + ++attempts; + } + + if (attachedVolume && ipv4 != null) { + serverDetails = ServerHostingDetails( + id: dropletId, + ip4: ipv4, + createTime: DateTime.now(), + volume: newVolume, + apiToken: serverApiToken, + provider: ServerProviderType.digitalOcean, + ); + } + } catch (e) { + return GenericResult( + success: false, + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'basis.try_again'.tr(), + callback: () async { + await Future.delayed(const Duration(seconds: 5)); + final deletion = await deleteServer(hostname); + return deletion.success + ? await launchInstallation(installationData) + : deletion; + }, + ), + ], + description: 'modals.try_again'.tr(), + title: 'modals.server_deletion_error'.tr(), + ), + message: e.toString(), + ); + } + + await installationData.successCallback(serverDetails!); + return GenericResult(success: true, data: null); } @override From 3b49805c9c6077ea1a16a055bffe11c0cec97725 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 24 Apr 2023 12:09:23 -0300 Subject: [PATCH 458/732] chore: Move volume api to abstract server provider interface --- .../api_maps/rest_maps/api_controller.dart | 23 --------- .../digital_ocean/digital_ocean_api.dart | 7 --- .../server_providers/hetzner/hetzner_api.dart | 12 ++++- .../provider_volume_cubit.dart | 50 +++++++++---------- lib/logic/providers/server_provider.dart | 16 ++++++ .../server_providers/digital_ocean.dart | 35 +++++++++++++ .../providers/server_providers/hetzner.dart | 22 +++++--- lib/ui/router/router.gr.dart | 3 +- 8 files changed, 101 insertions(+), 67 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/api_controller.dart b/lib/logic/api_maps/rest_maps/api_controller.dart index 73fd8e5c..8e58ee6f 100644 --- a/lib/logic/api_maps/rest_maps/api_controller.dart +++ b/lib/logic/api_maps/rest_maps/api_controller.dart @@ -1,22 +1,10 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; class ApiController { - static VolumeProviderApiFactory? get currentVolumeProviderApiFactory => - _volumeProviderApiFactory; static DnsProviderApiFactory? get currentDnsProviderApiFactory => _dnsProviderApiFactory; - static ServerProviderApiFactory? get currentServerProviderApiFactory => - _serverProviderApiFactory; - - static void initVolumeProviderApiFactory( - final ServerProviderSettings settings, - ) { - _volumeProviderApiFactory = - VolumeApiFactoryCreator.createVolumeProviderApiFactory(settings); - } static void initDnsProviderApiFactory( final DnsProviderFactorySettings settings, @@ -25,20 +13,9 @@ class ApiController { ApiFactoryCreator.createDnsProviderApiFactory(settings); } - static void initServerProviderApiFactory( - final ServerProviderSettings settings, - ) { - _serverProviderApiFactory = - ApiFactoryCreator.createServerProviderApiFactory(settings); - } - static void clearProviderApiFactories() { - _volumeProviderApiFactory = null; _dnsProviderApiFactory = null; - _serverProviderApiFactory = null; } - static VolumeProviderApiFactory? _volumeProviderApiFactory; static DnsProviderApiFactory? _dnsProviderApiFactory; - static ServerProviderApiFactory? _serverProviderApiFactory; } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index f6ba941a..e6c5f1b4 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -95,13 +95,6 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - /// Hardcoded on their documentation and there is no pricing API at all - /// Probably we should scrap the doc page manually - Future getPricePerGb() async => Price( - value: 0.10, - currency: 'USD', - ); - Future createVolume() async { Response? createVolumeResponse; final Dio client = await getClient(); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 8e67b188..c2883aba 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -305,7 +305,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future resizeVolume( + Future> resizeVolume( final ServerVolume volume, final DiskSize size, ) async { @@ -324,11 +324,19 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { resizeVolumeResponse.data['action']['status'].toString() != 'error'; } catch (e) { print(e); + return GenericResult( + data: false, + success: false, + message: e.toString(), + ); } finally { client.close(); } - return success; + return GenericResult( + data: success, + success: true, + ); } Future createServer({ diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 48617545..d2315c99 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/price.dart'; +import 'package:selfprivacy/logic/providers/providers_controller.dart'; part 'provider_volume_state.dart'; @@ -27,9 +28,7 @@ class ApiProviderVolumeCubit } Future getPricePerGb() async => - ApiController.currentVolumeProviderApiFactory! - .getVolumeProvider() - .getPricePerGb(); + ProvidersController.currentServerProvider!.getPricePerGb(); Future refresh() async { emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); @@ -41,29 +40,31 @@ class ApiProviderVolumeCubit return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } - final List volumes = await ApiController - .currentVolumeProviderApiFactory! - .getVolumeProvider() - .getVolumes(); + final volumesResult = + await ProvidersController.currentServerProvider!.getVolumes(); - if (volumes.isEmpty) { + if (!volumesResult.success || volumesResult.data.isEmpty) { return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } - emit(ApiProviderVolumeState(volumes, LoadingStatus.success, false)); + emit( + ApiProviderVolumeState( + volumesResult.data, + LoadingStatus.success, + false, + ), + ); } Future attachVolume(final DiskVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; - await ApiController.currentVolumeProviderApiFactory! - .getVolumeProvider() + await ProvidersController.currentServerProvider! .attachVolume(volume.providerVolume!, server.id); unawaited(refresh()); } Future detachVolume(final DiskVolume volume) async { - await ApiController.currentVolumeProviderApiFactory! - .getVolumeProvider() + await ProvidersController.currentServerProvider! .detachVolume(volume.providerVolume!); unawaited(refresh()); } @@ -77,14 +78,13 @@ class ApiProviderVolumeCubit 'Starting resize', ); emit(state.copyWith(isResizing: true)); - final bool resized = await ApiController.currentVolumeProviderApiFactory! - .getVolumeProvider() - .resizeVolume( - volume.providerVolume!, - newSize, - ); + final resizedResult = + await ProvidersController.currentServerProvider!.resizeVolume( + volume.providerVolume!, + newSize, + ); - if (!resized) { + if (!resizedResult.success || !resizedResult.data) { getIt().showSnackBar( 'storage.extending_volume_error'.tr(), ); @@ -115,11 +115,8 @@ class ApiProviderVolumeCubit } Future createVolume() async { - final ServerVolume? volume = (await ApiController - .currentVolumeProviderApiFactory! - .getVolumeProvider() - .createVolume()) - .data; + final ServerVolume? volume = + (await ProvidersController.currentServerProvider!.createVolume()).data; final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); @@ -131,8 +128,7 @@ class ApiProviderVolumeCubit } Future deleteVolume(final DiskVolume volume) async { - await ApiController.currentVolumeProviderApiFactory! - .getVolumeProvider() + await ProvidersController.currentServerProvider! .deleteVolume(volume.providerVolume!); unawaited(refresh()); } diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index 7a2f4a02..781f0d2b 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -1,7 +1,10 @@ import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; +import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -26,5 +29,18 @@ abstract class ServerProvider { final DateTime end, ); + Future getPricePerGb(); + Future>> getVolumes({final String? status}); + Future> createVolume(); + Future> deleteVolume(final ServerVolume volume); + Future> resizeVolume( + final ServerVolume volume, + final DiskSize size, + ); + Future> attachVolume( + final ServerVolume volume, + final int serverId, + ); + Future> detachVolume(final ServerVolume volume); GenericResult get success => GenericResult(success: true, data: true); } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index c883ac8c..16dac0c6 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -610,6 +610,7 @@ class DigitalOceanServerProvider extends ServerProvider { ); } + @override Future>> getVolumes({ final String? status, }) async { @@ -658,6 +659,7 @@ class DigitalOceanServerProvider extends ServerProvider { ); } + @override Future> createVolume() async { ServerVolume? volume; @@ -729,6 +731,7 @@ class DigitalOceanServerProvider extends ServerProvider { ); } + @override Future> deleteVolume( final ServerVolume volume, ) async => @@ -736,6 +739,7 @@ class DigitalOceanServerProvider extends ServerProvider { volume.uuid!, ); + @override Future> attachVolume( final ServerVolume volume, final int serverId, @@ -745,6 +749,7 @@ class DigitalOceanServerProvider extends ServerProvider { serverId, ); + @override Future> detachVolume( final ServerVolume volume, ) async => @@ -753,6 +758,7 @@ class DigitalOceanServerProvider extends ServerProvider { volume.serverId!, ); + @override Future> resizeVolume( final ServerVolume volume, final DiskSize size, @@ -761,4 +767,33 @@ class DigitalOceanServerProvider extends ServerProvider { volume.name, size, ); + + /// Hardcoded on their documentation and there is no pricing API at all + /// Probably we should scrap the doc page manually + @override + Future getPricePerGb() async => Price( + value: 0.10, + currency: 'USD', + ); + + @override + Future> powerOn(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().powerOn(serverId); + if (!result.success) { + return GenericResult( + success: false, + data: timestamp, + code: result.code, + message: result.message, + ); + } + + timestamp = DateTime.now(); + + return GenericResult( + success: true, + data: timestamp, + ); + } } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 33894f3d..7b59c2a3 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -7,7 +7,6 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; -import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; @@ -434,7 +433,7 @@ class HetznerServerProvider extends ServerProvider { ); } - final volume = volumeResult.data!; + final volume = volumeResult.data; final serverApiToken = StringGenerators.apiToken(); final hostname = getHostnameFromDomain(installationData.domainName); @@ -632,6 +631,7 @@ class HetznerServerProvider extends ServerProvider { ); } + @override Future> createVolume() async { ServerVolume? volume; @@ -676,6 +676,7 @@ class HetznerServerProvider extends ServerProvider { ); } + @override Future>> getVolumes({ final String? status, }) async { @@ -724,9 +725,11 @@ class HetznerServerProvider extends ServerProvider { ); } - Future> deleteVolume(final int volumeId) async => - _adapter.api().deleteVolume(volumeId); + @override + Future> deleteVolume(final ServerVolume volume) async => + _adapter.api().deleteVolume(volume.id); + @override Future> attachVolume( final ServerVolume volume, final int serverId, @@ -736,14 +739,16 @@ class HetznerServerProvider extends ServerProvider { serverId, ); + @override Future> detachVolume( - final int volumeId, + final ServerVolume volume, ) async => _adapter.api().detachVolume( - volumeId, + volume.id, ); - Future resizeVolume( + @override + Future> resizeVolume( final ServerVolume volume, final DiskSize size, ) async => @@ -751,4 +756,7 @@ class HetznerServerProvider extends ServerProvider { volume, size, ); + + @override + Future getPricePerGb() async => _adapter.api().getPricePerGb(); } diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index 675056f3..e5b0449f 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -10,7 +10,8 @@ part of 'router.dart'; abstract class _$RootRouter extends RootStackRouter { - _$RootRouter([GlobalKey? navigatorKey]) : super(navigatorKey); + _$RootRouter([GlobalKey? navigatorKey]) + : super(navigatorKey: navigatorKey); @override final Map pagesMap = { From 4aa13dd63a0cec58dcde9b347573f8af36ffacb2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 24 Apr 2023 13:45:16 -0300 Subject: [PATCH 459/732] chore: resolve ui conflicts and make it build --- .../provider_volume_cubit.dart | 3 +- .../server_detailed_info_repository.dart | 9 ++-- .../server_installation_repository.dart | 48 ++++--------------- lib/logic/providers/server_provider.dart | 10 ++++ .../providers/server_providers/hetzner.dart | 2 + lib/ui/router/router.gr.dart | 3 +- 6 files changed, 27 insertions(+), 48 deletions(-) diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index d2315c99..43bd7005 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; @@ -36,7 +35,7 @@ class ApiProviderVolumeCubit } Future _refetch() async { - if (ApiController.currentVolumeProviderApiFactory == null) { + if (ProvidersController.currentServerProvider == null) { return emit(const ApiProviderVolumeState([], LoadingStatus.error, false)); } diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index ca6848bc..3bad75eb 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -1,23 +1,22 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/timezone_settings.dart'; +import 'package:selfprivacy/logic/providers/providers_controller.dart'; class ServerDetailsRepository { ServerApi server = ServerApi(); Future load() async { - final serverProviderApi = ApiController.currentServerProviderApiFactory; + final serverProviderApi = ProvidersController.currentServerProvider; final settings = await server.getSystemSettings(); final serverId = getIt().serverDetails!.id; - final metadata = - await serverProviderApi!.getServerProvider().getMetadata(serverId); + final metadata = await serverProviderApi?.getMetadata(serverId); return ServerDetailsRepositoryDto( autoUpgradeSettings: settings.autoUpgradeSettings, - metadata: metadata, + metadata: metadata!.data, serverTimezone: TimeZoneSettings.fromString( settings.timezone, ), diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 29b298bd..838fe6c9 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -61,16 +61,7 @@ class ServerInstallationRepository { if (serverProvider != null || (serverDetails != null && serverDetails.provider != ServerProviderType.unknown)) { - ApiController.initServerProviderApiFactory( - ServerProviderSettings( - provider: serverProvider ?? serverDetails!.provider, - location: location, - ), - ); - - // All current providers support volumes - // so it's safe to hardcode for now - ApiController.initVolumeProviderApiFactory( + ProvidersController.initServerProvider( ServerProviderSettings( provider: serverProvider ?? serverDetails!.provider, location: location, @@ -250,8 +241,7 @@ class ServerInstallationRepository { }) async { final DnsProviderApi dnsProviderApi = ApiController.currentDnsProviderApiFactory!.getDnsProvider(); - final ServerProviderApi serverApi = - ApiController.currentServerProviderApiFactory!.getServerProvider(); + final serverProvider = ProvidersController.currentServerProvider!; void showDomainErrorPopUp(final String error) { showPopUpAlert( @@ -260,8 +250,8 @@ class ServerInstallationRepository { cancelButtonOnPressed: onCancel, actionButtonTitle: 'basis.delete'.tr(), actionButtonOnPressed: () async { - await serverApi.deleteServer( - domainName: domain.domainName, + await serverProvider.deleteServer( + domain.domainName, ); onCancel(); }, @@ -299,16 +289,6 @@ class ServerInstallationRepository { return false; } - final GenericResult createReverseResult = await serverApi.createReverseDns( - serverDetails: serverDetails, - domain: domain, - ); - - if (!createReverseResult.success) { - showDomainErrorPopUp(errorMessage); - return false; - } - return true; } @@ -586,9 +566,7 @@ class ServerInstallationRepository { } Future> getServersOnProviderAccount() async => - ApiController.currentServerProviderApiFactory! - .getServerProvider() - .getServers(); + (await ProvidersController.currentServerProvider!.getServers()).data; Future saveServerDetails( final ServerHostingDetails serverDetails, @@ -681,12 +659,10 @@ class ServerInstallationRepository { } Future deleteServer(final ServerDomain serverDomain) async { - final GenericResult deletionResult = await ApiController - .currentServerProviderApiFactory! - .getServerProvider() - .deleteServer( - domainName: serverDomain.domainName, - ); + final deletionResult = + await ProvidersController.currentServerProvider!.deleteServer( + serverDomain.domainName, + ); if (!deletionResult.success) { getIt() @@ -694,12 +670,6 @@ class ServerInstallationRepository { return false; } - if (!deletionResult.data) { - getIt() - .showSnackBar('modals.server_deletion_error'.tr()); - return false; - } - await box.put(BNames.hasFinalChecked, false); await box.put(BNames.isServerStarted, false); await box.put(BNames.isServerResetedFirstTime, false); diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_provider.dart index 781f0d2b..ffb64e12 100644 --- a/lib/logic/providers/server_provider.dart +++ b/lib/logic/providers/server_provider.dart @@ -5,6 +5,8 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; +import 'package:selfprivacy/logic/models/server_basic_info.dart'; +import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -12,12 +14,17 @@ export 'package:selfprivacy/logic/api_maps/generic_result.dart'; export 'package:selfprivacy/logic/models/launch_installation_data.dart'; abstract class ServerProvider { + Future>> getServers(); Future> trySetServerLocation(final String location); Future> tryInitApiByToken(final String token); Future>> getAvailableLocations(); Future>> getServerTypes({ required final ServerProviderLocation location, }); + + Future> deleteServer( + final String hostname, + ); Future> launchInstallation( final LaunchInstallationData installationData, ); @@ -42,5 +49,8 @@ abstract class ServerProvider { final int serverId, ); Future> detachVolume(final ServerVolume volume); + Future>> getMetadata( + final int serverId, + ); GenericResult get success => GenericResult(success: true, data: true); } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 7b59c2a3..dc1548b1 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -209,6 +209,7 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(success: true, data: servers); } + @override Future>> getMetadata( final int serverId, ) async { @@ -573,6 +574,7 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(success: true, data: null); } + @override Future> deleteServer( final String hostname, ) async { diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index e5b0449f..ee569a83 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -10,8 +10,7 @@ part of 'router.dart'; abstract class _$RootRouter extends RootStackRouter { - _$RootRouter([GlobalKey? navigatorKey]) - : super(navigatorKey: navigatorKey); + _$RootRouter([GlobalKey? navigatorKey]) : super(navigatorKey: navigatorKey); @override final Map pagesMap = { From d282f37b71bef37e50f30af49a76876279090573 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 25 Apr 2023 16:04:19 -0300 Subject: [PATCH 460/732] fix: Return correct adapters for Hive and make it run --- lib/config/hive_config.dart | 2 ++ lib/ui/router/router.gr.dart | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index efb5520c..afaae80b 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -19,6 +19,8 @@ class HiveConfig { Hive.registerAdapter(BackblazeBucketAdapter()); Hive.registerAdapter(ServerVolumeAdapter()); Hive.registerAdapter(UserTypeAdapter()); + Hive.registerAdapter(DnsProviderTypeAdapter()); + Hive.registerAdapter(ServerProviderTypeAdapter()); await Hive.openBox(BNames.appSettingsBox); diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index ee569a83..675056f3 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -10,7 +10,7 @@ part of 'router.dart'; abstract class _$RootRouter extends RootStackRouter { - _$RootRouter([GlobalKey? navigatorKey]) : super(navigatorKey: navigatorKey); + _$RootRouter([GlobalKey? navigatorKey]) : super(navigatorKey); @override final Map pagesMap = { From 4c2cfca4c4f73bbf305c362bda7ed5cde0ed1da0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 25 Apr 2023 16:20:23 -0300 Subject: [PATCH 461/732] fix: Change server location type for Hetzner --- .../rest_maps/server_providers/hetzner/hetzner_api.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index c2883aba..44bfb66b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -519,7 +519,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } Future> getAvailableLocations() async { - List locations = []; + List locations = []; final Dio client = await getClient(); try { From 1e9f1f88a7302d65f780096516b476c898d3f85e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 25 Apr 2023 16:44:43 -0300 Subject: [PATCH 462/732] fix: Hetzner installation issues - Replace serverType id with locaiton id - Replaces id accessing in volume from .id to [id] --- .../rest_maps/server_providers/hetzner/hetzner_api.dart | 1 - .../server_installation/server_installation_cubit.dart | 2 +- lib/logic/providers/server_providers/hetzner.dart | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 44bfb66b..d09cce18 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -10,7 +10,6 @@ import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/price.dart'; -import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index db5f1131..68da2c81 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -175,7 +175,7 @@ class ServerInstallationCubit extends Cubit { await repository.saveServerType(serverType); await ProvidersController.currentServerProvider! - .trySetServerLocation(serverType.identifier); + .trySetServerLocation(serverType.location.identifier); emit( (state as ServerInstallationNotFinished).copyWith( diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index dc1548b1..cc3b05d1 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -172,6 +172,7 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(success: true, data: types); } + @override Future>> getServers() async { final List servers = []; final result = await _adapter.api().getServers(); @@ -434,7 +435,7 @@ class HetznerServerProvider extends ServerProvider { ); } - final volume = volumeResult.data; + final volume = volumeResult.data['volume']; final serverApiToken = StringGenerators.apiToken(); final hostname = getHostnameFromDomain(installationData.domainName); @@ -446,7 +447,7 @@ class HetznerServerProvider extends ServerProvider { dnsProviderType: dnsProviderToInfectName(installationData.dnsProviderType), hostName: hostname, - volumeId: volume.id, + volumeId: volume['id'], base64Password: base64.encode( utf8.encode(installationData.rootUser.password ?? 'PASS'), ), @@ -455,7 +456,7 @@ class HetznerServerProvider extends ServerProvider { ); if (!serverResult.success || serverResult.data == null) { - await _adapter.api().deleteVolume(volume.id); + await _adapter.api().deleteVolume(volume['id']); await Future.delayed(const Duration(seconds: 5)); if (serverResult.message != null && serverResult.message == 'uniqueness_error') { @@ -549,7 +550,7 @@ class HetznerServerProvider extends ServerProvider { CallbackDialogueChoice( title: 'basis.try_again'.tr(), callback: () async { - await _adapter.api().deleteVolume(volume.id); + await _adapter.api().deleteVolume(volume['id']); await Future.delayed(const Duration(seconds: 5)); final deletion = await deleteServer(hostname); if (deletion.success) { From 854febc5d2f0896e28d2db1f965a5eaad4a2e3cf Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 26 Apr 2023 14:35:57 -0300 Subject: [PATCH 463/732] fix: Replace hardcoded string from Hetzner to Cloudflare for DNS providers page --- lib/ui/pages/setup/initializing/dns_provider_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 28dabb9e..92f1a36d 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -194,7 +194,7 @@ class ProviderSelectionPage extends StatelessWidget { ), const SizedBox(width: 16), Text( - 'Hetzner Cloud', + 'Cloudflare', style: Theme.of(context).textTheme.titleMedium, ), ], From b2428383398b61dd8c6fd1d90f5107173e15dedc Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 26 Apr 2023 14:39:33 -0300 Subject: [PATCH 464/732] fix: Make launchInstall return correct object for volume --- lib/logic/providers/server_providers/hetzner.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index cc3b05d1..b9d2296a 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -521,7 +521,13 @@ class HetznerServerProvider extends ServerProvider { id: serverResult.data['server']['id'], ip4: serverResult.data['server']['public_net']['ipv4']['ip'], createTime: DateTime.now(), - volume: volume, + volume: ServerVolume( + id: volume['id'], + name: volume['name'], + sizeByte: volume['size'], + serverId: volume['server'], + linuxDevice: volume['linux_device'], + ), apiToken: serverApiToken, provider: ServerProviderType.hetzner, ); From da4b38b78767a828fd5de16de1362cad3d2d88f6 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 28 Apr 2023 14:19:52 -0300 Subject: [PATCH 465/732] fix: Move DNS entries creation step to server provider layer --- .../server_installation_cubit.dart | 5 +++-- lib/logic/models/launch_installation_data.dart | 7 +++++-- .../server_providers/digital_ocean.dart | 9 +++++++-- .../providers/server_providers/hetzner.dart | 17 ++++++++++++++--- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 68da2c81..04bfa830 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -230,7 +230,6 @@ class ServerInstallationCubit extends Cubit { final ServerHostingDetails serverDetails, ) async { await repository.saveServerDetails(serverDetails); - // TODO dns; emit( (state as ServerInstallationNotFinished).copyWith( isLoading: false, @@ -247,10 +246,12 @@ class ServerInstallationCubit extends Cubit { rootUser: state.rootUser!, dnsApiToken: state.dnsApiToken!, dnsProviderType: state.serverDomain!.provider, - domainName: state.serverDomain!.domainName, + serverDomain: state.serverDomain!, serverTypeId: state.serverTypeIdentificator!, errorCallback: clearAppConfig, successCallback: onCreateServerSuccess, + dnsProviderApi: + ApiController.currentDnsProviderApiFactory!.getDnsProvider(), ); final result = diff --git a/lib/logic/models/launch_installation_data.dart b/lib/logic/models/launch_installation_data.dart index c7956ea1..9a394923 100644 --- a/lib/logic/models/launch_installation_data.dart +++ b/lib/logic/models/launch_installation_data.dart @@ -1,3 +1,4 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -7,7 +8,8 @@ class LaunchInstallationData { required this.rootUser, required this.dnsApiToken, required this.dnsProviderType, - required this.domainName, + required this.dnsProviderApi, + required this.serverDomain, required this.serverTypeId, required this.errorCallback, required this.successCallback, @@ -15,8 +17,9 @@ class LaunchInstallationData { final User rootUser; final String dnsApiToken; - final String domainName; + final ServerDomain serverDomain; final DnsProviderType dnsProviderType; + final DnsProviderApi dnsProviderApi; final String serverTypeId; final Function() errorCallback; final Function(ServerHostingDetails details) successCallback; diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 16dac0c6..906a5525 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -135,11 +135,13 @@ class DigitalOceanServerProvider extends ServerProvider { ) async { ServerHostingDetails? serverDetails; final serverApiToken = StringGenerators.apiToken(); - final hostname = getHostnameFromDomain(installationData.domainName); + final hostname = getHostnameFromDomain( + installationData.serverDomain.domainName, + ); final serverResult = await _adapter.api().createServer( dnsApiToken: installationData.dnsApiToken, rootUser: installationData.rootUser, - domainName: installationData.domainName, + domainName: installationData.serverDomain.domainName, serverType: installationData.serverTypeId, dnsProviderType: dnsProviderToInfectName(installationData.dnsProviderType), @@ -308,6 +310,7 @@ class DigitalOceanServerProvider extends ServerProvider { return GenericResult(success: true, data: types); } + @override Future>> getServers() async { final List servers = []; final result = await _adapter.api().getServers(); @@ -345,6 +348,7 @@ class DigitalOceanServerProvider extends ServerProvider { return GenericResult(success: true, data: servers); } + @override Future>> getMetadata( final int serverId, ) async { @@ -547,6 +551,7 @@ class DigitalOceanServerProvider extends ServerProvider { ); } + @override Future> deleteServer( final String hostname, ) async { diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index b9d2296a..e58223b7 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -437,12 +437,14 @@ class HetznerServerProvider extends ServerProvider { final volume = volumeResult.data['volume']; final serverApiToken = StringGenerators.apiToken(); - final hostname = getHostnameFromDomain(installationData.domainName); + final hostname = getHostnameFromDomain( + installationData.serverDomain.domainName, + ); final serverResult = await _adapter.api().createServer( dnsApiToken: installationData.dnsApiToken, rootUser: installationData.rootUser, - domainName: installationData.domainName, + domainName: installationData.serverDomain.domainName, serverType: installationData.serverTypeId, dnsProviderType: dnsProviderToInfectName(installationData.dnsProviderType), @@ -535,7 +537,7 @@ class HetznerServerProvider extends ServerProvider { final createDnsResult = await _adapter.api().createReverseDns( serverId: serverDetails.id, ip4: serverDetails.ip4, - dnsPtr: installationData.domainName, + dnsPtr: installationData.serverDomain.domainName, ); if (!createDnsResult.success) { @@ -578,6 +580,15 @@ class HetznerServerProvider extends ServerProvider { } await installationData.successCallback(serverDetails); + await installationData.dnsProviderApi.removeSimilarRecords( + ip4: serverDetails.ip4, + domain: installationData.serverDomain, + ); + await installationData.dnsProviderApi.createMultipleDnsRecords( + ip4: serverDetails.ip4, + domain: installationData.serverDomain, + ); + return GenericResult(success: true, data: null); } From 0d55361a9bb2e43f1842167bef04aa44acd51f20 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 2 May 2023 17:05:55 -0300 Subject: [PATCH 466/732] fix: Improve installation failure dialogues --- .../server_installation_cubit.dart | 48 +++++++++---------- .../server_providers/digital_ocean.dart | 8 ++-- .../providers/server_providers/hetzner.dart | 16 +++---- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 04bfa830..940f6ede 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -262,32 +262,32 @@ class ServerInstallationCubit extends Cubit { if (!result.success && result.data != null) { bool dialoguesResolved = false; CallbackDialogueBranching branching = result.data!; - while (!dialoguesResolved) { - showPopUpAlert( - alertTitle: branching.title, - description: branching.description, - actionButtonTitle: branching.choices[1].title, - actionButtonOnPressed: () async { - final branchingResult = await branching.choices[1].callback!(); - if (branchingResult.data == null) { - dialoguesResolved = true; - return; - } + //while (!dialoguesResolved) { + showPopUpAlert( + alertTitle: branching.title, + description: branching.description, + actionButtonTitle: branching.choices[1].title, + actionButtonOnPressed: () async { + final branchingResult = await branching.choices[1].callback!(); + if (branchingResult.data == null) { + dialoguesResolved = true; + return; + } - branching = branchingResult.data!; - }, - cancelButtonTitle: branching.choices[0].title, - cancelButtonOnPressed: () async { - final branchingResult = await branching.choices[0].callback!(); - if (branchingResult.data == null) { - dialoguesResolved = true; - return; - } + branching = branchingResult.data!; + }, + cancelButtonTitle: branching.choices[0].title, + cancelButtonOnPressed: () async { + final branchingResult = await branching.choices[0].callback!(); + if (branchingResult.data == null) { + dialoguesResolved = true; + return; + } - branching = branchingResult.data!; - }, - ); - } + branching = branchingResult.data!; + }, + ); + //} } } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 906a5525..97317144 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -159,10 +159,10 @@ class DigitalOceanServerProvider extends ServerProvider { choices: [ CallbackDialogueChoice( title: 'basis.cancel'.tr(), - callback: await installationData.errorCallback(), + callback: () async => await installationData.errorCallback(), ), CallbackDialogueChoice( - title: 'basis.try_again'.tr(), + title: 'modals.try_again'.tr(), callback: () async => launchInstallation(installationData), ), ], @@ -215,7 +215,7 @@ class DigitalOceanServerProvider extends ServerProvider { callback: null, ), CallbackDialogueChoice( - title: 'basis.try_again'.tr(), + title: 'modals.try_again'.tr(), callback: () async { await Future.delayed(const Duration(seconds: 5)); final deletion = await deleteServer(hostname); @@ -595,7 +595,7 @@ class DigitalOceanServerProvider extends ServerProvider { callback: null, ), CallbackDialogueChoice( - title: 'basis.try_again'.tr(), + title: 'modals.try_again'.tr(), callback: () async { await Future.delayed(const Duration(seconds: 5)); return deleteServer(hostname); diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index e58223b7..7d4221fa 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -418,10 +418,10 @@ class HetznerServerProvider extends ServerProvider { choices: [ CallbackDialogueChoice( title: 'basis.cancel'.tr(), - callback: await installationData.errorCallback(), + callback: () async => await installationData.errorCallback(), ), CallbackDialogueChoice( - title: 'basis.try_again'.tr(), + title: 'modals.try_again'.tr(), callback: () async => launchInstallation(installationData), ), ], @@ -467,10 +467,10 @@ class HetznerServerProvider extends ServerProvider { choices: [ CallbackDialogueChoice( title: 'basis.cancel'.tr(), - callback: installationData.errorCallback(), + callback: () async => installationData.errorCallback(), ), CallbackDialogueChoice( - title: 'basis.yes'.tr(), + title: 'modals.yes'.tr(), callback: () async { final deleting = await deleteServer(hostname); if (deleting.success) { @@ -481,7 +481,7 @@ class HetznerServerProvider extends ServerProvider { }, ), ], - description: volumeResult.message ?? 'modals.destroy_server'.tr(), + description: 'modals.destroy_server'.tr(), title: 'modals.already_exists'.tr(), ), success: false, @@ -504,7 +504,7 @@ class HetznerServerProvider extends ServerProvider { }, ), CallbackDialogueChoice( - title: 'basis.try_again'.tr(), + title: 'modals.try_again'.tr(), callback: () async => launchInstallation(installationData), ), ], @@ -556,7 +556,7 @@ class HetznerServerProvider extends ServerProvider { }, ), CallbackDialogueChoice( - title: 'basis.try_again'.tr(), + title: 'modals.try_again'.tr(), callback: () async { await _adapter.api().deleteVolume(volume['id']); await Future.delayed(const Duration(seconds: 5)); @@ -631,7 +631,7 @@ class HetznerServerProvider extends ServerProvider { callback: null, ), CallbackDialogueChoice( - title: 'basis.try_again'.tr(), + title: 'modals.try_again'.tr(), callback: () async { await Future.delayed(const Duration(seconds: 5)); return deleteServer(hostname); From 30385c24702cdea9a98a9108535ae516126479e5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 2 May 2023 23:42:18 -0300 Subject: [PATCH 467/732] refactor: Create empty DnsProvider interfaces --- .../api_maps/rest_maps/api_controller.dart | 2 +- .../rest_maps/api_factory_creator.dart | 2 +- lib/logic/api_maps/staging_options.dart | 2 +- .../server_installation_cubit.dart | 2 +- .../server_installation_repository.dart | 2 +- .../providers/dns_providers/cloudflare.dart | 3 +++ .../dns_providers/digital_ocean.dart | 3 +++ .../providers/dns_providers/dns_provider.dart | 1 + .../dns_providers/dns_provider_factory.dart | 25 +++++++++++++++++++ lib/logic/providers/provider_settings.dart | 4 +-- lib/logic/providers/providers_controller.dart | 20 ++++++++++++--- .../server_providers/digital_ocean.dart | 2 +- .../providers/server_providers/hetzner.dart | 2 +- .../server_provider.dart | 0 .../server_provider_factory.dart | 2 +- 15 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 lib/logic/providers/dns_providers/cloudflare.dart create mode 100644 lib/logic/providers/dns_providers/digital_ocean.dart create mode 100644 lib/logic/providers/dns_providers/dns_provider.dart create mode 100644 lib/logic/providers/dns_providers/dns_provider_factory.dart rename lib/logic/providers/{ => server_providers}/server_provider.dart (100%) diff --git a/lib/logic/api_maps/rest_maps/api_controller.dart b/lib/logic/api_maps/rest_maps/api_controller.dart index 8e58ee6f..9cee1fe9 100644 --- a/lib/logic/api_maps/rest_maps/api_controller.dart +++ b/lib/logic/api_maps/rest_maps/api_controller.dart @@ -7,7 +7,7 @@ class ApiController { _dnsProviderApiFactory; static void initDnsProviderApiFactory( - final DnsProviderFactorySettings settings, + final DnsProviderSettings settings, ) { _dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory(settings); diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 97bb3acd..69cfa766 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -28,7 +28,7 @@ class ApiFactoryCreator { } static DnsProviderApiFactory createDnsProviderApiFactory( - final DnsProviderFactorySettings settings, + final DnsProviderSettings settings, ) { switch (settings.provider) { case DnsProviderType.cloudflare: diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index 7d3084b7..26b07e53 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -4,5 +4,5 @@ class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned by constant certificate renewal - static bool get stagingAcme => false; + static bool get stagingAcme => true; } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 940f6ede..dd8dd998 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -69,7 +69,7 @@ class ServerInstallationCubit extends Cubit { void setDnsProviderType(final DnsProviderType providerType) async { await repository.saveDnsProviderType(providerType); ApiController.initDnsProviderApiFactory( - DnsProviderFactorySettings( + DnsProviderSettings( provider: providerType, ), ); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 838fe6c9..55231904 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -73,7 +73,7 @@ class ServerInstallationRepository { (serverDomain != null && serverDomain.provider != ServerProviderType.unknown)) { ApiController.initDnsProviderApiFactory( - DnsProviderFactorySettings( + DnsProviderSettings( provider: dnsProvider ?? serverDomain!.provider, ), ); diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart new file mode 100644 index 00000000..6f973a88 --- /dev/null +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -0,0 +1,3 @@ +import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; + +class CloudflareDnsProvider extends DnsProvider {} diff --git a/lib/logic/providers/dns_providers/digital_ocean.dart b/lib/logic/providers/dns_providers/digital_ocean.dart new file mode 100644 index 00000000..2a8df75b --- /dev/null +++ b/lib/logic/providers/dns_providers/digital_ocean.dart @@ -0,0 +1,3 @@ +import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; + +class DigitalOceanDnsProvider extends DnsProvider {} diff --git a/lib/logic/providers/dns_providers/dns_provider.dart b/lib/logic/providers/dns_providers/dns_provider.dart new file mode 100644 index 00000000..9aa1f99d --- /dev/null +++ b/lib/logic/providers/dns_providers/dns_provider.dart @@ -0,0 +1 @@ +abstract class DnsProvider {} diff --git a/lib/logic/providers/dns_providers/dns_provider_factory.dart b/lib/logic/providers/dns_providers/dns_provider_factory.dart new file mode 100644 index 00000000..a5adebc9 --- /dev/null +++ b/lib/logic/providers/dns_providers/dns_provider_factory.dart @@ -0,0 +1,25 @@ +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/providers/dns_providers/cloudflare.dart'; +import 'package:selfprivacy/logic/providers/dns_providers/digital_ocean.dart'; +import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/providers/provider_settings.dart'; + +class UnknownProviderException implements Exception { + UnknownProviderException(this.message); + final String message; +} + +class DnsProviderFactory { + static DnsProvider createDnsProviderInterface( + final DnsProviderSettings settings, + ) { + switch (settings.provider) { + case DnsProviderType.cloudflare: + return CloudflareDnsProvider(); + case DnsProviderType.digitalOcean: + return DigitalOceanDnsProvider(); + case DnsProviderType.unknown: + throw UnknownProviderException('Unknown server provider'); + } + } +} diff --git a/lib/logic/providers/provider_settings.dart b/lib/logic/providers/provider_settings.dart index 8145cff7..8ffe79e6 100644 --- a/lib/logic/providers/provider_settings.dart +++ b/lib/logic/providers/provider_settings.dart @@ -11,8 +11,8 @@ class ServerProviderSettings { final String? location; } -class DnsProviderFactorySettings { - DnsProviderFactorySettings({ +class DnsProviderSettings { + DnsProviderSettings({ required this.provider, }); diff --git a/lib/logic/providers/providers_controller.dart b/lib/logic/providers/providers_controller.dart index bd72a59e..dab74221 100644 --- a/lib/logic/providers/providers_controller.dart +++ b/lib/logic/providers/providers_controller.dart @@ -1,20 +1,34 @@ +import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/providers/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; -import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/logic/providers/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/providers/server_providers/server_provider_factory.dart'; class ProvidersController { static ServerProvider? get currentServerProvider => _serverProvider; + static DnsProvider? get currentDnsProvider => _dnsProvider; static void initServerProvider( final ServerProviderSettings settings, ) { - _serverProvider = - ServerProviderFactory.createServerProviderInterface(settings); + _serverProvider = ServerProviderFactory.createServerProviderInterface( + settings, + ); + } + + static void initDnsProvider( + final DnsProviderSettings settings, + ) { + _dnsProvider = DnsProviderFactory.createDnsProviderInterface( + settings, + ); } static void clearProviders() { _serverProvider = null; + _dnsProvider = null; } static ServerProvider? _serverProvider; + static DnsProvider? _dnsProvider; } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 97317144..01b27ef1 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; -import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/logic/providers/server_providers/server_provider.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 7d4221fa..9e6cce8b 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -13,7 +13,7 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_metadata.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; -import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/logic/providers/server_providers/server_provider.dart'; import 'package:selfprivacy/utils/extensions/string_extensions.dart'; import 'package:selfprivacy/utils/network_utils.dart'; import 'package:selfprivacy/utils/password_generator.dart'; diff --git a/lib/logic/providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart similarity index 100% rename from lib/logic/providers/server_provider.dart rename to lib/logic/providers/server_providers/server_provider.dart diff --git a/lib/logic/providers/server_providers/server_provider_factory.dart b/lib/logic/providers/server_providers/server_provider_factory.dart index 2d35ecba..786b1c02 100644 --- a/lib/logic/providers/server_providers/server_provider_factory.dart +++ b/lib/logic/providers/server_providers/server_provider_factory.dart @@ -1,6 +1,6 @@ import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/providers/server_provider.dart'; +import 'package:selfprivacy/logic/providers/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/providers/server_providers/digital_ocean.dart'; import 'package:selfprivacy/logic/providers/server_providers/hetzner.dart'; From 5cbf399a584bb8163aa65c970d5e4df37479f8db Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 2 May 2023 23:49:13 -0300 Subject: [PATCH 468/732] fix: Remove accidental hardcode for staging options --- lib/logic/api_maps/staging_options.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index 26b07e53..7d3084b7 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -4,5 +4,5 @@ class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned by constant certificate renewal - static bool get stagingAcme => true; + static bool get stagingAcme => false; } From 72a04a54b3c05a62b2f23c26bb20f7a93c5858b9 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 3 May 2023 00:01:44 -0300 Subject: [PATCH 469/732] refactor: Remove low level ApiController and replace Dns interfaces --- .../api_maps/rest_maps/api_controller.dart | 21 ------- .../rest_maps/api_factory_creator.dart | 57 ------------------- .../digital_ocean/digital_ocean_api.dart | 1 - .../cubit/dns_records/dns_records_cubit.dart | 48 ++++++++-------- .../initializing/domain_setup_cubit.dart | 12 ++-- .../server_installation_cubit.dart | 16 ++---- .../server_installation_repository.dart | 25 ++++---- .../models/launch_installation_data.dart | 6 +- .../providers/server_providers/hetzner.dart | 4 +- 9 files changed, 49 insertions(+), 141 deletions(-) delete mode 100644 lib/logic/api_maps/rest_maps/api_controller.dart delete mode 100644 lib/logic/api_maps/rest_maps/api_factory_creator.dart diff --git a/lib/logic/api_maps/rest_maps/api_controller.dart b/lib/logic/api_maps/rest_maps/api_controller.dart deleted file mode 100644 index 9cee1fe9..00000000 --- a/lib/logic/api_maps/rest_maps/api_controller.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_creator.dart'; -import 'package:selfprivacy/logic/providers/provider_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; - -class ApiController { - static DnsProviderApiFactory? get currentDnsProviderApiFactory => - _dnsProviderApiFactory; - - static void initDnsProviderApiFactory( - final DnsProviderSettings settings, - ) { - _dnsProviderApiFactory = - ApiFactoryCreator.createDnsProviderApiFactory(settings); - } - - static void clearProviderApiFactories() { - _dnsProviderApiFactory = null; - } - - static DnsProviderApiFactory? _dnsProviderApiFactory; -} diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart deleted file mode 100644 index 69cfa766..00000000 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'package:selfprivacy/logic/providers/provider_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; - -class UnknownApiProviderException implements Exception { - UnknownApiProviderException(this.message); - final String message; -} - -class ApiFactoryCreator { - static ServerProviderApiFactory createServerProviderApiFactory( - final ServerProviderSettings settings, - ) { - switch (settings.provider) { - case ServerProviderType.hetzner: - return HetznerApiFactory(region: settings.location); - case ServerProviderType.digitalOcean: - return DigitalOceanApiFactory(region: settings.location); - case ServerProviderType.unknown: - throw UnknownApiProviderException('Unknown server provider'); - } - } - - static DnsProviderApiFactory createDnsProviderApiFactory( - final DnsProviderSettings settings, - ) { - switch (settings.provider) { - case DnsProviderType.cloudflare: - return CloudflareApiFactory(); - case DnsProviderType.digitalOcean: - return DigitalOceanDnsApiFactory(); - case DnsProviderType.unknown: - throw UnknownApiProviderException('Unknown DNS provider'); - } - } -} - -class VolumeApiFactoryCreator { - static VolumeProviderApiFactory createVolumeProviderApiFactory( - final ServerProviderSettings settings, - ) { - switch (settings.provider) { - case ServerProviderType.hetzner: - return HetznerApiFactory(); - case ServerProviderType.digitalOcean: - return DigitalOceanApiFactory(); - case ServerProviderType.unknown: - throw UnknownApiProviderException('Unknown volume provider'); - } - } -} diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index e6c5f1b4..990a06e4 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -7,7 +7,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_pro import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/utils/password_generator.dart'; diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 589fb1ff..3905ff33 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,11 +1,11 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; +import 'package:selfprivacy/logic/providers/providers_controller.dart'; import 'package:selfprivacy/utils/network_utils.dart'; part 'dns_records_state.dart'; @@ -25,14 +25,12 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: ApiController.currentDnsProviderApiFactory! - .getDnsProvider() - .getDesiredDnsRecords( - domainName: - serverInstallationCubit.state.serverDomain?.domainName, - dkimPublicKey: '', - ipAddress: '', - ), + dnsRecords: + ProvidersController.currentDnsProvider!.getDesiredDnsRecords( + domainName: serverInstallationCubit.state.serverDomain?.domainName, + dkimPublicKey: '', + ipAddress: '', + ), ), ); @@ -41,20 +39,17 @@ class DnsRecordsCubit final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; if (domain != null && ipAddress != null) { - final List records = await ApiController - .currentDnsProviderApiFactory! - .getDnsProvider() + final List records = await ProvidersController + .currentDnsProvider! .getDnsRecords(domain: domain); final String? dkimPublicKey = extractDkimRecord(await api.getDnsRecords())?.content; - final List desiredRecords = ApiController - .currentDnsProviderApiFactory! - .getDnsProvider() - .getDesiredDnsRecords( - domainName: domain.domainName, - ipAddress: ipAddress, - dkimPublicKey: dkimPublicKey, - ); + final List desiredRecords = + ProvidersController.currentDnsProvider!.getDesiredDnsRecords( + domainName: domain.domainName, + ipAddress: ipAddress, + dkimPublicKey: dkimPublicKey, + ); final List foundRecords = []; for (final DesiredDnsRecord desiredRecord in desiredRecords) { if (desiredRecord.description == 'record.dkim') { @@ -128,10 +123,10 @@ class DnsRecordsCubit emit(state.copyWith(dnsState: DnsRecordsStatus.refreshing)); final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; - final DnsProviderApi dnsProviderApi = - ApiController.currentDnsProviderApiFactory!.getDnsProvider(); - await dnsProviderApi.removeSimilarRecords(domain: domain!); - await dnsProviderApi.createMultipleDnsRecords( + await ProvidersController.currentDnsProvider!.removeSimilarRecords( + domain: domain!, + ); + await ProvidersController.currentDnsProvider!.createMultipleDnsRecords( domain: domain, ip4: ipAddress, ); @@ -139,7 +134,10 @@ class DnsRecordsCubit final List records = await api.getDnsRecords(); final DnsRecord? dkimRecord = extractDkimRecord(records); if (dkimRecord != null) { - await dnsProviderApi.setDnsRecord(dkimRecord, domain); + await ProvidersController.currentDnsProvider!.setDnsRecord( + dkimRecord, + domain, + ); } await load(); diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index 0afe77c2..cb6e1a6e 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -1,7 +1,7 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/providers/providers_controller.dart'; class DomainSetupCubit extends Cubit { DomainSetupCubit(this.serverInstallationCubit) : super(Initial()); @@ -10,9 +10,8 @@ class DomainSetupCubit extends Cubit { Future load() async { emit(Loading(LoadingTypes.loadingDomain)); - final List list = await ApiController.currentDnsProviderApiFactory! - .getDnsProvider() - .domainList(); + final List list = + await ProvidersController.currentDnsProvider!.domainList(); if (list.isEmpty) { emit(Empty()); } else if (list.length == 1) { @@ -28,9 +27,8 @@ class DomainSetupCubit extends Cubit { emit(Loading(LoadingTypes.saving)); - final String? zoneId = await ApiController.currentDnsProviderApiFactory! - .getDnsProvider() - .getZoneId(domainName); + final String? zoneId = + await ProvidersController.currentDnsProvider!.getZoneId(domainName); if (zoneId != null) { final ServerDomain domain = ServerDomain( diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index dd8dd998..ca8b0958 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -5,11 +5,9 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -68,7 +66,7 @@ class ServerInstallationCubit extends Cubit { void setDnsProviderType(final DnsProviderType providerType) async { await repository.saveDnsProviderType(providerType); - ApiController.initDnsProviderApiFactory( + ProvidersController.initDnsProvider( DnsProviderSettings( provider: providerType, ), @@ -97,11 +95,9 @@ class ServerInstallationCubit extends Cubit { final String providerToken, ) async { final GenericResult apiResponse = - await ApiController.currentDnsProviderApiFactory! - .getDnsProvider( - settings: const DnsProviderApiSettings(isWithToken: false), - ) - .isApiTokenValid(providerToken); + await ProvidersController.currentDnsProvider!.tryInitApiByToken( + providerToken, + ); if (!apiResponse.success) { getIt().showSnackBar( @@ -250,8 +246,7 @@ class ServerInstallationCubit extends Cubit { serverTypeId: state.serverTypeIdentificator!, errorCallback: clearAppConfig, successCallback: onCreateServerSuccess, - dnsProviderApi: - ApiController.currentDnsProviderApiFactory!.getDnsProvider(), + dnsProvider: ProvidersController.currentDnsProvider!, ); final result = @@ -754,7 +749,6 @@ class ServerInstallationCubit extends Cubit { void clearAppConfig() { closeTimer(); - ApiController.clearProviderApiFactories(); ProvidersController.clearProviders(); repository.clearAppConfig(); emit(const ServerInstallationEmpty()); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 55231904..6c352a88 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -10,12 +10,10 @@ import 'package:hive/hive.dart'; import 'package:pub_semver/pub_semver.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -72,7 +70,7 @@ class ServerInstallationRepository { if (dnsProvider != null || (serverDomain != null && serverDomain.provider != ServerProviderType.unknown)) { - ApiController.initDnsProviderApiFactory( + ProvidersController.initDnsProvider( DnsProviderSettings( provider: dnsProvider ?? serverDomain!.provider, ), @@ -239,8 +237,6 @@ class ServerInstallationRepository { final ServerDomain domain, { required final void Function() onCancel, }) async { - final DnsProviderApi dnsProviderApi = - ApiController.currentDnsProviderApiFactory!.getDnsProvider(); final serverProvider = ProvidersController.currentServerProvider!; void showDomainErrorPopUp(final String error) { @@ -259,7 +255,7 @@ class ServerInstallationRepository { } final GenericResult removingResult = - await dnsProviderApi.removeSimilarRecords( + await ProvidersController.currentDnsProvider!.removeSimilarRecords( ip4: serverDetails.ip4, domain: domain, ); @@ -272,8 +268,9 @@ class ServerInstallationRepository { bool createdSuccessfully = false; String errorMessage = 'domain.error'.tr(); try { - final GenericResult createResult = - await dnsProviderApi.createMultipleDnsRecords( + final GenericResult createResult = await ProvidersController + .currentDnsProvider! + .createMultipleDnsRecords( ip4: serverDetails.ip4, domain: domain, ); @@ -293,8 +290,6 @@ class ServerInstallationRepository { } Future createDkimRecord(final ServerDomain cloudFlareDomain) async { - final DnsProviderApi dnsProviderApi = - ApiController.currentDnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); late DnsRecord record; @@ -305,7 +300,10 @@ class ServerInstallationRepository { rethrow; } - await dnsProviderApi.setDnsRecord(record, cloudFlareDomain); + await ProvidersController.currentDnsProvider!.setDnsRecord( + record, + cloudFlareDomain, + ); } Future isHttpServerWorking() async { @@ -677,9 +675,8 @@ class ServerInstallationRepository { await box.put(BNames.isLoading, false); await box.put(BNames.serverDetails, null); - final GenericResult removalResult = await ApiController - .currentDnsProviderApiFactory! - .getDnsProvider() + final GenericResult removalResult = await ProvidersController + .currentDnsProvider! .removeSimilarRecords(domain: serverDomain); if (!removalResult.success) { diff --git a/lib/logic/models/launch_installation_data.dart b/lib/logic/models/launch_installation_data.dart index 9a394923..37638835 100644 --- a/lib/logic/models/launch_installation_data.dart +++ b/lib/logic/models/launch_installation_data.dart @@ -1,14 +1,14 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; class LaunchInstallationData { LaunchInstallationData({ required this.rootUser, required this.dnsApiToken, required this.dnsProviderType, - required this.dnsProviderApi, + required this.dnsProvider, required this.serverDomain, required this.serverTypeId, required this.errorCallback, @@ -19,7 +19,7 @@ class LaunchInstallationData { final String dnsApiToken; final ServerDomain serverDomain; final DnsProviderType dnsProviderType; - final DnsProviderApi dnsProviderApi; + final DnsProvider dnsProvider; final String serverTypeId; final Function() errorCallback; final Function(ServerHostingDetails details) successCallback; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 9e6cce8b..dedcabfe 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -580,11 +580,11 @@ class HetznerServerProvider extends ServerProvider { } await installationData.successCallback(serverDetails); - await installationData.dnsProviderApi.removeSimilarRecords( + await installationData.dnsProvider.removeSimilarRecords( ip4: serverDetails.ip4, domain: installationData.serverDomain, ); - await installationData.dnsProviderApi.createMultipleDnsRecords( + await installationData.dnsProvider.createMultipleDnsRecords( ip4: serverDetails.ip4, domain: installationData.serverDomain, ); From 234064ed72820d6721279b267c94ae7e86d51d6c Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 9 May 2023 03:15:48 -0300 Subject: [PATCH 470/732] feat: Implement infrastructure for new DNS provider deSEC --- assets/images/logos/desec.svg | 89 +++++ lib/config/hive_config.dart | 3 + .../rest_maps/api_factory_creator.dart | 3 + .../rest_maps/dns_providers/desec/desec.dart | 287 ++++++++++++++++ .../dns_providers/desec/desec_factory.dart | 16 + .../server_installation_cubit.dart | 9 + .../server_installation_repository.dart | 4 + lib/logic/get_it/api_config.dart | 10 + lib/logic/models/hive/server_domain.dart | 2 + .../initializing/dns_provider_picker.dart | 307 ++++++++++++++++++ .../setup/initializing/initializing.dart | 60 +--- 11 files changed, 742 insertions(+), 48 deletions(-) create mode 100644 assets/images/logos/desec.svg create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart create mode 100644 lib/ui/pages/setup/initializing/dns_provider_picker.dart diff --git a/assets/images/logos/desec.svg b/assets/images/logos/desec.svg new file mode 100644 index 00000000..cb54b268 --- /dev/null +++ b/assets/images/logos/desec.svg @@ -0,0 +1,89 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index b6ba018c..44b03f26 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -93,6 +93,9 @@ class BNames { /// A String field of [serverInstallationBox] box. static String serverProvider = 'serverProvider'; + /// A String field of [serverInstallationBox] box. + static String dnsProvider = 'dnsProvider'; + /// A String field of [serverLocation] box. static String serverLocation = 'serverLocation'; diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 25518f3c..c1762429 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart'; @@ -30,6 +31,8 @@ class ApiFactoryCreator { final DnsProviderApiFactorySettings settings, ) { switch (settings.provider) { + case DnsProvider.desec: + return DesecApiFactory(); case DnsProvider.cloudflare: return CloudflareApiFactory(); case DnsProvider.unknown: diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart new file mode 100644 index 00000000..1906be55 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -0,0 +1,287 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; + +class DesecApi extends DnsProviderApi { + DesecApi({ + this.hasLogger = false, + this.isWithToken = true, + this.customToken, + }); + @override + final bool hasLogger; + @override + final bool isWithToken; + + final String? customToken; + + @override + RegExp getApiTokenValidation() => + RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + + @override + BaseOptions get options { + final BaseOptions options = BaseOptions(baseUrl: rootAddress); + if (isWithToken) { + final String? token = getIt().cloudFlareKey; + assert(token != null); + options.headers = {'Authorization': 'Bearer $token'}; + } + + if (customToken != null) { + options.headers = {'Authorization': 'Bearer $customToken'}; + } + + if (validateStatus != null) { + options.validateStatus = validateStatus!; + } + return options; + } + + @override + String rootAddress = 'https://desec.io/api/v1/domains/'; + + @override + Future> isApiTokenValid(final String token) async { + bool isValid = false; + Response? response; + String message = ''; + final Dio client = await getClient(); + try { + response = await client.get( + '', + options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), + headers: {'Authorization': 'Token $token'}, + ), + ); + } catch (e) { + print(e); + isValid = false; + message = e.toString(); + } finally { + close(client); + } + + if (response == null) { + return APIGenericResult( + data: isValid, + success: false, + message: message, + ); + } + + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + + return APIGenericResult( + data: isValid, + success: true, + message: response.statusMessage, + ); + } + + @override + Future getZoneId(final String domain) async => domain; + + @override + Future> removeSimilarRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final String domainName = domain.domainName; + final String url = '/$domainName/rrsets/'; + + final Dio client = await getClient(); + try { + final Response response = await client.get(url); + + final List records = response.data['result'] ?? []; + await client.put(url, data: records); + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return APIGenericResult(success: true, data: null); + } + + @override + Future> getDnsRecords({ + required final ServerDomain domain, + }) async { + Response response; + final String domainName = domain.domainName; + final List allRecords = []; + + final String url = '/$domainName/rrsets/'; + + final Dio client = await getClient(); + try { + response = await client.get(url); + final List records = response.data['result'] ?? []; + + for (final record in records) { + allRecords.add( + DnsRecord( + name: record['subname'], + type: record['type'], + content: record['records'], + ttl: record['ttl'], + ), + ); + } + } catch (e) { + print(e); + } finally { + close(client); + } + + return allRecords; + } + + @override + Future> createMultipleDnsRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final String domainName = domain.domainName; + final List listDnsRecords = projectDnsRecords(domainName, ip4); + final List allCreateFutures = []; + + final Dio client = await getClient(); + try { + for (final DnsRecord record in listDnsRecords) { + allCreateFutures.add( + client.post( + '/$domainName/rrsets/', + data: record.toJson(), + ), + ); + } + await Future.wait(allCreateFutures); + } on DioError catch (e) { + print(e.message); + rethrow; + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return APIGenericResult(success: true, data: null); + } + + List projectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = + DnsRecord(type: 'A', name: domainName, content: ip4); + + final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: 'v=DMARC1; p=none', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } + + @override + Future setDnsRecord( + final DnsRecord record, + final ServerDomain domain, + ) async { + final String domainZoneId = domain.zoneId; + final String url = '$rootAddress/zones/$domainZoneId/dns_records'; + + final Dio client = await getClient(); + try { + await client.post( + url, + data: record.toJson(), + ); + } catch (e) { + print(e); + } finally { + close(client); + } + } + + @override + Future> domainList() async { + final String url = '$rootAddress/zones'; + List domains = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get( + url, + queryParameters: {'per_page': 50}, + ); + domains = response.data['result'] + .map((final el) => el['name'] as String) + .toList(); + } catch (e) { + print(e); + } finally { + close(client); + } + + return domains; + } +} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart new file mode 100644 index 00000000..6c10259b --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart @@ -0,0 +1,16 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; + +class DesecApiFactory extends DnsProviderApiFactory { + @override + DnsProviderApi getDnsProvider({ + final DnsProviderApiSettings settings = const DnsProviderApiSettings(), + }) => + DesecApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + customToken: settings.customToken, + ); +} diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 5638b765..06df6d5a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -66,6 +66,15 @@ class ServerInstallationCubit extends Cubit { ); } + void setDnsProviderType(final DnsProvider providerType) async { + await repository.saveDnsProviderType(providerType); + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: providerType, + ), + ); + } + ProviderApiTokenValidation serverProviderApiTokenValidation() => ApiController.currentServerProviderApiFactory! .getServerProvider() diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 5d45e7b9..851b2be5 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -706,6 +706,10 @@ class ServerInstallationRepository { getIt().init(); } + Future saveDnsProviderType(final DnsProvider type) async { + await getIt().storeDnsProviderType(type); + } + Future saveBackblazeKey( final BackblazeCredential backblazeCredential, ) async { diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 434c9b32..11d73a85 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -14,6 +14,8 @@ class ApiConfigModel { String? get serverType => _serverType; String? get cloudFlareKey => _cloudFlareKey; ServerProvider? get serverProvider => _serverProvider; + DnsProvider? get dnsProvider => _dnsProvider; + BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; @@ -23,6 +25,7 @@ class ApiConfigModel { String? _cloudFlareKey; String? _serverType; ServerProvider? _serverProvider; + DnsProvider? _dnsProvider; ServerHostingDetails? _serverDetails; BackblazeCredential? _backblazeCredential; ServerDomain? _serverDomain; @@ -33,6 +36,11 @@ class ApiConfigModel { _serverProvider = value; } + Future storeDnsProviderType(final DnsProvider value) async { + await _box.put(BNames.dnsProvider, value); + _dnsProvider = value; + } + Future storeServerProviderKey(final String value) async { await _box.put(BNames.hetznerKey, value); _serverProviderKey = value; @@ -75,6 +83,7 @@ class ApiConfigModel { void clear() { _serverProviderKey = null; + _dnsProvider = null; _serverLocation = null; _cloudFlareKey = null; _backblazeCredential = null; @@ -95,5 +104,6 @@ class ApiConfigModel { _backblazeBucket = _box.get(BNames.backblazeBucket); _serverType = _box.get(BNames.serverTypeIdentifier); _serverProvider = _box.get(BNames.serverProvider); + _dnsProvider = _box.get(BNames.dnsProvider); } } diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index 9b5d32c1..913fcd42 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -29,4 +29,6 @@ enum DnsProvider { unknown, @HiveField(1) cloudflare, + @HiveField(2) + desec } diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart new file mode 100644 index 00000000..cb0d2111 --- /dev/null +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -0,0 +1,307 @@ +import 'package:cubit_form/cubit_form.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; +import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/utils/launch_url.dart'; + +class DnsProviderPicker extends StatefulWidget { + const DnsProviderPicker({ + required this.formCubit, + required this.serverInstallationCubit, + super.key, + }); + + final DnsProviderFormCubit formCubit; + final ServerInstallationCubit serverInstallationCubit; + + @override + State createState() => _DnsProviderPickerState(); +} + +class _DnsProviderPickerState extends State { + DnsProvider selectedProvider = DnsProvider.unknown; + + void setProvider(final DnsProvider provider) { + setState(() { + selectedProvider = provider; + }); + } + + @override + Widget build(final BuildContext context) { + switch (selectedProvider) { + case DnsProvider.unknown: + return ProviderSelectionPage( + serverInstallationCubit: widget.serverInstallationCubit, + callback: setProvider, + ); + + case DnsProvider.cloudflare: + return ProviderInputDataPage( + providerCubit: widget.formCubit, + providerInfo: ProviderPageInfo( + providerType: DnsProvider.cloudflare, + pathToHow: 'how_cloudflare', + image: Image.asset( + 'assets/images/logos/cloudflare.png', + width: 150, + ), + ), + ); + + case DnsProvider.desec: + return ProviderInputDataPage( + providerCubit: widget.formCubit, + providerInfo: ProviderPageInfo( + providerType: DnsProvider.desec, + pathToHow: 'how_digital_ocean_dns', + image: Image.asset( + 'assets/images/logos/digital_ocean.png', + width: 150, + ), + ), + ); + } + } +} + +class ProviderPageInfo { + const ProviderPageInfo({ + required this.providerType, + required this.pathToHow, + required this.image, + }); + + final String pathToHow; + final Image image; + final DnsProvider providerType; +} + +class ProviderInputDataPage extends StatelessWidget { + const ProviderInputDataPage({ + required this.providerInfo, + required this.providerCubit, + super.key, + }); + + final ProviderPageInfo providerInfo; + final DnsProviderFormCubit providerCubit; + + @override + Widget build(final BuildContext context) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.connect_to_dns'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.connect_to_server_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 32), + CubitFormTextField( + formFieldCubit: providerCubit.apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'Provider API Token', + ), + ), + const SizedBox(height: 32), + BrandButton.rised( + text: 'basis.connect'.tr(), + onPressed: () => providerCubit.trySubmit(), + ), + const SizedBox(height: 10), + BrandOutlinedButton( + child: Text('initializing.how'.tr()), + onPressed: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => Padding( + padding: paddingH15V0, + child: ListView( + padding: const EdgeInsets.symmetric(vertical: 16), + children: [ + BrandMarkdown( + fileName: providerInfo.pathToHow, + ), + ], + ), + ), + ), + ), + ], + ); +} + +class ProviderSelectionPage extends StatelessWidget { + const ProviderSelectionPage({ + required this.callback, + required this.serverInstallationCubit, + super.key, + }); + + final Function callback; + final ServerInstallationCubit serverInstallationCubit; + + @override + Widget build(final BuildContext context) => SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.select_dns'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 10), + Text( + 'initializing.select_provider'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 10), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 241, 215, 166), + ), + child: SvgPicture.asset( + 'assets/images/logos/cloudflare.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Hetzner Cloud', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_cloudflare' + .tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.cloudflare); + callback(DnsProvider.cloudflare); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchURL('https://dash.cloudflare.com/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 245, 229, 82), + ), + child: SvgPicture.asset( + 'assets/images/logos/desec.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'deSEC', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.desec); + callback(DnsProvider.desec); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => launchURL('https://desec.io/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), + ], + ), + ); +} diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 199203c3..749fbdc9 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -17,6 +17,7 @@ import 'package:selfprivacy/ui/components/drawers/progress_drawer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/dns_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_type_picker.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; @@ -39,7 +40,7 @@ class InitializingPage extends StatelessWidget { actualInitializingPage = [ () => _stepServerProviderToken(cubit), () => _stepServerType(cubit), - () => _stepCloudflare(cubit), + () => _stepDnsProviderToken(cubit), () => _stepBackblaze(cubit), () => _stepDomain(cubit), () => _stepUser(cubit), @@ -238,56 +239,19 @@ class InitializingPage extends StatelessWidget { ), ); - Widget _stepCloudflare(final ServerInstallationCubit initializingCubit) => + Widget _stepDnsProviderToken( + final ServerInstallationCubit initializingCubit, + ) => BlocProvider( create: (final context) => DnsProviderFormCubit(initializingCubit), child: Builder( - builder: (final context) => ResponsiveLayoutWithInfobox( - topChild: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '${'initializing.connect_to_server_provider'.tr()}Cloudflare', - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.manage_domain_dns'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - primaryColumn: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CubitFormTextField( - formFieldCubit: context.read().apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: InputDecoration( - hintText: 'initializing.cloudflare_api_token'.tr(), - ), - ), - const SizedBox(height: 32), - BrandButton.filled( - onPressed: () => - context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - const SizedBox(height: 10), - BrandOutlinedButton( - onPressed: () { - context.read().showArticle( - article: 'how_cloudflare', - context: context, - ); - Scaffold.of(context).openEndDrawer(); - }, - title: 'initializing.how'.tr(), - ), - ], - ), - ), + builder: (final context) { + final providerCubit = context.watch(); + return DnsProviderPicker( + formCubit: providerCubit, + serverInstallationCubit: initializingCubit, + ); + }, ), ); From af90ddd78a5579462cea73b2246183ec80b4bb9a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 12 May 2023 03:07:43 -0300 Subject: [PATCH 471/732] feat: Implement deSEC API support --- .../rest_maps/dns_providers/desec/desec.dart | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 1906be55..63c7acba 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -172,7 +172,18 @@ class DesecApi extends DnsProviderApi { allCreateFutures.add( client.post( '/$domainName/rrsets/', - data: record.toJson(), + data: record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + }, ), ); } @@ -198,10 +209,9 @@ class DesecApi extends DnsProviderApi { final String? domainName, final String? ip4, ) { - final DnsRecord domainA = - DnsRecord(type: 'A', name: domainName, content: ip4); + final DnsRecord domainA = DnsRecord(type: 'A', name: null, content: ip4); - final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord mx = DnsRecord(type: 'MX', name: null, content: domainName); final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); @@ -221,7 +231,7 @@ class DesecApi extends DnsProviderApi { final DnsRecord txt2 = DnsRecord( type: 'TXT', - name: domainName, + name: null, content: 'v=spf1 a mx ip4:$ip4 -all', ttl: 18000, ); @@ -246,14 +256,24 @@ class DesecApi extends DnsProviderApi { final DnsRecord record, final ServerDomain domain, ) async { - final String domainZoneId = domain.zoneId; - final String url = '$rootAddress/zones/$domainZoneId/dns_records'; + final String url = '/${domain.domainName}/rrsets/'; final Dio client = await getClient(); try { await client.post( url, - data: record.toJson(), + data: record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + }, ); } catch (e) { print(e); @@ -264,14 +284,12 @@ class DesecApi extends DnsProviderApi { @override Future> domainList() async { - final String url = '$rootAddress/zones'; List domains = []; final Dio client = await getClient(); try { final Response response = await client.get( - url, - queryParameters: {'per_page': 50}, + '', ); domains = response.data['result'] .map((final el) => el['name'] as String) From 56dd40e90e7eba31abf8a8435445c9782cbd415e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 12 May 2023 16:32:19 -0300 Subject: [PATCH 472/732] fix: Adjust graphql schemas to new dns provider - fix runtime bugs --- .../schema/disk_volumes.graphql.dart | 1 + .../graphql_maps/schema/schema.graphql | 3 +- .../graphql_maps/schema/schema.graphql.dart | 6 +- .../graphql_maps/schema/server_api.graphql | 9 + .../schema/server_api.graphql.dart | 546 +++++++++++++++++- .../schema/server_settings.graphql.dart | 2 +- .../graphql_maps/schema/services.graphql.dart | 1 - .../graphql_maps/schema/users.graphql.dart | 2 +- .../graphql_maps/server_api/server_api.dart | 20 + .../dns_providers/cloudflare/cloudflare.dart | 2 +- .../rest_maps/dns_providers/desec/desec.dart | 12 +- .../digital_ocean/digital_ocean.dart | 4 +- .../server_providers/hetzner/hetzner.dart | 6 +- .../server_providers/server_provider.dart | 15 + .../initializing/dns_provider_form_cubit.dart | 4 +- .../server_installation_cubit.dart | 37 +- .../server_installation_repository.dart | 45 +- .../server_installation_state.dart | 40 +- lib/logic/get_it/api_config.dart | 12 +- lib/logic/models/hive/server_domain.dart | 14 +- lib/logic/models/hive/server_domain.g.dart | 5 + ...udflare.dart => recovery_confirm_dns.dart} | 4 +- .../setup/recovering/recovery_routing.dart | 6 +- lib/ui/router/router.gr.dart | 526 ++++++++--------- 24 files changed, 968 insertions(+), 354 deletions(-) rename lib/ui/pages/setup/recovering/{recovery_confirm_cloudflare.dart => recovery_confirm_dns.dart} (96%) diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 22409ef9..9ffbfe0b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -3,6 +3,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index ed167742..89bc30c8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -75,7 +75,8 @@ type DeviceApiTokenMutationReturn implements MutationReturnInterface { } enum DnsProvider { - CLOUDFLARE + CLOUDFLARE, + DESEC } type DnsRecord { diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 1b92ccad..8548e4dd 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1096,12 +1096,14 @@ class _CopyWithStubImpl$Input$UserMutationInput _res; } -enum Enum$DnsProvider { CLOUDFLARE, $unknown } +enum Enum$DnsProvider { CLOUDFLARE, DESEC, $unknown } String toJson$Enum$DnsProvider(Enum$DnsProvider e) { switch (e) { case Enum$DnsProvider.CLOUDFLARE: return r'CLOUDFLARE'; + case Enum$DnsProvider.DESEC: + return r'DESEC'; case Enum$DnsProvider.$unknown: return r'$unknown'; } @@ -1111,6 +1113,8 @@ Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { switch (value) { case r'CLOUDFLARE': return Enum$DnsProvider.CLOUDFLARE; + case r'DESEC': + return Enum$DnsProvider.DESEC; default: return Enum$DnsProvider.$unknown; } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index d4339094..35df3749 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -72,6 +72,15 @@ query SystemServerProvider { } } +query SystemDnsProvider { + system { + domainInfo { + provider + } + } +} + + query GetApiTokens { api { devices { diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 4bb33228..4eda2c92 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -6380,6 +6380,550 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system$provider _res; } +class Query$SystemDnsProvider { + Query$SystemDnsProvider({ + required this.system, + required this.$__typename, + }); + + factory Query$SystemDnsProvider.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider( + system: Query$SystemDnsProvider$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$SystemDnsProvider$system system; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([ + l$system, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemDnsProvider) || + runtimeType != other.runtimeType) { + return false; + } + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider on Query$SystemDnsProvider { + CopyWith$Query$SystemDnsProvider get copyWith => + CopyWith$Query$SystemDnsProvider( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$SystemDnsProvider { + factory CopyWith$Query$SystemDnsProvider( + Query$SystemDnsProvider instance, + TRes Function(Query$SystemDnsProvider) then, + ) = _CopyWithImpl$Query$SystemDnsProvider; + + factory CopyWith$Query$SystemDnsProvider.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider; + + TRes call({ + Query$SystemDnsProvider$system? system, + String? $__typename, + }); + CopyWith$Query$SystemDnsProvider$system get system; +} + +class _CopyWithImpl$Query$SystemDnsProvider + implements CopyWith$Query$SystemDnsProvider { + _CopyWithImpl$Query$SystemDnsProvider( + this._instance, + this._then, + ); + + final Query$SystemDnsProvider _instance; + + final TRes Function(Query$SystemDnsProvider) _then; + + static const _undefined = {}; + + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$SystemDnsProvider( + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemDnsProvider$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$SystemDnsProvider$system get system { + final local$system = _instance.system; + return CopyWith$Query$SystemDnsProvider$system( + local$system, (e) => call(system: e)); + } +} + +class _CopyWithStubImpl$Query$SystemDnsProvider + implements CopyWith$Query$SystemDnsProvider { + _CopyWithStubImpl$Query$SystemDnsProvider(this._res); + + TRes _res; + + call({ + Query$SystemDnsProvider$system? system, + String? $__typename, + }) => + _res; + CopyWith$Query$SystemDnsProvider$system get system => + CopyWith$Query$SystemDnsProvider$system.stub(_res); +} + +const documentNodeQuerySystemDnsProvider = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'SystemDnsProvider'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), +]); +Query$SystemDnsProvider _parserFn$Query$SystemDnsProvider( + Map data) => + Query$SystemDnsProvider.fromJson(data); + +class Options$Query$SystemDnsProvider + extends graphql.QueryOptions { + Options$Query$SystemDnsProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemDnsProvider, + parserFn: _parserFn$Query$SystemDnsProvider, + ); +} + +class WatchOptions$Query$SystemDnsProvider + extends graphql.WatchQueryOptions { + WatchOptions$Query$SystemDnsProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemDnsProvider, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemDnsProvider, + ); +} + +class FetchMoreOptions$Query$SystemDnsProvider + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$SystemDnsProvider( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQuerySystemDnsProvider, + ); +} + +extension ClientExtension$Query$SystemDnsProvider on graphql.GraphQLClient { + Future> query$SystemDnsProvider( + [Options$Query$SystemDnsProvider? options]) async => + await this.query(options ?? Options$Query$SystemDnsProvider()); + graphql.ObservableQuery watchQuery$SystemDnsProvider( + [WatchOptions$Query$SystemDnsProvider? options]) => + this.watchQuery(options ?? WatchOptions$Query$SystemDnsProvider()); + void writeQuery$SystemDnsProvider({ + required Query$SystemDnsProvider data, + bool broadcast = true, + }) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemDnsProvider)), + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemDnsProvider? readQuery$SystemDnsProvider( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemDnsProvider)), + optimistic: optimistic, + ); + return result == null ? null : Query$SystemDnsProvider.fromJson(result); + } +} + +class Query$SystemDnsProvider$system { + Query$SystemDnsProvider$system({ + required this.domainInfo, + required this.$__typename, + }); + + factory Query$SystemDnsProvider$system.fromJson(Map json) { + final l$domainInfo = json['domainInfo']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider$system( + domainInfo: Query$SystemDnsProvider$system$domainInfo.fromJson( + (l$domainInfo as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$SystemDnsProvider$system$domainInfo domainInfo; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$domainInfo = domainInfo; + _resultData['domainInfo'] = l$domainInfo.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$domainInfo = domainInfo; + final l$$__typename = $__typename; + return Object.hashAll([ + l$domainInfo, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemDnsProvider$system) || + runtimeType != other.runtimeType) { + return false; + } + final l$domainInfo = domainInfo; + final lOther$domainInfo = other.domainInfo; + if (l$domainInfo != lOther$domainInfo) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider$system + on Query$SystemDnsProvider$system { + CopyWith$Query$SystemDnsProvider$system + get copyWith => CopyWith$Query$SystemDnsProvider$system( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$SystemDnsProvider$system { + factory CopyWith$Query$SystemDnsProvider$system( + Query$SystemDnsProvider$system instance, + TRes Function(Query$SystemDnsProvider$system) then, + ) = _CopyWithImpl$Query$SystemDnsProvider$system; + + factory CopyWith$Query$SystemDnsProvider$system.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider$system; + + TRes call({ + Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename, + }); + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo; +} + +class _CopyWithImpl$Query$SystemDnsProvider$system + implements CopyWith$Query$SystemDnsProvider$system { + _CopyWithImpl$Query$SystemDnsProvider$system( + this._instance, + this._then, + ); + + final Query$SystemDnsProvider$system _instance; + + final TRes Function(Query$SystemDnsProvider$system) _then; + + static const _undefined = {}; + + TRes call({ + Object? domainInfo = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$SystemDnsProvider$system( + domainInfo: domainInfo == _undefined || domainInfo == null + ? _instance.domainInfo + : (domainInfo as Query$SystemDnsProvider$system$domainInfo), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo { + final local$domainInfo = _instance.domainInfo; + return CopyWith$Query$SystemDnsProvider$system$domainInfo( + local$domainInfo, (e) => call(domainInfo: e)); + } +} + +class _CopyWithStubImpl$Query$SystemDnsProvider$system + implements CopyWith$Query$SystemDnsProvider$system { + _CopyWithStubImpl$Query$SystemDnsProvider$system(this._res); + + TRes _res; + + call({ + Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename, + }) => + _res; + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo => + CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(_res); +} + +class Query$SystemDnsProvider$system$domainInfo { + Query$SystemDnsProvider$system$domainInfo({ + required this.provider, + required this.$__typename, + }); + + factory Query$SystemDnsProvider$system$domainInfo.fromJson( + Map json) { + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider$system$domainInfo( + provider: fromJson$Enum$DnsProvider((l$provider as String)), + $__typename: (l$$__typename as String), + ); + } + + final Enum$DnsProvider provider; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$DnsProvider(l$provider); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$provider = provider; + final l$$__typename = $__typename; + return Object.hashAll([ + l$provider, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemDnsProvider$system$domainInfo) || + runtimeType != other.runtimeType) { + return false; + } + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider$system$domainInfo + on Query$SystemDnsProvider$system$domainInfo { + CopyWith$Query$SystemDnsProvider$system$domainInfo< + Query$SystemDnsProvider$system$domainInfo> + get copyWith => CopyWith$Query$SystemDnsProvider$system$domainInfo( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$SystemDnsProvider$system$domainInfo { + factory CopyWith$Query$SystemDnsProvider$system$domainInfo( + Query$SystemDnsProvider$system$domainInfo instance, + TRes Function(Query$SystemDnsProvider$system$domainInfo) then, + ) = _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo; + + factory CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo; + + TRes call({ + Enum$DnsProvider? provider, + String? $__typename, + }); +} + +class _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo + implements CopyWith$Query$SystemDnsProvider$system$domainInfo { + _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo( + this._instance, + this._then, + ); + + final Query$SystemDnsProvider$system$domainInfo _instance; + + final TRes Function(Query$SystemDnsProvider$system$domainInfo) _then; + + static const _undefined = {}; + + TRes call({ + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$SystemDnsProvider$system$domainInfo( + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$DnsProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo + implements CopyWith$Query$SystemDnsProvider$system$domainInfo { + _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo(this._res); + + TRes _res; + + call({ + Enum$DnsProvider? provider, + String? $__typename, + }) => + _res; +} + class Query$GetApiTokens { Query$GetApiTokens({ required this.api, diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 14996423..8da4e347 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index dfea309c..1501d709 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index c2d0027f..dbc8eccc 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index bb703103..51da63ac 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dar import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; @@ -87,6 +88,25 @@ class ServerApi extends ApiMap return providerType; } + Future getDnsProviderType() async { + QueryResult response; + DnsProvider providerType = DnsProvider.unknown; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$SystemDnsProvider(); + if (response.hasException) { + print(response.exception.toString()); + } + providerType = DnsProvider.fromGraphQL( + response.parsedData!.system.domainInfo.provider, + ); + } catch (e) { + print(e); + } + return providerType; + } + Future isUsingBinds() async { QueryResult response; bool usesBinds = false; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 14cf5c96..04ff622b 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -27,7 +27,7 @@ class CloudflareApi extends DnsProviderApi { BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); if (isWithToken) { - final String? token = getIt().cloudFlareKey; + final String? token = getIt().dnsProviderKey; assert(token != null); options.headers = {'Authorization': 'Bearer $token'}; } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 63c7acba..4e55bbfa 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -27,13 +27,13 @@ class DesecApi extends DnsProviderApi { BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); if (isWithToken) { - final String? token = getIt().cloudFlareKey; + final String? token = getIt().dnsProviderKey; assert(token != null); - options.headers = {'Authorization': 'Bearer $token'}; + options.headers = {'Authorization': 'Token $token'}; } if (customToken != null) { - options.headers = {'Authorization': 'Bearer $customToken'}; + options.headers = {'Authorization': 'Token $customToken'}; } if (validateStatus != null) { @@ -107,7 +107,7 @@ class DesecApi extends DnsProviderApi { try { final Response response = await client.get(url); - final List records = response.data['result'] ?? []; + final List records = response.data; await client.put(url, data: records); } catch (e) { print(e); @@ -136,7 +136,7 @@ class DesecApi extends DnsProviderApi { final Dio client = await getClient(); try { response = await client.get(url); - final List records = response.data['result'] ?? []; + final List records = response.data; for (final record in records) { allRecords.add( @@ -291,7 +291,7 @@ class DesecApi extends DnsProviderApi { final Response response = await client.get( '', ); - domains = response.data['result'] + domains = response.data .map((final el) => el['name'] as String) .toList(); } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index b2f4c624..21861dd8 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -332,6 +332,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }) async { ServerHostingDetails? serverDetails; @@ -344,9 +345,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String formattedHostname = getHostnameFromDomain(domainName); const String infectBranch = 'providers/digital-ocean'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; + final String dnsProviderType = dnsProviderToInfectName(dnsProvider); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | DNS_PROVIDER_TYPE=$dnsProviderType PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); Response? serverCreateResponse; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 7f51c768..c2228030 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -356,6 +356,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }) async { final APIGenericResult newVolumeResponse = await createVolume(); @@ -374,6 +375,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { domainName: domainName, volume: newVolumeResponse.data!, serverType: serverType, + dnsProvider: dnsProvider, ); } @@ -383,6 +385,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String domainName, required final ServerVolume volume, required final String serverType, + required final DnsProvider dnsProvider, }) async { final Dio client = await getClient(); @@ -395,9 +398,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); + final String dnsProviderType = dnsProviderToInfectName(dnsProvider); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; Response? serverCreateResponse; ServerHostingDetails? serverDetails; diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index c858d67b..ae7911d0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -39,6 +39,7 @@ abstract class ServerProviderApi extends ApiMap { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }); Future> createReverseDns({ required final ServerHostingDetails serverDetails, @@ -54,6 +55,20 @@ abstract class ServerProviderApi extends ApiMap { final DateTime end, ); + String dnsProviderToInfectName(final DnsProvider dnsProvider) { + String dnsProviderType; + switch (dnsProvider) { + case DnsProvider.desec: + dnsProviderType = 'DESEC'; + break; + case DnsProvider.cloudflare: + default: + dnsProviderType = 'CLOUDFLARE'; + break; + } + return dnsProviderType; + } + /// Provider name key which lets infect understand what kind of installation /// it requires, for example 'digitaloceal' for Digital Ocean String get infectProviderName; diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index 553c3492..edb97de6 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class DnsProviderFormCubit extends FormCubit { DnsProviderFormCubit(this.initializingCubit) { @@ -11,7 +10,6 @@ class DnsProviderFormCubit extends FormCubit { initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - LengthStringNotEqualValidation(40) ], ); @@ -20,7 +18,7 @@ class DnsProviderFormCubit extends FormCubit { @override FutureOr onSubmit() async { - initializingCubit.setCloudflareKey(apiKey.state.value); + initializingCubit.setDnsApiToken(apiKey.state.value); } final ServerInstallationCubit initializingCubit; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 06df6d5a..cc5bffcc 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -110,16 +110,6 @@ class ServerInstallationCubit extends Cubit { Future isDnsProviderApiTokenValid( final String providerToken, ) async { - if (ApiController.currentDnsProviderApiFactory == null) { - // No other DNS provider is supported for now, - // so it's safe to hardcode Cloudflare - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: DnsProvider.cloudflare, - ), - ); - } - final APIGenericResult apiResponse = await ApiController.currentDnsProviderApiFactory! .getDnsProvider( @@ -223,16 +213,16 @@ class ServerInstallationCubit extends Cubit { ); } - void setCloudflareKey(final String cloudFlareKey) async { + void setDnsApiToken(final String dnsApiToken) async { if (state is ServerInstallationRecovery) { - setAndValidateCloudflareToken(cloudFlareKey); + setAndValidateDnsApiToken(dnsApiToken); return; } - await repository.saveCloudFlareKey(cloudFlareKey); + await repository.saveDnsProviderKey(dnsApiToken); emit( (state as ServerInstallationNotFinished) - .copyWith(cloudFlareKey: cloudFlareKey), + .copyWith(dnsApiToken: dnsApiToken), ); } @@ -293,7 +283,7 @@ class ServerInstallationCubit extends Cubit { await repository.createServer( state.rootUser!, state.serverDomain!.domainName, - state.cloudFlareKey!, + state.dnsApiToken!, state.backblazeCredential!, onCancel: onCancel, onSuccess: onSuccess, @@ -595,7 +585,7 @@ class ServerInstallationCubit extends Cubit { ), ); break; - case RecoveryStep.cloudflareToken: + case RecoveryStep.dnsProviderToken: repository.deleteServerDetails(); emit( dataState.copyWith( @@ -691,12 +681,12 @@ class ServerInstallationCubit extends Cubit { emit( dataState.copyWith( serverDetails: serverDetails, - currentStep: RecoveryStep.cloudflareToken, + currentStep: RecoveryStep.dnsProviderToken, ), ); } - Future setAndValidateCloudflareToken(final String token) async { + Future setAndValidateDnsApiToken(final String token) async { final ServerInstallationRecovery dataState = state as ServerInstallationRecovery; final ServerDomain? serverDomain = dataState.serverDomain; @@ -714,10 +704,13 @@ class ServerInstallationCubit extends Cubit { ServerDomain( domainName: serverDomain.domainName, zoneId: zoneId, - provider: DnsProvider.cloudflare, + provider: await ServerApi( + customToken: token, + isWithToken: true, + ).getDnsProviderType(), ), ); - await repository.saveCloudFlareKey(token); + await repository.saveDnsProviderKey(token); emit( dataState.copyWith( serverDomain: ServerDomain( @@ -725,7 +718,7 @@ class ServerInstallationCubit extends Cubit { zoneId: zoneId, provider: DnsProvider.cloudflare, ), - cloudFlareKey: token, + dnsApiToken: token, currentStep: RecoveryStep.backblazeToken, ), ); @@ -776,7 +769,7 @@ class ServerInstallationCubit extends Cubit { ServerInstallationNotFinished( providerApiToken: state.providerApiToken, serverDomain: state.serverDomain, - cloudFlareKey: state.cloudFlareKey, + dnsApiToken: state.dnsApiToken, backblazeCredential: state.backblazeCredential, rootUser: state.rootUser, serverDetails: null, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 851b2be5..ff167518 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -45,7 +45,7 @@ class ServerInstallationRepository { Future load() async { final String? providerApiToken = getIt().serverProviderKey; final String? location = getIt().serverLocation; - final String? cloudflareToken = getIt().cloudFlareKey; + final String? dnsApiToken = getIt().dnsProviderKey; final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; final ServerProvider? serverProvider = @@ -54,6 +54,7 @@ class ServerInstallationRepository { getIt().backblazeCredential; final ServerHostingDetails? serverDetails = getIt().serverDetails; + final DnsProvider? dnsProvider = getIt().dnsProvider; if (serverProvider != null || (serverDetails != null && @@ -75,18 +76,21 @@ class ServerInstallationRepository { ); } - // No other DNS provider is supported for now, so it's fine. - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: DnsProvider.cloudflare, - ), - ); + if (dnsProvider != null || + (serverDomain != null && + serverDomain.provider != DnsProvider.unknown)) { + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: dnsProvider ?? serverDomain!.provider, + ), + ); + } if (box.get(BNames.hasFinalChecked, defaultValue: false)) { return ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudflareToken!, + dnsApiToken: dnsApiToken!, serverDomain: serverDomain!, backblazeCredential: backblazeCredential!, serverDetails: serverDetails!, @@ -103,14 +107,14 @@ class ServerInstallationRepository { serverDomain != null) { return ServerInstallationRecovery( providerApiToken: providerApiToken, - cloudFlareKey: cloudflareToken, + dnsApiToken: dnsApiToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), currentStep: _getCurrentRecoveryStep( providerApiToken, - cloudflareToken, + dnsApiToken, serverDomain, serverDetails, ), @@ -120,7 +124,7 @@ class ServerInstallationRepository { return ServerInstallationNotFinished( providerApiToken: providerApiToken, - cloudFlareKey: cloudflareToken, + dnsApiToken: dnsApiToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, serverDetails: serverDetails, @@ -147,7 +151,7 @@ class ServerInstallationRepository { if (serverDomain.provider != DnsProvider.unknown) { return RecoveryStep.backblazeToken; } - return RecoveryStep.cloudflareToken; + return RecoveryStep.dnsProviderToken; } return RecoveryStep.serverSelection; } @@ -238,7 +242,7 @@ class ServerInstallationRepository { Future createServer( final User rootUser, final String domainName, - final String cloudFlareKey, + final String dnsApiToken, final BackblazeCredential backblazeCredential, { required final void Function() onCancel, required final Future Function(ServerHostingDetails serverDetails) @@ -256,7 +260,8 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { final APIGenericResult createResult = await api.createServer( - dnsApiToken: cloudFlareKey, + dnsProvider: getIt().dnsProvider!, + dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, @@ -280,7 +285,8 @@ class ServerInstallationRepository { try { final APIGenericResult createServerResult = await api.createServer( - dnsApiToken: cloudFlareKey, + dnsProvider: getIt().dnsProvider!, + dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, @@ -304,7 +310,8 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { final APIGenericResult createResult = await api.createServer( - dnsApiToken: cloudFlareKey, + dnsProvider: getIt().dnsProvider!, + dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, @@ -721,11 +728,11 @@ class ServerInstallationRepository { getIt().init(); } - Future saveCloudFlareKey(final String key) async { - await getIt().storeCloudFlareKey(key); + Future saveDnsProviderKey(final String key) async { + await getIt().storeDnsProviderKey(key); } - Future deleteCloudFlareKey() async { + Future deleteDnsProviderKey() async { await box.delete(BNames.cloudFlareKey); getIt().init(); } diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 331c3e2a..5ceaafdd 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -4,7 +4,7 @@ abstract class ServerInstallationState extends Equatable { const ServerInstallationState({ required this.providerApiToken, required this.serverTypeIdentificator, - required this.cloudFlareKey, + required this.dnsApiToken, required this.backblazeCredential, required this.serverDomain, required this.rootUser, @@ -18,7 +18,7 @@ abstract class ServerInstallationState extends Equatable { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -28,7 +28,7 @@ abstract class ServerInstallationState extends Equatable { ]; final String? providerApiToken; - final String? cloudFlareKey; + final String? dnsApiToken; final String? serverTypeIdentificator; final BackblazeCredential? backblazeCredential; final ServerDomain? serverDomain; @@ -40,7 +40,7 @@ abstract class ServerInstallationState extends Equatable { bool get isServerProviderApiKeyFilled => providerApiToken != null; bool get isServerTypeFilled => serverTypeIdentificator != null; - bool get isDnsProviderFilled => cloudFlareKey != null; + bool get isDnsProviderFilled => dnsApiToken != null; bool get isBackupsProviderFilled => backblazeCredential != null; bool get isDomainSelected => serverDomain != null; bool get isPrimaryUserFilled => rootUser != null; @@ -87,7 +87,7 @@ class TimerState extends ServerInstallationNotFinished { }) : super( providerApiToken: dataState.providerApiToken, serverTypeIdentificator: dataState.serverTypeIdentificator, - cloudFlareKey: dataState.cloudFlareKey, + dnsApiToken: dataState.dnsApiToken, backblazeCredential: dataState.backblazeCredential, serverDomain: dataState.serverDomain, rootUser: dataState.rootUser, @@ -114,7 +114,7 @@ enum ServerSetupProgress { nothingYet, serverProviderFilled, servertTypeFilled, - cloudFlareFilled, + dnsProviderFilled, backblazeFilled, domainFilled, userFilled, @@ -133,7 +133,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { required this.dnsMatches, super.providerApiToken, super.serverTypeIdentificator, - super.cloudFlareKey, + super.dnsApiToken, super.backblazeCredential, super.serverDomain, super.rootUser, @@ -146,7 +146,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -160,7 +160,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationNotFinished copyWith({ final String? providerApiToken, final String? serverTypeIdentificator, - final String? cloudFlareKey, + final String? dnsApiToken, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, @@ -175,7 +175,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { providerApiToken: providerApiToken ?? this.providerApiToken, serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, - cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, + dnsApiToken: dnsApiToken ?? this.dnsApiToken, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, rootUser: rootUser ?? this.rootUser, @@ -192,7 +192,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudFlareKey!, + dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, rootUser: rootUser!, @@ -208,7 +208,7 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { : super( providerApiToken: null, serverTypeIdentificator: null, - cloudFlareKey: null, + dnsApiToken: null, backblazeCredential: null, serverDomain: null, rootUser: null, @@ -225,7 +225,7 @@ class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ required String super.providerApiToken, required String super.serverTypeIdentificator, - required String super.cloudFlareKey, + required String super.dnsApiToken, required BackblazeCredential super.backblazeCredential, required ServerDomain super.serverDomain, required User super.rootUser, @@ -239,7 +239,7 @@ class ServerInstallationFinished extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -256,7 +256,7 @@ enum RecoveryStep { oldToken, serverProviderToken, serverSelection, - cloudflareToken, + dnsProviderToken, backblazeToken, } @@ -278,7 +278,7 @@ class ServerInstallationRecovery extends ServerInstallationState { required this.recoveryCapabilities, super.providerApiToken, super.serverTypeIdentificator, - super.cloudFlareKey, + super.dnsApiToken, super.backblazeCredential, super.serverDomain, super.rootUser, @@ -295,7 +295,7 @@ class ServerInstallationRecovery extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -308,7 +308,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationRecovery copyWith({ final String? providerApiToken, final String? serverTypeIdentificator, - final String? cloudFlareKey, + final String? dnsApiToken, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, @@ -320,7 +320,7 @@ class ServerInstallationRecovery extends ServerInstallationState { providerApiToken: providerApiToken ?? this.providerApiToken, serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, - cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, + dnsApiToken: dnsApiToken ?? this.dnsApiToken, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, rootUser: rootUser ?? this.rootUser, @@ -332,7 +332,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudFlareKey!, + dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, rootUser: rootUser!, diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 11d73a85..ba49b9b3 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -12,7 +12,7 @@ class ApiConfigModel { String? get serverProviderKey => _serverProviderKey; String? get serverLocation => _serverLocation; String? get serverType => _serverType; - String? get cloudFlareKey => _cloudFlareKey; + String? get dnsProviderKey => _dnsProviderKey; ServerProvider? get serverProvider => _serverProvider; DnsProvider? get dnsProvider => _dnsProvider; @@ -22,7 +22,7 @@ class ApiConfigModel { String? _serverProviderKey; String? _serverLocation; - String? _cloudFlareKey; + String? _dnsProviderKey; String? _serverType; ServerProvider? _serverProvider; DnsProvider? _dnsProvider; @@ -46,9 +46,9 @@ class ApiConfigModel { _serverProviderKey = value; } - Future storeCloudFlareKey(final String value) async { + Future storeDnsProviderKey(final String value) async { await _box.put(BNames.cloudFlareKey, value); - _cloudFlareKey = value; + _dnsProviderKey = value; } Future storeServerTypeIdentifier(final String typeIdentifier) async { @@ -85,7 +85,7 @@ class ApiConfigModel { _serverProviderKey = null; _dnsProvider = null; _serverLocation = null; - _cloudFlareKey = null; + _dnsProviderKey = null; _backblazeCredential = null; _serverDomain = null; _serverDetails = null; @@ -97,7 +97,7 @@ class ApiConfigModel { void init() { _serverProviderKey = _box.get(BNames.hetznerKey); _serverLocation = _box.get(BNames.serverLocation); - _cloudFlareKey = _box.get(BNames.cloudFlareKey); + _dnsProviderKey = _box.get(BNames.cloudFlareKey); _backblazeCredential = _box.get(BNames.backblazeCredential); _serverDomain = _box.get(BNames.serverDomain); _serverDetails = _box.get(BNames.serverDetails); diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index 913fcd42..de3ef92a 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -1,4 +1,5 @@ import 'package:hive/hive.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; part 'server_domain.g.dart'; @@ -30,5 +31,16 @@ enum DnsProvider { @HiveField(1) cloudflare, @HiveField(2) - desec + desec; + + factory DnsProvider.fromGraphQL(final Enum$DnsProvider provider) { + switch (provider) { + case Enum$DnsProvider.CLOUDFLARE: + return cloudflare; + case Enum$DnsProvider.DESEC: + return desec; + default: + return unknown; + } + } } diff --git a/lib/logic/models/hive/server_domain.g.dart b/lib/logic/models/hive/server_domain.g.dart index 3265db6b..6770d9bc 100644 --- a/lib/logic/models/hive/server_domain.g.dart +++ b/lib/logic/models/hive/server_domain.g.dart @@ -58,6 +58,8 @@ class DnsProviderAdapter extends TypeAdapter { return DnsProvider.unknown; case 1: return DnsProvider.cloudflare; + case 2: + return DnsProvider.desec; default: return DnsProvider.unknown; } @@ -72,6 +74,9 @@ class DnsProviderAdapter extends TypeAdapter { case DnsProvider.cloudflare: writer.writeByte(1); break; + case DnsProvider.desec: + writer.writeByte(2); + break; } } diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart similarity index 96% rename from lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart rename to lib/ui/pages/setup/recovering/recovery_confirm_dns.dart index 93c889a5..9dcad056 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart @@ -7,8 +7,8 @@ import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; -class RecoveryConfirmCloudflare extends StatelessWidget { - const RecoveryConfirmCloudflare({super.key}); +class RecoveryConfirmDns extends StatelessWidget { + const RecoveryConfirmDns({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 14c3f9a7..be5eb2ea 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart' import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_recovery_key.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_new_device_key.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_backblaze.dart'; -import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart'; +import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_dns.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_server.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_server_provider_connected.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_method_select.dart'; @@ -55,8 +55,8 @@ class RecoveryRouting extends StatelessWidget { case RecoveryStep.serverSelection: currentPage = const RecoveryConfirmServer(); break; - case RecoveryStep.cloudflareToken: - currentPage = const RecoveryConfirmCloudflare(); + case RecoveryStep.dnsProviderToken: + currentPage = const RecoveryConfirmDns(); break; case RecoveryStep.backblazeToken: currentPage = const RecoveryConfirmBackblaze(); diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index 328c5f76..675056f3 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -14,52 +14,16 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { - AboutApplicationRoute.name: (routeData) { + BackupDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AboutApplicationPage(), + child: const BackupDetailsPage(), ); }, - AppSettingsRoute.name: (routeData) { + RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AppSettingsPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - MoreRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const MorePage(), - ); - }, - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), - ); - }, - ProvidersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ProvidersPage(), - ); - }, - ServerDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServerDetailsScreen(), + child: WrappedRoute(child: const RootPage()), ); }, ServiceRoute.name: (routeData) { @@ -78,6 +42,12 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, + ServerDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServerDetailsScreen(), + ); + }, UsersRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -100,10 +70,46 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - BackupDetailsRoute.name: (routeData) { + AppSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const BackupDetailsPage(), + child: const AppSettingsPage(), + ); + }, + DeveloperSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DeveloperSettingsPage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + ProvidersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ProvidersPage(), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), ); }, DnsDetailsRoute.name: (routeData) { @@ -124,26 +130,12 @@ abstract class _$RootRouter extends RootStackRouter { child: const InitializingPage(), ); }, - RecoveryKeyRoute.name: (routeData) { + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: const RecoveryKeyPage(), - ); - }, - DevicesRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DevicesScreen(), - ); - }, - ServicesMigrationRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServicesMigrationPage( - services: args.services, + child: ServerStoragePage( diskStatus: args.diskStatus, - isMigration: args.isMigration, key: args.key, ), ); @@ -159,133 +151,57 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: ServerStoragePage( + child: ServicesMigrationPage( + services: args.services, diskStatus: args.diskStatus, + isMigration: args.isMigration, key: args.key, ), ); }, - RootRoute.name: (routeData) { + DevicesRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: WrappedRoute(child: const RootPage()), + child: const DevicesScreen(), + ); + }, + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), ); }, }; } /// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) : super( - AboutApplicationRoute.name, + BackupDetailsRoute.name, initialChildren: children, ); - static const String name = 'AboutApplicationRoute'; + static const String name = 'BackupDetailsRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [AppSettingsPage] -class AppSettingsRoute extends PageRouteInfo { - const AppSettingsRoute({List? children}) +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) : super( - AppSettingsRoute.name, + RootRoute.name, initialChildren: children, ); - static const String name = 'AppSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DeveloperSettingsPage] -class DeveloperSettingsRoute extends PageRouteInfo { - const DeveloperSettingsRoute({List? children}) - : super( - DeveloperSettingsRoute.name, - initialChildren: children, - ); - - static const String name = 'DeveloperSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ConsolePage] -class ConsoleRoute extends PageRouteInfo { - const ConsoleRoute({List? children}) - : super( - ConsoleRoute.name, - initialChildren: children, - ); - - static const String name = 'ConsoleRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [MorePage] -class MoreRoute extends PageRouteInfo { - const MoreRoute({List? children}) - : super( - MoreRoute.name, - initialChildren: children, - ); - - static const String name = 'MoreRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) - : super( - OnboardingRoute.name, - initialChildren: children, - ); - - static const String name = 'OnboardingRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ProvidersPage] -class ProvidersRoute extends PageRouteInfo { - const ProvidersRoute({List? children}) - : super( - ProvidersRoute.name, - initialChildren: children, - ); - - static const String name = 'ProvidersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) - : super( - ServerDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'ServerDetailsRoute'; + static const String name = 'RootRoute'; static const PageInfo page = PageInfo(name); } @@ -342,6 +258,20 @@ class ServicesRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) + : super( + ServerDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'ServerDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [UsersPage] class UsersRoute extends PageRouteInfo { @@ -409,15 +339,99 @@ class UserDetailsRouteArgs { } /// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) +/// [AppSettingsPage] +class AppSettingsRoute extends PageRouteInfo { + const AppSettingsRoute({List? children}) : super( - BackupDetailsRoute.name, + AppSettingsRoute.name, initialChildren: children, ); - static const String name = 'BackupDetailsRoute'; + static const String name = 'AppSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DeveloperSettingsPage] +class DeveloperSettingsRoute extends PageRouteInfo { + const DeveloperSettingsRoute({List? children}) + : super( + DeveloperSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'DeveloperSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute({List? children}) + : super( + MoreRoute.name, + initialChildren: children, + ); + + static const String name = 'MoreRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute({List? children}) + : super( + ConsoleRoute.name, + initialChildren: children, + ); + + static const String name = 'ConsoleRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ProvidersPage] +class ProvidersRoute extends PageRouteInfo { + const ProvidersRoute({List? children}) + : super( + ProvidersRoute.name, + initialChildren: children, + ); + + static const String name = 'ProvidersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [RecoveryKeyPage] +class RecoveryKeyRoute extends PageRouteInfo { + const RecoveryKeyRoute({List? children}) + : super( + RecoveryKeyRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryKeyRoute'; static const PageInfo page = PageInfo(name); } @@ -465,31 +479,84 @@ class InitializingRoute extends PageRouteInfo { } /// generated route for -/// [RecoveryKeyPage] -class RecoveryKeyRoute extends PageRouteInfo { - const RecoveryKeyRoute({List? children}) - : super( - RecoveryKeyRoute.name, +/// [ServerStoragePage] +class ServerStorageRoute extends PageRouteInfo { + ServerStorageRoute({ + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ServerStorageRoute.name, + args: ServerStorageRouteArgs( + diskStatus: diskStatus, + key: key, + ), initialChildren: children, ); - static const String name = 'RecoveryKeyRoute'; + static const String name = 'ServerStorageRoute'; - static const PageInfo page = PageInfo(name); + static const PageInfo page = + PageInfo(name); +} + +class ServerStorageRouteArgs { + const ServerStorageRouteArgs({ + required this.diskStatus, + this.key, + }); + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; + } } /// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) - : super( - DevicesRoute.name, +/// [ExtendingVolumePage] +class ExtendingVolumeRoute extends PageRouteInfo { + ExtendingVolumeRoute({ + required DiskVolume diskVolumeToResize, + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ExtendingVolumeRoute.name, + args: ExtendingVolumeRouteArgs( + diskVolumeToResize: diskVolumeToResize, + diskStatus: diskStatus, + key: key, + ), initialChildren: children, ); - static const String name = 'DevicesRoute'; + static const String name = 'ExtendingVolumeRoute'; - static const PageInfo page = PageInfo(name); + static const PageInfo page = + PageInfo(name); +} + +class ExtendingVolumeRouteArgs { + const ExtendingVolumeRouteArgs({ + required this.diskVolumeToResize, + required this.diskStatus, + this.key, + }); + + final DiskVolume diskVolumeToResize; + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; + } } /// generated route for @@ -541,96 +608,29 @@ class ServicesMigrationRouteArgs { } /// generated route for -/// [ExtendingVolumePage] -class ExtendingVolumeRoute extends PageRouteInfo { - ExtendingVolumeRoute({ - required DiskVolume diskVolumeToResize, - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ExtendingVolumeRoute.name, - args: ExtendingVolumeRouteArgs( - diskVolumeToResize: diskVolumeToResize, - diskStatus: diskStatus, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ExtendingVolumeRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ExtendingVolumeRouteArgs { - const ExtendingVolumeRouteArgs({ - required this.diskVolumeToResize, - required this.diskStatus, - this.key, - }); - - final DiskVolume diskVolumeToResize; - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; - } -} - -/// generated route for -/// [ServerStoragePage] -class ServerStorageRoute extends PageRouteInfo { - ServerStorageRoute({ - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ServerStorageRoute.name, - args: ServerStorageRouteArgs( - diskStatus: diskStatus, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ServerStorageRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ServerStorageRouteArgs { - const ServerStorageRouteArgs({ - required this.diskStatus, - this.key, - }); - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; - } -} - -/// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) : super( - RootRoute.name, + DevicesRoute.name, initialChildren: children, ); - static const String name = 'RootRoute'; + static const String name = 'DevicesRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; static const PageInfo page = PageInfo(name); } From 0fb404bed43dc5adcd56bc4e23ceca7ba68e4441 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 15 May 2023 12:22:06 +0300 Subject: [PATCH 473/732] fix(ui): Privacy policy link --- lib/ui/pages/more/about_application.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 54e493de..1fa5c932 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -50,7 +50,7 @@ class AboutApplicationPage extends StatelessWidget { children: [ TextButton( onPressed: () => launchUrl( - Uri.parse('https://selfprivacy.ru/privacy-policy'), + Uri.parse('https://selfprivacy.org/privacy-policy/'), mode: LaunchMode.externalApplication, ), child: Text('about_application_page.privacy_policy'.tr()), From e9665ad75d1dcc2cd4768801a6f939eebcd53917 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 11:06:01 -0300 Subject: [PATCH 474/732] feat: Implement polymorphic DNS check for DNS API --- .../dns_providers/cloudflare/cloudflare.dart | 144 +++++++++++ .../rest_maps/dns_providers/desec/desec.dart | 226 +++++++++++++++--- .../rest_maps/dns_providers/dns_provider.dart | 12 +- .../server_providers/hetzner/hetzner.dart | 2 +- .../cubit/dns_records/dns_records_cubit.dart | 92 +++---- lib/utils/network_utils.dart | 81 ------- 6 files changed, 385 insertions(+), 172 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 04ff622b..eb22e4d8 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; class CloudflareApi extends DnsProviderApi { CloudflareApi({ @@ -317,4 +318,147 @@ class CloudflareApi extends DnsProviderApi { return domains; } + + @override + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ) async { + final List records = await getDnsRecords(domain: domain); + final List foundRecords = []; + try { + final List desiredRecords = + getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); + for (final DesiredDnsRecord record in desiredRecords) { + if (record.description == 'record.dkim') { + final DnsRecord foundRecord = records.firstWhere( + (final r) => (r.name == record.name) && r.type == record.type, + orElse: () => DnsRecord( + name: record.name, + type: record.type, + content: '', + ttl: 800, + proxied: false, + ), + ); + // remove all spaces and tabulators from + // the foundRecord.content and the record.content + // to compare them + final String? foundContent = + foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); + final String content = record.content.replaceAll(RegExp(r'\s+'), ''); + if (foundContent == content) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } else { + if (records.any( + (final r) => + (r.name == record.name) && + r.type == record.type && + r.content == record.content, + )) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } + } + } catch (e) { + print(e); + return APIGenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + return APIGenericResult( + data: foundRecords, + success: true, + ); + } + + @override + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ) { + if (domainName == null || ip4 == null) { + return []; + } + return [ + DesiredDnsRecord( + name: domainName, + content: ip4, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ip4, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ip4, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ip4, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ip4, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ip4, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ip4, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ip4, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: domainName, + content: domainName, + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: 'v=DMARC1; p=none', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 4e55bbfa..91eed57a 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; class DesecApi extends DnsProviderApi { DesecApi({ @@ -61,6 +62,7 @@ class DesecApi extends DnsProviderApi { headers: {'Authorization': 'Token $token'}, ), ); + await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); isValid = false; @@ -102,13 +104,29 @@ class DesecApi extends DnsProviderApi { }) async { final String domainName = domain.domainName; final String url = '/$domainName/rrsets/'; + final List listDnsRecords = projectDnsRecords(domainName, ip4); final Dio client = await getClient(); try { - final Response response = await client.get(url); - - final List records = response.data; - await client.put(url, data: records); + final List bulkRecords = []; + for (final DnsRecord record in listDnsRecords) { + bulkRecords.add( + record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [], + }, + ); + } + await client.put(url, data: bulkRecords); + await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); return APIGenericResult( @@ -136,14 +154,18 @@ class DesecApi extends DnsProviderApi { final Dio client = await getClient(); try { response = await client.get(url); + await Future.delayed(const Duration(seconds: 1)); final List records = response.data; for (final record in records) { + final String? content = (record['records'] is List) + ? record['records'][0] + : record['records']; allRecords.add( DnsRecord( name: record['subname'], type: record['type'], - content: record['records'], + content: content, ttl: record['ttl'], ), ); @@ -164,30 +186,31 @@ class DesecApi extends DnsProviderApi { }) async { final String domainName = domain.domainName; final List listDnsRecords = projectDnsRecords(domainName, ip4); - final List allCreateFutures = []; final Dio client = await getClient(); try { + final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { - allCreateFutures.add( - client.post( - '/$domainName/rrsets/', - data: record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [record.content], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [record.content], - }, - ), + bulkRecords.add( + record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + }, ); } - await Future.wait(allCreateFutures); + await client.post( + '/$domainName/rrsets/', + data: bulkRecords, + ); + await Future.delayed(const Duration(seconds: 1)); } on DioError catch (e) { print(e.message); rethrow; @@ -209,9 +232,10 @@ class DesecApi extends DnsProviderApi { final String? domainName, final String? ip4, ) { - final DnsRecord domainA = DnsRecord(type: 'A', name: null, content: ip4); + final DnsRecord domainA = DnsRecord(type: 'A', name: '', content: ip4); - final DnsRecord mx = DnsRecord(type: 'MX', name: null, content: domainName); + final DnsRecord mx = + DnsRecord(type: 'MX', name: '', content: '10 $domainName.'); final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); @@ -225,14 +249,14 @@ class DesecApi extends DnsProviderApi { final DnsRecord txt1 = DnsRecord( type: 'TXT', name: '_dmarc', - content: 'v=DMARC1; p=none', + content: '"v=DMARC1; p=none"', ttl: 18000, ); final DnsRecord txt2 = DnsRecord( type: 'TXT', - name: null, - content: 'v=spf1 a mx ip4:$ip4 -all', + name: '', + content: '"v=spf1 a mx ip4:$ip4 -all"', ttl: 18000, ); @@ -275,6 +299,7 @@ class DesecApi extends DnsProviderApi { 'records': [record.content], }, ); + await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); } finally { @@ -291,6 +316,7 @@ class DesecApi extends DnsProviderApi { final Response response = await client.get( '', ); + await Future.delayed(const Duration(seconds: 1)); domains = response.data .map((final el) => el['name'] as String) .toList(); @@ -302,4 +328,148 @@ class DesecApi extends DnsProviderApi { return domains; } + + @override + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ) async { + final List records = await getDnsRecords(domain: domain); + final List foundRecords = []; + try { + final List desiredRecords = + getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); + for (final DesiredDnsRecord record in desiredRecords) { + if (record.description == 'record.dkim') { + final DnsRecord foundRecord = records.firstWhere( + (final r) => (r.name == record.name) && r.type == record.type, + orElse: () => DnsRecord( + name: record.name, + type: record.type, + content: '', + ttl: 800, + proxied: false, + ), + ); + // remove all spaces and tabulators from + // the foundRecord.content and the record.content + // to compare them + final String? foundContent = + foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); + final String content = record.content.replaceAll(RegExp(r'\s+'), ''); + if (foundContent == content) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } else { + if (records.any( + (final r) => + ('${r.name}.${domain.domainName}' == record.name || + record.name == '') && + r.type == record.type && + r.content == record.content, + )) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } + } + } catch (e) { + print(e); + return APIGenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + return APIGenericResult( + data: foundRecords, + success: true, + ); + } + + @override + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ) { + if (domainName == null || ip4 == null) { + return []; + } + return [ + DesiredDnsRecord( + name: '', + content: ip4, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ip4, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ip4, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ip4, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ip4, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ip4, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ip4, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ip4, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: '', + content: '10 $domainName.', + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: '"v=DMARC1; p=none"', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '', + content: '"v=spf1 a mx ip4:$ip4 -all"', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 106d185c..b85f94d1 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -2,6 +2,7 @@ import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; @@ -26,9 +27,18 @@ abstract class DnsProviderApi extends ApiMap { final DnsRecord record, final ServerDomain domain, ); + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ); + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ); Future getZoneId(final String domain); Future> domainList(); - Future> isApiTokenValid(final String token); RegExp getApiTokenValidation(); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index c2228030..f9a2104e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -394,7 +394,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); - const String infectBranch = 'providers/hetzner'; + const String infectBranch = 'testing/desec'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 3403dc68..de87910d 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -25,11 +25,13 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: getDesiredDnsRecords( - serverInstallationCubit.state.serverDomain?.domainName, - '', - '', - ), + dnsRecords: ApiController.currentDnsProviderApiFactory! + .getDnsProvider() + .getDesiredDnsRecords( + serverInstallationCubit.state.serverDomain?.domainName, + '', + '', + ), ), ); @@ -37,64 +39,32 @@ class DnsRecordsCubit final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; - if (domain != null && ipAddress != null) { - final List records = await ApiController - .currentDnsProviderApiFactory! - .getDnsProvider() - .getDnsRecords(domain: domain); - final String? dkimPublicKey = - extractDkimRecord(await api.getDnsRecords())?.content; - final List desiredRecords = - getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey); - final List foundRecords = []; - for (final DesiredDnsRecord record in desiredRecords) { - if (record.description == 'record.dkim') { - final DnsRecord foundRecord = records.firstWhere( - (final r) => r.name == record.name && r.type == record.type, - orElse: () => DnsRecord( - name: record.name, - type: record.type, - content: '', - ttl: 800, - proxied: false, - ), - ); - // remove all spaces and tabulators from - // the foundRecord.content and the record.content - // to compare them - final String? foundContent = - foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); - final String content = - record.content.replaceAll(RegExp(r'\s+'), ''); - if (foundContent == content) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } else { - if (records.any( - (final r) => - r.name == record.name && - r.type == record.type && - r.content == record.content, - )) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } - } - emit( - DnsRecordsState( - dnsRecords: foundRecords, - dnsState: foundRecords.any((final r) => r.isSatisfied == false) - ? DnsRecordsStatus.error - : DnsRecordsStatus.good, - ), - ); - } else { + if (domain == null && ipAddress == null) { emit(const DnsRecordsState()); + return; } + + final foundRecords = await ApiController.currentDnsProviderApiFactory! + .getDnsProvider() + .validateDnsRecords( + domain!, + ipAddress!, + extractDkimRecord(await api.getDnsRecords())?.content ?? '', + ); + + if (!foundRecords.success || foundRecords.data.isEmpty) { + emit(const DnsRecordsState()); + return; + } + + emit( + DnsRecordsState( + dnsRecords: foundRecords.data, + dnsState: foundRecords.data.any((final r) => r.isSatisfied == false) + ? DnsRecordsStatus.error + : DnsRecordsStatus.good, + ), + ); } } diff --git a/lib/utils/network_utils.dart b/lib/utils/network_utils.dart index fc06ecb8..3b7f9219 100644 --- a/lib/utils/network_utils.dart +++ b/lib/utils/network_utils.dart @@ -41,87 +41,6 @@ class DesiredDnsRecord { ); } -List getDesiredDnsRecords( - final String? domainName, - final String? ipAddress, - final String? dkimPublicKey, -) { - if (domainName == null || ipAddress == null) { - return []; - } - return [ - DesiredDnsRecord( - name: domainName, - content: ipAddress, - description: 'record.root', - ), - DesiredDnsRecord( - name: 'api.$domainName', - content: ipAddress, - description: 'record.api', - ), - DesiredDnsRecord( - name: 'cloud.$domainName', - content: ipAddress, - description: 'record.cloud', - ), - DesiredDnsRecord( - name: 'git.$domainName', - content: ipAddress, - description: 'record.git', - ), - DesiredDnsRecord( - name: 'meet.$domainName', - content: ipAddress, - description: 'record.meet', - ), - DesiredDnsRecord( - name: 'social.$domainName', - content: ipAddress, - description: 'record.social', - ), - DesiredDnsRecord( - name: 'password.$domainName', - content: ipAddress, - description: 'record.password', - ), - DesiredDnsRecord( - name: 'vpn.$domainName', - content: ipAddress, - description: 'record.vpn', - ), - DesiredDnsRecord( - name: domainName, - content: domainName, - description: 'record.mx', - type: 'MX', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '_dmarc.$domainName', - content: 'v=DMARC1; p=none', - description: 'record.dmarc', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: domainName, - content: 'v=spf1 a mx ip4:$ipAddress -all', - description: 'record.spf', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - if (dkimPublicKey != null) - DesiredDnsRecord( - name: 'selector._domainkey.$domainName', - content: dkimPublicKey, - description: 'record.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - ]; -} - DnsRecord? extractDkimRecord(final List records) { DnsRecord? dkimRecord; From 6ddc2328f04111c868c49d2f372854fa8ad1fade Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 12:49:55 -0300 Subject: [PATCH 475/732] feat: Implement proper DKIM creation for deSEC --- assets/translations/en.json | 4 +++- assets/translations/ru.json | 4 +++- .../rest_maps/dns_providers/desec/desec.dart | 19 ++++++++++++++----- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 0d825bff..b902c3a2 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -286,11 +286,13 @@ "select_provider_countries_text_hetzner": "Germany, Finland, USA", "select_provider_countries_text_do": "USA, Netherlands, Singapore, UK, Germany, Canada, India, Australia", "select_provider_price_title": "Average price", + "select_provider_price_free": "Free", "select_provider_price_text_hetzner": "€8 per month for a relatively small server and 50GB of disk storage", "select_provider_price_text_do": "$17 per month for a relatively small server and 50GB of disk storage", "select_provider_payment_title": "Payment methods", "select_provider_payment_text_hetzner": "Credit cards, SWIFT, SEPA, PayPal", "select_provider_payment_text_do": "Credit cards, Google Pay, PayPal", + "select_provider_payment_text_cloudflare": "Credit cards", "select_provider_email_notice": "E-mail hosting won't be available for new clients. Nevertheless it will be unlocked as soon as you complete your first payment.", "select_provider_site_button": "Visit site", "connect_to_server_provider": "Now log in ", @@ -506,4 +508,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} +} \ No newline at end of file diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 35498bd9..6b624c70 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -280,10 +280,12 @@ "select_provider_countries_text_hetzner": "Германия, Финляндия, США", "select_provider_countries_text_do": "США, Нидерланды, Сингапур, Великобритания, Германия, Канада, Индия, Австралия", "select_provider_price_title": "Средняя цена", + "select_provider_price_free": "Бесплатно", "select_provider_price_text_hetzner": "€8 в месяц за небольшой сервер и 50GB места на диске", "select_provider_price_text_do": "$17 в месяц за небольшой сервер и 50GB места на диске", "select_provider_payment_title": "Методы оплаты", "select_provider_payment_text_hetzner": "Банковские карты, SWIFT, SEPA, PayPal", + "select_provider_payment_text_cloudflare": "Банковские карты", "select_provider_payment_text_do": "Банковские карты, Google Pay, PayPal", "select_provider_email_notice": "Хостинг электронной почты недоступен для новых клиентов. Разблокировать можно будет после первой оплаты.", "select_provider_site_button": "Посетить сайт", @@ -473,4 +475,4 @@ "length_not_equal": "Длина строки [], должна быть равна {}", "length_longer": "Длина строки [], должна быть меньше либо равна {}" } -} +} \ No newline at end of file diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 91eed57a..0a8197dc 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -196,13 +196,13 @@ class DesecApi extends DnsProviderApi { ? { 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], } : { 'subname': record.name, 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], }, ); } @@ -275,6 +275,15 @@ class DesecApi extends DnsProviderApi { ]; } + String? extractContent(final DnsRecord record) { + String? content = record.content; + if (record.type == 'TXT' && content != null && !content.startsWith('"')) { + content = '"$content"'; + } + + return content; + } + @override Future setDnsRecord( final DnsRecord record, @@ -290,13 +299,13 @@ class DesecApi extends DnsProviderApi { ? { 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], } : { 'subname': record.name, 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], }, ); await Future.delayed(const Duration(seconds: 1)); @@ -465,7 +474,7 @@ class DesecApi extends DnsProviderApi { if (dkimPublicKey != null) DesiredDnsRecord( name: 'selector._domainkey.$domainName', - content: dkimPublicKey, + content: '"$dkimPublicKey"', description: 'record.dkim', type: 'TXT', category: DnsRecordsCategory.email, From 732f39ef48d2eee8b65a1103755505a68ccd30f1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 14:58:51 -0300 Subject: [PATCH 476/732] chore: Add assets for deSEC --- assets/images/logos/cloudflare.svg | 1 + assets/markdown/how_desec-en.md | 9 +++++++++ assets/markdown/how_desec-ru.md | 9 +++++++++ assets/translations/en.json | 8 ++++---- assets/translations/ru.json | 8 ++++---- 5 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 assets/images/logos/cloudflare.svg create mode 100644 assets/markdown/how_desec-en.md create mode 100644 assets/markdown/how_desec-ru.md diff --git a/assets/images/logos/cloudflare.svg b/assets/images/logos/cloudflare.svg new file mode 100644 index 00000000..7099a7e9 --- /dev/null +++ b/assets/images/logos/cloudflare.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/markdown/how_desec-en.md b/assets/markdown/how_desec-en.md new file mode 100644 index 00000000..c86d3855 --- /dev/null +++ b/assets/markdown/how_desec-en.md @@ -0,0 +1,9 @@ +### How to get deSEC API Token +1. Log in at: https://desec.io/login +2. Go to **Domains** page at: https://desec.io/domains +3. Go to **Token management** tab. +4. Click on the round "plus" button in the upper right corner. +5. **"Generate New Token"** dialogue must be displayed. Enter any **Token name** you wish. *Advanced settings* are not required, so do not touch anything there. +6. Click on **Save**. +7. Make sure you **save** the token's **secret value** as it will only be displayed once. +8. Now you can safely **close** the dialogue. \ No newline at end of file diff --git a/assets/markdown/how_desec-ru.md b/assets/markdown/how_desec-ru.md new file mode 100644 index 00000000..a93acc77 --- /dev/null +++ b/assets/markdown/how_desec-ru.md @@ -0,0 +1,9 @@ +### Как получить deSEC API Токен +1. Авторизуемся в deSEC: https://desec.io/login +2. Переходим на страницу **Domains** по ссылке: https://desec.io/domains +3. Переходим на вкладку **Token management**. +4. Нажимаем на большую кнопку с плюсом в правом верхнем углу страницы. +5. Должен был появиться **"Generate New Token"** диалог. Вводим любое имя токена в **Token name**. *Advanced settings* необязательны, так что ничего там не трогаем. +6. Кликаем **Save**. +7. Обязательно сохраняем "**secret value**" ключ токена, потому что он отображается исключительно один раз. +8. Теперь спокойно закрываем диалог, нажав **close**. \ No newline at end of file diff --git a/assets/translations/en.json b/assets/translations/en.json index b902c3a2..653e33f8 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -313,13 +313,13 @@ "choose_server_type_storage": "{} GB of system storage", "choose_server_type_payment_per_month": "{} per month", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", - "cloudflare_bad_key_error": "Cloudflare API key is invalid", + "cloudflare_bad_key_error": "DNS Provider API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", "select_dns": "Now let's select a DNS provider", "manage_domain_dns": "To manage your domain's DNS", "use_this_domain": "Use this domain?", "use_this_domain_text": "The token you provided gives access to the following domain", - "cloudflare_api_token": "CloudFlare API Token", + "cloudflare_api_token": "DNS Provider API Token", "connect_backblaze_storage": "Connect Backblaze storage", "no_connected_domains": "No connected domains at the moment", "loading_domain_list": "Loading domain list", @@ -390,8 +390,8 @@ "modal_confirmation_dns_invalid": "Reverse DNS points to another domain", "modal_confirmation_ip_valid": "IP is the same as in DNS record", "modal_confirmation_ip_invalid": "IP is not the same as in DNS record", - "confirm_cloudflare": "Connect to CloudFlare", - "confirm_cloudflare_description": "Enter a Cloudflare token with access to {}:", + "confirm_cloudflare": "Connect to your DNS Provider", + "confirm_cloudflare_description": "Enter a token of your DNS Provider with access to {}:", "confirm_backblaze": "Connect to Backblaze", "confirm_backblaze_description": "Enter a Backblaze token with access to backup storage:" }, diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 6b624c70..b4bdd938 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -307,12 +307,12 @@ "choose_server_type_storage": "{} GB системного хранилища", "choose_server_type_payment_per_month": "{} в месяц", "no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...", - "cloudflare_bad_key_error": "Cloudflare API ключ неверен", + "cloudflare_bad_key_error": "API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", "manage_domain_dns": "Для управления DNS вашего домена", "use_this_domain": "Используем этот домен?", "use_this_domain_text": "Указанный вами токен даёт контроль над этим доменом", - "cloudflare_api_token": "CloudFlare API ключ", + "cloudflare_api_token": "API ключ DNS провайдера", "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", "no_connected_domains": "На данный момент подлюченных доменов нет", "loading_domain_list": "Загружаем список доменов", @@ -368,8 +368,8 @@ "modal_confirmation_dns_invalid": "Обратный DNS указывает на другой домен", "modal_confirmation_ip_valid": "IP совпадает с указанным в DNS записи", "modal_confirmation_ip_invalid": "IP не совпадает с указанным в DNS записи", - "confirm_cloudflare": "Подключение к Cloudflare", - "confirm_cloudflare_description": "Введите токен Cloudflare, который имеет права на {}:", + "confirm_cloudflare": "Подключение к DNS Провайдеру", + "confirm_cloudflare_description": "Введите токен DNS Провайдера, который имеет права на {}:", "confirm_backblaze_description": "Введите токен Backblaze, который имеет права на хранилище резервных копий:", "confirm_backblaze": "Подключение к Backblaze", "server_provider_connected": "Подключение к вашему серверному провайдеру", From ce017c6ea8460a250f4d56248dbad204bb48d6b4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 15:03:31 -0300 Subject: [PATCH 477/732] fix: Make minor improvements for deSEC --- .../rest_maps/dns_providers/desec/desec.dart | 4 ++- .../initializing/dns_provider_picker.dart | 35 +++++++------------ .../recovery_server_provider_connected.dart | 4 +-- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 0a8197dc..aea1d0da 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -352,7 +352,9 @@ class DesecApi extends DnsProviderApi { for (final DesiredDnsRecord record in desiredRecords) { if (record.description == 'record.dkim') { final DnsRecord foundRecord = records.firstWhere( - (final r) => (r.name == record.name) && r.type == record.type, + (final r) => + ('${r.name}.${domain.domainName}' == record.name) && + r.type == record.type, orElse: () => DnsRecord( name: record.name, type: record.type, diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index cb0d2111..7ee580a7 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -5,6 +5,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; @@ -51,7 +52,7 @@ class _DnsProviderPickerState extends State { providerType: DnsProvider.cloudflare, pathToHow: 'how_cloudflare', image: Image.asset( - 'assets/images/logos/cloudflare.png', + 'assets/images/logos/cloudflare.svg', width: 150, ), ), @@ -62,9 +63,9 @@ class _DnsProviderPickerState extends State { providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( providerType: DnsProvider.desec, - pathToHow: 'how_digital_ocean_dns', + pathToHow: 'how_desec', image: Image.asset( - 'assets/images/logos/digital_ocean.png', + 'assets/images/logos/desec.svg', width: 150, ), ), @@ -100,7 +101,7 @@ class ProviderInputDataPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'initializing.connect_to_dns'.tr(), + 'initializing.cloudflare_api_token'.tr(), style: Theme.of(context).textTheme.headlineSmall, ), const SizedBox(height: 16), @@ -125,22 +126,12 @@ class ProviderInputDataPage extends StatelessWidget { const SizedBox(height: 10), BrandOutlinedButton( child: Text('initializing.how'.tr()), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: [ - BrandMarkdown( - fileName: providerInfo.pathToHow, - ), - ], - ), - ), - ), + onPressed: () { + context.read().showArticle( + article: providerInfo.pathToHow, + context: context, + ); + }, ), ], ); @@ -186,7 +177,7 @@ class ProviderSelectionPage extends StatelessWidget { padding: const EdgeInsets.all(10), decoration: BoxDecoration( borderRadius: BorderRadius.circular(40), - color: const Color.fromARGB(255, 241, 215, 166), + color: const Color.fromARGB(255, 244, 128, 31), ), child: SvgPicture.asset( 'assets/images/logos/cloudflare.svg', @@ -194,7 +185,7 @@ class ProviderSelectionPage extends StatelessWidget { ), const SizedBox(width: 16), Text( - 'Hetzner Cloud', + 'Cloudflare', style: Theme.of(context).textTheme.titleMedium, ), ], diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 91999fb9..93d0eb87 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -45,9 +45,7 @@ class RecoveryServerProviderConnected extends StatelessWidget { ), const SizedBox(height: 16), BrandButton.filled( - onPressed: formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), + onPressed: () => context.read().trySubmit(), child: Text('basis.continue'.tr()), ), const SizedBox(height: 16), From 232699bdb1efdad9693906fc9d252ce1fd6d685f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 15:49:03 -0300 Subject: [PATCH 478/732] feat: Implement proper access recovery for DNS providers --- lib/logic/api_maps/graphql_maps/api_map.dart | 2 +- lib/logic/api_maps/staging_options.dart | 12 +++++++++-- .../cubit/dns_records/dns_records_cubit.dart | 3 +++ .../server_installation_cubit.dart | 18 ++++++++++++----- .../server_installation_repository.dart | 20 +++++++++++-------- 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index a633866e..34e39b7a 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -56,7 +56,7 @@ class ResponseLoggingParser extends ResponseParser { abstract class ApiMap { Future getClient() async { IOClient? ioClient; - if (StagingOptions.stagingAcme) { + if (StagingOptions.stagingAcme || !StagingOptions.verifyCertificate) { final HttpClient httpClient = HttpClient(); httpClient.badCertificateCallback = ( final cert, diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index 7d3084b7..a4e98fe8 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -1,8 +1,16 @@ -/// Controls staging environment for network, is used during manual -/// integration testing and such +/// Controls staging environment for network class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned by constant certificate renewal + /// + /// If set to 'true', the 'verifyCertificate' becomes useless static bool get stagingAcme => false; + + /// Should we consider CERTIFICATE_VERIFY_FAILED code an error + /// For now it's just a global variable and DNS API + /// classes can change it at will + /// + /// Doesn't matter if 'statingAcme' is set to 'true' + static bool verifyCertificate = false; } diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index de87910d..2e57f0f7 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,7 +1,10 @@ import 'package:cubit_form/cubit_form.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/get_it/api_config.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index cc5bffcc..fa0a04e1 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -541,13 +541,20 @@ class ServerInstallationCubit extends Cubit { customToken: serverDetails.apiToken, isWithToken: true, ).getServerProviderType(); - if (provider == ServerProvider.unknown) { + final dnsProvider = await ServerApi( + customToken: serverDetails.apiToken, + isWithToken: true, + ).getDnsProviderType(); + if (provider == ServerProvider.unknown || + dnsProvider == DnsProvider.unknown) { getIt() .showSnackBar('recovering.generic_error'.tr()); return; } await repository.saveServerDetails(serverDetails); + await repository.saveDnsProviderType(dnsProvider); setServerProviderType(provider); + setDnsProviderType(dnsProvider); emit( dataState.copyWith( serverDetails: serverDetails, @@ -700,14 +707,15 @@ class ServerInstallationCubit extends Cubit { .showSnackBar('recovering.domain_not_available_on_token'.tr()); return; } + final dnsProviderType = await ServerApi( + customToken: dataState.serverDetails!.apiToken, + isWithToken: true, + ).getDnsProviderType(); await repository.saveDomain( ServerDomain( domainName: serverDomain.domainName, zoneId: zoneId, - provider: await ServerApi( - customToken: token, - isWithToken: true, - ).getDnsProviderType(), + provider: dnsProviderType, ), ); await repository.saveDnsProviderKey(token); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index ff167518..bc92f645 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -15,6 +15,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider. import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -76,17 +77,20 @@ class ServerInstallationRepository { ); } - if (dnsProvider != null || - (serverDomain != null && - serverDomain.provider != DnsProvider.unknown)) { - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: dnsProvider ?? serverDomain!.provider, - ), - ); + if (ApiController.currentDnsProviderApiFactory == null) { + if (dnsProvider != null || + (serverDomain != null && + serverDomain.provider != DnsProvider.unknown)) { + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: dnsProvider ?? serverDomain!.provider, + ), + ); + } } if (box.get(BNames.hasFinalChecked, defaultValue: false)) { + StagingOptions.verifyCertificate = true; return ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', From 4afcedebb70f84f8c7395f6277d5a6c3317c3954 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 16:55:26 -0300 Subject: [PATCH 479/732] feat: Remove certificate check during installation --- .../rest_maps/dns_providers/desec/desec.dart | 62 ++++++++----------- .../server_providers/hetzner/hetzner.dart | 2 +- .../cubit/dns_records/dns_records_cubit.dart | 18 +++--- .../server_installation_cubit.dart | 3 + 4 files changed, 38 insertions(+), 47 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index aea1d0da..c1a8f43b 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -111,20 +111,22 @@ class DesecApi extends DnsProviderApi { final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { bulkRecords.add( - record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [], - }, + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [], + }, ); } + bulkRecords.add( + { + 'subname': 'selector._domainkey', + 'type': 'TXT', + 'ttl': 18000, + 'records': [], + }, + ); await client.put(url, data: bulkRecords); await Future.delayed(const Duration(seconds: 1)); } catch (e) { @@ -192,18 +194,12 @@ class DesecApi extends DnsProviderApi { final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { bulkRecords.add( - record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [extractContent(record)], + }, ); } await client.post( @@ -295,18 +291,12 @@ class DesecApi extends DnsProviderApi { try { await client.post( url, - data: record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, + data: { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [extractContent(record)], + }, ); await Future.delayed(const Duration(seconds: 1)); } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index f9a2104e..c2228030 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -394,7 +394,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); - const String infectBranch = 'testing/desec'; + const String infectBranch = 'providers/hetzner'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 2e57f0f7..472ed954 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,10 +1,7 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; -import 'package:selfprivacy/logic/get_it/api_config.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; @@ -28,13 +25,14 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: ApiController.currentDnsProviderApiFactory! - .getDnsProvider() - .getDesiredDnsRecords( - serverInstallationCubit.state.serverDomain?.domainName, - '', - '', - ), + dnsRecords: ApiController.currentDnsProviderApiFactory + ?.getDnsProvider() + .getDesiredDnsRecords( + serverInstallationCubit.state.serverDomain?.domainName, + '', + '', + ) ?? + [], ), ); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index fa0a04e1..47952c9a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -436,6 +437,7 @@ class ServerInstallationCubit extends Cubit { emit(TimerState(dataState: dataState, isLoading: true)); final bool isServerWorking = await repository.isHttpServerWorking(); + StagingOptions.verifyCertificate = true; if (isServerWorking) { bool dkimCreated = true; @@ -758,6 +760,7 @@ class ServerInstallationCubit extends Cubit { void clearAppConfig() { closeTimer(); ApiController.clearProviderApiFactories(); + StagingOptions.verifyCertificate = false; repository.clearAppConfig(); emit(const ServerInstallationEmpty()); } From d276a8f7084915708cca11a7dc2c1bf2931f69d4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 18 May 2023 19:06:13 -0300 Subject: [PATCH 480/732] fix: Remove price lists for DNS and move deSEC onto above Cloudflare --- .../initializing/dns_provider_picker.dart | 133 ++++++++---------- 1 file changed, 56 insertions(+), 77 deletions(-) diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 7ee580a7..7e494af4 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -2,12 +2,10 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; @@ -163,72 +161,6 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium, ), const SizedBox(height: 10), - OutlinedCard( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - width: 40, - height: 40, - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(40), - color: const Color.fromARGB(255, 244, 128, 31), - ), - child: SvgPicture.asset( - 'assets/images/logos/cloudflare.svg', - ), - ), - const SizedBox(width: 16), - Text( - 'Cloudflare', - style: Theme.of(context).textTheme.titleMedium, - ), - ], - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_price_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_price_free'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_cloudflare' - .tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - BrandButton.rised( - text: 'basis.select'.tr(), - onPressed: () { - serverInstallationCubit - .setDnsProviderType(DnsProvider.cloudflare); - callback(DnsProvider.cloudflare); - }, - ), - // Outlined button that will open website - BrandOutlinedButton( - onPressed: () => - launchURL('https://dash.cloudflare.com/'), - title: 'initializing.select_provider_site_button'.tr(), - ), - ], - ), - ), - ), - const SizedBox(height: 16), OutlinedCard( child: Padding( padding: const EdgeInsets.all(16.0), @@ -266,15 +198,6 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_do'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), BrandButton.rised( text: 'basis.select'.tr(), onPressed: () { @@ -292,6 +215,62 @@ class ProviderSelectionPage extends StatelessWidget { ), ), ), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 244, 128, 31), + ), + child: SvgPicture.asset( + 'assets/images/logos/cloudflare.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Cloudflare', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.cloudflare); + callback(DnsProvider.cloudflare); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchURL('https://dash.cloudflare.com/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), ], ), ); From 53cf228748466f9fd0b5ca0cdc5eb7d9984dbe92 Mon Sep 17 00:00:00 2001 From: def Date: Fri, 19 May 2023 11:45:22 +0300 Subject: [PATCH 481/732] fix old link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index feb332f2..1e132b91 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ SelfPrivacy — is a platform on your cloud hosting, that allows to deploy your own private services and control them using mobile application. -To use this application, you'll be required to create accounts of different service providers. Please reffer to this manual: https://selfprivacy.org/en/second +To use this application, you'll be required to create accounts of different service providers. Please reffer to this manual: https://selfprivacy.org/docs/getting-started/ Application will do the following things for you: From f48b8bfa443c6293d7a77f5e03104c7d406ccaaf Mon Sep 17 00:00:00 2001 From: def Date: Fri, 19 May 2023 12:53:53 +0300 Subject: [PATCH 482/732] update desec markdown --- assets/markdown/how_desec-en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_desec-en.md b/assets/markdown/how_desec-en.md index c86d3855..b5bac67c 100644 --- a/assets/markdown/how_desec-en.md +++ b/assets/markdown/how_desec-en.md @@ -5,5 +5,5 @@ 4. Click on the round "plus" button in the upper right corner. 5. **"Generate New Token"** dialogue must be displayed. Enter any **Token name** you wish. *Advanced settings* are not required, so do not touch anything there. 6. Click on **Save**. -7. Make sure you **save** the token's **secret value** as it will only be displayed once. +7. Make sure you save the token's "**secret value**" as it will only be displayed once. 8. Now you can safely **close** the dialogue. \ No newline at end of file From 4bb26559aa100467bc19deaad8dde082748d72bb Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 22 May 2023 23:40:25 -0300 Subject: [PATCH 483/732] chore: Move business logic from API for desec dns provider --- .../desec/{desec.dart => desec_api.dart} | 161 ++---------- ...ec_factory.dart => desec_api_factory.dart} | 2 +- lib/logic/providers/dns_providers/desec.dart | 237 +++++++++++++++++- 3 files changed, 255 insertions(+), 145 deletions(-) rename lib/logic/api_maps/rest_maps/dns_providers/desec/{desec.dart => desec_api.dart} (69%) rename lib/logic/api_maps/rest_maps/dns_providers/desec/{desec_factory.dart => desec_api_factory.dart} (96%) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart similarity index 69% rename from lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart rename to lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index 8298b08d..b2fc0e30 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -45,7 +45,6 @@ class DesecApi extends DnsProviderApi { @override String rootAddress = 'https://desec.io/api/v1/domains/'; - @override Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; @@ -93,40 +92,16 @@ class DesecApi extends DnsProviderApi { ); } - @override - Future getZoneId(final String domain) async => domain; - - @override - Future> removeSimilarRecords({ + Future> updateRecords({ required final ServerDomain domain, - final String? ip4, + required final List records, }) async { final String domainName = domain.domainName; final String url = '/$domainName/rrsets/'; - final List listDnsRecords = projectDnsRecords(domainName, ip4); final Dio client = await getClient(); try { - final List bulkRecords = []; - for (final DnsRecord record in listDnsRecords) { - bulkRecords.add( - { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [], - }, - ); - } - bulkRecords.add( - { - 'subname': 'selector._domainkey', - 'type': 'TXT', - 'ttl': 18000, - 'records': [], - }, - ); - await client.put(url, data: bulkRecords); + await client.put(url, data: records); await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); @@ -142,13 +117,12 @@ class DesecApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - @override - Future> getDnsRecords({ + Future>> getDnsRecords({ required final ServerDomain domain, }) async { - Response response; + Response? response; final String domainName = domain.domainName; - final List allRecords = []; + List allRecords = []; final String url = '/$domainName/rrsets/'; @@ -156,59 +130,33 @@ class DesecApi extends DnsProviderApi { try { response = await client.get(url); await Future.delayed(const Duration(seconds: 1)); - final List records = response.data; - - for (final record in records) { - final String? content = (record['records'] is List) - ? record['records'][0] - : record['records']; - allRecords.add( - DnsRecord( - name: record['subname'], - type: record['type'], - content: content, - ttl: record['ttl'], - ), - ); - } + allRecords = response.data; } catch (e) { print(e); + return GenericResult( + data: allRecords, + success: false, + message: e.toString(), + code: response?.statusCode, + ); } finally { close(client); } - return allRecords; + return GenericResult(data: allRecords, success: true); } - @override - Future> createMultipleDnsRecords({ + Future> createRecords({ required final ServerDomain domain, - final String? ip4, + required final List records, }) async { final String domainName = domain.domainName; - final List listDnsRecords = projectDnsRecords(domainName, ip4); + final String url = '/$domainName/rrsets/'; final Dio client = await getClient(); try { - final List bulkRecords = []; - for (final DnsRecord record in listDnsRecords) { - bulkRecords.add( - { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, - ); - } - await client.post( - '/$domainName/rrsets/', - data: bulkRecords, - ); + await client.post(url, data: records); await Future.delayed(const Duration(seconds: 1)); - } on DioError catch (e) { - print(e.message); - rethrow; } catch (e) { print(e); return GenericResult( @@ -223,53 +171,6 @@ class DesecApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - List projectDnsRecords( - final String? domainName, - final String? ip4, - ) { - final DnsRecord domainA = DnsRecord(type: 'A', name: '', content: ip4); - - final DnsRecord mx = - DnsRecord(type: 'MX', name: '', content: '10 $domainName.'); - final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); - final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); - final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); - final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); - final DnsRecord passwordA = - DnsRecord(type: 'A', name: 'password', content: ip4); - final DnsRecord socialA = - DnsRecord(type: 'A', name: 'social', content: ip4); - final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); - - final DnsRecord txt1 = DnsRecord( - type: 'TXT', - name: '_dmarc', - content: '"v=DMARC1; p=none"', - ttl: 18000, - ); - - final DnsRecord txt2 = DnsRecord( - type: 'TXT', - name: '', - content: '"v=spf1 a mx ip4:$ip4 -all"', - ttl: 18000, - ); - - return [ - domainA, - apiA, - cloudA, - gitA, - meetA, - passwordA, - socialA, - mx, - txt1, - txt2, - vpn - ]; - } - String? extractContent(final DnsRecord record) { String? content = record.content; if (record.type == 'TXT' && content != null && !content.startsWith('"')) { @@ -279,32 +180,6 @@ class DesecApi extends DnsProviderApi { return content; } - @override - Future setDnsRecord( - final DnsRecord record, - final ServerDomain domain, - ) async { - final String url = '/${domain.domainName}/rrsets/'; - - final Dio client = await getClient(); - try { - await client.post( - url, - data: { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, - ); - await Future.delayed(const Duration(seconds: 1)); - } catch (e) { - print(e); - } finally { - close(client); - } - } - @override Future> domainList() async { List domains = []; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api_factory.dart similarity index 96% rename from lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart rename to lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api_factory.dart index 6c10259b..11a9c37b 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api_factory.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index c7a5bab8..922a743c 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -1,3 +1,238 @@ +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; -class DesecDnsProvider extends DnsProvider {} +class ApiAdapter { + ApiAdapter({final bool isWithToken = true}) + : _api = DesecApi( + isWithToken: isWithToken, + ); + + DesecApi api({final bool getInitialized = true}) => getInitialized + ? _api + : DesecApi( + isWithToken: false, + ); + + final DesecApi _api; +} + +class DesecDnsProvider extends DnsProvider { + DesecDnsProvider() : _adapter = ApiAdapter(); + DesecDnsProvider.load( + final bool isAuthotized, + ) : _adapter = ApiAdapter( + isWithToken: isAuthotized, + ); + + ApiAdapter _adapter; + + @override + Future> tryInitApiByToken(final String token) async { + final api = _adapter.api(getInitialized: false); + final result = await api.isApiTokenValid(token); + if (!result.data || !result.success) { + return result; + } + + _adapter = ApiAdapter(isWithToken: true); + return result; + } + + @override + Future> getZoneId(final String domain) async => + GenericResult( + data: domain, + success: true, + ); + + @override + Future> removeDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final List listDnsRecords = projectDnsRecords( + domain.domainName, + ip4, + ); + + final List bulkRecords = []; + for (final DnsRecord record in listDnsRecords) { + bulkRecords.add( + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [], + }, + ); + } + bulkRecords.add( + { + 'subname': 'selector._domainkey', + 'type': 'TXT', + 'ttl': 18000, + 'records': [], + }, + ); + + return _adapter.api().updateRecords( + domain: domain, + records: bulkRecords, + ); + } + + @override + Future>> getDnsRecords({ + required final ServerDomain domain, + }) async { + final List records = []; + final result = await _adapter.api().getDnsRecords(domain: domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: records, + code: result.code, + message: result.message, + ); + } + + try { + for (final record in result.data) { + final String? content = (record['records'] is List) + ? record['records'][0] + : record['records']; + records.add( + DnsRecord( + name: record['subname'], + type: record['type'], + content: content, + ttl: record['ttl'], + ), + ); + } + } catch (e) { + print(e); + return GenericResult( + success: false, + data: records, + message: e.toString(), + ); + } + + return GenericResult(success: true, data: records); + } + + List projectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = DnsRecord(type: 'A', name: '', content: ip4); + + final DnsRecord mx = + DnsRecord(type: 'MX', name: '', content: '10 $domainName.'); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: '"v=DMARC1; p=none"', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: '', + content: '"v=spf1 a mx ip4:$ip4 -all"', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } + + @override + Future> createDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final List listDnsRecords = projectDnsRecords( + domain.domainName, + ip4, + ); + + final List bulkRecords = []; + for (final DnsRecord record in listDnsRecords) { + bulkRecords.add( + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [extractContent(record)], + }, + ); + } + + return _adapter.api().createRecords( + domain: domain, + records: bulkRecords, + ); + } + + @override + Future> setDnsRecord( + final DnsRecord record, + final ServerDomain domain, + ) async { + final result = await _adapter.api().createRecords( + domain: domain, + records: [ + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [extractContent(record)], + }, + ], + ); + + if (!result.success) { + return GenericResult( + success: result.success, + data: null, + code: result.code, + message: result.message, + ); + } + } + + String? extractContent(final DnsRecord record) { + String? content = record.content; + if (record.type == 'TXT' && content != null && !content.startsWith('"')) { + content = '"$content"'; + } + + return content; + } +} From eebbf9834989a53bf409556b928f40d4ea0cc01f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 24 May 2023 23:47:43 -0300 Subject: [PATCH 484/732] chore: Move domain list getter to dns provider layer for desec --- .../dns_providers/desec/desec_api.dart | 24 ++++++++---- lib/logic/providers/dns_providers/desec.dart | 37 +++++++++++++++---- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index b2fc0e30..3e0368cd 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -181,25 +181,35 @@ class DesecApi extends DnsProviderApi { } @override - Future> domainList() async { - List domains = []; + Future> getDomains() async { + List domains = []; + late final Response? response; final Dio client = await getClient(); try { - final Response response = await client.get( + response = await client.get( '', ); await Future.delayed(const Duration(seconds: 1)); - domains = response.data - .map((final el) => el['name'] as String) - .toList(); + domains = response.data; } catch (e) { print(e); + return GenericResult( + success: false, + data: domains, + code: response?.statusCode, + message: response?.statusMessage, + ); } finally { close(client); } - return domains; + return GenericResult( + success: true, + data: domains, + code: response.statusCode, + message: response.statusMessage, + ); } @override diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index 922a743c..1dc7cfa2 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -217,14 +217,10 @@ class DesecDnsProvider extends DnsProvider { ], ); - if (!result.success) { - return GenericResult( - success: result.success, - data: null, - code: result.code, - message: result.message, - ); - } + return GenericResult( + success: true, + data: null, + ); } String? extractContent(final DnsRecord record) { @@ -235,4 +231,29 @@ class DesecDnsProvider extends DnsProvider { return content; } + + @override + Future>> domainList() async { + List domains = []; + final result = await _adapter.api().getDomains(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: domains, + code: result.code, + message: result.message, + ); + } + + domains = result.data + .map( + (final el) => el['name'] as String, + ) + .toList(); + + return GenericResult( + success: true, + data: domains, + ); + } } From 8863dc8b2c5f4914a831ca2fc5517b5835fda040 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 24 May 2023 23:51:40 -0300 Subject: [PATCH 485/732] chore: Move DNS validation to provider layer for desec --- .../dns_providers/desec/desec_api.dart | 147 ---------------- lib/logic/providers/dns_providers/desec.dart | 157 ++++++++++++++++++ 2 files changed, 157 insertions(+), 147 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index 3e0368cd..a7d70c71 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -180,7 +180,6 @@ class DesecApi extends DnsProviderApi { return content; } - @override Future> getDomains() async { List domains = []; @@ -211,150 +210,4 @@ class DesecApi extends DnsProviderApi { message: response.statusMessage, ); } - - @override - Future>> validateDnsRecords( - final ServerDomain domain, - final String ip4, - final String dkimPublicKey, - ) async { - final List records = await getDnsRecords(domain: domain); - final List foundRecords = []; - try { - final List desiredRecords = - getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); - for (final DesiredDnsRecord record in desiredRecords) { - if (record.description == 'record.dkim') { - final DnsRecord foundRecord = records.firstWhere( - (final r) => - ('${r.name}.${domain.domainName}' == record.name) && - r.type == record.type, - orElse: () => DnsRecord( - name: record.name, - type: record.type, - content: '', - ttl: 800, - proxied: false, - ), - ); - // remove all spaces and tabulators from - // the foundRecord.content and the record.content - // to compare them - final String? foundContent = - foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); - final String content = record.content.replaceAll(RegExp(r'\s+'), ''); - if (foundContent == content) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } else { - if (records.any( - (final r) => - ('${r.name}.${domain.domainName}' == record.name || - record.name == '') && - r.type == record.type && - r.content == record.content, - )) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } - } - } catch (e) { - print(e); - return GenericResult( - data: [], - success: false, - message: e.toString(), - ); - } - return GenericResult( - data: foundRecords, - success: true, - ); - } - - @override - List getDesiredDnsRecords( - final String? domainName, - final String? ip4, - final String? dkimPublicKey, - ) { - if (domainName == null || ip4 == null) { - return []; - } - return [ - DesiredDnsRecord( - name: '', - content: ip4, - description: 'record.root', - ), - DesiredDnsRecord( - name: 'api.$domainName', - content: ip4, - description: 'record.api', - ), - DesiredDnsRecord( - name: 'cloud.$domainName', - content: ip4, - description: 'record.cloud', - ), - DesiredDnsRecord( - name: 'git.$domainName', - content: ip4, - description: 'record.git', - ), - DesiredDnsRecord( - name: 'meet.$domainName', - content: ip4, - description: 'record.meet', - ), - DesiredDnsRecord( - name: 'social.$domainName', - content: ip4, - description: 'record.social', - ), - DesiredDnsRecord( - name: 'password.$domainName', - content: ip4, - description: 'record.password', - ), - DesiredDnsRecord( - name: 'vpn.$domainName', - content: ip4, - description: 'record.vpn', - ), - DesiredDnsRecord( - name: '', - content: '10 $domainName.', - description: 'record.mx', - type: 'MX', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '_dmarc.$domainName', - content: '"v=DMARC1; p=none"', - description: 'record.dmarc', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '', - content: '"v=spf1 a mx ip4:$ip4 -all"', - description: 'record.spf', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - if (dkimPublicKey != null) - DesiredDnsRecord( - name: 'selector._domainkey.$domainName', - content: '"$dkimPublicKey"', - description: 'record.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - ]; - } } diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index 1dc7cfa2..81110b01 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; @@ -256,4 +257,160 @@ class DesecDnsProvider extends DnsProvider { data: domains, ); } + + @override + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ) async { + final result = await getDnsRecords(domain: domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: [], + code: result.code, + message: result.message, + ); + } + + final records = result.data; + final List foundRecords = []; + try { + final List desiredRecords = + getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); + for (final DesiredDnsRecord record in desiredRecords) { + if (record.description == 'record.dkim') { + final DnsRecord foundRecord = records.firstWhere( + (final r) => + ('${r.name}.${domain.domainName}' == record.name) && + r.type == record.type, + orElse: () => DnsRecord( + name: record.name, + type: record.type, + content: '', + ttl: 800, + proxied: false, + ), + ); + // remove all spaces and tabulators from + // the foundRecord.content and the record.content + // to compare them + final String? foundContent = + foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); + final String content = record.content.replaceAll(RegExp(r'\s+'), ''); + if (foundContent == content) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } else { + if (records.any( + (final r) => + ('${r.name}.${domain.domainName}' == record.name || + record.name == '') && + r.type == record.type && + r.content == record.content, + )) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } + } + } catch (e) { + print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + return GenericResult( + data: foundRecords, + success: true, + ); + } + + @override + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ) { + if (domainName == null || ip4 == null) { + return []; + } + return [ + DesiredDnsRecord( + name: '', + content: ip4, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ip4, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ip4, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ip4, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ip4, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ip4, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ip4, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ip4, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: '', + content: '10 $domainName.', + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: '"v=DMARC1; p=none"', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '', + content: '"v=spf1 a mx ip4:$ip4 -all"', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: '"$dkimPublicKey"', + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } } From 509b2ac7c7185fabaa275e04ec2216945bc3be7f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 25 May 2023 00:02:10 -0300 Subject: [PATCH 486/732] chore: Move DNS provider methods to the abstract interface --- .../dns_providers/desec/desec_api.dart | 4 - .../rest_maps/dns_providers/dns_provider.dart | 87 +------------------ lib/logic/providers/dns_providers/desec.dart | 3 +- .../providers/dns_providers/dns_provider.dart | 37 +++++++- 4 files changed, 38 insertions(+), 93 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index a7d70c71..db24707a 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -19,10 +19,6 @@ class DesecApi extends DnsProviderApi { final String? customToken; - @override - RegExp getApiTokenValidation() => - RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); - @override BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index af9d3e6b..3d74d5db 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -1,10 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/json/dns_records.dart'; -import 'package:selfprivacy/utils/network_utils.dart'; - export 'package:selfprivacy/logic/api_maps/generic_result.dart'; export 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; @@ -13,83 +7,4 @@ class DomainNotFoundException implements Exception { final String message; } -abstract class DnsProviderApi extends ApiMap { - Future> getDnsRecords({ - required final ServerDomain domain, - }); - - Future> removeSimilarRecords({ - required final ServerDomain domain, - final String? ip4, - }); - Future> createMultipleDnsRecords({ - required final ServerDomain domain, - final String? ip4, - }); - Future setDnsRecord( - final DnsRecord record, - final ServerDomain domain, - ); - Future>> validateDnsRecords( - final ServerDomain domain, - final String ip4, - final String dkimPublicKey, - ); - List getDesiredDnsRecords( - final String? domainName, - final String? ip4, - final String? dkimPublicKey, - ); - Future getZoneId(final String domain); - Future> domainList(); - - Future> isApiTokenValid(final String token); - RegExp getApiTokenValidation(); - - List getProjectDnsRecords( - final String? domainName, - final String? ip4, - ) { - final DnsRecord domainA = - DnsRecord(type: 'A', name: domainName, content: ip4); - - final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); - final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); - final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); - final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); - final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); - final DnsRecord passwordA = - DnsRecord(type: 'A', name: 'password', content: ip4); - final DnsRecord socialA = - DnsRecord(type: 'A', name: 'social', content: ip4); - final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); - - final DnsRecord txt1 = DnsRecord( - type: 'TXT', - name: '_dmarc', - content: 'v=DMARC1; p=none', - ttl: 18000, - ); - - final DnsRecord txt2 = DnsRecord( - type: 'TXT', - name: domainName, - content: 'v=spf1 a mx ip4:$ip4 -all', - ttl: 18000, - ); - - return [ - domainA, - apiA, - cloudA, - gitA, - meetA, - passwordA, - socialA, - mx, - txt1, - txt2, - vpn - ]; - } -} +abstract class DnsProviderApi extends ApiMap {} diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index 81110b01..fe09fd3c 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -1,4 +1,3 @@ -import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -219,7 +218,7 @@ class DesecDnsProvider extends DnsProvider { ); return GenericResult( - success: true, + success: result.success, data: null, ); } diff --git a/lib/logic/providers/dns_providers/dns_provider.dart b/lib/logic/providers/dns_providers/dns_provider.dart index 9aa1f99d..14e31c32 100644 --- a/lib/logic/providers/dns_providers/dns_provider.dart +++ b/lib/logic/providers/dns_providers/dns_provider.dart @@ -1 +1,36 @@ -abstract class DnsProvider {} +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; +export 'package:selfprivacy/logic/api_maps/generic_result.dart'; + +abstract class DnsProvider { + Future> tryInitApiByToken(final String token); + Future> getZoneId(final String domain); + Future> removeDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }); + Future>> getDnsRecords({ + required final ServerDomain domain, + }); + Future> createDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }); + Future> setDnsRecord( + final DnsRecord record, + final ServerDomain domain, + ); + Future>> domainList(); + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ); + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ); +} From 78320946092d506dda031607a2b8469d3ab25273 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 25 May 2023 00:15:58 -0300 Subject: [PATCH 487/732] chore: Create cloudflare dns provider interface and separate it from api --- .../{cloudflare.dart => cloudflare_api.dart} | 77 +++++++++++++---- ...ctory.dart => cloudflare_api_factory.dart} | 2 +- .../providers/dns_providers/cloudflare.dart | 85 ++++++++++++++++++- 3 files changed, 144 insertions(+), 20 deletions(-) rename lib/logic/api_maps/rest_maps/dns_providers/cloudflare/{cloudflare.dart => cloudflare_api.dart} (85%) rename lib/logic/api_maps/rest_maps/dns_providers/cloudflare/{cloudflare_factory.dart => cloudflare_api_factory.dart} (95%) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart similarity index 85% rename from lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart rename to lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index 5df05a48..f063faba 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -19,10 +19,6 @@ class CloudflareApi extends DnsProviderApi { final String? customToken; - @override - RegExp getApiTokenValidation() => - RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); - @override BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); @@ -45,7 +41,6 @@ class CloudflareApi extends DnsProviderApi { @override String rootAddress = 'https://api.cloudflare.com/client/v4'; - @override Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; @@ -92,27 +87,32 @@ class CloudflareApi extends DnsProviderApi { ); } - @override - Future getZoneId(final String domain) async { - String? zoneId; + Future>> getZones(final String domain) async { + List zones = []; + late final Response? response; final Dio client = await getClient(); try { - final Response response = await client.get( + response = await client.get( '/zones', queryParameters: {'name': domain}, ); - zoneId = response.data['result'][0]['id']; + zones = response.data['result']; } catch (e) { print(e); + GenericResult( + success: false, + data: zones, + code: response?.statusCode, + message: response?.statusMessage, + ); } finally { close(client); } - return zoneId; + return GenericResult(success: true, data: zones); } - @override Future> removeSimilarRecords({ required final ServerDomain domain, final String? ip4, @@ -151,7 +151,6 @@ class CloudflareApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - @override Future> getDnsRecords({ required final ServerDomain domain, }) async { @@ -189,7 +188,6 @@ class CloudflareApi extends DnsProviderApi { return allRecords; } - @override Future> createMultipleDnsRecords({ required final ServerDomain domain, final String? ip4, @@ -228,7 +226,6 @@ class CloudflareApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - @override Future setDnsRecord( final DnsRecord record, final ServerDomain domain, @@ -249,7 +246,6 @@ class CloudflareApi extends DnsProviderApi { } } - @override Future> domainList() async { final String url = '$rootAddress/zones'; List domains = []; @@ -272,7 +268,6 @@ class CloudflareApi extends DnsProviderApi { return domains; } - @override Future>> validateDnsRecords( final ServerDomain domain, final String ip4, @@ -333,7 +328,6 @@ class CloudflareApi extends DnsProviderApi { ); } - @override List getDesiredDnsRecords( final String? domainName, final String? ip4, @@ -414,4 +408,51 @@ class CloudflareApi extends DnsProviderApi { ), ]; } + + List getProjectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = + DnsRecord(type: 'A', name: domainName, content: ip4); + + final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: 'v=DMARC1; p=none', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api_factory.dart similarity index 95% rename from lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart rename to lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api_factory.dart index ccb58e6a..ba5bd703 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api_factory.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index 6f973a88..192fdd96 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -1,3 +1,86 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; -class CloudflareDnsProvider extends DnsProvider {} +class ApiAdapter { + ApiAdapter({final bool isWithToken = true}) + : _api = CloudflareApi( + isWithToken: isWithToken, + ); + + CloudflareApi api({final bool getInitialized = true}) => getInitialized + ? _api + : CloudflareApi( + isWithToken: false, + ); + + final CloudflareApi _api; +} + +class CloudflareDnsProvider extends DnsProvider { + CloudflareDnsProvider() : _adapter = ApiAdapter(); + CloudflareDnsProvider.load( + final bool isAuthotized, + ) : _adapter = ApiAdapter( + isWithToken: isAuthotized, + ); + + ApiAdapter _adapter; + + @override + Future> tryInitApiByToken(final String token) async { + final api = _adapter.api(getInitialized: false); + final result = await api.isApiTokenValid(token); + if (!result.data || !result.success) { + return result; + } + + _adapter = ApiAdapter(isWithToken: true); + return result; + } + + @override + Future> getZoneId(final String domain) async { + String? id; + final result = await _adapter.api().getZones(domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: id, + code: result.code, + message: result.message, + ); + } + + id = result.data[0]['id']; + + return GenericResult(success: true, data: id); + } + + @override + Future> removeDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) async {} + Future>> getDnsRecords({ + required final ServerDomain domain, + }); + Future> createDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }); + Future> setDnsRecord( + final DnsRecord record, + final ServerDomain domain, + ); + Future>> domainList(); + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ); + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ); +} From 8123632cc102f7ee5c29d67f16dfc6e034c4f1ee Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 29 May 2023 23:18:02 -0300 Subject: [PATCH 488/732] feat: Implement Cloudflare DNS provider layer and separate from API --- .../cloudflare/cloudflare_api.dart | 249 ++-------------- .../providers/dns_providers/cloudflare.dart | 281 +++++++++++++++++- 2 files changed, 303 insertions(+), 227 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index f063faba..ad3fd460 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -115,26 +115,19 @@ class CloudflareApi extends DnsProviderApi { Future> removeSimilarRecords({ required final ServerDomain domain, - final String? ip4, + required final List records, }) async { - final String domainName = domain.domainName; final String domainZoneId = domain.zoneId; - final String url = '/zones/$domainZoneId/dns_records'; final Dio client = await getClient(); try { - final Response response = await client.get(url); - - final List records = response.data['result'] ?? []; final List allDeleteFutures = []; for (final record in records) { - if (record['zone_name'] == domainName) { - allDeleteFutures.add( - client.delete('$url/${record["id"]}'), - ); - } + allDeleteFutures.add( + client.delete('$url/${record["id"]}'), + ); } await Future.wait(allDeleteFutures); } catch (e) { @@ -151,13 +144,13 @@ class CloudflareApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - Future> getDnsRecords({ + Future> getDnsRecords({ required final ServerDomain domain, }) async { Response response; final String domainName = domain.domainName; final String domainZoneId = domain.zoneId; - final List allRecords = []; + final List allRecords = []; final String url = '/zones/$domainZoneId/dns_records'; @@ -168,39 +161,33 @@ class CloudflareApi extends DnsProviderApi { for (final record in records) { if (record['zone_name'] == domainName) { - allRecords.add( - DnsRecord( - name: record['name'], - type: record['type'], - content: record['content'], - ttl: record['ttl'], - proxied: record['proxied'], - ), - ); + allRecords.add(record); } } } catch (e) { print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); } finally { close(client); } - return allRecords; + return GenericResult(data: allRecords, success: true); } Future> createMultipleDnsRecords({ required final ServerDomain domain, - final String? ip4, + required final List records, }) async { - final String domainName = domain.domainName; final String domainZoneId = domain.zoneId; - final List listDnsRecords = - getProjectDnsRecords(domainName, ip4); final List allCreateFutures = []; final Dio client = await getClient(); try { - for (final DnsRecord record in listDnsRecords) { + for (final DnsRecord record in records) { allCreateFutures.add( client.post( '/zones/$domainZoneId/dns_records', @@ -246,213 +233,35 @@ class CloudflareApi extends DnsProviderApi { } } - Future> domainList() async { + Future> getDomains() async { final String url = '$rootAddress/zones'; - List domains = []; + List domains = []; + late final Response? response; final Dio client = await getClient(); try { - final Response response = await client.get( + response = await client.get( url, queryParameters: {'per_page': 50}, ); - domains = response.data['result'] - .map((final el) => el['name'] as String) - .toList(); + domains = response.data['result']; } catch (e) { print(e); + return GenericResult( + success: false, + data: domains, + code: response?.statusCode, + message: response?.statusMessage, + ); } finally { close(client); } - return domains; - } - - Future>> validateDnsRecords( - final ServerDomain domain, - final String ip4, - final String dkimPublicKey, - ) async { - final List records = await getDnsRecords(domain: domain); - final List foundRecords = []; - try { - final List desiredRecords = - getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); - for (final DesiredDnsRecord record in desiredRecords) { - if (record.description == 'record.dkim') { - final DnsRecord foundRecord = records.firstWhere( - (final r) => (r.name == record.name) && r.type == record.type, - orElse: () => DnsRecord( - name: record.name, - type: record.type, - content: '', - ttl: 800, - proxied: false, - ), - ); - // remove all spaces and tabulators from - // the foundRecord.content and the record.content - // to compare them - final String? foundContent = - foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); - final String content = record.content.replaceAll(RegExp(r'\s+'), ''); - if (foundContent == content) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } else { - if (records.any( - (final r) => - (r.name == record.name) && - r.type == record.type && - r.content == record.content, - )) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } - } - } catch (e) { - print(e); - return GenericResult( - data: [], - success: false, - message: e.toString(), - ); - } return GenericResult( - data: foundRecords, success: true, + data: domains, + code: response.statusCode, + message: response.statusMessage, ); } - - List getDesiredDnsRecords( - final String? domainName, - final String? ip4, - final String? dkimPublicKey, - ) { - if (domainName == null || ip4 == null) { - return []; - } - return [ - DesiredDnsRecord( - name: domainName, - content: ip4, - description: 'record.root', - ), - DesiredDnsRecord( - name: 'api.$domainName', - content: ip4, - description: 'record.api', - ), - DesiredDnsRecord( - name: 'cloud.$domainName', - content: ip4, - description: 'record.cloud', - ), - DesiredDnsRecord( - name: 'git.$domainName', - content: ip4, - description: 'record.git', - ), - DesiredDnsRecord( - name: 'meet.$domainName', - content: ip4, - description: 'record.meet', - ), - DesiredDnsRecord( - name: 'social.$domainName', - content: ip4, - description: 'record.social', - ), - DesiredDnsRecord( - name: 'password.$domainName', - content: ip4, - description: 'record.password', - ), - DesiredDnsRecord( - name: 'vpn.$domainName', - content: ip4, - description: 'record.vpn', - ), - DesiredDnsRecord( - name: domainName, - content: domainName, - description: 'record.mx', - type: 'MX', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '_dmarc.$domainName', - content: 'v=DMARC1; p=none', - description: 'record.dmarc', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: domainName, - content: 'v=spf1 a mx ip4:$ip4 -all', - description: 'record.spf', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - if (dkimPublicKey != null) - DesiredDnsRecord( - name: 'selector._domainkey.$domainName', - content: dkimPublicKey, - description: 'record.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - ]; - } - - List getProjectDnsRecords( - final String? domainName, - final String? ip4, - ) { - final DnsRecord domainA = - DnsRecord(type: 'A', name: domainName, content: ip4); - - final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); - final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); - final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); - final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); - final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); - final DnsRecord passwordA = - DnsRecord(type: 'A', name: 'password', content: ip4); - final DnsRecord socialA = - DnsRecord(type: 'A', name: 'social', content: ip4); - final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); - - final DnsRecord txt1 = DnsRecord( - type: 'TXT', - name: '_dmarc', - content: 'v=DMARC1; p=none', - ttl: 18000, - ); - - final DnsRecord txt2 = DnsRecord( - type: 'TXT', - name: domainName, - content: 'v=spf1 a mx ip4:$ip4 -all', - ttl: 18000, - ); - - return [ - domainA, - apiA, - cloudA, - gitA, - meetA, - passwordA, - socialA, - mx, - txt1, - txt2, - vpn - ]; - } } diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index 192fdd96..bd01b240 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -1,4 +1,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; class ApiAdapter { @@ -60,27 +63,291 @@ class CloudflareDnsProvider extends DnsProvider { Future> removeDomainRecords({ required final ServerDomain domain, final String? ip4, - }) async {} + }) async { + final result = await _adapter.api().getDnsRecords(domain: domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: null, + code: result.code, + message: result.message, + ); + } + + return _adapter.api().removeSimilarRecords( + domain: domain, + records: result.data, + ); + } + + @override Future>> getDnsRecords({ required final ServerDomain domain, - }); + }) async { + final List records = []; + final result = await _adapter.api().getDnsRecords(domain: domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: records, + code: result.code, + message: result.message, + ); + } + + for (final rawRecord in result.data) { + records.add( + DnsRecord( + name: rawRecord['name'], + type: rawRecord['type'], + content: rawRecord['content'], + ttl: rawRecord['ttl'], + proxied: rawRecord['proxied'], + ), + ); + } + + return GenericResult( + success: result.success, + data: records, + ); + } + + @override Future> createDomainRecords({ required final ServerDomain domain, final String? ip4, - }); + }) { + final records = getProjectDnsRecords(domain.domainName, ip4); + return _adapter.api().createMultipleDnsRecords( + domain: domain, + records: records, + ); + } + + @override Future> setDnsRecord( final DnsRecord record, final ServerDomain domain, - ); - Future>> domainList(); + ) async => + _adapter.api().createMultipleDnsRecords( + domain: domain, + records: [record], + ); + + @override + Future>> domainList() async { + List domains = []; + final result = await _adapter.api().getDomains(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: domains, + code: result.code, + message: result.message, + ); + } + + domains = result.data + .map( + (final el) => el['name'] as String, + ) + .toList(); + + return GenericResult( + success: true, + data: domains, + ); + } + + @override Future>> validateDnsRecords( final ServerDomain domain, final String ip4, final String dkimPublicKey, - ); + ) async { + final GenericResult> records = + await getDnsRecords(domain: domain); + final List foundRecords = []; + try { + final List desiredRecords = + getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); + for (final DesiredDnsRecord record in desiredRecords) { + if (record.description == 'record.dkim') { + final DnsRecord foundRecord = records.data.firstWhere( + (final r) => (r.name == record.name) && r.type == record.type, + orElse: () => DnsRecord( + name: record.name, + type: record.type, + content: '', + ttl: 800, + proxied: false, + ), + ); + // remove all spaces and tabulators from + // the foundRecord.content and the record.content + // to compare them + final String? foundContent = + foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); + final String content = record.content.replaceAll(RegExp(r'\s+'), ''); + if (foundContent == content) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } else { + if (records.data.any( + (final r) => + (r.name == record.name) && + r.type == record.type && + r.content == record.content, + )) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } + } + } catch (e) { + print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + return GenericResult( + data: foundRecords, + success: true, + ); + } + + @override List getDesiredDnsRecords( final String? domainName, final String? ip4, final String? dkimPublicKey, - ); + ) { + if (domainName == null || ip4 == null) { + return []; + } + return [ + DesiredDnsRecord( + name: domainName, + content: ip4, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ip4, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ip4, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ip4, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ip4, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ip4, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ip4, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ip4, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: domainName, + content: domainName, + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: 'v=DMARC1; p=none', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } + + List getProjectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = + DnsRecord(type: 'A', name: domainName, content: ip4); + + final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: 'v=DMARC1; p=none', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } } From b0769b8ed0ff8b4d67952ccb978b767db429053a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 30 May 2023 00:04:29 -0300 Subject: [PATCH 489/732] chore: Separate business logic from API layer for Digital Ocean DNS --- ...an_dns.dart => digital_ocean_dns_api.dart} | 191 ++-------- ...art => digital_ocean_dns_api_factory.dart} | 2 +- .../dns_providers/digital_ocean.dart | 3 - .../dns_providers/digital_ocean_dns.dart | 356 ++++++++++++++++++ .../dns_providers/dns_provider_factory.dart | 2 +- 5 files changed, 384 insertions(+), 170 deletions(-) rename lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/{digital_ocean_dns.dart => digital_ocean_dns_api.dart} (51%) rename lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/{digital_ocean_dns_factory.dart => digital_ocean_dns_api_factory.dart} (93%) delete mode 100644 lib/logic/providers/dns_providers/digital_ocean.dart create mode 100644 lib/logic/providers/dns_providers/digital_ocean_dns.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart similarity index 51% rename from lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart rename to lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 9a33bdfb..b0e94f41 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -92,28 +92,19 @@ class DigitalOceanDnsApi extends DnsProviderApi { ); } - @override - // TODO: Remove from DnsProviderInterface, stub for now - Future getZoneId(final String domain) async => domain; - - @override Future> removeSimilarRecords({ required final ServerDomain domain, - final String? ip4, + required final List records, }) async { final String domainName = domain.domainName; final Dio client = await getClient(); try { - const String ignoreType = 'SOA'; final List allDeleteFutures = []; - final List records = await getDnsRecords(domain: domain); for (final record in records) { - if (record.type != ignoreType) { - allDeleteFutures.add( - client.delete('/domains/$domainName/records/${record.id}'), - ); - } + allDeleteFutures.add( + client.delete('/domains/$domainName/records/${record.id}'), + ); } await Future.wait(allDeleteFutures); } catch (e) { @@ -130,13 +121,12 @@ class DigitalOceanDnsApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - @override - Future> getDnsRecords({ + Future> getDnsRecords({ required final ServerDomain domain, }) async { Response response; final String domainName = domain.domainName; - final List allRecords = []; + List allRecords = []; /// Default amount is 20, but we will eventually overflow it, /// so I hardcode it to the maximum available amount in advance just in case @@ -148,144 +138,38 @@ class DigitalOceanDnsApi extends DnsProviderApi { final Dio client = await getClient(); try { response = await client.get(url); - final List records = response.data['domain_records'] ?? []; - - for (final record in records) { - allRecords.add( - DnsRecord( - id: record['id'], - name: record['name'], - type: record['type'], - content: record['data'], - ttl: record['ttl'], - proxied: false, - ), - ); - } + allRecords = response.data['domain_records'] ?? []; } catch (e) { print(e); + GenericResult( + data: allRecords, + success: false, + message: e.toString(), + ); } finally { close(client); } - return allRecords; + return GenericResult(data: allRecords, success: true); } - Future>> validateDnsRecords( - final ServerDomain domain, - final String ip4, - final String dkimPublicKey, - ); - - @override - List getDesiredDnsRecords( - final String? domainName, - final String? ip4, - final String? dkimPublicKey, - ) { - if (domainName == null || ip4 == null) { - return []; - } - return [ - DesiredDnsRecord( - name: '@', - content: ip4, - description: 'record.root', - displayName: domainName, - ), - DesiredDnsRecord( - name: 'api', - content: ip4, - description: 'record.api', - displayName: 'api.$domainName', - ), - DesiredDnsRecord( - name: 'cloud', - content: ip4, - description: 'record.cloud', - displayName: 'cloud.$domainName', - ), - DesiredDnsRecord( - name: 'git', - content: ip4, - description: 'record.git', - displayName: 'git.$domainName', - ), - DesiredDnsRecord( - name: 'meet', - content: ip4, - description: 'record.meet', - displayName: 'meet.$domainName', - ), - DesiredDnsRecord( - name: 'social', - content: ip4, - description: 'record.social', - displayName: 'social.$domainName', - ), - DesiredDnsRecord( - name: 'password', - content: ip4, - description: 'record.password', - displayName: 'password.$domainName', - ), - DesiredDnsRecord( - name: 'vpn', - content: ip4, - description: 'record.vpn', - displayName: 'vpn.$domainName', - ), - const DesiredDnsRecord( - name: '@', - content: '@', - description: 'record.mx', - type: 'MX', - category: DnsRecordsCategory.email, - ), - const DesiredDnsRecord( - name: '_dmarc', - content: 'v=DMARC1; p=none', - description: 'record.dmarc', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '@', - content: 'v=spf1 a mx ip4:$ip4 -all', - description: 'record.spf', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - if (dkimPublicKey != null) - DesiredDnsRecord( - name: 'selector._domainkey', - content: dkimPublicKey, - description: 'record.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - ]; - } - - @override Future> createMultipleDnsRecords({ required final ServerDomain domain, - final String? ip4, + required final List records, }) async { final String domainName = domain.domainName; - final List dnsRecords = getProjectDnsRecords(domainName, ip4); final List allCreateFutures = []; final Dio client = await getClient(); try { - for (final DnsRecord record in dnsRecords) { + for (final DnsRecord record in records) { allCreateFutures.add( client.post( '/domains/$domainName/records', data: { 'type': record.type, - 'name': record.name == domainName ? '@' : record.name, - 'data': record.type == 'MX' ? '@' : record.content, + 'name': record.name, + 'data': record.content, 'ttl': record.ttl, 'priority': record.priority, }, @@ -310,47 +194,24 @@ class DigitalOceanDnsApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - @override - Future setDnsRecord( - final DnsRecord record, - final ServerDomain domain, - ) async { - final Dio client = await getClient(); - try { - final domainName = domain.domainName; - await client.post( - '/domains/$domainName/records', - data: { - 'type': record.type, - 'name': record.name, - 'data': record.content, - 'ttl': record.ttl, - 'priority': record.priority, - }, - ); - } catch (e) { - print(e); - } finally { - close(client); - } - } - - @override - Future> domainList() async { - List domains = []; + Future> domainList() async { + List domains = []; final Dio client = await getClient(); try { final Response response = await client.get('/domains'); - domains = response.data['domains'] - .map((final el) => el['name'] as String) - .toList(); + domains = response.data['domains']; } catch (e) { print(e); + return GenericResult( + data: domains, + success: false, + message: e.toString(), + ); } finally { close(client); } - return domains; + return GenericResult(data: domains, success: true); } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api_factory.dart similarity index 93% rename from lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart rename to lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api_factory.dart index 715a4178..4be2c74b 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_factory.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api_factory.dart @@ -1,4 +1,4 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; diff --git a/lib/logic/providers/dns_providers/digital_ocean.dart b/lib/logic/providers/dns_providers/digital_ocean.dart deleted file mode 100644 index 2a8df75b..00000000 --- a/lib/logic/providers/dns_providers/digital_ocean.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; - -class DigitalOceanDnsProvider extends DnsProvider {} diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart new file mode 100644 index 00000000..ca34ad16 --- /dev/null +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -0,0 +1,356 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; + +class ApiAdapter { + ApiAdapter({final bool isWithToken = true}) + : _api = DigitalOceanDnsApi( + isWithToken: isWithToken, + ); + + DigitalOceanDnsApi api({final bool getInitialized = true}) => getInitialized + ? _api + : DigitalOceanDnsApi( + isWithToken: false, + ); + + final DigitalOceanDnsApi _api; +} + +class DigitalOceanDnsProvider extends DnsProvider { + DigitalOceanDnsProvider() : _adapter = ApiAdapter(); + DigitalOceanDnsProvider.load( + final bool isAuthotized, + ) : _adapter = ApiAdapter( + isWithToken: isAuthotized, + ); + + ApiAdapter _adapter; + + @override + Future> tryInitApiByToken(final String token) async { + final api = _adapter.api(getInitialized: false); + final result = await api.isApiTokenValid(token); + if (!result.data || !result.success) { + return result; + } + + _adapter = ApiAdapter(isWithToken: true); + return result; + } + + @override + Future> getZoneId(final String domain) async => + GenericResult( + data: domain, + success: true, + ); + + @override + Future> removeDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final result = await _adapter.api().getDnsRecords(domain: domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: null, + code: result.code, + message: result.message, + ); + } + + const ignoreType = 'SOA'; + final filteredRecords = []; + for (final record in result.data) { + if (record['type'] != ignoreType) { + filteredRecords.add(record); + } + } + + return _adapter.api().removeSimilarRecords( + domain: domain, + records: filteredRecords, + ); + } + + @override + Future>> getDnsRecords({ + required final ServerDomain domain, + }) async { + final List records = []; + final result = await _adapter.api().getDnsRecords(domain: domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: records, + code: result.code, + message: result.message, + ); + } + + for (final rawRecord in result.data) { + records.add( + DnsRecord( + id: rawRecord['id'], + name: rawRecord['name'], + type: rawRecord['type'], + content: rawRecord['data'], + ttl: rawRecord['ttl'], + proxied: false, + ), + ); + } + + return GenericResult(data: records, success: true); + } + + @override + Future> createDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) async => + _adapter.api().createMultipleDnsRecords( + domain: domain, + records: getProjectDnsRecords( + domain.domainName, + ip4, + ), + ); + + @override + Future> setDnsRecord( + final DnsRecord record, + final ServerDomain domain, + ) async => + _adapter.api().createMultipleDnsRecords( + domain: domain, + records: [record], + ); + + @override + Future>> domainList() async { + List domains = []; + final result = await _adapter.api().domainList(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: domains, + code: result.code, + message: result.message, + ); + } + + domains = result.data + .map( + (final el) => el['name'] as String, + ) + .toList(); + + return GenericResult( + success: true, + data: domains, + ); + } + + @override + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ) async { + final GenericResult> records = + await getDnsRecords(domain: domain); + final List foundRecords = []; + try { + final List desiredRecords = + getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); + for (final DesiredDnsRecord record in desiredRecords) { + if (record.description == 'record.dkim') { + final DnsRecord foundRecord = records.data.firstWhere( + (final r) => (r.name == record.name) && r.type == record.type, + orElse: () => DnsRecord( + name: record.name, + type: record.type, + content: '', + ttl: 800, + proxied: false, + ), + ); + // remove all spaces and tabulators from + // the foundRecord.content and the record.content + // to compare them + final String? foundContent = + foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); + final String content = record.content.replaceAll(RegExp(r'\s+'), ''); + if (foundContent == content) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } else { + if (records.data.any( + (final r) => + (r.name == record.name) && + r.type == record.type && + r.content == record.content, + )) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } + } + } catch (e) { + print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + return GenericResult( + data: foundRecords, + success: true, + ); + } + + List getProjectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = DnsRecord(type: 'A', name: '@', content: ip4); + + final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: '@'); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: 'v=DMARC1; p=none', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } + + @override + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ) { + if (domainName == null || ip4 == null) { + return []; + } + return [ + DesiredDnsRecord( + name: '@', + content: ip4, + description: 'record.root', + displayName: domainName, + ), + DesiredDnsRecord( + name: 'api', + content: ip4, + description: 'record.api', + displayName: 'api.$domainName', + ), + DesiredDnsRecord( + name: 'cloud', + content: ip4, + description: 'record.cloud', + displayName: 'cloud.$domainName', + ), + DesiredDnsRecord( + name: 'git', + content: ip4, + description: 'record.git', + displayName: 'git.$domainName', + ), + DesiredDnsRecord( + name: 'meet', + content: ip4, + description: 'record.meet', + displayName: 'meet.$domainName', + ), + DesiredDnsRecord( + name: 'social', + content: ip4, + description: 'record.social', + displayName: 'social.$domainName', + ), + DesiredDnsRecord( + name: 'password', + content: ip4, + description: 'record.password', + displayName: 'password.$domainName', + ), + DesiredDnsRecord( + name: 'vpn', + content: ip4, + description: 'record.vpn', + displayName: 'vpn.$domainName', + ), + const DesiredDnsRecord( + name: '@', + content: '@', + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + const DesiredDnsRecord( + name: '_dmarc', + content: 'v=DMARC1; p=none', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '@', + content: 'v=spf1 a mx ip4:$ip4 -all', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } +} diff --git a/lib/logic/providers/dns_providers/dns_provider_factory.dart b/lib/logic/providers/dns_providers/dns_provider_factory.dart index b42854b7..a2b1694e 100644 --- a/lib/logic/providers/dns_providers/dns_provider_factory.dart +++ b/lib/logic/providers/dns_providers/dns_provider_factory.dart @@ -1,7 +1,7 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/providers/dns_providers/cloudflare.dart'; import 'package:selfprivacy/logic/providers/dns_providers/desec.dart'; -import 'package:selfprivacy/logic/providers/dns_providers/digital_ocean.dart'; +import 'package:selfprivacy/logic/providers/dns_providers/digital_ocean_dns.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; From d114d1477f666ea3a09536b0b803a4adfe483b95 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 30 May 2023 12:48:18 -0300 Subject: [PATCH 490/732] fix: Adapt usage of DNS provider interface to refactoring --- .../digital_ocean_dns_api.dart | 2 - .../cubit/dns_records/dns_records_cubit.dart | 24 +++--- .../initializing/domain_setup_cubit.dart | 15 ++-- .../server_installation_cubit.dart | 5 -- .../server_installation_repository.dart | 33 +++----- .../providers/server_providers/hetzner.dart | 4 +- .../initializing/dns_provider_picker.dart | 2 - .../recovery_server_provider_connected.dart | 80 +++++++++---------- 8 files changed, 70 insertions(+), 95 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index b0e94f41..42274a88 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -19,7 +19,6 @@ class DigitalOceanDnsApi extends DnsProviderApi { final String? customToken; - @override RegExp getApiTokenValidation() => RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); @@ -45,7 +44,6 @@ class DigitalOceanDnsApi extends DnsProviderApi { @override String rootAddress = 'https://api.digitalocean.com/v2'; - @override Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 4a2deea4..91067d06 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -25,14 +25,13 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: ApiController.currentDnsProviderApiFactory - ?.getDnsProvider() - .getDesiredDnsRecords( + dnsRecords: + ProvidersController.currentDnsProvider?.getDesiredDnsRecords( serverInstallationCubit.state.serverDomain?.domainName, '', '', ) ?? - [], + [], ), ); @@ -45,13 +44,12 @@ class DnsRecordsCubit return; } - final foundRecords = await ApiController.currentDnsProviderApiFactory! - .getDnsProvider() - .validateDnsRecords( - domain!, - ipAddress!, - extractDkimRecord(await api.getDnsRecords())?.content ?? '', - ); + final foundRecords = + await ProvidersController.currentDnsProvider!.validateDnsRecords( + domain!, + ipAddress!, + extractDkimRecord(await api.getDnsRecords())?.content ?? '', + ); if (!foundRecords.success || foundRecords.data.isEmpty) { emit(const DnsRecordsState()); @@ -89,10 +87,10 @@ class DnsRecordsCubit emit(state.copyWith(dnsState: DnsRecordsStatus.refreshing)); final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; - await ProvidersController.currentDnsProvider!.removeSimilarRecords( + await ProvidersController.currentDnsProvider!.removeDomainRecords( domain: domain!, ); - await ProvidersController.currentDnsProvider!.createMultipleDnsRecords( + await ProvidersController.currentDnsProvider!.createDomainRecords( domain: domain, ip4: ipAddress, ); diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index cb6e1a6e..1437a6e2 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -1,4 +1,5 @@ import 'package:cubit_form/cubit_form.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; @@ -10,12 +11,12 @@ class DomainSetupCubit extends Cubit { Future load() async { emit(Loading(LoadingTypes.loadingDomain)); - final List list = + final GenericResult> result = await ProvidersController.currentDnsProvider!.domainList(); - if (list.isEmpty) { + if (!result.success || result.data.isEmpty) { emit(Empty()); - } else if (list.length == 1) { - emit(Loaded(list.first)); + } else if (result.data.length == 1) { + emit(Loaded(result.data.first)); } else { emit(MoreThenOne()); } @@ -27,13 +28,13 @@ class DomainSetupCubit extends Cubit { emit(Loading(LoadingTypes.saving)); - final String? zoneId = + final GenericResult zoneIdResult = await ProvidersController.currentDnsProvider!.getZoneId(domainName); - if (zoneId != null) { + if (zoneIdResult.success || zoneIdResult.data != null) { final ServerDomain domain = ServerDomain( domainName: domainName, - zoneId: zoneId, + zoneId: zoneIdResult.data!, provider: DnsProviderType.cloudflare, ); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 52740b64..4a011248 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -9,8 +9,6 @@ import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -258,7 +256,6 @@ class ServerInstallationCubit extends Cubit { ); if (!result.success && result.data != null) { - bool dialoguesResolved = false; CallbackDialogueBranching branching = result.data!; //while (!dialoguesResolved) { showPopUpAlert( @@ -268,7 +265,6 @@ class ServerInstallationCubit extends Cubit { actionButtonOnPressed: () async { final branchingResult = await branching.choices[1].callback!(); if (branchingResult.data == null) { - dialoguesResolved = true; return; } @@ -278,7 +274,6 @@ class ServerInstallationCubit extends Cubit { cancelButtonOnPressed: () async { final branchingResult = await branching.choices[0].callback!(); if (branchingResult.data == null) { - dialoguesResolved = true; return; } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index fb3470ed..ddd42954 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -12,8 +12,6 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; @@ -173,16 +171,14 @@ class ServerInstallationRepository { } Future getDomainId(final String token, final String domain) async { - final DnsProviderApi dnsProviderApi = - ApiController.currentDnsProviderApiFactory!.getDnsProvider( - settings: DnsProviderApiSettings( - isWithToken: false, - customToken: token, - ), - ); - - final String? domainId = await dnsProviderApi.getZoneId(domain); - return domainId; + final result = + await ProvidersController.currentDnsProvider!.tryInitApiByToken(token); + return result.success + ? (await ProvidersController.currentDnsProvider!.getZoneId( + domain, + )) + .data + : null; } Future> isDnsAddressesMatch( @@ -257,7 +253,7 @@ class ServerInstallationRepository { } final GenericResult removingResult = - await ProvidersController.currentDnsProvider!.removeSimilarRecords( + await ProvidersController.currentDnsProvider!.removeDomainRecords( ip4: serverDetails.ip4, domain: domain, ); @@ -270,9 +266,8 @@ class ServerInstallationRepository { bool createdSuccessfully = false; String errorMessage = 'domain.error'.tr(); try { - final GenericResult createResult = await ProvidersController - .currentDnsProvider! - .createMultipleDnsRecords( + final GenericResult createResult = + await ProvidersController.currentDnsProvider!.createDomainRecords( ip4: serverDetails.ip4, domain: domain, ); @@ -605,10 +600,6 @@ class ServerInstallationRepository { getIt().init(); } - Future saveDnsProviderType(final DnsProvider type) async { - await getIt().storeDnsProviderType(type); - } - Future saveBackblazeKey( final BackblazeCredential backblazeCredential, ) async { @@ -683,7 +674,7 @@ class ServerInstallationRepository { final GenericResult removalResult = await ProvidersController .currentDnsProvider! - .removeSimilarRecords(domain: serverDomain); + .removeDomainRecords(domain: serverDomain); if (!removalResult.success) { getIt().showSnackBar('modals.dns_removal_error'.tr()); diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index dedcabfe..ad6f4d4a 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -580,11 +580,11 @@ class HetznerServerProvider extends ServerProvider { } await installationData.successCallback(serverDetails); - await installationData.dnsProvider.removeSimilarRecords( + await installationData.dnsProvider.removeDomainRecords( ip4: serverDetails.ip4, domain: installationData.serverDomain, ); - await installationData.dnsProvider.createMultipleDnsRecords( + await installationData.dnsProvider.createDomainRecords( ip4: serverDetails.ip4, domain: installationData.serverDomain, ); diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 32ca7c37..e7407cf2 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -10,8 +10,6 @@ import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; -import 'package:selfprivacy/utils/network_utils.dart'; -import 'package:selfprivacy/utils/launch_url.dart'; import 'package:url_launcher/url_launcher_string.dart'; class DnsProviderPicker extends StatefulWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index d8a9e8cb..82c29ba2 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -19,51 +19,45 @@ class RecoveryServerProviderConnected extends StatelessWidget { create: (final BuildContext context) => ServerProviderFormCubit(appConfig), child: Builder( - builder: (final BuildContext context) { - final FormCubitState formCubitState = - context.watch().state; - - return BrandHeroScreen( - heroTitle: 'recovering.server_provider_connected'.tr(), - heroSubtitle: 'recovering.server_provider_connected_description'.tr( - args: [appConfig.state.serverDomain?.domainName ?? 'your domain'], + builder: (final BuildContext context) => BrandHeroScreen( + heroTitle: 'recovering.server_provider_connected'.tr(), + heroSubtitle: 'recovering.server_provider_connected_description'.tr( + args: [appConfig.state.serverDomain?.domainName ?? 'your domain'], + ), + hasBackButton: true, + hasFlashButton: false, + ignoreBreakpoints: true, + hasSupportDrawer: true, + onBackButtonPressed: () { + Navigator.of(context).popUntil((final route) => route.isFirst); + }, + children: [ + CubitFormTextField( + formFieldCubit: context.read().apiKey, + decoration: InputDecoration( + border: const OutlineInputBorder(), + labelText: + 'recovering.server_provider_connected_placeholder'.tr(), + ), ), - hasBackButton: true, - hasFlashButton: false, - ignoreBreakpoints: true, - hasSupportDrawer: true, - onBackButtonPressed: () { - Navigator.of(context).popUntil((final route) => route.isFirst); - }, - children: [ - CubitFormTextField( - formFieldCubit: context.read().apiKey, - decoration: InputDecoration( - border: const OutlineInputBorder(), - labelText: - 'recovering.server_provider_connected_placeholder'.tr(), - ), + const SizedBox(height: 16), + BrandButton.filled( + onPressed: () => + context.read().trySubmit(), + child: Text('basis.continue'.tr()), + ), + const SizedBox(height: 16), + Builder( + builder: (final context) => BrandButton.text( + title: 'initializing.how'.tr(), + onPressed: () => context.read().showArticle( + article: 'how_hetzner', + context: context, + ), ), - const SizedBox(height: 16), - BrandButton.filled( - onPressed: () => - context.read().trySubmit(), - child: Text('basis.continue'.tr()), - ), - const SizedBox(height: 16), - Builder( - builder: (final context) => BrandButton.text( - title: 'initializing.how'.tr(), - onPressed: () => - context.read().showArticle( - article: 'how_hetzner', - context: context, - ), - ), - ), - ], - ); - }, + ), + ], + ), ), ); } From b41b4159b4d11256afb1b025e3d16a346f1da6b5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 9 May 2023 03:15:48 -0300 Subject: [PATCH 491/732] feat: Implement infrastructure for new DNS provider deSEC --- assets/images/logos/desec.svg | 89 +++++ lib/config/hive_config.dart | 3 + .../rest_maps/api_factory_creator.dart | 3 + .../rest_maps/dns_providers/desec/desec.dart | 287 ++++++++++++++++ .../dns_providers/desec/desec_factory.dart | 16 + .../server_installation_cubit.dart | 9 + .../server_installation_repository.dart | 4 + lib/logic/get_it/api_config.dart | 10 + lib/logic/models/hive/server_domain.dart | 2 + .../initializing/dns_provider_picker.dart | 307 ++++++++++++++++++ .../setup/initializing/initializing.dart | 60 +--- 11 files changed, 742 insertions(+), 48 deletions(-) create mode 100644 assets/images/logos/desec.svg create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart create mode 100644 lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart create mode 100644 lib/ui/pages/setup/initializing/dns_provider_picker.dart diff --git a/assets/images/logos/desec.svg b/assets/images/logos/desec.svg new file mode 100644 index 00000000..cb54b268 --- /dev/null +++ b/assets/images/logos/desec.svg @@ -0,0 +1,89 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index b6ba018c..44b03f26 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -93,6 +93,9 @@ class BNames { /// A String field of [serverInstallationBox] box. static String serverProvider = 'serverProvider'; + /// A String field of [serverInstallationBox] box. + static String dnsProvider = 'dnsProvider'; + /// A String field of [serverLocation] box. static String serverLocation = 'serverLocation'; diff --git a/lib/logic/api_maps/rest_maps/api_factory_creator.dart b/lib/logic/api_maps/rest_maps/api_factory_creator.dart index 25518f3c..c1762429 100644 --- a/lib/logic/api_maps/rest_maps/api_factory_creator.dart +++ b/lib/logic/api_maps/rest_maps/api_factory_creator.dart @@ -1,5 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_factory.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_factory.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_factory.dart'; @@ -30,6 +31,8 @@ class ApiFactoryCreator { final DnsProviderApiFactorySettings settings, ) { switch (settings.provider) { + case DnsProvider.desec: + return DesecApiFactory(); case DnsProvider.cloudflare: return CloudflareApiFactory(); case DnsProvider.unknown: diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart new file mode 100644 index 00000000..1906be55 --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -0,0 +1,287 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/dns_records.dart'; + +class DesecApi extends DnsProviderApi { + DesecApi({ + this.hasLogger = false, + this.isWithToken = true, + this.customToken, + }); + @override + final bool hasLogger; + @override + final bool isWithToken; + + final String? customToken; + + @override + RegExp getApiTokenValidation() => + RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); + + @override + BaseOptions get options { + final BaseOptions options = BaseOptions(baseUrl: rootAddress); + if (isWithToken) { + final String? token = getIt().cloudFlareKey; + assert(token != null); + options.headers = {'Authorization': 'Bearer $token'}; + } + + if (customToken != null) { + options.headers = {'Authorization': 'Bearer $customToken'}; + } + + if (validateStatus != null) { + options.validateStatus = validateStatus!; + } + return options; + } + + @override + String rootAddress = 'https://desec.io/api/v1/domains/'; + + @override + Future> isApiTokenValid(final String token) async { + bool isValid = false; + Response? response; + String message = ''; + final Dio client = await getClient(); + try { + response = await client.get( + '', + options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), + headers: {'Authorization': 'Token $token'}, + ), + ); + } catch (e) { + print(e); + isValid = false; + message = e.toString(); + } finally { + close(client); + } + + if (response == null) { + return APIGenericResult( + data: isValid, + success: false, + message: message, + ); + } + + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); + } + + return APIGenericResult( + data: isValid, + success: true, + message: response.statusMessage, + ); + } + + @override + Future getZoneId(final String domain) async => domain; + + @override + Future> removeSimilarRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final String domainName = domain.domainName; + final String url = '/$domainName/rrsets/'; + + final Dio client = await getClient(); + try { + final Response response = await client.get(url); + + final List records = response.data['result'] ?? []; + await client.put(url, data: records); + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return APIGenericResult(success: true, data: null); + } + + @override + Future> getDnsRecords({ + required final ServerDomain domain, + }) async { + Response response; + final String domainName = domain.domainName; + final List allRecords = []; + + final String url = '/$domainName/rrsets/'; + + final Dio client = await getClient(); + try { + response = await client.get(url); + final List records = response.data['result'] ?? []; + + for (final record in records) { + allRecords.add( + DnsRecord( + name: record['subname'], + type: record['type'], + content: record['records'], + ttl: record['ttl'], + ), + ); + } + } catch (e) { + print(e); + } finally { + close(client); + } + + return allRecords; + } + + @override + Future> createMultipleDnsRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final String domainName = domain.domainName; + final List listDnsRecords = projectDnsRecords(domainName, ip4); + final List allCreateFutures = []; + + final Dio client = await getClient(); + try { + for (final DnsRecord record in listDnsRecords) { + allCreateFutures.add( + client.post( + '/$domainName/rrsets/', + data: record.toJson(), + ), + ); + } + await Future.wait(allCreateFutures); + } on DioError catch (e) { + print(e.message); + rethrow; + } catch (e) { + print(e); + return APIGenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return APIGenericResult(success: true, data: null); + } + + List projectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = + DnsRecord(type: 'A', name: domainName, content: ip4); + + final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: 'v=DMARC1; p=none', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } + + @override + Future setDnsRecord( + final DnsRecord record, + final ServerDomain domain, + ) async { + final String domainZoneId = domain.zoneId; + final String url = '$rootAddress/zones/$domainZoneId/dns_records'; + + final Dio client = await getClient(); + try { + await client.post( + url, + data: record.toJson(), + ); + } catch (e) { + print(e); + } finally { + close(client); + } + } + + @override + Future> domainList() async { + final String url = '$rootAddress/zones'; + List domains = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get( + url, + queryParameters: {'per_page': 50}, + ); + domains = response.data['result'] + .map((final el) => el['name'] as String) + .toList(); + } catch (e) { + print(e); + } finally { + close(client); + } + + return domains; + } +} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart new file mode 100644 index 00000000..6c10259b --- /dev/null +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_factory.dart @@ -0,0 +1,16 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; + +class DesecApiFactory extends DnsProviderApiFactory { + @override + DnsProviderApi getDnsProvider({ + final DnsProviderApiSettings settings = const DnsProviderApiSettings(), + }) => + DesecApi( + hasLogger: settings.hasLogger, + isWithToken: settings.isWithToken, + customToken: settings.customToken, + ); +} diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 5638b765..06df6d5a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -66,6 +66,15 @@ class ServerInstallationCubit extends Cubit { ); } + void setDnsProviderType(final DnsProvider providerType) async { + await repository.saveDnsProviderType(providerType); + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: providerType, + ), + ); + } + ProviderApiTokenValidation serverProviderApiTokenValidation() => ApiController.currentServerProviderApiFactory! .getServerProvider() diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 5d45e7b9..851b2be5 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -706,6 +706,10 @@ class ServerInstallationRepository { getIt().init(); } + Future saveDnsProviderType(final DnsProvider type) async { + await getIt().storeDnsProviderType(type); + } + Future saveBackblazeKey( final BackblazeCredential backblazeCredential, ) async { diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 434c9b32..11d73a85 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -14,6 +14,8 @@ class ApiConfigModel { String? get serverType => _serverType; String? get cloudFlareKey => _cloudFlareKey; ServerProvider? get serverProvider => _serverProvider; + DnsProvider? get dnsProvider => _dnsProvider; + BackblazeCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; @@ -23,6 +25,7 @@ class ApiConfigModel { String? _cloudFlareKey; String? _serverType; ServerProvider? _serverProvider; + DnsProvider? _dnsProvider; ServerHostingDetails? _serverDetails; BackblazeCredential? _backblazeCredential; ServerDomain? _serverDomain; @@ -33,6 +36,11 @@ class ApiConfigModel { _serverProvider = value; } + Future storeDnsProviderType(final DnsProvider value) async { + await _box.put(BNames.dnsProvider, value); + _dnsProvider = value; + } + Future storeServerProviderKey(final String value) async { await _box.put(BNames.hetznerKey, value); _serverProviderKey = value; @@ -75,6 +83,7 @@ class ApiConfigModel { void clear() { _serverProviderKey = null; + _dnsProvider = null; _serverLocation = null; _cloudFlareKey = null; _backblazeCredential = null; @@ -95,5 +104,6 @@ class ApiConfigModel { _backblazeBucket = _box.get(BNames.backblazeBucket); _serverType = _box.get(BNames.serverTypeIdentifier); _serverProvider = _box.get(BNames.serverProvider); + _dnsProvider = _box.get(BNames.dnsProvider); } } diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index 9b5d32c1..913fcd42 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -29,4 +29,6 @@ enum DnsProvider { unknown, @HiveField(1) cloudflare, + @HiveField(2) + desec } diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart new file mode 100644 index 00000000..cb0d2111 --- /dev/null +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -0,0 +1,307 @@ +import 'package:cubit_form/cubit_form.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; +import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/utils/launch_url.dart'; + +class DnsProviderPicker extends StatefulWidget { + const DnsProviderPicker({ + required this.formCubit, + required this.serverInstallationCubit, + super.key, + }); + + final DnsProviderFormCubit formCubit; + final ServerInstallationCubit serverInstallationCubit; + + @override + State createState() => _DnsProviderPickerState(); +} + +class _DnsProviderPickerState extends State { + DnsProvider selectedProvider = DnsProvider.unknown; + + void setProvider(final DnsProvider provider) { + setState(() { + selectedProvider = provider; + }); + } + + @override + Widget build(final BuildContext context) { + switch (selectedProvider) { + case DnsProvider.unknown: + return ProviderSelectionPage( + serverInstallationCubit: widget.serverInstallationCubit, + callback: setProvider, + ); + + case DnsProvider.cloudflare: + return ProviderInputDataPage( + providerCubit: widget.formCubit, + providerInfo: ProviderPageInfo( + providerType: DnsProvider.cloudflare, + pathToHow: 'how_cloudflare', + image: Image.asset( + 'assets/images/logos/cloudflare.png', + width: 150, + ), + ), + ); + + case DnsProvider.desec: + return ProviderInputDataPage( + providerCubit: widget.formCubit, + providerInfo: ProviderPageInfo( + providerType: DnsProvider.desec, + pathToHow: 'how_digital_ocean_dns', + image: Image.asset( + 'assets/images/logos/digital_ocean.png', + width: 150, + ), + ), + ); + } + } +} + +class ProviderPageInfo { + const ProviderPageInfo({ + required this.providerType, + required this.pathToHow, + required this.image, + }); + + final String pathToHow; + final Image image; + final DnsProvider providerType; +} + +class ProviderInputDataPage extends StatelessWidget { + const ProviderInputDataPage({ + required this.providerInfo, + required this.providerCubit, + super.key, + }); + + final ProviderPageInfo providerInfo; + final DnsProviderFormCubit providerCubit; + + @override + Widget build(final BuildContext context) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.connect_to_dns'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.connect_to_server_provider_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 32), + CubitFormTextField( + formFieldCubit: providerCubit.apiKey, + textAlign: TextAlign.center, + scrollPadding: const EdgeInsets.only(bottom: 70), + decoration: const InputDecoration( + hintText: 'Provider API Token', + ), + ), + const SizedBox(height: 32), + BrandButton.rised( + text: 'basis.connect'.tr(), + onPressed: () => providerCubit.trySubmit(), + ), + const SizedBox(height: 10), + BrandOutlinedButton( + child: Text('initializing.how'.tr()), + onPressed: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (final BuildContext context) => Padding( + padding: paddingH15V0, + child: ListView( + padding: const EdgeInsets.symmetric(vertical: 16), + children: [ + BrandMarkdown( + fileName: providerInfo.pathToHow, + ), + ], + ), + ), + ), + ), + ], + ); +} + +class ProviderSelectionPage extends StatelessWidget { + const ProviderSelectionPage({ + required this.callback, + required this.serverInstallationCubit, + super.key, + }); + + final Function callback; + final ServerInstallationCubit serverInstallationCubit; + + @override + Widget build(final BuildContext context) => SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.select_dns'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 10), + Text( + 'initializing.select_provider'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 10), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 241, 215, 166), + ), + child: SvgPicture.asset( + 'assets/images/logos/cloudflare.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Hetzner Cloud', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_cloudflare' + .tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.cloudflare); + callback(DnsProvider.cloudflare); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchURL('https://dash.cloudflare.com/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 245, 229, 82), + ), + child: SvgPicture.asset( + 'assets/images/logos/desec.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'deSEC', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_payment_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_payment_text_do'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.desec); + callback(DnsProvider.desec); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => launchURL('https://desec.io/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), + ], + ), + ); +} diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 199203c3..749fbdc9 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -17,6 +17,7 @@ import 'package:selfprivacy/ui/components/drawers/progress_drawer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/dns_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_type_picker.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; @@ -39,7 +40,7 @@ class InitializingPage extends StatelessWidget { actualInitializingPage = [ () => _stepServerProviderToken(cubit), () => _stepServerType(cubit), - () => _stepCloudflare(cubit), + () => _stepDnsProviderToken(cubit), () => _stepBackblaze(cubit), () => _stepDomain(cubit), () => _stepUser(cubit), @@ -238,56 +239,19 @@ class InitializingPage extends StatelessWidget { ), ); - Widget _stepCloudflare(final ServerInstallationCubit initializingCubit) => + Widget _stepDnsProviderToken( + final ServerInstallationCubit initializingCubit, + ) => BlocProvider( create: (final context) => DnsProviderFormCubit(initializingCubit), child: Builder( - builder: (final context) => ResponsiveLayoutWithInfobox( - topChild: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '${'initializing.connect_to_server_provider'.tr()}Cloudflare', - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.manage_domain_dns'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - primaryColumn: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CubitFormTextField( - formFieldCubit: context.read().apiKey, - textAlign: TextAlign.center, - scrollPadding: const EdgeInsets.only(bottom: 70), - decoration: InputDecoration( - hintText: 'initializing.cloudflare_api_token'.tr(), - ), - ), - const SizedBox(height: 32), - BrandButton.filled( - onPressed: () => - context.read().trySubmit(), - text: 'basis.connect'.tr(), - ), - const SizedBox(height: 10), - BrandOutlinedButton( - onPressed: () { - context.read().showArticle( - article: 'how_cloudflare', - context: context, - ); - Scaffold.of(context).openEndDrawer(); - }, - title: 'initializing.how'.tr(), - ), - ], - ), - ), + builder: (final context) { + final providerCubit = context.watch(); + return DnsProviderPicker( + formCubit: providerCubit, + serverInstallationCubit: initializingCubit, + ); + }, ), ); From 01c09aaae431525695d37f358c39eaa15d857e4f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 12 May 2023 03:07:43 -0300 Subject: [PATCH 492/732] feat: Implement deSEC API support --- .../rest_maps/dns_providers/desec/desec.dart | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 1906be55..63c7acba 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -172,7 +172,18 @@ class DesecApi extends DnsProviderApi { allCreateFutures.add( client.post( '/$domainName/rrsets/', - data: record.toJson(), + data: record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + }, ), ); } @@ -198,10 +209,9 @@ class DesecApi extends DnsProviderApi { final String? domainName, final String? ip4, ) { - final DnsRecord domainA = - DnsRecord(type: 'A', name: domainName, content: ip4); + final DnsRecord domainA = DnsRecord(type: 'A', name: null, content: ip4); - final DnsRecord mx = DnsRecord(type: 'MX', name: '@', content: domainName); + final DnsRecord mx = DnsRecord(type: 'MX', name: null, content: domainName); final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); @@ -221,7 +231,7 @@ class DesecApi extends DnsProviderApi { final DnsRecord txt2 = DnsRecord( type: 'TXT', - name: domainName, + name: null, content: 'v=spf1 a mx ip4:$ip4 -all', ttl: 18000, ); @@ -246,14 +256,24 @@ class DesecApi extends DnsProviderApi { final DnsRecord record, final ServerDomain domain, ) async { - final String domainZoneId = domain.zoneId; - final String url = '$rootAddress/zones/$domainZoneId/dns_records'; + final String url = '/${domain.domainName}/rrsets/'; final Dio client = await getClient(); try { await client.post( url, - data: record.toJson(), + data: record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + }, ); } catch (e) { print(e); @@ -264,14 +284,12 @@ class DesecApi extends DnsProviderApi { @override Future> domainList() async { - final String url = '$rootAddress/zones'; List domains = []; final Dio client = await getClient(); try { final Response response = await client.get( - url, - queryParameters: {'per_page': 50}, + '', ); domains = response.data['result'] .map((final el) => el['name'] as String) From c67e37a40e1a016b23612ffcec29bddd707396d5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 12 May 2023 16:32:19 -0300 Subject: [PATCH 493/732] fix: Adjust graphql schemas to new dns provider - fix runtime bugs --- .../schema/disk_volumes.graphql.dart | 1 + .../graphql_maps/schema/schema.graphql | 3 +- .../graphql_maps/schema/schema.graphql.dart | 6 +- .../graphql_maps/schema/server_api.graphql | 9 + .../schema/server_api.graphql.dart | 546 +++++++++++++++++- .../schema/server_settings.graphql.dart | 2 +- .../graphql_maps/schema/services.graphql.dart | 1 - .../graphql_maps/schema/users.graphql.dart | 2 +- .../graphql_maps/server_api/server_api.dart | 20 + .../dns_providers/cloudflare/cloudflare.dart | 2 +- .../rest_maps/dns_providers/desec/desec.dart | 12 +- .../digital_ocean/digital_ocean.dart | 4 +- .../server_providers/hetzner/hetzner.dart | 6 +- .../server_providers/server_provider.dart | 15 + .../initializing/dns_provider_form_cubit.dart | 4 +- .../server_installation_cubit.dart | 37 +- .../server_installation_repository.dart | 45 +- .../server_installation_state.dart | 40 +- lib/logic/get_it/api_config.dart | 12 +- lib/logic/models/hive/server_domain.dart | 14 +- lib/logic/models/hive/server_domain.g.dart | 5 + ...udflare.dart => recovery_confirm_dns.dart} | 4 +- .../setup/recovering/recovery_routing.dart | 6 +- lib/ui/router/router.gr.dart | 526 ++++++++--------- 24 files changed, 968 insertions(+), 354 deletions(-) rename lib/ui/pages/setup/recovering/{recovery_confirm_cloudflare.dart => recovery_confirm_dns.dart} (96%) diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 22409ef9..9ffbfe0b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -3,6 +3,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index ed167742..89bc30c8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -75,7 +75,8 @@ type DeviceApiTokenMutationReturn implements MutationReturnInterface { } enum DnsProvider { - CLOUDFLARE + CLOUDFLARE, + DESEC } type DnsRecord { diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 1b92ccad..8548e4dd 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1096,12 +1096,14 @@ class _CopyWithStubImpl$Input$UserMutationInput _res; } -enum Enum$DnsProvider { CLOUDFLARE, $unknown } +enum Enum$DnsProvider { CLOUDFLARE, DESEC, $unknown } String toJson$Enum$DnsProvider(Enum$DnsProvider e) { switch (e) { case Enum$DnsProvider.CLOUDFLARE: return r'CLOUDFLARE'; + case Enum$DnsProvider.DESEC: + return r'DESEC'; case Enum$DnsProvider.$unknown: return r'$unknown'; } @@ -1111,6 +1113,8 @@ Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { switch (value) { case r'CLOUDFLARE': return Enum$DnsProvider.CLOUDFLARE; + case r'DESEC': + return Enum$DnsProvider.DESEC; default: return Enum$DnsProvider.$unknown; } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index d4339094..35df3749 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -72,6 +72,15 @@ query SystemServerProvider { } } +query SystemDnsProvider { + system { + domainInfo { + provider + } + } +} + + query GetApiTokens { api { devices { diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 4bb33228..4eda2c92 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -6380,6 +6380,550 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system$provider _res; } +class Query$SystemDnsProvider { + Query$SystemDnsProvider({ + required this.system, + required this.$__typename, + }); + + factory Query$SystemDnsProvider.fromJson(Map json) { + final l$system = json['system']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider( + system: Query$SystemDnsProvider$system.fromJson( + (l$system as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$SystemDnsProvider$system system; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$system = system; + _resultData['system'] = l$system.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([ + l$system, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemDnsProvider) || + runtimeType != other.runtimeType) { + return false; + } + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider on Query$SystemDnsProvider { + CopyWith$Query$SystemDnsProvider get copyWith => + CopyWith$Query$SystemDnsProvider( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$SystemDnsProvider { + factory CopyWith$Query$SystemDnsProvider( + Query$SystemDnsProvider instance, + TRes Function(Query$SystemDnsProvider) then, + ) = _CopyWithImpl$Query$SystemDnsProvider; + + factory CopyWith$Query$SystemDnsProvider.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider; + + TRes call({ + Query$SystemDnsProvider$system? system, + String? $__typename, + }); + CopyWith$Query$SystemDnsProvider$system get system; +} + +class _CopyWithImpl$Query$SystemDnsProvider + implements CopyWith$Query$SystemDnsProvider { + _CopyWithImpl$Query$SystemDnsProvider( + this._instance, + this._then, + ); + + final Query$SystemDnsProvider _instance; + + final TRes Function(Query$SystemDnsProvider) _then; + + static const _undefined = {}; + + TRes call({ + Object? system = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$SystemDnsProvider( + system: system == _undefined || system == null + ? _instance.system + : (system as Query$SystemDnsProvider$system), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$SystemDnsProvider$system get system { + final local$system = _instance.system; + return CopyWith$Query$SystemDnsProvider$system( + local$system, (e) => call(system: e)); + } +} + +class _CopyWithStubImpl$Query$SystemDnsProvider + implements CopyWith$Query$SystemDnsProvider { + _CopyWithStubImpl$Query$SystemDnsProvider(this._res); + + TRes _res; + + call({ + Query$SystemDnsProvider$system? system, + String? $__typename, + }) => + _res; + CopyWith$Query$SystemDnsProvider$system get system => + CopyWith$Query$SystemDnsProvider$system.stub(_res); +} + +const documentNodeQuerySystemDnsProvider = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'SystemDnsProvider'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), +]); +Query$SystemDnsProvider _parserFn$Query$SystemDnsProvider( + Map data) => + Query$SystemDnsProvider.fromJson(data); + +class Options$Query$SystemDnsProvider + extends graphql.QueryOptions { + Options$Query$SystemDnsProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemDnsProvider, + parserFn: _parserFn$Query$SystemDnsProvider, + ); +} + +class WatchOptions$Query$SystemDnsProvider + extends graphql.WatchQueryOptions { + WatchOptions$Query$SystemDnsProvider({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemDnsProvider, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemDnsProvider, + ); +} + +class FetchMoreOptions$Query$SystemDnsProvider + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$SystemDnsProvider( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQuerySystemDnsProvider, + ); +} + +extension ClientExtension$Query$SystemDnsProvider on graphql.GraphQLClient { + Future> query$SystemDnsProvider( + [Options$Query$SystemDnsProvider? options]) async => + await this.query(options ?? Options$Query$SystemDnsProvider()); + graphql.ObservableQuery watchQuery$SystemDnsProvider( + [WatchOptions$Query$SystemDnsProvider? options]) => + this.watchQuery(options ?? WatchOptions$Query$SystemDnsProvider()); + void writeQuery$SystemDnsProvider({ + required Query$SystemDnsProvider data, + bool broadcast = true, + }) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQuerySystemDnsProvider)), + data: data.toJson(), + broadcast: broadcast, + ); + Query$SystemDnsProvider? readQuery$SystemDnsProvider( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemDnsProvider)), + optimistic: optimistic, + ); + return result == null ? null : Query$SystemDnsProvider.fromJson(result); + } +} + +class Query$SystemDnsProvider$system { + Query$SystemDnsProvider$system({ + required this.domainInfo, + required this.$__typename, + }); + + factory Query$SystemDnsProvider$system.fromJson(Map json) { + final l$domainInfo = json['domainInfo']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider$system( + domainInfo: Query$SystemDnsProvider$system$domainInfo.fromJson( + (l$domainInfo as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$SystemDnsProvider$system$domainInfo domainInfo; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$domainInfo = domainInfo; + _resultData['domainInfo'] = l$domainInfo.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$domainInfo = domainInfo; + final l$$__typename = $__typename; + return Object.hashAll([ + l$domainInfo, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemDnsProvider$system) || + runtimeType != other.runtimeType) { + return false; + } + final l$domainInfo = domainInfo; + final lOther$domainInfo = other.domainInfo; + if (l$domainInfo != lOther$domainInfo) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider$system + on Query$SystemDnsProvider$system { + CopyWith$Query$SystemDnsProvider$system + get copyWith => CopyWith$Query$SystemDnsProvider$system( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$SystemDnsProvider$system { + factory CopyWith$Query$SystemDnsProvider$system( + Query$SystemDnsProvider$system instance, + TRes Function(Query$SystemDnsProvider$system) then, + ) = _CopyWithImpl$Query$SystemDnsProvider$system; + + factory CopyWith$Query$SystemDnsProvider$system.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider$system; + + TRes call({ + Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename, + }); + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo; +} + +class _CopyWithImpl$Query$SystemDnsProvider$system + implements CopyWith$Query$SystemDnsProvider$system { + _CopyWithImpl$Query$SystemDnsProvider$system( + this._instance, + this._then, + ); + + final Query$SystemDnsProvider$system _instance; + + final TRes Function(Query$SystemDnsProvider$system) _then; + + static const _undefined = {}; + + TRes call({ + Object? domainInfo = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$SystemDnsProvider$system( + domainInfo: domainInfo == _undefined || domainInfo == null + ? _instance.domainInfo + : (domainInfo as Query$SystemDnsProvider$system$domainInfo), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo { + final local$domainInfo = _instance.domainInfo; + return CopyWith$Query$SystemDnsProvider$system$domainInfo( + local$domainInfo, (e) => call(domainInfo: e)); + } +} + +class _CopyWithStubImpl$Query$SystemDnsProvider$system + implements CopyWith$Query$SystemDnsProvider$system { + _CopyWithStubImpl$Query$SystemDnsProvider$system(this._res); + + TRes _res; + + call({ + Query$SystemDnsProvider$system$domainInfo? domainInfo, + String? $__typename, + }) => + _res; + CopyWith$Query$SystemDnsProvider$system$domainInfo get domainInfo => + CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(_res); +} + +class Query$SystemDnsProvider$system$domainInfo { + Query$SystemDnsProvider$system$domainInfo({ + required this.provider, + required this.$__typename, + }); + + factory Query$SystemDnsProvider$system$domainInfo.fromJson( + Map json) { + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$SystemDnsProvider$system$domainInfo( + provider: fromJson$Enum$DnsProvider((l$provider as String)), + $__typename: (l$$__typename as String), + ); + } + + final Enum$DnsProvider provider; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$DnsProvider(l$provider); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$provider = provider; + final l$$__typename = $__typename; + return Object.hashAll([ + l$provider, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$SystemDnsProvider$system$domainInfo) || + runtimeType != other.runtimeType) { + return false; + } + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$SystemDnsProvider$system$domainInfo + on Query$SystemDnsProvider$system$domainInfo { + CopyWith$Query$SystemDnsProvider$system$domainInfo< + Query$SystemDnsProvider$system$domainInfo> + get copyWith => CopyWith$Query$SystemDnsProvider$system$domainInfo( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$SystemDnsProvider$system$domainInfo { + factory CopyWith$Query$SystemDnsProvider$system$domainInfo( + Query$SystemDnsProvider$system$domainInfo instance, + TRes Function(Query$SystemDnsProvider$system$domainInfo) then, + ) = _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo; + + factory CopyWith$Query$SystemDnsProvider$system$domainInfo.stub(TRes res) = + _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo; + + TRes call({ + Enum$DnsProvider? provider, + String? $__typename, + }); +} + +class _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo + implements CopyWith$Query$SystemDnsProvider$system$domainInfo { + _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo( + this._instance, + this._then, + ); + + final Query$SystemDnsProvider$system$domainInfo _instance; + + final TRes Function(Query$SystemDnsProvider$system$domainInfo) _then; + + static const _undefined = {}; + + TRes call({ + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$SystemDnsProvider$system$domainInfo( + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$DnsProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo + implements CopyWith$Query$SystemDnsProvider$system$domainInfo { + _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo(this._res); + + TRes _res; + + call({ + Enum$DnsProvider? provider, + String? $__typename, + }) => + _res; +} + class Query$GetApiTokens { Query$GetApiTokens({ required this.api, diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 14996423..8da4e347 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index dfea309c..1501d709 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index c2d0027f..dbc8eccc 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index bb703103..51da63ac 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dar import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; @@ -87,6 +88,25 @@ class ServerApi extends ApiMap return providerType; } + Future getDnsProviderType() async { + QueryResult response; + DnsProvider providerType = DnsProvider.unknown; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$SystemDnsProvider(); + if (response.hasException) { + print(response.exception.toString()); + } + providerType = DnsProvider.fromGraphQL( + response.parsedData!.system.domainInfo.provider, + ); + } catch (e) { + print(e); + } + return providerType; + } + Future isUsingBinds() async { QueryResult response; bool usesBinds = false; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 14cf5c96..04ff622b 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -27,7 +27,7 @@ class CloudflareApi extends DnsProviderApi { BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); if (isWithToken) { - final String? token = getIt().cloudFlareKey; + final String? token = getIt().dnsProviderKey; assert(token != null); options.headers = {'Authorization': 'Bearer $token'}; } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 63c7acba..4e55bbfa 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -27,13 +27,13 @@ class DesecApi extends DnsProviderApi { BaseOptions get options { final BaseOptions options = BaseOptions(baseUrl: rootAddress); if (isWithToken) { - final String? token = getIt().cloudFlareKey; + final String? token = getIt().dnsProviderKey; assert(token != null); - options.headers = {'Authorization': 'Bearer $token'}; + options.headers = {'Authorization': 'Token $token'}; } if (customToken != null) { - options.headers = {'Authorization': 'Bearer $customToken'}; + options.headers = {'Authorization': 'Token $customToken'}; } if (validateStatus != null) { @@ -107,7 +107,7 @@ class DesecApi extends DnsProviderApi { try { final Response response = await client.get(url); - final List records = response.data['result'] ?? []; + final List records = response.data; await client.put(url, data: records); } catch (e) { print(e); @@ -136,7 +136,7 @@ class DesecApi extends DnsProviderApi { final Dio client = await getClient(); try { response = await client.get(url); - final List records = response.data['result'] ?? []; + final List records = response.data; for (final record in records) { allRecords.add( @@ -291,7 +291,7 @@ class DesecApi extends DnsProviderApi { final Response response = await client.get( '', ); - domains = response.data['result'] + domains = response.data .map((final el) => el['name'] as String) .toList(); } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index b2f4c624..21861dd8 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -332,6 +332,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }) async { ServerHostingDetails? serverDetails; @@ -344,9 +345,10 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final String formattedHostname = getHostnameFromDomain(domainName); const String infectBranch = 'providers/digital-ocean'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; + final String dnsProviderType = dnsProviderToInfectName(dnsProvider); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | DNS_PROVIDER_TYPE=$dnsProviderType PROVIDER=$infectProviderName STAGING_ACME='$stagingAcme' DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log"; print(userdataString); Response? serverCreateResponse; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 7f51c768..c2228030 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -356,6 +356,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }) async { final APIGenericResult newVolumeResponse = await createVolume(); @@ -374,6 +375,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { domainName: domainName, volume: newVolumeResponse.data!, serverType: serverType, + dnsProvider: dnsProvider, ); } @@ -383,6 +385,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final String domainName, required final ServerVolume volume, required final String serverType, + required final DnsProvider dnsProvider, }) async { final Dio client = await getClient(); @@ -395,9 +398,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); + final String dnsProviderType = dnsProviderToInfectName(dnsProvider); final String userdataString = - "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; + "#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$hostname bash 2>&1 | tee /tmp/infect.log"; Response? serverCreateResponse; ServerHostingDetails? serverDetails; diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index c858d67b..ae7911d0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -39,6 +39,7 @@ abstract class ServerProviderApi extends ApiMap { required final User rootUser, required final String domainName, required final String serverType, + required final DnsProvider dnsProvider, }); Future> createReverseDns({ required final ServerHostingDetails serverDetails, @@ -54,6 +55,20 @@ abstract class ServerProviderApi extends ApiMap { final DateTime end, ); + String dnsProviderToInfectName(final DnsProvider dnsProvider) { + String dnsProviderType; + switch (dnsProvider) { + case DnsProvider.desec: + dnsProviderType = 'DESEC'; + break; + case DnsProvider.cloudflare: + default: + dnsProviderType = 'CLOUDFLARE'; + break; + } + return dnsProviderType; + } + /// Provider name key which lets infect understand what kind of installation /// it requires, for example 'digitaloceal' for Digital Ocean String get infectProviderName; diff --git a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart index 553c3492..edb97de6 100644 --- a/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart'; class DnsProviderFormCubit extends FormCubit { DnsProviderFormCubit(this.initializingCubit) { @@ -11,7 +10,6 @@ class DnsProviderFormCubit extends FormCubit { initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - LengthStringNotEqualValidation(40) ], ); @@ -20,7 +18,7 @@ class DnsProviderFormCubit extends FormCubit { @override FutureOr onSubmit() async { - initializingCubit.setCloudflareKey(apiKey.state.value); + initializingCubit.setDnsApiToken(apiKey.state.value); } final ServerInstallationCubit initializingCubit; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 06df6d5a..cc5bffcc 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -110,16 +110,6 @@ class ServerInstallationCubit extends Cubit { Future isDnsProviderApiTokenValid( final String providerToken, ) async { - if (ApiController.currentDnsProviderApiFactory == null) { - // No other DNS provider is supported for now, - // so it's safe to hardcode Cloudflare - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: DnsProvider.cloudflare, - ), - ); - } - final APIGenericResult apiResponse = await ApiController.currentDnsProviderApiFactory! .getDnsProvider( @@ -223,16 +213,16 @@ class ServerInstallationCubit extends Cubit { ); } - void setCloudflareKey(final String cloudFlareKey) async { + void setDnsApiToken(final String dnsApiToken) async { if (state is ServerInstallationRecovery) { - setAndValidateCloudflareToken(cloudFlareKey); + setAndValidateDnsApiToken(dnsApiToken); return; } - await repository.saveCloudFlareKey(cloudFlareKey); + await repository.saveDnsProviderKey(dnsApiToken); emit( (state as ServerInstallationNotFinished) - .copyWith(cloudFlareKey: cloudFlareKey), + .copyWith(dnsApiToken: dnsApiToken), ); } @@ -293,7 +283,7 @@ class ServerInstallationCubit extends Cubit { await repository.createServer( state.rootUser!, state.serverDomain!.domainName, - state.cloudFlareKey!, + state.dnsApiToken!, state.backblazeCredential!, onCancel: onCancel, onSuccess: onSuccess, @@ -595,7 +585,7 @@ class ServerInstallationCubit extends Cubit { ), ); break; - case RecoveryStep.cloudflareToken: + case RecoveryStep.dnsProviderToken: repository.deleteServerDetails(); emit( dataState.copyWith( @@ -691,12 +681,12 @@ class ServerInstallationCubit extends Cubit { emit( dataState.copyWith( serverDetails: serverDetails, - currentStep: RecoveryStep.cloudflareToken, + currentStep: RecoveryStep.dnsProviderToken, ), ); } - Future setAndValidateCloudflareToken(final String token) async { + Future setAndValidateDnsApiToken(final String token) async { final ServerInstallationRecovery dataState = state as ServerInstallationRecovery; final ServerDomain? serverDomain = dataState.serverDomain; @@ -714,10 +704,13 @@ class ServerInstallationCubit extends Cubit { ServerDomain( domainName: serverDomain.domainName, zoneId: zoneId, - provider: DnsProvider.cloudflare, + provider: await ServerApi( + customToken: token, + isWithToken: true, + ).getDnsProviderType(), ), ); - await repository.saveCloudFlareKey(token); + await repository.saveDnsProviderKey(token); emit( dataState.copyWith( serverDomain: ServerDomain( @@ -725,7 +718,7 @@ class ServerInstallationCubit extends Cubit { zoneId: zoneId, provider: DnsProvider.cloudflare, ), - cloudFlareKey: token, + dnsApiToken: token, currentStep: RecoveryStep.backblazeToken, ), ); @@ -776,7 +769,7 @@ class ServerInstallationCubit extends Cubit { ServerInstallationNotFinished( providerApiToken: state.providerApiToken, serverDomain: state.serverDomain, - cloudFlareKey: state.cloudFlareKey, + dnsApiToken: state.dnsApiToken, backblazeCredential: state.backblazeCredential, rootUser: state.rootUser, serverDetails: null, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 851b2be5..ff167518 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -45,7 +45,7 @@ class ServerInstallationRepository { Future load() async { final String? providerApiToken = getIt().serverProviderKey; final String? location = getIt().serverLocation; - final String? cloudflareToken = getIt().cloudFlareKey; + final String? dnsApiToken = getIt().dnsProviderKey; final String? serverTypeIdentificator = getIt().serverType; final ServerDomain? serverDomain = getIt().serverDomain; final ServerProvider? serverProvider = @@ -54,6 +54,7 @@ class ServerInstallationRepository { getIt().backblazeCredential; final ServerHostingDetails? serverDetails = getIt().serverDetails; + final DnsProvider? dnsProvider = getIt().dnsProvider; if (serverProvider != null || (serverDetails != null && @@ -75,18 +76,21 @@ class ServerInstallationRepository { ); } - // No other DNS provider is supported for now, so it's fine. - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: DnsProvider.cloudflare, - ), - ); + if (dnsProvider != null || + (serverDomain != null && + serverDomain.provider != DnsProvider.unknown)) { + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: dnsProvider ?? serverDomain!.provider, + ), + ); + } if (box.get(BNames.hasFinalChecked, defaultValue: false)) { return ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudflareToken!, + dnsApiToken: dnsApiToken!, serverDomain: serverDomain!, backblazeCredential: backblazeCredential!, serverDetails: serverDetails!, @@ -103,14 +107,14 @@ class ServerInstallationRepository { serverDomain != null) { return ServerInstallationRecovery( providerApiToken: providerApiToken, - cloudFlareKey: cloudflareToken, + dnsApiToken: dnsApiToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), currentStep: _getCurrentRecoveryStep( providerApiToken, - cloudflareToken, + dnsApiToken, serverDomain, serverDetails, ), @@ -120,7 +124,7 @@ class ServerInstallationRepository { return ServerInstallationNotFinished( providerApiToken: providerApiToken, - cloudFlareKey: cloudflareToken, + dnsApiToken: dnsApiToken, serverDomain: serverDomain, backblazeCredential: backblazeCredential, serverDetails: serverDetails, @@ -147,7 +151,7 @@ class ServerInstallationRepository { if (serverDomain.provider != DnsProvider.unknown) { return RecoveryStep.backblazeToken; } - return RecoveryStep.cloudflareToken; + return RecoveryStep.dnsProviderToken; } return RecoveryStep.serverSelection; } @@ -238,7 +242,7 @@ class ServerInstallationRepository { Future createServer( final User rootUser, final String domainName, - final String cloudFlareKey, + final String dnsApiToken, final BackblazeCredential backblazeCredential, { required final void Function() onCancel, required final Future Function(ServerHostingDetails serverDetails) @@ -256,7 +260,8 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { final APIGenericResult createResult = await api.createServer( - dnsApiToken: cloudFlareKey, + dnsProvider: getIt().dnsProvider!, + dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, @@ -280,7 +285,8 @@ class ServerInstallationRepository { try { final APIGenericResult createServerResult = await api.createServer( - dnsApiToken: cloudFlareKey, + dnsProvider: getIt().dnsProvider!, + dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, @@ -304,7 +310,8 @@ class ServerInstallationRepository { ServerHostingDetails? serverDetails; try { final APIGenericResult createResult = await api.createServer( - dnsApiToken: cloudFlareKey, + dnsProvider: getIt().dnsProvider!, + dnsApiToken: dnsApiToken, rootUser: rootUser, domainName: domainName, serverType: getIt().serverType!, @@ -721,11 +728,11 @@ class ServerInstallationRepository { getIt().init(); } - Future saveCloudFlareKey(final String key) async { - await getIt().storeCloudFlareKey(key); + Future saveDnsProviderKey(final String key) async { + await getIt().storeDnsProviderKey(key); } - Future deleteCloudFlareKey() async { + Future deleteDnsProviderKey() async { await box.delete(BNames.cloudFlareKey); getIt().init(); } diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 331c3e2a..5ceaafdd 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -4,7 +4,7 @@ abstract class ServerInstallationState extends Equatable { const ServerInstallationState({ required this.providerApiToken, required this.serverTypeIdentificator, - required this.cloudFlareKey, + required this.dnsApiToken, required this.backblazeCredential, required this.serverDomain, required this.rootUser, @@ -18,7 +18,7 @@ abstract class ServerInstallationState extends Equatable { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -28,7 +28,7 @@ abstract class ServerInstallationState extends Equatable { ]; final String? providerApiToken; - final String? cloudFlareKey; + final String? dnsApiToken; final String? serverTypeIdentificator; final BackblazeCredential? backblazeCredential; final ServerDomain? serverDomain; @@ -40,7 +40,7 @@ abstract class ServerInstallationState extends Equatable { bool get isServerProviderApiKeyFilled => providerApiToken != null; bool get isServerTypeFilled => serverTypeIdentificator != null; - bool get isDnsProviderFilled => cloudFlareKey != null; + bool get isDnsProviderFilled => dnsApiToken != null; bool get isBackupsProviderFilled => backblazeCredential != null; bool get isDomainSelected => serverDomain != null; bool get isPrimaryUserFilled => rootUser != null; @@ -87,7 +87,7 @@ class TimerState extends ServerInstallationNotFinished { }) : super( providerApiToken: dataState.providerApiToken, serverTypeIdentificator: dataState.serverTypeIdentificator, - cloudFlareKey: dataState.cloudFlareKey, + dnsApiToken: dataState.dnsApiToken, backblazeCredential: dataState.backblazeCredential, serverDomain: dataState.serverDomain, rootUser: dataState.rootUser, @@ -114,7 +114,7 @@ enum ServerSetupProgress { nothingYet, serverProviderFilled, servertTypeFilled, - cloudFlareFilled, + dnsProviderFilled, backblazeFilled, domainFilled, userFilled, @@ -133,7 +133,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { required this.dnsMatches, super.providerApiToken, super.serverTypeIdentificator, - super.cloudFlareKey, + super.dnsApiToken, super.backblazeCredential, super.serverDomain, super.rootUser, @@ -146,7 +146,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -160,7 +160,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationNotFinished copyWith({ final String? providerApiToken, final String? serverTypeIdentificator, - final String? cloudFlareKey, + final String? dnsApiToken, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, @@ -175,7 +175,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { providerApiToken: providerApiToken ?? this.providerApiToken, serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, - cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, + dnsApiToken: dnsApiToken ?? this.dnsApiToken, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, rootUser: rootUser ?? this.rootUser, @@ -192,7 +192,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudFlareKey!, + dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, rootUser: rootUser!, @@ -208,7 +208,7 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { : super( providerApiToken: null, serverTypeIdentificator: null, - cloudFlareKey: null, + dnsApiToken: null, backblazeCredential: null, serverDomain: null, rootUser: null, @@ -225,7 +225,7 @@ class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ required String super.providerApiToken, required String super.serverTypeIdentificator, - required String super.cloudFlareKey, + required String super.dnsApiToken, required BackblazeCredential super.backblazeCredential, required ServerDomain super.serverDomain, required User super.rootUser, @@ -239,7 +239,7 @@ class ServerInstallationFinished extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -256,7 +256,7 @@ enum RecoveryStep { oldToken, serverProviderToken, serverSelection, - cloudflareToken, + dnsProviderToken, backblazeToken, } @@ -278,7 +278,7 @@ class ServerInstallationRecovery extends ServerInstallationState { required this.recoveryCapabilities, super.providerApiToken, super.serverTypeIdentificator, - super.cloudFlareKey, + super.dnsApiToken, super.backblazeCredential, super.serverDomain, super.rootUser, @@ -295,7 +295,7 @@ class ServerInstallationRecovery extends ServerInstallationState { List get props => [ providerApiToken, serverTypeIdentificator, - cloudFlareKey, + dnsApiToken, backblazeCredential, serverDomain, rootUser, @@ -308,7 +308,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationRecovery copyWith({ final String? providerApiToken, final String? serverTypeIdentificator, - final String? cloudFlareKey, + final String? dnsApiToken, final BackblazeCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, @@ -320,7 +320,7 @@ class ServerInstallationRecovery extends ServerInstallationState { providerApiToken: providerApiToken ?? this.providerApiToken, serverTypeIdentificator: serverTypeIdentificator ?? this.serverTypeIdentificator, - cloudFlareKey: cloudFlareKey ?? this.cloudFlareKey, + dnsApiToken: dnsApiToken ?? this.dnsApiToken, backblazeCredential: backblazeCredential ?? this.backblazeCredential, serverDomain: serverDomain ?? this.serverDomain, rootUser: rootUser ?? this.rootUser, @@ -332,7 +332,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', - cloudFlareKey: cloudFlareKey!, + dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, rootUser: rootUser!, diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 11d73a85..ba49b9b3 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -12,7 +12,7 @@ class ApiConfigModel { String? get serverProviderKey => _serverProviderKey; String? get serverLocation => _serverLocation; String? get serverType => _serverType; - String? get cloudFlareKey => _cloudFlareKey; + String? get dnsProviderKey => _dnsProviderKey; ServerProvider? get serverProvider => _serverProvider; DnsProvider? get dnsProvider => _dnsProvider; @@ -22,7 +22,7 @@ class ApiConfigModel { String? _serverProviderKey; String? _serverLocation; - String? _cloudFlareKey; + String? _dnsProviderKey; String? _serverType; ServerProvider? _serverProvider; DnsProvider? _dnsProvider; @@ -46,9 +46,9 @@ class ApiConfigModel { _serverProviderKey = value; } - Future storeCloudFlareKey(final String value) async { + Future storeDnsProviderKey(final String value) async { await _box.put(BNames.cloudFlareKey, value); - _cloudFlareKey = value; + _dnsProviderKey = value; } Future storeServerTypeIdentifier(final String typeIdentifier) async { @@ -85,7 +85,7 @@ class ApiConfigModel { _serverProviderKey = null; _dnsProvider = null; _serverLocation = null; - _cloudFlareKey = null; + _dnsProviderKey = null; _backblazeCredential = null; _serverDomain = null; _serverDetails = null; @@ -97,7 +97,7 @@ class ApiConfigModel { void init() { _serverProviderKey = _box.get(BNames.hetznerKey); _serverLocation = _box.get(BNames.serverLocation); - _cloudFlareKey = _box.get(BNames.cloudFlareKey); + _dnsProviderKey = _box.get(BNames.cloudFlareKey); _backblazeCredential = _box.get(BNames.backblazeCredential); _serverDomain = _box.get(BNames.serverDomain); _serverDetails = _box.get(BNames.serverDetails); diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index 913fcd42..de3ef92a 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -1,4 +1,5 @@ import 'package:hive/hive.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; part 'server_domain.g.dart'; @@ -30,5 +31,16 @@ enum DnsProvider { @HiveField(1) cloudflare, @HiveField(2) - desec + desec; + + factory DnsProvider.fromGraphQL(final Enum$DnsProvider provider) { + switch (provider) { + case Enum$DnsProvider.CLOUDFLARE: + return cloudflare; + case Enum$DnsProvider.DESEC: + return desec; + default: + return unknown; + } + } } diff --git a/lib/logic/models/hive/server_domain.g.dart b/lib/logic/models/hive/server_domain.g.dart index 3265db6b..6770d9bc 100644 --- a/lib/logic/models/hive/server_domain.g.dart +++ b/lib/logic/models/hive/server_domain.g.dart @@ -58,6 +58,8 @@ class DnsProviderAdapter extends TypeAdapter { return DnsProvider.unknown; case 1: return DnsProvider.cloudflare; + case 2: + return DnsProvider.desec; default: return DnsProvider.unknown; } @@ -72,6 +74,9 @@ class DnsProviderAdapter extends TypeAdapter { case DnsProvider.cloudflare: writer.writeByte(1); break; + case DnsProvider.desec: + writer.writeByte(2); + break; } } diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart similarity index 96% rename from lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart rename to lib/ui/pages/setup/recovering/recovery_confirm_dns.dart index 93c889a5..9dcad056 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart @@ -7,8 +7,8 @@ import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; -class RecoveryConfirmCloudflare extends StatelessWidget { - const RecoveryConfirmCloudflare({super.key}); +class RecoveryConfirmDns extends StatelessWidget { + const RecoveryConfirmDns({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 14c3f9a7..be5eb2ea 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart' import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_recovery_key.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_new_device_key.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_backblaze.dart'; -import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart'; +import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_dns.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_server.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_server_provider_connected.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_method_select.dart'; @@ -55,8 +55,8 @@ class RecoveryRouting extends StatelessWidget { case RecoveryStep.serverSelection: currentPage = const RecoveryConfirmServer(); break; - case RecoveryStep.cloudflareToken: - currentPage = const RecoveryConfirmCloudflare(); + case RecoveryStep.dnsProviderToken: + currentPage = const RecoveryConfirmDns(); break; case RecoveryStep.backblazeToken: currentPage = const RecoveryConfirmBackblaze(); diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index 328c5f76..675056f3 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -14,52 +14,16 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { - AboutApplicationRoute.name: (routeData) { + BackupDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AboutApplicationPage(), + child: const BackupDetailsPage(), ); }, - AppSettingsRoute.name: (routeData) { + RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AppSettingsPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - MoreRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const MorePage(), - ); - }, - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), - ); - }, - ProvidersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ProvidersPage(), - ); - }, - ServerDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServerDetailsScreen(), + child: WrappedRoute(child: const RootPage()), ); }, ServiceRoute.name: (routeData) { @@ -78,6 +42,12 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, + ServerDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServerDetailsScreen(), + ); + }, UsersRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -100,10 +70,46 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - BackupDetailsRoute.name: (routeData) { + AppSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const BackupDetailsPage(), + child: const AppSettingsPage(), + ); + }, + DeveloperSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DeveloperSettingsPage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + ProvidersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ProvidersPage(), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), ); }, DnsDetailsRoute.name: (routeData) { @@ -124,26 +130,12 @@ abstract class _$RootRouter extends RootStackRouter { child: const InitializingPage(), ); }, - RecoveryKeyRoute.name: (routeData) { + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: const RecoveryKeyPage(), - ); - }, - DevicesRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DevicesScreen(), - ); - }, - ServicesMigrationRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServicesMigrationPage( - services: args.services, + child: ServerStoragePage( diskStatus: args.diskStatus, - isMigration: args.isMigration, key: args.key, ), ); @@ -159,133 +151,57 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: ServerStoragePage( + child: ServicesMigrationPage( + services: args.services, diskStatus: args.diskStatus, + isMigration: args.isMigration, key: args.key, ), ); }, - RootRoute.name: (routeData) { + DevicesRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: WrappedRoute(child: const RootPage()), + child: const DevicesScreen(), + ); + }, + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), ); }, }; } /// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) : super( - AboutApplicationRoute.name, + BackupDetailsRoute.name, initialChildren: children, ); - static const String name = 'AboutApplicationRoute'; + static const String name = 'BackupDetailsRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [AppSettingsPage] -class AppSettingsRoute extends PageRouteInfo { - const AppSettingsRoute({List? children}) +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) : super( - AppSettingsRoute.name, + RootRoute.name, initialChildren: children, ); - static const String name = 'AppSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DeveloperSettingsPage] -class DeveloperSettingsRoute extends PageRouteInfo { - const DeveloperSettingsRoute({List? children}) - : super( - DeveloperSettingsRoute.name, - initialChildren: children, - ); - - static const String name = 'DeveloperSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ConsolePage] -class ConsoleRoute extends PageRouteInfo { - const ConsoleRoute({List? children}) - : super( - ConsoleRoute.name, - initialChildren: children, - ); - - static const String name = 'ConsoleRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [MorePage] -class MoreRoute extends PageRouteInfo { - const MoreRoute({List? children}) - : super( - MoreRoute.name, - initialChildren: children, - ); - - static const String name = 'MoreRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) - : super( - OnboardingRoute.name, - initialChildren: children, - ); - - static const String name = 'OnboardingRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ProvidersPage] -class ProvidersRoute extends PageRouteInfo { - const ProvidersRoute({List? children}) - : super( - ProvidersRoute.name, - initialChildren: children, - ); - - static const String name = 'ProvidersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) - : super( - ServerDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'ServerDetailsRoute'; + static const String name = 'RootRoute'; static const PageInfo page = PageInfo(name); } @@ -342,6 +258,20 @@ class ServicesRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) + : super( + ServerDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'ServerDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [UsersPage] class UsersRoute extends PageRouteInfo { @@ -409,15 +339,99 @@ class UserDetailsRouteArgs { } /// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) +/// [AppSettingsPage] +class AppSettingsRoute extends PageRouteInfo { + const AppSettingsRoute({List? children}) : super( - BackupDetailsRoute.name, + AppSettingsRoute.name, initialChildren: children, ); - static const String name = 'BackupDetailsRoute'; + static const String name = 'AppSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DeveloperSettingsPage] +class DeveloperSettingsRoute extends PageRouteInfo { + const DeveloperSettingsRoute({List? children}) + : super( + DeveloperSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'DeveloperSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute({List? children}) + : super( + MoreRoute.name, + initialChildren: children, + ); + + static const String name = 'MoreRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute({List? children}) + : super( + ConsoleRoute.name, + initialChildren: children, + ); + + static const String name = 'ConsoleRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ProvidersPage] +class ProvidersRoute extends PageRouteInfo { + const ProvidersRoute({List? children}) + : super( + ProvidersRoute.name, + initialChildren: children, + ); + + static const String name = 'ProvidersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [RecoveryKeyPage] +class RecoveryKeyRoute extends PageRouteInfo { + const RecoveryKeyRoute({List? children}) + : super( + RecoveryKeyRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryKeyRoute'; static const PageInfo page = PageInfo(name); } @@ -465,31 +479,84 @@ class InitializingRoute extends PageRouteInfo { } /// generated route for -/// [RecoveryKeyPage] -class RecoveryKeyRoute extends PageRouteInfo { - const RecoveryKeyRoute({List? children}) - : super( - RecoveryKeyRoute.name, +/// [ServerStoragePage] +class ServerStorageRoute extends PageRouteInfo { + ServerStorageRoute({ + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ServerStorageRoute.name, + args: ServerStorageRouteArgs( + diskStatus: diskStatus, + key: key, + ), initialChildren: children, ); - static const String name = 'RecoveryKeyRoute'; + static const String name = 'ServerStorageRoute'; - static const PageInfo page = PageInfo(name); + static const PageInfo page = + PageInfo(name); +} + +class ServerStorageRouteArgs { + const ServerStorageRouteArgs({ + required this.diskStatus, + this.key, + }); + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; + } } /// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) - : super( - DevicesRoute.name, +/// [ExtendingVolumePage] +class ExtendingVolumeRoute extends PageRouteInfo { + ExtendingVolumeRoute({ + required DiskVolume diskVolumeToResize, + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ExtendingVolumeRoute.name, + args: ExtendingVolumeRouteArgs( + diskVolumeToResize: diskVolumeToResize, + diskStatus: diskStatus, + key: key, + ), initialChildren: children, ); - static const String name = 'DevicesRoute'; + static const String name = 'ExtendingVolumeRoute'; - static const PageInfo page = PageInfo(name); + static const PageInfo page = + PageInfo(name); +} + +class ExtendingVolumeRouteArgs { + const ExtendingVolumeRouteArgs({ + required this.diskVolumeToResize, + required this.diskStatus, + this.key, + }); + + final DiskVolume diskVolumeToResize; + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; + } } /// generated route for @@ -541,96 +608,29 @@ class ServicesMigrationRouteArgs { } /// generated route for -/// [ExtendingVolumePage] -class ExtendingVolumeRoute extends PageRouteInfo { - ExtendingVolumeRoute({ - required DiskVolume diskVolumeToResize, - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ExtendingVolumeRoute.name, - args: ExtendingVolumeRouteArgs( - diskVolumeToResize: diskVolumeToResize, - diskStatus: diskStatus, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ExtendingVolumeRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ExtendingVolumeRouteArgs { - const ExtendingVolumeRouteArgs({ - required this.diskVolumeToResize, - required this.diskStatus, - this.key, - }); - - final DiskVolume diskVolumeToResize; - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; - } -} - -/// generated route for -/// [ServerStoragePage] -class ServerStorageRoute extends PageRouteInfo { - ServerStorageRoute({ - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ServerStorageRoute.name, - args: ServerStorageRouteArgs( - diskStatus: diskStatus, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ServerStorageRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ServerStorageRouteArgs { - const ServerStorageRouteArgs({ - required this.diskStatus, - this.key, - }); - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; - } -} - -/// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) : super( - RootRoute.name, + DevicesRoute.name, initialChildren: children, ); - static const String name = 'RootRoute'; + static const String name = 'DevicesRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; static const PageInfo page = PageInfo(name); } From 32ef162f9b7f6e77c9b078b30f087c08e68a4b44 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 11:06:01 -0300 Subject: [PATCH 494/732] feat: Implement polymorphic DNS check for DNS API --- .../dns_providers/cloudflare/cloudflare.dart | 144 +++++++++++ .../rest_maps/dns_providers/desec/desec.dart | 226 +++++++++++++++--- .../rest_maps/dns_providers/dns_provider.dart | 12 +- .../server_providers/hetzner/hetzner.dart | 2 +- .../cubit/dns_records/dns_records_cubit.dart | 92 +++---- lib/utils/network_utils.dart | 81 ------- 6 files changed, 385 insertions(+), 172 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index 04ff622b..eb22e4d8 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; class CloudflareApi extends DnsProviderApi { CloudflareApi({ @@ -317,4 +318,147 @@ class CloudflareApi extends DnsProviderApi { return domains; } + + @override + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ) async { + final List records = await getDnsRecords(domain: domain); + final List foundRecords = []; + try { + final List desiredRecords = + getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); + for (final DesiredDnsRecord record in desiredRecords) { + if (record.description == 'record.dkim') { + final DnsRecord foundRecord = records.firstWhere( + (final r) => (r.name == record.name) && r.type == record.type, + orElse: () => DnsRecord( + name: record.name, + type: record.type, + content: '', + ttl: 800, + proxied: false, + ), + ); + // remove all spaces and tabulators from + // the foundRecord.content and the record.content + // to compare them + final String? foundContent = + foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); + final String content = record.content.replaceAll(RegExp(r'\s+'), ''); + if (foundContent == content) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } else { + if (records.any( + (final r) => + (r.name == record.name) && + r.type == record.type && + r.content == record.content, + )) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } + } + } catch (e) { + print(e); + return APIGenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + return APIGenericResult( + data: foundRecords, + success: true, + ); + } + + @override + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ) { + if (domainName == null || ip4 == null) { + return []; + } + return [ + DesiredDnsRecord( + name: domainName, + content: ip4, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ip4, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ip4, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ip4, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ip4, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ip4, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ip4, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ip4, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: domainName, + content: domainName, + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: 'v=DMARC1; p=none', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: domainName, + content: 'v=spf1 a mx ip4:$ip4 -all', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 4e55bbfa..91eed57a 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; class DesecApi extends DnsProviderApi { DesecApi({ @@ -61,6 +62,7 @@ class DesecApi extends DnsProviderApi { headers: {'Authorization': 'Token $token'}, ), ); + await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); isValid = false; @@ -102,13 +104,29 @@ class DesecApi extends DnsProviderApi { }) async { final String domainName = domain.domainName; final String url = '/$domainName/rrsets/'; + final List listDnsRecords = projectDnsRecords(domainName, ip4); final Dio client = await getClient(); try { - final Response response = await client.get(url); - - final List records = response.data; - await client.put(url, data: records); + final List bulkRecords = []; + for (final DnsRecord record in listDnsRecords) { + bulkRecords.add( + record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [], + }, + ); + } + await client.put(url, data: bulkRecords); + await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); return APIGenericResult( @@ -136,14 +154,18 @@ class DesecApi extends DnsProviderApi { final Dio client = await getClient(); try { response = await client.get(url); + await Future.delayed(const Duration(seconds: 1)); final List records = response.data; for (final record in records) { + final String? content = (record['records'] is List) + ? record['records'][0] + : record['records']; allRecords.add( DnsRecord( name: record['subname'], type: record['type'], - content: record['records'], + content: content, ttl: record['ttl'], ), ); @@ -164,30 +186,31 @@ class DesecApi extends DnsProviderApi { }) async { final String domainName = domain.domainName; final List listDnsRecords = projectDnsRecords(domainName, ip4); - final List allCreateFutures = []; final Dio client = await getClient(); try { + final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { - allCreateFutures.add( - client.post( - '/$domainName/rrsets/', - data: record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [record.content], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [record.content], - }, - ), + bulkRecords.add( + record.name == null + ? { + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + } + : { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [record.content], + }, ); } - await Future.wait(allCreateFutures); + await client.post( + '/$domainName/rrsets/', + data: bulkRecords, + ); + await Future.delayed(const Duration(seconds: 1)); } on DioError catch (e) { print(e.message); rethrow; @@ -209,9 +232,10 @@ class DesecApi extends DnsProviderApi { final String? domainName, final String? ip4, ) { - final DnsRecord domainA = DnsRecord(type: 'A', name: null, content: ip4); + final DnsRecord domainA = DnsRecord(type: 'A', name: '', content: ip4); - final DnsRecord mx = DnsRecord(type: 'MX', name: null, content: domainName); + final DnsRecord mx = + DnsRecord(type: 'MX', name: '', content: '10 $domainName.'); final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); @@ -225,14 +249,14 @@ class DesecApi extends DnsProviderApi { final DnsRecord txt1 = DnsRecord( type: 'TXT', name: '_dmarc', - content: 'v=DMARC1; p=none', + content: '"v=DMARC1; p=none"', ttl: 18000, ); final DnsRecord txt2 = DnsRecord( type: 'TXT', - name: null, - content: 'v=spf1 a mx ip4:$ip4 -all', + name: '', + content: '"v=spf1 a mx ip4:$ip4 -all"', ttl: 18000, ); @@ -275,6 +299,7 @@ class DesecApi extends DnsProviderApi { 'records': [record.content], }, ); + await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); } finally { @@ -291,6 +316,7 @@ class DesecApi extends DnsProviderApi { final Response response = await client.get( '', ); + await Future.delayed(const Duration(seconds: 1)); domains = response.data .map((final el) => el['name'] as String) .toList(); @@ -302,4 +328,148 @@ class DesecApi extends DnsProviderApi { return domains; } + + @override + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ) async { + final List records = await getDnsRecords(domain: domain); + final List foundRecords = []; + try { + final List desiredRecords = + getDesiredDnsRecords(domain.domainName, ip4, dkimPublicKey); + for (final DesiredDnsRecord record in desiredRecords) { + if (record.description == 'record.dkim') { + final DnsRecord foundRecord = records.firstWhere( + (final r) => (r.name == record.name) && r.type == record.type, + orElse: () => DnsRecord( + name: record.name, + type: record.type, + content: '', + ttl: 800, + proxied: false, + ), + ); + // remove all spaces and tabulators from + // the foundRecord.content and the record.content + // to compare them + final String? foundContent = + foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); + final String content = record.content.replaceAll(RegExp(r'\s+'), ''); + if (foundContent == content) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } else { + if (records.any( + (final r) => + ('${r.name}.${domain.domainName}' == record.name || + record.name == '') && + r.type == record.type && + r.content == record.content, + )) { + foundRecords.add(record.copyWith(isSatisfied: true)); + } else { + foundRecords.add(record.copyWith(isSatisfied: false)); + } + } + } + } catch (e) { + print(e); + return APIGenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + return APIGenericResult( + data: foundRecords, + success: true, + ); + } + + @override + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ) { + if (domainName == null || ip4 == null) { + return []; + } + return [ + DesiredDnsRecord( + name: '', + content: ip4, + description: 'record.root', + ), + DesiredDnsRecord( + name: 'api.$domainName', + content: ip4, + description: 'record.api', + ), + DesiredDnsRecord( + name: 'cloud.$domainName', + content: ip4, + description: 'record.cloud', + ), + DesiredDnsRecord( + name: 'git.$domainName', + content: ip4, + description: 'record.git', + ), + DesiredDnsRecord( + name: 'meet.$domainName', + content: ip4, + description: 'record.meet', + ), + DesiredDnsRecord( + name: 'social.$domainName', + content: ip4, + description: 'record.social', + ), + DesiredDnsRecord( + name: 'password.$domainName', + content: ip4, + description: 'record.password', + ), + DesiredDnsRecord( + name: 'vpn.$domainName', + content: ip4, + description: 'record.vpn', + ), + DesiredDnsRecord( + name: '', + content: '10 $domainName.', + description: 'record.mx', + type: 'MX', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '_dmarc.$domainName', + content: '"v=DMARC1; p=none"', + description: 'record.dmarc', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + DesiredDnsRecord( + name: '', + content: '"v=spf1 a mx ip4:$ip4 -all"', + description: 'record.spf', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + if (dkimPublicKey != null) + DesiredDnsRecord( + name: 'selector._domainkey.$domainName', + content: dkimPublicKey, + description: 'record.dkim', + type: 'TXT', + category: DnsRecordsCategory.email, + ), + ]; + } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart index 106d185c..b85f94d1 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart @@ -2,6 +2,7 @@ import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/utils/network_utils.dart'; export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; @@ -26,9 +27,18 @@ abstract class DnsProviderApi extends ApiMap { final DnsRecord record, final ServerDomain domain, ); + Future>> validateDnsRecords( + final ServerDomain domain, + final String ip4, + final String dkimPublicKey, + ); + List getDesiredDnsRecords( + final String? domainName, + final String? ip4, + final String? dkimPublicKey, + ); Future getZoneId(final String domain); Future> domainList(); - Future> isApiTokenValid(final String token); RegExp getApiTokenValidation(); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index c2228030..f9a2104e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -394,7 +394,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); - const String infectBranch = 'providers/hetzner'; + const String infectBranch = 'testing/desec'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 3403dc68..de87910d 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -25,11 +25,13 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: getDesiredDnsRecords( - serverInstallationCubit.state.serverDomain?.domainName, - '', - '', - ), + dnsRecords: ApiController.currentDnsProviderApiFactory! + .getDnsProvider() + .getDesiredDnsRecords( + serverInstallationCubit.state.serverDomain?.domainName, + '', + '', + ), ), ); @@ -37,64 +39,32 @@ class DnsRecordsCubit final ServerDomain? domain = serverInstallationCubit.state.serverDomain; final String? ipAddress = serverInstallationCubit.state.serverDetails?.ip4; - if (domain != null && ipAddress != null) { - final List records = await ApiController - .currentDnsProviderApiFactory! - .getDnsProvider() - .getDnsRecords(domain: domain); - final String? dkimPublicKey = - extractDkimRecord(await api.getDnsRecords())?.content; - final List desiredRecords = - getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey); - final List foundRecords = []; - for (final DesiredDnsRecord record in desiredRecords) { - if (record.description == 'record.dkim') { - final DnsRecord foundRecord = records.firstWhere( - (final r) => r.name == record.name && r.type == record.type, - orElse: () => DnsRecord( - name: record.name, - type: record.type, - content: '', - ttl: 800, - proxied: false, - ), - ); - // remove all spaces and tabulators from - // the foundRecord.content and the record.content - // to compare them - final String? foundContent = - foundRecord.content?.replaceAll(RegExp(r'\s+'), ''); - final String content = - record.content.replaceAll(RegExp(r'\s+'), ''); - if (foundContent == content) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } else { - if (records.any( - (final r) => - r.name == record.name && - r.type == record.type && - r.content == record.content, - )) { - foundRecords.add(record.copyWith(isSatisfied: true)); - } else { - foundRecords.add(record.copyWith(isSatisfied: false)); - } - } - } - emit( - DnsRecordsState( - dnsRecords: foundRecords, - dnsState: foundRecords.any((final r) => r.isSatisfied == false) - ? DnsRecordsStatus.error - : DnsRecordsStatus.good, - ), - ); - } else { + if (domain == null && ipAddress == null) { emit(const DnsRecordsState()); + return; } + + final foundRecords = await ApiController.currentDnsProviderApiFactory! + .getDnsProvider() + .validateDnsRecords( + domain!, + ipAddress!, + extractDkimRecord(await api.getDnsRecords())?.content ?? '', + ); + + if (!foundRecords.success || foundRecords.data.isEmpty) { + emit(const DnsRecordsState()); + return; + } + + emit( + DnsRecordsState( + dnsRecords: foundRecords.data, + dnsState: foundRecords.data.any((final r) => r.isSatisfied == false) + ? DnsRecordsStatus.error + : DnsRecordsStatus.good, + ), + ); } } diff --git a/lib/utils/network_utils.dart b/lib/utils/network_utils.dart index fc06ecb8..3b7f9219 100644 --- a/lib/utils/network_utils.dart +++ b/lib/utils/network_utils.dart @@ -41,87 +41,6 @@ class DesiredDnsRecord { ); } -List getDesiredDnsRecords( - final String? domainName, - final String? ipAddress, - final String? dkimPublicKey, -) { - if (domainName == null || ipAddress == null) { - return []; - } - return [ - DesiredDnsRecord( - name: domainName, - content: ipAddress, - description: 'record.root', - ), - DesiredDnsRecord( - name: 'api.$domainName', - content: ipAddress, - description: 'record.api', - ), - DesiredDnsRecord( - name: 'cloud.$domainName', - content: ipAddress, - description: 'record.cloud', - ), - DesiredDnsRecord( - name: 'git.$domainName', - content: ipAddress, - description: 'record.git', - ), - DesiredDnsRecord( - name: 'meet.$domainName', - content: ipAddress, - description: 'record.meet', - ), - DesiredDnsRecord( - name: 'social.$domainName', - content: ipAddress, - description: 'record.social', - ), - DesiredDnsRecord( - name: 'password.$domainName', - content: ipAddress, - description: 'record.password', - ), - DesiredDnsRecord( - name: 'vpn.$domainName', - content: ipAddress, - description: 'record.vpn', - ), - DesiredDnsRecord( - name: domainName, - content: domainName, - description: 'record.mx', - type: 'MX', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: '_dmarc.$domainName', - content: 'v=DMARC1; p=none', - description: 'record.dmarc', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - DesiredDnsRecord( - name: domainName, - content: 'v=spf1 a mx ip4:$ipAddress -all', - description: 'record.spf', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - if (dkimPublicKey != null) - DesiredDnsRecord( - name: 'selector._domainkey.$domainName', - content: dkimPublicKey, - description: 'record.dkim', - type: 'TXT', - category: DnsRecordsCategory.email, - ), - ]; -} - DnsRecord? extractDkimRecord(final List records) { DnsRecord? dkimRecord; From 6bee028188b8ce9a76c2fcf6458b3e7f6964dcfd Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 12:49:55 -0300 Subject: [PATCH 495/732] feat: Implement proper DKIM creation for deSEC --- assets/translations/en.json | 4 +++- assets/translations/ru.json | 4 +++- .../rest_maps/dns_providers/desec/desec.dart | 19 ++++++++++++++----- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 0d825bff..b902c3a2 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -286,11 +286,13 @@ "select_provider_countries_text_hetzner": "Germany, Finland, USA", "select_provider_countries_text_do": "USA, Netherlands, Singapore, UK, Germany, Canada, India, Australia", "select_provider_price_title": "Average price", + "select_provider_price_free": "Free", "select_provider_price_text_hetzner": "€8 per month for a relatively small server and 50GB of disk storage", "select_provider_price_text_do": "$17 per month for a relatively small server and 50GB of disk storage", "select_provider_payment_title": "Payment methods", "select_provider_payment_text_hetzner": "Credit cards, SWIFT, SEPA, PayPal", "select_provider_payment_text_do": "Credit cards, Google Pay, PayPal", + "select_provider_payment_text_cloudflare": "Credit cards", "select_provider_email_notice": "E-mail hosting won't be available for new clients. Nevertheless it will be unlocked as soon as you complete your first payment.", "select_provider_site_button": "Visit site", "connect_to_server_provider": "Now log in ", @@ -506,4 +508,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} +} \ No newline at end of file diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 35498bd9..6b624c70 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -280,10 +280,12 @@ "select_provider_countries_text_hetzner": "Германия, Финляндия, США", "select_provider_countries_text_do": "США, Нидерланды, Сингапур, Великобритания, Германия, Канада, Индия, Австралия", "select_provider_price_title": "Средняя цена", + "select_provider_price_free": "Бесплатно", "select_provider_price_text_hetzner": "€8 в месяц за небольшой сервер и 50GB места на диске", "select_provider_price_text_do": "$17 в месяц за небольшой сервер и 50GB места на диске", "select_provider_payment_title": "Методы оплаты", "select_provider_payment_text_hetzner": "Банковские карты, SWIFT, SEPA, PayPal", + "select_provider_payment_text_cloudflare": "Банковские карты", "select_provider_payment_text_do": "Банковские карты, Google Pay, PayPal", "select_provider_email_notice": "Хостинг электронной почты недоступен для новых клиентов. Разблокировать можно будет после первой оплаты.", "select_provider_site_button": "Посетить сайт", @@ -473,4 +475,4 @@ "length_not_equal": "Длина строки [], должна быть равна {}", "length_longer": "Длина строки [], должна быть меньше либо равна {}" } -} +} \ No newline at end of file diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 91eed57a..0a8197dc 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -196,13 +196,13 @@ class DesecApi extends DnsProviderApi { ? { 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], } : { 'subname': record.name, 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], }, ); } @@ -275,6 +275,15 @@ class DesecApi extends DnsProviderApi { ]; } + String? extractContent(final DnsRecord record) { + String? content = record.content; + if (record.type == 'TXT' && content != null && !content.startsWith('"')) { + content = '"$content"'; + } + + return content; + } + @override Future setDnsRecord( final DnsRecord record, @@ -290,13 +299,13 @@ class DesecApi extends DnsProviderApi { ? { 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], } : { 'subname': record.name, 'type': record.type, 'ttl': record.ttl, - 'records': [record.content], + 'records': [extractContent(record)], }, ); await Future.delayed(const Duration(seconds: 1)); @@ -465,7 +474,7 @@ class DesecApi extends DnsProviderApi { if (dkimPublicKey != null) DesiredDnsRecord( name: 'selector._domainkey.$domainName', - content: dkimPublicKey, + content: '"$dkimPublicKey"', description: 'record.dkim', type: 'TXT', category: DnsRecordsCategory.email, From 8b0d318eac1835f27cec59a03c663b6f9f107232 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 14:58:51 -0300 Subject: [PATCH 496/732] chore: Add assets for deSEC --- assets/images/logos/cloudflare.svg | 1 + assets/markdown/how_desec-en.md | 9 +++++++++ assets/markdown/how_desec-ru.md | 9 +++++++++ assets/translations/en.json | 8 ++++---- assets/translations/ru.json | 8 ++++---- 5 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 assets/images/logos/cloudflare.svg create mode 100644 assets/markdown/how_desec-en.md create mode 100644 assets/markdown/how_desec-ru.md diff --git a/assets/images/logos/cloudflare.svg b/assets/images/logos/cloudflare.svg new file mode 100644 index 00000000..7099a7e9 --- /dev/null +++ b/assets/images/logos/cloudflare.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/markdown/how_desec-en.md b/assets/markdown/how_desec-en.md new file mode 100644 index 00000000..c86d3855 --- /dev/null +++ b/assets/markdown/how_desec-en.md @@ -0,0 +1,9 @@ +### How to get deSEC API Token +1. Log in at: https://desec.io/login +2. Go to **Domains** page at: https://desec.io/domains +3. Go to **Token management** tab. +4. Click on the round "plus" button in the upper right corner. +5. **"Generate New Token"** dialogue must be displayed. Enter any **Token name** you wish. *Advanced settings* are not required, so do not touch anything there. +6. Click on **Save**. +7. Make sure you **save** the token's **secret value** as it will only be displayed once. +8. Now you can safely **close** the dialogue. \ No newline at end of file diff --git a/assets/markdown/how_desec-ru.md b/assets/markdown/how_desec-ru.md new file mode 100644 index 00000000..a93acc77 --- /dev/null +++ b/assets/markdown/how_desec-ru.md @@ -0,0 +1,9 @@ +### Как получить deSEC API Токен +1. Авторизуемся в deSEC: https://desec.io/login +2. Переходим на страницу **Domains** по ссылке: https://desec.io/domains +3. Переходим на вкладку **Token management**. +4. Нажимаем на большую кнопку с плюсом в правом верхнем углу страницы. +5. Должен был появиться **"Generate New Token"** диалог. Вводим любое имя токена в **Token name**. *Advanced settings* необязательны, так что ничего там не трогаем. +6. Кликаем **Save**. +7. Обязательно сохраняем "**secret value**" ключ токена, потому что он отображается исключительно один раз. +8. Теперь спокойно закрываем диалог, нажав **close**. \ No newline at end of file diff --git a/assets/translations/en.json b/assets/translations/en.json index b902c3a2..653e33f8 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -313,13 +313,13 @@ "choose_server_type_storage": "{} GB of system storage", "choose_server_type_payment_per_month": "{} per month", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", - "cloudflare_bad_key_error": "Cloudflare API key is invalid", + "cloudflare_bad_key_error": "DNS Provider API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", "select_dns": "Now let's select a DNS provider", "manage_domain_dns": "To manage your domain's DNS", "use_this_domain": "Use this domain?", "use_this_domain_text": "The token you provided gives access to the following domain", - "cloudflare_api_token": "CloudFlare API Token", + "cloudflare_api_token": "DNS Provider API Token", "connect_backblaze_storage": "Connect Backblaze storage", "no_connected_domains": "No connected domains at the moment", "loading_domain_list": "Loading domain list", @@ -390,8 +390,8 @@ "modal_confirmation_dns_invalid": "Reverse DNS points to another domain", "modal_confirmation_ip_valid": "IP is the same as in DNS record", "modal_confirmation_ip_invalid": "IP is not the same as in DNS record", - "confirm_cloudflare": "Connect to CloudFlare", - "confirm_cloudflare_description": "Enter a Cloudflare token with access to {}:", + "confirm_cloudflare": "Connect to your DNS Provider", + "confirm_cloudflare_description": "Enter a token of your DNS Provider with access to {}:", "confirm_backblaze": "Connect to Backblaze", "confirm_backblaze_description": "Enter a Backblaze token with access to backup storage:" }, diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 6b624c70..b4bdd938 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -307,12 +307,12 @@ "choose_server_type_storage": "{} GB системного хранилища", "choose_server_type_payment_per_month": "{} в месяц", "no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...", - "cloudflare_bad_key_error": "Cloudflare API ключ неверен", + "cloudflare_bad_key_error": "API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", "manage_domain_dns": "Для управления DNS вашего домена", "use_this_domain": "Используем этот домен?", "use_this_domain_text": "Указанный вами токен даёт контроль над этим доменом", - "cloudflare_api_token": "CloudFlare API ключ", + "cloudflare_api_token": "API ключ DNS провайдера", "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", "no_connected_domains": "На данный момент подлюченных доменов нет", "loading_domain_list": "Загружаем список доменов", @@ -368,8 +368,8 @@ "modal_confirmation_dns_invalid": "Обратный DNS указывает на другой домен", "modal_confirmation_ip_valid": "IP совпадает с указанным в DNS записи", "modal_confirmation_ip_invalid": "IP не совпадает с указанным в DNS записи", - "confirm_cloudflare": "Подключение к Cloudflare", - "confirm_cloudflare_description": "Введите токен Cloudflare, который имеет права на {}:", + "confirm_cloudflare": "Подключение к DNS Провайдеру", + "confirm_cloudflare_description": "Введите токен DNS Провайдера, который имеет права на {}:", "confirm_backblaze_description": "Введите токен Backblaze, который имеет права на хранилище резервных копий:", "confirm_backblaze": "Подключение к Backblaze", "server_provider_connected": "Подключение к вашему серверному провайдеру", From 73ec2687b2c40642206a66fde233fbe3c493d326 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 15:03:31 -0300 Subject: [PATCH 497/732] fix: Make minor improvements for deSEC --- .../rest_maps/dns_providers/desec/desec.dart | 4 ++- .../initializing/dns_provider_picker.dart | 35 +++++++------------ .../recovery_server_provider_connected.dart | 4 +-- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index 0a8197dc..aea1d0da 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -352,7 +352,9 @@ class DesecApi extends DnsProviderApi { for (final DesiredDnsRecord record in desiredRecords) { if (record.description == 'record.dkim') { final DnsRecord foundRecord = records.firstWhere( - (final r) => (r.name == record.name) && r.type == record.type, + (final r) => + ('${r.name}.${domain.domainName}' == record.name) && + r.type == record.type, orElse: () => DnsRecord( name: record.name, type: record.type, diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index cb0d2111..7ee580a7 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -5,6 +5,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; @@ -51,7 +52,7 @@ class _DnsProviderPickerState extends State { providerType: DnsProvider.cloudflare, pathToHow: 'how_cloudflare', image: Image.asset( - 'assets/images/logos/cloudflare.png', + 'assets/images/logos/cloudflare.svg', width: 150, ), ), @@ -62,9 +63,9 @@ class _DnsProviderPickerState extends State { providerCubit: widget.formCubit, providerInfo: ProviderPageInfo( providerType: DnsProvider.desec, - pathToHow: 'how_digital_ocean_dns', + pathToHow: 'how_desec', image: Image.asset( - 'assets/images/logos/digital_ocean.png', + 'assets/images/logos/desec.svg', width: 150, ), ), @@ -100,7 +101,7 @@ class ProviderInputDataPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'initializing.connect_to_dns'.tr(), + 'initializing.cloudflare_api_token'.tr(), style: Theme.of(context).textTheme.headlineSmall, ), const SizedBox(height: 16), @@ -125,22 +126,12 @@ class ProviderInputDataPage extends StatelessWidget { const SizedBox(height: 10), BrandOutlinedButton( child: Text('initializing.how'.tr()), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: [ - BrandMarkdown( - fileName: providerInfo.pathToHow, - ), - ], - ), - ), - ), + onPressed: () { + context.read().showArticle( + article: providerInfo.pathToHow, + context: context, + ); + }, ), ], ); @@ -186,7 +177,7 @@ class ProviderSelectionPage extends StatelessWidget { padding: const EdgeInsets.all(10), decoration: BoxDecoration( borderRadius: BorderRadius.circular(40), - color: const Color.fromARGB(255, 241, 215, 166), + color: const Color.fromARGB(255, 244, 128, 31), ), child: SvgPicture.asset( 'assets/images/logos/cloudflare.svg', @@ -194,7 +185,7 @@ class ProviderSelectionPage extends StatelessWidget { ), const SizedBox(width: 16), Text( - 'Hetzner Cloud', + 'Cloudflare', style: Theme.of(context).textTheme.titleMedium, ), ], diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 91999fb9..93d0eb87 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -45,9 +45,7 @@ class RecoveryServerProviderConnected extends StatelessWidget { ), const SizedBox(height: 16), BrandButton.filled( - onPressed: formCubitState.isSubmitting - ? null - : () => context.read().trySubmit(), + onPressed: () => context.read().trySubmit(), child: Text('basis.continue'.tr()), ), const SizedBox(height: 16), From 25eb82c131d844ee1b2a4f136d4625322dd65d07 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 15:49:03 -0300 Subject: [PATCH 498/732] feat: Implement proper access recovery for DNS providers --- lib/logic/api_maps/graphql_maps/api_map.dart | 2 +- lib/logic/api_maps/staging_options.dart | 12 +++++++++-- .../cubit/dns_records/dns_records_cubit.dart | 3 +++ .../server_installation_cubit.dart | 18 ++++++++++++----- .../server_installation_repository.dart | 20 +++++++++++-------- 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index a633866e..34e39b7a 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -56,7 +56,7 @@ class ResponseLoggingParser extends ResponseParser { abstract class ApiMap { Future getClient() async { IOClient? ioClient; - if (StagingOptions.stagingAcme) { + if (StagingOptions.stagingAcme || !StagingOptions.verifyCertificate) { final HttpClient httpClient = HttpClient(); httpClient.badCertificateCallback = ( final cert, diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/staging_options.dart index 7d3084b7..a4e98fe8 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/staging_options.dart @@ -1,8 +1,16 @@ -/// Controls staging environment for network, is used during manual -/// integration testing and such +/// Controls staging environment for network class StagingOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned by constant certificate renewal + /// + /// If set to 'true', the 'verifyCertificate' becomes useless static bool get stagingAcme => false; + + /// Should we consider CERTIFICATE_VERIFY_FAILED code an error + /// For now it's just a global variable and DNS API + /// classes can change it at will + /// + /// Doesn't matter if 'statingAcme' is set to 'true' + static bool verifyCertificate = false; } diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index de87910d..2e57f0f7 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,7 +1,10 @@ import 'package:cubit_form/cubit_form.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; +import 'package:selfprivacy/logic/get_it/api_config.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index cc5bffcc..fa0a04e1 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -541,13 +541,20 @@ class ServerInstallationCubit extends Cubit { customToken: serverDetails.apiToken, isWithToken: true, ).getServerProviderType(); - if (provider == ServerProvider.unknown) { + final dnsProvider = await ServerApi( + customToken: serverDetails.apiToken, + isWithToken: true, + ).getDnsProviderType(); + if (provider == ServerProvider.unknown || + dnsProvider == DnsProvider.unknown) { getIt() .showSnackBar('recovering.generic_error'.tr()); return; } await repository.saveServerDetails(serverDetails); + await repository.saveDnsProviderType(dnsProvider); setServerProviderType(provider); + setDnsProviderType(dnsProvider); emit( dataState.copyWith( serverDetails: serverDetails, @@ -700,14 +707,15 @@ class ServerInstallationCubit extends Cubit { .showSnackBar('recovering.domain_not_available_on_token'.tr()); return; } + final dnsProviderType = await ServerApi( + customToken: dataState.serverDetails!.apiToken, + isWithToken: true, + ).getDnsProviderType(); await repository.saveDomain( ServerDomain( domainName: serverDomain.domainName, zoneId: zoneId, - provider: await ServerApi( - customToken: token, - isWithToken: true, - ).getDnsProviderType(), + provider: dnsProviderType, ), ); await repository.saveDnsProviderKey(token); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index ff167518..bc92f645 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -15,6 +15,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider. import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -76,17 +77,20 @@ class ServerInstallationRepository { ); } - if (dnsProvider != null || - (serverDomain != null && - serverDomain.provider != DnsProvider.unknown)) { - ApiController.initDnsProviderApiFactory( - DnsProviderApiFactorySettings( - provider: dnsProvider ?? serverDomain!.provider, - ), - ); + if (ApiController.currentDnsProviderApiFactory == null) { + if (dnsProvider != null || + (serverDomain != null && + serverDomain.provider != DnsProvider.unknown)) { + ApiController.initDnsProviderApiFactory( + DnsProviderApiFactorySettings( + provider: dnsProvider ?? serverDomain!.provider, + ), + ); + } } if (box.get(BNames.hasFinalChecked, defaultValue: false)) { + StagingOptions.verifyCertificate = true; return ServerInstallationFinished( providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', From 0e3e560485d434a1b742dbc0cc5e9462eeff2de6 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 16 May 2023 16:55:26 -0300 Subject: [PATCH 499/732] feat: Remove certificate check during installation --- .../rest_maps/dns_providers/desec/desec.dart | 62 ++++++++----------- .../server_providers/hetzner/hetzner.dart | 2 +- .../cubit/dns_records/dns_records_cubit.dart | 18 +++--- .../server_installation_cubit.dart | 3 + 4 files changed, 38 insertions(+), 47 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index aea1d0da..c1a8f43b 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -111,20 +111,22 @@ class DesecApi extends DnsProviderApi { final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { bulkRecords.add( - record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [], - }, + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [], + }, ); } + bulkRecords.add( + { + 'subname': 'selector._domainkey', + 'type': 'TXT', + 'ttl': 18000, + 'records': [], + }, + ); await client.put(url, data: bulkRecords); await Future.delayed(const Duration(seconds: 1)); } catch (e) { @@ -192,18 +194,12 @@ class DesecApi extends DnsProviderApi { final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { bulkRecords.add( - record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [extractContent(record)], + }, ); } await client.post( @@ -295,18 +291,12 @@ class DesecApi extends DnsProviderApi { try { await client.post( url, - data: record.name == null - ? { - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - } - : { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, + data: { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [extractContent(record)], + }, ); await Future.delayed(const Duration(seconds: 1)); } catch (e) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index f9a2104e..c2228030 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -394,7 +394,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final String apiToken = StringGenerators.apiToken(); final String hostname = getHostnameFromDomain(domainName); - const String infectBranch = 'testing/desec'; + const String infectBranch = 'providers/hetzner'; final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; final String base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS')); diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 2e57f0f7..472ed954 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,10 +1,7 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_controller.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; -import 'package:selfprivacy/logic/get_it/api_config.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; @@ -28,13 +25,14 @@ class DnsRecordsCubit emit( DnsRecordsState( dnsState: DnsRecordsStatus.refreshing, - dnsRecords: ApiController.currentDnsProviderApiFactory! - .getDnsProvider() - .getDesiredDnsRecords( - serverInstallationCubit.state.serverDomain?.domainName, - '', - '', - ), + dnsRecords: ApiController.currentDnsProviderApiFactory + ?.getDnsProvider() + .getDesiredDnsRecords( + serverInstallationCubit.state.serverDomain?.domainName, + '', + '', + ) ?? + [], ), ); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index fa0a04e1..47952c9a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_factory_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; +import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -436,6 +437,7 @@ class ServerInstallationCubit extends Cubit { emit(TimerState(dataState: dataState, isLoading: true)); final bool isServerWorking = await repository.isHttpServerWorking(); + StagingOptions.verifyCertificate = true; if (isServerWorking) { bool dkimCreated = true; @@ -758,6 +760,7 @@ class ServerInstallationCubit extends Cubit { void clearAppConfig() { closeTimer(); ApiController.clearProviderApiFactories(); + StagingOptions.verifyCertificate = false; repository.clearAppConfig(); emit(const ServerInstallationEmpty()); } From 0c038fda43fcb7daf5b74baa2e899706e1324bad Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 18 May 2023 19:06:13 -0300 Subject: [PATCH 500/732] fix: Remove price lists for DNS and move deSEC onto above Cloudflare --- .../initializing/dns_provider_picker.dart | 133 ++++++++---------- 1 file changed, 56 insertions(+), 77 deletions(-) diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 7ee580a7..7e494af4 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -2,12 +2,10 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; @@ -163,72 +161,6 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium, ), const SizedBox(height: 10), - OutlinedCard( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - width: 40, - height: 40, - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(40), - color: const Color.fromARGB(255, 244, 128, 31), - ), - child: SvgPicture.asset( - 'assets/images/logos/cloudflare.svg', - ), - ), - const SizedBox(width: 16), - Text( - 'Cloudflare', - style: Theme.of(context).textTheme.titleMedium, - ), - ], - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_price_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_price_free'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_cloudflare' - .tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - BrandButton.rised( - text: 'basis.select'.tr(), - onPressed: () { - serverInstallationCubit - .setDnsProviderType(DnsProvider.cloudflare); - callback(DnsProvider.cloudflare); - }, - ), - // Outlined button that will open website - BrandOutlinedButton( - onPressed: () => - launchURL('https://dash.cloudflare.com/'), - title: 'initializing.select_provider_site_button'.tr(), - ), - ], - ), - ), - ), - const SizedBox(height: 16), OutlinedCard( child: Padding( padding: const EdgeInsets.all(16.0), @@ -266,15 +198,6 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_do'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), BrandButton.rised( text: 'basis.select'.tr(), onPressed: () { @@ -292,6 +215,62 @@ class ProviderSelectionPage extends StatelessWidget { ), ), ), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 244, 128, 31), + ), + child: SvgPicture.asset( + 'assets/images/logos/cloudflare.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Cloudflare', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.cloudflare); + callback(DnsProvider.cloudflare); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchURL('https://dash.cloudflare.com/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), ], ), ); From 523a1a6df8639edf5a1fb370df9803b0cc4cea3d Mon Sep 17 00:00:00 2001 From: def Date: Fri, 19 May 2023 12:53:53 +0300 Subject: [PATCH 501/732] update desec markdown --- assets/markdown/how_desec-en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_desec-en.md b/assets/markdown/how_desec-en.md index c86d3855..b5bac67c 100644 --- a/assets/markdown/how_desec-en.md +++ b/assets/markdown/how_desec-en.md @@ -5,5 +5,5 @@ 4. Click on the round "plus" button in the upper right corner. 5. **"Generate New Token"** dialogue must be displayed. Enter any **Token name** you wish. *Advanced settings* are not required, so do not touch anything there. 6. Click on **Save**. -7. Make sure you **save** the token's **secret value** as it will only be displayed once. +7. Make sure you save the token's "**secret value**" as it will only be displayed once. 8. Now you can safely **close** the dialogue. \ No newline at end of file From 4e65d5f945a0589fb894d2f56fdc70832b99ba03 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 30 May 2023 20:25:46 +0300 Subject: [PATCH 502/732] refactor: Migrate to Flutter 3.10 and Dart 3.0 --- android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../schema/disk_volumes.graphql.dart | 377 ++++++++-- .../graphql_maps/schema/schema.graphql.dart | 22 +- .../schema/server_api.graphql.dart | 693 +++++++++++++----- .../schema/server_settings.graphql.dart | 389 ++++++++-- .../graphql_maps/schema/services.graphql.dart | 374 +++++++--- .../graphql_maps/schema/users.graphql.dart | 387 ++++++++-- lib/logic/api_maps/rest_maps/api_map.dart | 4 +- lib/main.dart | 17 +- .../components/list_tiles/log_list_tile.dart | 52 +- .../setup/initializing/initializing.dart | 1 - lib/ui/router/router.dart | 3 +- lib/ui/router/router.gr.dart | 517 ++++++------- macos/Flutter/GeneratedPluginRegistrant.swift | 2 - pubspec.lock | 320 ++++---- pubspec.yaml | 59 +- 17 files changed, 2248 insertions(+), 973 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index bf7e09c6..13645686 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -39,6 +39,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index cc5527d7..02e5f581 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 9ffbfe0b..84550cc2 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -3,7 +3,6 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -142,6 +141,177 @@ extension UtilityExtension$Fragment$basicMutationReturnFields this, (i) => i, ); + _T when<_T>({ + required _T Function( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + apiKeyMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + autoUpgradeSettingsMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) + genericJobButationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericMutationReturn) + genericMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + serviceJobMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceMutationReturn) + serviceMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + timezoneMutationReturn, + required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + + case "AutoUpgradeSettingsMutationReturn": + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + + case "DeviceApiTokenMutationReturn": + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + + case "GenericJobButationReturn": + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + + case "GenericMutationReturn": + return genericMutationReturn( + this as Fragment$basicMutationReturnFields$$GenericMutationReturn); + + case "ServiceJobMutationReturn": + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + + case "ServiceMutationReturn": + return serviceMutationReturn( + this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + + case "TimezoneMutationReturn": + return timezoneMutationReturn( + this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + + case "UserMutationReturn": + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + + default: + return orElse(); + } + } + + _T maybeWhen<_T>({ + _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? + apiKeyMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? + autoUpgradeSettingsMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? + deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? + genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? + genericMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? + serviceJobMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? + serviceMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? + timezoneMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + if (apiKeyMutationReturn != null) { + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + } else { + return orElse(); + } + + case "AutoUpgradeSettingsMutationReturn": + if (autoUpgradeSettingsMutationReturn != null) { + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + } else { + return orElse(); + } + + case "DeviceApiTokenMutationReturn": + if (deviceApiTokenMutationReturn != null) { + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + } else { + return orElse(); + } + + case "GenericJobButationReturn": + if (genericJobButationReturn != null) { + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + } else { + return orElse(); + } + + case "GenericMutationReturn": + if (genericMutationReturn != null) { + return genericMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericMutationReturn); + } else { + return orElse(); + } + + case "ServiceJobMutationReturn": + if (serviceJobMutationReturn != null) { + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + } else { + return orElse(); + } + + case "ServiceMutationReturn": + if (serviceMutationReturn != null) { + return serviceMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + } else { + return orElse(); + } + + case "TimezoneMutationReturn": + if (timezoneMutationReturn != null) { + return timezoneMutationReturn(this + as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + } else { + return orElse(); + } + + case "UserMutationReturn": + if (userMutationReturn != null) { + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + } else { + return orElse(); + } + + default: + return orElse(); + } + } } abstract class CopyWith$Fragment$basicMutationReturnFields { @@ -172,7 +342,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields final TRes Function(Fragment$basicMutationReturnFields) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -298,7 +468,7 @@ class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ApiKeyMutationReturn', }); factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( @@ -429,7 +599,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -477,7 +647,7 @@ class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'AutoUpgradeSettingsMutationReturn', }); factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( @@ -613,7 +783,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutat Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -662,7 +832,7 @@ class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', }); factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( @@ -796,7 +966,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationRe final TRes Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -844,7 +1014,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericJobButationReturn', }); factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( @@ -976,7 +1146,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn final TRes Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1024,7 +1194,7 @@ class Fragment$basicMutationReturnFields$$GenericMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( @@ -1155,7 +1325,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1203,7 +1373,7 @@ class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceJobMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( @@ -1335,7 +1505,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn final TRes Function( Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1383,7 +1553,7 @@ class Fragment$basicMutationReturnFields$$ServiceMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( @@ -1514,7 +1684,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1562,7 +1732,7 @@ class Fragment$basicMutationReturnFields$$TimezoneMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'TimezoneMutationReturn', }); factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( @@ -1694,7 +1864,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< final TRes Function( Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1742,7 +1912,7 @@ class Fragment$basicMutationReturnFields$$UserMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', }); factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( @@ -1870,7 +2040,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1914,7 +2084,7 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< class Query$GetServerDiskVolumes { Query$GetServerDiskVolumes({ required this.storage, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$GetServerDiskVolumes.fromJson(Map json) { @@ -2009,7 +2179,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes final TRes Function(Query$GetServerDiskVolumes) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? storage = _undefined, @@ -2233,6 +2403,10 @@ const documentNodeQueryGetServerDiskVolumes = DocumentNode(definitions: [ Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes( Map data) => Query$GetServerDiskVolumes.fromJson(data); +typedef OnQueryComplete$Query$GetServerDiskVolumes = FutureOr Function( + Map?, + Query$GetServerDiskVolumes?, +); class Options$Query$GetServerDiskVolumes extends graphql.QueryOptions { @@ -2242,19 +2416,42 @@ class Options$Query$GetServerDiskVolumes graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetServerDiskVolumes? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$GetServerDiskVolumes? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$GetServerDiskVolumes(data), + ), + onError: onError, document: documentNodeQueryGetServerDiskVolumes, parserFn: _parserFn$Query$GetServerDiskVolumes, ); + + final OnQueryComplete$Query$GetServerDiskVolumes? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$GetServerDiskVolumes @@ -2265,6 +2462,7 @@ class WatchOptions$Query$GetServerDiskVolumes graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetServerDiskVolumes? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -2275,7 +2473,7 @@ class WatchOptions$Query$GetServerDiskVolumes fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryGetServerDiskVolumes, pollInterval: pollInterval, @@ -2331,7 +2529,7 @@ extension ClientExtension$Query$GetServerDiskVolumes on graphql.GraphQLClient { class Query$GetServerDiskVolumes$storage { Query$GetServerDiskVolumes$storage({ required this.volumes, - required this.$__typename, + this.$__typename = 'Storage', }); factory Query$GetServerDiskVolumes$storage.fromJson( @@ -2442,7 +2640,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage final TRes Function(Query$GetServerDiskVolumes$storage) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? volumes = _undefined, @@ -2495,7 +2693,7 @@ class Query$GetServerDiskVolumes$storage$volumes { required this.type, required this.usages, required this.usedSpace, - required this.$__typename, + this.$__typename = 'StorageVolume', }); factory Query$GetServerDiskVolumes$storage$volumes.fromJson( @@ -2719,7 +2917,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes final TRes Function(Query$GetServerDiskVolumes$storage$volumes) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? freeSpace = _undefined, @@ -2890,6 +3088,41 @@ extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages this, (i) => i, ); + _T when<_T>({ + required _T Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) + serviceStorageUsage, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ServiceStorageUsage": + return serviceStorageUsage(this + as Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage); + + default: + return orElse(); + } + } + + _T maybeWhen<_T>({ + _T Function( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage)? + serviceStorageUsage, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ServiceStorageUsage": + if (serviceStorageUsage != null) { + return serviceStorageUsage(this + as Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage); + } else { + return orElse(); + } + + default: + return orElse(); + } + } } abstract class CopyWith$Query$GetServerDiskVolumes$storage$volumes$usages< @@ -2922,7 +3155,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages final TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? title = _undefined, @@ -2962,7 +3195,7 @@ class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage implements Query$GetServerDiskVolumes$storage$volumes$usages { Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage({ this.service, - required this.$__typename, + this.$__typename = 'ServiceStorageUsage', required this.title, required this.usedSpace, }); @@ -3107,7 +3340,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? service = _undefined, @@ -3172,7 +3405,7 @@ class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$ser required this.id, required this.isMovable, required this.displayName, - required this.$__typename, + this.$__typename = 'Service', }); factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.fromJson( @@ -3308,7 +3541,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? id = _undefined, @@ -3427,7 +3660,7 @@ class _CopyWithImpl$Variables$Mutation$MountVolume final TRes Function(Variables$Mutation$MountVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? name = _undefined}) => _then(Variables$Mutation$MountVolume._({ @@ -3448,7 +3681,7 @@ class _CopyWithStubImpl$Variables$Mutation$MountVolume class Mutation$MountVolume { Mutation$MountVolume({ required this.mountVolume, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$MountVolume.fromJson(Map json) { @@ -3541,7 +3774,7 @@ class _CopyWithImpl$Mutation$MountVolume final TRes Function(Mutation$MountVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? mountVolume = _undefined, @@ -3633,7 +3866,7 @@ Mutation$MountVolume _parserFn$Mutation$MountVolume( Map data) => Mutation$MountVolume.fromJson(data); typedef OnMutationCompleted$Mutation$MountVolume = FutureOr Function( - dynamic, + Map?, Mutation$MountVolume?, ); @@ -3646,6 +3879,7 @@ class Options$Mutation$MountVolume graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$MountVolume? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$MountVolume? onCompleted, graphql.OnMutationUpdate? update, @@ -3657,7 +3891,7 @@ class Options$Mutation$MountVolume fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -3691,6 +3925,7 @@ class WatchOptions$Mutation$MountVolume graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$MountVolume? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -3702,7 +3937,7 @@ class WatchOptions$Mutation$MountVolume fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationMountVolume, pollInterval: pollInterval, @@ -3728,7 +3963,7 @@ class Mutation$MountVolume$mountVolume required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$MountVolume$mountVolume.fromJson(Map json) { @@ -3849,7 +4084,7 @@ class _CopyWithImpl$Mutation$MountVolume$mountVolume final TRes Function(Mutation$MountVolume$mountVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -3964,7 +4199,7 @@ class _CopyWithImpl$Variables$Mutation$ResizeVolume final TRes Function(Variables$Mutation$ResizeVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? name = _undefined}) => _then(Variables$Mutation$ResizeVolume._({ @@ -3985,7 +4220,7 @@ class _CopyWithStubImpl$Variables$Mutation$ResizeVolume class Mutation$ResizeVolume { Mutation$ResizeVolume({ required this.resizeVolume, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$ResizeVolume.fromJson(Map json) { @@ -4078,7 +4313,7 @@ class _CopyWithImpl$Mutation$ResizeVolume final TRes Function(Mutation$ResizeVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? resizeVolume = _undefined, @@ -4170,7 +4405,7 @@ Mutation$ResizeVolume _parserFn$Mutation$ResizeVolume( Map data) => Mutation$ResizeVolume.fromJson(data); typedef OnMutationCompleted$Mutation$ResizeVolume = FutureOr Function( - dynamic, + Map?, Mutation$ResizeVolume?, ); @@ -4183,6 +4418,7 @@ class Options$Mutation$ResizeVolume graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$ResizeVolume? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$ResizeVolume? onCompleted, graphql.OnMutationUpdate? update, @@ -4194,7 +4430,7 @@ class Options$Mutation$ResizeVolume fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4228,6 +4464,7 @@ class WatchOptions$Mutation$ResizeVolume graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$ResizeVolume? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4239,7 +4476,7 @@ class WatchOptions$Mutation$ResizeVolume fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationResizeVolume, pollInterval: pollInterval, @@ -4265,7 +4502,7 @@ class Mutation$ResizeVolume$resizeVolume required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$ResizeVolume$resizeVolume.fromJson( @@ -4388,7 +4625,7 @@ class _CopyWithImpl$Mutation$ResizeVolume$resizeVolume final TRes Function(Mutation$ResizeVolume$resizeVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4503,7 +4740,7 @@ class _CopyWithImpl$Variables$Mutation$UnmountVolume final TRes Function(Variables$Mutation$UnmountVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? name = _undefined}) => _then(Variables$Mutation$UnmountVolume._({ @@ -4524,7 +4761,7 @@ class _CopyWithStubImpl$Variables$Mutation$UnmountVolume class Mutation$UnmountVolume { Mutation$UnmountVolume({ required this.unmountVolume, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$UnmountVolume.fromJson(Map json) { @@ -4618,7 +4855,7 @@ class _CopyWithImpl$Mutation$UnmountVolume final TRes Function(Mutation$UnmountVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? unmountVolume = _undefined, @@ -4710,7 +4947,7 @@ Mutation$UnmountVolume _parserFn$Mutation$UnmountVolume( Map data) => Mutation$UnmountVolume.fromJson(data); typedef OnMutationCompleted$Mutation$UnmountVolume = FutureOr Function( - dynamic, + Map?, Mutation$UnmountVolume?, ); @@ -4723,6 +4960,7 @@ class Options$Mutation$UnmountVolume graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$UnmountVolume? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$UnmountVolume? onCompleted, graphql.OnMutationUpdate? update, @@ -4734,7 +4972,7 @@ class Options$Mutation$UnmountVolume fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4770,6 +5008,7 @@ class WatchOptions$Mutation$UnmountVolume graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$UnmountVolume? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4781,7 +5020,7 @@ class WatchOptions$Mutation$UnmountVolume fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationUnmountVolume, pollInterval: pollInterval, @@ -4807,7 +5046,7 @@ class Mutation$UnmountVolume$unmountVolume required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$UnmountVolume$unmountVolume.fromJson( @@ -4930,7 +5169,7 @@ class _CopyWithImpl$Mutation$UnmountVolume$unmountVolume final TRes Function(Mutation$UnmountVolume$unmountVolume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -5049,7 +5288,7 @@ class _CopyWithImpl$Variables$Mutation$MigrateToBinds final TRes Function(Variables$Mutation$MigrateToBinds) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? input = _undefined}) => _then(Variables$Mutation$MigrateToBinds._({ @@ -5071,7 +5310,7 @@ class _CopyWithStubImpl$Variables$Mutation$MigrateToBinds class Mutation$MigrateToBinds { Mutation$MigrateToBinds({ required this.migrateToBinds, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$MigrateToBinds.fromJson(Map json) { @@ -5165,7 +5404,7 @@ class _CopyWithImpl$Mutation$MigrateToBinds final TRes Function(Mutation$MigrateToBinds) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? migrateToBinds = _undefined, @@ -5349,7 +5588,7 @@ Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds( Map data) => Mutation$MigrateToBinds.fromJson(data); typedef OnMutationCompleted$Mutation$MigrateToBinds = FutureOr Function( - dynamic, + Map?, Mutation$MigrateToBinds?, ); @@ -5362,6 +5601,7 @@ class Options$Mutation$MigrateToBinds graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$MigrateToBinds? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$MigrateToBinds? onCompleted, graphql.OnMutationUpdate? update, @@ -5373,7 +5613,7 @@ class Options$Mutation$MigrateToBinds fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5409,6 +5649,7 @@ class WatchOptions$Mutation$MigrateToBinds graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$MigrateToBinds? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5420,7 +5661,7 @@ class WatchOptions$Mutation$MigrateToBinds fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationMigrateToBinds, pollInterval: pollInterval, @@ -5446,7 +5687,7 @@ class Mutation$MigrateToBinds$migrateToBinds required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericJobButationReturn', this.job, }); @@ -5588,7 +5829,7 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds final TRes Function(Mutation$MigrateToBinds$migrateToBinds) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -5654,7 +5895,7 @@ class Mutation$MigrateToBinds$migrateToBinds$job { this.statusText, required this.uid, required this.updatedAt, - required this.$__typename, + this.$__typename = 'ApiJob', }); factory Mutation$MigrateToBinds$migrateToBinds$job.fromJson( @@ -5890,7 +6131,7 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job final TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? createdAt = _undefined, diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 8548e4dd..9325f5cb 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -116,7 +116,7 @@ class _CopyWithImpl$Input$AutoUpgradeSettingsInput final TRes Function(Input$AutoUpgradeSettingsInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? enableAutoUpgrade = _undefined, @@ -286,7 +286,7 @@ class _CopyWithImpl$Input$MigrateToBindsInput final TRes Function(Input$MigrateToBindsInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? emailBlockDevice = _undefined, @@ -424,7 +424,7 @@ class _CopyWithImpl$Input$MoveServiceInput final TRes Function(Input$MoveServiceInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? serviceId = _undefined, @@ -567,7 +567,7 @@ class _CopyWithImpl$Input$RecoveryKeyLimitsInput final TRes Function(Input$RecoveryKeyLimitsInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? expirationDate = _undefined, @@ -692,7 +692,7 @@ class _CopyWithImpl$Input$SshMutationInput final TRes Function(Input$SshMutationInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? username = _undefined, @@ -818,7 +818,7 @@ class _CopyWithImpl$Input$UseNewDeviceKeyInput final TRes Function(Input$UseNewDeviceKeyInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? key = _undefined, @@ -943,7 +943,7 @@ class _CopyWithImpl$Input$UseRecoveryKeyInput final TRes Function(Input$UseRecoveryKeyInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? key = _undefined, @@ -1068,7 +1068,7 @@ class _CopyWithImpl$Input$UserMutationInput final TRes Function(Input$UserMutationInput) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? username = _undefined, @@ -1268,7 +1268,7 @@ class Fragment$dnsRecordFields { this.priority, required this.recordType, required this.ttl, - required this.$__typename, + this.$__typename = 'DnsRecord', }); factory Fragment$dnsRecordFields.fromJson(Map json) { @@ -1417,7 +1417,7 @@ class _CopyWithImpl$Fragment$dnsRecordFields final TRes Function(Fragment$dnsRecordFields) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? content = _undefined, @@ -1555,7 +1555,7 @@ extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient { } } -const possibleTypesMap = { +const possibleTypesMap = >{ 'MutationReturnInterface': { 'ApiKeyMutationReturn', 'AutoUpgradeSettingsMutationReturn', diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 4eda2c92..f41e841f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -142,6 +142,177 @@ extension UtilityExtension$Fragment$basicMutationReturnFields this, (i) => i, ); + _T when<_T>({ + required _T Function( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + apiKeyMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + autoUpgradeSettingsMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) + genericJobButationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericMutationReturn) + genericMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + serviceJobMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceMutationReturn) + serviceMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + timezoneMutationReturn, + required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + + case "AutoUpgradeSettingsMutationReturn": + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + + case "DeviceApiTokenMutationReturn": + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + + case "GenericJobButationReturn": + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + + case "GenericMutationReturn": + return genericMutationReturn( + this as Fragment$basicMutationReturnFields$$GenericMutationReturn); + + case "ServiceJobMutationReturn": + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + + case "ServiceMutationReturn": + return serviceMutationReturn( + this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + + case "TimezoneMutationReturn": + return timezoneMutationReturn( + this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + + case "UserMutationReturn": + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + + default: + return orElse(); + } + } + + _T maybeWhen<_T>({ + _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? + apiKeyMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? + autoUpgradeSettingsMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? + deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? + genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? + genericMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? + serviceJobMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? + serviceMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? + timezoneMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + if (apiKeyMutationReturn != null) { + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + } else { + return orElse(); + } + + case "AutoUpgradeSettingsMutationReturn": + if (autoUpgradeSettingsMutationReturn != null) { + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + } else { + return orElse(); + } + + case "DeviceApiTokenMutationReturn": + if (deviceApiTokenMutationReturn != null) { + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + } else { + return orElse(); + } + + case "GenericJobButationReturn": + if (genericJobButationReturn != null) { + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + } else { + return orElse(); + } + + case "GenericMutationReturn": + if (genericMutationReturn != null) { + return genericMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericMutationReturn); + } else { + return orElse(); + } + + case "ServiceJobMutationReturn": + if (serviceJobMutationReturn != null) { + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + } else { + return orElse(); + } + + case "ServiceMutationReturn": + if (serviceMutationReturn != null) { + return serviceMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + } else { + return orElse(); + } + + case "TimezoneMutationReturn": + if (timezoneMutationReturn != null) { + return timezoneMutationReturn(this + as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + } else { + return orElse(); + } + + case "UserMutationReturn": + if (userMutationReturn != null) { + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + } else { + return orElse(); + } + + default: + return orElse(); + } + } } abstract class CopyWith$Fragment$basicMutationReturnFields { @@ -172,7 +343,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields final TRes Function(Fragment$basicMutationReturnFields) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -298,7 +469,7 @@ class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ApiKeyMutationReturn', }); factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( @@ -429,7 +600,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -477,7 +648,7 @@ class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'AutoUpgradeSettingsMutationReturn', }); factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( @@ -613,7 +784,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutat Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -662,7 +833,7 @@ class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', }); factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( @@ -796,7 +967,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationRe final TRes Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -844,7 +1015,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericJobButationReturn', }); factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( @@ -976,7 +1147,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn final TRes Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1024,7 +1195,7 @@ class Fragment$basicMutationReturnFields$$GenericMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( @@ -1155,7 +1326,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1203,7 +1374,7 @@ class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceJobMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( @@ -1335,7 +1506,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn final TRes Function( Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1383,7 +1554,7 @@ class Fragment$basicMutationReturnFields$$ServiceMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( @@ -1514,7 +1685,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1562,7 +1733,7 @@ class Fragment$basicMutationReturnFields$$TimezoneMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'TimezoneMutationReturn', }); factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( @@ -1694,7 +1865,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< final TRes Function( Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1742,7 +1913,7 @@ class Fragment$basicMutationReturnFields$$UserMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', }); factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( @@ -1870,7 +2041,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1914,7 +2085,7 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< class Query$GetApiVersion { Query$GetApiVersion({ required this.api, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$GetApiVersion.fromJson(Map json) { @@ -2006,7 +2177,7 @@ class _CopyWithImpl$Query$GetApiVersion final TRes Function(Query$GetApiVersion) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? api = _undefined, @@ -2082,6 +2253,10 @@ const documentNodeQueryGetApiVersion = DocumentNode(definitions: [ ]); Query$GetApiVersion _parserFn$Query$GetApiVersion(Map data) => Query$GetApiVersion.fromJson(data); +typedef OnQueryComplete$Query$GetApiVersion = FutureOr Function( + Map?, + Query$GetApiVersion?, +); class Options$Query$GetApiVersion extends graphql.QueryOptions { @@ -2091,19 +2266,40 @@ class Options$Query$GetApiVersion graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetApiVersion? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$GetApiVersion? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$GetApiVersion(data), + ), + onError: onError, document: documentNodeQueryGetApiVersion, parserFn: _parserFn$Query$GetApiVersion, ); + + final OnQueryComplete$Query$GetApiVersion? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$GetApiVersion @@ -2114,6 +2310,7 @@ class WatchOptions$Query$GetApiVersion graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetApiVersion? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -2124,7 +2321,7 @@ class WatchOptions$Query$GetApiVersion fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryGetApiVersion, pollInterval: pollInterval, @@ -2176,7 +2373,7 @@ extension ClientExtension$Query$GetApiVersion on graphql.GraphQLClient { class Query$GetApiVersion$api { Query$GetApiVersion$api({ required this.version, - required this.$__typename, + this.$__typename = 'Api', }); factory Query$GetApiVersion$api.fromJson(Map json) { @@ -2268,7 +2465,7 @@ class _CopyWithImpl$Query$GetApiVersion$api final TRes Function(Query$GetApiVersion$api) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? version = _undefined, @@ -2300,7 +2497,7 @@ class _CopyWithStubImpl$Query$GetApiVersion$api class Query$GetApiJobs { Query$GetApiJobs({ required this.jobs, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$GetApiJobs.fromJson(Map json) { @@ -2392,7 +2589,7 @@ class _CopyWithImpl$Query$GetApiJobs final TRes Function(Query$GetApiJobs) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? jobs = _undefined, @@ -2553,6 +2750,10 @@ const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ ]); Query$GetApiJobs _parserFn$Query$GetApiJobs(Map data) => Query$GetApiJobs.fromJson(data); +typedef OnQueryComplete$Query$GetApiJobs = FutureOr Function( + Map?, + Query$GetApiJobs?, +); class Options$Query$GetApiJobs extends graphql.QueryOptions { Options$Query$GetApiJobs({ @@ -2561,19 +2762,40 @@ class Options$Query$GetApiJobs extends graphql.QueryOptions { graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetApiJobs? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$GetApiJobs? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$GetApiJobs(data), + ), + onError: onError, document: documentNodeQueryGetApiJobs, parserFn: _parserFn$Query$GetApiJobs, ); + + final OnQueryComplete$Query$GetApiJobs? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$GetApiJobs @@ -2584,6 +2806,7 @@ class WatchOptions$Query$GetApiJobs graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetApiJobs? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -2594,7 +2817,7 @@ class WatchOptions$Query$GetApiJobs fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryGetApiJobs, pollInterval: pollInterval, @@ -2644,7 +2867,7 @@ extension ClientExtension$Query$GetApiJobs on graphql.GraphQLClient { class Query$GetApiJobs$jobs { Query$GetApiJobs$jobs({ required this.getJobs, - required this.$__typename, + this.$__typename = 'Job', }); factory Query$GetApiJobs$jobs.fromJson(Map json) { @@ -2751,7 +2974,7 @@ class _CopyWithImpl$Query$GetApiJobs$jobs final TRes Function(Query$GetApiJobs$jobs) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? getJobs = _undefined, @@ -2806,7 +3029,7 @@ class Query$GetApiJobs$jobs$getJobs { this.statusText, required this.uid, required this.updatedAt, - required this.$__typename, + this.$__typename = 'ApiJob', }); factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) { @@ -3040,7 +3263,7 @@ class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs final TRes Function(Query$GetApiJobs$jobs$getJobs) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? createdAt = _undefined, @@ -3189,7 +3412,7 @@ class _CopyWithImpl$Variables$Mutation$RemoveJob final TRes Function(Variables$Mutation$RemoveJob) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? jobId = _undefined}) => _then(Variables$Mutation$RemoveJob._({ @@ -3210,7 +3433,7 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveJob class Mutation$RemoveJob { Mutation$RemoveJob({ required this.removeJob, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RemoveJob.fromJson(Map json) { @@ -3303,7 +3526,7 @@ class _CopyWithImpl$Mutation$RemoveJob final TRes Function(Mutation$RemoveJob) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? removeJob = _undefined, @@ -3394,7 +3617,7 @@ const documentNodeMutationRemoveJob = DocumentNode(definitions: [ Mutation$RemoveJob _parserFn$Mutation$RemoveJob(Map data) => Mutation$RemoveJob.fromJson(data); typedef OnMutationCompleted$Mutation$RemoveJob = FutureOr Function( - dynamic, + Map?, Mutation$RemoveJob?, ); @@ -3407,6 +3630,7 @@ class Options$Mutation$RemoveJob graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RemoveJob? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RemoveJob? onCompleted, graphql.OnMutationUpdate? update, @@ -3418,7 +3642,7 @@ class Options$Mutation$RemoveJob fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -3452,6 +3676,7 @@ class WatchOptions$Mutation$RemoveJob graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RemoveJob? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -3463,7 +3688,7 @@ class WatchOptions$Mutation$RemoveJob fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRemoveJob, pollInterval: pollInterval, @@ -3489,7 +3714,7 @@ class Mutation$RemoveJob$removeJob required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$RemoveJob$removeJob.fromJson(Map json) { @@ -3610,7 +3835,7 @@ class _CopyWithImpl$Mutation$RemoveJob$removeJob final TRes Function(Mutation$RemoveJob$removeJob) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -3651,7 +3876,7 @@ class _CopyWithStubImpl$Mutation$RemoveJob$removeJob class Mutation$RunSystemRebuild { Mutation$RunSystemRebuild({ required this.runSystemRebuild, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RunSystemRebuild.fromJson(Map json) { @@ -3747,7 +3972,7 @@ class _CopyWithImpl$Mutation$RunSystemRebuild final TRes Function(Mutation$RunSystemRebuild) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? runSystemRebuild = _undefined, @@ -3827,7 +4052,7 @@ Mutation$RunSystemRebuild _parserFn$Mutation$RunSystemRebuild( Map data) => Mutation$RunSystemRebuild.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemRebuild = FutureOr Function( - dynamic, + Map?, Mutation$RunSystemRebuild?, ); @@ -3839,6 +4064,7 @@ class Options$Mutation$RunSystemRebuild graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RunSystemRebuild? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RunSystemRebuild? onCompleted, graphql.OnMutationUpdate? update, @@ -3849,7 +4075,7 @@ class Options$Mutation$RunSystemRebuild fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -3884,6 +4110,7 @@ class WatchOptions$Mutation$RunSystemRebuild graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RunSystemRebuild? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -3894,7 +4121,7 @@ class WatchOptions$Mutation$RunSystemRebuild fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRunSystemRebuild, pollInterval: pollInterval, @@ -3922,7 +4149,7 @@ class Mutation$RunSystemRebuild$runSystemRebuild required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$RunSystemRebuild$runSystemRebuild.fromJson( @@ -4045,7 +4272,7 @@ class _CopyWithImpl$Mutation$RunSystemRebuild$runSystemRebuild final TRes Function(Mutation$RunSystemRebuild$runSystemRebuild) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4086,7 +4313,7 @@ class _CopyWithStubImpl$Mutation$RunSystemRebuild$runSystemRebuild class Mutation$RunSystemRollback { Mutation$RunSystemRollback({ required this.runSystemRollback, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RunSystemRollback.fromJson(Map json) { @@ -4182,7 +4409,7 @@ class _CopyWithImpl$Mutation$RunSystemRollback final TRes Function(Mutation$RunSystemRollback) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? runSystemRollback = _undefined, @@ -4264,7 +4491,7 @@ Mutation$RunSystemRollback _parserFn$Mutation$RunSystemRollback( Mutation$RunSystemRollback.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemRollback = FutureOr Function( - dynamic, + Map?, Mutation$RunSystemRollback?, ); @@ -4276,6 +4503,7 @@ class Options$Mutation$RunSystemRollback graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RunSystemRollback? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RunSystemRollback? onCompleted, graphql.OnMutationUpdate? update, @@ -4286,7 +4514,7 @@ class Options$Mutation$RunSystemRollback fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4321,6 +4549,7 @@ class WatchOptions$Mutation$RunSystemRollback graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RunSystemRollback? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4331,7 +4560,7 @@ class WatchOptions$Mutation$RunSystemRollback fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRunSystemRollback, pollInterval: pollInterval, @@ -4359,7 +4588,7 @@ class Mutation$RunSystemRollback$runSystemRollback required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$RunSystemRollback$runSystemRollback.fromJson( @@ -4482,7 +4711,7 @@ class _CopyWithImpl$Mutation$RunSystemRollback$runSystemRollback final TRes Function(Mutation$RunSystemRollback$runSystemRollback) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4523,7 +4752,7 @@ class _CopyWithStubImpl$Mutation$RunSystemRollback$runSystemRollback class Mutation$RunSystemUpgrade { Mutation$RunSystemUpgrade({ required this.runSystemUpgrade, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RunSystemUpgrade.fromJson(Map json) { @@ -4619,7 +4848,7 @@ class _CopyWithImpl$Mutation$RunSystemUpgrade final TRes Function(Mutation$RunSystemUpgrade) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? runSystemUpgrade = _undefined, @@ -4699,7 +4928,7 @@ Mutation$RunSystemUpgrade _parserFn$Mutation$RunSystemUpgrade( Map data) => Mutation$RunSystemUpgrade.fromJson(data); typedef OnMutationCompleted$Mutation$RunSystemUpgrade = FutureOr Function( - dynamic, + Map?, Mutation$RunSystemUpgrade?, ); @@ -4711,6 +4940,7 @@ class Options$Mutation$RunSystemUpgrade graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RunSystemUpgrade? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RunSystemUpgrade? onCompleted, graphql.OnMutationUpdate? update, @@ -4721,7 +4951,7 @@ class Options$Mutation$RunSystemUpgrade fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4756,6 +4986,7 @@ class WatchOptions$Mutation$RunSystemUpgrade graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RunSystemUpgrade? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4766,7 +4997,7 @@ class WatchOptions$Mutation$RunSystemUpgrade fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRunSystemUpgrade, pollInterval: pollInterval, @@ -4794,7 +5025,7 @@ class Mutation$RunSystemUpgrade$runSystemUpgrade required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( @@ -4917,7 +5148,7 @@ class _CopyWithImpl$Mutation$RunSystemUpgrade$runSystemUpgrade final TRes Function(Mutation$RunSystemUpgrade$runSystemUpgrade) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4958,7 +5189,7 @@ class _CopyWithStubImpl$Mutation$RunSystemUpgrade$runSystemUpgrade class Mutation$PullRepositoryChanges { Mutation$PullRepositoryChanges({ required this.pullRepositoryChanges, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$PullRepositoryChanges.fromJson(Map json) { @@ -5056,7 +5287,7 @@ class _CopyWithImpl$Mutation$PullRepositoryChanges final TRes Function(Mutation$PullRepositoryChanges) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? pullRepositoryChanges = _undefined, @@ -5139,7 +5370,7 @@ Mutation$PullRepositoryChanges _parserFn$Mutation$PullRepositoryChanges( Mutation$PullRepositoryChanges.fromJson(data); typedef OnMutationCompleted$Mutation$PullRepositoryChanges = FutureOr Function( - dynamic, + Map?, Mutation$PullRepositoryChanges?, ); @@ -5151,6 +5382,7 @@ class Options$Mutation$PullRepositoryChanges graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$PullRepositoryChanges? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$PullRepositoryChanges? onCompleted, graphql.OnMutationUpdate? update, @@ -5161,7 +5393,7 @@ class Options$Mutation$PullRepositoryChanges fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5197,6 +5429,7 @@ class WatchOptions$Mutation$PullRepositoryChanges graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$PullRepositoryChanges? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5207,7 +5440,7 @@ class WatchOptions$Mutation$PullRepositoryChanges fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationPullRepositoryChanges, pollInterval: pollInterval, @@ -5238,7 +5471,7 @@ class Mutation$PullRepositoryChanges$pullRepositoryChanges required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( @@ -5366,7 +5599,7 @@ class _CopyWithImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges final TRes Function(Mutation$PullRepositoryChanges$pullRepositoryChanges) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -5410,7 +5643,7 @@ class _CopyWithStubImpl$Mutation$PullRepositoryChanges$pullRepositoryChanges< class Mutation$RebootSystem { Mutation$RebootSystem({ required this.rebootSystem, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RebootSystem.fromJson(Map json) { @@ -5503,7 +5736,7 @@ class _CopyWithImpl$Mutation$RebootSystem final TRes Function(Mutation$RebootSystem) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? rebootSystem = _undefined, @@ -5580,7 +5813,7 @@ Mutation$RebootSystem _parserFn$Mutation$RebootSystem( Map data) => Mutation$RebootSystem.fromJson(data); typedef OnMutationCompleted$Mutation$RebootSystem = FutureOr Function( - dynamic, + Map?, Mutation$RebootSystem?, ); @@ -5592,6 +5825,7 @@ class Options$Mutation$RebootSystem graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RebootSystem? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RebootSystem? onCompleted, graphql.OnMutationUpdate? update, @@ -5602,7 +5836,7 @@ class Options$Mutation$RebootSystem fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5635,6 +5869,7 @@ class WatchOptions$Mutation$RebootSystem graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RebootSystem? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5645,7 +5880,7 @@ class WatchOptions$Mutation$RebootSystem fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRebootSystem, pollInterval: pollInterval, @@ -5671,7 +5906,7 @@ class Mutation$RebootSystem$rebootSystem required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$RebootSystem$rebootSystem.fromJson( @@ -5794,7 +6029,7 @@ class _CopyWithImpl$Mutation$RebootSystem$rebootSystem final TRes Function(Mutation$RebootSystem$rebootSystem) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -5835,7 +6070,7 @@ class _CopyWithStubImpl$Mutation$RebootSystem$rebootSystem class Query$SystemServerProvider { Query$SystemServerProvider({ required this.system, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$SystemServerProvider.fromJson(Map json) { @@ -5930,7 +6165,7 @@ class _CopyWithImpl$Query$SystemServerProvider final TRes Function(Query$SystemServerProvider) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? system = _undefined, @@ -6023,6 +6258,10 @@ const documentNodeQuerySystemServerProvider = DocumentNode(definitions: [ Query$SystemServerProvider _parserFn$Query$SystemServerProvider( Map data) => Query$SystemServerProvider.fromJson(data); +typedef OnQueryComplete$Query$SystemServerProvider = FutureOr Function( + Map?, + Query$SystemServerProvider?, +); class Options$Query$SystemServerProvider extends graphql.QueryOptions { @@ -6032,19 +6271,42 @@ class Options$Query$SystemServerProvider graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemServerProvider? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$SystemServerProvider? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$SystemServerProvider(data), + ), + onError: onError, document: documentNodeQuerySystemServerProvider, parserFn: _parserFn$Query$SystemServerProvider, ); + + final OnQueryComplete$Query$SystemServerProvider? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$SystemServerProvider @@ -6055,6 +6317,7 @@ class WatchOptions$Query$SystemServerProvider graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemServerProvider? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -6065,7 +6328,7 @@ class WatchOptions$Query$SystemServerProvider fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQuerySystemServerProvider, pollInterval: pollInterval, @@ -6121,7 +6384,7 @@ extension ClientExtension$Query$SystemServerProvider on graphql.GraphQLClient { class Query$SystemServerProvider$system { Query$SystemServerProvider$system({ required this.provider, - required this.$__typename, + this.$__typename = 'System', }); factory Query$SystemServerProvider$system.fromJson( @@ -6217,7 +6480,7 @@ class _CopyWithImpl$Query$SystemServerProvider$system final TRes Function(Query$SystemServerProvider$system) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? provider = _undefined, @@ -6256,7 +6519,7 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system class Query$SystemServerProvider$system$provider { Query$SystemServerProvider$system$provider({ required this.provider, - required this.$__typename, + this.$__typename = 'SystemProviderInfo', }); factory Query$SystemServerProvider$system$provider.fromJson( @@ -6351,7 +6614,7 @@ class _CopyWithImpl$Query$SystemServerProvider$system$provider final TRes Function(Query$SystemServerProvider$system$provider) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? provider = _undefined, @@ -6383,7 +6646,7 @@ class _CopyWithStubImpl$Query$SystemServerProvider$system$provider class Query$SystemDnsProvider { Query$SystemDnsProvider({ required this.system, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$SystemDnsProvider.fromJson(Map json) { @@ -6477,7 +6740,7 @@ class _CopyWithImpl$Query$SystemDnsProvider final TRes Function(Query$SystemDnsProvider) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? system = _undefined, @@ -6570,6 +6833,10 @@ const documentNodeQuerySystemDnsProvider = DocumentNode(definitions: [ Query$SystemDnsProvider _parserFn$Query$SystemDnsProvider( Map data) => Query$SystemDnsProvider.fromJson(data); +typedef OnQueryComplete$Query$SystemDnsProvider = FutureOr Function( + Map?, + Query$SystemDnsProvider?, +); class Options$Query$SystemDnsProvider extends graphql.QueryOptions { @@ -6579,19 +6846,42 @@ class Options$Query$SystemDnsProvider graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemDnsProvider? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$SystemDnsProvider? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$SystemDnsProvider(data), + ), + onError: onError, document: documentNodeQuerySystemDnsProvider, parserFn: _parserFn$Query$SystemDnsProvider, ); + + final OnQueryComplete$Query$SystemDnsProvider? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$SystemDnsProvider @@ -6602,6 +6892,7 @@ class WatchOptions$Query$SystemDnsProvider graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemDnsProvider? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -6612,7 +6903,7 @@ class WatchOptions$Query$SystemDnsProvider fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQuerySystemDnsProvider, pollInterval: pollInterval, @@ -6666,7 +6957,7 @@ extension ClientExtension$Query$SystemDnsProvider on graphql.GraphQLClient { class Query$SystemDnsProvider$system { Query$SystemDnsProvider$system({ required this.domainInfo, - required this.$__typename, + this.$__typename = 'System', }); factory Query$SystemDnsProvider$system.fromJson(Map json) { @@ -6761,7 +7052,7 @@ class _CopyWithImpl$Query$SystemDnsProvider$system final TRes Function(Query$SystemDnsProvider$system) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? domainInfo = _undefined, @@ -6800,7 +7091,7 @@ class _CopyWithStubImpl$Query$SystemDnsProvider$system class Query$SystemDnsProvider$system$domainInfo { Query$SystemDnsProvider$system$domainInfo({ required this.provider, - required this.$__typename, + this.$__typename = 'SystemDomainInfo', }); factory Query$SystemDnsProvider$system$domainInfo.fromJson( @@ -6895,7 +7186,7 @@ class _CopyWithImpl$Query$SystemDnsProvider$system$domainInfo final TRes Function(Query$SystemDnsProvider$system$domainInfo) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? provider = _undefined, @@ -6927,7 +7218,7 @@ class _CopyWithStubImpl$Query$SystemDnsProvider$system$domainInfo class Query$GetApiTokens { Query$GetApiTokens({ required this.api, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$GetApiTokens.fromJson(Map json) { @@ -7019,7 +7310,7 @@ class _CopyWithImpl$Query$GetApiTokens final TRes Function(Query$GetApiTokens) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? api = _undefined, @@ -7124,6 +7415,10 @@ const documentNodeQueryGetApiTokens = DocumentNode(definitions: [ ]); Query$GetApiTokens _parserFn$Query$GetApiTokens(Map data) => Query$GetApiTokens.fromJson(data); +typedef OnQueryComplete$Query$GetApiTokens = FutureOr Function( + Map?, + Query$GetApiTokens?, +); class Options$Query$GetApiTokens extends graphql.QueryOptions { @@ -7133,19 +7428,40 @@ class Options$Query$GetApiTokens graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetApiTokens? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$GetApiTokens? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$GetApiTokens(data), + ), + onError: onError, document: documentNodeQueryGetApiTokens, parserFn: _parserFn$Query$GetApiTokens, ); + + final OnQueryComplete$Query$GetApiTokens? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$GetApiTokens @@ -7156,6 +7472,7 @@ class WatchOptions$Query$GetApiTokens graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetApiTokens? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -7166,7 +7483,7 @@ class WatchOptions$Query$GetApiTokens fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryGetApiTokens, pollInterval: pollInterval, @@ -7218,7 +7535,7 @@ extension ClientExtension$Query$GetApiTokens on graphql.GraphQLClient { class Query$GetApiTokens$api { Query$GetApiTokens$api({ required this.devices, - required this.$__typename, + this.$__typename = 'Api', }); factory Query$GetApiTokens$api.fromJson(Map json) { @@ -7326,7 +7643,7 @@ class _CopyWithImpl$Query$GetApiTokens$api final TRes Function(Query$GetApiTokens$api) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? devices = _undefined, @@ -7373,7 +7690,7 @@ class Query$GetApiTokens$api$devices { required this.creationDate, required this.isCaller, required this.name, - required this.$__typename, + this.$__typename = 'ApiDevice', }); factory Query$GetApiTokens$api$devices.fromJson(Map json) { @@ -7494,7 +7811,7 @@ class _CopyWithImpl$Query$GetApiTokens$api$devices final TRes Function(Query$GetApiTokens$api$devices) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? creationDate = _undefined, @@ -7536,7 +7853,7 @@ class _CopyWithStubImpl$Query$GetApiTokens$api$devices class Query$RecoveryKey { Query$RecoveryKey({ required this.api, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$RecoveryKey.fromJson(Map json) { @@ -7628,7 +7945,7 @@ class _CopyWithImpl$Query$RecoveryKey final TRes Function(Query$RecoveryKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? api = _undefined, @@ -7747,6 +8064,10 @@ const documentNodeQueryRecoveryKey = DocumentNode(definitions: [ ]); Query$RecoveryKey _parserFn$Query$RecoveryKey(Map data) => Query$RecoveryKey.fromJson(data); +typedef OnQueryComplete$Query$RecoveryKey = FutureOr Function( + Map?, + Query$RecoveryKey?, +); class Options$Query$RecoveryKey extends graphql.QueryOptions { @@ -7756,19 +8077,40 @@ class Options$Query$RecoveryKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$RecoveryKey? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$RecoveryKey? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$RecoveryKey(data), + ), + onError: onError, document: documentNodeQueryRecoveryKey, parserFn: _parserFn$Query$RecoveryKey, ); + + final OnQueryComplete$Query$RecoveryKey? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$RecoveryKey @@ -7779,6 +8121,7 @@ class WatchOptions$Query$RecoveryKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$RecoveryKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -7789,7 +8132,7 @@ class WatchOptions$Query$RecoveryKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryRecoveryKey, pollInterval: pollInterval, @@ -7839,7 +8182,7 @@ extension ClientExtension$Query$RecoveryKey on graphql.GraphQLClient { class Query$RecoveryKey$api { Query$RecoveryKey$api({ required this.recoveryKey, - required this.$__typename, + this.$__typename = 'Api', }); factory Query$RecoveryKey$api.fromJson(Map json) { @@ -7932,7 +8275,7 @@ class _CopyWithImpl$Query$RecoveryKey$api final TRes Function(Query$RecoveryKey$api) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? recoveryKey = _undefined, @@ -7975,7 +8318,7 @@ class Query$RecoveryKey$api$recoveryKey { this.expirationDate, this.usesLeft, required this.valid, - required this.$__typename, + this.$__typename = 'ApiRecoveryKeyStatus', }); factory Query$RecoveryKey$api$recoveryKey.fromJson( @@ -8129,7 +8472,7 @@ class _CopyWithImpl$Query$RecoveryKey$api$recoveryKey final TRes Function(Query$RecoveryKey$api$recoveryKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? creationDate = _undefined, @@ -8268,7 +8611,7 @@ class _CopyWithImpl$Variables$Mutation$GetNewRecoveryApiKey final TRes Function(Variables$Mutation$GetNewRecoveryApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? limits = _undefined}) => _then(Variables$Mutation$GetNewRecoveryApiKey._({ @@ -8290,7 +8633,7 @@ class _CopyWithStubImpl$Variables$Mutation$GetNewRecoveryApiKey class Mutation$GetNewRecoveryApiKey { Mutation$GetNewRecoveryApiKey({ required this.getNewRecoveryApiKey, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$GetNewRecoveryApiKey.fromJson(Map json) { @@ -8387,7 +8730,7 @@ class _CopyWithImpl$Mutation$GetNewRecoveryApiKey final TRes Function(Mutation$GetNewRecoveryApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? getNewRecoveryApiKey = _undefined, @@ -8492,7 +8835,7 @@ Mutation$GetNewRecoveryApiKey _parserFn$Mutation$GetNewRecoveryApiKey( Mutation$GetNewRecoveryApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$GetNewRecoveryApiKey = FutureOr Function( - dynamic, + Map?, Mutation$GetNewRecoveryApiKey?, ); @@ -8505,6 +8848,7 @@ class Options$Mutation$GetNewRecoveryApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$GetNewRecoveryApiKey? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompleted, graphql.OnMutationUpdate? update, @@ -8516,7 +8860,7 @@ class Options$Mutation$GetNewRecoveryApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -8553,6 +8897,7 @@ class WatchOptions$Mutation$GetNewRecoveryApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$GetNewRecoveryApiKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -8564,7 +8909,7 @@ class WatchOptions$Mutation$GetNewRecoveryApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationGetNewRecoveryApiKey, pollInterval: pollInterval, @@ -8594,7 +8939,7 @@ class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ApiKeyMutationReturn', this.key, }); @@ -8736,7 +9081,7 @@ class _CopyWithImpl$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey final TRes Function(Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -8861,7 +9206,7 @@ class _CopyWithImpl$Variables$Mutation$UseRecoveryApiKey final TRes Function(Variables$Mutation$UseRecoveryApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? input = _undefined}) => _then(Variables$Mutation$UseRecoveryApiKey._({ @@ -8883,7 +9228,7 @@ class _CopyWithStubImpl$Variables$Mutation$UseRecoveryApiKey class Mutation$UseRecoveryApiKey { Mutation$UseRecoveryApiKey({ required this.useRecoveryApiKey, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$UseRecoveryApiKey.fromJson(Map json) { @@ -8979,7 +9324,7 @@ class _CopyWithImpl$Mutation$UseRecoveryApiKey final TRes Function(Mutation$UseRecoveryApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? useRecoveryApiKey = _undefined, @@ -9083,7 +9428,7 @@ Mutation$UseRecoveryApiKey _parserFn$Mutation$UseRecoveryApiKey( Mutation$UseRecoveryApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$UseRecoveryApiKey = FutureOr Function( - dynamic, + Map?, Mutation$UseRecoveryApiKey?, ); @@ -9096,6 +9441,7 @@ class Options$Mutation$UseRecoveryApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$UseRecoveryApiKey? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompleted, graphql.OnMutationUpdate? update, @@ -9107,7 +9453,7 @@ class Options$Mutation$UseRecoveryApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -9143,6 +9489,7 @@ class WatchOptions$Mutation$UseRecoveryApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$UseRecoveryApiKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -9154,7 +9501,7 @@ class WatchOptions$Mutation$UseRecoveryApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationUseRecoveryApiKey, pollInterval: pollInterval, @@ -9183,7 +9530,7 @@ class Mutation$UseRecoveryApiKey$useRecoveryApiKey required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', this.token, }); @@ -9321,7 +9668,7 @@ class _CopyWithImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey final TRes Function(Mutation$UseRecoveryApiKey$useRecoveryApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -9365,7 +9712,7 @@ class _CopyWithStubImpl$Mutation$UseRecoveryApiKey$useRecoveryApiKey class Mutation$RefreshDeviceApiToken { Mutation$RefreshDeviceApiToken({ required this.refreshDeviceApiToken, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RefreshDeviceApiToken.fromJson(Map json) { @@ -9463,7 +9810,7 @@ class _CopyWithImpl$Mutation$RefreshDeviceApiToken final TRes Function(Mutation$RefreshDeviceApiToken) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? refreshDeviceApiToken = _undefined, @@ -9553,7 +9900,7 @@ Mutation$RefreshDeviceApiToken _parserFn$Mutation$RefreshDeviceApiToken( Mutation$RefreshDeviceApiToken.fromJson(data); typedef OnMutationCompleted$Mutation$RefreshDeviceApiToken = FutureOr Function( - dynamic, + Map?, Mutation$RefreshDeviceApiToken?, ); @@ -9565,6 +9912,7 @@ class Options$Mutation$RefreshDeviceApiToken graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RefreshDeviceApiToken? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompleted, graphql.OnMutationUpdate? update, @@ -9575,7 +9923,7 @@ class Options$Mutation$RefreshDeviceApiToken fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -9611,6 +9959,7 @@ class WatchOptions$Mutation$RefreshDeviceApiToken graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RefreshDeviceApiToken? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -9621,7 +9970,7 @@ class WatchOptions$Mutation$RefreshDeviceApiToken fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRefreshDeviceApiToken, pollInterval: pollInterval, @@ -9653,7 +10002,7 @@ class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', this.token, }); @@ -9796,7 +10145,7 @@ class _CopyWithImpl$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken final TRes Function(Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -9919,7 +10268,7 @@ class _CopyWithImpl$Variables$Mutation$DeleteDeviceApiToken final TRes Function(Variables$Mutation$DeleteDeviceApiToken) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? device = _undefined}) => _then(Variables$Mutation$DeleteDeviceApiToken._({ @@ -9941,7 +10290,7 @@ class _CopyWithStubImpl$Variables$Mutation$DeleteDeviceApiToken class Mutation$DeleteDeviceApiToken { Mutation$DeleteDeviceApiToken({ required this.deleteDeviceApiToken, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$DeleteDeviceApiToken.fromJson(Map json) { @@ -10038,7 +10387,7 @@ class _CopyWithImpl$Mutation$DeleteDeviceApiToken final TRes Function(Mutation$DeleteDeviceApiToken) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? deleteDeviceApiToken = _undefined, @@ -10136,7 +10485,7 @@ Mutation$DeleteDeviceApiToken _parserFn$Mutation$DeleteDeviceApiToken( Mutation$DeleteDeviceApiToken.fromJson(data); typedef OnMutationCompleted$Mutation$DeleteDeviceApiToken = FutureOr Function( - dynamic, + Map?, Mutation$DeleteDeviceApiToken?, ); @@ -10149,6 +10498,7 @@ class Options$Mutation$DeleteDeviceApiToken graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$DeleteDeviceApiToken? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompleted, graphql.OnMutationUpdate? update, @@ -10160,7 +10510,7 @@ class Options$Mutation$DeleteDeviceApiToken fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -10197,6 +10547,7 @@ class WatchOptions$Mutation$DeleteDeviceApiToken graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$DeleteDeviceApiToken? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -10208,7 +10559,7 @@ class WatchOptions$Mutation$DeleteDeviceApiToken fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationDeleteDeviceApiToken, pollInterval: pollInterval, @@ -10237,7 +10588,7 @@ class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( @@ -10364,7 +10715,7 @@ class _CopyWithImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken final TRes Function(Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -10407,7 +10758,7 @@ class _CopyWithStubImpl$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken class Mutation$GetNewDeviceApiKey { Mutation$GetNewDeviceApiKey({ required this.getNewDeviceApiKey, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$GetNewDeviceApiKey.fromJson(Map json) { @@ -10504,7 +10855,7 @@ class _CopyWithImpl$Mutation$GetNewDeviceApiKey final TRes Function(Mutation$GetNewDeviceApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? getNewDeviceApiKey = _undefined, @@ -10593,7 +10944,7 @@ Mutation$GetNewDeviceApiKey _parserFn$Mutation$GetNewDeviceApiKey( Mutation$GetNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$GetNewDeviceApiKey = FutureOr Function( - dynamic, + Map?, Mutation$GetNewDeviceApiKey?, ); @@ -10605,6 +10956,7 @@ class Options$Mutation$GetNewDeviceApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$GetNewDeviceApiKey? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompleted, graphql.OnMutationUpdate? update, @@ -10615,7 +10967,7 @@ class Options$Mutation$GetNewDeviceApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -10650,6 +11002,7 @@ class WatchOptions$Mutation$GetNewDeviceApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$GetNewDeviceApiKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -10660,7 +11013,7 @@ class WatchOptions$Mutation$GetNewDeviceApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationGetNewDeviceApiKey, pollInterval: pollInterval, @@ -10688,7 +11041,7 @@ class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ApiKeyMutationReturn', this.key, }); @@ -10827,7 +11180,7 @@ class _CopyWithImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey final TRes Function(Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -10871,7 +11224,7 @@ class _CopyWithStubImpl$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey class Mutation$InvalidateNewDeviceApiKey { Mutation$InvalidateNewDeviceApiKey({ required this.invalidateNewDeviceApiKey, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$InvalidateNewDeviceApiKey.fromJson( @@ -10973,7 +11326,7 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey final TRes Function(Mutation$InvalidateNewDeviceApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? invalidateNewDeviceApiKey = _undefined, @@ -11059,7 +11412,7 @@ Mutation$InvalidateNewDeviceApiKey _parserFn$Mutation$InvalidateNewDeviceApiKey( Mutation$InvalidateNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey = FutureOr Function( - dynamic, + Map?, Mutation$InvalidateNewDeviceApiKey?, ); @@ -11071,6 +11424,7 @@ class Options$Mutation$InvalidateNewDeviceApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$InvalidateNewDeviceApiKey? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompleted, graphql.OnMutationUpdate? update, @@ -11081,7 +11435,7 @@ class Options$Mutation$InvalidateNewDeviceApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -11117,6 +11471,7 @@ class WatchOptions$Mutation$InvalidateNewDeviceApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$InvalidateNewDeviceApiKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -11127,7 +11482,7 @@ class WatchOptions$Mutation$InvalidateNewDeviceApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationInvalidateNewDeviceApiKey, pollInterval: pollInterval, @@ -11158,7 +11513,7 @@ class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( @@ -11290,7 +11645,7 @@ class _CopyWithImpl$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey final TRes Function( Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -11415,7 +11770,7 @@ class _CopyWithImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey final TRes Function(Variables$Mutation$AuthorizeWithNewDeviceApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? input = _undefined}) => _then(Variables$Mutation$AuthorizeWithNewDeviceApiKey._({ @@ -11437,7 +11792,7 @@ class _CopyWithStubImpl$Variables$Mutation$AuthorizeWithNewDeviceApiKey class Mutation$AuthorizeWithNewDeviceApiKey { Mutation$AuthorizeWithNewDeviceApiKey({ required this.authorizeWithNewDeviceApiKey, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$AuthorizeWithNewDeviceApiKey.fromJson( @@ -11541,7 +11896,7 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey final TRes Function(Mutation$AuthorizeWithNewDeviceApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? authorizeWithNewDeviceApiKey = _undefined, @@ -11653,7 +12008,7 @@ Mutation$AuthorizeWithNewDeviceApiKey Mutation$AuthorizeWithNewDeviceApiKey.fromJson(data); typedef OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey = FutureOr Function( - dynamic, + Map?, Mutation$AuthorizeWithNewDeviceApiKey?, ); @@ -11666,6 +12021,7 @@ class Options$Mutation$AuthorizeWithNewDeviceApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$AuthorizeWithNewDeviceApiKey? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompleted, graphql.OnMutationUpdate? update, @@ -11677,7 +12033,7 @@ class Options$Mutation$AuthorizeWithNewDeviceApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -11714,6 +12070,7 @@ class WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$AuthorizeWithNewDeviceApiKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -11725,7 +12082,7 @@ class WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationAuthorizeWithNewDeviceApiKey, pollInterval: pollInterval, @@ -11755,7 +12112,7 @@ class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', this.token, }); @@ -11904,7 +12261,7 @@ class _CopyWithImpl$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDevice final TRes Function( Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 8da4e347..64738ad8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -141,6 +141,177 @@ extension UtilityExtension$Fragment$basicMutationReturnFields this, (i) => i, ); + _T when<_T>({ + required _T Function( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + apiKeyMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + autoUpgradeSettingsMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) + genericJobButationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericMutationReturn) + genericMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + serviceJobMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceMutationReturn) + serviceMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + timezoneMutationReturn, + required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + + case "AutoUpgradeSettingsMutationReturn": + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + + case "DeviceApiTokenMutationReturn": + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + + case "GenericJobButationReturn": + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + + case "GenericMutationReturn": + return genericMutationReturn( + this as Fragment$basicMutationReturnFields$$GenericMutationReturn); + + case "ServiceJobMutationReturn": + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + + case "ServiceMutationReturn": + return serviceMutationReturn( + this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + + case "TimezoneMutationReturn": + return timezoneMutationReturn( + this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + + case "UserMutationReturn": + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + + default: + return orElse(); + } + } + + _T maybeWhen<_T>({ + _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? + apiKeyMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? + autoUpgradeSettingsMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? + deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? + genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? + genericMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? + serviceJobMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? + serviceMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? + timezoneMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + if (apiKeyMutationReturn != null) { + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + } else { + return orElse(); + } + + case "AutoUpgradeSettingsMutationReturn": + if (autoUpgradeSettingsMutationReturn != null) { + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + } else { + return orElse(); + } + + case "DeviceApiTokenMutationReturn": + if (deviceApiTokenMutationReturn != null) { + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + } else { + return orElse(); + } + + case "GenericJobButationReturn": + if (genericJobButationReturn != null) { + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + } else { + return orElse(); + } + + case "GenericMutationReturn": + if (genericMutationReturn != null) { + return genericMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericMutationReturn); + } else { + return orElse(); + } + + case "ServiceJobMutationReturn": + if (serviceJobMutationReturn != null) { + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + } else { + return orElse(); + } + + case "ServiceMutationReturn": + if (serviceMutationReturn != null) { + return serviceMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + } else { + return orElse(); + } + + case "TimezoneMutationReturn": + if (timezoneMutationReturn != null) { + return timezoneMutationReturn(this + as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + } else { + return orElse(); + } + + case "UserMutationReturn": + if (userMutationReturn != null) { + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + } else { + return orElse(); + } + + default: + return orElse(); + } + } } abstract class CopyWith$Fragment$basicMutationReturnFields { @@ -171,7 +342,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields final TRes Function(Fragment$basicMutationReturnFields) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -297,7 +468,7 @@ class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ApiKeyMutationReturn', }); factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( @@ -428,7 +599,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -476,7 +647,7 @@ class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'AutoUpgradeSettingsMutationReturn', }); factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( @@ -612,7 +783,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutat Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -661,7 +832,7 @@ class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', }); factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( @@ -795,7 +966,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationRe final TRes Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -843,7 +1014,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericJobButationReturn', }); factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( @@ -975,7 +1146,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn final TRes Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1023,7 +1194,7 @@ class Fragment$basicMutationReturnFields$$GenericMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( @@ -1154,7 +1325,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1202,7 +1373,7 @@ class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceJobMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( @@ -1334,7 +1505,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn final TRes Function( Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1382,7 +1553,7 @@ class Fragment$basicMutationReturnFields$$ServiceMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( @@ -1513,7 +1684,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1561,7 +1732,7 @@ class Fragment$basicMutationReturnFields$$TimezoneMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'TimezoneMutationReturn', }); factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( @@ -1693,7 +1864,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< final TRes Function( Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1741,7 +1912,7 @@ class Fragment$basicMutationReturnFields$$UserMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', }); factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( @@ -1869,7 +2040,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1913,7 +2084,7 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< class Query$SystemSettings { Query$SystemSettings({ required this.system, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$SystemSettings.fromJson(Map json) { @@ -2006,7 +2177,7 @@ class _CopyWithImpl$Query$SystemSettings final TRes Function(Query$SystemSettings) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? system = _undefined, @@ -2157,6 +2328,10 @@ const documentNodeQuerySystemSettings = DocumentNode(definitions: [ Query$SystemSettings _parserFn$Query$SystemSettings( Map data) => Query$SystemSettings.fromJson(data); +typedef OnQueryComplete$Query$SystemSettings = FutureOr Function( + Map?, + Query$SystemSettings?, +); class Options$Query$SystemSettings extends graphql.QueryOptions { @@ -2166,19 +2341,40 @@ class Options$Query$SystemSettings graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemSettings? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$SystemSettings? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$SystemSettings(data), + ), + onError: onError, document: documentNodeQuerySystemSettings, parserFn: _parserFn$Query$SystemSettings, ); + + final OnQueryComplete$Query$SystemSettings? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$SystemSettings @@ -2189,6 +2385,7 @@ class WatchOptions$Query$SystemSettings graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemSettings? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -2199,7 +2396,7 @@ class WatchOptions$Query$SystemSettings fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQuerySystemSettings, pollInterval: pollInterval, @@ -2251,7 +2448,7 @@ extension ClientExtension$Query$SystemSettings on graphql.GraphQLClient { class Query$SystemSettings$system { Query$SystemSettings$system({ required this.settings, - required this.$__typename, + this.$__typename = 'System', }); factory Query$SystemSettings$system.fromJson(Map json) { @@ -2346,7 +2543,7 @@ class _CopyWithImpl$Query$SystemSettings$system final TRes Function(Query$SystemSettings$system) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? settings = _undefined, @@ -2387,7 +2584,7 @@ class Query$SystemSettings$system$settings { required this.autoUpgrade, required this.ssh, required this.timezone, - required this.$__typename, + this.$__typename = 'SystemSettings', }); factory Query$SystemSettings$system$settings.fromJson( @@ -2515,7 +2712,7 @@ class _CopyWithImpl$Query$SystemSettings$system$settings final TRes Function(Query$SystemSettings$system$settings) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? autoUpgrade = _undefined, @@ -2575,7 +2772,7 @@ class Query$SystemSettings$system$settings$autoUpgrade { Query$SystemSettings$system$settings$autoUpgrade({ required this.allowReboot, required this.enable, - required this.$__typename, + this.$__typename = 'AutoUpgradeOptions', }); factory Query$SystemSettings$system$settings$autoUpgrade.fromJson( @@ -2685,7 +2882,7 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$autoUpgrade final TRes Function(Query$SystemSettings$system$settings$autoUpgrade) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? allowReboot = _undefined, @@ -2723,7 +2920,7 @@ class Query$SystemSettings$system$settings$ssh { Query$SystemSettings$system$settings$ssh({ required this.enable, required this.passwordAuthentication, - required this.$__typename, + this.$__typename = 'SshSettings', }); factory Query$SystemSettings$system$settings$ssh.fromJson( @@ -2832,7 +3029,7 @@ class _CopyWithImpl$Query$SystemSettings$system$settings$ssh final TRes Function(Query$SystemSettings$system$settings$ssh) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? enable = _undefined, @@ -2870,7 +3067,7 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh class Query$SystemIsUsingBinds { Query$SystemIsUsingBinds({ required this.system, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$SystemIsUsingBinds.fromJson(Map json) { @@ -2965,7 +3162,7 @@ class _CopyWithImpl$Query$SystemIsUsingBinds final TRes Function(Query$SystemIsUsingBinds) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? system = _undefined, @@ -3058,6 +3255,10 @@ const documentNodeQuerySystemIsUsingBinds = DocumentNode(definitions: [ Query$SystemIsUsingBinds _parserFn$Query$SystemIsUsingBinds( Map data) => Query$SystemIsUsingBinds.fromJson(data); +typedef OnQueryComplete$Query$SystemIsUsingBinds = FutureOr Function( + Map?, + Query$SystemIsUsingBinds?, +); class Options$Query$SystemIsUsingBinds extends graphql.QueryOptions { @@ -3067,19 +3268,42 @@ class Options$Query$SystemIsUsingBinds graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemIsUsingBinds? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$SystemIsUsingBinds? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$SystemIsUsingBinds(data), + ), + onError: onError, document: documentNodeQuerySystemIsUsingBinds, parserFn: _parserFn$Query$SystemIsUsingBinds, ); + + final OnQueryComplete$Query$SystemIsUsingBinds? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$SystemIsUsingBinds @@ -3090,6 +3314,7 @@ class WatchOptions$Query$SystemIsUsingBinds graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$SystemIsUsingBinds? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -3100,7 +3325,7 @@ class WatchOptions$Query$SystemIsUsingBinds fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQuerySystemIsUsingBinds, pollInterval: pollInterval, @@ -3156,7 +3381,7 @@ extension ClientExtension$Query$SystemIsUsingBinds on graphql.GraphQLClient { class Query$SystemIsUsingBinds$system { Query$SystemIsUsingBinds$system({ required this.info, - required this.$__typename, + this.$__typename = 'System', }); factory Query$SystemIsUsingBinds$system.fromJson(Map json) { @@ -3251,7 +3476,7 @@ class _CopyWithImpl$Query$SystemIsUsingBinds$system final TRes Function(Query$SystemIsUsingBinds$system) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? info = _undefined, @@ -3290,7 +3515,7 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system class Query$SystemIsUsingBinds$system$info { Query$SystemIsUsingBinds$system$info({ required this.usingBinds, - required this.$__typename, + this.$__typename = 'SystemInfo', }); factory Query$SystemIsUsingBinds$system$info.fromJson( @@ -3385,7 +3610,7 @@ class _CopyWithImpl$Query$SystemIsUsingBinds$system$info final TRes Function(Query$SystemIsUsingBinds$system$info) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? usingBinds = _undefined, @@ -3417,7 +3642,7 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info class Query$DomainInfo { Query$DomainInfo({ required this.system, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$DomainInfo.fromJson(Map json) { @@ -3510,7 +3735,7 @@ class _CopyWithImpl$Query$DomainInfo final TRes Function(Query$DomainInfo) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? system = _undefined, @@ -3636,6 +3861,10 @@ const documentNodeQueryDomainInfo = DocumentNode(definitions: [ ]); Query$DomainInfo _parserFn$Query$DomainInfo(Map data) => Query$DomainInfo.fromJson(data); +typedef OnQueryComplete$Query$DomainInfo = FutureOr Function( + Map?, + Query$DomainInfo?, +); class Options$Query$DomainInfo extends graphql.QueryOptions { Options$Query$DomainInfo({ @@ -3644,19 +3873,40 @@ class Options$Query$DomainInfo extends graphql.QueryOptions { graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$DomainInfo? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$DomainInfo? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$DomainInfo(data), + ), + onError: onError, document: documentNodeQueryDomainInfo, parserFn: _parserFn$Query$DomainInfo, ); + + final OnQueryComplete$Query$DomainInfo? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$DomainInfo @@ -3667,6 +3917,7 @@ class WatchOptions$Query$DomainInfo graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$DomainInfo? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -3677,7 +3928,7 @@ class WatchOptions$Query$DomainInfo fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryDomainInfo, pollInterval: pollInterval, @@ -3727,7 +3978,7 @@ extension ClientExtension$Query$DomainInfo on graphql.GraphQLClient { class Query$DomainInfo$system { Query$DomainInfo$system({ required this.domainInfo, - required this.$__typename, + this.$__typename = 'System', }); factory Query$DomainInfo$system.fromJson(Map json) { @@ -3821,7 +4072,7 @@ class _CopyWithImpl$Query$DomainInfo$system final TRes Function(Query$DomainInfo$system) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? domainInfo = _undefined, @@ -3863,7 +4114,7 @@ class Query$DomainInfo$system$domainInfo { required this.hostname, required this.provider, required this.requiredDnsRecords, - required this.$__typename, + this.$__typename = 'SystemDomainInfo', }); factory Query$DomainInfo$system$domainInfo.fromJson( @@ -4016,7 +4267,7 @@ class _CopyWithImpl$Query$DomainInfo$system$domainInfo final TRes Function(Query$DomainInfo$system$domainInfo) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? domain = _undefined, @@ -4152,7 +4403,7 @@ class _CopyWithImpl$Variables$Mutation$ChangeTimezone final TRes Function(Variables$Mutation$ChangeTimezone) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? timezone = _undefined}) => _then(Variables$Mutation$ChangeTimezone._({ @@ -4174,7 +4425,7 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone class Mutation$ChangeTimezone { Mutation$ChangeTimezone({ required this.changeTimezone, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$ChangeTimezone.fromJson(Map json) { @@ -4268,7 +4519,7 @@ class _CopyWithImpl$Mutation$ChangeTimezone final TRes Function(Mutation$ChangeTimezone) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? changeTimezone = _undefined, @@ -4367,7 +4618,7 @@ Mutation$ChangeTimezone _parserFn$Mutation$ChangeTimezone( Map data) => Mutation$ChangeTimezone.fromJson(data); typedef OnMutationCompleted$Mutation$ChangeTimezone = FutureOr Function( - dynamic, + Map?, Mutation$ChangeTimezone?, ); @@ -4380,6 +4631,7 @@ class Options$Mutation$ChangeTimezone graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$ChangeTimezone? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$ChangeTimezone? onCompleted, graphql.OnMutationUpdate? update, @@ -4391,7 +4643,7 @@ class Options$Mutation$ChangeTimezone fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4427,6 +4679,7 @@ class WatchOptions$Mutation$ChangeTimezone graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$ChangeTimezone? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4438,7 +4691,7 @@ class WatchOptions$Mutation$ChangeTimezone fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationChangeTimezone, pollInterval: pollInterval, @@ -4464,7 +4717,7 @@ class Mutation$ChangeTimezone$changeTimezone required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'TimezoneMutationReturn', this.timezone, }); @@ -4602,7 +4855,7 @@ class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone final TRes Function(Mutation$ChangeTimezone$changeTimezone) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4726,7 +4979,7 @@ class _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings final TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? settings = _undefined}) => _then(Variables$Mutation$ChangeAutoUpgradeSettings._({ @@ -4748,7 +5001,7 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings class Mutation$ChangeAutoUpgradeSettings { Mutation$ChangeAutoUpgradeSettings({ required this.changeAutoUpgradeSettings, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$ChangeAutoUpgradeSettings.fromJson( @@ -4850,7 +5103,7 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings final TRes Function(Mutation$ChangeAutoUpgradeSettings) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? changeAutoUpgradeSettings = _undefined, @@ -4965,7 +5218,7 @@ Mutation$ChangeAutoUpgradeSettings _parserFn$Mutation$ChangeAutoUpgradeSettings( Mutation$ChangeAutoUpgradeSettings.fromJson(data); typedef OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings = FutureOr Function( - dynamic, + Map?, Mutation$ChangeAutoUpgradeSettings?, ); @@ -4978,6 +5231,7 @@ class Options$Mutation$ChangeAutoUpgradeSettings graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$ChangeAutoUpgradeSettings? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompleted, graphql.OnMutationUpdate? update, @@ -4989,7 +5243,7 @@ class Options$Mutation$ChangeAutoUpgradeSettings fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5026,6 +5280,7 @@ class WatchOptions$Mutation$ChangeAutoUpgradeSettings graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$ChangeAutoUpgradeSettings? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5037,7 +5292,7 @@ class WatchOptions$Mutation$ChangeAutoUpgradeSettings fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationChangeAutoUpgradeSettings, pollInterval: pollInterval, @@ -5067,7 +5322,7 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'AutoUpgradeSettingsMutationReturn', required this.allowReboot, required this.enableAutoUpgrade, }); @@ -5229,7 +5484,7 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings final TRes Function( Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 1501d709..616788d8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; @@ -141,6 +142,177 @@ extension UtilityExtension$Fragment$basicMutationReturnFields this, (i) => i, ); + _T when<_T>({ + required _T Function( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + apiKeyMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + autoUpgradeSettingsMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) + genericJobButationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericMutationReturn) + genericMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + serviceJobMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceMutationReturn) + serviceMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + timezoneMutationReturn, + required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + + case "AutoUpgradeSettingsMutationReturn": + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + + case "DeviceApiTokenMutationReturn": + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + + case "GenericJobButationReturn": + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + + case "GenericMutationReturn": + return genericMutationReturn( + this as Fragment$basicMutationReturnFields$$GenericMutationReturn); + + case "ServiceJobMutationReturn": + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + + case "ServiceMutationReturn": + return serviceMutationReturn( + this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + + case "TimezoneMutationReturn": + return timezoneMutationReturn( + this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + + case "UserMutationReturn": + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + + default: + return orElse(); + } + } + + _T maybeWhen<_T>({ + _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? + apiKeyMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? + autoUpgradeSettingsMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? + deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? + genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? + genericMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? + serviceJobMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? + serviceMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? + timezoneMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + if (apiKeyMutationReturn != null) { + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + } else { + return orElse(); + } + + case "AutoUpgradeSettingsMutationReturn": + if (autoUpgradeSettingsMutationReturn != null) { + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + } else { + return orElse(); + } + + case "DeviceApiTokenMutationReturn": + if (deviceApiTokenMutationReturn != null) { + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + } else { + return orElse(); + } + + case "GenericJobButationReturn": + if (genericJobButationReturn != null) { + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + } else { + return orElse(); + } + + case "GenericMutationReturn": + if (genericMutationReturn != null) { + return genericMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericMutationReturn); + } else { + return orElse(); + } + + case "ServiceJobMutationReturn": + if (serviceJobMutationReturn != null) { + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + } else { + return orElse(); + } + + case "ServiceMutationReturn": + if (serviceMutationReturn != null) { + return serviceMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + } else { + return orElse(); + } + + case "TimezoneMutationReturn": + if (timezoneMutationReturn != null) { + return timezoneMutationReturn(this + as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + } else { + return orElse(); + } + + case "UserMutationReturn": + if (userMutationReturn != null) { + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + } else { + return orElse(); + } + + default: + return orElse(); + } + } } abstract class CopyWith$Fragment$basicMutationReturnFields { @@ -171,7 +343,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields final TRes Function(Fragment$basicMutationReturnFields) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -297,7 +469,7 @@ class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ApiKeyMutationReturn', }); factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( @@ -428,7 +600,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -476,7 +648,7 @@ class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'AutoUpgradeSettingsMutationReturn', }); factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( @@ -612,7 +784,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutat Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -661,7 +833,7 @@ class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', }); factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( @@ -795,7 +967,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationRe final TRes Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -843,7 +1015,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericJobButationReturn', }); factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( @@ -975,7 +1147,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn final TRes Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1023,7 +1195,7 @@ class Fragment$basicMutationReturnFields$$GenericMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( @@ -1154,7 +1326,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1202,7 +1374,7 @@ class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceJobMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( @@ -1334,7 +1506,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn final TRes Function( Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1382,7 +1554,7 @@ class Fragment$basicMutationReturnFields$$ServiceMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( @@ -1513,7 +1685,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1561,7 +1733,7 @@ class Fragment$basicMutationReturnFields$$TimezoneMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'TimezoneMutationReturn', }); factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( @@ -1693,7 +1865,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< final TRes Function( Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1741,7 +1913,7 @@ class Fragment$basicMutationReturnFields$$UserMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', }); factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( @@ -1869,7 +2041,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1913,7 +2085,7 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< class Query$AllServices { Query$AllServices({ required this.services, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$AllServices.fromJson(Map json) { @@ -2006,7 +2178,7 @@ class _CopyWithImpl$Query$AllServices final TRes Function(Query$AllServices) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? services = _undefined, @@ -2225,6 +2397,10 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [ ]); Query$AllServices _parserFn$Query$AllServices(Map data) => Query$AllServices.fromJson(data); +typedef OnQueryComplete$Query$AllServices = FutureOr Function( + Map?, + Query$AllServices?, +); class Options$Query$AllServices extends graphql.QueryOptions { @@ -2234,19 +2410,40 @@ class Options$Query$AllServices graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$AllServices? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$AllServices? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$AllServices(data), + ), + onError: onError, document: documentNodeQueryAllServices, parserFn: _parserFn$Query$AllServices, ); + + final OnQueryComplete$Query$AllServices? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$AllServices @@ -2257,6 +2454,7 @@ class WatchOptions$Query$AllServices graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$AllServices? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -2267,7 +2465,7 @@ class WatchOptions$Query$AllServices fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryAllServices, pollInterval: pollInterval, @@ -2317,7 +2515,7 @@ extension ClientExtension$Query$AllServices on graphql.GraphQLClient { class Query$AllServices$services { Query$AllServices$services({ required this.allServices, - required this.$__typename, + this.$__typename = 'Services', }); factory Query$AllServices$services.fromJson(Map json) { @@ -2426,7 +2624,7 @@ class _CopyWithImpl$Query$AllServices$services final TRes Function(Query$AllServices$services) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? allServices = _undefined, @@ -2481,7 +2679,7 @@ class Query$AllServices$services$allServices { required this.storageUsage, required this.svgIcon, this.url, - required this.$__typename, + this.$__typename = 'Service', }); factory Query$AllServices$services$allServices.fromJson( @@ -2739,7 +2937,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices final TRes Function(Query$AllServices$services$allServices) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? description = _undefined, @@ -2843,7 +3041,7 @@ class Query$AllServices$services$allServices$storageUsage { required this.title, required this.usedSpace, this.volume, - required this.$__typename, + this.$__typename = 'ServiceStorageUsage', }); factory Query$AllServices$services$allServices$storageUsage.fromJson( @@ -2976,7 +3174,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage final TRes Function(Query$AllServices$services$allServices$storageUsage) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? title = _undefined, @@ -3035,7 +3233,7 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices$storageUsage< class Query$AllServices$services$allServices$storageUsage$volume { Query$AllServices$services$allServices$storageUsage$volume({ required this.name, - required this.$__typename, + this.$__typename = 'StorageVolume', }); factory Query$AllServices$services$allServices$storageUsage$volume.fromJson( @@ -3139,7 +3337,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage$volume< final TRes Function( Query$AllServices$services$allServices$storageUsage$volume) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? name = _undefined, @@ -3249,7 +3447,7 @@ class _CopyWithImpl$Variables$Mutation$EnableService final TRes Function(Variables$Mutation$EnableService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => _then(Variables$Mutation$EnableService._({ @@ -3271,7 +3469,7 @@ class _CopyWithStubImpl$Variables$Mutation$EnableService class Mutation$EnableService { Mutation$EnableService({ required this.enableService, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$EnableService.fromJson(Map json) { @@ -3365,7 +3563,7 @@ class _CopyWithImpl$Mutation$EnableService final TRes Function(Mutation$EnableService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? enableService = _undefined, @@ -3457,7 +3655,7 @@ Mutation$EnableService _parserFn$Mutation$EnableService( Map data) => Mutation$EnableService.fromJson(data); typedef OnMutationCompleted$Mutation$EnableService = FutureOr Function( - dynamic, + Map?, Mutation$EnableService?, ); @@ -3470,6 +3668,7 @@ class Options$Mutation$EnableService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$EnableService? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$EnableService? onCompleted, graphql.OnMutationUpdate? update, @@ -3481,7 +3680,7 @@ class Options$Mutation$EnableService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -3517,6 +3716,7 @@ class WatchOptions$Mutation$EnableService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$EnableService? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -3528,7 +3728,7 @@ class WatchOptions$Mutation$EnableService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationEnableService, pollInterval: pollInterval, @@ -3554,7 +3754,7 @@ class Mutation$EnableService$enableService required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Mutation$EnableService$enableService.fromJson( @@ -3677,7 +3877,7 @@ class _CopyWithImpl$Mutation$EnableService$enableService final TRes Function(Mutation$EnableService$enableService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -3793,7 +3993,7 @@ class _CopyWithImpl$Variables$Mutation$DisableService final TRes Function(Variables$Mutation$DisableService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => _then(Variables$Mutation$DisableService._({ @@ -3815,7 +4015,7 @@ class _CopyWithStubImpl$Variables$Mutation$DisableService class Mutation$DisableService { Mutation$DisableService({ required this.disableService, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$DisableService.fromJson(Map json) { @@ -3909,7 +4109,7 @@ class _CopyWithImpl$Mutation$DisableService final TRes Function(Mutation$DisableService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? disableService = _undefined, @@ -4001,7 +4201,7 @@ Mutation$DisableService _parserFn$Mutation$DisableService( Map data) => Mutation$DisableService.fromJson(data); typedef OnMutationCompleted$Mutation$DisableService = FutureOr Function( - dynamic, + Map?, Mutation$DisableService?, ); @@ -4014,6 +4214,7 @@ class Options$Mutation$DisableService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$DisableService? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$DisableService? onCompleted, graphql.OnMutationUpdate? update, @@ -4025,7 +4226,7 @@ class Options$Mutation$DisableService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4061,6 +4262,7 @@ class WatchOptions$Mutation$DisableService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$DisableService? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4072,7 +4274,7 @@ class WatchOptions$Mutation$DisableService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationDisableService, pollInterval: pollInterval, @@ -4098,7 +4300,7 @@ class Mutation$DisableService$disableService required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Mutation$DisableService$disableService.fromJson( @@ -4221,7 +4423,7 @@ class _CopyWithImpl$Mutation$DisableService$disableService final TRes Function(Mutation$DisableService$disableService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4336,7 +4538,7 @@ class _CopyWithImpl$Variables$Mutation$StopService final TRes Function(Variables$Mutation$StopService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => _then(Variables$Mutation$StopService._({ @@ -4358,7 +4560,7 @@ class _CopyWithStubImpl$Variables$Mutation$StopService class Mutation$StopService { Mutation$StopService({ required this.stopService, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$StopService.fromJson(Map json) { @@ -4451,7 +4653,7 @@ class _CopyWithImpl$Mutation$StopService final TRes Function(Mutation$StopService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? stopService = _undefined, @@ -4543,7 +4745,7 @@ Mutation$StopService _parserFn$Mutation$StopService( Map data) => Mutation$StopService.fromJson(data); typedef OnMutationCompleted$Mutation$StopService = FutureOr Function( - dynamic, + Map?, Mutation$StopService?, ); @@ -4556,6 +4758,7 @@ class Options$Mutation$StopService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$StopService? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$StopService? onCompleted, graphql.OnMutationUpdate? update, @@ -4567,7 +4770,7 @@ class Options$Mutation$StopService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4601,6 +4804,7 @@ class WatchOptions$Mutation$StopService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$StopService? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4612,7 +4816,7 @@ class WatchOptions$Mutation$StopService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationStopService, pollInterval: pollInterval, @@ -4638,7 +4842,7 @@ class Mutation$StopService$stopService required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Mutation$StopService$stopService.fromJson(Map json) { @@ -4759,7 +4963,7 @@ class _CopyWithImpl$Mutation$StopService$stopService final TRes Function(Mutation$StopService$stopService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4874,7 +5078,7 @@ class _CopyWithImpl$Variables$Mutation$StartService final TRes Function(Variables$Mutation$StartService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => _then(Variables$Mutation$StartService._({ @@ -4896,7 +5100,7 @@ class _CopyWithStubImpl$Variables$Mutation$StartService class Mutation$StartService { Mutation$StartService({ required this.startService, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$StartService.fromJson(Map json) { @@ -4989,7 +5193,7 @@ class _CopyWithImpl$Mutation$StartService final TRes Function(Mutation$StartService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? startService = _undefined, @@ -5081,7 +5285,7 @@ Mutation$StartService _parserFn$Mutation$StartService( Map data) => Mutation$StartService.fromJson(data); typedef OnMutationCompleted$Mutation$StartService = FutureOr Function( - dynamic, + Map?, Mutation$StartService?, ); @@ -5094,6 +5298,7 @@ class Options$Mutation$StartService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$StartService? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$StartService? onCompleted, graphql.OnMutationUpdate? update, @@ -5105,7 +5310,7 @@ class Options$Mutation$StartService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5139,6 +5344,7 @@ class WatchOptions$Mutation$StartService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$StartService? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5150,7 +5356,7 @@ class WatchOptions$Mutation$StartService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationStartService, pollInterval: pollInterval, @@ -5176,7 +5382,7 @@ class Mutation$StartService$startService required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Mutation$StartService$startService.fromJson( @@ -5299,7 +5505,7 @@ class _CopyWithImpl$Mutation$StartService$startService final TRes Function(Mutation$StartService$startService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -5415,7 +5621,7 @@ class _CopyWithImpl$Variables$Mutation$RestartService final TRes Function(Variables$Mutation$RestartService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? serviceId = _undefined}) => _then(Variables$Mutation$RestartService._({ @@ -5437,7 +5643,7 @@ class _CopyWithStubImpl$Variables$Mutation$RestartService class Mutation$RestartService { Mutation$RestartService({ required this.restartService, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RestartService.fromJson(Map json) { @@ -5531,7 +5737,7 @@ class _CopyWithImpl$Mutation$RestartService final TRes Function(Mutation$RestartService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? restartService = _undefined, @@ -5623,7 +5829,7 @@ Mutation$RestartService _parserFn$Mutation$RestartService( Map data) => Mutation$RestartService.fromJson(data); typedef OnMutationCompleted$Mutation$RestartService = FutureOr Function( - dynamic, + Map?, Mutation$RestartService?, ); @@ -5636,6 +5842,7 @@ class Options$Mutation$RestartService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RestartService? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RestartService? onCompleted, graphql.OnMutationUpdate? update, @@ -5647,7 +5854,7 @@ class Options$Mutation$RestartService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5683,6 +5890,7 @@ class WatchOptions$Mutation$RestartService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RestartService? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5694,7 +5902,7 @@ class WatchOptions$Mutation$RestartService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRestartService, pollInterval: pollInterval, @@ -5720,7 +5928,7 @@ class Mutation$RestartService$restartService required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Mutation$RestartService$restartService.fromJson( @@ -5843,7 +6051,7 @@ class _CopyWithImpl$Mutation$RestartService$restartService final TRes Function(Mutation$RestartService$restartService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -5961,7 +6169,7 @@ class _CopyWithImpl$Variables$Mutation$MoveService final TRes Function(Variables$Mutation$MoveService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? input = _undefined}) => _then(Variables$Mutation$MoveService._({ @@ -5983,7 +6191,7 @@ class _CopyWithStubImpl$Variables$Mutation$MoveService class Mutation$MoveService { Mutation$MoveService({ required this.moveService, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$MoveService.fromJson(Map json) { @@ -6076,7 +6284,7 @@ class _CopyWithImpl$Mutation$MoveService final TRes Function(Mutation$MoveService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? moveService = _undefined, @@ -6260,7 +6468,7 @@ Mutation$MoveService _parserFn$Mutation$MoveService( Map data) => Mutation$MoveService.fromJson(data); typedef OnMutationCompleted$Mutation$MoveService = FutureOr Function( - dynamic, + Map?, Mutation$MoveService?, ); @@ -6273,6 +6481,7 @@ class Options$Mutation$MoveService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$MoveService? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$MoveService? onCompleted, graphql.OnMutationUpdate? update, @@ -6284,7 +6493,7 @@ class Options$Mutation$MoveService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -6318,6 +6527,7 @@ class WatchOptions$Mutation$MoveService graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$MoveService? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -6329,7 +6539,7 @@ class WatchOptions$Mutation$MoveService fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationMoveService, pollInterval: pollInterval, @@ -6355,7 +6565,7 @@ class Mutation$MoveService$moveService required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceJobMutationReturn', this.job, }); @@ -6495,7 +6705,7 @@ class _CopyWithImpl$Mutation$MoveService$moveService final TRes Function(Mutation$MoveService$moveService) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -6560,7 +6770,7 @@ class Mutation$MoveService$moveService$job { this.statusText, required this.uid, required this.updatedAt, - required this.$__typename, + this.$__typename = 'ApiJob', }); factory Mutation$MoveService$moveService$job.fromJson( @@ -6796,7 +7006,7 @@ class _CopyWithImpl$Mutation$MoveService$moveService$job final TRes Function(Mutation$MoveService$moveService$job) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? createdAt = _undefined, diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index dbc8eccc..02cde074 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -141,6 +141,177 @@ extension UtilityExtension$Fragment$basicMutationReturnFields this, (i) => i, ); + _T when<_T>({ + required _T Function( + Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) + apiKeyMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) + autoUpgradeSettingsMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) + deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericJobButationReturn) + genericJobButationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericMutationReturn) + genericMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) + serviceJobMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$ServiceMutationReturn) + serviceMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$TimezoneMutationReturn) + timezoneMutationReturn, + required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + + case "AutoUpgradeSettingsMutationReturn": + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + + case "DeviceApiTokenMutationReturn": + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + + case "GenericJobButationReturn": + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + + case "GenericMutationReturn": + return genericMutationReturn( + this as Fragment$basicMutationReturnFields$$GenericMutationReturn); + + case "ServiceJobMutationReturn": + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + + case "ServiceMutationReturn": + return serviceMutationReturn( + this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + + case "TimezoneMutationReturn": + return timezoneMutationReturn( + this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + + case "UserMutationReturn": + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + + default: + return orElse(); + } + } + + _T maybeWhen<_T>({ + _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? + apiKeyMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? + autoUpgradeSettingsMutationReturn, + _T Function( + Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? + deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? + genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? + genericMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? + serviceJobMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? + serviceMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? + timezoneMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? + userMutationReturn, + required _T Function() orElse, + }) { + switch ($__typename) { + case "ApiKeyMutationReturn": + if (apiKeyMutationReturn != null) { + return apiKeyMutationReturn( + this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); + } else { + return orElse(); + } + + case "AutoUpgradeSettingsMutationReturn": + if (autoUpgradeSettingsMutationReturn != null) { + return autoUpgradeSettingsMutationReturn(this + as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); + } else { + return orElse(); + } + + case "DeviceApiTokenMutationReturn": + if (deviceApiTokenMutationReturn != null) { + return deviceApiTokenMutationReturn(this + as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + } else { + return orElse(); + } + + case "GenericJobButationReturn": + if (genericJobButationReturn != null) { + return genericJobButationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + } else { + return orElse(); + } + + case "GenericMutationReturn": + if (genericMutationReturn != null) { + return genericMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericMutationReturn); + } else { + return orElse(); + } + + case "ServiceJobMutationReturn": + if (serviceJobMutationReturn != null) { + return serviceJobMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); + } else { + return orElse(); + } + + case "ServiceMutationReturn": + if (serviceMutationReturn != null) { + return serviceMutationReturn(this + as Fragment$basicMutationReturnFields$$ServiceMutationReturn); + } else { + return orElse(); + } + + case "TimezoneMutationReturn": + if (timezoneMutationReturn != null) { + return timezoneMutationReturn(this + as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); + } else { + return orElse(); + } + + case "UserMutationReturn": + if (userMutationReturn != null) { + return userMutationReturn( + this as Fragment$basicMutationReturnFields$$UserMutationReturn); + } else { + return orElse(); + } + + default: + return orElse(); + } + } } abstract class CopyWith$Fragment$basicMutationReturnFields { @@ -171,7 +342,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields final TRes Function(Fragment$basicMutationReturnFields) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -297,7 +468,7 @@ class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ApiKeyMutationReturn', }); factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( @@ -428,7 +599,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -476,7 +647,7 @@ class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'AutoUpgradeSettingsMutationReturn', }); factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( @@ -612,7 +783,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutat Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -661,7 +832,7 @@ class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'DeviceApiTokenMutationReturn', }); factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( @@ -795,7 +966,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationRe final TRes Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -843,7 +1014,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericJobButationReturn', }); factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( @@ -975,7 +1146,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn final TRes Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1023,7 +1194,7 @@ class Fragment$basicMutationReturnFields$$GenericMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( @@ -1154,7 +1325,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1202,7 +1373,7 @@ class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceJobMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( @@ -1334,7 +1505,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn final TRes Function( Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1382,7 +1553,7 @@ class Fragment$basicMutationReturnFields$$ServiceMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'ServiceMutationReturn', }); factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( @@ -1513,7 +1684,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1561,7 +1732,7 @@ class Fragment$basicMutationReturnFields$$TimezoneMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'TimezoneMutationReturn', }); factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( @@ -1693,7 +1864,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< final TRes Function( Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1741,7 +1912,7 @@ class Fragment$basicMutationReturnFields$$UserMutationReturn required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', }); factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( @@ -1869,7 +2040,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -1915,7 +2086,7 @@ class Fragment$userFields { required this.username, required this.userType, required this.sshKeys, - required this.$__typename, + this.$__typename = 'User', }); factory Fragment$userFields.fromJson(Map json) { @@ -2041,7 +2212,7 @@ class _CopyWithImpl$Fragment$userFields final TRes Function(Fragment$userFields) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? username = _undefined, @@ -2161,7 +2332,7 @@ extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { class Query$AllUsers { Query$AllUsers({ required this.users, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$AllUsers.fromJson(Map json) { @@ -2253,7 +2424,7 @@ class _CopyWithImpl$Query$AllUsers final TRes Function(Query$AllUsers) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? users = _undefined, @@ -2369,6 +2540,10 @@ const documentNodeQueryAllUsers = DocumentNode(definitions: [ ]); Query$AllUsers _parserFn$Query$AllUsers(Map data) => Query$AllUsers.fromJson(data); +typedef OnQueryComplete$Query$AllUsers = FutureOr Function( + Map?, + Query$AllUsers?, +); class Options$Query$AllUsers extends graphql.QueryOptions { Options$Query$AllUsers({ @@ -2377,19 +2552,40 @@ class Options$Query$AllUsers extends graphql.QueryOptions { graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$AllUsers? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$AllUsers? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$AllUsers(data), + ), + onError: onError, document: documentNodeQueryAllUsers, parserFn: _parserFn$Query$AllUsers, ); + + final OnQueryComplete$Query$AllUsers? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$AllUsers @@ -2400,6 +2596,7 @@ class WatchOptions$Query$AllUsers graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$AllUsers? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -2410,7 +2607,7 @@ class WatchOptions$Query$AllUsers fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryAllUsers, pollInterval: pollInterval, @@ -2460,7 +2657,7 @@ class Query$AllUsers$users { Query$AllUsers$users({ required this.allUsers, this.rootUser, - required this.$__typename, + this.$__typename = 'Users', }); factory Query$AllUsers$users.fromJson(Map json) { @@ -2581,7 +2778,7 @@ class _CopyWithImpl$Query$AllUsers$users final TRes Function(Query$AllUsers$users) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? allUsers = _undefined, @@ -2712,7 +2909,7 @@ class _CopyWithImpl$Variables$Query$GetUser final TRes Function(Variables$Query$GetUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser._({ @@ -2734,7 +2931,7 @@ class _CopyWithStubImpl$Variables$Query$GetUser class Query$GetUser { Query$GetUser({ required this.users, - required this.$__typename, + this.$__typename = 'Query', }); factory Query$GetUser.fromJson(Map json) { @@ -2825,7 +3022,7 @@ class _CopyWithImpl$Query$GetUser final TRes Function(Query$GetUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? users = _undefined, @@ -2929,6 +3126,10 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ ]); Query$GetUser _parserFn$Query$GetUser(Map data) => Query$GetUser.fromJson(data); +typedef OnQueryComplete$Query$GetUser = FutureOr Function( + Map?, + Query$GetUser?, +); class Options$Query$GetUser extends graphql.QueryOptions { Options$Query$GetUser({ @@ -2938,20 +3139,41 @@ class Options$Query$GetUser extends graphql.QueryOptions { graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetUser? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, - }) : super( + OnQueryComplete$Query$GetUser? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( variables: variables.toJson(), operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null ? null : _parserFn$Query$GetUser(data), + ), + onError: onError, document: documentNodeQueryGetUser, parserFn: _parserFn$Query$GetUser, ); + + final OnQueryComplete$Query$GetUser? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; } class WatchOptions$Query$GetUser @@ -2963,6 +3185,7 @@ class WatchOptions$Query$GetUser graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Query$GetUser? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -2974,7 +3197,7 @@ class WatchOptions$Query$GetUser fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryGetUser, pollInterval: pollInterval, @@ -3034,7 +3257,7 @@ extension ClientExtension$Query$GetUser on graphql.GraphQLClient { class Query$GetUser$users { Query$GetUser$users({ this.getUser, - required this.$__typename, + this.$__typename = 'Users', }); factory Query$GetUser$users.fromJson(Map json) { @@ -3128,7 +3351,7 @@ class _CopyWithImpl$Query$GetUser$users final TRes Function(Query$GetUser$users) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? getUser = _undefined, @@ -3245,7 +3468,7 @@ class _CopyWithImpl$Variables$Mutation$CreateUser final TRes Function(Variables$Mutation$CreateUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? user = _undefined}) => _then(Variables$Mutation$CreateUser._({ @@ -3267,7 +3490,7 @@ class _CopyWithStubImpl$Variables$Mutation$CreateUser class Mutation$CreateUser { Mutation$CreateUser({ required this.createUser, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$CreateUser.fromJson(Map json) { @@ -3360,7 +3583,7 @@ class _CopyWithImpl$Mutation$CreateUser final TRes Function(Mutation$CreateUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? createUser = _undefined, @@ -3471,7 +3694,7 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( - dynamic, + Map?, Mutation$CreateUser?, ); @@ -3484,6 +3707,7 @@ class Options$Mutation$CreateUser graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$CreateUser? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$CreateUser? onCompleted, graphql.OnMutationUpdate? update, @@ -3495,7 +3719,7 @@ class Options$Mutation$CreateUser fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -3529,6 +3753,7 @@ class WatchOptions$Mutation$CreateUser graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$CreateUser? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -3540,7 +3765,7 @@ class WatchOptions$Mutation$CreateUser fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationCreateUser, pollInterval: pollInterval, @@ -3566,7 +3791,7 @@ class Mutation$CreateUser$createUser required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', this.user, }); @@ -3705,7 +3930,7 @@ class _CopyWithImpl$Mutation$CreateUser$createUser final TRes Function(Mutation$CreateUser$createUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -3833,7 +4058,7 @@ class _CopyWithImpl$Variables$Mutation$DeleteUser final TRes Function(Variables$Mutation$DeleteUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? username = _undefined}) => _then(Variables$Mutation$DeleteUser._({ @@ -3855,7 +4080,7 @@ class _CopyWithStubImpl$Variables$Mutation$DeleteUser class Mutation$DeleteUser { Mutation$DeleteUser({ required this.deleteUser, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$DeleteUser.fromJson(Map json) { @@ -3948,7 +4173,7 @@ class _CopyWithImpl$Mutation$DeleteUser final TRes Function(Mutation$DeleteUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? deleteUser = _undefined, @@ -4039,7 +4264,7 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => Mutation$DeleteUser.fromJson(data); typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( - dynamic, + Map?, Mutation$DeleteUser?, ); @@ -4052,6 +4277,7 @@ class Options$Mutation$DeleteUser graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$DeleteUser? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$DeleteUser? onCompleted, graphql.OnMutationUpdate? update, @@ -4063,7 +4289,7 @@ class Options$Mutation$DeleteUser fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4097,6 +4323,7 @@ class WatchOptions$Mutation$DeleteUser graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$DeleteUser? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4108,7 +4335,7 @@ class WatchOptions$Mutation$DeleteUser fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationDeleteUser, pollInterval: pollInterval, @@ -4134,7 +4361,7 @@ class Mutation$DeleteUser$deleteUser required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'GenericMutationReturn', }); factory Mutation$DeleteUser$deleteUser.fromJson(Map json) { @@ -4255,7 +4482,7 @@ class _CopyWithImpl$Mutation$DeleteUser$deleteUser final TRes Function(Mutation$DeleteUser$deleteUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4373,7 +4600,7 @@ class _CopyWithImpl$Variables$Mutation$UpdateUser final TRes Function(Variables$Mutation$UpdateUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? user = _undefined}) => _then(Variables$Mutation$UpdateUser._({ @@ -4395,7 +4622,7 @@ class _CopyWithStubImpl$Variables$Mutation$UpdateUser class Mutation$UpdateUser { Mutation$UpdateUser({ required this.updateUser, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$UpdateUser.fromJson(Map json) { @@ -4488,7 +4715,7 @@ class _CopyWithImpl$Mutation$UpdateUser final TRes Function(Mutation$UpdateUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? updateUser = _undefined, @@ -4599,7 +4826,7 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( - dynamic, + Map?, Mutation$UpdateUser?, ); @@ -4612,6 +4839,7 @@ class Options$Mutation$UpdateUser graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$UpdateUser? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$UpdateUser? onCompleted, graphql.OnMutationUpdate? update, @@ -4623,7 +4851,7 @@ class Options$Mutation$UpdateUser fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -4657,6 +4885,7 @@ class WatchOptions$Mutation$UpdateUser graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$UpdateUser? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -4668,7 +4897,7 @@ class WatchOptions$Mutation$UpdateUser fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationUpdateUser, pollInterval: pollInterval, @@ -4694,7 +4923,7 @@ class Mutation$UpdateUser$updateUser required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', this.user, }); @@ -4833,7 +5062,7 @@ class _CopyWithImpl$Mutation$UpdateUser$updateUser final TRes Function(Mutation$UpdateUser$updateUser) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -4964,7 +5193,7 @@ class _CopyWithImpl$Variables$Mutation$AddSshKey final TRes Function(Variables$Mutation$AddSshKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? sshInput = _undefined}) => _then(Variables$Mutation$AddSshKey._({ @@ -4986,7 +5215,7 @@ class _CopyWithStubImpl$Variables$Mutation$AddSshKey class Mutation$AddSshKey { Mutation$AddSshKey({ required this.addSshKey, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$AddSshKey.fromJson(Map json) { @@ -5079,7 +5308,7 @@ class _CopyWithImpl$Mutation$AddSshKey final TRes Function(Mutation$AddSshKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? addSshKey = _undefined, @@ -5190,7 +5419,7 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => Mutation$AddSshKey.fromJson(data); typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( - dynamic, + Map?, Mutation$AddSshKey?, ); @@ -5203,6 +5432,7 @@ class Options$Mutation$AddSshKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$AddSshKey? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$AddSshKey? onCompleted, graphql.OnMutationUpdate? update, @@ -5214,7 +5444,7 @@ class Options$Mutation$AddSshKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5248,6 +5478,7 @@ class WatchOptions$Mutation$AddSshKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$AddSshKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5259,7 +5490,7 @@ class WatchOptions$Mutation$AddSshKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationAddSshKey, pollInterval: pollInterval, @@ -5285,7 +5516,7 @@ class Mutation$AddSshKey$addSshKey required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', this.user, }); @@ -5424,7 +5655,7 @@ class _CopyWithImpl$Mutation$AddSshKey$addSshKey final TRes Function(Mutation$AddSshKey$addSshKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, @@ -5555,7 +5786,7 @@ class _CopyWithImpl$Variables$Mutation$RemoveSshKey final TRes Function(Variables$Mutation$RemoveSshKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({Object? sshInput = _undefined}) => _then(Variables$Mutation$RemoveSshKey._({ @@ -5577,7 +5808,7 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey class Mutation$RemoveSshKey { Mutation$RemoveSshKey({ required this.removeSshKey, - required this.$__typename, + this.$__typename = 'Mutation', }); factory Mutation$RemoveSshKey.fromJson(Map json) { @@ -5670,7 +5901,7 @@ class _CopyWithImpl$Mutation$RemoveSshKey final TRes Function(Mutation$RemoveSshKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? removeSshKey = _undefined, @@ -5782,7 +6013,7 @@ Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( Map data) => Mutation$RemoveSshKey.fromJson(data); typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( - dynamic, + Map?, Mutation$RemoveSshKey?, ); @@ -5795,6 +6026,7 @@ class Options$Mutation$RemoveSshKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RemoveSshKey? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, graphql.OnMutationUpdate? update, @@ -5806,7 +6038,7 @@ class Options$Mutation$RemoveSshKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null @@ -5840,6 +6072,7 @@ class WatchOptions$Mutation$RemoveSshKey graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, + Mutation$RemoveSshKey? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, @@ -5851,7 +6084,7 @@ class WatchOptions$Mutation$RemoveSshKey fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, - optimisticResult: optimisticResult, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationRemoveSshKey, pollInterval: pollInterval, @@ -5877,7 +6110,7 @@ class Mutation$RemoveSshKey$removeSshKey required this.code, required this.message, required this.success, - required this.$__typename, + this.$__typename = 'UserMutationReturn', this.user, }); @@ -6018,7 +6251,7 @@ class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey final TRes Function(Mutation$RemoveSshKey$removeSshKey) _then; - static const _undefined = {}; + static const _undefined = {}; TRes call({ Object? code = _undefined, diff --git a/lib/logic/api_maps/rest_maps/api_map.dart b/lib/logic/api_maps/rest_maps/api_map.dart index 299837fa..86f53e25 100644 --- a/lib/logic/api_maps/rest_maps/api_map.dart +++ b/lib/logic/api_maps/rest_maps/api_map.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'dart:developer'; import 'dart:io'; -import 'package:dio/adapter.dart'; import 'package:dio/dio.dart'; +import 'package:dio/io.dart'; import 'package:pretty_dio_logger/pretty_dio_logger.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; @@ -15,7 +15,7 @@ abstract class ApiMap { dio.interceptors.add(PrettyDioLogger()); } dio.interceptors.add(ConsoleInterceptor()); - (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = + (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (final HttpClient client) { client.badCertificateCallback = (final X509Certificate cert, final String host, final int port) => diff --git a/lib/main.dart b/lib/main.dart index b6e1dc31..e6358ba7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,12 +1,11 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/theming/factory/app_theme_factory.dart'; import 'package:selfprivacy/ui/router/router.dart'; -import 'package:wakelock/wakelock.dart'; +// import 'package:wakelock/wakelock.dart'; import 'package:timezone/data/latest.dart' as tz; import 'package:selfprivacy/config/bloc_config.dart'; @@ -20,13 +19,13 @@ void main() async { await HiveConfig.init(); // await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); - try { - /// Wakelock support for Linux - /// desktop is not yet implemented - await Wakelock.enable(); - } on PlatformException catch (e) { - print(e); - } + // try { + // /// Wakelock support for Linux + // /// desktop is not yet implemented + // await Wakelock.enable(); + // } on PlatformException catch (e) { + // print(e); + // } await getItSetup(); await EasyLocalization.ensureInitialized(); diff --git a/lib/ui/components/list_tiles/log_list_tile.dart b/lib/ui/components/list_tiles/log_list_tile.dart index 88505d8f..76bc6150 100644 --- a/lib/ui/components/list_tiles/log_list_tile.dart +++ b/lib/ui/components/list_tiles/log_list_tile.dart @@ -68,12 +68,13 @@ class _RestApiRequestMessageItem extends StatelessWidget { ), actions: [ // A button to copy the request to the clipboard - TextButton( - onPressed: () { - Clipboard.setData(ClipboardData(text: message.text)); - }, - child: Text('console_page.copy'.tr()), - ), + if (message.text != null) + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text ?? '')); + }, + child: Text('console_page.copy'.tr()), + ), TextButton( onPressed: () => Navigator.of(context).pop(), child: Text('basis.close'.tr()), @@ -117,12 +118,13 @@ class _RestApiResponseMessageItem extends StatelessWidget { ), actions: [ // A button to copy the request to the clipboard - TextButton( - onPressed: () { - Clipboard.setData(ClipboardData(text: message.text)); - }, - child: Text('console_page.copy'.tr()), - ), + if (message.text != null) + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text ?? '')); + }, + child: Text('console_page.copy'.tr()), + ), TextButton( onPressed: () => Navigator.of(context).pop(), child: Text('basis.close'.tr()), @@ -190,12 +192,13 @@ class _GraphQlResponseMessageItem extends StatelessWidget { ), actions: [ // A button to copy the request to the clipboard - TextButton( - onPressed: () { - Clipboard.setData(ClipboardData(text: message.text)); - }, - child: Text('console_page.copy'.tr()), - ), + if (message.text != null) + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text ?? '')); + }, + child: Text('console_page.copy'.tr()), + ), TextButton( onPressed: () => Navigator.of(context).pop(), child: Text('basis.close'.tr()), @@ -258,12 +261,13 @@ class _GraphQlRequestMessageItem extends StatelessWidget { ), actions: [ // A button to copy the request to the clipboard - TextButton( - onPressed: () { - Clipboard.setData(ClipboardData(text: message.text)); - }, - child: Text('console_page.copy'.tr()), - ), + if (message.text != null) + TextButton( + onPressed: () { + Clipboard.setData(ClipboardData(text: message.text ?? '')); + }, + child: Text('console_page.copy'.tr()), + ), TextButton( onPressed: () => Navigator.of(context).pop(), child: Text('basis.close'.tr()), diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 749fbdc9..54ca532c 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -11,7 +11,6 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cu import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; import 'package:selfprivacy/ui/components/drawers/progress_drawer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; diff --git a/lib/ui/router/router.dart b/lib/ui/router/router.dart index 23a4ec0e..af0743ca 100644 --- a/lib/ui/router/router.dart +++ b/lib/ui/router/router.dart @@ -46,7 +46,8 @@ Widget fadeThroughTransition( replaceInRouteName: 'Page|Screen|Routing,Route', ) class RootRouter extends _$RootRouter { - RootRouter(GlobalKey super.navigatorKey); + RootRouter(final GlobalKey navigatorKey) + : super(navigatorKey: navigatorKey); @override RouteType get defaultRouteType => const RouteType.material(); diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index 675056f3..a4e919b6 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -10,20 +10,57 @@ part of 'router.dart'; abstract class _$RootRouter extends RootStackRouter { - _$RootRouter([GlobalKey? navigatorKey]) : super(navigatorKey); + // ignore: unused_element + _$RootRouter({super.navigatorKey}); @override final Map pagesMap = { - BackupDetailsRoute.name: (routeData) { + AppSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const BackupDetailsPage(), + child: const AppSettingsPage(), ); }, - RootRoute.name: (routeData) { + DeveloperSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: WrappedRoute(child: const RootPage()), + child: const DeveloperSettingsPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), + ); + }, + ProvidersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ProvidersPage(), + ); + }, + ServerDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServerDetailsScreen(), ); }, ServiceRoute.name: (routeData) { @@ -42,12 +79,6 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, - ServerDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServerDetailsScreen(), - ); - }, UsersRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -70,46 +101,10 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - AppSettingsRoute.name: (routeData) { + BackupDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AppSettingsPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - MoreRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const MorePage(), - ); - }, - AboutApplicationRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AboutApplicationPage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - ProvidersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ProvidersPage(), - ); - }, - RecoveryKeyRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryKeyPage(), + child: const BackupDetailsPage(), ); }, DnsDetailsRoute.name: (routeData) { @@ -130,12 +125,26 @@ abstract class _$RootRouter extends RootStackRouter { child: const InitializingPage(), ); }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); + RecoveryKeyRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: ServerStoragePage( + child: const RecoveryKeyPage(), + ); + }, + DevicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DevicesScreen(), + ); + }, + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServicesMigrationPage( + services: args.services, diskStatus: args.diskStatus, + isMigration: args.isMigration, key: args.key, ), ); @@ -151,57 +160,133 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - ServicesMigrationRoute.name: (routeData) { - final args = routeData.argsAs(); + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: ServicesMigrationPage( - services: args.services, + child: ServerStoragePage( diskStatus: args.diskStatus, - isMigration: args.isMigration, key: args.key, ), ); }, - DevicesRoute.name: (routeData) { + RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const DevicesScreen(), - ); - }, - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), + child: WrappedRoute(child: const RootPage()), ); }, }; } /// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) +/// [AppSettingsPage] +class AppSettingsRoute extends PageRouteInfo { + const AppSettingsRoute({List? children}) : super( - BackupDetailsRoute.name, + AppSettingsRoute.name, initialChildren: children, ); - static const String name = 'BackupDetailsRoute'; + static const String name = 'AppSettingsRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) +/// [DeveloperSettingsPage] +class DeveloperSettingsRoute extends PageRouteInfo { + const DeveloperSettingsRoute({List? children}) : super( - RootRoute.name, + DeveloperSettingsRoute.name, initialChildren: children, ); - static const String name = 'RootRoute'; + static const String name = 'DeveloperSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute({List? children}) + : super( + ConsoleRoute.name, + initialChildren: children, + ); + + static const String name = 'ConsoleRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute({List? children}) + : super( + MoreRoute.name, + initialChildren: children, + ); + + static const String name = 'MoreRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ProvidersPage] +class ProvidersRoute extends PageRouteInfo { + const ProvidersRoute({List? children}) + : super( + ProvidersRoute.name, + initialChildren: children, + ); + + static const String name = 'ProvidersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) + : super( + ServerDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'ServerDetailsRoute'; static const PageInfo page = PageInfo(name); } @@ -258,20 +343,6 @@ class ServicesRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) - : super( - ServerDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'ServerDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [UsersPage] class UsersRoute extends PageRouteInfo { @@ -339,99 +410,15 @@ class UserDetailsRouteArgs { } /// generated route for -/// [AppSettingsPage] -class AppSettingsRoute extends PageRouteInfo { - const AppSettingsRoute({List? children}) +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) : super( - AppSettingsRoute.name, + BackupDetailsRoute.name, initialChildren: children, ); - static const String name = 'AppSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DeveloperSettingsPage] -class DeveloperSettingsRoute extends PageRouteInfo { - const DeveloperSettingsRoute({List? children}) - : super( - DeveloperSettingsRoute.name, - initialChildren: children, - ); - - static const String name = 'DeveloperSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [MorePage] -class MoreRoute extends PageRouteInfo { - const MoreRoute({List? children}) - : super( - MoreRoute.name, - initialChildren: children, - ); - - static const String name = 'MoreRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) - : super( - AboutApplicationRoute.name, - initialChildren: children, - ); - - static const String name = 'AboutApplicationRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ConsolePage] -class ConsoleRoute extends PageRouteInfo { - const ConsoleRoute({List? children}) - : super( - ConsoleRoute.name, - initialChildren: children, - ); - - static const String name = 'ConsoleRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ProvidersPage] -class ProvidersRoute extends PageRouteInfo { - const ProvidersRoute({List? children}) - : super( - ProvidersRoute.name, - initialChildren: children, - ); - - static const String name = 'ProvidersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [RecoveryKeyPage] -class RecoveryKeyRoute extends PageRouteInfo { - const RecoveryKeyRoute({List? children}) - : super( - RecoveryKeyRoute.name, - initialChildren: children, - ); - - static const String name = 'RecoveryKeyRoute'; + static const String name = 'BackupDetailsRoute'; static const PageInfo page = PageInfo(name); } @@ -479,84 +466,31 @@ class InitializingRoute extends PageRouteInfo { } /// generated route for -/// [ServerStoragePage] -class ServerStorageRoute extends PageRouteInfo { - ServerStorageRoute({ - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ServerStorageRoute.name, - args: ServerStorageRouteArgs( - diskStatus: diskStatus, - key: key, - ), +/// [RecoveryKeyPage] +class RecoveryKeyRoute extends PageRouteInfo { + const RecoveryKeyRoute({List? children}) + : super( + RecoveryKeyRoute.name, initialChildren: children, ); - static const String name = 'ServerStorageRoute'; + static const String name = 'RecoveryKeyRoute'; - static const PageInfo page = - PageInfo(name); -} - -class ServerStorageRouteArgs { - const ServerStorageRouteArgs({ - required this.diskStatus, - this.key, - }); - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; - } + static const PageInfo page = PageInfo(name); } /// generated route for -/// [ExtendingVolumePage] -class ExtendingVolumeRoute extends PageRouteInfo { - ExtendingVolumeRoute({ - required DiskVolume diskVolumeToResize, - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ExtendingVolumeRoute.name, - args: ExtendingVolumeRouteArgs( - diskVolumeToResize: diskVolumeToResize, - diskStatus: diskStatus, - key: key, - ), +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) + : super( + DevicesRoute.name, initialChildren: children, ); - static const String name = 'ExtendingVolumeRoute'; + static const String name = 'DevicesRoute'; - static const PageInfo page = - PageInfo(name); -} - -class ExtendingVolumeRouteArgs { - const ExtendingVolumeRouteArgs({ - required this.diskVolumeToResize, - required this.diskStatus, - this.key, - }); - - final DiskVolume diskVolumeToResize; - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; - } + static const PageInfo page = PageInfo(name); } /// generated route for @@ -608,29 +542,96 @@ class ServicesMigrationRouteArgs { } /// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) - : super( - DevicesRoute.name, +/// [ExtendingVolumePage] +class ExtendingVolumeRoute extends PageRouteInfo { + ExtendingVolumeRoute({ + required DiskVolume diskVolumeToResize, + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ExtendingVolumeRoute.name, + args: ExtendingVolumeRouteArgs( + diskVolumeToResize: diskVolumeToResize, + diskStatus: diskStatus, + key: key, + ), initialChildren: children, ); - static const String name = 'DevicesRoute'; + static const String name = 'ExtendingVolumeRoute'; - static const PageInfo page = PageInfo(name); + static const PageInfo page = + PageInfo(name); +} + +class ExtendingVolumeRouteArgs { + const ExtendingVolumeRouteArgs({ + required this.diskVolumeToResize, + required this.diskStatus, + this.key, + }); + + final DiskVolume diskVolumeToResize; + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; + } } /// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) - : super( - OnboardingRoute.name, +/// [ServerStoragePage] +class ServerStorageRoute extends PageRouteInfo { + ServerStorageRoute({ + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ServerStorageRoute.name, + args: ServerStorageRouteArgs( + diskStatus: diskStatus, + key: key, + ), initialChildren: children, ); - static const String name = 'OnboardingRoute'; + static const String name = 'ServerStorageRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServerStorageRouteArgs { + const ServerStorageRouteArgs({ + required this.diskStatus, + this.key, + }); + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; + } +} + +/// generated route for +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) + : super( + RootRoute.name, + initialChildren: children, + ); + + static const String name = 'RootRoute'; static const PageInfo page = PageInfo(name); } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 6140a508..13f6db44 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -13,7 +13,6 @@ import package_info import path_provider_foundation import shared_preferences_foundation import url_launcher_macos -import wakelock_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) @@ -24,5 +23,4 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) - WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 61417bab..bd81200b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "0c80aeab9bc807ab10022cd3b2f4cf2ecdf231949dc1ddd9442406a003f19201" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a url: "https://pub.dev" source: hosted - version: "52.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: cd8ee83568a77f3ae6b913a36093a1c9b1264e7cb7f834d9ddd2311dade9c1f4 + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.13.0" animations: dependency: "direct main" description: @@ -45,26 +45,26 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" auto_route: dependency: "direct main" description: name: auto_route - sha256: "70b2461cc58d6a46c20859f23148b370165da183d21a82b783156f9a91d9c38b" + sha256: cf6cda303fd98608426fa429692a04f643146f981b1c0ac1033e3f0e11a1ed9c url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "7.3.2" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: a3f11c3b1e6e884d1592924f3b7212855f1c7c8791c12d3b41b87ab81fb9d3b8 + sha256: d0555913cc54153c38b1dd4f69e0d6a623818ca7195e7c1437901d52b2596eec url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "7.1.1" auto_size_text: dependency: "direct main" description: @@ -77,18 +77,18 @@ packages: dependency: "direct main" description: name: basic_utils - sha256: "3e86a17d2aafbd52ef69c0dc8936b1bc7bd91bcd8fa1c0d222d13ca2f6d000bb" + sha256: "8815477fcf58499e42326bd858e391442425fa57db9a45e48e15224c62049262" url: "https://pub.dev" source: hosted - version: "5.4.2" + version: "5.5.4" bloc: dependency: transitive description: name: bloc - sha256: bd4f8027bfa60d96c8046dec5ce74c463b2c918dce1b0d36593575995344534a + sha256: "3820f15f502372d979121de1f6b97bfcf1630ebff8fe1d52fb2b0bfa49be5b49" url: "https://pub.dev" source: hosted - version: "8.1.0" + version: "8.1.2" boolean_selector: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.0" build_resolvers: dependency: transitive description: @@ -133,10 +133,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + sha256: "220ae4553e50d7c21a17c051afc7b183d28a24a420502e842f303f8e4e6edced" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.4" build_runner_core: dependency: transitive description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: @@ -177,6 +177,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.2" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + url: "https://pub.dev" + source: hosted + version: "0.4.0" clock: dependency: transitive description: @@ -197,10 +205,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" connectivity_plus: dependency: transitive description: @@ -237,10 +245,10 @@ packages: dependency: "direct main" description: name: crypt - sha256: c12682393cc6aae221e278692d8a433e188db2064b7de5daa253fd62ccfa096f + sha256: fef2b24f8fb73b626224b207b2e57ac139d38b63dc7428257f820a2fd9e4688b url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "4.3.0" crypto: dependency: transitive description: @@ -277,10 +285,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: "7ff671ed0a6356fa8f2e1ae7d3558d3fb7b6a41e24455e4f8df75b811fb8e4ab" + sha256: "2c35b6d1682b028e42d07b3aee4b98fa62996c10bc12cb651ec856a80d6a761b" url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "9.0.2" device_info_plus_platform_interface: dependency: transitive description: @@ -293,26 +301,26 @@ packages: dependency: "direct main" description: name: dio - sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + sha256: "347d56c26d63519552ef9a569f2a593dda99a81fdbdff13c584b7197cfe05059" url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "5.1.2" dynamic_color: dependency: "direct main" description: name: dynamic_color - sha256: c4a508284b14ec4dda5adba2c28b2cdd34fbae1afead7e8c52cad87d51c5405b + sha256: "74dff1435a695887ca64899b8990004f8d1232b0e84bfc4faa1fdda7c6f57cc1" url: "https://pub.dev" source: hosted - version: "1.6.2" + version: "1.6.5" easy_localization: dependency: "direct main" description: name: easy_localization - sha256: "6a2e99fa0bfe5765bf4c6ca9b137d5de2c75593007178c5e4cd2ae985f870080" + sha256: "30ebf25448ffe169e0bd9bc4b5da94faa8398967a2ad2ca09f438be8b6953645" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" easy_logger: dependency: transitive description: @@ -381,10 +389,10 @@ packages: dependency: "direct main" description: name: fl_chart - sha256: "29da130cdef13f47e1798a66e99fd119e557c293b98be8ebaf6fed2cbc43bf29" + sha256: "48a1b69be9544e2b03d9a8e843affd89e43f3194c9248776222efcb4206bb1ec" url: "https://pub.dev" source: hosted - version: "0.50.6" + version: "0.62.0" flutter: dependency: "direct main" description: flutter @@ -394,10 +402,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: "890c51c8007f0182360e523518a0c732efb89876cb4669307af7efada5b55557" + sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae url: "https://pub.dev" source: hosted - version: "8.1.1" + version: "8.1.3" flutter_hooks: dependency: transitive description: @@ -410,10 +418,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "559c600f056e7c704bd843723c21e01b5fba47e8824bd02422165bcc02a5de1d" + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" url: "https://pub.dev" source: hosted - version: "0.9.3" + version: "0.13.1" flutter_lints: dependency: "direct dev" description: @@ -431,10 +439,10 @@ packages: dependency: "direct main" description: name: flutter_markdown - sha256: "818cf6c28377ba2c91ed283c96fd712e9c175dd2d2488eb7fc93b6afb9ad2e08" + sha256: "7b25c10de1fea883f3c4f9b8389506b54053cd00807beab69fd65c8653a2711f" url: "https://pub.dev" source: hosted - version: "0.6.13+1" + version: "0.6.14" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -447,26 +455,26 @@ packages: dependency: "direct main" description: name: flutter_secure_storage - sha256: f2afec1f1762c040a349ea2a588e32f442da5d0db3494a52a929a97c9e550bc5 + sha256: "98352186ee7ad3639ccc77ad7924b773ff6883076ab952437d20f18a61f0a7c5" url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "8.0.0" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - sha256: "736436adaf91552433823f51ce22e098c2f0551db06b6596f58597a25b8ea797" + sha256: "0912ae29a572230ad52d8a4697e5518d7f0f429052fd51df7e5a7952c7efe2a3" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.3" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - sha256: ff0768a6700ea1d9620e03518e2e25eac86a8bd07ca3556e9617bfa5ace4bd00 + sha256: "083add01847fc1c80a07a08e1ed6927e9acd9618a35e330239d4422cd2a58c50" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.0" flutter_secure_storage_platform_interface: dependency: transitive description: @@ -487,18 +495,18 @@ packages: dependency: transitive description: name: flutter_secure_storage_windows - sha256: ca89c8059cf439985aa83c59619b3674c7ef6cc2e86943d169a7369d6a69cab5 + sha256: fc2910ec9b28d60598216c29ea763b3a96c401f0ce1d13cdf69ccb0e5c93c3ee url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "2.0.0" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: f999d84ad2efda1c4c3956e7968b713b3a24b06f0a0e4798e844e16bbb9bb70b + sha256: "6ff8c902c8056af9736de2689f63f81c42e2d642b9f4c79dbf8790ae48b63012" url: "https://pub.dev" source: hosted - version: "2.0.0+1" + version: "2.0.6" flutter_test: dependency: "direct dev" description: flutter @@ -521,10 +529,10 @@ packages: dependency: "direct main" description: name: get_it - sha256: "290fde3a86072e4b37dbb03c07bec6126f0ecc28dad403c12ffe2e5a2d751ab7" + sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468" url: "https://pub.dev" source: hosted - version: "7.2.0" + version: "7.6.0" glob: dependency: transitive description: @@ -537,90 +545,90 @@ packages: dependency: "direct main" description: name: gql - sha256: "0db9fcebe50d919ff7d872b70f035722771b0789cdee17c8aa27e850445592a9" + sha256: "7dd48a2632103154186bf77adb850489efdabe65c05313eab784657df800794a" url: "https://pub.dev" source: hosted - version: "0.14.1-alpha+1672756470474" + version: "1.0.1-alpha+1682715291314" gql_code_builder: dependency: transitive description: name: gql_code_builder - sha256: "654fc5f455938d721f88631ce2e0d9350058bc6e965a22df6dd5668c72cd19c0" + sha256: "6e386a85f5d91daae82915337f566a43dfeb0a0df38caa372387fbc07d31b8c1" url: "https://pub.dev" source: hosted - version: "0.6.1-alpha+1667318637890" + version: "0.7.2" gql_dedupe_link: dependency: transitive description: name: gql_dedupe_link - sha256: "89681048cf956348e865da872a40081499b8c087fc84dd4d4b9c134bd70d27b3" + sha256: "2c76b1006cd7445e026d3bc46c6336f28cbcf3711326f128839cfc746f9e2ec9" url: "https://pub.dev" source: hosted - version: "2.0.3+1" + version: "2.0.4-alpha+1682715291398" gql_error_link: dependency: transitive description: name: gql_error_link - sha256: e7bfdd2b6232f3e15861cd96c2ad6b7c9c94693843b3dea18295136a5fb5b534 + sha256: bfdb543137da89448cc5d003fd029c2e8718931d39d4a7dedb16f9169862fbb9 url: "https://pub.dev" source: hosted - version: "0.2.3+1" + version: "1.0.0" gql_exec: dependency: transitive description: name: gql_exec - sha256: "0d1fdb2e4154efbfc1dcf3f35ec36d19c8428ff0d560eb4c45b354f8f871dc50" + sha256: "07f73f4edc00698f67c3fb5bda0d95ab7e6ea844572a670ef270154244fae6d4" url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "1.0.1-alpha+1682715291324" gql_http_link: dependency: transitive description: name: gql_http_link - sha256: "89ef87b32947acf4189f564c095f1148b0ab9bb9996fe518716dbad66708b834" + sha256: "365c0e72da7e29e007c4a0ed7a470f6c03af1ef00acd2af3c22157c8bb47f314" url: "https://pub.dev" source: hosted - version: "0.4.5" + version: "1.0.0" gql_link: dependency: transitive description: name: gql_link - sha256: f7973279126bc922d465c4f4da6ed93d187085e597b3480f5e14e74d28fe14bd + sha256: ee781e59527240adf69e044389a7d0a19b890a6e76b6dfff969ef56ba8d4fea7 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.0.1-alpha+1682715291332" gql_transform_link: dependency: transitive description: name: gql_transform_link - sha256: b1735a9a92d25a92960002a8b40dfaede95ec1e5ed848906125d69efd878661f + sha256: "0645fdd874ca1be695fd327271fdfb24c0cd6fa40774a64b946062f321a59709" url: "https://pub.dev" source: hosted - version: "0.2.2+1" + version: "1.0.0" graphql: dependency: "direct main" description: name: graphql - sha256: b061201579040e9548cec2bae17bbdea0ab30666cb4e7ba48b9675f14d982199 + sha256: f2529e2f606f445bbb38b92c6eb18dd4c11196ca638421fe5aaab62140ac3106 url: "https://pub.dev" source: hosted - version: "5.1.3" + version: "5.2.0-beta.3" graphql_codegen: dependency: "direct main" description: name: graphql_codegen - sha256: d8b5b70f3d0c6db6eec6e610185604a128fb275943543036cbce3f606d49cd77 + sha256: "773dce58e9bce208a8694badc1af9fe39870bb2cb18078474ba5c2b6a535f87c" url: "https://pub.dev" source: hosted - version: "0.12.0-beta.7" + version: "0.13.0" graphql_flutter: dependency: "direct main" description: name: graphql_flutter - sha256: "06059ac9e8417c71582f05e28a59b1416d43959d34a6a0d9565341e3a362e117" + sha256: "9de0365b58c8733130a706e9fddb33f6791d9bbbee45e1cd1bc2ca0920941a19" url: "https://pub.dev" source: hosted - version: "5.1.2" + version: "5.2.0-beta.3" graphs: dependency: transitive description: @@ -681,18 +689,18 @@ packages: dependency: transitive description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.0.17" intl: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.18.0" io: dependency: transitive description: @@ -713,26 +721,26 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: "direct main" description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.8.1" json_serializable: dependency: "direct dev" description: name: json_serializable - sha256: dadc08bd61f72559f938dd08ec20dbfec6c709bba83515085ea943d2078d187a + sha256: "61a60716544392a82726dd0fa1dd6f5f1fd32aec66422b6e229e7b90d52325c4" url: "https://pub.dev" source: hosted - version: "6.6.1" + version: "6.7.0" lints: dependency: transitive description: @@ -745,10 +753,10 @@ packages: dependency: "direct main" description: name: local_auth - sha256: "8cea55dca20d1e0efa5480df2d47ae30851e7a24cb8e7d225be7e67ae8485aa4" + sha256: "0cf238be2bfa51a6c9e7e9cfc11c05ea39f2a3a4d3e5bb255d0ebc917da24401" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.6" local_auth_android: dependency: transitive description: @@ -793,10 +801,10 @@ packages: dependency: transitive description: name: markdown - sha256: c2b81e184067b41d0264d514f7cdaa2c02d38511e39d6521a1ccc238f6d7b3f2 + sha256: "8e332924094383133cee218b676871f42db2514f1f6ac617b6cf6152a7faab8e" url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "7.1.0" mask_text_input_formatter: dependency: transitive description: @@ -809,10 +817,10 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: "direct main" description: @@ -825,10 +833,10 @@ packages: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: @@ -881,10 +889,10 @@ packages: dependency: transitive description: name: normalize - sha256: baf8caf2d8b745af5737cca6c24f7fe3cf3158897fdbcde9a909b9c8d3e2e5af + sha256: "8a60e37de5b608eeaf9b839273370c71ebba445e9f73b08eee7725e0d92dbc43" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.8.2+1" package_config: dependency: transitive description: @@ -905,10 +913,10 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" path_parsing: dependency: transitive description: @@ -961,18 +969,18 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.6" petitparser: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.4.0" platform: dependency: transitive description: @@ -993,10 +1001,10 @@ packages: dependency: transitive description: name: pointycastle - sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" url: "https://pub.dev" source: hosted - version: "3.6.2" + version: "3.7.3" pool: dependency: transitive description: @@ -1009,10 +1017,10 @@ packages: dependency: "direct main" description: name: pretty_dio_logger - sha256: "948f7eeb36e7aa0760b51c1a8e3331d4b21e36fabd39efca81f585ed93893544" + sha256: "00b80053063935cf9a6190da344c5373b9d0e92da4c944c878ff2fbef0ef6dc2" url: "https://pub.dev" source: hosted - version: "1.2.0-beta-1" + version: "1.3.1" process: dependency: transitive description: @@ -1033,10 +1041,10 @@ packages: dependency: "direct main" description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: @@ -1158,10 +1166,10 @@ packages: dependency: transitive description: name: source_gen - sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" url: "https://pub.dev" source: hosted - version: "1.2.7" + version: "1.3.2" source_helper: dependency: transitive description: @@ -1238,34 +1246,34 @@ packages: dependency: transitive description: name: test - sha256: a5fcd2d25eeadbb6589e80198a47d6a464ba3e2049da473943b8af9797900c2d + sha256: "3dac9aecf2c3991d09b9cdde4f98ded7b30804a88a0d7e4e7e1678e78d6b97f4" url: "https://pub.dev" source: hosted - version: "1.22.0" + version: "1.24.1" test_api: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.1" test_core: dependency: transitive description: name: test_core - sha256: "0ef9755ec6d746951ba0aabe62f874b707690b5ede0fecc818b138fcc9b14888" + sha256: "5138dbffb77b2289ecb12b81c11ba46036590b72a64a7a90d6ffb880f1a29e93" url: "https://pub.dev" source: hosted - version: "0.4.20" + version: "0.5.1" timezone: dependency: "direct main" description: name: timezone - sha256: "24c8fcdd49a805d95777a39064862133ff816ebfffe0ceff110fb5960e557964" + sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" url: "https://pub.dev" source: hosted - version: "0.9.1" + version: "0.9.2" timing: dependency: transitive description: @@ -1286,10 +1294,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "698fa0b4392effdc73e9e184403b627362eb5fbf904483ac9defbb1c2191d809" + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 url: "https://pub.dev" source: hosted - version: "6.1.8" + version: "6.1.11" url_launcher_android: dependency: transitive description: @@ -1358,26 +1366,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "09562ef5f47aa84f6567495adb6b9cb2a3192b82c352623b8bd00b300d62603b" + sha256: b96f10cbdfcbd03a65758633a43e7d04574438f059b1043104b5d61b23d38a4f url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.6" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "886e57742644ebed024dc3ade29712e37eea1b03d294fb314c0a3386243fe5a6" + sha256: "57a8e6e24662a3bdfe3b3d61257db91768700c0b8f844e235877b56480f31c69" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.6" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "5d9010c4a292766c55395b2288532579a85673f8148460d1e233d98ffe10d24e" + sha256: "7430f5d834d0db4560d7b19863362cd892f1e52b43838553a3c5cdfc9ab28e5b" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.6" vector_math: dependency: transitive description: @@ -1394,46 +1402,6 @@ packages: url: "https://pub.dev" source: hosted version: "9.4.0" - wakelock: - dependency: "direct main" - description: - name: wakelock - sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" - url: "https://pub.dev" - source: hosted - version: "0.6.2" - wakelock_macos: - dependency: transitive - description: - name: wakelock_macos - sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" - url: "https://pub.dev" - source: hosted - version: "0.4.0" - wakelock_platform_interface: - dependency: transitive - description: - name: wakelock_platform_interface - sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" - url: "https://pub.dev" - source: hosted - version: "0.3.0" - wakelock_web: - dependency: transitive - description: - name: wakelock_web - sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" - url: "https://pub.dev" - source: hosted - version: "0.4.0" - wakelock_windows: - dependency: transitive - description: - name: wakelock_windows - sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" - url: "https://pub.dev" - source: hosted - version: "0.2.1" watcher: dependency: transitive description: @@ -1446,10 +1414,10 @@ packages: dependency: transitive description: name: web_socket_channel - sha256: "3a969ddcc204a3e34e863d204b29c0752716f78b6f9cc8235083208d268a4ccd" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" webkit_inspection_protocol: dependency: transitive description: @@ -1462,10 +1430,18 @@ packages: dependency: transitive description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "4.1.4" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "1c52f994bdccb77103a6231ad4ea331a244dbcef5d1f37d8462f713143b0bfae" + url: "https://pub.dev" + source: hosted + version: "1.1.0" xdg_directories: dependency: transitive description: @@ -1478,10 +1454,10 @@ packages: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.3.0" yaml: dependency: transitive description: @@ -1491,5 +1467,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <3.0.0" - flutter: ">=3.7.0" + dart: ">=3.0.2 <4.0.0" + flutter: ">=3.10.2" diff --git a/pubspec.yaml b/pubspec.yaml index 2055494c..b0554aba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,60 +4,61 @@ publish_to: 'none' version: 0.8.0+17 environment: - sdk: '>=2.19.0 <3.0.0' - flutter: ">=3.7.0" + sdk: '>=3.0.2 <4.0.0' + flutter: ">=3.10.2" dependencies: animations: ^2.0.7 - auto_route: ^6.0.1 + auto_route: ^7.3.2 auto_size_text: ^3.0.0 - basic_utils: ^5.4.2 - crypt: ^4.2.1 + basic_utils: ^5.5.4 + crypt: ^4.3.0 cubit_form: ^2.0.1 - device_info_plus: ^8.0.0 - dio: ^4.0.4 - dynamic_color: ^1.6.2 - easy_localization: ^3.0.1 + device_info_plus: ^9.0.2 + dio: ^5.1.2 + dynamic_color: ^1.6.5 + easy_localization: ^3.0.2 either_option: ^2.0.1-dev.1 equatable: ^2.0.5 - fl_chart: ^0.50.1 + fl_chart: ^0.62.0 flutter: sdk: flutter - flutter_bloc: ^8.1.1 - flutter_markdown: ^0.6.13+1 - flutter_secure_storage: ^7.0.1 - flutter_svg: ^2.0.0+1 - get_it: ^7.2.0 - gql: ^0.14.0 + flutter_bloc: ^8.1.3 + flutter_markdown: ^0.6.14 + flutter_secure_storage: ^8.0.0 + flutter_svg: ^2.0.6 + get_it: ^7.6.0 + gql: ^1.0.0 graphql: ^5.1.2 - graphql_codegen: ^0.12.0-beta.7 + graphql_codegen: ^0.13.0 graphql_flutter: ^5.1.2 hive: ^2.2.3 hive_flutter: ^1.1.0 http: ^0.13.5 - intl: ^0.17.0 + intl: ^0.18.0 ionicons: ^0.2.2 - json_annotation: ^4.8.0 - local_auth: ^2.1.3 + json_annotation: ^4.8.1 + local_auth: ^2.1.6 material_color_utilities: ^0.2.0 modal_bottom_sheet: ^3.0.0-pre nanoid: ^1.0.0 package_info: ^2.0.2 - pretty_dio_logger: ^1.2.0-beta-1 + pretty_dio_logger: ^1.3.1 provider: ^6.0.5 - pub_semver: ^2.1.3 - timezone: ^0.9.1 - url_launcher: ^6.1.8 - wakelock: ^0.6.2 + pub_semver: ^2.1.4 + timezone: ^0.9.2 + url_launcher: ^6.1.11 + # TODO: Developer is not available, update later. +# wakelock: ^0.6.2 dev_dependencies: - auto_route_generator: ^6.0.0 + auto_route_generator: ^7.1.1 flutter_test: sdk: flutter - build_runner: ^2.3.3 - flutter_launcher_icons: ^0.9.2 + build_runner: ^2.4.4 + flutter_launcher_icons: ^0.13.1 hive_generator: ^2.0.0 - json_serializable: ^6.6.1 + json_serializable: ^6.7.0 flutter_lints: ^2.0.1 flutter_icons: From 370cbf105269d3f838bff573f19058c5d808049f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 30 May 2023 20:52:42 +0300 Subject: [PATCH 503/732] fix(ui): Button margins --- lib/ui/components/buttons/brand_button.dart | 4 +++- .../components/buttons/outlined_button.dart | 4 +++- .../setup/initializing/initializing.dart | 23 ++++++++----------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/ui/components/buttons/brand_button.dart b/lib/ui/components/buttons/brand_button.dart index 12c7c132..a07a1de0 100644 --- a/lib/ui/components/buttons/brand_button.dart +++ b/lib/ui/components/buttons/brand_button.dart @@ -32,12 +32,14 @@ class BrandButton { assert(text != null || child != null, 'required title or child'); return ConstrainedBox( constraints: const BoxConstraints( - minHeight: 40, minWidth: double.infinity, ), child: FilledButton( key: key, onPressed: onPressed, + style: ElevatedButton.styleFrom( + tapTargetSize: MaterialTapTargetSize.padded, + ), child: child ?? Text(text ?? ''), ), ); diff --git a/lib/ui/components/buttons/outlined_button.dart b/lib/ui/components/buttons/outlined_button.dart index 22a954e1..306d1085 100644 --- a/lib/ui/components/buttons/outlined_button.dart +++ b/lib/ui/components/buttons/outlined_button.dart @@ -17,11 +17,13 @@ class BrandOutlinedButton extends StatelessWidget { @override Widget build(final BuildContext context) => ConstrainedBox( constraints: const BoxConstraints( - minHeight: 40, minWidth: double.infinity, ), child: OutlinedButton( onPressed: onPressed, + style: OutlinedButton.styleFrom( + tapTargetSize: MaterialTapTargetSize.padded, + ), child: child ?? Text( title ?? '', diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 54ca532c..a9f9f337 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -12,6 +12,7 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_ import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; +import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/drawers/progress_drawer.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; @@ -133,20 +134,16 @@ class InitializingPage extends StatelessWidget { }, ), ), - ConstrainedBox( - constraints: const BoxConstraints( - minWidth: double.infinity, - ), - child: OutlinedButton( - child: Text( - cubit.state is ServerInstallationFinished - ? 'basis.close'.tr() - : 'basis.later'.tr(), - ), - onPressed: () { - context.router.popUntilRoot(); - }, + // const SizedBox(height: 8), + BrandOutlinedButton( + child: Text( + cubit.state is ServerInstallationFinished + ? 'basis.close'.tr() + : 'basis.later'.tr(), ), + onPressed: () { + context.router.popUntilRoot(); + }, ), ], ), From f55800cd729cb55e5d3b890de92142ce2398fa57 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 31 May 2023 23:12:45 -0300 Subject: [PATCH 504/732] fix: Implement better domain id check on DNS restoration --- .../server_installation_repository.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index bc92f645..bee112f9 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -190,7 +190,16 @@ class ServerInstallationRepository { ), ); - final String? domainId = await dnsProviderApi.getZoneId(domain); + /// TODO: nvm it's because only Cloudflare uses Zone + /// for other providers we need to implement a different kind of + /// functionality here... but it's on refactoring, let it be here for now. + final APIGenericResult apiResponse = + await dnsProviderApi.isApiTokenValid(token); + + String? domainId; + if (apiResponse.success && apiResponse.data) { + domainId = await dnsProviderApi.getZoneId(domain); + } return domainId; } From f81bf968fdda69bacf264652c9efdff94799ae1d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Jun 2023 01:36:33 -0300 Subject: [PATCH 505/732] fix: Add forced JSON content type to REST APIs --- .../rest_maps/dns_providers/cloudflare/cloudflare_api.dart | 6 +++++- .../api_maps/rest_maps/dns_providers/desec/desec_api.dart | 6 +++++- .../digital_ocean_dns/digital_ocean_dns_api.dart | 6 +++++- .../server_providers/digital_ocean/digital_ocean_api.dart | 6 +++++- .../rest_maps/server_providers/hetzner/hetzner_api.dart | 6 +++++- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index ad3fd460..50ecd7a7 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -21,7 +21,11 @@ class CloudflareApi extends DnsProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().dnsProviderKey; assert(token != null); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index db24707a..f8915c5a 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -21,7 +21,11 @@ class DesecApi extends DnsProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().dnsProviderKey; assert(token != null); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 42274a88..a6927e24 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -24,7 +24,11 @@ class DigitalOceanDnsApi extends DnsProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().dnsProviderKey; assert(token != null); diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 990a06e4..2a4153c1 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -25,7 +25,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().serverProviderKey; assert(token != null); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index d09cce18..4fdd18da 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -27,7 +27,11 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().serverProviderKey; assert(token != null); From 3a40b5ed323e045e7297eb9472dbe9e59225dee1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Jun 2023 02:15:13 -0300 Subject: [PATCH 506/732] fix: Add missing DNS providers to different installation steps --- .../providers/server_providers/hetzner.dart | 3 + .../initializing/dns_provider_picker.dart | 58 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index ad6f4d4a..ce0bd416 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -398,6 +398,9 @@ class HetznerServerProvider extends ServerProvider { case DnsProviderType.digitalOcean: dnsProviderType = 'DIGITALOCEAN'; break; + case DnsProviderType.desec: + dnsProviderType = 'DESEC'; + break; case DnsProviderType.cloudflare: default: dnsProviderType = 'CLOUDFLARE'; diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index e7407cf2..889367fa 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -174,6 +174,8 @@ class ProviderSelectionPage extends StatelessWidget { width: double.infinity, child: Column( crossAxisAlignment: CrossAxisAlignment.start, + + /// TODO: Remove obvious repetition children: [ Text( 'initializing.select_dns'.tr(), @@ -295,6 +297,62 @@ class ProviderSelectionPage extends StatelessWidget { ), ), ), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 1, 126, 251), + ), + child: SvgPicture.asset( + 'assets/images/logos/digital_ocean.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Digital Ocean', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProviderType.digitalOcean); + callback(DnsProviderType.digitalOcean); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchUrlString('https://cloud.digitalocean.com/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), ], ), ); From 040fc43e1f5513c9cf11d9f0a45bf18bf2949c3d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Jun 2023 02:44:34 -0300 Subject: [PATCH 507/732] fix: Add DNS provider type to provider classes to fix wrong domain type --- .../cubit/forms/setup/initializing/domain_setup_cubit.dart | 5 +++-- lib/logic/providers/dns_providers/cloudflare.dart | 3 +++ lib/logic/providers/dns_providers/desec.dart | 3 +++ lib/logic/providers/dns_providers/digital_ocean_dns.dart | 3 +++ lib/logic/providers/dns_providers/dns_provider.dart | 1 + lib/logic/providers/server_providers/digital_ocean.dart | 3 +++ lib/logic/providers/server_providers/hetzner.dart | 3 +++ lib/logic/providers/server_providers/server_provider.dart | 1 + 8 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index 1437a6e2..8c66deb7 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -28,14 +28,15 @@ class DomainSetupCubit extends Cubit { emit(Loading(LoadingTypes.saving)); + final dnsProvider = ProvidersController.currentDnsProvider!; final GenericResult zoneIdResult = - await ProvidersController.currentDnsProvider!.getZoneId(domainName); + await dnsProvider.getZoneId(domainName); if (zoneIdResult.success || zoneIdResult.data != null) { final ServerDomain domain = ServerDomain( domainName: domainName, zoneId: zoneIdResult.data!, - provider: DnsProviderType.cloudflare, + provider: dnsProvider.type, ); serverInstallationCubit.setDomain(domain); diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index bd01b240..1f53761d 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -29,6 +29,9 @@ class CloudflareDnsProvider extends DnsProvider { ApiAdapter _adapter; + @override + DnsProviderType get type => DnsProviderType.cloudflare; + @override Future> tryInitApiByToken(final String token) async { final api = _adapter.api(getInitialized: false); diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index fe09fd3c..7111c0ba 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -29,6 +29,9 @@ class DesecDnsProvider extends DnsProvider { ApiAdapter _adapter; + @override + DnsProviderType get type => DnsProviderType.desec; + @override Future> tryInitApiByToken(final String token) async { final api = _adapter.api(getInitialized: false); diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index ca34ad16..b231c414 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -29,6 +29,9 @@ class DigitalOceanDnsProvider extends DnsProvider { ApiAdapter _adapter; + @override + DnsProviderType get type => DnsProviderType.digitalOcean; + @override Future> tryInitApiByToken(final String token) async { final api = _adapter.api(getInitialized: false); diff --git a/lib/logic/providers/dns_providers/dns_provider.dart b/lib/logic/providers/dns_providers/dns_provider.dart index 14e31c32..60976f68 100644 --- a/lib/logic/providers/dns_providers/dns_provider.dart +++ b/lib/logic/providers/dns_providers/dns_provider.dart @@ -5,6 +5,7 @@ import 'package:selfprivacy/logic/models/json/dns_records.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; abstract class DnsProvider { + DnsProviderType get type; Future> tryInitApiByToken(final String token); Future> getZoneId(final String domain); Future> removeDomainRecords({ diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 01b27ef1..a745434d 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -46,6 +46,9 @@ class DigitalOceanServerProvider extends ServerProvider { ApiAdapter _adapter; + @override + ServerProviderType get type => ServerProviderType.digitalOcean; + @override Future> trySetServerLocation( final String location, diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index ce0bd416..7bacb8a2 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -47,6 +47,9 @@ class HetznerServerProvider extends ServerProvider { ApiAdapter _adapter; + @override + ServerProviderType get type => ServerProviderType.hetzner; + @override Future> trySetServerLocation( final String location, diff --git a/lib/logic/providers/server_providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart index ffb64e12..f1004192 100644 --- a/lib/logic/providers/server_providers/server_provider.dart +++ b/lib/logic/providers/server_providers/server_provider.dart @@ -14,6 +14,7 @@ export 'package:selfprivacy/logic/api_maps/generic_result.dart'; export 'package:selfprivacy/logic/models/launch_installation_data.dart'; abstract class ServerProvider { + ServerProviderType get type; Future>> getServers(); Future> trySetServerLocation(final String location); Future> tryInitApiByToken(final String token); From 4da4ed6afd653048acc29c46e9de379856a94325 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 2 Jun 2023 19:04:23 -0300 Subject: [PATCH 508/732] feat: Move current installation dialogue error to installation state --- .../server_installation_cubit.dart | 29 +++---------------- .../server_installation_repository.dart | 1 + .../server_installation_state.dart | 18 +++++++++++- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 4a011248..6fa7d569 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -19,7 +19,6 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_repository.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; export 'package:provider/provider.dart'; @@ -256,31 +255,11 @@ class ServerInstallationCubit extends Cubit { ); if (!result.success && result.data != null) { - CallbackDialogueBranching branching = result.data!; - //while (!dialoguesResolved) { - showPopUpAlert( - alertTitle: branching.title, - description: branching.description, - actionButtonTitle: branching.choices[1].title, - actionButtonOnPressed: () async { - final branchingResult = await branching.choices[1].callback!(); - if (branchingResult.data == null) { - return; - } - - branching = branchingResult.data!; - }, - cancelButtonTitle: branching.choices[0].title, - cancelButtonOnPressed: () async { - final branchingResult = await branching.choices[0].callback!(); - if (branchingResult.data == null) { - return; - } - - branching = branchingResult.data!; - }, + emit( + (state as ServerInstallationNotFinished).copyWith( + installationDialoguePopUp: result.data, + ), ); - //} } } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 9b3fa46b..9444718e 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -79,6 +79,7 @@ class ServerInstallationRepository { if (box.get(BNames.hasFinalChecked, defaultValue: false)) { StagingOptions.verifyCertificate = true; return ServerInstallationFinished( + installationDialoguePopUp: null, providerApiToken: providerApiToken!, serverTypeIdentificator: serverTypeIdentificator ?? '', dnsApiToken: dnsApiToken!, diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 5ceaafdd..c6356c36 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -12,6 +12,7 @@ abstract class ServerInstallationState extends Equatable { required this.isServerStarted, required this.isServerResetedFirstTime, required this.isServerResetedSecondTime, + required this.installationDialoguePopUp, }); @override @@ -25,6 +26,7 @@ abstract class ServerInstallationState extends Equatable { serverDetails, isServerStarted, isServerResetedFirstTime, + installationDialoguePopUp ]; final String? providerApiToken; @@ -37,6 +39,7 @@ abstract class ServerInstallationState extends Equatable { final bool isServerStarted; final bool isServerResetedFirstTime; final bool isServerResetedSecondTime; + final CallbackDialogueBranching? installationDialoguePopUp; bool get isServerProviderApiKeyFilled => providerApiToken != null; bool get isServerTypeFilled => serverTypeIdentificator != null; @@ -96,6 +99,7 @@ class TimerState extends ServerInstallationNotFinished { isServerResetedFirstTime: dataState.isServerResetedFirstTime, isServerResetedSecondTime: dataState.isServerResetedSecondTime, dnsMatches: dataState.dnsMatches, + installationDialoguePopUp: dataState.installationDialoguePopUp, ); final ServerInstallationNotFinished dataState; @@ -138,6 +142,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { super.serverDomain, super.rootUser, super.serverDetails, + super.installationDialoguePopUp, }); final bool isLoading; final Map? dnsMatches; @@ -155,6 +160,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { isServerResetedFirstTime, isLoading, dnsMatches, + installationDialoguePopUp, ]; ServerInstallationNotFinished copyWith({ @@ -170,6 +176,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { final bool? isServerResetedSecondTime, final bool? isLoading, final Map? dnsMatches, + final CallbackDialogueBranching? installationDialoguePopUp, }) => ServerInstallationNotFinished( providerApiToken: providerApiToken ?? this.providerApiToken, @@ -187,6 +194,8 @@ class ServerInstallationNotFinished extends ServerInstallationState { isServerResetedSecondTime ?? this.isServerResetedSecondTime, isLoading: isLoading ?? this.isLoading, dnsMatches: dnsMatches ?? this.dnsMatches, + installationDialoguePopUp: + installationDialoguePopUp ?? this.installationDialoguePopUp, ); ServerInstallationFinished finish() => ServerInstallationFinished( @@ -200,6 +209,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { isServerStarted: isServerStarted, isServerResetedFirstTime: isServerResetedFirstTime, isServerResetedSecondTime: isServerResetedSecondTime, + installationDialoguePopUp: installationDialoguePopUp, ); } @@ -218,6 +228,7 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { isServerResetedSecondTime: false, isLoading: false, dnsMatches: null, + installationDialoguePopUp: null, ); } @@ -233,6 +244,7 @@ class ServerInstallationFinished extends ServerInstallationState { required super.isServerStarted, required super.isServerResetedFirstTime, required super.isServerResetedSecondTime, + required super.installationDialoguePopUp, }); @override @@ -246,6 +258,7 @@ class ServerInstallationFinished extends ServerInstallationState { serverDetails, isServerStarted, isServerResetedFirstTime, + installationDialoguePopUp, ]; } @@ -287,6 +300,7 @@ class ServerInstallationRecovery extends ServerInstallationState { isServerStarted: true, isServerResetedFirstTime: true, isServerResetedSecondTime: true, + installationDialoguePopUp: null, ); final RecoveryStep currentStep; final ServerRecoveryCapabilities recoveryCapabilities; @@ -302,7 +316,8 @@ class ServerInstallationRecovery extends ServerInstallationState { serverDetails, isServerStarted, isServerResetedFirstTime, - currentStep + currentStep, + installationDialoguePopUp ]; ServerInstallationRecovery copyWith({ @@ -340,5 +355,6 @@ class ServerInstallationRecovery extends ServerInstallationState { isServerStarted: true, isServerResetedFirstTime: true, isServerResetedSecondTime: true, + installationDialoguePopUp: null, ); } From a690fb5089ec74e497831714f428c6e2404a11f5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 5 Jun 2023 09:46:42 -0300 Subject: [PATCH 509/732] fix: Force JSON content-type for REST API requests --- lib/logic/api_maps/rest_maps/backblaze.dart | 6 +++++- .../rest_maps/dns_providers/cloudflare/cloudflare.dart | 6 +++++- lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart | 6 +++++- .../server_providers/digital_ocean/digital_ocean.dart | 6 +++++- .../rest_maps/server_providers/hetzner/hetzner.dart | 6 +++++- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index 8ea94803..59292775 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -30,7 +30,11 @@ class BackblazeApi extends ApiMap { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart index eb22e4d8..f594029f 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare.dart @@ -26,7 +26,11 @@ class CloudflareApi extends DnsProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().dnsProviderKey; assert(token != null); diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart index c1a8f43b..e8192cb9 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec.dart @@ -26,7 +26,11 @@ class DesecApi extends DnsProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().dnsProviderKey; assert(token != null); diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart index 21861dd8..81b7a9fb 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean.dart @@ -36,7 +36,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().serverProviderKey; assert(token != null); diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index c2228030..372722fa 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -37,7 +37,11 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final String? token = getIt().serverProviderKey; assert(token != null); From 29cbf702e5c22b899e4860626f0291ac5bcf89fe Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 5 Jun 2023 11:18:41 -0300 Subject: [PATCH 510/732] fix: Remove unneded DNS check depending on CLOUDFLARE --- .../server_installation_repository.dart | 53 +++++-------------- 1 file changed, 13 insertions(+), 40 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index bee112f9..b3b80b3f 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -23,7 +23,6 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; @@ -208,46 +207,20 @@ class ServerInstallationRepository { final String? ip4, final Map skippedMatches, ) async { - final List addresses = [ - '$domainName', - 'api.$domainName', - 'cloud.$domainName', - 'meet.$domainName', - 'password.$domainName' - ]; - final Map matches = {}; - - for (final String address in addresses) { - if (skippedMatches[address] ?? false) { - matches[address] = true; - continue; - } - final List? lookupRecordRes = await DnsUtils.lookupRecord( - address, - RRecordType.A, - provider: DnsApiProvider.CLOUDFLARE, - ); - getIt.get().addMessage( - Message( - text: - 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', - ), - ); - getIt.get().addMessage( - Message( - text: - 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', - ), - ); - if (lookupRecordRes == null || - lookupRecordRes.isEmpty || - lookupRecordRes[0].data != ip4) { - matches[address] = false; - } else { - matches[address] = true; - } - } + await InternetAddress.lookup(domainName!).then( + (final records) { + for (final record in records) { + if (skippedMatches[record.host] ?? false) { + matches[record.host] = true; + continue; + } + if (record.address == ip4!) { + matches[record.host] = true; + } + } + }, + ); return matches; } From 53c56e6bd443d712616df060d824176833c600ec Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 5 Jun 2023 12:14:54 -0300 Subject: [PATCH 511/732] feat: Remove basic_utils dependency Replace it with InternetAddress from dart:io --- .../server_installation_repository.dart | 16 +++++++++------- pubspec.lock | 8 -------- pubspec.yaml | 1 - 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index b3b80b3f..c138a340 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:basic_utils/basic_utils.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -451,15 +450,18 @@ class ServerInstallationRepository { } Future getServerIpFromDomain(final ServerDomain serverDomain) async { - final List? lookup = await DnsUtils.lookupRecord( - serverDomain.domainName, - RRecordType.A, - provider: DnsApiProvider.CLOUDFLARE, + String? domain; + await InternetAddress.lookup(serverDomain.domainName).then( + (final records) { + for (final record in records) { + domain = record.address; + } + }, ); - if (lookup == null || lookup.isEmpty) { + if (domain == null || domain!.isEmpty) { throw IpNotFoundException('No IP found for domain $serverDomain'); } - return lookup[0].data; + return domain!; } Future getDeviceName() async { diff --git a/pubspec.lock b/pubspec.lock index bd81200b..d812a890 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -73,14 +73,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.0" - basic_utils: - dependency: "direct main" - description: - name: basic_utils - sha256: "8815477fcf58499e42326bd858e391442425fa57db9a45e48e15224c62049262" - url: "https://pub.dev" - source: hosted - version: "5.5.4" bloc: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b0554aba..4e5e35d7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,6 @@ dependencies: animations: ^2.0.7 auto_route: ^7.3.2 auto_size_text: ^3.0.0 - basic_utils: ^5.5.4 crypt: ^4.3.0 cubit_form: ^2.0.1 device_info_plus: ^9.0.2 From ffa13aee04d6f5e9a6acb813acabc1bd79200b60 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 6 Jun 2023 23:35:57 -0300 Subject: [PATCH 512/732] chore: Implement HetznerVolume model and use it instead dynamic json --- .../server_providers/hetzner/hetzner_api.dart | 6 ++-- .../models/json/hetzner_server_info.dart | 21 ++++++++++++ .../models/json/hetzner_server_info.g.dart | 18 ++++++++++ .../providers/server_providers/hetzner.dart | 33 ++++++++----------- 4 files changed, 57 insertions(+), 21 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 4fdd18da..abfc488b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -131,8 +131,9 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future createVolume() async { + Future> createVolume() async { Response? createVolumeResponse; + HetznerVolume? volume; final Dio client = await getClient(); try { createVolumeResponse = await client.post( @@ -146,6 +147,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'format': 'ext4' }, ); + volume = HetznerVolume.fromJson(createVolumeResponse.data); } catch (e) { print(e); return GenericResult( @@ -158,7 +160,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } return GenericResult( - data: createVolumeResponse.data, + data: volume, success: true, code: createVolumeResponse.statusCode, message: createVolumeResponse.statusMessage, diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index 6e28f1cf..31d60509 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -113,3 +113,24 @@ class HetznerLocation { static HetznerLocation fromJson(final Map json) => _$HetznerLocationFromJson(json); } + +@JsonSerializable() +class HetznerVolume { + HetznerVolume( + this.id, + this.sizeByte, + this.serverId, + this.name, + this.linuxDevice, + ); + final int id; + final int sizeByte; + final int? serverId; + final String name; + + @JsonKey(name: 'linux_device') + final String? linuxDevice; + + static HetznerVolume fromJson(final Map json) => + _$HetznerVolumeFromJson(json); +} diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart index 5201a1c5..7cc08abc 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -119,3 +119,21 @@ Map _$HetznerLocationToJson(HetznerLocation instance) => 'description': instance.description, 'network_zone': instance.zone, }; + +HetznerVolume _$HetznerVolumeFromJson(Map json) => + HetznerVolume( + json['id'] as int, + json['sizeByte'] as int, + json['serverId'] as int?, + json['name'] as String, + json['linux_device'] as String?, + ); + +Map _$HetznerVolumeToJson(HetznerVolume instance) => + { + 'id': instance.id, + 'sizeByte': instance.sizeByte, + 'serverId': instance.serverId, + 'name': instance.name, + 'linux_device': instance.linuxDevice, + }; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 7bacb8a2..fae15b5b 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -441,7 +441,7 @@ class HetznerServerProvider extends ServerProvider { ); } - final volume = volumeResult.data['volume']; + final volume = volumeResult.data!; final serverApiToken = StringGenerators.apiToken(); final hostname = getHostnameFromDomain( installationData.serverDomain.domainName, @@ -455,7 +455,7 @@ class HetznerServerProvider extends ServerProvider { dnsProviderType: dnsProviderToInfectName(installationData.dnsProviderType), hostName: hostname, - volumeId: volume['id'], + volumeId: volume.id, base64Password: base64.encode( utf8.encode(installationData.rootUser.password ?? 'PASS'), ), @@ -464,7 +464,7 @@ class HetznerServerProvider extends ServerProvider { ); if (!serverResult.success || serverResult.data == null) { - await _adapter.api().deleteVolume(volume['id']); + await _adapter.api().deleteVolume(volume.id); await Future.delayed(const Duration(seconds: 5)); if (serverResult.message != null && serverResult.message == 'uniqueness_error') { @@ -530,11 +530,11 @@ class HetznerServerProvider extends ServerProvider { ip4: serverResult.data['server']['public_net']['ipv4']['ip'], createTime: DateTime.now(), volume: ServerVolume( - id: volume['id'], - name: volume['name'], - sizeByte: volume['size'], - serverId: volume['server'], - linuxDevice: volume['linux_device'], + id: volume.id, + name: volume.name, + sizeByte: volume.sizeByte, + serverId: volume.serverId, + linuxDevice: volume.linuxDevice, ), apiToken: serverApiToken, provider: ServerProviderType.hetzner, @@ -564,7 +564,7 @@ class HetznerServerProvider extends ServerProvider { CallbackDialogueChoice( title: 'modals.try_again'.tr(), callback: () async { - await _adapter.api().deleteVolume(volume['id']); + await _adapter.api().deleteVolume(volume.id); await Future.delayed(const Duration(seconds: 5)); final deletion = await deleteServer(hostname); if (deletion.success) { @@ -673,17 +673,12 @@ class HetznerServerProvider extends ServerProvider { } try { - final volumeId = result.data['volume']['id']; - final volumeSize = result.data['volume']['size']; - final volumeServer = result.data['volume']['server']; - final volumeName = result.data['volume']['name']; - final volumeDevice = result.data['volume']['linux_device']; volume = ServerVolume( - id: volumeId, - name: volumeName, - sizeByte: volumeSize, - serverId: volumeServer, - linuxDevice: volumeDevice, + id: result.data!.id, + name: result.data!.name, + sizeByte: result.data!.sizeByte, + serverId: result.data!.serverId, + linuxDevice: result.data!.linuxDevice, ); } catch (e) { print(e); From 2a66d246c76a24c9a5fe963ccdbf46884413b12f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 7 Jun 2023 00:03:34 -0300 Subject: [PATCH 513/732] chore: Replace dynamic blobs with HetznerServerType --- .../server_providers/hetzner/hetzner_api.dart | 48 ++++++++++--------- .../models/json/hetzner_server_info.dart | 20 +++++++- .../providers/server_providers/hetzner.dart | 32 ++++++------- 3 files changed, 60 insertions(+), 40 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index abfc488b..6cddfa22 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -147,7 +147,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'format': 'ext4' }, ); - volume = HetznerVolume.fromJson(createVolumeResponse.data); + volume = HetznerVolume.fromJson(createVolumeResponse.data['volume']); } catch (e) { print(e); return GenericResult( @@ -167,8 +167,10 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future> getVolumes({final String? status}) async { - List volumes = []; + Future>> getVolumes({ + final String? status, + }) async { + final List volumes = []; Response? getVolumesResonse; final Dio client = await getClient(); @@ -179,7 +181,9 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'status': status, }, ); - volumes = getVolumesResonse.data['volumes']; + for (final volume in getVolumesResonse.data['volumes']) { + volumes.add(HetznerVolume.fromJson(volume)); + } } catch (e) { print(e); return GenericResult( @@ -199,34 +203,31 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future getVolume( + Future> getVolume( final String volumeId, ) async { - ServerVolume? volume; + HetznerVolume? volume; final Response getVolumeResponse; final Dio client = await getClient(); try { getVolumeResponse = await client.get('/volumes/$volumeId'); - final int responseVolumeId = getVolumeResponse.data['volume']['id']; - final int volumeSize = getVolumeResponse.data['volume']['size']; - final int volumeServer = getVolumeResponse.data['volume']['server']; - final String volumeName = getVolumeResponse.data['volume']['name']; - final volumeDevice = getVolumeResponse.data['volume']['linux_device']; - volume = ServerVolume( - id: responseVolumeId, - name: volumeName, - sizeByte: volumeSize, - serverId: volumeServer, - linuxDevice: volumeDevice, - ); + volume = HetznerVolume.fromJson(getVolumeResponse.data['volume']); } catch (e) { print(e); + return GenericResult( + data: null, + success: false, + message: e.toString(), + ); } finally { client.close(); } - return volume; + return GenericResult( + data: volume, + success: true, + ); } Future> deleteVolume(final int volumeId) async { @@ -547,15 +548,18 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return GenericResult(success: true, data: locations); } - Future> getAvailableServerTypes() async { - List types = []; + Future>> + getAvailableServerTypes() async { + final List types = []; final Dio client = await getClient(); try { final Response response = await client.get( '/server_types', ); - types = response.data!['server_types']; + for (final type in response.data!['server_types']) { + types.add(HetznerServerTypeInfo.fromJson(type)); + } } catch (e) { print(e); return GenericResult( diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index 31d60509..96838b4e 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -72,11 +72,21 @@ enum ServerStatus { @JsonSerializable() class HetznerServerTypeInfo { - HetznerServerTypeInfo(this.cores, this.memory, this.disk, this.prices); + HetznerServerTypeInfo( + this.cores, + this.memory, + this.disk, + this.prices, + this.name, + this.description, + ); final int cores; final num memory; final int disk; + final String name; + final String description; + final List prices; static HetznerServerTypeInfo fromJson(final Map json) => @@ -85,7 +95,11 @@ class HetznerServerTypeInfo { @JsonSerializable() class HetznerPriceInfo { - HetznerPriceInfo(this.hourly, this.monthly); + HetznerPriceInfo( + this.hourly, + this.monthly, + this.location, + ); @JsonKey(name: 'price_hourly', fromJson: HetznerPriceInfo.getPrice) final double hourly; @@ -93,6 +107,8 @@ class HetznerPriceInfo { @JsonKey(name: 'price_monthly', fromJson: HetznerPriceInfo.getPrice) final double monthly; + final String location; + static HetznerPriceInfo fromJson(final Map json) => _$HetznerPriceInfoFromJson(json); diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index fae15b5b..ceec065f 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -150,19 +150,19 @@ class HetznerServerProvider extends ServerProvider { ); } - final List rawTypes = result.data; + final rawTypes = result.data; for (final rawType in rawTypes) { - for (final rawPrice in rawType['prices']) { - if (rawPrice['location'].toString() == location.identifier) { + for (final rawPrice in rawType.prices) { + if (rawPrice.location == location.identifier) { types.add( ServerType( - title: rawType['description'], - identifier: rawType['name'], - ram: rawType['memory'], - cores: rawType['cores'], - disk: DiskSize(byte: rawType['disk'] * 1024 * 1024 * 1024), + title: rawType.description, + identifier: rawType.name, + ram: rawType.memory.toDouble(), + cores: rawType.cores, + disk: DiskSize(byte: rawType.disk * 1024 * 1024 * 1024), price: Price( - value: double.parse(rawPrice['price_monthly']['gross']), + value: rawPrice.monthly, currency: 'EUR', ), location: location, @@ -532,7 +532,7 @@ class HetznerServerProvider extends ServerProvider { volume: ServerVolume( id: volume.id, name: volume.name, - sizeByte: volume.sizeByte, + sizeByte: volume.sizeByte * 1024 * 1024 * 1024, serverId: volume.serverId, linuxDevice: volume.linuxDevice, ), @@ -676,7 +676,7 @@ class HetznerServerProvider extends ServerProvider { volume = ServerVolume( id: result.data!.id, name: result.data!.name, - sizeByte: result.data!.sizeByte, + sizeByte: result.data!.sizeByte * 1024 * 1024 * 1024, serverId: result.data!.serverId, linuxDevice: result.data!.linuxDevice, ); @@ -716,11 +716,11 @@ class HetznerServerProvider extends ServerProvider { try { for (final rawVolume in result.data) { - final int volumeId = rawVolume['id']; - final int volumeSize = rawVolume['size'] * 1024 * 1024 * 1024; - final volumeServer = rawVolume['server']; - final String volumeName = rawVolume['name']; - final volumeDevice = rawVolume['linux_device']; + final int volumeId = rawVolume.id; + final int volumeSize = rawVolume.sizeByte * 1024 * 1024 * 1024; + final volumeServer = rawVolume.serverId; + final String volumeName = rawVolume.name; + final volumeDevice = rawVolume.linuxDevice; final volume = ServerVolume( id: volumeId, name: volumeName, From 49fe40bb38637c4c6e6c19ee94ffcc8d2bf9b481 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 7 Jun 2023 00:09:39 -0300 Subject: [PATCH 514/732] chore: Implement better Price abstraction for Hetzner server provider --- .../server_providers/hetzner/hetzner_api.dart | 20 +++++----- .../providers/server_providers/hetzner.dart | 37 +++++++++++++++++-- .../server_providers/server_provider.dart | 2 +- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 6cddfa22..9b8fd30b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -7,9 +7,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_pro import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; -import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { @@ -106,7 +104,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { length: 64, ); - Future getPricePerGb() async { + Future> getPricePerGb() async { double? price; final Response pricingResponse; @@ -119,16 +117,16 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { price = double.parse(volumePrice); } catch (e) { print(e); + return GenericResult( + success: false, + data: price, + message: e.toString(), + ); } finally { client.close(); } - return price == null - ? null - : Price( - value: price, - currency: 'EUR', - ); + return GenericResult(success: true, data: price); } Future> createVolume() async { @@ -252,7 +250,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } Future> attachVolume( - final ServerVolume volume, + final HetznerVolume volume, final int serverId, ) async { bool success = false; @@ -312,7 +310,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } Future> resizeVolume( - final ServerVolume volume, + final HetznerVolume volume, final DiskSize size, ) async { bool success = false; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index ceec065f..b9a3bbc8 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -756,7 +756,13 @@ class HetznerServerProvider extends ServerProvider { final int serverId, ) async => _adapter.api().attachVolume( - volume, + HetznerVolume( + volume.id, + volume.sizeByte, + volume.serverId, + volume.name, + volume.linuxDevice, + ), serverId, ); @@ -774,10 +780,35 @@ class HetznerServerProvider extends ServerProvider { final DiskSize size, ) async => _adapter.api().resizeVolume( - volume, + HetznerVolume( + volume.id, + volume.sizeByte, + volume.serverId, + volume.name, + volume.linuxDevice, + ), size, ); @override - Future getPricePerGb() async => _adapter.api().getPricePerGb(); + Future> getPricePerGb() async { + final result = await _adapter.api().getPricePerGb(); + + if (!result.success || result.data == null) { + return GenericResult( + data: null, + success: false, + message: result.message, + code: result.code, + ); + } + + return GenericResult( + success: true, + data: Price( + value: result.data!, + currency: 'EUR', + ), + ); + } } diff --git a/lib/logic/providers/server_providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart index f1004192..b48662bf 100644 --- a/lib/logic/providers/server_providers/server_provider.dart +++ b/lib/logic/providers/server_providers/server_provider.dart @@ -37,7 +37,7 @@ abstract class ServerProvider { final DateTime end, ); - Future getPricePerGb(); + Future> getPricePerGb(); Future>> getVolumes({final String? status}); Future> createVolume(); Future> deleteVolume(final ServerVolume volume); From fa4939d7c62db219577283aed3c8f068f5b54e11 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 7 Jun 2023 00:11:36 -0300 Subject: [PATCH 515/732] chore: Implement better Price abstraction for Digital Ocean server provider --- .../cubit/provider_volumes/provider_volume_cubit.dart | 2 +- lib/logic/providers/server_providers/digital_ocean.dart | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 43bd7005..46137c59 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -27,7 +27,7 @@ class ApiProviderVolumeCubit } Future getPricePerGb() async => - ProvidersController.currentServerProvider!.getPricePerGb(); + (await ProvidersController.currentServerProvider!.getPricePerGb()).data; Future refresh() async { emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index a745434d..67808d6e 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -779,9 +779,12 @@ class DigitalOceanServerProvider extends ServerProvider { /// Hardcoded on their documentation and there is no pricing API at all /// Probably we should scrap the doc page manually @override - Future getPricePerGb() async => Price( - value: 0.10, - currency: 'USD', + Future> getPricePerGb() async => GenericResult( + success: true, + data: Price( + value: 0.10, + currency: 'USD', + ), ); @override From 875a9e2e86d755a31e9e250ca64956f31c5138da Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 7 Jun 2023 00:20:42 -0300 Subject: [PATCH 516/732] chore: Replace dynamic blobs with HetznerServerInfo --- .../rest_maps/server_providers/hetzner/hetzner_api.dart | 8 ++++++-- lib/logic/providers/server_providers/hetzner.dart | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 9b8fd30b..f0f87bce 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -343,7 +343,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - Future createServer({ + Future> createServer({ required final String dnsApiToken, required final String dnsProviderType, required final String serverApiToken, @@ -357,6 +357,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { }) async { final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; Response? serverCreateResponse; + HetznerServerInfo? serverInfo; DioError? hetznerError; bool success = false; @@ -383,6 +384,9 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { print('Decoded data: $data'); serverCreateResponse = await client.post('/servers', data: data); + serverInfo = HetznerServerInfo.fromJson( + serverCreateResponse.data['server'], + ); success = true; } on DioError catch (e) { print(e); @@ -400,7 +404,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { } return GenericResult( - data: serverCreateResponse?.data, + data: serverInfo, success: success && hetznerError == null, code: serverCreateResponse?.statusCode ?? hetznerError?.response?.statusCode, diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index b9a3bbc8..c74b83cc 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -526,8 +526,8 @@ class HetznerServerProvider extends ServerProvider { } final serverDetails = ServerHostingDetails( - id: serverResult.data['server']['id'], - ip4: serverResult.data['server']['public_net']['ipv4']['ip'], + id: serverResult.data!.id, + ip4: serverResult.data!.publicNet.ipv4!.ip, createTime: DateTime.now(), volume: ServerVolume( id: volume.id, From f42e415633792f8eb3dea326af7502d64fb91e0b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 7 Jun 2023 00:25:34 -0300 Subject: [PATCH 517/732] chore: Replace dynamic blobs with HetznerLocation --- .../server_providers/hetzner/hetzner_api.dart | 13 ++++++------- lib/logic/models/json/hetzner_server_info.dart | 9 ++++++++- lib/logic/providers/server_providers/hetzner.dart | 10 +++++----- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index f0f87bce..7dc1bd28 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -526,16 +526,15 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { return GenericResult(data: servers, success: true); } - Future> getAvailableLocations() async { - List locations = []; + Future>> getAvailableLocations() async { + final List locations = []; final Dio client = await getClient(); try { - final Response response = await client.get( - '/locations', - ); - - locations = response.data!['locations']; + final Response response = await client.get('/locations'); + for (final location in response.data!['locations']) { + locations.add(HetznerLocation.fromJson(location)); + } } catch (e) { print(e); return GenericResult( diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index 96838b4e..0078a6ff 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -118,7 +118,14 @@ class HetznerPriceInfo { @JsonSerializable() class HetznerLocation { - HetznerLocation(this.country, this.city, this.description, this.zone); + HetznerLocation( + this.country, + this.city, + this.description, + this.zone, + this.name, + ); + final String name; final String country; final String city; final String description; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index c74b83cc..e9fcccbf 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -116,15 +116,15 @@ class HetznerServerProvider extends ServerProvider { ); } - final List rawLocations = result.data; + final List rawLocations = result.data; for (final rawLocation in rawLocations) { ServerProviderLocation? location; try { location = ServerProviderLocation( - title: rawLocation['city'], - description: rawLocation['description'], - flag: getEmojiFlag(rawLocation['country']), - identifier: rawLocation['name'], + title: rawLocation.city, + description: rawLocation.description, + flag: getEmojiFlag(rawLocation.country), + identifier: rawLocation.name, ); } catch (e) { continue; From 140acaee49cd73dcc0446db34ed9bee9403a4d60 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 7 Jun 2023 03:22:27 -0300 Subject: [PATCH 518/732] chore: Implement basic Digital Ocean server models --- .../digital_ocean/digital_ocean_api.dart | 35 ++++++++++------ .../json/digital_ocean_server_info.dart | 39 +++++++++++++++++ .../json/digital_ocean_server_info.g.dart | 37 ++++++++++++++++ .../models/json/hetzner_server_info.g.dart | 8 ++++ .../server_providers/digital_ocean.dart | 42 +++++++++---------- 5 files changed, 128 insertions(+), 33 deletions(-) create mode 100644 lib/logic/models/json/digital_ocean_server_info.dart create mode 100644 lib/logic/models/json/digital_ocean_server_info.g.dart diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 2a4153c1..19d99a6c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_pro import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/models/server_provider_location.dart'; +import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { @@ -98,7 +98,8 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - Future createVolume() async { + Future> createVolume() async { + DigitalOceanVolume? volume; Response? createVolumeResponse; final Dio client = await getClient(); try { @@ -114,6 +115,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'filesystem_type': 'ext4', }, ); + volume = DigitalOceanVolume.fromJson(createVolumeResponse.data['volume']); } catch (e) { print(e); return GenericResult( @@ -126,15 +128,17 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } return GenericResult( - data: createVolumeResponse.data, + data: volume, success: true, code: createVolumeResponse.statusCode, message: createVolumeResponse.statusMessage, ); } - Future> getVolumes({final String? status}) async { - List volumes = []; + Future>> getVolumes({ + final String? status, + }) async { + final List volumes = []; Response? getVolumesResponse; final Dio client = await getClient(); @@ -145,7 +149,9 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'status': status, }, ); - volumes = getVolumesResponse.data['volumes']; + for (final volume in getVolumesResponse.data['volumes']) { + volumes.add(DigitalOceanVolume.fromJson(volume)); + } } catch (e) { print(e); return GenericResult( @@ -159,7 +165,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return GenericResult( data: volumes, - success: false, + success: true, ); } @@ -297,7 +303,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { ); } - Future createServer({ + Future> createServer({ required final String dnsApiToken, required final String dnsProviderType, required final String serverApiToken, @@ -310,6 +316,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { }) async { final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; + int? dropletId; Response? serverCreateResponse; final Dio client = await getClient(); try { @@ -331,6 +338,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/droplets', data: data, ); + dropletId = serverCreateResponse.data['droplet']['id']; } catch (e) { print(e); return GenericResult( @@ -343,7 +351,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { } return GenericResult( - data: serverCreateResponse, + data: dropletId, success: true, code: serverCreateResponse.statusCode, message: serverCreateResponse.statusMessage, @@ -502,8 +510,9 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return GenericResult(success: true, data: servers); } - Future> getAvailableLocations() async { - List locations = []; + Future>> + getAvailableLocations() async { + final List locations = []; final Dio client = await getClient(); try { @@ -511,7 +520,9 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { '/regions', ); - locations = response.data!['regions']; + for (final region in response.data!['regions']) { + locations.add(DigitalOceanLocation.fromJson(region)); + } } catch (e) { print(e); return GenericResult( diff --git a/lib/logic/models/json/digital_ocean_server_info.dart b/lib/logic/models/json/digital_ocean_server_info.dart new file mode 100644 index 00000000..ee9e9162 --- /dev/null +++ b/lib/logic/models/json/digital_ocean_server_info.dart @@ -0,0 +1,39 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'digital_ocean_server_info.g.dart'; + +@JsonSerializable() +class DigitalOceanVolume { + DigitalOceanVolume( + this.id, + this.name, + this.sizeGigabytes, + this.dropletIds, + ); + + final String id; + final String name; + + @JsonKey(name: 'droplet_ids') + final List dropletIds; + + @JsonKey(name: 'size_gigabytes') + final int sizeGigabytes; + + static DigitalOceanVolume fromJson(final Map json) => + _$DigitalOceanVolumeFromJson(json); +} + +@JsonSerializable() +class DigitalOceanLocation { + DigitalOceanLocation( + this.slug, + this.name, + ); + + final String slug; + final String name; + + static DigitalOceanLocation fromJson(final Map json) => + _$DigitalOceanLocationFromJson(json); +} diff --git a/lib/logic/models/json/digital_ocean_server_info.g.dart b/lib/logic/models/json/digital_ocean_server_info.g.dart new file mode 100644 index 00000000..6a6a9b45 --- /dev/null +++ b/lib/logic/models/json/digital_ocean_server_info.g.dart @@ -0,0 +1,37 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'digital_ocean_server_info.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DigitalOceanVolume _$DigitalOceanVolumeFromJson(Map json) => + DigitalOceanVolume( + json['id'] as String, + json['name'] as String, + json['size_gigabytes'] as int, + (json['droplet_ids'] as List).map((e) => e as int).toList(), + ); + +Map _$DigitalOceanVolumeToJson(DigitalOceanVolume instance) => + { + 'id': instance.id, + 'name': instance.name, + 'droplet_ids': instance.dropletIds, + 'size_gigabytes': instance.sizeGigabytes, + }; + +DigitalOceanLocation _$DigitalOceanLocationFromJson( + Map json) => + DigitalOceanLocation( + json['slug'] as String, + json['name'] as String, + ); + +Map _$DigitalOceanLocationToJson( + DigitalOceanLocation instance) => + { + 'slug': instance.slug, + 'name': instance.name, + }; diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart index 7cc08abc..74607bad 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -81,6 +81,8 @@ HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson( (json['prices'] as List) .map((e) => HetznerPriceInfo.fromJson(e as Map)) .toList(), + json['name'] as String, + json['description'] as String, ); Map _$HetznerServerTypeInfoToJson( @@ -89,6 +91,8 @@ Map _$HetznerServerTypeInfoToJson( 'cores': instance.cores, 'memory': instance.memory, 'disk': instance.disk, + 'name': instance.name, + 'description': instance.description, 'prices': instance.prices, }; @@ -96,12 +100,14 @@ HetznerPriceInfo _$HetznerPriceInfoFromJson(Map json) => HetznerPriceInfo( HetznerPriceInfo.getPrice(json['price_hourly'] as Map), HetznerPriceInfo.getPrice(json['price_monthly'] as Map), + json['location'] as String, ); Map _$HetznerPriceInfoToJson(HetznerPriceInfo instance) => { 'price_hourly': instance.hourly, 'price_monthly': instance.monthly, + 'location': instance.location, }; HetznerLocation _$HetznerLocationFromJson(Map json) => @@ -110,10 +116,12 @@ HetznerLocation _$HetznerLocationFromJson(Map json) => json['city'] as String, json['description'] as String, json['network_zone'] as String, + json['name'] as String, ); Map _$HetznerLocationToJson(HetznerLocation instance) => { + 'name': instance.name, 'country': instance.country, 'city': instance.city, 'description': instance.description, diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 67808d6e..53c24df7 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -6,6 +6,7 @@ import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; @@ -179,10 +180,13 @@ class DigitalOceanServerProvider extends ServerProvider { } try { - final int dropletId = serverResult.data['droplet']['id']; - final ServerVolume? newVolume = (await createVolume()).data; - final bool attachedVolume = - (await attachVolume(newVolume!, dropletId)).data; + final int dropletId = serverResult.data!; + final newVolume = (await createVolume()).data; + final bool attachedVolume = (await _adapter.api().attachVolume( + newVolume!.name, + dropletId, + )) + .data; String? ipv4; int attempts = 0; @@ -253,15 +257,15 @@ class DigitalOceanServerProvider extends ServerProvider { ); } - final List rawLocations = result.data; + final List rawLocations = result.data; for (final rawLocation in rawLocations) { ServerProviderLocation? location; try { location = ServerProviderLocation( - title: rawLocation['slug'], - description: rawLocation['name'], - flag: getEmojiFlag(rawLocation['slug']), - identifier: rawLocation['slug'], + title: rawLocation.slug, + description: rawLocation.name, + flag: getEmojiFlag(rawLocation.slug), + identifier: rawLocation.slug, ); } catch (e) { continue; @@ -638,17 +642,15 @@ class DigitalOceanServerProvider extends ServerProvider { try { int id = 0; for (final rawVolume in result.data) { - final volumeId = rawVolume['id']; - final int volumeSize = rawVolume['size_gigabytes'] * 1024 * 1024 * 1024; - final volumeDropletIds = rawVolume['droplet_ids']; - final String volumeName = rawVolume['name']; + final String volumeName = rawVolume.name; final volume = ServerVolume( id: id++, name: volumeName, - sizeByte: volumeSize, - serverId: volumeDropletIds.isNotEmpty ? volumeDropletIds[0] : null, + sizeByte: rawVolume.sizeGigabytes * 1024 * 1024 * 1024, + serverId: + rawVolume.dropletIds.isNotEmpty ? rawVolume.dropletIds[0] : null, linuxDevice: 'scsi-0DO_Volume_$volumeName', - uuid: volumeId, + uuid: rawVolume.id, ); volumes.add(volume); } @@ -693,16 +695,14 @@ class DigitalOceanServerProvider extends ServerProvider { ); } - final volumeId = result.data['volume']['id']; - final volumeSize = result.data['volume']['size_gigabytes']; - final volumeName = result.data['volume']['name']; + final String volumeName = result.data!.name; volume = ServerVolume( id: getVolumesResult.data.length, name: volumeName, - sizeByte: volumeSize, + sizeByte: result.data!.sizeGigabytes, serverId: null, linuxDevice: '/dev/disk/by-id/scsi-0DO_Volume_$volumeName', - uuid: volumeId, + uuid: result.data!.id, ); return GenericResult( From 9d62d3af8e69bc001b6a6d3c60cb80c95fef6702 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 9 Jun 2023 04:10:15 -0300 Subject: [PATCH 519/732] chore: Merge master into refactoring --- lib/logic/api_maps/rest_maps/backblaze.dart | 6 +- .../server_installation_repository.dart | 69 ++++++------------- pubspec.lock | 8 --- pubspec.yaml | 1 - 4 files changed, 27 insertions(+), 57 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index 6fe5cd8e..6ce8914e 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -30,7 +30,11 @@ class BackblazeApi extends ApiMap { @override BaseOptions get options { - final BaseOptions options = BaseOptions(baseUrl: rootAddress); + final BaseOptions options = BaseOptions( + baseUrl: rootAddress, + contentType: Headers.jsonContentType, + responseType: ResponseType.json, + ); if (isWithToken) { final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 9444718e..a9122b33 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:io'; -import 'package:basic_utils/basic_utils.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -20,7 +19,6 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; -import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; @@ -187,46 +185,20 @@ class ServerInstallationRepository { final String? ip4, final Map skippedMatches, ) async { - final List addresses = [ - '$domainName', - 'api.$domainName', - 'cloud.$domainName', - 'meet.$domainName', - 'password.$domainName' - ]; - final Map matches = {}; - - for (final String address in addresses) { - if (skippedMatches[address] ?? false) { - matches[address] = true; - continue; - } - final List? lookupRecordRes = await DnsUtils.lookupRecord( - address, - RRecordType.A, - provider: DnsApiProvider.CLOUDFLARE, - ); - getIt.get().addMessage( - Message( - text: - 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', - ), - ); - getIt.get().addMessage( - Message( - text: - 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', - ), - ); - if (lookupRecordRes == null || - lookupRecordRes.isEmpty || - lookupRecordRes[0].data != ip4) { - matches[address] = false; - } else { - matches[address] = true; - } - } + await InternetAddress.lookup(domainName!).then( + (final records) { + for (final record in records) { + if (skippedMatches[record.host] ?? false) { + matches[record.host] = true; + continue; + } + if (record.address == ip4!) { + matches[record.host] = true; + } + } + }, + ); return matches; } @@ -351,15 +323,18 @@ class ServerInstallationRepository { } Future getServerIpFromDomain(final ServerDomain serverDomain) async { - final List? lookup = await DnsUtils.lookupRecord( - serverDomain.domainName, - RRecordType.A, - provider: DnsApiProvider.CLOUDFLARE, + String? domain; + await InternetAddress.lookup(serverDomain.domainName).then( + (final records) { + for (final record in records) { + domain = record.address; + } + }, ); - if (lookup == null || lookup.isEmpty) { + if (domain == null || domain!.isEmpty) { throw IpNotFoundException('No IP found for domain $serverDomain'); } - return lookup[0].data; + return domain!; } Future getDeviceName() async { diff --git a/pubspec.lock b/pubspec.lock index bd81200b..d812a890 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -73,14 +73,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.0" - basic_utils: - dependency: "direct main" - description: - name: basic_utils - sha256: "8815477fcf58499e42326bd858e391442425fa57db9a45e48e15224c62049262" - url: "https://pub.dev" - source: hosted - version: "5.5.4" bloc: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b0554aba..4e5e35d7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,6 @@ dependencies: animations: ^2.0.7 auto_route: ^7.3.2 auto_size_text: ^3.0.0 - basic_utils: ^5.5.4 crypt: ^4.3.0 cubit_form: ^2.0.1 device_info_plus: ^9.0.2 From 55f62f120085ed17a221264fd003e9eeec8699a0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 9 Jun 2023 05:11:42 -0300 Subject: [PATCH 520/732] fix: Change sizeByte field to size for HetznerVolume --- lib/logic/models/json/hetzner_server_info.dart | 4 ++-- lib/logic/models/json/hetzner_server_info.g.dart | 4 ++-- lib/logic/providers/server_providers/hetzner.dart | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index 0078a6ff..b0706599 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -141,13 +141,13 @@ class HetznerLocation { class HetznerVolume { HetznerVolume( this.id, - this.sizeByte, + this.size, this.serverId, this.name, this.linuxDevice, ); final int id; - final int sizeByte; + final int size; final int? serverId; final String name; diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart index 74607bad..b73a0a9d 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -131,7 +131,7 @@ Map _$HetznerLocationToJson(HetznerLocation instance) => HetznerVolume _$HetznerVolumeFromJson(Map json) => HetznerVolume( json['id'] as int, - json['sizeByte'] as int, + json['size'] as int, json['serverId'] as int?, json['name'] as String, json['linux_device'] as String?, @@ -140,7 +140,7 @@ HetznerVolume _$HetznerVolumeFromJson(Map json) => Map _$HetznerVolumeToJson(HetznerVolume instance) => { 'id': instance.id, - 'sizeByte': instance.sizeByte, + 'size': instance.size, 'serverId': instance.serverId, 'name': instance.name, 'linux_device': instance.linuxDevice, diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index e9fcccbf..032bd90f 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -532,7 +532,7 @@ class HetznerServerProvider extends ServerProvider { volume: ServerVolume( id: volume.id, name: volume.name, - sizeByte: volume.sizeByte * 1024 * 1024 * 1024, + sizeByte: volume.size * 1024 * 1024 * 1024, serverId: volume.serverId, linuxDevice: volume.linuxDevice, ), @@ -676,7 +676,7 @@ class HetznerServerProvider extends ServerProvider { volume = ServerVolume( id: result.data!.id, name: result.data!.name, - sizeByte: result.data!.sizeByte * 1024 * 1024 * 1024, + sizeByte: result.data!.size * 1024 * 1024 * 1024, serverId: result.data!.serverId, linuxDevice: result.data!.linuxDevice, ); @@ -717,7 +717,7 @@ class HetznerServerProvider extends ServerProvider { try { for (final rawVolume in result.data) { final int volumeId = rawVolume.id; - final int volumeSize = rawVolume.sizeByte * 1024 * 1024 * 1024; + final int volumeSize = rawVolume.size * 1024 * 1024 * 1024; final volumeServer = rawVolume.serverId; final String volumeName = rawVolume.name; final volumeDevice = rawVolume.linuxDevice; From bfd67bac8d1f718925b3579859402e801e151f14 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 9 Jun 2023 06:13:16 -0300 Subject: [PATCH 521/732] fix: Change .id field to ['id'] for DnsRecord in Digital Ocean DNS --- .../dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index a6927e24..992e6766 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -105,7 +105,7 @@ class DigitalOceanDnsApi extends DnsProviderApi { final List allDeleteFutures = []; for (final record in records) { allDeleteFutures.add( - client.delete('/domains/$domainName/records/${record.id}'), + client.delete("/domains/$domainName/records/${record['id']}"), ); } await Future.wait(allDeleteFutures); From 8d8e8cf265521c20e00d38c18650fbe0c9797e1f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 9 Jun 2023 07:19:24 -0300 Subject: [PATCH 522/732] fix: Change spf1 record from domainName to '@' for Digital Ocean DNS --- lib/logic/providers/dns_providers/digital_ocean_dns.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index b231c414..e72c48fc 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -247,7 +247,7 @@ class DigitalOceanDnsProvider extends DnsProvider { final DnsRecord txt2 = DnsRecord( type: 'TXT', - name: domainName, + name: '@', content: 'v=spf1 a mx ip4:$ip4 -all', ttl: 18000, ); From f6424200e20525e7a2cc72b73537feedbdedf153 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 12 Jun 2023 23:48:29 -0300 Subject: [PATCH 523/732] chore: Implement basic DigitalOceanServerType model --- .../digital_ocean/digital_ocean_api.dart | 11 +++++--- .../server_providers/hetzner/hetzner_api.dart | 2 +- .../json/digital_ocean_server_info.dart | 26 +++++++++++++++++++ .../json/digital_ocean_server_info.g.dart | 24 +++++++++++++++++ .../server_providers/digital_ocean.dart | 19 +++++++------- 5 files changed, 67 insertions(+), 15 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 19d99a6c..f95047ae 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -326,7 +326,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'image': 'ubuntu-20-04-x64', 'user_data': '#cloud-config\n' 'runcmd:\n' - '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/digital-ocean/nixos-infect | ' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/testing/final-digital-ocean/nixos-infect | ' "PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' DOMAIN='$domainName' " "LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword " 'API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | tee /tmp/infect.log', @@ -537,15 +537,18 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { return GenericResult(data: locations, success: true); } - Future> getAvailableServerTypes() async { - List types = []; + Future>> + getAvailableServerTypes() async { + final List types = []; final Dio client = await getClient(); try { final Response response = await client.get( '/sizes', ); - types = response.data!['sizes']; + for (final size in response.data!['sizes']) { + types.add(DigitalOceanServerType.fromJson(size)); + } } catch (e) { print(e); return GenericResult( diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 7dc1bd28..77507cb7 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -372,7 +372,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'networks': [], 'user_data': '#cloud-config\n' 'runcmd:\n' - '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/hetzner/nixos-infect | ' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/testing/final-hetzner/nixos-infect | ' "STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType " "NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' " 'CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | ' diff --git a/lib/logic/models/json/digital_ocean_server_info.dart b/lib/logic/models/json/digital_ocean_server_info.dart index ee9e9162..2a6ace8c 100644 --- a/lib/logic/models/json/digital_ocean_server_info.dart +++ b/lib/logic/models/json/digital_ocean_server_info.dart @@ -37,3 +37,29 @@ class DigitalOceanLocation { static DigitalOceanLocation fromJson(final Map json) => _$DigitalOceanLocationFromJson(json); } + +@JsonSerializable() +class DigitalOceanServerType { + DigitalOceanServerType( + this.regions, + this.memory, + this.description, + this.disk, + this.priceMonthly, + this.slug, + this.vcpus, + ); + + final List regions; + final double memory; + final String slug; + final String description; + final int vcpus; + final int disk; + + @JsonKey(name: 'price_monthly') + final double priceMonthly; + + static DigitalOceanServerType fromJson(final Map json) => + _$DigitalOceanServerTypeFromJson(json); +} diff --git a/lib/logic/models/json/digital_ocean_server_info.g.dart b/lib/logic/models/json/digital_ocean_server_info.g.dart index 6a6a9b45..a0e707c9 100644 --- a/lib/logic/models/json/digital_ocean_server_info.g.dart +++ b/lib/logic/models/json/digital_ocean_server_info.g.dart @@ -35,3 +35,27 @@ Map _$DigitalOceanLocationToJson( 'slug': instance.slug, 'name': instance.name, }; + +DigitalOceanServerType _$DigitalOceanServerTypeFromJson( + Map json) => + DigitalOceanServerType( + (json['regions'] as List).map((e) => e as String).toList(), + (json['memory'] as num).toDouble(), + json['description'] as String, + json['disk'] as int, + (json['price_monthly'] as num).toDouble(), + json['slug'] as String, + json['vcpus'] as int, + ); + +Map _$DigitalOceanServerTypeToJson( + DigitalOceanServerType instance) => + { + 'regions': instance.regions, + 'memory': instance.memory, + 'slug': instance.slug, + 'description': instance.description, + 'vcpus': instance.vcpus, + 'disk': instance.disk, + 'price_monthly': instance.priceMonthly, + }; diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 53c24df7..98b67a90 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -291,20 +291,19 @@ class DigitalOceanServerProvider extends ServerProvider { ); } - final List rawSizes = result.data; + final List rawSizes = result.data; for (final rawSize in rawSizes) { - for (final rawRegion in rawSize['regions']) { - final ramMb = rawSize['memory'].toDouble(); - if (rawRegion.toString() == location.identifier && ramMb > 1024) { + for (final rawRegion in rawSize.regions) { + if (rawRegion == location.identifier && rawSize.memory > 1024) { types.add( ServerType( - title: rawSize['description'], - identifier: rawSize['slug'], - ram: ramMb / 1024, - cores: rawSize['vcpus'], - disk: DiskSize(byte: rawSize['disk'] * 1024 * 1024 * 1024), + title: rawSize.description, + identifier: rawSize.slug, + ram: rawSize.memory / 1024, + cores: rawSize.vcpus, + disk: DiskSize(byte: rawSize.disk * 1024 * 1024 * 1024), price: Price( - value: rawSize['price_monthly'], + value: rawSize.priceMonthly, currency: 'USD', ), location: location, From 65283306a9a4085026d42736c161cc621aad6755 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 13 Jun 2023 23:36:02 -0300 Subject: [PATCH 524/732] fix: Make dropletIds field for DigitalOceanVolume optional --- lib/logic/models/json/digital_ocean_server_info.dart | 2 +- lib/logic/models/json/digital_ocean_server_info.g.dart | 2 +- lib/logic/providers/server_providers/digital_ocean.dart | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/logic/models/json/digital_ocean_server_info.dart b/lib/logic/models/json/digital_ocean_server_info.dart index 2a6ace8c..9351761d 100644 --- a/lib/logic/models/json/digital_ocean_server_info.dart +++ b/lib/logic/models/json/digital_ocean_server_info.dart @@ -15,7 +15,7 @@ class DigitalOceanVolume { final String name; @JsonKey(name: 'droplet_ids') - final List dropletIds; + final List? dropletIds; @JsonKey(name: 'size_gigabytes') final int sizeGigabytes; diff --git a/lib/logic/models/json/digital_ocean_server_info.g.dart b/lib/logic/models/json/digital_ocean_server_info.g.dart index a0e707c9..9610dbce 100644 --- a/lib/logic/models/json/digital_ocean_server_info.g.dart +++ b/lib/logic/models/json/digital_ocean_server_info.g.dart @@ -11,7 +11,7 @@ DigitalOceanVolume _$DigitalOceanVolumeFromJson(Map json) => json['id'] as String, json['name'] as String, json['size_gigabytes'] as int, - (json['droplet_ids'] as List).map((e) => e as int).toList(), + (json['droplet_ids'] as List?)?.map((e) => e as int).toList(), ); Map _$DigitalOceanVolumeToJson(DigitalOceanVolume instance) => diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 98b67a90..209f33e5 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -647,7 +647,9 @@ class DigitalOceanServerProvider extends ServerProvider { name: volumeName, sizeByte: rawVolume.sizeGigabytes * 1024 * 1024 * 1024, serverId: - rawVolume.dropletIds.isNotEmpty ? rawVolume.dropletIds[0] : null, + (rawVolume.dropletIds != null && rawVolume.dropletIds!.isNotEmpty) + ? rawVolume.dropletIds![0] + : null, linuxDevice: 'scsi-0DO_Volume_$volumeName', uuid: rawVolume.id, ); From 2b1f6a12ea1ed7e81cedb4964d9e77fd9f3f6660 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 13 Jun 2023 23:47:06 -0300 Subject: [PATCH 525/732] fix: Change JSON parsing for Digital Ocean droplets --- .../server_providers/digital_ocean/digital_ocean_api.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index f95047ae..46138b0c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -495,7 +495,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { final Dio client = await getClient(); try { final Response response = await client.get('/droplets'); - servers = response.data; + servers = response.data['droplets']; } catch (e) { print(e); return GenericResult( From 69707f543f150446a3e6467d46541aa6ca3c496c Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 14 Jun 2023 14:56:07 -0300 Subject: [PATCH 526/732] fix: Properly convert Digital Ocean droplets to ServerBasicInfo --- .../server_providers/digital_ocean/digital_ocean_api.dart | 2 +- .../rest_maps/server_providers/hetzner/hetzner_api.dart | 2 +- lib/logic/providers/server_providers/digital_ocean.dart | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 46138b0c..1fcb46c5 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -326,7 +326,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { 'image': 'ubuntu-20-04-x64', 'user_data': '#cloud-config\n' 'runcmd:\n' - '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/testing/final-digital-ocean/nixos-infect | ' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/digital-ocean/nixos-infect | ' "PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' DOMAIN='$domainName' " "LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword " 'API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | tee /tmp/infect.log', diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 77507cb7..7dc1bd28 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -372,7 +372,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { 'networks': [], 'user_data': '#cloud-config\n' 'runcmd:\n' - '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/testing/final-hetzner/nixos-infect | ' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/hetzner/nixos-infect | ' "STAGING_ACME='$stagingAcme' PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType " "NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' " 'CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | ' diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 209f33e5..66e474de 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -318,7 +318,7 @@ class DigitalOceanServerProvider extends ServerProvider { @override Future>> getServers() async { - final List servers = []; + List servers = []; final result = await _adapter.api().getServers(); if (result.data.isEmpty || !result.success) { return GenericResult( @@ -330,7 +330,7 @@ class DigitalOceanServerProvider extends ServerProvider { } final List rawServers = result.data; - rawServers.map( + servers = rawServers.map( (final server) { String ipv4 = '0.0.0.0'; if (server['networks']['v4'].isNotEmpty) { From 085c71748de5cf402b273023a69dec4e2182f8ff Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 14 Jun 2023 15:11:51 -0300 Subject: [PATCH 527/732] fix: Add currency to price tag on server info page --- lib/logic/providers/server_providers/digital_ocean.dart | 7 ++++--- lib/logic/providers/server_providers/hetzner.dart | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 66e474de..65a7b124 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -46,6 +46,7 @@ class DigitalOceanServerProvider extends ServerProvider { ); ApiAdapter _adapter; + final String currency = 'USD'; @override ServerProviderType get type => ServerProviderType.digitalOcean; @@ -304,7 +305,7 @@ class DigitalOceanServerProvider extends ServerProvider { disk: DiskSize(byte: rawSize.disk * 1024 * 1024 * 1024), price: Price( value: rawSize.priceMonthly, - currency: 'USD', + currency: currency, ), location: location, ), @@ -399,7 +400,7 @@ class DigitalOceanServerProvider extends ServerProvider { ServerMetadataEntity( type: MetadataType.cost, trId: 'server.monthly_cost', - value: droplet['size']['price_monthly'].toString(), + value: '${droplet['size']['price_monthly']} $currency', ), ServerMetadataEntity( type: MetadataType.location, @@ -784,7 +785,7 @@ class DigitalOceanServerProvider extends ServerProvider { success: true, data: Price( value: 0.10, - currency: 'USD', + currency: currency, ), ); diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 032bd90f..192674f5 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -46,6 +46,7 @@ class HetznerServerProvider extends ServerProvider { ); ApiAdapter _adapter; + final String currency = 'EUR'; @override ServerProviderType get type => ServerProviderType.hetzner; @@ -163,7 +164,7 @@ class HetznerServerProvider extends ServerProvider { disk: DiskSize(byte: rawType.disk * 1024 * 1024 * 1024), price: Price( value: rawPrice.monthly, - currency: 'EUR', + currency: currency, ), location: location, ), @@ -258,7 +259,8 @@ class HetznerServerProvider extends ServerProvider { ServerMetadataEntity( type: MetadataType.cost, trId: 'server.monthly_cost', - value: server.serverType.prices[1].monthly.toStringAsFixed(2), + value: + '${server.serverType.prices[1].monthly.toStringAsFixed(2)} $currency', ), ServerMetadataEntity( type: MetadataType.location, @@ -807,7 +809,7 @@ class HetznerServerProvider extends ServerProvider { success: true, data: Price( value: result.data!, - currency: 'EUR', + currency: currency, ), ); } From b46c53674b57b0e02a5591e8dac92423e739ab03 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 15 Jun 2023 13:48:23 -0300 Subject: [PATCH 528/732] feat: Implement new dialogue stub onChange --- .../server_installation_cubit.dart | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 6fa7d569..50c6b09a 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -19,6 +19,7 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_repository.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; export 'package:provider/provider.dart'; @@ -723,6 +724,33 @@ class ServerInstallationCubit extends Cubit { @override void onChange(final Change change) { + if (change.currentState.installationDialoguePopUp != null && + change.currentState.installationDialoguePopUp != + state.installationDialoguePopUp) { + final branching = change.currentState.installationDialoguePopUp; + showPopUpAlert( + alertTitle: branching!.title, + description: branching.description, + actionButtonTitle: branching.choices[1].title, + actionButtonOnPressed: () async { + final branchingResult = await branching.choices[1].callback!(); + emit( + (state as ServerInstallationNotFinished).copyWith( + installationDialoguePopUp: branchingResult.data, + ), + ); + }, + cancelButtonTitle: branching.choices[0].title, + cancelButtonOnPressed: () async { + final branchingResult = await branching.choices[0].callback!(); + emit( + (state as ServerInstallationNotFinished).copyWith( + installationDialoguePopUp: branchingResult.data, + ), + ); + }, + ); + } super.onChange(change); } From a5bb654a767a4c9b86fe8d0d2fb9351aac015868 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Jun 2023 04:28:45 +0300 Subject: [PATCH 529/732] refactor(backups): Rename BackbaleCredential to BackupsCredential Also adding provider field --- lib/config/hive_config.dart | 4 +- lib/logic/api_maps/rest_maps/backblaze.dart | 8 +- .../initializing/backblaze_form_cubit.dart | 2 +- .../server_installation_cubit.dart | 7 +- .../server_installation_repository.dart | 8 +- .../server_installation_state.dart | 8 +- lib/logic/get_it/api_config.dart | 8 +- lib/logic/models/hive/README.md | 1 + .../models/hive/backblaze_credential.dart | 27 ------ .../models/hive/backblaze_credential.g.dart | 44 --------- lib/logic/models/hive/backups_credential.dart | 51 ++++++++++ .../models/hive/backups_credential.g.dart | 93 +++++++++++++++++++ 12 files changed, 168 insertions(+), 93 deletions(-) delete mode 100644 lib/logic/models/hive/backblaze_credential.dart delete mode 100644 lib/logic/models/hive/backblaze_credential.g.dart create mode 100644 lib/logic/models/hive/backups_credential.dart create mode 100644 lib/logic/models/hive/backups_credential.g.dart diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 44b03f26..8ee1ca55 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -4,7 +4,7 @@ import 'dart:typed_data'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -111,7 +111,7 @@ class BNames { /// A [ServerHostingDetails] field of [serverInstallationBox] box. static String serverDetails = 'hetznerServer'; - /// A [BackblazeCredential] field of [serverInstallationBox] box. + /// A [BackupsCredential] field of [serverInstallationBox] box. static String backblazeCredential = 'backblazeKey'; /// A [BackblazeBucket] field of [serverInstallationBox] box. diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index 59292775..497a7625 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -4,7 +4,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; export 'package:selfprivacy/logic/api_maps/api_generic_result.dart'; @@ -36,7 +36,7 @@ class BackblazeApi extends ApiMap { responseType: ResponseType.json, ); if (isWithToken) { - final BackblazeCredential? backblazeCredential = + final BackupsCredential? backblazeCredential = getIt().backblazeCredential; final String token = backblazeCredential!.applicationKey; options.headers = {'Authorization': 'Basic $token'}; @@ -56,7 +56,7 @@ class BackblazeApi extends ApiMap { Future getAuthorizationToken() async { final Dio client = await getClient(); - final BackblazeCredential? backblazeCredential = + final BackupsCredential? backblazeCredential = getIt().backblazeCredential; if (backblazeCredential == null) { throw Exception('Backblaze credential is null'); @@ -121,7 +121,7 @@ class BackblazeApi extends ApiMap { // Create bucket Future createBucket(final String bucketName) async { final BackblazeApiAuth auth = await getAuthorizationToken(); - final BackblazeCredential? backblazeCredential = + final BackupsCredential? backblazeCredential = getIt().backblazeCredential; final Dio client = await getClient(); client.options.baseUrl = auth.apiUrl; diff --git a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart index 21d17a84..2578aded 100644 --- a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart @@ -3,7 +3,7 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:easy_localization/easy_localization.dart'; class BackblazeFormCubit extends FormCubit { diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 47952c9a..04b4fde6 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -11,7 +11,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -228,9 +228,10 @@ class ServerInstallationCubit extends Cubit { } void setBackblazeKey(final String keyId, final String applicationKey) async { - final BackblazeCredential backblazeCredential = BackblazeCredential( + final BackupsCredential backblazeCredential = BackupsCredential( keyId: keyId, applicationKey: applicationKey, + provider: BackupsProvider.backblaze, ); await repository.saveBackblazeKey(backblazeCredential); if (state is ServerInstallationRecovery) { @@ -735,7 +736,7 @@ class ServerInstallationCubit extends Cubit { } void finishRecoveryProcess( - final BackblazeCredential backblazeCredential, + final BackupsCredential backblazeCredential, ) async { await repository.saveIsServerStarted(true); await repository.saveIsServerResetedFirstTime(true); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index c138a340..d81d4d8a 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -16,7 +16,7 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.da import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/staging_options.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -49,7 +49,7 @@ class ServerInstallationRepository { final ServerDomain? serverDomain = getIt().serverDomain; final ServerProvider? serverProvider = getIt().serverProvider; - final BackblazeCredential? backblazeCredential = + final BackupsCredential? backblazeCredential = getIt().backblazeCredential; final ServerHostingDetails? serverDetails = getIt().serverDetails; @@ -228,7 +228,7 @@ class ServerInstallationRepository { final User rootUser, final String domainName, final String dnsApiToken, - final BackblazeCredential backblazeCredential, { + final BackupsCredential backblazeCredential, { required final void Function() onCancel, required final Future Function(ServerHostingDetails serverDetails) onSuccess, @@ -706,7 +706,7 @@ class ServerInstallationRepository { } Future saveBackblazeKey( - final BackblazeCredential backblazeCredential, + final BackupsCredential backblazeCredential, ) async { await getIt().storeBackblazeCredential(backblazeCredential); } diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index 5ceaafdd..3289a780 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -30,7 +30,7 @@ abstract class ServerInstallationState extends Equatable { final String? providerApiToken; final String? dnsApiToken; final String? serverTypeIdentificator; - final BackblazeCredential? backblazeCredential; + final BackupsCredential? backblazeCredential; final ServerDomain? serverDomain; final User? rootUser; final ServerHostingDetails? serverDetails; @@ -161,7 +161,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { final String? providerApiToken, final String? serverTypeIdentificator, final String? dnsApiToken, - final BackblazeCredential? backblazeCredential, + final BackupsCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, final ServerHostingDetails? serverDetails, @@ -226,7 +226,7 @@ class ServerInstallationFinished extends ServerInstallationState { required String super.providerApiToken, required String super.serverTypeIdentificator, required String super.dnsApiToken, - required BackblazeCredential super.backblazeCredential, + required BackupsCredential super.backblazeCredential, required ServerDomain super.serverDomain, required User super.rootUser, required ServerHostingDetails super.serverDetails, @@ -309,7 +309,7 @@ class ServerInstallationRecovery extends ServerInstallationState { final String? providerApiToken, final String? serverTypeIdentificator, final String? dnsApiToken, - final BackblazeCredential? backblazeCredential, + final BackupsCredential? backblazeCredential, final ServerDomain? serverDomain, final User? rootUser, final ServerHostingDetails? serverDetails, diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index ba49b9b3..58f7492d 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -1,7 +1,7 @@ import 'package:hive/hive.dart'; import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -16,7 +16,7 @@ class ApiConfigModel { ServerProvider? get serverProvider => _serverProvider; DnsProvider? get dnsProvider => _dnsProvider; - BackblazeCredential? get backblazeCredential => _backblazeCredential; + BackupsCredential? get backblazeCredential => _backblazeCredential; ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; @@ -27,7 +27,7 @@ class ApiConfigModel { ServerProvider? _serverProvider; DnsProvider? _dnsProvider; ServerHostingDetails? _serverDetails; - BackblazeCredential? _backblazeCredential; + BackupsCredential? _backblazeCredential; ServerDomain? _serverDomain; BackblazeBucket? _backblazeBucket; @@ -61,7 +61,7 @@ class ApiConfigModel { _serverLocation = serverLocation; } - Future storeBackblazeCredential(final BackblazeCredential value) async { + Future storeBackblazeCredential(final BackupsCredential value) async { await _box.put(BNames.backblazeCredential, value); _backblazeCredential = value; } diff --git a/lib/logic/models/hive/README.md b/lib/logic/models/hive/README.md index f8f9e14d..d50da34c 100644 --- a/lib/logic/models/hive/README.md +++ b/lib/logic/models/hive/README.md @@ -12,3 +12,4 @@ 100. DnsProvider 101. ServerProvider 102. UserType +103. BackupsProvider diff --git a/lib/logic/models/hive/backblaze_credential.dart b/lib/logic/models/hive/backblaze_credential.dart deleted file mode 100644 index d7bf2d06..00000000 --- a/lib/logic/models/hive/backblaze_credential.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'dart:convert'; - -import 'package:hive/hive.dart'; - -part 'backblaze_credential.g.dart'; - -@HiveType(typeId: 4) -class BackblazeCredential { - BackblazeCredential({required this.keyId, required this.applicationKey}); - - @HiveField(0) - final String keyId; - - @HiveField(1) - final String applicationKey; - - String get encodedApiKey => encodedBackblazeKey(keyId, applicationKey); - - @override - String toString() => '$keyId: $encodedApiKey'; -} - -String encodedBackblazeKey(final String? keyId, final String? applicationKey) { - final String apiKey = '$keyId:$applicationKey'; - final String encodedApiKey = base64.encode(utf8.encode(apiKey)); - return encodedApiKey; -} diff --git a/lib/logic/models/hive/backblaze_credential.g.dart b/lib/logic/models/hive/backblaze_credential.g.dart deleted file mode 100644 index c6ad373e..00000000 --- a/lib/logic/models/hive/backblaze_credential.g.dart +++ /dev/null @@ -1,44 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'backblaze_credential.dart'; - -// ************************************************************************** -// TypeAdapterGenerator -// ************************************************************************** - -class BackblazeCredentialAdapter extends TypeAdapter { - @override - final int typeId = 4; - - @override - BackblazeCredential read(BinaryReader reader) { - final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; - return BackblazeCredential( - keyId: fields[0] as String, - applicationKey: fields[1] as String, - ); - } - - @override - void write(BinaryWriter writer, BackblazeCredential obj) { - writer - ..writeByte(2) - ..writeByte(0) - ..write(obj.keyId) - ..writeByte(1) - ..write(obj.applicationKey); - } - - @override - int get hashCode => typeId.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BackblazeCredentialAdapter && - runtimeType == other.runtimeType && - typeId == other.typeId; -} diff --git a/lib/logic/models/hive/backups_credential.dart b/lib/logic/models/hive/backups_credential.dart new file mode 100644 index 00000000..c64345c4 --- /dev/null +++ b/lib/logic/models/hive/backups_credential.dart @@ -0,0 +1,51 @@ +import 'dart:convert'; + +import 'package:hive/hive.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; + +part 'backups_credential.g.dart'; + +@HiveType(typeId: 4) +class BackupsCredential { + BackupsCredential({required this.keyId, required this.applicationKey, required this.provider}); + + @HiveField(0) + final String keyId; + + @HiveField(1) + final String applicationKey; + + @HiveField(2, defaultValue: BackupsProvider.backblaze) + final BackupsProvider provider; + + String get encodedApiKey => encodedBackblazeKey(keyId, applicationKey); + + @override + String toString() => '$keyId: $encodedApiKey'; +} + +String encodedBackblazeKey(final String? keyId, final String? applicationKey) { + final String apiKey = '$keyId:$applicationKey'; + final String encodedApiKey = base64.encode(utf8.encode(apiKey)); + return encodedApiKey; +} + +@HiveType(typeId: 103) +enum BackupsProvider { + @HiveField(0) + none, + @HiveField(1) + memory, + @HiveField(2) + file, + @HiveField(3) + backblaze; + + factory BackupsProvider.fromGraphQL(final Enum$BackupProvider provider) => switch (provider) { + Enum$BackupProvider.NONE => none, + Enum$BackupProvider.MEMORY => memory, + Enum$BackupProvider.FILE => file, + Enum$BackupProvider.BACKBLAZE => backblaze, + Enum$BackupProvider.$unknown => none + }; +} diff --git a/lib/logic/models/hive/backups_credential.g.dart b/lib/logic/models/hive/backups_credential.g.dart new file mode 100644 index 00000000..9eae9093 --- /dev/null +++ b/lib/logic/models/hive/backups_credential.g.dart @@ -0,0 +1,93 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'backups_credential.dart'; + +// ************************************************************************** +// TypeAdapterGenerator +// ************************************************************************** + +class BackblazeCredentialAdapter extends TypeAdapter { + @override + final int typeId = 4; + + @override + BackblazeCredential read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { + for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), + }; + return BackblazeCredential( + keyId: fields[0] as String, + applicationKey: fields[1] as String, + ); + } + + @override + void write(BinaryWriter writer, BackblazeCredential obj) { + writer + ..writeByte(2) + ..writeByte(0) + ..write(obj.keyId) + ..writeByte(1) + ..write(obj.applicationKey); + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BackblazeCredentialAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} + +class BackupsProviderAdapter extends TypeAdapter { + @override + final int typeId = 103; + + @override + BackupsProvider read(BinaryReader reader) { + switch (reader.readByte()) { + case 0: + return BackupsProvider.none; + case 1: + return BackupsProvider.memory; + case 2: + return BackupsProvider.file; + case 3: + return BackupsProvider.backblaze; + default: + return BackupsProvider.none; + } + } + + @override + void write(BinaryWriter writer, BackupsProvider obj) { + switch (obj) { + case BackupsProvider.none: + writer.writeByte(0); + break; + case BackupsProvider.memory: + writer.writeByte(1); + break; + case BackupsProvider.file: + writer.writeByte(2); + break; + case BackupsProvider.backblaze: + writer.writeByte(3); + break; + } + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BackupsProviderAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} From 13af7e5e1d4e9e662821d16dc897d66638877928 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Jun 2023 04:30:46 +0300 Subject: [PATCH 530/732] feat(backups): Introduce read GraphQL nodes for backups --- .../graphql_maps/schema/backups.graphql | 24 + .../graphql_maps/schema/backups.graphql.dart | 1548 +++++++++++++++++ .../schema/disk_volumes.graphql.dart | 201 +++ .../graphql_maps/schema/schema.graphql | 256 +-- .../graphql_maps/schema/schema.graphql.dart | 516 +++++- .../schema/server_api.graphql.dart | 201 +++ .../schema/server_settings.graphql.dart | 201 +++ .../graphql_maps/schema/services.graphql | 2 +- .../graphql_maps/schema/services.graphql.dart | 201 +++ .../graphql_maps/schema/users.graphql.dart | 201 +++ 10 files changed, 3211 insertions(+), 140 deletions(-) create mode 100644 lib/logic/api_maps/graphql_maps/schema/backups.graphql create mode 100644 lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql new file mode 100644 index 00000000..36177fca --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -0,0 +1,24 @@ +query BackupConfiguration { + backup { + configuration { + autobackupPeriod + encryptionKey + isInitialized + locationId + locationName + provider + } + } +} + +query AllBackupSnapshots { + backup { + allSnapshots { + ...backupSnapshotFields + service { + displayName + id + } + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart new file mode 100644 index 00000000..37ee4109 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -0,0 +1,1548 @@ +import 'dart:async'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; + +class Query$BackupConfiguration { + Query$BackupConfiguration({ + required this.backup, + this.$__typename = 'Query', + }); + + factory Query$BackupConfiguration.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Query$BackupConfiguration( + backup: Query$BackupConfiguration$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$BackupConfiguration$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$BackupConfiguration) || + runtimeType != other.runtimeType) { + return false; + } + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$BackupConfiguration + on Query$BackupConfiguration { + CopyWith$Query$BackupConfiguration get copyWith => + CopyWith$Query$BackupConfiguration( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$BackupConfiguration { + factory CopyWith$Query$BackupConfiguration( + Query$BackupConfiguration instance, + TRes Function(Query$BackupConfiguration) then, + ) = _CopyWithImpl$Query$BackupConfiguration; + + factory CopyWith$Query$BackupConfiguration.stub(TRes res) = + _CopyWithStubImpl$Query$BackupConfiguration; + + TRes call({ + Query$BackupConfiguration$backup? backup, + String? $__typename, + }); + CopyWith$Query$BackupConfiguration$backup get backup; +} + +class _CopyWithImpl$Query$BackupConfiguration + implements CopyWith$Query$BackupConfiguration { + _CopyWithImpl$Query$BackupConfiguration( + this._instance, + this._then, + ); + + final Query$BackupConfiguration _instance; + + final TRes Function(Query$BackupConfiguration) _then; + + static const _undefined = {}; + + TRes call({ + Object? backup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$BackupConfiguration( + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Query$BackupConfiguration$backup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$BackupConfiguration$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Query$BackupConfiguration$backup( + local$backup, (e) => call(backup: e)); + } +} + +class _CopyWithStubImpl$Query$BackupConfiguration + implements CopyWith$Query$BackupConfiguration { + _CopyWithStubImpl$Query$BackupConfiguration(this._res); + + TRes _res; + + call({ + Query$BackupConfiguration$backup? backup, + String? $__typename, + }) => + _res; + CopyWith$Query$BackupConfiguration$backup get backup => + CopyWith$Query$BackupConfiguration$backup.stub(_res); +} + +const documentNodeQueryBackupConfiguration = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'BackupConfiguration'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'backup'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'configuration'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'autobackupPeriod'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'encryptionKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isInitialized'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'locationId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'locationName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), +]); +Query$BackupConfiguration _parserFn$Query$BackupConfiguration( + Map data) => + Query$BackupConfiguration.fromJson(data); +typedef OnQueryComplete$Query$BackupConfiguration = FutureOr Function( + Map?, + Query$BackupConfiguration?, +); + +class Options$Query$BackupConfiguration + extends graphql.QueryOptions { + Options$Query$BackupConfiguration({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$BackupConfiguration? typedOptimisticResult, + Duration? pollInterval, + graphql.Context? context, + OnQueryComplete$Query$BackupConfiguration? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + pollInterval: pollInterval, + context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$BackupConfiguration(data), + ), + onError: onError, + document: documentNodeQueryBackupConfiguration, + parserFn: _parserFn$Query$BackupConfiguration, + ); + + final OnQueryComplete$Query$BackupConfiguration? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; +} + +class WatchOptions$Query$BackupConfiguration + extends graphql.WatchQueryOptions { + WatchOptions$Query$BackupConfiguration({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$BackupConfiguration? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeQueryBackupConfiguration, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$BackupConfiguration, + ); +} + +class FetchMoreOptions$Query$BackupConfiguration + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$BackupConfiguration( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryBackupConfiguration, + ); +} + +extension ClientExtension$Query$BackupConfiguration on graphql.GraphQLClient { + Future> + query$BackupConfiguration( + [Options$Query$BackupConfiguration? options]) async => + await this.query(options ?? Options$Query$BackupConfiguration()); + graphql.ObservableQuery + watchQuery$BackupConfiguration( + [WatchOptions$Query$BackupConfiguration? options]) => + this.watchQuery(options ?? WatchOptions$Query$BackupConfiguration()); + void writeQuery$BackupConfiguration({ + required Query$BackupConfiguration data, + bool broadcast = true, + }) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryBackupConfiguration)), + data: data.toJson(), + broadcast: broadcast, + ); + Query$BackupConfiguration? readQuery$BackupConfiguration( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryBackupConfiguration)), + optimistic: optimistic, + ); + return result == null ? null : Query$BackupConfiguration.fromJson(result); + } +} + +class Query$BackupConfiguration$backup { + Query$BackupConfiguration$backup({ + required this.configuration, + this.$__typename = 'Backup', + }); + + factory Query$BackupConfiguration$backup.fromJson(Map json) { + final l$configuration = json['configuration']; + final l$$__typename = json['__typename']; + return Query$BackupConfiguration$backup( + configuration: Query$BackupConfiguration$backup$configuration.fromJson( + (l$configuration as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$BackupConfiguration$backup$configuration configuration; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$configuration = configuration; + _resultData['configuration'] = l$configuration.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$configuration = configuration; + final l$$__typename = $__typename; + return Object.hashAll([ + l$configuration, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$BackupConfiguration$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$configuration = configuration; + final lOther$configuration = other.configuration; + if (l$configuration != lOther$configuration) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$BackupConfiguration$backup + on Query$BackupConfiguration$backup { + CopyWith$Query$BackupConfiguration$backup + get copyWith => CopyWith$Query$BackupConfiguration$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$BackupConfiguration$backup { + factory CopyWith$Query$BackupConfiguration$backup( + Query$BackupConfiguration$backup instance, + TRes Function(Query$BackupConfiguration$backup) then, + ) = _CopyWithImpl$Query$BackupConfiguration$backup; + + factory CopyWith$Query$BackupConfiguration$backup.stub(TRes res) = + _CopyWithStubImpl$Query$BackupConfiguration$backup; + + TRes call({ + Query$BackupConfiguration$backup$configuration? configuration, + String? $__typename, + }); + CopyWith$Query$BackupConfiguration$backup$configuration + get configuration; +} + +class _CopyWithImpl$Query$BackupConfiguration$backup + implements CopyWith$Query$BackupConfiguration$backup { + _CopyWithImpl$Query$BackupConfiguration$backup( + this._instance, + this._then, + ); + + final Query$BackupConfiguration$backup _instance; + + final TRes Function(Query$BackupConfiguration$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? configuration = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$BackupConfiguration$backup( + configuration: configuration == _undefined || configuration == null + ? _instance.configuration + : (configuration as Query$BackupConfiguration$backup$configuration), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$BackupConfiguration$backup$configuration + get configuration { + final local$configuration = _instance.configuration; + return CopyWith$Query$BackupConfiguration$backup$configuration( + local$configuration, (e) => call(configuration: e)); + } +} + +class _CopyWithStubImpl$Query$BackupConfiguration$backup + implements CopyWith$Query$BackupConfiguration$backup { + _CopyWithStubImpl$Query$BackupConfiguration$backup(this._res); + + TRes _res; + + call({ + Query$BackupConfiguration$backup$configuration? configuration, + String? $__typename, + }) => + _res; + CopyWith$Query$BackupConfiguration$backup$configuration + get configuration => + CopyWith$Query$BackupConfiguration$backup$configuration.stub(_res); +} + +class Query$BackupConfiguration$backup$configuration { + Query$BackupConfiguration$backup$configuration({ + this.autobackupPeriod, + required this.encryptionKey, + required this.isInitialized, + this.locationId, + this.locationName, + required this.provider, + this.$__typename = 'BackupConfiguration', + }); + + factory Query$BackupConfiguration$backup$configuration.fromJson( + Map json) { + final l$autobackupPeriod = json['autobackupPeriod']; + final l$encryptionKey = json['encryptionKey']; + final l$isInitialized = json['isInitialized']; + final l$locationId = json['locationId']; + final l$locationName = json['locationName']; + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$BackupConfiguration$backup$configuration( + autobackupPeriod: (l$autobackupPeriod as int?), + encryptionKey: (l$encryptionKey as String), + isInitialized: (l$isInitialized as bool), + locationId: (l$locationId as String?), + locationName: (l$locationName as String?), + provider: fromJson$Enum$BackupProvider((l$provider as String)), + $__typename: (l$$__typename as String), + ); + } + + final int? autobackupPeriod; + + final String encryptionKey; + + final bool isInitialized; + + final String? locationId; + + final String? locationName; + + final Enum$BackupProvider provider; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$autobackupPeriod = autobackupPeriod; + _resultData['autobackupPeriod'] = l$autobackupPeriod; + final l$encryptionKey = encryptionKey; + _resultData['encryptionKey'] = l$encryptionKey; + final l$isInitialized = isInitialized; + _resultData['isInitialized'] = l$isInitialized; + final l$locationId = locationId; + _resultData['locationId'] = l$locationId; + final l$locationName = locationName; + _resultData['locationName'] = l$locationName; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$BackupProvider(l$provider); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$autobackupPeriod = autobackupPeriod; + final l$encryptionKey = encryptionKey; + final l$isInitialized = isInitialized; + final l$locationId = locationId; + final l$locationName = locationName; + final l$provider = provider; + final l$$__typename = $__typename; + return Object.hashAll([ + l$autobackupPeriod, + l$encryptionKey, + l$isInitialized, + l$locationId, + l$locationName, + l$provider, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$BackupConfiguration$backup$configuration) || + runtimeType != other.runtimeType) { + return false; + } + final l$autobackupPeriod = autobackupPeriod; + final lOther$autobackupPeriod = other.autobackupPeriod; + if (l$autobackupPeriod != lOther$autobackupPeriod) { + return false; + } + final l$encryptionKey = encryptionKey; + final lOther$encryptionKey = other.encryptionKey; + if (l$encryptionKey != lOther$encryptionKey) { + return false; + } + final l$isInitialized = isInitialized; + final lOther$isInitialized = other.isInitialized; + if (l$isInitialized != lOther$isInitialized) { + return false; + } + final l$locationId = locationId; + final lOther$locationId = other.locationId; + if (l$locationId != lOther$locationId) { + return false; + } + final l$locationName = locationName; + final lOther$locationName = other.locationName; + if (l$locationName != lOther$locationName) { + return false; + } + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$BackupConfiguration$backup$configuration + on Query$BackupConfiguration$backup$configuration { + CopyWith$Query$BackupConfiguration$backup$configuration< + Query$BackupConfiguration$backup$configuration> + get copyWith => CopyWith$Query$BackupConfiguration$backup$configuration( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$BackupConfiguration$backup$configuration { + factory CopyWith$Query$BackupConfiguration$backup$configuration( + Query$BackupConfiguration$backup$configuration instance, + TRes Function(Query$BackupConfiguration$backup$configuration) then, + ) = _CopyWithImpl$Query$BackupConfiguration$backup$configuration; + + factory CopyWith$Query$BackupConfiguration$backup$configuration.stub( + TRes res) = + _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration; + + TRes call({ + int? autobackupPeriod, + String? encryptionKey, + bool? isInitialized, + String? locationId, + String? locationName, + Enum$BackupProvider? provider, + String? $__typename, + }); +} + +class _CopyWithImpl$Query$BackupConfiguration$backup$configuration + implements CopyWith$Query$BackupConfiguration$backup$configuration { + _CopyWithImpl$Query$BackupConfiguration$backup$configuration( + this._instance, + this._then, + ); + + final Query$BackupConfiguration$backup$configuration _instance; + + final TRes Function(Query$BackupConfiguration$backup$configuration) _then; + + static const _undefined = {}; + + TRes call({ + Object? autobackupPeriod = _undefined, + Object? encryptionKey = _undefined, + Object? isInitialized = _undefined, + Object? locationId = _undefined, + Object? locationName = _undefined, + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$BackupConfiguration$backup$configuration( + autobackupPeriod: autobackupPeriod == _undefined + ? _instance.autobackupPeriod + : (autobackupPeriod as int?), + encryptionKey: encryptionKey == _undefined || encryptionKey == null + ? _instance.encryptionKey + : (encryptionKey as String), + isInitialized: isInitialized == _undefined || isInitialized == null + ? _instance.isInitialized + : (isInitialized as bool), + locationId: locationId == _undefined + ? _instance.locationId + : (locationId as String?), + locationName: locationName == _undefined + ? _instance.locationName + : (locationName as String?), + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$BackupProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration + implements CopyWith$Query$BackupConfiguration$backup$configuration { + _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration(this._res); + + TRes _res; + + call({ + int? autobackupPeriod, + String? encryptionKey, + bool? isInitialized, + String? locationId, + String? locationName, + Enum$BackupProvider? provider, + String? $__typename, + }) => + _res; +} + +class Query$AllBackupSnapshots { + Query$AllBackupSnapshots({ + required this.backup, + this.$__typename = 'Query', + }); + + factory Query$AllBackupSnapshots.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Query$AllBackupSnapshots( + backup: Query$AllBackupSnapshots$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$AllBackupSnapshots$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots) || + runtimeType != other.runtimeType) { + return false; + } + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$AllBackupSnapshots + on Query$AllBackupSnapshots { + CopyWith$Query$AllBackupSnapshots get copyWith => + CopyWith$Query$AllBackupSnapshots( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots { + factory CopyWith$Query$AllBackupSnapshots( + Query$AllBackupSnapshots instance, + TRes Function(Query$AllBackupSnapshots) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots; + + factory CopyWith$Query$AllBackupSnapshots.stub(TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots; + + TRes call({ + Query$AllBackupSnapshots$backup? backup, + String? $__typename, + }); + CopyWith$Query$AllBackupSnapshots$backup get backup; +} + +class _CopyWithImpl$Query$AllBackupSnapshots + implements CopyWith$Query$AllBackupSnapshots { + _CopyWithImpl$Query$AllBackupSnapshots( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots _instance; + + final TRes Function(Query$AllBackupSnapshots) _then; + + static const _undefined = {}; + + TRes call({ + Object? backup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$AllBackupSnapshots( + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Query$AllBackupSnapshots$backup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$AllBackupSnapshots$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Query$AllBackupSnapshots$backup( + local$backup, (e) => call(backup: e)); + } +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots + implements CopyWith$Query$AllBackupSnapshots { + _CopyWithStubImpl$Query$AllBackupSnapshots(this._res); + + TRes _res; + + call({ + Query$AllBackupSnapshots$backup? backup, + String? $__typename, + }) => + _res; + CopyWith$Query$AllBackupSnapshots$backup get backup => + CopyWith$Query$AllBackupSnapshots$backup.stub(_res); +} + +const documentNodeQueryAllBackupSnapshots = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'AllBackupSnapshots'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'backup'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allSnapshots'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'backupSnapshotFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'service'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitionbackupSnapshotFields, +]); +Query$AllBackupSnapshots _parserFn$Query$AllBackupSnapshots( + Map data) => + Query$AllBackupSnapshots.fromJson(data); +typedef OnQueryComplete$Query$AllBackupSnapshots = FutureOr Function( + Map?, + Query$AllBackupSnapshots?, +); + +class Options$Query$AllBackupSnapshots + extends graphql.QueryOptions { + Options$Query$AllBackupSnapshots({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$AllBackupSnapshots? typedOptimisticResult, + Duration? pollInterval, + graphql.Context? context, + OnQueryComplete$Query$AllBackupSnapshots? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + pollInterval: pollInterval, + context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$AllBackupSnapshots(data), + ), + onError: onError, + document: documentNodeQueryAllBackupSnapshots, + parserFn: _parserFn$Query$AllBackupSnapshots, + ); + + final OnQueryComplete$Query$AllBackupSnapshots? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; +} + +class WatchOptions$Query$AllBackupSnapshots + extends graphql.WatchQueryOptions { + WatchOptions$Query$AllBackupSnapshots({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$AllBackupSnapshots? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeQueryAllBackupSnapshots, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllBackupSnapshots, + ); +} + +class FetchMoreOptions$Query$AllBackupSnapshots + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$AllBackupSnapshots( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryAllBackupSnapshots, + ); +} + +extension ClientExtension$Query$AllBackupSnapshots on graphql.GraphQLClient { + Future> + query$AllBackupSnapshots( + [Options$Query$AllBackupSnapshots? options]) async => + await this.query(options ?? Options$Query$AllBackupSnapshots()); + graphql.ObservableQuery + watchQuery$AllBackupSnapshots( + [WatchOptions$Query$AllBackupSnapshots? options]) => + this.watchQuery(options ?? WatchOptions$Query$AllBackupSnapshots()); + void writeQuery$AllBackupSnapshots({ + required Query$AllBackupSnapshots data, + bool broadcast = true, + }) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryAllBackupSnapshots)), + data: data.toJson(), + broadcast: broadcast, + ); + Query$AllBackupSnapshots? readQuery$AllBackupSnapshots( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllBackupSnapshots)), + optimistic: optimistic, + ); + return result == null ? null : Query$AllBackupSnapshots.fromJson(result); + } +} + +class Query$AllBackupSnapshots$backup { + Query$AllBackupSnapshots$backup({ + required this.allSnapshots, + this.$__typename = 'Backup', + }); + + factory Query$AllBackupSnapshots$backup.fromJson(Map json) { + final l$allSnapshots = json['allSnapshots']; + final l$$__typename = json['__typename']; + return Query$AllBackupSnapshots$backup( + allSnapshots: (l$allSnapshots as List) + .map((e) => Query$AllBackupSnapshots$backup$allSnapshots.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } + + final List allSnapshots; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$allSnapshots = allSnapshots; + _resultData['allSnapshots'] = + l$allSnapshots.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$allSnapshots = allSnapshots; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$allSnapshots.map((v) => v)), + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$allSnapshots = allSnapshots; + final lOther$allSnapshots = other.allSnapshots; + if (l$allSnapshots.length != lOther$allSnapshots.length) { + return false; + } + for (int i = 0; i < l$allSnapshots.length; i++) { + final l$allSnapshots$entry = l$allSnapshots[i]; + final lOther$allSnapshots$entry = lOther$allSnapshots[i]; + if (l$allSnapshots$entry != lOther$allSnapshots$entry) { + return false; + } + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$AllBackupSnapshots$backup + on Query$AllBackupSnapshots$backup { + CopyWith$Query$AllBackupSnapshots$backup + get copyWith => CopyWith$Query$AllBackupSnapshots$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots$backup { + factory CopyWith$Query$AllBackupSnapshots$backup( + Query$AllBackupSnapshots$backup instance, + TRes Function(Query$AllBackupSnapshots$backup) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots$backup; + + factory CopyWith$Query$AllBackupSnapshots$backup.stub(TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots$backup; + + TRes call({ + List? allSnapshots, + String? $__typename, + }); + TRes allSnapshots( + Iterable Function( + Iterable< + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots< + Query$AllBackupSnapshots$backup$allSnapshots>>) + _fn); +} + +class _CopyWithImpl$Query$AllBackupSnapshots$backup + implements CopyWith$Query$AllBackupSnapshots$backup { + _CopyWithImpl$Query$AllBackupSnapshots$backup( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots$backup _instance; + + final TRes Function(Query$AllBackupSnapshots$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? allSnapshots = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$AllBackupSnapshots$backup( + allSnapshots: allSnapshots == _undefined || allSnapshots == null + ? _instance.allSnapshots + : (allSnapshots + as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + TRes allSnapshots( + Iterable Function( + Iterable< + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots< + Query$AllBackupSnapshots$backup$allSnapshots>>) + _fn) => + call( + allSnapshots: _fn(_instance.allSnapshots + .map((e) => CopyWith$Query$AllBackupSnapshots$backup$allSnapshots( + e, + (i) => i, + ))).toList()); +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots$backup + implements CopyWith$Query$AllBackupSnapshots$backup { + _CopyWithStubImpl$Query$AllBackupSnapshots$backup(this._res); + + TRes _res; + + call({ + List? allSnapshots, + String? $__typename, + }) => + _res; + allSnapshots(_fn) => _res; +} + +class Query$AllBackupSnapshots$backup$allSnapshots + implements Fragment$backupSnapshotFields { + Query$AllBackupSnapshots$backup$allSnapshots({ + required this.id, + required this.createdAt, + this.$__typename = 'SnapshotInfo', + required this.service, + }); + + factory Query$AllBackupSnapshots$backup$allSnapshots.fromJson( + Map json) { + final l$id = json['id']; + final l$createdAt = json['createdAt']; + final l$$__typename = json['__typename']; + final l$service = json['service']; + return Query$AllBackupSnapshots$backup$allSnapshots( + id: (l$id as String), + createdAt: dateTimeFromJson(l$createdAt), + $__typename: (l$$__typename as String), + service: Query$AllBackupSnapshots$backup$allSnapshots$service.fromJson( + (l$service as Map)), + ); + } + + final String id; + + final DateTime createdAt; + + final String $__typename; + + final Query$AllBackupSnapshots$backup$allSnapshots$service service; + + Map toJson() { + final _resultData = {}; + final l$id = id; + _resultData['id'] = l$id; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$service = service; + _resultData['service'] = l$service.toJson(); + return _resultData; + } + + @override + int get hashCode { + final l$id = id; + final l$createdAt = createdAt; + final l$$__typename = $__typename; + final l$service = service; + return Object.hashAll([ + l$id, + l$createdAt, + l$$__typename, + l$service, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots$backup$allSnapshots) || + runtimeType != other.runtimeType) { + return false; + } + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) { + return false; + } + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + final l$service = service; + final lOther$service = other.service; + if (l$service != lOther$service) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$AllBackupSnapshots$backup$allSnapshots + on Query$AllBackupSnapshots$backup$allSnapshots { + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots< + Query$AllBackupSnapshots$backup$allSnapshots> + get copyWith => CopyWith$Query$AllBackupSnapshots$backup$allSnapshots( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots( + Query$AllBackupSnapshots$backup$allSnapshots instance, + TRes Function(Query$AllBackupSnapshots$backup$allSnapshots) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots; + + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots.stub(TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots; + + TRes call({ + String? id, + DateTime? createdAt, + String? $__typename, + Query$AllBackupSnapshots$backup$allSnapshots$service? service, + }); + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service + get service; +} + +class _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots + implements CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { + _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots$backup$allSnapshots _instance; + + final TRes Function(Query$AllBackupSnapshots$backup$allSnapshots) _then; + + static const _undefined = {}; + + TRes call({ + Object? id = _undefined, + Object? createdAt = _undefined, + Object? $__typename = _undefined, + Object? service = _undefined, + }) => + _then(Query$AllBackupSnapshots$backup$allSnapshots( + id: id == _undefined || id == null ? _instance.id : (id as String), + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + service: service == _undefined || service == null + ? _instance.service + : (service as Query$AllBackupSnapshots$backup$allSnapshots$service), + )); + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service + get service { + final local$service = _instance.service; + return CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service( + local$service, (e) => call(service: e)); + } +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots + implements CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots(this._res); + + TRes _res; + + call({ + String? id, + DateTime? createdAt, + String? $__typename, + Query$AllBackupSnapshots$backup$allSnapshots$service? service, + }) => + _res; + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service + get service => + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service.stub( + _res); +} + +class Query$AllBackupSnapshots$backup$allSnapshots$service { + Query$AllBackupSnapshots$backup$allSnapshots$service({ + required this.displayName, + required this.id, + this.$__typename = 'Service', + }); + + factory Query$AllBackupSnapshots$backup$allSnapshots$service.fromJson( + Map json) { + final l$displayName = json['displayName']; + final l$id = json['id']; + final l$$__typename = json['__typename']; + return Query$AllBackupSnapshots$backup$allSnapshots$service( + displayName: (l$displayName as String), + id: (l$id as String), + $__typename: (l$$__typename as String), + ); + } + + final String displayName; + + final String id; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$displayName = displayName; + _resultData['displayName'] = l$displayName; + final l$id = id; + _resultData['id'] = l$id; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$displayName = displayName; + final l$id = id; + final l$$__typename = $__typename; + return Object.hashAll([ + l$displayName, + l$id, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots$backup$allSnapshots$service) || + runtimeType != other.runtimeType) { + return false; + } + final l$displayName = displayName; + final lOther$displayName = other.displayName; + if (l$displayName != lOther$displayName) { + return false; + } + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$AllBackupSnapshots$backup$allSnapshots$service + on Query$AllBackupSnapshots$backup$allSnapshots$service { + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service< + Query$AllBackupSnapshots$backup$allSnapshots$service> + get copyWith => + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service< + TRes> { + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service( + Query$AllBackupSnapshots$backup$allSnapshots$service instance, + TRes Function(Query$AllBackupSnapshots$backup$allSnapshots$service) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots$service; + + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service.stub( + TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service; + + TRes call({ + String? displayName, + String? id, + String? $__typename, + }); +} + +class _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots$service + implements + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service { + _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots$service( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots$backup$allSnapshots$service _instance; + + final TRes Function(Query$AllBackupSnapshots$backup$allSnapshots$service) + _then; + + static const _undefined = {}; + + TRes call({ + Object? displayName = _undefined, + Object? id = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$AllBackupSnapshots$backup$allSnapshots$service( + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + id: id == _undefined || id == null ? _instance.id : (id as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service< + TRes> + implements + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service { + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service( + this._res); + + TRes _res; + + call({ + String? displayName, + String? id, + String? $__typename, + }) => + _res; +} diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 84550cc2..2f62067b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -27,6 +27,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -151,6 +155,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -183,6 +190,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -221,6 +232,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -260,6 +273,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1008,6 +1029,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 89bc30c8..81f06b06 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -1,54 +1,54 @@ type Alert { - message: String! severity: Severity! - timestamp: DateTime title: String! + message: String! + timestamp: DateTime } type Api { - devices: [ApiDevice!]! - recoveryKey: ApiRecoveryKeyStatus! version: String! + recoveryKey: ApiRecoveryKeyStatus! + devices: [ApiDevice!]! } type ApiDevice { + name: String! creationDate: DateTime! isCaller: Boolean! - name: String! } type ApiJob { - createdAt: DateTime! - description: String! - error: String - finishedAt: DateTime + uid: String! name: String! - progress: Int - result: String + description: String! status: String! statusText: String - uid: String! + progress: Int + createdAt: DateTime! updatedAt: DateTime! + finishedAt: DateTime + error: String + result: String } type ApiKeyMutationReturn implements MutationReturnInterface { + success: Boolean! + message: String! code: Int! key: String - message: String! - success: Boolean! } type ApiRecoveryKeyStatus { - creationDate: DateTime exists: Boolean! + valid: Boolean! + creationDate: DateTime expirationDate: DateTime usesLeft: Int - valid: Boolean! } type AutoUpgradeOptions { - allowReboot: Boolean! enable: Boolean! + allowReboot: Boolean! } input AutoUpgradeSettingsInput { @@ -57,52 +57,89 @@ input AutoUpgradeSettingsInput { } type AutoUpgradeSettingsMutationReturn implements MutationReturnInterface { - allowReboot: Boolean! + success: Boolean! + message: String! code: Int! enableAutoUpgrade: Boolean! - message: String! - success: Boolean! + allowReboot: Boolean! +} + +type Backup { + configuration: BackupConfiguration! + allSnapshots: [SnapshotInfo!]! +} + +type BackupConfiguration { + provider: BackupProvider! + encryptionKey: String! + isInitialized: Boolean! + autobackupPeriod: Int + locationName: String + locationId: String +} + +enum BackupProvider { + BACKBLAZE + NONE + MEMORY + FILE } """Date with time (isoformat)""" scalar DateTime type DeviceApiTokenMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! token: String } enum DnsProvider { - CLOUDFLARE, + CLOUDFLARE + DIGITALOCEAN DESEC } type DnsRecord { - content: String! - name: String! - priority: Int recordType: String! + name: String! + content: String! ttl: Int! + priority: Int +} + +type GenericBackupConfigReturn implements MutationReturnInterface { + success: Boolean! + message: String! + code: Int! + configuration: BackupConfiguration } type GenericJobButationReturn implements MutationReturnInterface { + success: Boolean! + message: String! code: Int! job: ApiJob - message: String! - success: Boolean! } type GenericMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! +} + +input InitializeRepositoryInput { + provider: BackupProvider! + locationId: String! + locationName: String! + login: String! + password: String! } type Job { - getJob(jobId: String!): ApiJob getJobs: [ApiJob!]! + getJob(jobId: String!): ApiJob } input MigrateToBindsInput { @@ -119,52 +156,59 @@ input MoveServiceInput { } type Mutation { - addSshKey(sshInput: SshMutationInput!): UserMutationReturn! - authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! - changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! - changeTimezone(timezone: String!): TimezoneMutationReturn! - createUser(user: UserMutationInput!): UserMutationReturn! - deleteDeviceApiToken(device: String!): GenericMutationReturn! - deleteUser(username: String!): GenericMutationReturn! - disableService(serviceId: String!): ServiceMutationReturn! - enableService(serviceId: String!): ServiceMutationReturn! - getNewDeviceApiKey: ApiKeyMutationReturn! getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput = null): ApiKeyMutationReturn! - invalidateNewDeviceApiKey: GenericMutationReturn! - migrateToBinds(input: MigrateToBindsInput!): GenericJobButationReturn! - mountVolume(name: String!): GenericMutationReturn! - moveService(input: MoveServiceInput!): ServiceJobMutationReturn! - pullRepositoryChanges: GenericMutationReturn! - rebootSystem: GenericMutationReturn! + useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! refreshDeviceApiToken: DeviceApiTokenMutationReturn! - removeJob(jobId: String!): GenericMutationReturn! - removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! - resizeVolume(name: String!): GenericMutationReturn! - restartService(serviceId: String!): ServiceMutationReturn! + deleteDeviceApiToken(device: String!): GenericMutationReturn! + getNewDeviceApiKey: ApiKeyMutationReturn! + invalidateNewDeviceApiKey: GenericMutationReturn! + authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! + changeTimezone(timezone: String!): TimezoneMutationReturn! + changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! runSystemRebuild: GenericMutationReturn! runSystemRollback: GenericMutationReturn! runSystemUpgrade: GenericMutationReturn! - startService(serviceId: String!): ServiceMutationReturn! - stopService(serviceId: String!): ServiceMutationReturn! - testMutation: GenericMutationReturn! - unmountVolume(name: String!): GenericMutationReturn! + rebootSystem: GenericMutationReturn! + pullRepositoryChanges: GenericMutationReturn! + createUser(user: UserMutationInput!): UserMutationReturn! + deleteUser(username: String!): GenericMutationReturn! updateUser(user: UserMutationInput!): UserMutationReturn! - useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! + addSshKey(sshInput: SshMutationInput!): UserMutationReturn! + removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! + resizeVolume(name: String!): GenericMutationReturn! + mountVolume(name: String!): GenericMutationReturn! + unmountVolume(name: String!): GenericMutationReturn! + migrateToBinds(input: MigrateToBindsInput!): GenericJobButationReturn! + enableService(serviceId: String!): ServiceMutationReturn! + disableService(serviceId: String!): ServiceMutationReturn! + stopService(serviceId: String!): ServiceMutationReturn! + startService(serviceId: String!): ServiceMutationReturn! + restartService(serviceId: String!): ServiceMutationReturn! + moveService(input: MoveServiceInput!): ServiceJobMutationReturn! + removeJob(jobId: String!): GenericMutationReturn! + initializeRepository(repository: InitializeRepositoryInput!): GenericBackupConfigReturn! + removeRepository: GenericBackupConfigReturn! + setAutobackupPeriod(period: Int = null): GenericBackupConfigReturn! + startBackup(serviceId: String = null): GenericJobButationReturn! + restoreBackup(snapshotId: String!): GenericJobButationReturn! + forceSnapshotsReload: GenericMutationReturn! + testMutation: GenericMutationReturn! } interface MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! } type Query { + system: System! api: Api! + users: Users! + storage: Storage! jobs: Job! services: Services! - storage: Storage! - system: System! - users: Users! + backup: Backup! } input RecoveryKeyLimitsInput { @@ -178,49 +222,50 @@ enum ServerProvider { } type Service { - description: String! - displayName: String! - dnsRecords: [DnsRecord!] id: String! - isEnabled: Boolean! + displayName: String! + description: String! + svgIcon: String! isMovable: Boolean! isRequired: Boolean! + isEnabled: Boolean! status: ServiceStatusEnum! - storageUsage: ServiceStorageUsage! - svgIcon: String! url: String + dnsRecords: [DnsRecord!] + storageUsage: ServiceStorageUsage! + backupSnapshots: [SnapshotInfo!] } type ServiceJobMutationReturn implements MutationReturnInterface { + success: Boolean! + message: String! code: Int! job: ApiJob - message: String! service: Service - success: Boolean! } type ServiceMutationReturn implements MutationReturnInterface { - code: Int! - message: String! - service: Service success: Boolean! + message: String! + code: Int! + service: Service } enum ServiceStatusEnum { - ACTIVATING ACTIVE - DEACTIVATING - FAILED - INACTIVE - OFF RELOADING + INACTIVE + FAILED + ACTIVATING + DEACTIVATING + OFF } type ServiceStorageUsage implements StorageUsageInterface { - service: Service - title: String! usedSpace: String! volume: StorageVolume + title: String! + service: Service } type Services { @@ -228,11 +273,17 @@ type Services { } enum Severity { - CRITICAL - ERROR INFO - SUCCESS WARNING + ERROR + CRITICAL + SUCCESS +} + +type SnapshotInfo { + id: String! + service: Service! + createdAt: DateTime! } input SshMutationInput { @@ -251,21 +302,21 @@ type Storage { } interface StorageUsageInterface { - title: String! usedSpace: String! volume: StorageVolume + title: String! } type StorageVolume { - freeSpace: String! - model: String - name: String! - root: Boolean! - serial: String totalSpace: String! + freeSpace: String! + usedSpace: String! + root: Boolean! + name: String! + model: String + serial: String type: String! usages: [StorageUsageInterface!]! - usedSpace: String! } type Subscription { @@ -273,12 +324,12 @@ type Subscription { } type System { - busy: Boolean! + status: Alert! domainInfo: SystemDomainInfo! + settings: SystemSettings! info: SystemInfo! provider: SystemProviderInfo! - settings: SystemSettings! - status: Alert! + busy: Boolean! workingDirectory: String! } @@ -290,14 +341,14 @@ type SystemDomainInfo { } type SystemInfo { - pythonVersion: String! systemVersion: String! + pythonVersion: String! usingBinds: Boolean! } type SystemProviderInfo { - id: String! provider: ServerProvider! + id: String! } type SystemSettings { @@ -307,9 +358,9 @@ type SystemSettings { } type TimezoneMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! timezone: String } @@ -324,9 +375,9 @@ input UseRecoveryKeyInput { } type User { - sshKeys: [String!]! userType: UserType! username: String! + sshKeys: [String!]! } input UserMutationInput { @@ -335,9 +386,9 @@ input UserMutationInput { } type UserMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! user: User } @@ -358,4 +409,9 @@ fragment dnsRecordFields on DnsRecord { priority recordType ttl -} \ No newline at end of file +} + +fragment backupSnapshotFields on SnapshotInfo { + id + createdAt +} diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 9325f5cb..ea4947ad 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -143,6 +143,190 @@ class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput _res; } +class Input$InitializeRepositoryInput { + factory Input$InitializeRepositoryInput({ + required Enum$BackupProvider provider, + required String locationId, + required String locationName, + required String login, + required String password, + }) => + Input$InitializeRepositoryInput._({ + r'provider': provider, + r'locationId': locationId, + r'locationName': locationName, + r'login': login, + r'password': password, + }); + + Input$InitializeRepositoryInput._(this._$data); + + factory Input$InitializeRepositoryInput.fromJson(Map data) { + final result$data = {}; + final l$provider = data['provider']; + result$data['provider'] = + fromJson$Enum$BackupProvider((l$provider as String)); + final l$locationId = data['locationId']; + result$data['locationId'] = (l$locationId as String); + final l$locationName = data['locationName']; + result$data['locationName'] = (l$locationName as String); + final l$login = data['login']; + result$data['login'] = (l$login as String); + final l$password = data['password']; + result$data['password'] = (l$password as String); + return Input$InitializeRepositoryInput._(result$data); + } + + Map _$data; + + Enum$BackupProvider get provider => + (_$data['provider'] as Enum$BackupProvider); + String get locationId => (_$data['locationId'] as String); + String get locationName => (_$data['locationName'] as String); + String get login => (_$data['login'] as String); + String get password => (_$data['password'] as String); + Map toJson() { + final result$data = {}; + final l$provider = provider; + result$data['provider'] = toJson$Enum$BackupProvider(l$provider); + final l$locationId = locationId; + result$data['locationId'] = l$locationId; + final l$locationName = locationName; + result$data['locationName'] = l$locationName; + final l$login = login; + result$data['login'] = l$login; + final l$password = password; + result$data['password'] = l$password; + return result$data; + } + + CopyWith$Input$InitializeRepositoryInput + get copyWith => CopyWith$Input$InitializeRepositoryInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$InitializeRepositoryInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) { + return false; + } + final l$locationId = locationId; + final lOther$locationId = other.locationId; + if (l$locationId != lOther$locationId) { + return false; + } + final l$locationName = locationName; + final lOther$locationName = other.locationName; + if (l$locationName != lOther$locationName) { + return false; + } + final l$login = login; + final lOther$login = other.login; + if (l$login != lOther$login) { + return false; + } + final l$password = password; + final lOther$password = other.password; + if (l$password != lOther$password) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$provider = provider; + final l$locationId = locationId; + final l$locationName = locationName; + final l$login = login; + final l$password = password; + return Object.hashAll([ + l$provider, + l$locationId, + l$locationName, + l$login, + l$password, + ]); + } +} + +abstract class CopyWith$Input$InitializeRepositoryInput { + factory CopyWith$Input$InitializeRepositoryInput( + Input$InitializeRepositoryInput instance, + TRes Function(Input$InitializeRepositoryInput) then, + ) = _CopyWithImpl$Input$InitializeRepositoryInput; + + factory CopyWith$Input$InitializeRepositoryInput.stub(TRes res) = + _CopyWithStubImpl$Input$InitializeRepositoryInput; + + TRes call({ + Enum$BackupProvider? provider, + String? locationId, + String? locationName, + String? login, + String? password, + }); +} + +class _CopyWithImpl$Input$InitializeRepositoryInput + implements CopyWith$Input$InitializeRepositoryInput { + _CopyWithImpl$Input$InitializeRepositoryInput( + this._instance, + this._then, + ); + + final Input$InitializeRepositoryInput _instance; + + final TRes Function(Input$InitializeRepositoryInput) _then; + + static const _undefined = {}; + + TRes call({ + Object? provider = _undefined, + Object? locationId = _undefined, + Object? locationName = _undefined, + Object? login = _undefined, + Object? password = _undefined, + }) => + _then(Input$InitializeRepositoryInput._({ + ..._instance._$data, + if (provider != _undefined && provider != null) + 'provider': (provider as Enum$BackupProvider), + if (locationId != _undefined && locationId != null) + 'locationId': (locationId as String), + if (locationName != _undefined && locationName != null) + 'locationName': (locationName as String), + if (login != _undefined && login != null) 'login': (login as String), + if (password != _undefined && password != null) + 'password': (password as String), + })); +} + +class _CopyWithStubImpl$Input$InitializeRepositoryInput + implements CopyWith$Input$InitializeRepositoryInput { + _CopyWithStubImpl$Input$InitializeRepositoryInput(this._res); + + TRes _res; + + call({ + Enum$BackupProvider? provider, + String? locationId, + String? locationName, + String? login, + String? password, + }) => + _res; +} + class Input$MigrateToBindsInput { factory Input$MigrateToBindsInput({ required String emailBlockDevice, @@ -1096,12 +1280,46 @@ class _CopyWithStubImpl$Input$UserMutationInput _res; } -enum Enum$DnsProvider { CLOUDFLARE, DESEC, $unknown } +enum Enum$BackupProvider { BACKBLAZE, NONE, MEMORY, FILE, $unknown } + +String toJson$Enum$BackupProvider(Enum$BackupProvider e) { + switch (e) { + case Enum$BackupProvider.BACKBLAZE: + return r'BACKBLAZE'; + case Enum$BackupProvider.NONE: + return r'NONE'; + case Enum$BackupProvider.MEMORY: + return r'MEMORY'; + case Enum$BackupProvider.FILE: + return r'FILE'; + case Enum$BackupProvider.$unknown: + return r'$unknown'; + } +} + +Enum$BackupProvider fromJson$Enum$BackupProvider(String value) { + switch (value) { + case r'BACKBLAZE': + return Enum$BackupProvider.BACKBLAZE; + case r'NONE': + return Enum$BackupProvider.NONE; + case r'MEMORY': + return Enum$BackupProvider.MEMORY; + case r'FILE': + return Enum$BackupProvider.FILE; + default: + return Enum$BackupProvider.$unknown; + } +} + +enum Enum$DnsProvider { CLOUDFLARE, DIGITALOCEAN, DESEC, $unknown } String toJson$Enum$DnsProvider(Enum$DnsProvider e) { switch (e) { case Enum$DnsProvider.CLOUDFLARE: return r'CLOUDFLARE'; + case Enum$DnsProvider.DIGITALOCEAN: + return r'DIGITALOCEAN'; case Enum$DnsProvider.DESEC: return r'DESEC'; case Enum$DnsProvider.$unknown: @@ -1113,6 +1331,8 @@ Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { switch (value) { case r'CLOUDFLARE': return Enum$DnsProvider.CLOUDFLARE; + case r'DIGITALOCEAN': + return Enum$DnsProvider.DIGITALOCEAN; case r'DESEC': return Enum$DnsProvider.DESEC; default: @@ -1145,32 +1365,32 @@ Enum$ServerProvider fromJson$Enum$ServerProvider(String value) { } enum Enum$ServiceStatusEnum { - ACTIVATING, ACTIVE, - DEACTIVATING, - FAILED, - INACTIVE, - OFF, RELOADING, + INACTIVE, + FAILED, + ACTIVATING, + DEACTIVATING, + OFF, $unknown } String toJson$Enum$ServiceStatusEnum(Enum$ServiceStatusEnum e) { switch (e) { - case Enum$ServiceStatusEnum.ACTIVATING: - return r'ACTIVATING'; case Enum$ServiceStatusEnum.ACTIVE: return r'ACTIVE'; - case Enum$ServiceStatusEnum.DEACTIVATING: - return r'DEACTIVATING'; - case Enum$ServiceStatusEnum.FAILED: - return r'FAILED'; - case Enum$ServiceStatusEnum.INACTIVE: - return r'INACTIVE'; - case Enum$ServiceStatusEnum.OFF: - return r'OFF'; case Enum$ServiceStatusEnum.RELOADING: return r'RELOADING'; + case Enum$ServiceStatusEnum.INACTIVE: + return r'INACTIVE'; + case Enum$ServiceStatusEnum.FAILED: + return r'FAILED'; + case Enum$ServiceStatusEnum.ACTIVATING: + return r'ACTIVATING'; + case Enum$ServiceStatusEnum.DEACTIVATING: + return r'DEACTIVATING'; + case Enum$ServiceStatusEnum.OFF: + return r'OFF'; case Enum$ServiceStatusEnum.$unknown: return r'$unknown'; } @@ -1178,39 +1398,39 @@ String toJson$Enum$ServiceStatusEnum(Enum$ServiceStatusEnum e) { Enum$ServiceStatusEnum fromJson$Enum$ServiceStatusEnum(String value) { switch (value) { - case r'ACTIVATING': - return Enum$ServiceStatusEnum.ACTIVATING; case r'ACTIVE': return Enum$ServiceStatusEnum.ACTIVE; - case r'DEACTIVATING': - return Enum$ServiceStatusEnum.DEACTIVATING; - case r'FAILED': - return Enum$ServiceStatusEnum.FAILED; - case r'INACTIVE': - return Enum$ServiceStatusEnum.INACTIVE; - case r'OFF': - return Enum$ServiceStatusEnum.OFF; case r'RELOADING': return Enum$ServiceStatusEnum.RELOADING; + case r'INACTIVE': + return Enum$ServiceStatusEnum.INACTIVE; + case r'FAILED': + return Enum$ServiceStatusEnum.FAILED; + case r'ACTIVATING': + return Enum$ServiceStatusEnum.ACTIVATING; + case r'DEACTIVATING': + return Enum$ServiceStatusEnum.DEACTIVATING; + case r'OFF': + return Enum$ServiceStatusEnum.OFF; default: return Enum$ServiceStatusEnum.$unknown; } } -enum Enum$Severity { CRITICAL, ERROR, INFO, SUCCESS, WARNING, $unknown } +enum Enum$Severity { INFO, WARNING, ERROR, CRITICAL, SUCCESS, $unknown } String toJson$Enum$Severity(Enum$Severity e) { switch (e) { - case Enum$Severity.CRITICAL: - return r'CRITICAL'; - case Enum$Severity.ERROR: - return r'ERROR'; case Enum$Severity.INFO: return r'INFO'; - case Enum$Severity.SUCCESS: - return r'SUCCESS'; case Enum$Severity.WARNING: return r'WARNING'; + case Enum$Severity.ERROR: + return r'ERROR'; + case Enum$Severity.CRITICAL: + return r'CRITICAL'; + case Enum$Severity.SUCCESS: + return r'SUCCESS'; case Enum$Severity.$unknown: return r'$unknown'; } @@ -1218,16 +1438,16 @@ String toJson$Enum$Severity(Enum$Severity e) { Enum$Severity fromJson$Enum$Severity(String value) { switch (value) { - case r'CRITICAL': - return Enum$Severity.CRITICAL; - case r'ERROR': - return Enum$Severity.ERROR; case r'INFO': return Enum$Severity.INFO; - case r'SUCCESS': - return Enum$Severity.SUCCESS; case r'WARNING': return Enum$Severity.WARNING; + case r'ERROR': + return Enum$Severity.ERROR; + case r'CRITICAL': + return Enum$Severity.CRITICAL; + case r'SUCCESS': + return Enum$Severity.SUCCESS; default: return Enum$Severity.$unknown; } @@ -1555,11 +1775,229 @@ extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient { } } +class Fragment$backupSnapshotFields { + Fragment$backupSnapshotFields({ + required this.id, + required this.createdAt, + this.$__typename = 'SnapshotInfo', + }); + + factory Fragment$backupSnapshotFields.fromJson(Map json) { + final l$id = json['id']; + final l$createdAt = json['createdAt']; + final l$$__typename = json['__typename']; + return Fragment$backupSnapshotFields( + id: (l$id as String), + createdAt: dateTimeFromJson(l$createdAt), + $__typename: (l$$__typename as String), + ); + } + + final String id; + + final DateTime createdAt; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$id = id; + _resultData['id'] = l$id; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$id = id; + final l$createdAt = createdAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$id, + l$createdAt, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$backupSnapshotFields) || + runtimeType != other.runtimeType) { + return false; + } + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) { + return false; + } + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$backupSnapshotFields + on Fragment$backupSnapshotFields { + CopyWith$Fragment$backupSnapshotFields + get copyWith => CopyWith$Fragment$backupSnapshotFields( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$backupSnapshotFields { + factory CopyWith$Fragment$backupSnapshotFields( + Fragment$backupSnapshotFields instance, + TRes Function(Fragment$backupSnapshotFields) then, + ) = _CopyWithImpl$Fragment$backupSnapshotFields; + + factory CopyWith$Fragment$backupSnapshotFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$backupSnapshotFields; + + TRes call({ + String? id, + DateTime? createdAt, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$backupSnapshotFields + implements CopyWith$Fragment$backupSnapshotFields { + _CopyWithImpl$Fragment$backupSnapshotFields( + this._instance, + this._then, + ); + + final Fragment$backupSnapshotFields _instance; + + final TRes Function(Fragment$backupSnapshotFields) _then; + + static const _undefined = {}; + + TRes call({ + Object? id = _undefined, + Object? createdAt = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$backupSnapshotFields( + id: id == _undefined || id == null ? _instance.id : (id as String), + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$backupSnapshotFields + implements CopyWith$Fragment$backupSnapshotFields { + _CopyWithStubImpl$Fragment$backupSnapshotFields(this._res); + + TRes _res; + + call({ + String? id, + DateTime? createdAt, + String? $__typename, + }) => + _res; +} + +const fragmentDefinitionbackupSnapshotFields = FragmentDefinitionNode( + name: NameNode(value: 'backupSnapshotFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'SnapshotInfo'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); +const documentNodeFragmentbackupSnapshotFields = DocumentNode(definitions: [ + fragmentDefinitionbackupSnapshotFields, +]); + +extension ClientExtension$Fragment$backupSnapshotFields + on graphql.GraphQLClient { + void writeFragment$backupSnapshotFields({ + required Fragment$backupSnapshotFields data, + required Map idFields, + bool broadcast = true, + }) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'backupSnapshotFields', + document: documentNodeFragmentbackupSnapshotFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$backupSnapshotFields? readFragment$backupSnapshotFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'backupSnapshotFields', + document: documentNodeFragmentbackupSnapshotFields, + ), + ), + optimistic: optimistic, + ); + return result == null + ? null + : Fragment$backupSnapshotFields.fromJson(result); + } +} + const possibleTypesMap = >{ 'MutationReturnInterface': { 'ApiKeyMutationReturn', 'AutoUpgradeSettingsMutationReturn', 'DeviceApiTokenMutationReturn', + 'GenericBackupConfigReturn', 'GenericJobButationReturn', 'GenericMutationReturn', 'ServiceJobMutationReturn', diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index f41e841f..cbd77ad0 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -28,6 +28,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -152,6 +156,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -184,6 +191,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -222,6 +233,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -261,6 +274,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1009,6 +1030,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 64738ad8..98e6dd77 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -27,6 +27,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -151,6 +155,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -183,6 +190,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -221,6 +232,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -260,6 +273,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1008,6 +1029,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index 7386c362..7998e5c0 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -77,4 +77,4 @@ mutation MoveService($input: MoveServiceInput!) { updatedAt } } -} \ No newline at end of file +} diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 616788d8..8ea9cbbc 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -28,6 +28,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -152,6 +156,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -184,6 +191,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -222,6 +233,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -261,6 +274,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1009,6 +1030,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 02cde074..1a7d4e98 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -27,6 +27,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -151,6 +155,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -183,6 +190,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -221,6 +232,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -260,6 +273,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1008,6 +1029,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ From 5069563d45171b6e73418e2a4b908dc89e49eb2b Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Jun 2023 04:31:23 +0300 Subject: [PATCH 531/732] chore(router): Rebuild the router with latest AutoRoute --- lib/ui/router/router.gr.dart | 554 +++++++++++++++++------------------ 1 file changed, 277 insertions(+), 277 deletions(-) diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index a4e919b6..4ceba014 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -15,6 +15,24 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { + BackupDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const BackupDetailsPage(), + ); + }, + DevicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DevicesScreen(), + ); + }, + DnsDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DnsDetailsPage(), + ); + }, AppSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -27,10 +45,10 @@ abstract class _$RootRouter extends RootStackRouter { child: const DeveloperSettingsPage(), ); }, - ConsoleRoute.name: (routeData) { + AboutApplicationRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const ConsolePage(), + child: const AboutApplicationPage(), ); }, MoreRoute.name: (routeData) { @@ -39,10 +57,10 @@ abstract class _$RootRouter extends RootStackRouter { child: const MorePage(), ); }, - AboutApplicationRoute.name: (routeData) { + ConsoleRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AboutApplicationPage(), + child: const ConsolePage(), ); }, OnboardingRoute.name: (routeData) { @@ -57,84 +75,16 @@ abstract class _$RootRouter extends RootStackRouter { child: const ProvidersPage(), ); }, - ServerDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServerDetailsScreen(), - ); - }, - ServiceRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServicePage( - serviceId: args.serviceId, - key: args.key, - ), - ); - }, - ServicesRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServicesPage(), - ); - }, - UsersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const UsersPage(), - ); - }, - NewUserRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const NewUserPage(), - ); - }, - UserDetailsRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: UserDetailsPage( - login: args.login, - key: args.key, - ), - ); - }, - BackupDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const BackupDetailsPage(), - ); - }, - DnsDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DnsDetailsPage(), - ); - }, - RecoveryRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryRouting(), - ); - }, - InitializingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const InitializingPage(), - ); - }, RecoveryKeyRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, child: const RecoveryKeyPage(), ); }, - DevicesRoute.name: (routeData) { + ServerDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const DevicesScreen(), + child: const ServerDetailsScreen(), ); }, ServicesMigrationRoute.name: (routeData) { @@ -170,6 +120,56 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, + ServiceRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServicePage( + serviceId: args.serviceId, + key: args.key, + ), + ); + }, + ServicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServicesPage(), + ); + }, + InitializingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const InitializingPage(), + ); + }, + RecoveryRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryRouting(), + ); + }, + UsersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const UsersPage(), + ); + }, + NewUserRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const NewUserPage(), + ); + }, + UserDetailsRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: UserDetailsPage( + login: args.login, + key: args.key, + ), + ); + }, RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -179,6 +179,48 @@ abstract class _$RootRouter extends RootStackRouter { }; } +/// generated route for +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) + : super( + BackupDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'BackupDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) + : super( + DevicesRoute.name, + initialChildren: children, + ); + + static const String name = 'DevicesRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute({List? children}) + : super( + DnsDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'DnsDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [AppSettingsPage] class AppSettingsRoute extends PageRouteInfo { @@ -208,15 +250,15 @@ class DeveloperSettingsRoute extends PageRouteInfo { } /// generated route for -/// [ConsolePage] -class ConsoleRoute extends PageRouteInfo { - const ConsoleRoute({List? children}) +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) : super( - ConsoleRoute.name, + AboutApplicationRoute.name, initialChildren: children, ); - static const String name = 'ConsoleRoute'; + static const String name = 'AboutApplicationRoute'; static const PageInfo page = PageInfo(name); } @@ -236,15 +278,15 @@ class MoreRoute extends PageRouteInfo { } /// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute({List? children}) : super( - AboutApplicationRoute.name, + ConsoleRoute.name, initialChildren: children, ); - static const String name = 'AboutApplicationRoute'; + static const String name = 'ConsoleRoute'; static const PageInfo page = PageInfo(name); } @@ -277,194 +319,6 @@ class ProvidersRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) - : super( - ServerDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'ServerDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ServicePage] -class ServiceRoute extends PageRouteInfo { - ServiceRoute({ - required String serviceId, - Key? key, - List? children, - }) : super( - ServiceRoute.name, - args: ServiceRouteArgs( - serviceId: serviceId, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ServiceRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ServiceRouteArgs { - const ServiceRouteArgs({ - required this.serviceId, - this.key, - }); - - final String serviceId; - - final Key? key; - - @override - String toString() { - return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; - } -} - -/// generated route for -/// [ServicesPage] -class ServicesRoute extends PageRouteInfo { - const ServicesRoute({List? children}) - : super( - ServicesRoute.name, - initialChildren: children, - ); - - static const String name = 'ServicesRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UsersPage] -class UsersRoute extends PageRouteInfo { - const UsersRoute({List? children}) - : super( - UsersRoute.name, - initialChildren: children, - ); - - static const String name = 'UsersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [NewUserPage] -class NewUserRoute extends PageRouteInfo { - const NewUserRoute({List? children}) - : super( - NewUserRoute.name, - initialChildren: children, - ); - - static const String name = 'NewUserRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UserDetailsPage] -class UserDetailsRoute extends PageRouteInfo { - UserDetailsRoute({ - required String login, - Key? key, - List? children, - }) : super( - UserDetailsRoute.name, - args: UserDetailsRouteArgs( - login: login, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'UserDetailsRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class UserDetailsRouteArgs { - const UserDetailsRouteArgs({ - required this.login, - this.key, - }); - - final String login; - - final Key? key; - - @override - String toString() { - return 'UserDetailsRouteArgs{login: $login, key: $key}'; - } -} - -/// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) - : super( - BackupDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'BackupDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DnsDetailsPage] -class DnsDetailsRoute extends PageRouteInfo { - const DnsDetailsRoute({List? children}) - : super( - DnsDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'DnsDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [RecoveryRouting] -class RecoveryRoute extends PageRouteInfo { - const RecoveryRoute({List? children}) - : super( - RecoveryRoute.name, - initialChildren: children, - ); - - static const String name = 'RecoveryRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [InitializingPage] -class InitializingRoute extends PageRouteInfo { - const InitializingRoute({List? children}) - : super( - InitializingRoute.name, - initialChildren: children, - ); - - static const String name = 'InitializingRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [RecoveryKeyPage] class RecoveryKeyRoute extends PageRouteInfo { @@ -480,15 +334,15 @@ class RecoveryKeyRoute extends PageRouteInfo { } /// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) : super( - DevicesRoute.name, + ServerDetailsRoute.name, initialChildren: children, ); - static const String name = 'DevicesRoute'; + static const String name = 'ServerDetailsRoute'; static const PageInfo page = PageInfo(name); } @@ -622,6 +476,152 @@ class ServerStorageRouteArgs { } } +/// generated route for +/// [ServicePage] +class ServiceRoute extends PageRouteInfo { + ServiceRoute({ + required String serviceId, + Key? key, + List? children, + }) : super( + ServiceRoute.name, + args: ServiceRouteArgs( + serviceId: serviceId, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'ServiceRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServiceRouteArgs { + const ServiceRouteArgs({ + required this.serviceId, + this.key, + }); + + final String serviceId; + + final Key? key; + + @override + String toString() { + return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; + } +} + +/// generated route for +/// [ServicesPage] +class ServicesRoute extends PageRouteInfo { + const ServicesRoute({List? children}) + : super( + ServicesRoute.name, + initialChildren: children, + ); + + static const String name = 'ServicesRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute({List? children}) + : super( + InitializingRoute.name, + initialChildren: children, + ); + + static const String name = 'InitializingRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [RecoveryRouting] +class RecoveryRoute extends PageRouteInfo { + const RecoveryRoute({List? children}) + : super( + RecoveryRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UsersPage] +class UsersRoute extends PageRouteInfo { + const UsersRoute({List? children}) + : super( + UsersRoute.name, + initialChildren: children, + ); + + static const String name = 'UsersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [NewUserPage] +class NewUserRoute extends PageRouteInfo { + const NewUserRoute({List? children}) + : super( + NewUserRoute.name, + initialChildren: children, + ); + + static const String name = 'NewUserRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UserDetailsPage] +class UserDetailsRoute extends PageRouteInfo { + UserDetailsRoute({ + required String login, + Key? key, + List? children, + }) : super( + UserDetailsRoute.name, + args: UserDetailsRouteArgs( + login: login, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'UserDetailsRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class UserDetailsRouteArgs { + const UserDetailsRouteArgs({ + required this.login, + this.key, + }); + + final String login; + + final Key? key; + + @override + String toString() { + return 'UserDetailsRouteArgs{login: $login, key: $key}'; + } +} + /// generated route for /// [RootPage] class RootRoute extends PageRouteInfo { From 53e72504f7a269f8cdb388cdcea214c7884eb468 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Jun 2023 05:59:48 +0300 Subject: [PATCH 532/732] refactor: Allow changing values for TLS settings --- assets/translations/en.json | 8 +++++--- assets/translations/ru.json | 6 +++--- lib/logic/api_maps/graphql_maps/api_map.dart | 4 ++-- .../digital_ocean/digital_ocean_api.dart | 4 ++-- .../server_providers/hetzner/hetzner_api.dart | 4 ++-- .../{staging_options.dart => tls_options.dart} | 4 ++-- .../server_installation_cubit.dart | 6 +++--- .../server_installation_repository.dart | 4 ++-- .../more/app_settings/developer_settings.dart | 17 ++++++++++++++--- 9 files changed, 35 insertions(+), 22 deletions(-) rename lib/logic/api_maps/{staging_options.dart => tls_options.dart} (89%) diff --git a/assets/translations/en.json b/assets/translations/en.json index 0ac7562e..b45e6ac2 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -493,7 +493,7 @@ "required": "Required", "already_exist": "Already exists", "invalid_format": "Invalid format", - "invalid_format_password": "Must not contain empty characters", + "invalid_format_password": "Password must not contain spaces", "invalid_format_ssh": "Must follow the SSH key format", "root_name": "Cannot be 'root'", "length_not_equal": "Length is [], should be {}", @@ -507,10 +507,12 @@ "subtitle": "These settings are for debugging only. Don't change them unless you know what you're doing.", "server_setup": "Server setup", "use_staging_acme": "Use staging ACME server", - "use_staging_acme_description": "Rebuild your app to change this value.", + "use_staging_acme_description": "Applies when setting up a new server.", + "ignore_tls": "Do not verify TLS certificates", + "ignore_tls_description": "App will not verify TLS certificates when connecting to the server.", "routing": "App routing", "reset_onboarding": "Reset onboarding switch", "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} \ No newline at end of file +} diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 8fdf0054..9b0c93ad 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -310,7 +310,7 @@ "no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...", "dns_provider_bad_key_error": "API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", - "connect_to_dns": "Подключите DNS провайдер", + "connect_to_dns": "Подключите DNS провайдера", "connect_to_dns_provider_text": "С помощью API токена приложение SelfPrivacy настроит DNS записи", "manage_domain_dns": "Для управления DNS вашего домена", "use_this_domain": "Используем этот домен?", @@ -472,10 +472,10 @@ "required": "Обязательное поле", "already_exist": "Уже существует", "invalid_format": "Неверный формат", - "invalid_format_password": "Должен не содержать пустые символы", + "invalid_format_password": "Пароль не должен содержать пробелы", "invalid_format_ssh": "Должен следовать формату SSH ключей", "root_name": "Имя пользователя не может быть 'root'", "length_not_equal": "Длина строки [], должна быть равна {}", "length_longer": "Длина строки [], должна быть меньше либо равна {}" } -} \ No newline at end of file +} diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index 34e39b7a..32359f93 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:http/io_client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/message.dart'; void _logToAppConsole(final T objectToLog) { @@ -56,7 +56,7 @@ class ResponseLoggingParser extends ResponseParser { abstract class ApiMap { Future getClient() async { IOClient? ioClient; - if (StagingOptions.stagingAcme || !StagingOptions.verifyCertificate) { + if (TlsOptions.stagingAcme || !TlsOptions.verifyCertificate) { final HttpClient httpClient = HttpClient(); httpClient.badCertificateCallback = ( final cert, diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 1fcb46c5..976ddb6b 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -4,7 +4,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart'; @@ -314,7 +314,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { required final String hostName, required final String serverType, }) async { - final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; + final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false'; int? dropletId; Response? serverCreateResponse; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 7dc1bd28..338c96dd 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -4,7 +4,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -355,7 +355,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { required final int volumeId, required final String serverType, }) async { - final String stagingAcme = StagingOptions.stagingAcme ? 'true' : 'false'; + final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false'; Response? serverCreateResponse; HetznerServerInfo? serverInfo; DioError? hetznerError; diff --git a/lib/logic/api_maps/staging_options.dart b/lib/logic/api_maps/tls_options.dart similarity index 89% rename from lib/logic/api_maps/staging_options.dart rename to lib/logic/api_maps/tls_options.dart index a4e98fe8..b216841c 100644 --- a/lib/logic/api_maps/staging_options.dart +++ b/lib/logic/api_maps/tls_options.dart @@ -1,11 +1,11 @@ /// Controls staging environment for network -class StagingOptions { +class TlsOptions { /// Whether we request for staging temprorary certificates. /// Hardcode to 'true' in the middle of testing to not /// get your domain banned by constant certificate renewal /// /// If set to 'true', the 'verifyCertificate' becomes useless - static bool get stagingAcme => false; + static bool stagingAcme = false; /// Should we consider CERTIFICATE_VERIFY_FAILED code an error /// For now it's just a global variable and DNS API diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 50c6b09a..714179ca 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -9,7 +9,7 @@ import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; -import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -407,7 +407,7 @@ class ServerInstallationCubit extends Cubit { emit(TimerState(dataState: dataState, isLoading: true)); final bool isServerWorking = await repository.isHttpServerWorking(); - StagingOptions.verifyCertificate = true; + TlsOptions.verifyCertificate = true; if (isServerWorking) { bool dkimCreated = true; @@ -757,7 +757,7 @@ class ServerInstallationCubit extends Cubit { void clearAppConfig() { closeTimer(); ProvidersController.clearProviders(); - StagingOptions.verifyCertificate = false; + TlsOptions.verifyCertificate = false; repository.clearAppConfig(); emit(const ServerInstallationEmpty()); } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index a9122b33..96fa4d8d 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/config/hive_config.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/provider_settings.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; -import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -75,7 +75,7 @@ class ServerInstallationRepository { } if (box.get(BNames.hasFinalChecked, defaultValue: false)) { - StagingOptions.verifyCertificate = true; + TlsOptions.verifyCertificate = true; return ServerInstallationFinished( installationDialoguePopUp: null, providerApiToken: providerApiToken!, diff --git a/lib/ui/pages/more/app_settings/developer_settings.dart b/lib/ui/pages/more/app_settings/developer_settings.dart index 220cb791..c2a34916 100644 --- a/lib/ui/pages/more/app_settings/developer_settings.dart +++ b/lib/ui/pages/more/app_settings/developer_settings.dart @@ -1,6 +1,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/logic/api_maps/staging_options.dart'; +import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/devices/devices_cubit.dart'; import 'package:selfprivacy/logic/cubit/recovery_key/recovery_key_cubit.dart'; @@ -37,8 +37,19 @@ class _DeveloperSettingsPageState extends State { title: Text('developer_settings.use_staging_acme'.tr()), subtitle: Text('developer_settings.use_staging_acme_description'.tr()), - value: StagingOptions.stagingAcme, - onChanged: null, + value: TlsOptions.stagingAcme, + onChanged: (final bool value) => setState( + () => TlsOptions.stagingAcme = value, + ), + ), + SwitchListTile( + title: Text('developer_settings.ignore_tls'.tr()), + subtitle: + Text('developer_settings.ignore_tls_description'.tr()), + value: TlsOptions.verifyCertificate, + onChanged: (final bool value) => setState( + () => TlsOptions.verifyCertificate = value, + ), ), Padding( padding: const EdgeInsets.all(16), From c87b8345503af6ba3a5deb081568ad1c902ed80b Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 16 Jun 2023 06:00:08 +0300 Subject: [PATCH 533/732] fix: dialogs during server setup --- .../server_installation/server_installation_cubit.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 714179ca..7b972acb 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -724,10 +724,10 @@ class ServerInstallationCubit extends Cubit { @override void onChange(final Change change) { - if (change.currentState.installationDialoguePopUp != null && + if (change.nextState.installationDialoguePopUp != null && change.currentState.installationDialoguePopUp != - state.installationDialoguePopUp) { - final branching = change.currentState.installationDialoguePopUp; + change.nextState.installationDialoguePopUp) { + final branching = change.nextState.installationDialoguePopUp; showPopUpAlert( alertTitle: branching!.title, description: branching.description, From 4adcca5746e1446e39f79b68d044562b160d08d1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 16 Jun 2023 00:52:04 -0300 Subject: [PATCH 534/732] fix: Resolve timer conflicts on emultiple emits --- .../server_installation_cubit.dart | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 7b972acb..cf83fb81 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -231,6 +231,7 @@ class ServerInstallationCubit extends Cubit { (state as ServerInstallationNotFinished).copyWith( isLoading: false, serverDetails: serverDetails, + installationDialoguePopUp: null, ), ); runDelayed(startServerIfDnsIsOkay, const Duration(seconds: 30), null); @@ -734,20 +735,24 @@ class ServerInstallationCubit extends Cubit { actionButtonTitle: branching.choices[1].title, actionButtonOnPressed: () async { final branchingResult = await branching.choices[1].callback!(); - emit( - (state as ServerInstallationNotFinished).copyWith( - installationDialoguePopUp: branchingResult.data, - ), - ); + if (!branchingResult.success) { + emit( + (state as ServerInstallationNotFinished).copyWith( + installationDialoguePopUp: branchingResult.data, + ), + ); + } }, cancelButtonTitle: branching.choices[0].title, cancelButtonOnPressed: () async { final branchingResult = await branching.choices[0].callback!(); - emit( - (state as ServerInstallationNotFinished).copyWith( - installationDialoguePopUp: branchingResult.data, - ), - ); + if (!branchingResult.success) { + emit( + (state as ServerInstallationNotFinished).copyWith( + installationDialoguePopUp: branchingResult.data, + ), + ); + } }, ); } From 6337889ab76cf67b0aecd3e4fa5f71b756f0f106 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 11:59:11 -0300 Subject: [PATCH 535/732] chore: Remove unneeded files --- .../cloudflare/cloudflare_api_factory.dart | 16 --------- .../desec/desec_api_factory.dart | 16 --------- .../digital_ocean_dns_api_factory.dart | 16 --------- .../dns_provider_api_settings.dart | 10 ------ .../dns_providers/dns_provider_factory.dart | 8 ----- .../rest_maps/provider_api_settings.dart | 8 ----- .../digital_ocean_api_factory.dart | 34 ------------------- .../hetzner/hetzner_api_factory.dart | 34 ------------------- .../server_provider_api_settings.dart | 11 ------ .../server_provider_factory.dart | 15 -------- 10 files changed, 168 deletions(-) delete mode 100644 lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api_factory.dart delete mode 100644 lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api_factory.dart delete mode 100644 lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api_factory.dart delete mode 100644 lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart delete mode 100644 lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart delete mode 100644 lib/logic/api_maps/rest_maps/provider_api_settings.dart delete mode 100644 lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart delete mode 100644 lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart delete mode 100644 lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart delete mode 100644 lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api_factory.dart deleted file mode 100644 index ba5bd703..00000000 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api_factory.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; - -class CloudflareApiFactory extends DnsProviderApiFactory { - @override - DnsProviderApi getDnsProvider({ - final DnsProviderApiSettings settings = const DnsProviderApiSettings(), - }) => - CloudflareApi( - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - customToken: settings.customToken, - ); -} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api_factory.dart deleted file mode 100644 index 11a9c37b..00000000 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api_factory.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; - -class DesecApiFactory extends DnsProviderApiFactory { - @override - DnsProviderApi getDnsProvider({ - final DnsProviderApiSettings settings = const DnsProviderApiSettings(), - }) => - DesecApi( - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - customToken: settings.customToken, - ); -} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api_factory.dart deleted file mode 100644 index 4be2c74b..00000000 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api_factory.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart'; - -class DigitalOceanDnsApiFactory extends DnsProviderApiFactory { - @override - DnsProviderApi getDnsProvider({ - final DnsProviderApiSettings settings = const DnsProviderApiSettings(), - }) => - DigitalOceanDnsApi( - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - customToken: settings.customToken, - ); -} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart deleted file mode 100644 index 6b737df5..00000000 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; - -class DnsProviderApiSettings extends ProviderApiSettings { - const DnsProviderApiSettings({ - super.hasLogger = false, - super.isWithToken = true, - this.customToken, - }); - final String? customToken; -} diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart deleted file mode 100644 index fb573135..00000000 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider_api_settings.dart'; - -abstract class DnsProviderApiFactory { - DnsProviderApi getDnsProvider({ - final DnsProviderApiSettings settings, - }); -} diff --git a/lib/logic/api_maps/rest_maps/provider_api_settings.dart b/lib/logic/api_maps/rest_maps/provider_api_settings.dart deleted file mode 100644 index 9e601d2a..00000000 --- a/lib/logic/api_maps/rest_maps/provider_api_settings.dart +++ /dev/null @@ -1,8 +0,0 @@ -class ProviderApiSettings { - const ProviderApiSettings({ - this.hasLogger = false, - this.isWithToken = true, - }); - final bool hasLogger; - final bool isWithToken; -} diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart deleted file mode 100644 index 6383c4ab..00000000 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api_factory.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; - -class DigitalOceanApiFactory extends ServerProviderApiFactory - with VolumeProviderApiFactory { - DigitalOceanApiFactory({this.region}); - - final String? region; - - @override - ServerProviderApi getServerProvider({ - final ServerProviderApiSettings settings = - const ServerProviderApiSettings(), - }) => - DigitalOceanApi( - region: settings.region ?? region, - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - ); - - @override - VolumeProviderApi getVolumeProvider({ - final ServerProviderApiSettings settings = - const ServerProviderApiSettings(), - }) => - DigitalOceanApi( - region: settings.region ?? region, - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - ); -} diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart deleted file mode 100644 index 6824d385..00000000 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api_factory.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; - -class HetznerApiFactory extends ServerProviderApiFactory - with VolumeProviderApiFactory { - HetznerApiFactory({this.region}); - - final String? region; - - @override - ServerProviderApi getServerProvider({ - final ServerProviderApiSettings settings = - const ServerProviderApiSettings(), - }) => - HetznerApi( - region: settings.region ?? region, - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - ); - - @override - VolumeProviderApi getVolumeProvider({ - final ServerProviderApiSettings settings = - const ServerProviderApiSettings(), - }) => - HetznerApi( - region: settings.region ?? region, - hasLogger: settings.hasLogger, - isWithToken: settings.isWithToken, - ); -} diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart deleted file mode 100644 index 3931b45b..00000000 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart'; - -class ServerProviderApiSettings extends ProviderApiSettings { - const ServerProviderApiSettings({ - this.region, - super.hasLogger = false, - super.isWithToken = true, - }); - - final String? region; -} diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart deleted file mode 100644 index dbbb8035..00000000 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider_factory.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider_api_settings.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; - -abstract class ServerProviderApiFactory { - ServerProviderApi getServerProvider({ - final ServerProviderApiSettings settings, - }); -} - -mixin VolumeProviderApiFactory { - VolumeProviderApi getVolumeProvider({ - final ServerProviderApiSettings settings, - }); -} From 0502e68cc1a71842a85e07ebe682f9e81bb5cd52 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 12:12:15 -0300 Subject: [PATCH 536/732] chore: Remove unused function --- .../server_installation_repository.dart | 56 ------------------- 1 file changed, 56 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 96fa4d8d..2a9707fe 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -203,62 +203,6 @@ class ServerInstallationRepository { return matches; } - Future createDnsRecords( - final ServerHostingDetails serverDetails, - final ServerDomain domain, { - required final void Function() onCancel, - }) async { - final serverProvider = ProvidersController.currentServerProvider!; - - void showDomainErrorPopUp(final String error) { - showPopUpAlert( - alertTitle: error, - description: 'modals.delete_server_volume'.tr(), - cancelButtonOnPressed: onCancel, - actionButtonTitle: 'basis.delete'.tr(), - actionButtonOnPressed: () async { - await serverProvider.deleteServer( - domain.domainName, - ); - onCancel(); - }, - ); - } - - final GenericResult removingResult = - await ProvidersController.currentDnsProvider!.removeDomainRecords( - ip4: serverDetails.ip4, - domain: domain, - ); - - if (!removingResult.success) { - showDomainErrorPopUp('domain.error'.tr()); - return false; - } - - bool createdSuccessfully = false; - String errorMessage = 'domain.error'.tr(); - try { - final GenericResult createResult = - await ProvidersController.currentDnsProvider!.createDomainRecords( - ip4: serverDetails.ip4, - domain: domain, - ); - createdSuccessfully = createResult.success; - } on DioError catch (e) { - if (e.response!.data['errors'][0]['code'] == 1038) { - errorMessage = 'modals.you_cant_use_this_api'.tr(); - } - } - - if (!createdSuccessfully) { - showDomainErrorPopUp(errorMessage); - return false; - } - - return true; - } - Future createDkimRecord(final ServerDomain cloudFlareDomain) async { final ServerApi api = ServerApi(); From e418a58e5b9db28d39dc309494819bff5d85870a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 14:42:48 -0300 Subject: [PATCH 537/732] chore: Remove unused ApiTokenvalidatoin --- .../digital_ocean_dns/digital_ocean_dns_api.dart | 3 --- .../server_providers/hetzner/hetzner_api.dart | 6 ------ .../rest_maps/server_providers/server_provider.dart | 9 --------- .../setup/initializing/server_provider_form_cubit.dart | 3 --- .../server_installation/server_installation_cubit.dart | 10 +++++++++- .../server_installation_repository.dart | 2 -- lib/logic/models/launch_installation_data.dart | 3 --- lib/logic/providers/server_providers/hetzner.dart | 9 --------- 8 files changed, 9 insertions(+), 36 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 992e6766..8f0a8b3d 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -19,9 +19,6 @@ class DigitalOceanDnsApi extends DnsProviderApi { final String? customToken; - RegExp getApiTokenValidation() => - RegExp(r'\s+|[!$%^&*()@+|~=`{}\[\]:<>?,.\/]'); - @override BaseOptions get options { final BaseOptions options = BaseOptions( diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 338c96dd..b8ec3c26 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -98,12 +98,6 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { ); } - ProviderApiTokenValidation getApiTokenValidation() => - ProviderApiTokenValidation( - regexp: RegExp(r'\s+|[-!$%^&*()@+|~=`{}\[\]:<>?,.\/]'), - length: 64, - ); - Future> getPricePerGb() async { double? price; diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index 88250ab3..d4988c99 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -1,15 +1,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; -class ProviderApiTokenValidation { - ProviderApiTokenValidation({ - required this.length, - required this.regexp, - }); - final int length; - final RegExp regexp; -} - abstract class ServerProviderApi extends ApiMap { /// Provider name key which lets infect understand what kind of installation /// it requires, for example 'digitaloceal' for Digital Ocean diff --git a/lib/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart index 97144d29..5df3e31a 100644 --- a/lib/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart @@ -6,13 +6,10 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ class ServerProviderFormCubit extends FormCubit { ServerProviderFormCubit(this.serverInstallationCubit) { - //final int tokenLength = - // serverInstallationCubit.serverProviderApiTokenValidation().length; apiKey = FieldCubit( initalValue: '', validations: [ RequiredStringValidation('validations.required'.tr()), - //LengthStringNotEqualValidation(tokenLength), ], ); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index cf83fb81..7730c5a3 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -227,6 +227,15 @@ class ServerInstallationCubit extends Cubit { final ServerHostingDetails serverDetails, ) async { await repository.saveServerDetails(serverDetails); + await ProvidersController.currentDnsProvider!.removeDomainRecords( + ip4: serverDetails.ip4, + domain: state.serverDomain!, + ); + await ProvidersController.currentDnsProvider!.createDomainRecords( + ip4: serverDetails.ip4, + domain: state.serverDomain!, + ); + emit( (state as ServerInstallationNotFinished).copyWith( isLoading: false, @@ -248,7 +257,6 @@ class ServerInstallationCubit extends Cubit { serverTypeId: state.serverTypeIdentificator!, errorCallback: clearAppConfig, successCallback: onCreateServerSuccess, - dnsProvider: ProvidersController.currentDnsProvider!, ); final result = diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 2a9707fe..7c45bc20 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; -import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; @@ -22,7 +21,6 @@ import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; -import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/utils/network_utils.dart'; class IpNotFoundException implements Exception { diff --git a/lib/logic/models/launch_installation_data.dart b/lib/logic/models/launch_installation_data.dart index 37638835..c1f32ee6 100644 --- a/lib/logic/models/launch_installation_data.dart +++ b/lib/logic/models/launch_installation_data.dart @@ -1,14 +1,12 @@ import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; -import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; class LaunchInstallationData { LaunchInstallationData({ required this.rootUser, required this.dnsApiToken, required this.dnsProviderType, - required this.dnsProvider, required this.serverDomain, required this.serverTypeId, required this.errorCallback, @@ -19,7 +17,6 @@ class LaunchInstallationData { final String dnsApiToken; final ServerDomain serverDomain; final DnsProviderType dnsProviderType; - final DnsProvider dnsProvider; final String serverTypeId; final Function() errorCallback; final Function(ServerHostingDetails details) successCallback; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 192674f5..874f4f59 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -588,15 +588,6 @@ class HetznerServerProvider extends ServerProvider { } await installationData.successCallback(serverDetails); - await installationData.dnsProvider.removeDomainRecords( - ip4: serverDetails.ip4, - domain: installationData.serverDomain, - ); - await installationData.dnsProvider.createDomainRecords( - ip4: serverDetails.ip4, - domain: installationData.serverDomain, - ); - return GenericResult(success: true, data: null); } From 0d49b89e438d99e31d84d1a047dc8484cabf74c6 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 14:52:07 -0300 Subject: [PATCH 538/732] chore: Remove unused function for Cloudflare provider --- .../cloudflare/cloudflare_api.dart | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index 50ecd7a7..983ab3a4 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -217,26 +217,6 @@ class CloudflareApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - Future setDnsRecord( - final DnsRecord record, - final ServerDomain domain, - ) async { - final String domainZoneId = domain.zoneId; - final String url = '$rootAddress/zones/$domainZoneId/dns_records'; - - final Dio client = await getClient(); - try { - await client.post( - url, - data: record.toJson(), - ); - } catch (e) { - print(e); - } finally { - close(client); - } - } - Future> getDomains() async { final String url = '$rootAddress/zones'; List domains = []; From 3fedb175533ffd3b8910ab7fb9f5af24d2d4755b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 14:59:46 -0300 Subject: [PATCH 539/732] chore: Remove unused function from Desec API --- .../rest_maps/dns_providers/desec/desec_api.dart | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index f8915c5a..46b11532 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -4,7 +4,6 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/json/dns_records.dart'; class DesecApi extends DnsProviderApi { DesecApi({ @@ -171,15 +170,6 @@ class DesecApi extends DnsProviderApi { return GenericResult(success: true, data: null); } - String? extractContent(final DnsRecord record) { - String? content = record.content; - if (record.type == 'TXT' && content != null && !content.startsWith('"')) { - content = '"$content"'; - } - - return content; - } - Future> getDomains() async { List domains = []; From f9da202093716a0397136c5d12e9dc156a965091 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 15:09:26 -0300 Subject: [PATCH 540/732] chore: Remove unused abstractions --- .../dns_providers/cloudflare/cloudflare_api.dart | 5 +++-- .../rest_maps/dns_providers/desec/desec_api.dart | 5 +++-- .../digital_ocean_dns/digital_ocean_dns_api.dart | 5 +++-- .../api_maps/rest_maps/dns_providers/dns_provider.dart | 10 ---------- .../digital_ocean/digital_ocean_api.dart | 3 +-- .../server_providers/hetzner/hetzner_api.dart | 3 +-- .../rest_maps/server_providers/volume_provider.dart | 5 ----- lib/logic/cubit/dns_records/dns_records_cubit.dart | 2 +- lib/logic/providers/dns_providers/cloudflare.dart | 2 +- .../providers/dns_providers/digital_ocean_dns.dart | 2 +- 10 files changed, 14 insertions(+), 28 deletions(-) delete mode 100644 lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart delete mode 100644 lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index 983ab3a4..9ff01bf7 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -2,11 +2,12 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -class CloudflareApi extends DnsProviderApi { +class CloudflareApi extends ApiMap { CloudflareApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index 46b11532..cab65b6a 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -2,10 +2,11 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -class DesecApi extends DnsProviderApi { +class DesecApi extends ApiMap { DesecApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 8f0a8b3d..76f9e78e 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -2,11 +2,12 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -class DigitalOceanDnsApi extends DnsProviderApi { +class DigitalOceanDnsApi extends ApiMap { DigitalOceanDnsApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart deleted file mode 100644 index 3d74d5db..00000000 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -export 'package:selfprivacy/logic/api_maps/generic_result.dart'; -export 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; - -class DomainNotFoundException implements Exception { - DomainNotFoundException(this.message); - final String message; -} - -abstract class DnsProviderApi extends ApiMap {} diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 976ddb6b..b3e39e66 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -2,7 +2,6 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; @@ -10,7 +9,7 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; -class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi { +class DigitalOceanApi extends ServerProviderApi { DigitalOceanApi({ required this.region, this.hasLogger = true, diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index b8ec3c26..2d4907e2 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -2,7 +2,6 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/volume_provider.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; @@ -10,7 +9,7 @@ import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/utils/password_generator.dart'; -class HetznerApi extends ServerProviderApi with VolumeProviderApi { +class HetznerApi extends ServerProviderApi { HetznerApi({ this.region, this.hasLogger = true, diff --git a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart deleted file mode 100644 index 5ddacd6d..00000000 --- a/lib/logic/api_maps/rest_maps/server_providers/volume_provider.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; - -export 'package:selfprivacy/logic/api_maps/generic_result.dart'; - -mixin VolumeProviderApi on ApiMap {} diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 91067d06..3fc2d199 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -1,5 +1,5 @@ import 'package:cubit_form/cubit_form.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index 1f53761d..abd4f1ba 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -1,5 +1,5 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index e72c48fc..7f852a44 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -1,5 +1,5 @@ +import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; From 215ad3579dae1c90e1a8a6be0e80083b30ccf0de Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 15:15:24 -0300 Subject: [PATCH 541/732] chore: Rename ApiMaps to RestApiMap and GraphQLApiMap --- .../graphql_maps/{api_map.dart => graphql_api_map.dart} | 2 +- lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart | 2 +- .../api_maps/graphql_maps/server_api/server_actions_api.dart | 2 +- lib/logic/api_maps/graphql_maps/server_api/server_api.dart | 2 +- lib/logic/api_maps/graphql_maps/server_api/services_api.dart | 2 +- lib/logic/api_maps/graphql_maps/server_api/users_api.dart | 2 +- lib/logic/api_maps/graphql_maps/server_api/volume_api.dart | 2 +- lib/logic/api_maps/rest_maps/backblaze.dart | 2 +- .../rest_maps/dns_providers/cloudflare/cloudflare_api.dart | 2 +- lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart | 2 +- .../dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart | 2 +- .../api_maps/rest_maps/{api_map.dart => rest_api_map.dart} | 2 +- .../api_maps/rest_maps/server_providers/server_provider.dart | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) rename lib/logic/api_maps/graphql_maps/{api_map.dart => graphql_api_map.dart} (99%) rename lib/logic/api_maps/rest_maps/{api_map.dart => rest_api_map.dart} (99%) diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/graphql_api_map.dart similarity index 99% rename from lib/logic/api_maps/graphql_maps/api_map.dart rename to lib/logic/api_maps/graphql_maps/graphql_api_map.dart index 32359f93..2c11c127 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/graphql_api_map.dart @@ -53,7 +53,7 @@ class ResponseLoggingParser extends ResponseParser { } } -abstract class ApiMap { +abstract class GraphQLApiMap { Future getClient() async { IOClient? ioClient; if (TlsOptions.stagingAcme || !TlsOptions.verifyCertificate) { diff --git a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart index 03bfd1b3..8ed73a5d 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/jobs_api.dart @@ -1,6 +1,6 @@ part of 'server_api.dart'; -mixin JobsApi on ApiMap { +mixin JobsApi on GraphQLApiMap { Future> getServerJobs() async { QueryResult response; List jobsList = []; diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart index 65e77b98..f6fd5201 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart @@ -1,6 +1,6 @@ part of 'server_api.dart'; -mixin ServerActionsApi on ApiMap { +mixin ServerActionsApi on GraphQLApiMap { Future _commonBoolRequest(final Function graphQLMethod) async { QueryResult response; bool result = false; diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 966b17bd..8f0e55e3 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -32,7 +32,7 @@ part 'services_api.dart'; part 'users_api.dart'; part 'volume_api.dart'; -class ServerApi extends ApiMap +class ServerApi extends GraphQLApiMap with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi { ServerApi({ this.hasLogger = false, diff --git a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart index 9d39f137..1632533b 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/services_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/services_api.dart @@ -1,6 +1,6 @@ part of 'server_api.dart'; -mixin ServicesApi on ApiMap { +mixin ServicesApi on GraphQLApiMap { Future> getAllServices() async { QueryResult response; List services = []; diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index cca78798..11327290 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -1,6 +1,6 @@ part of 'server_api.dart'; -mixin UsersApi on ApiMap { +mixin UsersApi on GraphQLApiMap { Future> getAllUsers() async { QueryResult response; List users = []; diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index 3459e6f9..a7d23ba8 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -1,6 +1,6 @@ part of 'server_api.dart'; -mixin VolumeApi on ApiMap { +mixin VolumeApi on GraphQLApiMap { Future> getServerDiskVolumes() async { QueryResult response; List volumes = []; diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index 6ce8914e..aaa5ca6b 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -25,7 +25,7 @@ class BackblazeApplicationKey { final String applicationKey; } -class BackblazeApi extends ApiMap { +class BackblazeApi extends RestApiMap { BackblazeApi({this.hasLogger = false, this.isWithToken = true}); @override diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index 9ff01bf7..eb4f9ad4 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -class CloudflareApi extends ApiMap { +class CloudflareApi extends RestApiMap { CloudflareApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index cab65b6a..b6e04f99 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -class DesecApi extends ApiMap { +class DesecApi extends RestApiMap { DesecApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 76f9e78e..6e148c70 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -class DigitalOceanDnsApi extends ApiMap { +class DigitalOceanDnsApi extends RestApiMap { DigitalOceanDnsApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/rest_maps/api_map.dart b/lib/logic/api_maps/rest_maps/rest_api_map.dart similarity index 99% rename from lib/logic/api_maps/rest_maps/api_map.dart rename to lib/logic/api_maps/rest_maps/rest_api_map.dart index 86f53e25..547ce4aa 100644 --- a/lib/logic/api_maps/rest_maps/api_map.dart +++ b/lib/logic/api_maps/rest_maps/rest_api_map.dart @@ -8,7 +8,7 @@ import 'package:pretty_dio_logger/pretty_dio_logger.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; -abstract class ApiMap { +abstract class RestApiMap { Future getClient({final BaseOptions? customOptions}) async { final Dio dio = Dio(customOptions ?? (await options)); if (hasLogger) { diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart index d4988c99..2dc455d0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart @@ -1,7 +1,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; -abstract class ServerProviderApi extends ApiMap { +abstract class ServerProviderApi extends RestApiMap { /// Provider name key which lets infect understand what kind of installation /// it requires, for example 'digitaloceal' for Digital Ocean String get infectProviderName; From 9552df1ec230ea8b8a77e313135edb9fd01cd3ee Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 15:17:15 -0300 Subject: [PATCH 542/732] chore: Remove unused abstraction for ServerProvider --- .../api_maps/graphql_maps/server_api/server_api.dart | 2 +- lib/logic/api_maps/rest_maps/backblaze.dart | 2 +- .../dns_providers/cloudflare/cloudflare_api.dart | 2 +- .../rest_maps/dns_providers/desec/desec_api.dart | 2 +- .../digital_ocean_dns/digital_ocean_dns_api.dart | 2 +- .../digital_ocean/digital_ocean_api.dart | 9 +++------ .../server_providers/hetzner/hetzner_api.dart | 9 +++------ .../rest_maps/server_providers/server_provider.dart | 12 ------------ 8 files changed, 11 insertions(+), 29 deletions(-) delete mode 100644 lib/logic/api_maps/rest_maps/server_providers/server_provider.dart diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 8f0e55e3..91d4eeed 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -1,7 +1,7 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/graphql_api_map.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index aaa5ca6b..7169f5cb 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_credential.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index eb4f9ad4..9fe74841 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index b6e04f99..e5eff146 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; class DesecApi extends RestApiMap { diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 6e148c70..348edc77 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index b3e39e66..807d03a0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -2,14 +2,15 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; -class DigitalOceanApi extends ServerProviderApi { +class DigitalOceanApi extends RestApiMap { DigitalOceanApi({ required this.region, this.hasLogger = true, @@ -44,11 +45,7 @@ class DigitalOceanApi extends ServerProviderApi { @override String get rootAddress => 'https://api.digitalocean.com/v2'; - - @override String get infectProviderName => 'digitalocean'; - - @override String get displayProviderName => 'Digital Ocean'; Future> isApiTokenValid(final String token) async { diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 2d4907e2..b320d4f5 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -2,14 +2,15 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/server_provider.dart'; +import 'package:selfprivacy/logic/api_maps/generic_result.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/utils/password_generator.dart'; -class HetznerApi extends ServerProviderApi { +class HetznerApi extends RestApiMap { HetznerApi({ this.region, this.hasLogger = true, @@ -44,11 +45,7 @@ class HetznerApi extends ServerProviderApi { @override String get rootAddress => 'https://api.hetzner.cloud/v1'; - - @override String get infectProviderName => 'hetzner'; - - @override String get displayProviderName => 'Hetzner'; Future> isApiTokenValid(final String token) async { diff --git a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart b/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart deleted file mode 100644 index 2dc455d0..00000000 --- a/lib/logic/api_maps/rest_maps/server_providers/server_provider.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -export 'package:selfprivacy/logic/api_maps/generic_result.dart'; - -abstract class ServerProviderApi extends RestApiMap { - /// Provider name key which lets infect understand what kind of installation - /// it requires, for example 'digitaloceal' for Digital Ocean - String get infectProviderName; - - /// Actual provider name to render on information page for user, - /// for example 'Digital Ocean' for Digital Ocean - String get displayProviderName; -} From a2ed839927de6209bb3741e78e54c8cee2672c2d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 17:00:50 -0300 Subject: [PATCH 543/732] chore: Remove unused image from DNS Picket --- .../initializing/dns_provider_picker.dart | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 889367fa..a05b1233 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -47,39 +47,27 @@ class _DnsProviderPickerState extends State { case DnsProviderType.cloudflare: return ProviderInputDataPage( providerCubit: widget.formCubit, - providerInfo: ProviderPageInfo( + providerInfo: const ProviderPageInfo( providerType: DnsProviderType.cloudflare, pathToHow: 'how_cloudflare', - image: Image.asset( - 'assets/images/logos/cloudflare.png', - width: 150, - ), ), ); case DnsProviderType.digitalOcean: return ProviderInputDataPage( providerCubit: widget.formCubit, - providerInfo: ProviderPageInfo( + providerInfo: const ProviderPageInfo( providerType: DnsProviderType.digitalOcean, pathToHow: 'how_digital_ocean_dns', - image: Image.asset( - 'assets/images/logos/digital_ocean.png', - width: 150, - ), ), ); case DnsProviderType.desec: return ProviderInputDataPage( providerCubit: widget.formCubit, - providerInfo: ProviderPageInfo( + providerInfo: const ProviderPageInfo( providerType: DnsProviderType.desec, pathToHow: 'how_desec', - image: Image.asset( - 'assets/images/logos/desec.svg', - width: 150, - ), ), ); } @@ -90,11 +78,9 @@ class ProviderPageInfo { const ProviderPageInfo({ required this.providerType, required this.pathToHow, - required this.image, }); final String pathToHow; - final Image image; final DnsProviderType providerType; } From e70cbab618ae8b3cd501e1c63a1b0e97909d90f1 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 19 Jun 2023 18:05:57 -0300 Subject: [PATCH 544/732] chore: Fix a typo in GraphQL scheme --- .../schema/disk_volumes.graphql.dart | 84 +++++++++---------- .../graphql_maps/schema/schema.graphql | 8 +- .../graphql_maps/schema/schema.graphql.dart | 2 +- .../schema/server_api.graphql.dart | 80 +++++++++--------- .../schema/server_settings.graphql.dart | 80 +++++++++--------- .../graphql_maps/schema/services.graphql.dart | 80 +++++++++--------- .../graphql_maps/schema/users.graphql.dart | 80 +++++++++--------- 7 files changed, 207 insertions(+), 207 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 846a72a7..e9e91eb8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -32,8 +32,8 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn .fromJson(json); - case "GenericJobButationReturn": - return Fragment$basicMutationReturnFields$$GenericJobButationReturn + case "GenericJobMutationReturn": + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn .fromJson(json); case "GenericMutationReturn": @@ -160,8 +160,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) genericBackupConfigReturn, required _T Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) - genericJobButationReturn, + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) + genericJobMutationReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericMutationReturn) genericMutationReturn, @@ -195,9 +195,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return genericBackupConfigReturn(this as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - case "GenericJobButationReturn": - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); case "GenericMutationReturn": return genericMutationReturn( @@ -235,8 +235,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields deviceApiTokenMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? - genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? + genericJobMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? genericMutationReturn, _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? @@ -282,10 +282,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } - case "GenericJobButationReturn": - if (genericJobButationReturn != null) { - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + if (genericJobMutationReturn != null) { + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); } else { return orElse(); } @@ -1210,22 +1210,22 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigR _res; } -class Fragment$basicMutationReturnFields$$GenericJobButationReturn +class Fragment$basicMutationReturnFields$$GenericJobMutationReturn implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ required this.code, required this.message, required this.success, - this.$__typename = 'GenericJobButationReturn', + this.$__typename = 'GenericJobMutationReturn', }); - factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( Map json) { final l$code = json['code']; final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: (l$code as int), message: (l$message as String), success: (l$success as bool), @@ -1274,7 +1274,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn return true; } if (!(other - is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || runtimeType != other.runtimeType) { return false; } @@ -1302,28 +1302,28 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn } } -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn - on Fragment$basicMutationReturnFields$$GenericJobButationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< - Fragment$basicMutationReturnFields$$GenericJobButationReturn> +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn + on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< + Fragment$basicMutationReturnFields$$GenericJobMutationReturn> get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this, (i) => i, ); } -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( - Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( + Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; TRes call({ int? code, @@ -1333,20 +1333,20 @@ abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationRe }); } -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._instance, this._then, ); - final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; static const _undefined = {}; @@ -1356,7 +1356,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn Object? success = _undefined, Object? $__typename = _undefined, }) => - _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: code == _undefined || code == null ? _instance.code : (code as int), message: message == _undefined || message == null @@ -1371,12 +1371,12 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn )); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._res); TRes _res; @@ -5884,12 +5884,12 @@ extension ClientExtension$Mutation$MigrateToBinds on graphql.GraphQLClient { } class Mutation$MigrateToBinds$migrateToBinds - implements Fragment$basicMutationReturnFields$$GenericJobButationReturn { + implements Fragment$basicMutationReturnFields$$GenericJobMutationReturn { Mutation$MigrateToBinds$migrateToBinds({ required this.code, required this.message, required this.success, - this.$__typename = 'GenericJobButationReturn', + this.$__typename = 'GenericJobMutationReturn', this.job, }); diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index aa3bf9b7..2c699c54 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -116,7 +116,7 @@ type GenericBackupConfigReturn implements MutationReturnInterface { configuration: BackupConfiguration } -type GenericJobButationReturn implements MutationReturnInterface { +type GenericJobMutationReturn implements MutationReturnInterface { success: Boolean! message: String! code: Int! @@ -178,7 +178,7 @@ type Mutation { resizeVolume(name: String!): GenericMutationReturn! mountVolume(name: String!): GenericMutationReturn! unmountVolume(name: String!): GenericMutationReturn! - migrateToBinds(input: MigrateToBindsInput!): GenericJobButationReturn! + migrateToBinds(input: MigrateToBindsInput!): GenericJobMutationReturn! enableService(serviceId: String!): ServiceMutationReturn! disableService(serviceId: String!): ServiceMutationReturn! stopService(serviceId: String!): ServiceMutationReturn! @@ -189,8 +189,8 @@ type Mutation { initializeRepository(repository: InitializeRepositoryInput!): GenericBackupConfigReturn! removeRepository: GenericBackupConfigReturn! setAutobackupPeriod(period: Int = null): GenericBackupConfigReturn! - startBackup(serviceId: String = null): GenericJobButationReturn! - restoreBackup(snapshotId: String!): GenericJobButationReturn! + startBackup(serviceId: String = null): GenericJobMutationReturn! + restoreBackup(snapshotId: String!): GenericJobMutationReturn! forceSnapshotsReload: GenericMutationReturn! testMutation: GenericMutationReturn! } diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 17ee3de7..0efab17a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1998,7 +1998,7 @@ const possibleTypesMap = >{ 'AutoUpgradeSettingsMutationReturn', 'DeviceApiTokenMutationReturn', 'GenericBackupConfigReturn', - 'GenericJobButationReturn', + 'GenericJobMutationReturn', 'GenericMutationReturn', 'ServiceJobMutationReturn', 'ServiceMutationReturn', diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index c6baa686..2e950aa1 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -32,8 +32,8 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn .fromJson(json); - case "GenericJobButationReturn": - return Fragment$basicMutationReturnFields$$GenericJobButationReturn + case "GenericJobMutationReturn": + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn .fromJson(json); case "GenericMutationReturn": @@ -160,8 +160,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) genericBackupConfigReturn, required _T Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) - genericJobButationReturn, + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) + genericJobMutationReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericMutationReturn) genericMutationReturn, @@ -195,9 +195,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return genericBackupConfigReturn(this as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - case "GenericJobButationReturn": - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); case "GenericMutationReturn": return genericMutationReturn( @@ -235,8 +235,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields deviceApiTokenMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? - genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? + genericJobMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? genericMutationReturn, _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? @@ -282,10 +282,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } - case "GenericJobButationReturn": - if (genericJobButationReturn != null) { - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + if (genericJobMutationReturn != null) { + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); } else { return orElse(); } @@ -1210,22 +1210,22 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigR _res; } -class Fragment$basicMutationReturnFields$$GenericJobButationReturn +class Fragment$basicMutationReturnFields$$GenericJobMutationReturn implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ required this.code, required this.message, required this.success, - this.$__typename = 'GenericJobButationReturn', + this.$__typename = 'GenericJobMutationReturn', }); - factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( Map json) { final l$code = json['code']; final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: (l$code as int), message: (l$message as String), success: (l$success as bool), @@ -1274,7 +1274,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn return true; } if (!(other - is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || runtimeType != other.runtimeType) { return false; } @@ -1302,28 +1302,28 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn } } -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn - on Fragment$basicMutationReturnFields$$GenericJobButationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< - Fragment$basicMutationReturnFields$$GenericJobButationReturn> +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn + on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< + Fragment$basicMutationReturnFields$$GenericJobMutationReturn> get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this, (i) => i, ); } -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( - Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( + Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; TRes call({ int? code, @@ -1333,20 +1333,20 @@ abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationRe }); } -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._instance, this._then, ); - final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; static const _undefined = {}; @@ -1356,7 +1356,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn Object? success = _undefined, Object? $__typename = _undefined, }) => - _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: code == _undefined || code == null ? _instance.code : (code as int), message: message == _undefined || message == null @@ -1371,12 +1371,12 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn )); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._res); TRes _res; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 9702fab0..59bd5fdd 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -31,8 +31,8 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn .fromJson(json); - case "GenericJobButationReturn": - return Fragment$basicMutationReturnFields$$GenericJobButationReturn + case "GenericJobMutationReturn": + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn .fromJson(json); case "GenericMutationReturn": @@ -159,8 +159,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) genericBackupConfigReturn, required _T Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) - genericJobButationReturn, + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) + genericJobMutationReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericMutationReturn) genericMutationReturn, @@ -194,9 +194,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return genericBackupConfigReturn(this as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - case "GenericJobButationReturn": - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); case "GenericMutationReturn": return genericMutationReturn( @@ -234,8 +234,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields deviceApiTokenMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? - genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? + genericJobMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? genericMutationReturn, _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? @@ -281,10 +281,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } - case "GenericJobButationReturn": - if (genericJobButationReturn != null) { - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + if (genericJobMutationReturn != null) { + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); } else { return orElse(); } @@ -1209,22 +1209,22 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigR _res; } -class Fragment$basicMutationReturnFields$$GenericJobButationReturn +class Fragment$basicMutationReturnFields$$GenericJobMutationReturn implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ required this.code, required this.message, required this.success, - this.$__typename = 'GenericJobButationReturn', + this.$__typename = 'GenericJobMutationReturn', }); - factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( Map json) { final l$code = json['code']; final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: (l$code as int), message: (l$message as String), success: (l$success as bool), @@ -1273,7 +1273,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn return true; } if (!(other - is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || runtimeType != other.runtimeType) { return false; } @@ -1301,28 +1301,28 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn } } -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn - on Fragment$basicMutationReturnFields$$GenericJobButationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< - Fragment$basicMutationReturnFields$$GenericJobButationReturn> +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn + on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< + Fragment$basicMutationReturnFields$$GenericJobMutationReturn> get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this, (i) => i, ); } -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( - Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( + Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; TRes call({ int? code, @@ -1332,20 +1332,20 @@ abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationRe }); } -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._instance, this._then, ); - final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; static const _undefined = {}; @@ -1355,7 +1355,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn Object? success = _undefined, Object? $__typename = _undefined, }) => - _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: code == _undefined || code == null ? _instance.code : (code as int), message: message == _undefined || message == null @@ -1370,12 +1370,12 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn )); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._res); TRes _res; diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 415fac13..04eaaef9 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -31,8 +31,8 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn .fromJson(json); - case "GenericJobButationReturn": - return Fragment$basicMutationReturnFields$$GenericJobButationReturn + case "GenericJobMutationReturn": + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn .fromJson(json); case "GenericMutationReturn": @@ -159,8 +159,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) genericBackupConfigReturn, required _T Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) - genericJobButationReturn, + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) + genericJobMutationReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericMutationReturn) genericMutationReturn, @@ -194,9 +194,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return genericBackupConfigReturn(this as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - case "GenericJobButationReturn": - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); case "GenericMutationReturn": return genericMutationReturn( @@ -234,8 +234,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields deviceApiTokenMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? - genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? + genericJobMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? genericMutationReturn, _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? @@ -281,10 +281,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } - case "GenericJobButationReturn": - if (genericJobButationReturn != null) { - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + if (genericJobMutationReturn != null) { + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); } else { return orElse(); } @@ -1209,22 +1209,22 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigR _res; } -class Fragment$basicMutationReturnFields$$GenericJobButationReturn +class Fragment$basicMutationReturnFields$$GenericJobMutationReturn implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ required this.code, required this.message, required this.success, - this.$__typename = 'GenericJobButationReturn', + this.$__typename = 'GenericJobMutationReturn', }); - factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( Map json) { final l$code = json['code']; final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: (l$code as int), message: (l$message as String), success: (l$success as bool), @@ -1273,7 +1273,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn return true; } if (!(other - is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || runtimeType != other.runtimeType) { return false; } @@ -1301,28 +1301,28 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn } } -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn - on Fragment$basicMutationReturnFields$$GenericJobButationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< - Fragment$basicMutationReturnFields$$GenericJobButationReturn> +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn + on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< + Fragment$basicMutationReturnFields$$GenericJobMutationReturn> get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this, (i) => i, ); } -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( - Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( + Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; TRes call({ int? code, @@ -1332,20 +1332,20 @@ abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationRe }); } -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._instance, this._then, ); - final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; static const _undefined = {}; @@ -1355,7 +1355,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn Object? success = _undefined, Object? $__typename = _undefined, }) => - _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: code == _undefined || code == null ? _instance.code : (code as int), message: message == _undefined || message == null @@ -1370,12 +1370,12 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn )); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._res); TRes _res; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index d89acba4..4df77d6f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -31,8 +31,8 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn .fromJson(json); - case "GenericJobButationReturn": - return Fragment$basicMutationReturnFields$$GenericJobButationReturn + case "GenericJobMutationReturn": + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn .fromJson(json); case "GenericMutationReturn": @@ -159,8 +159,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) genericBackupConfigReturn, required _T Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) - genericJobButationReturn, + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) + genericJobMutationReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericMutationReturn) genericMutationReturn, @@ -194,9 +194,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return genericBackupConfigReturn(this as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - case "GenericJobButationReturn": - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); case "GenericMutationReturn": return genericMutationReturn( @@ -234,8 +234,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields deviceApiTokenMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? - genericJobButationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? + genericJobMutationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? genericMutationReturn, _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? @@ -281,10 +281,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } - case "GenericJobButationReturn": - if (genericJobButationReturn != null) { - return genericJobButationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobButationReturn); + case "GenericJobMutationReturn": + if (genericJobMutationReturn != null) { + return genericJobMutationReturn(this + as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); } else { return orElse(); } @@ -1209,22 +1209,22 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigR _res; } -class Fragment$basicMutationReturnFields$$GenericJobButationReturn +class Fragment$basicMutationReturnFields$$GenericJobMutationReturn implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobButationReturn({ + Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ required this.code, required this.message, required this.success, - this.$__typename = 'GenericJobButationReturn', + this.$__typename = 'GenericJobMutationReturn', }); - factory Fragment$basicMutationReturnFields$$GenericJobButationReturn.fromJson( + factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( Map json) { final l$code = json['code']; final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobButationReturn( + return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: (l$code as int), message: (l$message as String), success: (l$success as bool), @@ -1273,7 +1273,7 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn return true; } if (!(other - is Fragment$basicMutationReturnFields$$GenericJobButationReturn) || + is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || runtimeType != other.runtimeType) { return false; } @@ -1301,28 +1301,28 @@ class Fragment$basicMutationReturnFields$$GenericJobButationReturn } } -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobButationReturn - on Fragment$basicMutationReturnFields$$GenericJobButationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< - Fragment$basicMutationReturnFields$$GenericJobButationReturn> +extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn + on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< + Fragment$basicMutationReturnFields$$GenericJobMutationReturn> get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this, (i) => i, ); } -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn( - Fragment$basicMutationReturnFields$$GenericJobButationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn) + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( + Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn.stub( + factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn; + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; TRes call({ int? code, @@ -1332,20 +1332,20 @@ abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationRe }); } -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._instance, this._then, ); - final Fragment$basicMutationReturnFields$$GenericJobButationReturn _instance; + final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobButationReturn) _then; + Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; static const _undefined = {}; @@ -1355,7 +1355,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn Object? success = _undefined, Object? $__typename = _undefined, }) => - _then(Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( code: code == _undefined || code == null ? _instance.code : (code as int), message: message == _undefined || message == null @@ -1370,12 +1370,12 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn )); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn< +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobButationReturn< + CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobButationReturn( + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( this._res); TRes _res; From f05bedf460ded92491be5295c742f8684ed4f054 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 22 Jun 2023 11:14:00 -0300 Subject: [PATCH 545/732] chore: Implement new backups api --- .../graphql_maps/schema/backups.graphql | 44 + .../graphql_maps/schema/backups.graphql.dart | 2620 +++++++++++++++++ .../graphql_maps/server_api/server_api.dart | 195 +- lib/logic/cubit/backups/backups_cubit.dart | 23 +- lib/logic/models/hive/backups_credential.dart | 28 +- .../models/initialize_repository_input.dart | 16 + lib/logic/models/json/backup.dart | 19 +- lib/logic/models/json/backup.g.dart | 4 + 8 files changed, 2925 insertions(+), 24 deletions(-) create mode 100644 lib/logic/models/initialize_repository_input.dart diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index 36177fca..eb9fcfb1 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -22,3 +22,47 @@ query AllBackupSnapshots { } } } + +fragment genericBackupConfigReturn on GenericBackupConfigReturn { + code + message + success + configuration { + provider + encryptionKey + isInitialized + autobackupPeriod + locationName + locationId + } +} + +mutation ForceSnapshotsReload { + forceSnapshotsReload { + ...basicMutationReturnFields + } +} + +mutation StartBackup($serviceId: String = null) { + startBackup(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation SetAutobackupPeriod($period: Int = null) { + setAutobackupPeriod(period: $period) { + ...genericBackupConfigReturn + } +} + +mutation RemoveRepository { + removeRepository { + ...genericBackupConfigReturn + } +} + +mutation InitializeRepository($repository: InitializeRepositoryInput!) { + initializeRepository(repository: $repository) { + ...genericBackupConfigReturn + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 37ee4109..54b02ead 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -3,6 +3,578 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; + +class Fragment$genericBackupConfigReturn { + Fragment$genericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.configuration, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$genericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$configuration = json['configuration']; + final l$$__typename = json['__typename']; + return Fragment$genericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + configuration: l$configuration == null + ? null + : Fragment$genericBackupConfigReturn$configuration.fromJson( + (l$configuration as Map)), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final Fragment$genericBackupConfigReturn$configuration? configuration; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$configuration = configuration; + _resultData['configuration'] = l$configuration?.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$configuration = configuration; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$configuration, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$genericBackupConfigReturn) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$configuration = configuration; + final lOther$configuration = other.configuration; + if (l$configuration != lOther$configuration) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$genericBackupConfigReturn + on Fragment$genericBackupConfigReturn { + CopyWith$Fragment$genericBackupConfigReturn< + Fragment$genericBackupConfigReturn> + get copyWith => CopyWith$Fragment$genericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$genericBackupConfigReturn { + factory CopyWith$Fragment$genericBackupConfigReturn( + Fragment$genericBackupConfigReturn instance, + TRes Function(Fragment$genericBackupConfigReturn) then, + ) = _CopyWithImpl$Fragment$genericBackupConfigReturn; + + factory CopyWith$Fragment$genericBackupConfigReturn.stub(TRes res) = + _CopyWithStubImpl$Fragment$genericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + Fragment$genericBackupConfigReturn$configuration? configuration, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn$configuration + get configuration; +} + +class _CopyWithImpl$Fragment$genericBackupConfigReturn + implements CopyWith$Fragment$genericBackupConfigReturn { + _CopyWithImpl$Fragment$genericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$genericBackupConfigReturn _instance; + + final TRes Function(Fragment$genericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? configuration = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$genericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + configuration: configuration == _undefined + ? _instance.configuration + : (configuration + as Fragment$genericBackupConfigReturn$configuration?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn$configuration + get configuration { + final local$configuration = _instance.configuration; + return local$configuration == null + ? CopyWith$Fragment$genericBackupConfigReturn$configuration.stub( + _then(_instance)) + : CopyWith$Fragment$genericBackupConfigReturn$configuration( + local$configuration, (e) => call(configuration: e)); + } +} + +class _CopyWithStubImpl$Fragment$genericBackupConfigReturn + implements CopyWith$Fragment$genericBackupConfigReturn { + _CopyWithStubImpl$Fragment$genericBackupConfigReturn(this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + Fragment$genericBackupConfigReturn$configuration? configuration, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn$configuration + get configuration => + CopyWith$Fragment$genericBackupConfigReturn$configuration.stub(_res); +} + +const fragmentDefinitiongenericBackupConfigReturn = FragmentDefinitionNode( + name: NameNode(value: 'genericBackupConfigReturn'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'GenericBackupConfigReturn'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'configuration'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'encryptionKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isInitialized'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'autobackupPeriod'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'locationName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'locationId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); +const documentNodeFragmentgenericBackupConfigReturn = + DocumentNode(definitions: [ + fragmentDefinitiongenericBackupConfigReturn, +]); + +extension ClientExtension$Fragment$genericBackupConfigReturn + on graphql.GraphQLClient { + void writeFragment$genericBackupConfigReturn({ + required Fragment$genericBackupConfigReturn data, + required Map idFields, + bool broadcast = true, + }) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'genericBackupConfigReturn', + document: documentNodeFragmentgenericBackupConfigReturn, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$genericBackupConfigReturn? readFragment$genericBackupConfigReturn({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'genericBackupConfigReturn', + document: documentNodeFragmentgenericBackupConfigReturn, + ), + ), + optimistic: optimistic, + ); + return result == null + ? null + : Fragment$genericBackupConfigReturn.fromJson(result); + } +} + +class Fragment$genericBackupConfigReturn$configuration { + Fragment$genericBackupConfigReturn$configuration({ + required this.provider, + required this.encryptionKey, + required this.isInitialized, + this.autobackupPeriod, + this.locationName, + this.locationId, + this.$__typename = 'BackupConfiguration', + }); + + factory Fragment$genericBackupConfigReturn$configuration.fromJson( + Map json) { + final l$provider = json['provider']; + final l$encryptionKey = json['encryptionKey']; + final l$isInitialized = json['isInitialized']; + final l$autobackupPeriod = json['autobackupPeriod']; + final l$locationName = json['locationName']; + final l$locationId = json['locationId']; + final l$$__typename = json['__typename']; + return Fragment$genericBackupConfigReturn$configuration( + provider: fromJson$Enum$BackupProvider((l$provider as String)), + encryptionKey: (l$encryptionKey as String), + isInitialized: (l$isInitialized as bool), + autobackupPeriod: (l$autobackupPeriod as int?), + locationName: (l$locationName as String?), + locationId: (l$locationId as String?), + $__typename: (l$$__typename as String), + ); + } + + final Enum$BackupProvider provider; + + final String encryptionKey; + + final bool isInitialized; + + final int? autobackupPeriod; + + final String? locationName; + + final String? locationId; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$BackupProvider(l$provider); + final l$encryptionKey = encryptionKey; + _resultData['encryptionKey'] = l$encryptionKey; + final l$isInitialized = isInitialized; + _resultData['isInitialized'] = l$isInitialized; + final l$autobackupPeriod = autobackupPeriod; + _resultData['autobackupPeriod'] = l$autobackupPeriod; + final l$locationName = locationName; + _resultData['locationName'] = l$locationName; + final l$locationId = locationId; + _resultData['locationId'] = l$locationId; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$provider = provider; + final l$encryptionKey = encryptionKey; + final l$isInitialized = isInitialized; + final l$autobackupPeriod = autobackupPeriod; + final l$locationName = locationName; + final l$locationId = locationId; + final l$$__typename = $__typename; + return Object.hashAll([ + l$provider, + l$encryptionKey, + l$isInitialized, + l$autobackupPeriod, + l$locationName, + l$locationId, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$genericBackupConfigReturn$configuration) || + runtimeType != other.runtimeType) { + return false; + } + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) { + return false; + } + final l$encryptionKey = encryptionKey; + final lOther$encryptionKey = other.encryptionKey; + if (l$encryptionKey != lOther$encryptionKey) { + return false; + } + final l$isInitialized = isInitialized; + final lOther$isInitialized = other.isInitialized; + if (l$isInitialized != lOther$isInitialized) { + return false; + } + final l$autobackupPeriod = autobackupPeriod; + final lOther$autobackupPeriod = other.autobackupPeriod; + if (l$autobackupPeriod != lOther$autobackupPeriod) { + return false; + } + final l$locationName = locationName; + final lOther$locationName = other.locationName; + if (l$locationName != lOther$locationName) { + return false; + } + final l$locationId = locationId; + final lOther$locationId = other.locationId; + if (l$locationId != lOther$locationId) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$genericBackupConfigReturn$configuration + on Fragment$genericBackupConfigReturn$configuration { + CopyWith$Fragment$genericBackupConfigReturn$configuration< + Fragment$genericBackupConfigReturn$configuration> + get copyWith => CopyWith$Fragment$genericBackupConfigReturn$configuration( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$genericBackupConfigReturn$configuration { + factory CopyWith$Fragment$genericBackupConfigReturn$configuration( + Fragment$genericBackupConfigReturn$configuration instance, + TRes Function(Fragment$genericBackupConfigReturn$configuration) then, + ) = _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration; + + factory CopyWith$Fragment$genericBackupConfigReturn$configuration.stub( + TRes res) = + _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration; + + TRes call({ + Enum$BackupProvider? provider, + String? encryptionKey, + bool? isInitialized, + int? autobackupPeriod, + String? locationName, + String? locationId, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration + implements CopyWith$Fragment$genericBackupConfigReturn$configuration { + _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration( + this._instance, + this._then, + ); + + final Fragment$genericBackupConfigReturn$configuration _instance; + + final TRes Function(Fragment$genericBackupConfigReturn$configuration) _then; + + static const _undefined = {}; + + TRes call({ + Object? provider = _undefined, + Object? encryptionKey = _undefined, + Object? isInitialized = _undefined, + Object? autobackupPeriod = _undefined, + Object? locationName = _undefined, + Object? locationId = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$genericBackupConfigReturn$configuration( + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$BackupProvider), + encryptionKey: encryptionKey == _undefined || encryptionKey == null + ? _instance.encryptionKey + : (encryptionKey as String), + isInitialized: isInitialized == _undefined || isInitialized == null + ? _instance.isInitialized + : (isInitialized as bool), + autobackupPeriod: autobackupPeriod == _undefined + ? _instance.autobackupPeriod + : (autobackupPeriod as int?), + locationName: locationName == _undefined + ? _instance.locationName + : (locationName as String?), + locationId: locationId == _undefined + ? _instance.locationId + : (locationId as String?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration + implements CopyWith$Fragment$genericBackupConfigReturn$configuration { + _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration(this._res); + + TRes _res; + + call({ + Enum$BackupProvider? provider, + String? encryptionKey, + bool? isInitialized, + int? autobackupPeriod, + String? locationName, + String? locationId, + String? $__typename, + }) => + _res; +} class Query$BackupConfiguration { Query$BackupConfiguration({ @@ -1546,3 +2118,2051 @@ class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service< }) => _res; } + +class Mutation$ForceSnapshotsReload { + Mutation$ForceSnapshotsReload({ + required this.forceSnapshotsReload, + this.$__typename = 'Mutation', + }); + + factory Mutation$ForceSnapshotsReload.fromJson(Map json) { + final l$forceSnapshotsReload = json['forceSnapshotsReload']; + final l$$__typename = json['__typename']; + return Mutation$ForceSnapshotsReload( + forceSnapshotsReload: + Mutation$ForceSnapshotsReload$forceSnapshotsReload.fromJson( + (l$forceSnapshotsReload as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$ForceSnapshotsReload$forceSnapshotsReload forceSnapshotsReload; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$forceSnapshotsReload = forceSnapshotsReload; + _resultData['forceSnapshotsReload'] = l$forceSnapshotsReload.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$forceSnapshotsReload = forceSnapshotsReload; + final l$$__typename = $__typename; + return Object.hashAll([ + l$forceSnapshotsReload, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ForceSnapshotsReload) || + runtimeType != other.runtimeType) { + return false; + } + final l$forceSnapshotsReload = forceSnapshotsReload; + final lOther$forceSnapshotsReload = other.forceSnapshotsReload; + if (l$forceSnapshotsReload != lOther$forceSnapshotsReload) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$ForceSnapshotsReload + on Mutation$ForceSnapshotsReload { + CopyWith$Mutation$ForceSnapshotsReload + get copyWith => CopyWith$Mutation$ForceSnapshotsReload( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$ForceSnapshotsReload { + factory CopyWith$Mutation$ForceSnapshotsReload( + Mutation$ForceSnapshotsReload instance, + TRes Function(Mutation$ForceSnapshotsReload) then, + ) = _CopyWithImpl$Mutation$ForceSnapshotsReload; + + factory CopyWith$Mutation$ForceSnapshotsReload.stub(TRes res) = + _CopyWithStubImpl$Mutation$ForceSnapshotsReload; + + TRes call({ + Mutation$ForceSnapshotsReload$forceSnapshotsReload? forceSnapshotsReload, + String? $__typename, + }); + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload + get forceSnapshotsReload; +} + +class _CopyWithImpl$Mutation$ForceSnapshotsReload + implements CopyWith$Mutation$ForceSnapshotsReload { + _CopyWithImpl$Mutation$ForceSnapshotsReload( + this._instance, + this._then, + ); + + final Mutation$ForceSnapshotsReload _instance; + + final TRes Function(Mutation$ForceSnapshotsReload) _then; + + static const _undefined = {}; + + TRes call({ + Object? forceSnapshotsReload = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$ForceSnapshotsReload( + forceSnapshotsReload: + forceSnapshotsReload == _undefined || forceSnapshotsReload == null + ? _instance.forceSnapshotsReload + : (forceSnapshotsReload + as Mutation$ForceSnapshotsReload$forceSnapshotsReload), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload + get forceSnapshotsReload { + final local$forceSnapshotsReload = _instance.forceSnapshotsReload; + return CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + local$forceSnapshotsReload, (e) => call(forceSnapshotsReload: e)); + } +} + +class _CopyWithStubImpl$Mutation$ForceSnapshotsReload + implements CopyWith$Mutation$ForceSnapshotsReload { + _CopyWithStubImpl$Mutation$ForceSnapshotsReload(this._res); + + TRes _res; + + call({ + Mutation$ForceSnapshotsReload$forceSnapshotsReload? forceSnapshotsReload, + String? $__typename, + }) => + _res; + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload + get forceSnapshotsReload => + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload.stub( + _res); +} + +const documentNodeMutationForceSnapshotsReload = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'ForceSnapshotsReload'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'forceSnapshotsReload'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$ForceSnapshotsReload _parserFn$Mutation$ForceSnapshotsReload( + Map data) => + Mutation$ForceSnapshotsReload.fromJson(data); +typedef OnMutationCompleted$Mutation$ForceSnapshotsReload = FutureOr + Function( + Map?, + Mutation$ForceSnapshotsReload?, +); + +class Options$Mutation$ForceSnapshotsReload + extends graphql.MutationOptions { + Options$Mutation$ForceSnapshotsReload({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$ForceSnapshotsReload? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ForceSnapshotsReload? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$ForceSnapshotsReload(data), + ), + update: update, + onError: onError, + document: documentNodeMutationForceSnapshotsReload, + parserFn: _parserFn$Mutation$ForceSnapshotsReload, + ); + + final OnMutationCompleted$Mutation$ForceSnapshotsReload? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$ForceSnapshotsReload + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ForceSnapshotsReload({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$ForceSnapshotsReload? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationForceSnapshotsReload, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ForceSnapshotsReload, + ); +} + +extension ClientExtension$Mutation$ForceSnapshotsReload + on graphql.GraphQLClient { + Future> + mutate$ForceSnapshotsReload( + [Options$Mutation$ForceSnapshotsReload? options]) async => + await this.mutate(options ?? Options$Mutation$ForceSnapshotsReload()); + graphql.ObservableQuery + watchMutation$ForceSnapshotsReload( + [WatchOptions$Mutation$ForceSnapshotsReload? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$ForceSnapshotsReload()); +} + +class Mutation$ForceSnapshotsReload$forceSnapshotsReload + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$ForceSnapshotsReload$forceSnapshotsReload({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericMutationReturn', + }); + + factory Mutation$ForceSnapshotsReload$forceSnapshotsReload.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$ForceSnapshotsReload$forceSnapshotsReload( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ForceSnapshotsReload$forceSnapshotsReload) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$ForceSnapshotsReload$forceSnapshotsReload + on Mutation$ForceSnapshotsReload$forceSnapshotsReload { + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload< + Mutation$ForceSnapshotsReload$forceSnapshotsReload> + get copyWith => + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload< + TRes> { + factory CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + Mutation$ForceSnapshotsReload$forceSnapshotsReload instance, + TRes Function(Mutation$ForceSnapshotsReload$forceSnapshotsReload) then, + ) = _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload; + + factory CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload.stub( + TRes res) = + _CopyWithStubImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload + implements + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload { + _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + this._instance, + this._then, + ); + + final Mutation$ForceSnapshotsReload$forceSnapshotsReload _instance; + + final TRes Function(Mutation$ForceSnapshotsReload$forceSnapshotsReload) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$ForceSnapshotsReload$forceSnapshotsReload( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload + implements + CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload { + _CopyWithStubImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Variables$Mutation$StartBackup { + factory Variables$Mutation$StartBackup({String? serviceId}) => + Variables$Mutation$StartBackup._({ + if (serviceId != null) r'serviceId': serviceId, + }); + + Variables$Mutation$StartBackup._(this._$data); + + factory Variables$Mutation$StartBackup.fromJson(Map data) { + final result$data = {}; + if (data.containsKey('serviceId')) { + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String?); + } + return Variables$Mutation$StartBackup._(result$data); + } + + Map _$data; + + String? get serviceId => (_$data['serviceId'] as String?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('serviceId')) { + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; + } + return result$data; + } + + CopyWith$Variables$Mutation$StartBackup + get copyWith => CopyWith$Variables$Mutation$StartBackup( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$StartBackup) || + runtimeType != other.runtimeType) { + return false; + } + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (_$data.containsKey('serviceId') != + other._$data.containsKey('serviceId')) { + return false; + } + if (l$serviceId != lOther$serviceId) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll( + [_$data.containsKey('serviceId') ? l$serviceId : const {}]); + } +} + +abstract class CopyWith$Variables$Mutation$StartBackup { + factory CopyWith$Variables$Mutation$StartBackup( + Variables$Mutation$StartBackup instance, + TRes Function(Variables$Mutation$StartBackup) then, + ) = _CopyWithImpl$Variables$Mutation$StartBackup; + + factory CopyWith$Variables$Mutation$StartBackup.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$StartBackup; + + TRes call({String? serviceId}); +} + +class _CopyWithImpl$Variables$Mutation$StartBackup + implements CopyWith$Variables$Mutation$StartBackup { + _CopyWithImpl$Variables$Mutation$StartBackup( + this._instance, + this._then, + ); + + final Variables$Mutation$StartBackup _instance; + + final TRes Function(Variables$Mutation$StartBackup) _then; + + static const _undefined = {}; + + TRes call({Object? serviceId = _undefined}) => + _then(Variables$Mutation$StartBackup._({ + ..._instance._$data, + if (serviceId != _undefined) 'serviceId': (serviceId as String?), + })); +} + +class _CopyWithStubImpl$Variables$Mutation$StartBackup + implements CopyWith$Variables$Mutation$StartBackup { + _CopyWithStubImpl$Variables$Mutation$StartBackup(this._res); + + TRes _res; + + call({String? serviceId}) => _res; +} + +class Mutation$StartBackup { + Mutation$StartBackup({ + required this.startBackup, + this.$__typename = 'Mutation', + }); + + factory Mutation$StartBackup.fromJson(Map json) { + final l$startBackup = json['startBackup']; + final l$$__typename = json['__typename']; + return Mutation$StartBackup( + startBackup: Mutation$StartBackup$startBackup.fromJson( + (l$startBackup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$StartBackup$startBackup startBackup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$startBackup = startBackup; + _resultData['startBackup'] = l$startBackup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$startBackup = startBackup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$startBackup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$StartBackup) || runtimeType != other.runtimeType) { + return false; + } + final l$startBackup = startBackup; + final lOther$startBackup = other.startBackup; + if (l$startBackup != lOther$startBackup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$StartBackup on Mutation$StartBackup { + CopyWith$Mutation$StartBackup get copyWith => + CopyWith$Mutation$StartBackup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$StartBackup { + factory CopyWith$Mutation$StartBackup( + Mutation$StartBackup instance, + TRes Function(Mutation$StartBackup) then, + ) = _CopyWithImpl$Mutation$StartBackup; + + factory CopyWith$Mutation$StartBackup.stub(TRes res) = + _CopyWithStubImpl$Mutation$StartBackup; + + TRes call({ + Mutation$StartBackup$startBackup? startBackup, + String? $__typename, + }); + CopyWith$Mutation$StartBackup$startBackup get startBackup; +} + +class _CopyWithImpl$Mutation$StartBackup + implements CopyWith$Mutation$StartBackup { + _CopyWithImpl$Mutation$StartBackup( + this._instance, + this._then, + ); + + final Mutation$StartBackup _instance; + + final TRes Function(Mutation$StartBackup) _then; + + static const _undefined = {}; + + TRes call({ + Object? startBackup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$StartBackup( + startBackup: startBackup == _undefined || startBackup == null + ? _instance.startBackup + : (startBackup as Mutation$StartBackup$startBackup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$StartBackup$startBackup get startBackup { + final local$startBackup = _instance.startBackup; + return CopyWith$Mutation$StartBackup$startBackup( + local$startBackup, (e) => call(startBackup: e)); + } +} + +class _CopyWithStubImpl$Mutation$StartBackup + implements CopyWith$Mutation$StartBackup { + _CopyWithStubImpl$Mutation$StartBackup(this._res); + + TRes _res; + + call({ + Mutation$StartBackup$startBackup? startBackup, + String? $__typename, + }) => + _res; + CopyWith$Mutation$StartBackup$startBackup get startBackup => + CopyWith$Mutation$StartBackup$startBackup.stub(_res); +} + +const documentNodeMutationStartBackup = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'StartBackup'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: false, + ), + defaultValue: DefaultValueNode(value: NullValueNode()), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'startBackup'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$StartBackup _parserFn$Mutation$StartBackup( + Map data) => + Mutation$StartBackup.fromJson(data); +typedef OnMutationCompleted$Mutation$StartBackup = FutureOr Function( + Map?, + Mutation$StartBackup?, +); + +class Options$Mutation$StartBackup + extends graphql.MutationOptions { + Options$Mutation$StartBackup({ + String? operationName, + Variables$Mutation$StartBackup? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$StartBackup? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StartBackup? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null ? null : _parserFn$Mutation$StartBackup(data), + ), + update: update, + onError: onError, + document: documentNodeMutationStartBackup, + parserFn: _parserFn$Mutation$StartBackup, + ); + + final OnMutationCompleted$Mutation$StartBackup? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$StartBackup + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$StartBackup({ + String? operationName, + Variables$Mutation$StartBackup? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$StartBackup? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationStartBackup, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StartBackup, + ); +} + +extension ClientExtension$Mutation$StartBackup on graphql.GraphQLClient { + Future> mutate$StartBackup( + [Options$Mutation$StartBackup? options]) async => + await this.mutate(options ?? Options$Mutation$StartBackup()); + graphql.ObservableQuery watchMutation$StartBackup( + [WatchOptions$Mutation$StartBackup? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$StartBackup()); +} + +class Mutation$StartBackup$startBackup + implements Fragment$basicMutationReturnFields$$GenericJobMutationReturn { + Mutation$StartBackup$startBackup({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericJobMutationReturn', + }); + + factory Mutation$StartBackup$startBackup.fromJson(Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$StartBackup$startBackup( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$StartBackup$startBackup) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$StartBackup$startBackup + on Mutation$StartBackup$startBackup { + CopyWith$Mutation$StartBackup$startBackup + get copyWith => CopyWith$Mutation$StartBackup$startBackup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$StartBackup$startBackup { + factory CopyWith$Mutation$StartBackup$startBackup( + Mutation$StartBackup$startBackup instance, + TRes Function(Mutation$StartBackup$startBackup) then, + ) = _CopyWithImpl$Mutation$StartBackup$startBackup; + + factory CopyWith$Mutation$StartBackup$startBackup.stub(TRes res) = + _CopyWithStubImpl$Mutation$StartBackup$startBackup; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Mutation$StartBackup$startBackup + implements CopyWith$Mutation$StartBackup$startBackup { + _CopyWithImpl$Mutation$StartBackup$startBackup( + this._instance, + this._then, + ); + + final Mutation$StartBackup$startBackup _instance; + + final TRes Function(Mutation$StartBackup$startBackup) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$StartBackup$startBackup( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Mutation$StartBackup$startBackup + implements CopyWith$Mutation$StartBackup$startBackup { + _CopyWithStubImpl$Mutation$StartBackup$startBackup(this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + +class Variables$Mutation$SetAutobackupPeriod { + factory Variables$Mutation$SetAutobackupPeriod({int? period}) => + Variables$Mutation$SetAutobackupPeriod._({ + if (period != null) r'period': period, + }); + + Variables$Mutation$SetAutobackupPeriod._(this._$data); + + factory Variables$Mutation$SetAutobackupPeriod.fromJson( + Map data) { + final result$data = {}; + if (data.containsKey('period')) { + final l$period = data['period']; + result$data['period'] = (l$period as int?); + } + return Variables$Mutation$SetAutobackupPeriod._(result$data); + } + + Map _$data; + + int? get period => (_$data['period'] as int?); + Map toJson() { + final result$data = {}; + if (_$data.containsKey('period')) { + final l$period = period; + result$data['period'] = l$period; + } + return result$data; + } + + CopyWith$Variables$Mutation$SetAutobackupPeriod< + Variables$Mutation$SetAutobackupPeriod> + get copyWith => CopyWith$Variables$Mutation$SetAutobackupPeriod( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$SetAutobackupPeriod) || + runtimeType != other.runtimeType) { + return false; + } + final l$period = period; + final lOther$period = other.period; + if (_$data.containsKey('period') != other._$data.containsKey('period')) { + return false; + } + if (l$period != lOther$period) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$period = period; + return Object.hashAll([_$data.containsKey('period') ? l$period : const {}]); + } +} + +abstract class CopyWith$Variables$Mutation$SetAutobackupPeriod { + factory CopyWith$Variables$Mutation$SetAutobackupPeriod( + Variables$Mutation$SetAutobackupPeriod instance, + TRes Function(Variables$Mutation$SetAutobackupPeriod) then, + ) = _CopyWithImpl$Variables$Mutation$SetAutobackupPeriod; + + factory CopyWith$Variables$Mutation$SetAutobackupPeriod.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$SetAutobackupPeriod; + + TRes call({int? period}); +} + +class _CopyWithImpl$Variables$Mutation$SetAutobackupPeriod + implements CopyWith$Variables$Mutation$SetAutobackupPeriod { + _CopyWithImpl$Variables$Mutation$SetAutobackupPeriod( + this._instance, + this._then, + ); + + final Variables$Mutation$SetAutobackupPeriod _instance; + + final TRes Function(Variables$Mutation$SetAutobackupPeriod) _then; + + static const _undefined = {}; + + TRes call({Object? period = _undefined}) => + _then(Variables$Mutation$SetAutobackupPeriod._({ + ..._instance._$data, + if (period != _undefined) 'period': (period as int?), + })); +} + +class _CopyWithStubImpl$Variables$Mutation$SetAutobackupPeriod + implements CopyWith$Variables$Mutation$SetAutobackupPeriod { + _CopyWithStubImpl$Variables$Mutation$SetAutobackupPeriod(this._res); + + TRes _res; + + call({int? period}) => _res; +} + +class Mutation$SetAutobackupPeriod { + Mutation$SetAutobackupPeriod({ + required this.setAutobackupPeriod, + this.$__typename = 'Mutation', + }); + + factory Mutation$SetAutobackupPeriod.fromJson(Map json) { + final l$setAutobackupPeriod = json['setAutobackupPeriod']; + final l$$__typename = json['__typename']; + return Mutation$SetAutobackupPeriod( + setAutobackupPeriod: Fragment$genericBackupConfigReturn.fromJson( + (l$setAutobackupPeriod as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Fragment$genericBackupConfigReturn setAutobackupPeriod; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$setAutobackupPeriod = setAutobackupPeriod; + _resultData['setAutobackupPeriod'] = l$setAutobackupPeriod.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$setAutobackupPeriod = setAutobackupPeriod; + final l$$__typename = $__typename; + return Object.hashAll([ + l$setAutobackupPeriod, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$SetAutobackupPeriod) || + runtimeType != other.runtimeType) { + return false; + } + final l$setAutobackupPeriod = setAutobackupPeriod; + final lOther$setAutobackupPeriod = other.setAutobackupPeriod; + if (l$setAutobackupPeriod != lOther$setAutobackupPeriod) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$SetAutobackupPeriod + on Mutation$SetAutobackupPeriod { + CopyWith$Mutation$SetAutobackupPeriod + get copyWith => CopyWith$Mutation$SetAutobackupPeriod( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$SetAutobackupPeriod { + factory CopyWith$Mutation$SetAutobackupPeriod( + Mutation$SetAutobackupPeriod instance, + TRes Function(Mutation$SetAutobackupPeriod) then, + ) = _CopyWithImpl$Mutation$SetAutobackupPeriod; + + factory CopyWith$Mutation$SetAutobackupPeriod.stub(TRes res) = + _CopyWithStubImpl$Mutation$SetAutobackupPeriod; + + TRes call({ + Fragment$genericBackupConfigReturn? setAutobackupPeriod, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod; +} + +class _CopyWithImpl$Mutation$SetAutobackupPeriod + implements CopyWith$Mutation$SetAutobackupPeriod { + _CopyWithImpl$Mutation$SetAutobackupPeriod( + this._instance, + this._then, + ); + + final Mutation$SetAutobackupPeriod _instance; + + final TRes Function(Mutation$SetAutobackupPeriod) _then; + + static const _undefined = {}; + + TRes call({ + Object? setAutobackupPeriod = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$SetAutobackupPeriod( + setAutobackupPeriod: + setAutobackupPeriod == _undefined || setAutobackupPeriod == null + ? _instance.setAutobackupPeriod + : (setAutobackupPeriod as Fragment$genericBackupConfigReturn), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod { + final local$setAutobackupPeriod = _instance.setAutobackupPeriod; + return CopyWith$Fragment$genericBackupConfigReturn( + local$setAutobackupPeriod, (e) => call(setAutobackupPeriod: e)); + } +} + +class _CopyWithStubImpl$Mutation$SetAutobackupPeriod + implements CopyWith$Mutation$SetAutobackupPeriod { + _CopyWithStubImpl$Mutation$SetAutobackupPeriod(this._res); + + TRes _res; + + call({ + Fragment$genericBackupConfigReturn? setAutobackupPeriod, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod => + CopyWith$Fragment$genericBackupConfigReturn.stub(_res); +} + +const documentNodeMutationSetAutobackupPeriod = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'SetAutobackupPeriod'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'period')), + type: NamedTypeNode( + name: NameNode(value: 'Int'), + isNonNull: false, + ), + defaultValue: DefaultValueNode(value: NullValueNode()), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'setAutobackupPeriod'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'period'), + value: VariableNode(name: NameNode(value: 'period')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'genericBackupConfigReturn'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitiongenericBackupConfigReturn, +]); +Mutation$SetAutobackupPeriod _parserFn$Mutation$SetAutobackupPeriod( + Map data) => + Mutation$SetAutobackupPeriod.fromJson(data); +typedef OnMutationCompleted$Mutation$SetAutobackupPeriod = FutureOr + Function( + Map?, + Mutation$SetAutobackupPeriod?, +); + +class Options$Mutation$SetAutobackupPeriod + extends graphql.MutationOptions { + Options$Mutation$SetAutobackupPeriod({ + String? operationName, + Variables$Mutation$SetAutobackupPeriod? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$SetAutobackupPeriod? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$SetAutobackupPeriod? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$SetAutobackupPeriod(data), + ), + update: update, + onError: onError, + document: documentNodeMutationSetAutobackupPeriod, + parserFn: _parserFn$Mutation$SetAutobackupPeriod, + ); + + final OnMutationCompleted$Mutation$SetAutobackupPeriod? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$SetAutobackupPeriod + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$SetAutobackupPeriod({ + String? operationName, + Variables$Mutation$SetAutobackupPeriod? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$SetAutobackupPeriod? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationSetAutobackupPeriod, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$SetAutobackupPeriod, + ); +} + +extension ClientExtension$Mutation$SetAutobackupPeriod + on graphql.GraphQLClient { + Future> + mutate$SetAutobackupPeriod( + [Options$Mutation$SetAutobackupPeriod? options]) async => + await this.mutate(options ?? Options$Mutation$SetAutobackupPeriod()); + graphql.ObservableQuery + watchMutation$SetAutobackupPeriod( + [WatchOptions$Mutation$SetAutobackupPeriod? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$SetAutobackupPeriod()); +} + +class Mutation$RemoveRepository { + Mutation$RemoveRepository({ + required this.removeRepository, + this.$__typename = 'Mutation', + }); + + factory Mutation$RemoveRepository.fromJson(Map json) { + final l$removeRepository = json['removeRepository']; + final l$$__typename = json['__typename']; + return Mutation$RemoveRepository( + removeRepository: Fragment$genericBackupConfigReturn.fromJson( + (l$removeRepository as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Fragment$genericBackupConfigReturn removeRepository; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$removeRepository = removeRepository; + _resultData['removeRepository'] = l$removeRepository.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$removeRepository = removeRepository; + final l$$__typename = $__typename; + return Object.hashAll([ + l$removeRepository, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RemoveRepository) || + runtimeType != other.runtimeType) { + return false; + } + final l$removeRepository = removeRepository; + final lOther$removeRepository = other.removeRepository; + if (l$removeRepository != lOther$removeRepository) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$RemoveRepository + on Mutation$RemoveRepository { + CopyWith$Mutation$RemoveRepository get copyWith => + CopyWith$Mutation$RemoveRepository( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$RemoveRepository { + factory CopyWith$Mutation$RemoveRepository( + Mutation$RemoveRepository instance, + TRes Function(Mutation$RemoveRepository) then, + ) = _CopyWithImpl$Mutation$RemoveRepository; + + factory CopyWith$Mutation$RemoveRepository.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveRepository; + + TRes call({ + Fragment$genericBackupConfigReturn? removeRepository, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn get removeRepository; +} + +class _CopyWithImpl$Mutation$RemoveRepository + implements CopyWith$Mutation$RemoveRepository { + _CopyWithImpl$Mutation$RemoveRepository( + this._instance, + this._then, + ); + + final Mutation$RemoveRepository _instance; + + final TRes Function(Mutation$RemoveRepository) _then; + + static const _undefined = {}; + + TRes call({ + Object? removeRepository = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$RemoveRepository( + removeRepository: + removeRepository == _undefined || removeRepository == null + ? _instance.removeRepository + : (removeRepository as Fragment$genericBackupConfigReturn), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn get removeRepository { + final local$removeRepository = _instance.removeRepository; + return CopyWith$Fragment$genericBackupConfigReturn( + local$removeRepository, (e) => call(removeRepository: e)); + } +} + +class _CopyWithStubImpl$Mutation$RemoveRepository + implements CopyWith$Mutation$RemoveRepository { + _CopyWithStubImpl$Mutation$RemoveRepository(this._res); + + TRes _res; + + call({ + Fragment$genericBackupConfigReturn? removeRepository, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn get removeRepository => + CopyWith$Fragment$genericBackupConfigReturn.stub(_res); +} + +const documentNodeMutationRemoveRepository = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RemoveRepository'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeRepository'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'genericBackupConfigReturn'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitiongenericBackupConfigReturn, +]); +Mutation$RemoveRepository _parserFn$Mutation$RemoveRepository( + Map data) => + Mutation$RemoveRepository.fromJson(data); +typedef OnMutationCompleted$Mutation$RemoveRepository = FutureOr Function( + Map?, + Mutation$RemoveRepository?, +); + +class Options$Mutation$RemoveRepository + extends graphql.MutationOptions { + Options$Mutation$RemoveRepository({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$RemoveRepository? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveRepository? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RemoveRepository(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRemoveRepository, + parserFn: _parserFn$Mutation$RemoveRepository, + ); + + final OnMutationCompleted$Mutation$RemoveRepository? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$RemoveRepository + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RemoveRepository({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$RemoveRepository? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationRemoveRepository, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveRepository, + ); +} + +extension ClientExtension$Mutation$RemoveRepository on graphql.GraphQLClient { + Future> + mutate$RemoveRepository( + [Options$Mutation$RemoveRepository? options]) async => + await this.mutate(options ?? Options$Mutation$RemoveRepository()); + graphql.ObservableQuery< + Mutation$RemoveRepository> watchMutation$RemoveRepository( + [WatchOptions$Mutation$RemoveRepository? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RemoveRepository()); +} + +class Variables$Mutation$InitializeRepository { + factory Variables$Mutation$InitializeRepository( + {required Input$InitializeRepositoryInput repository}) => + Variables$Mutation$InitializeRepository._({ + r'repository': repository, + }); + + Variables$Mutation$InitializeRepository._(this._$data); + + factory Variables$Mutation$InitializeRepository.fromJson( + Map data) { + final result$data = {}; + final l$repository = data['repository']; + result$data['repository'] = Input$InitializeRepositoryInput.fromJson( + (l$repository as Map)); + return Variables$Mutation$InitializeRepository._(result$data); + } + + Map _$data; + + Input$InitializeRepositoryInput get repository => + (_$data['repository'] as Input$InitializeRepositoryInput); + Map toJson() { + final result$data = {}; + final l$repository = repository; + result$data['repository'] = l$repository.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$InitializeRepository< + Variables$Mutation$InitializeRepository> + get copyWith => CopyWith$Variables$Mutation$InitializeRepository( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$InitializeRepository) || + runtimeType != other.runtimeType) { + return false; + } + final l$repository = repository; + final lOther$repository = other.repository; + if (l$repository != lOther$repository) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$repository = repository; + return Object.hashAll([l$repository]); + } +} + +abstract class CopyWith$Variables$Mutation$InitializeRepository { + factory CopyWith$Variables$Mutation$InitializeRepository( + Variables$Mutation$InitializeRepository instance, + TRes Function(Variables$Mutation$InitializeRepository) then, + ) = _CopyWithImpl$Variables$Mutation$InitializeRepository; + + factory CopyWith$Variables$Mutation$InitializeRepository.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$InitializeRepository; + + TRes call({Input$InitializeRepositoryInput? repository}); +} + +class _CopyWithImpl$Variables$Mutation$InitializeRepository + implements CopyWith$Variables$Mutation$InitializeRepository { + _CopyWithImpl$Variables$Mutation$InitializeRepository( + this._instance, + this._then, + ); + + final Variables$Mutation$InitializeRepository _instance; + + final TRes Function(Variables$Mutation$InitializeRepository) _then; + + static const _undefined = {}; + + TRes call({Object? repository = _undefined}) => + _then(Variables$Mutation$InitializeRepository._({ + ..._instance._$data, + if (repository != _undefined && repository != null) + 'repository': (repository as Input$InitializeRepositoryInput), + })); +} + +class _CopyWithStubImpl$Variables$Mutation$InitializeRepository + implements CopyWith$Variables$Mutation$InitializeRepository { + _CopyWithStubImpl$Variables$Mutation$InitializeRepository(this._res); + + TRes _res; + + call({Input$InitializeRepositoryInput? repository}) => _res; +} + +class Mutation$InitializeRepository { + Mutation$InitializeRepository({ + required this.initializeRepository, + this.$__typename = 'Mutation', + }); + + factory Mutation$InitializeRepository.fromJson(Map json) { + final l$initializeRepository = json['initializeRepository']; + final l$$__typename = json['__typename']; + return Mutation$InitializeRepository( + initializeRepository: Fragment$genericBackupConfigReturn.fromJson( + (l$initializeRepository as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Fragment$genericBackupConfigReturn initializeRepository; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$initializeRepository = initializeRepository; + _resultData['initializeRepository'] = l$initializeRepository.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$initializeRepository = initializeRepository; + final l$$__typename = $__typename; + return Object.hashAll([ + l$initializeRepository, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$InitializeRepository) || + runtimeType != other.runtimeType) { + return false; + } + final l$initializeRepository = initializeRepository; + final lOther$initializeRepository = other.initializeRepository; + if (l$initializeRepository != lOther$initializeRepository) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$InitializeRepository + on Mutation$InitializeRepository { + CopyWith$Mutation$InitializeRepository + get copyWith => CopyWith$Mutation$InitializeRepository( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$InitializeRepository { + factory CopyWith$Mutation$InitializeRepository( + Mutation$InitializeRepository instance, + TRes Function(Mutation$InitializeRepository) then, + ) = _CopyWithImpl$Mutation$InitializeRepository; + + factory CopyWith$Mutation$InitializeRepository.stub(TRes res) = + _CopyWithStubImpl$Mutation$InitializeRepository; + + TRes call({ + Fragment$genericBackupConfigReturn? initializeRepository, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn get initializeRepository; +} + +class _CopyWithImpl$Mutation$InitializeRepository + implements CopyWith$Mutation$InitializeRepository { + _CopyWithImpl$Mutation$InitializeRepository( + this._instance, + this._then, + ); + + final Mutation$InitializeRepository _instance; + + final TRes Function(Mutation$InitializeRepository) _then; + + static const _undefined = {}; + + TRes call({ + Object? initializeRepository = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$InitializeRepository( + initializeRepository: + initializeRepository == _undefined || initializeRepository == null + ? _instance.initializeRepository + : (initializeRepository as Fragment$genericBackupConfigReturn), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn get initializeRepository { + final local$initializeRepository = _instance.initializeRepository; + return CopyWith$Fragment$genericBackupConfigReturn( + local$initializeRepository, (e) => call(initializeRepository: e)); + } +} + +class _CopyWithStubImpl$Mutation$InitializeRepository + implements CopyWith$Mutation$InitializeRepository { + _CopyWithStubImpl$Mutation$InitializeRepository(this._res); + + TRes _res; + + call({ + Fragment$genericBackupConfigReturn? initializeRepository, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn get initializeRepository => + CopyWith$Fragment$genericBackupConfigReturn.stub(_res); +} + +const documentNodeMutationInitializeRepository = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'InitializeRepository'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'repository')), + type: NamedTypeNode( + name: NameNode(value: 'InitializeRepositoryInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'initializeRepository'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'repository'), + value: VariableNode(name: NameNode(value: 'repository')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'genericBackupConfigReturn'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitiongenericBackupConfigReturn, +]); +Mutation$InitializeRepository _parserFn$Mutation$InitializeRepository( + Map data) => + Mutation$InitializeRepository.fromJson(data); +typedef OnMutationCompleted$Mutation$InitializeRepository = FutureOr + Function( + Map?, + Mutation$InitializeRepository?, +); + +class Options$Mutation$InitializeRepository + extends graphql.MutationOptions { + Options$Mutation$InitializeRepository({ + String? operationName, + required Variables$Mutation$InitializeRepository variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$InitializeRepository? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$InitializeRepository? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$InitializeRepository(data), + ), + update: update, + onError: onError, + document: documentNodeMutationInitializeRepository, + parserFn: _parserFn$Mutation$InitializeRepository, + ); + + final OnMutationCompleted$Mutation$InitializeRepository? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$InitializeRepository + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$InitializeRepository({ + String? operationName, + required Variables$Mutation$InitializeRepository variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$InitializeRepository? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationInitializeRepository, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$InitializeRepository, + ); +} + +extension ClientExtension$Mutation$InitializeRepository + on graphql.GraphQLClient { + Future> + mutate$InitializeRepository( + Options$Mutation$InitializeRepository options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$InitializeRepository( + WatchOptions$Mutation$InitializeRepository options) => + this.watchMutation(options); +} diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 91d4eeed..504a0cb5 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -2,6 +2,7 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/graphql_api_map.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/backups.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; @@ -9,10 +10,10 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.g import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/logic/models/auto_upgrade_settings.dart'; -import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/logic/models/initialize_repository_input.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/backup.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; @@ -510,7 +511,133 @@ class ServerApi extends GraphQLApiMap return token; } - /// TODO: backups're not implemented on server side + Future>> getBackups() async { + GenericResult> backups; + QueryResult response; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$AllBackupSnapshots(); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + backups = GenericResult>( + success: false, + data: [], + message: message, + ); + } + final List parsed = response.parsedData!.backup.allSnapshots + .map( + ( + final Query$AllBackupSnapshots$backup$allSnapshots snapshot, + ) => + Backup.fromGraphQL(snapshot), + ) + .toList(); + backups = GenericResult>( + success: true, + data: parsed, + ); + } catch (e) { + print(e); + backups = GenericResult>( + success: false, + data: [], + message: e.toString(), + ); + } + + return backups; + } + + Future forceBackupListReload() async { + try { + final GraphQLClient client = await getClient(); + await client.mutate$ForceSnapshotsReload(); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return GenericResult( + success: true, + data: null, + ); + } + + Future startBackup({final String? serviceId}) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$StartBackup(serviceId: serviceId); + final options = Options$Mutation$StartBackup(variables: variables); + response = await client.mutate$StartBackup(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: null, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } + + Future setAutobackupPeriod({final int? period}) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$SetAutobackupPeriod(period: period); + final options = + Options$Mutation$SetAutobackupPeriod(variables: variables); + response = await client.mutate$SetAutobackupPeriod(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: null, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } Future getBackupStatus() async => BackupStatus( progress: 0.0, @@ -518,13 +645,67 @@ class ServerApi extends GraphQLApiMap errorMessage: null, ); - Future> getBackups() async => []; + Future removeRepository() async { + try { + final GraphQLClient client = await getClient(); + await client.mutate$RemoveRepository(); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } - Future uploadBackblazeConfig(final BackblazeBucket bucket) async {} + return GenericResult( + success: true, + data: null, + ); + } - Future forceBackupListReload() async {} + Future initializeRepository( + final InitializeRepositoryInput input, + ) async { + QueryResult response; + GenericResult? result; - Future startBackup() async {} + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$InitializeRepository( + repository: Input$InitializeRepositoryInput( + locationId: input.locationId, + locationName: input.locationName, + login: input.login, + password: input.password, + provider: input.provider.toGraphQL(), + ), + ); + final options = + Options$Mutation$InitializeRepository(variables: variables); + response = await client.mutate$InitializeRepository(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: null, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } - Future restoreBackup(final String backupId) async {} + return result; + } } diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index b0fbc020..cb743161 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -63,10 +63,10 @@ class BackupsCubit extends ServerInstallationDependendCubit { break; case BackupStatusEnum.initialized: case BackupStatusEnum.error: - final List backups = await api.getBackups(); + final result = await api.getBackups(); emit( BackupsState( - backups: backups, + backups: result.data, isInitialized: true, preventActions: false, progress: status.progress, @@ -78,10 +78,10 @@ class BackupsCubit extends ServerInstallationDependendCubit { break; case BackupStatusEnum.backingUp: case BackupStatusEnum.restoring: - final List backups = await api.getBackups(); + final result = await api.getBackups(); emit( BackupsState( - backups: backups, + backups: result.data, isInitialized: true, preventActions: true, progress: status.progress, @@ -121,7 +121,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { ); await getIt().storeBackblazeBucket(bucket); - await api.uploadBackblazeConfig(bucket); + //await api.uploadBackblazeConfig(bucket); await updateBackups(); emit(state.copyWith(isInitialized: true, preventActions: false)); @@ -133,7 +133,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { if (bucket == null) { emit(state.copyWith(isInitialized: false)); } else { - await api.uploadBackblazeConfig(bucket); + //await api.uploadBackblazeConfig(bucket); emit(state.copyWith(isInitialized: true, preventActions: false)); getIt().showSnackBar('backup.reuploaded_key'); } @@ -153,7 +153,12 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future updateBackups({final bool useTimer = false}) async { emit(state.copyWith(refreshing: true)); - final List backups = await api.getBackups(); + final result = await api.getBackups(); + if (!result.success || result.data.isEmpty) { + return; + } + + final List backups = result.data; final BackupStatus status = await api.getBackupStatus(); emit( state.copyWith( @@ -186,7 +191,9 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future restoreBackup(final String backupId) async { emit(state.copyWith(preventActions: true)); - await api.restoreBackup(backupId); + + /// TOOD: ??? + //await api.restoreBackup(backupId); emit(state.copyWith(preventActions: false)); } diff --git a/lib/logic/models/hive/backups_credential.dart b/lib/logic/models/hive/backups_credential.dart index c64345c4..9b14f067 100644 --- a/lib/logic/models/hive/backups_credential.dart +++ b/lib/logic/models/hive/backups_credential.dart @@ -7,7 +7,11 @@ part 'backups_credential.g.dart'; @HiveType(typeId: 4) class BackupsCredential { - BackupsCredential({required this.keyId, required this.applicationKey, required this.provider}); + BackupsCredential({ + required this.keyId, + required this.applicationKey, + required this.provider, + }); @HiveField(0) final String keyId; @@ -41,11 +45,19 @@ enum BackupsProvider { @HiveField(3) backblaze; - factory BackupsProvider.fromGraphQL(final Enum$BackupProvider provider) => switch (provider) { - Enum$BackupProvider.NONE => none, - Enum$BackupProvider.MEMORY => memory, - Enum$BackupProvider.FILE => file, - Enum$BackupProvider.BACKBLAZE => backblaze, - Enum$BackupProvider.$unknown => none - }; + factory BackupsProvider.fromGraphQL(final Enum$BackupProvider provider) => + switch (provider) { + Enum$BackupProvider.NONE => none, + Enum$BackupProvider.MEMORY => memory, + Enum$BackupProvider.FILE => file, + Enum$BackupProvider.BACKBLAZE => backblaze, + Enum$BackupProvider.$unknown => none + }; + + Enum$BackupProvider toGraphQL() => switch (this) { + none => Enum$BackupProvider.NONE, + memory => Enum$BackupProvider.MEMORY, + file => Enum$BackupProvider.FILE, + backblaze => Enum$BackupProvider.BACKBLAZE, + }; } diff --git a/lib/logic/models/initialize_repository_input.dart b/lib/logic/models/initialize_repository_input.dart new file mode 100644 index 00000000..fcb137b0 --- /dev/null +++ b/lib/logic/models/initialize_repository_input.dart @@ -0,0 +1,16 @@ +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; + +class InitializeRepositoryInput { + InitializeRepositoryInput({ + required this.provider, + required this.locationId, + required this.locationName, + required this.login, + required this.password, + }); + final BackupsProvider provider; + final String locationId; + final String locationName; + final String login; + final String password; +} diff --git a/lib/logic/models/json/backup.dart b/lib/logic/models/json/backup.dart index 2e1215db..a806d00b 100644 --- a/lib/logic/models/json/backup.dart +++ b/lib/logic/models/json/backup.dart @@ -1,4 +1,5 @@ import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/backups.graphql.dart'; part 'backup.g.dart'; @@ -6,12 +7,28 @@ part 'backup.g.dart'; class Backup { factory Backup.fromJson(final Map json) => _$BackupFromJson(json); - Backup({required this.time, required this.id}); + Backup.fromGraphQL( + final Query$AllBackupSnapshots$backup$allSnapshots snapshot, + ) : this( + id: snapshot.id, + time: snapshot.createdAt, + serviceId: snapshot.service.id, + fallbackServiceName: snapshot.service.displayName, + ); + + Backup({ + required this.time, + required this.id, + required this.serviceId, + required this.fallbackServiceName, + }); // Time of the backup final DateTime time; @JsonKey(name: 'short_id') final String id; + final String serviceId; + final String fallbackServiceName; } enum BackupStatusEnum { diff --git a/lib/logic/models/json/backup.g.dart b/lib/logic/models/json/backup.g.dart index dea4847d..35148517 100644 --- a/lib/logic/models/json/backup.g.dart +++ b/lib/logic/models/json/backup.g.dart @@ -9,11 +9,15 @@ part of 'backup.dart'; Backup _$BackupFromJson(Map json) => Backup( time: DateTime.parse(json['time'] as String), id: json['short_id'] as String, + serviceId: json['serviceId'] as String, + fallbackServiceName: json['fallbackServiceName'] as String, ); Map _$BackupToJson(Backup instance) => { 'time': instance.time.toIso8601String(), 'short_id': instance.id, + 'serviceId': instance.serviceId, + 'fallbackServiceName': instance.fallbackServiceName, }; BackupStatus _$BackupStatusFromJson(Map json) => BackupStatus( From 88d8925ff7d2ec4c546a143fb0a87345fcb348a4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 22 Jun 2023 16:02:49 -0300 Subject: [PATCH 546/732] refactor(price): Replace String shortcode with Currency class --- assets/translations/az.json | 3 +- assets/translations/be.json | 3 +- assets/translations/de.json | 3 +- assets/translations/en.json | 3 +- assets/translations/fr.json | 3 +- assets/translations/pl.json | 3 +- assets/translations/ru.json | 3 +- assets/translations/sk.json | 3 +- assets/translations/th.json | 3 +- assets/translations/uk.json | 3 +- lib/logic/models/price.dart | 50 ++++++++++++++++++- .../server_providers/digital_ocean.dart | 4 +- .../providers/server_providers/hetzner.dart | 4 +- .../server_storage/extending_volume.dart | 9 ++-- 14 files changed, 67 insertions(+), 30 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index 56d67f06..1d9fb716 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -188,7 +188,6 @@ "extending_volume_price_info": "Qiymətə ƏDV daxildir və Hetzner tərəfindən təqdim edilən qiymət məlumatlarına əsaslanır. Proses zamanı server yenidən işə salınacaq.", "extending_volume_error": "Yaddaş genişləndirilməsinə başlamaq alınmadı.", "size": "Ölçüsü", - "euro": "Avro", "extending_volume_description": "Yaddaş ölçüsünün dəyişdirilməsi, serverin özünü genişləndirmədən serverinizdə daha çox məlumat saxlamağa imkan verəcəkdir. Həcmi yalnız artırmaq olar, onu azaltmaq olmaz.", "data_migration_title": "Məlumat miqrasiya", "data_migration_notice": "Məlumatların köçürülməsi zamanı bütün xidmətlər deaktiv ediləcək.", @@ -473,4 +472,4 @@ "timer": { "sec": "{} san" } -} +} \ No newline at end of file diff --git a/assets/translations/be.json b/assets/translations/be.json index e07cfc09..83f68786 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -345,7 +345,6 @@ "extending_volume_price_info": "Кошт уключае ПДВ і ацэньваецца на аснове дадзеных аб цэнах, прадстаўленых Hetzner. Сервер будзе перагружаны падчас працэсу.", "extending_volume_error": "Не ўдалося ініцыялізаваць пашырэнне тома.", "size": "Памер", - "euro": "Еўро", "data_migration_title": "Міграцыя дадзеных", "card_title": "Сховішча", "data_migration_notice": "Падчас міграцыі ўсе службы будуць адключаны.", @@ -473,4 +472,4 @@ "email_login": "Аўтарызацыя па Email", "no_ssh_notice": "Для гэтага карыстальніка створаны толькі SSH і Email акаўнты. Адзіная аўтарызацыя для ўсіх сэрвісаў яшчэ не рэалізавана." } -} +} \ No newline at end of file diff --git a/assets/translations/de.json b/assets/translations/de.json index af956aed..c2b5a6db 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -188,7 +188,6 @@ "extending_volume_description": "Durch die Speichererweiterung können Sie mehr Daten auf Ihrem Server speichern, ohne den Server selbst zu erweitern. Speicher kann nur erweitert werden, Verringerung ist nicht möglich.", "extending_volume_error": "Speichererweiterung konnte nicht initialisiert werden.", "size": "Größe", - "euro": "Euro", "data_migration_title": "Datenmigration", "data_migration_notice": "Während der Migration werden alle Dienste ausgeschaltet.", "start_migration_button": "Migration starten", @@ -473,4 +472,4 @@ "timer": { "sec": "{} Sek" } -} +} \ No newline at end of file diff --git a/assets/translations/en.json b/assets/translations/en.json index b45e6ac2..4ca6159a 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -194,7 +194,6 @@ "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner. Server will be rebooted after resizing.", "extending_volume_error": "Couldn't initialize volume extending.", "size": "Size", - "euro": "Euro", "data_migration_title": "Data migration", "data_migration_notice": "During migration all services will be turned off.", "start_migration_button": "Start migration", @@ -515,4 +514,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} +} \ No newline at end of file diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 0de687c9..914f3cbd 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -178,7 +178,6 @@ "extending_volume_price_info": "Les prix incluent la TVA et sont estimés par les données commerciales fournies par Hetzner.\nLe serveur va redémarrer après redimensionnement.", "extending_volume_error": "Pas possible d'initialiser l'extension du volume.", "size": "Taille", - "euro": "Euro", "data_migration_title": "Migration de données", "data_migration_notice": "Durant la migration, tous les services ne seront plus accessibles.", "start_migration_button": "Démarrer la migration", @@ -286,4 +285,4 @@ "title": "Serveur VPN", "subtitle": "Serveur VPN privé" } -} +} \ No newline at end of file diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 21b53f62..e1f2e1d6 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -188,7 +188,6 @@ "extending_volume_price_info": "Cena zawiera podatek VAT i jest oparta na danych cenowych dostarczonych przez firmę Hetzner. Serwer zostanie zrestartowany w trakcie procesu.", "extending_volume_error": "Nie można rozpocząć rozszerzenia repozytorium.", "size": "Rozmiar", - "euro": "Euro", "data_migration_title": "Migracja danych", "data_migration_notice": "Na czas migracji danych wszystkie usługi zostaną wyłączone.", "start_migration_button": "Rozpocznij migrację", @@ -473,4 +472,4 @@ "get_new_key": "Uzyskaj nowy klucz" } } -} +} \ No newline at end of file diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 9b0c93ad..054b2522 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -189,7 +189,6 @@ "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner. Сервер будет перезагружен во время процесса.", "extending_volume_error": "Не удалось начать расширение хранилища.", "size": "Размер", - "euro": "Евро", "data_migration_title": "Миграция данных", "data_migration_notice": "На время миграции данных все сервисы будут выключены.", "start_migration_button": "Начать миграцию", @@ -478,4 +477,4 @@ "length_not_equal": "Длина строки [], должна быть равна {}", "length_longer": "Длина строки [], должна быть меньше либо равна {}" } -} +} \ No newline at end of file diff --git a/assets/translations/sk.json b/assets/translations/sk.json index 49538eb7..af5a7c76 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -254,7 +254,6 @@ "extending_volume_price_info": "Cena je vrátane DPH a vychádza z cenových údajov poskytnutých spoločnosťou Hetzner. Server sa počas procesu reštartuje.", "extending_volume_error": "Nepodarilo sa spustiť rozšírenie úložiska.", "size": "Veľkosť", - "euro": "Euro", "data_migration_title": "Migrácia údajov", "data_migration_notice": "V čase migrácie údajov sa všetky služby vypnú.", "start_migration_button": "Spustiť migráciu", @@ -473,4 +472,4 @@ "title": "Server VPN", "subtitle": "Súkromný server VPN" } -} +} \ No newline at end of file diff --git a/assets/translations/th.json b/assets/translations/th.json index db92988e..3c314087 100644 --- a/assets/translations/th.json +++ b/assets/translations/th.json @@ -189,7 +189,6 @@ "extending_volume_price_info": "ราคารวมภาษีมูลค่าเพิ่มและประมาณการจากข้อมูลราคาที่จัดทำโดย Hetzner เซิร์ฟเวอร์จะรีบูตหลังจากปรับความจุ", "extending_volume_error": "ไม่สามารถเริ่มต้นการขยายความจุได้", "size": "ขนาด", - "euro": "ยูโร", "data_migration_title": "การโยกย้ายข้อมูล", "data_migration_notice": "ระหว่างการย้ายข้อมูล ทุกเซิร์ฟเวอร์จะถูกปิด", "start_migration_button": "เริ่มการย้ายข้อมูล", @@ -294,4 +293,4 @@ "title": "เซิฟเวอร์ VPN", "subtitle": "เซิฟเวอร์ VPN ส่วนตัว" } -} +} \ No newline at end of file diff --git a/assets/translations/uk.json b/assets/translations/uk.json index 2de33241..ebbdee7a 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -288,7 +288,6 @@ "extending_volume_price_info": "Ціна включає ПДВ і оцінюється з даних ціноутворення, наданих Hetzner. Сервер буде перезавантажений після зміни розміру.", "extending_volume_error": "Не вдалося ініціалізувати розширення обсягу.", "size": "Розмір", - "euro": "Євро", "data_migration_title": "Перенесення даних", "start_migration_button": "Почати перенос", "migration_process": "Перенос…", @@ -473,4 +472,4 @@ "root_name": "Не може бути 'root'", "length_not_equal": "Довжина [], має бути {}" } -} +} \ No newline at end of file diff --git a/lib/logic/models/price.dart b/lib/logic/models/price.dart index 1da2677d..b60cf5bf 100644 --- a/lib/logic/models/price.dart +++ b/lib/logic/models/price.dart @@ -4,6 +4,52 @@ class Price { required this.currency, }); - double value; - String currency; + final double value; + final Currency currency; +} + +enum CurrencyType { + eur, + usd, + unkown, +} + +class Currency { + Currency({ + required this.type, + required this.shortcode, + this.fontcode, + this.symbol, + }); + + factory Currency.fromType(final CurrencyType type) { + switch (type) { + case CurrencyType.eur: + return Currency( + type: type, + shortcode: 'EUR', + fontcode: 'euro', + symbol: '€', + ); + case CurrencyType.usd: + return Currency( + type: type, + shortcode: 'USD', + fontcode: 'attach_money', + symbol: '\$', + ); + default: + return Currency( + type: type, + shortcode: '?', + fontcode: 'payments', + symbol: '?', + ); + } + } + + final CurrencyType type; + final String shortcode; + final String? fontcode; + final String? symbol; } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 65a7b124..93371405 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -46,7 +46,7 @@ class DigitalOceanServerProvider extends ServerProvider { ); ApiAdapter _adapter; - final String currency = 'USD'; + final Currency currency = Currency.fromType(CurrencyType.usd); @override ServerProviderType get type => ServerProviderType.digitalOcean; @@ -400,7 +400,7 @@ class DigitalOceanServerProvider extends ServerProvider { ServerMetadataEntity( type: MetadataType.cost, trId: 'server.monthly_cost', - value: '${droplet['size']['price_monthly']} $currency', + value: '${droplet['size']['price_monthly']} ${currency.shortcode}', ), ServerMetadataEntity( type: MetadataType.location, diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 874f4f59..f7afeb3c 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -46,7 +46,7 @@ class HetznerServerProvider extends ServerProvider { ); ApiAdapter _adapter; - final String currency = 'EUR'; + final Currency currency = Currency.fromType(CurrencyType.eur); @override ServerProviderType get type => ServerProviderType.hetzner; @@ -260,7 +260,7 @@ class HetznerServerProvider extends ServerProvider { type: MetadataType.cost, trId: 'server.monthly_cost', value: - '${server.serverType.prices[1].monthly.toStringAsFixed(2)} $currency', + '${server.serverType.prices[1].monthly.toStringAsFixed(2)} ${currency.shortcode}', ), ServerMetadataEntity( type: MetadataType.location, diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 41c81140..39872494 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -43,7 +43,7 @@ class _ExtendingVolumePageState extends State { bool _isError = false; late double _currentSliderGbValue; - double _euroPerGb = 1.0; + double _pricePerGb = 1.0; final DiskSize maxSize = const DiskSize(byte: 500000000000); late DiskSize minSize; @@ -75,10 +75,11 @@ class _ExtendingVolumePageState extends State { ], ); } - _euroPerGb = (snapshot.data as Price).value; + final price = snapshot.data as Price; + _pricePerGb = price.value; _sizeController.text = _currentSliderGbValue.truncate().toString(); _priceController.text = - (_euroPerGb * double.parse(_sizeController.text)) + (_pricePerGb * double.parse(_sizeController.text)) .toStringAsFixed(2); minSize = widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(3); @@ -127,7 +128,7 @@ class _ExtendingVolumePageState extends State { decoration: InputDecoration( border: const OutlineInputBorder(), errorText: _isError ? ' ' : null, - labelText: 'storage.euro'.tr(), + labelText: price.currency.shortcode, ), ), ), From feca9d3b0635f2c01aad6519cef64c10f24a10ff Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 22 Jun 2023 23:22:48 -0300 Subject: [PATCH 547/732] chore: Update scheme.graphql and its models --- .../graphql_maps/schema/backups.graphql | 31 +- .../graphql_maps/schema/backups.graphql.dart | 1268 +++++++++++++---- .../graphql_maps/schema/schema.graphql | 145 +- .../graphql_maps/schema/schema.graphql.dart | 523 +------ .../schema/server_settings.graphql | 10 +- .../schema/server_settings.graphql.dart | 321 ++++- .../graphql_maps/schema/services.graphql | 2 +- .../graphql_maps/schema/services.graphql.dart | 28 +- .../graphql_maps/server_api/server_api.dart | 6 +- lib/logic/models/json/dns_records.dart | 4 +- lib/logic/models/service.dart | 6 +- 11 files changed, 1484 insertions(+), 860 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index eb9fcfb1..0ee5aa6c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -14,7 +14,8 @@ query BackupConfiguration { query AllBackupSnapshots { backup { allSnapshots { - ...backupSnapshotFields + id + createdAt service { displayName id @@ -38,31 +39,41 @@ fragment genericBackupConfigReturn on GenericBackupConfigReturn { } mutation ForceSnapshotsReload { - forceSnapshotsReload { - ...basicMutationReturnFields + backup { + forceSnapshotsReload { + ...basicMutationReturnFields + } } } mutation StartBackup($serviceId: String = null) { - startBackup(serviceId: $serviceId) { + backup { + startBackup(serviceId: $serviceId) { ...basicMutationReturnFields + } } } mutation SetAutobackupPeriod($period: Int = null) { - setAutobackupPeriod(period: $period) { - ...genericBackupConfigReturn + backup { + setAutobackupPeriod(period: $period) { + ...genericBackupConfigReturn + } } } mutation RemoveRepository { - removeRepository { - ...genericBackupConfigReturn + backup { + removeRepository { + ...genericBackupConfigReturn + } } } mutation InitializeRepository($repository: InitializeRepositoryInput!) { - initializeRepository(repository: $repository) { - ...genericBackupConfigReturn + backup { + initializeRepository(repository: $repository) { + ...genericBackupConfigReturn + } } } diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 54b02ead..7ebfa705 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -1443,9 +1443,19 @@ const documentNodeQueryAllBackupSnapshots = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'backupSnapshotFields'), + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, ), FieldNode( name: NameNode(value: 'service'), @@ -1503,7 +1513,6 @@ const documentNodeQueryAllBackupSnapshots = DocumentNode(definitions: [ ), ]), ), - fragmentDefinitionbackupSnapshotFields, ]); Query$AllBackupSnapshots _parserFn$Query$AllBackupSnapshots( Map data) => @@ -1787,27 +1796,26 @@ class _CopyWithStubImpl$Query$AllBackupSnapshots$backup allSnapshots(_fn) => _res; } -class Query$AllBackupSnapshots$backup$allSnapshots - implements Fragment$backupSnapshotFields { +class Query$AllBackupSnapshots$backup$allSnapshots { Query$AllBackupSnapshots$backup$allSnapshots({ required this.id, required this.createdAt, - this.$__typename = 'SnapshotInfo', required this.service, + this.$__typename = 'SnapshotInfo', }); factory Query$AllBackupSnapshots$backup$allSnapshots.fromJson( Map json) { final l$id = json['id']; final l$createdAt = json['createdAt']; - final l$$__typename = json['__typename']; final l$service = json['service']; + final l$$__typename = json['__typename']; return Query$AllBackupSnapshots$backup$allSnapshots( id: (l$id as String), createdAt: dateTimeFromJson(l$createdAt), - $__typename: (l$$__typename as String), service: Query$AllBackupSnapshots$backup$allSnapshots$service.fromJson( (l$service as Map)), + $__typename: (l$$__typename as String), ); } @@ -1815,20 +1823,20 @@ class Query$AllBackupSnapshots$backup$allSnapshots final DateTime createdAt; - final String $__typename; - final Query$AllBackupSnapshots$backup$allSnapshots$service service; + final String $__typename; + Map toJson() { final _resultData = {}; final l$id = id; _resultData['id'] = l$id; final l$createdAt = createdAt; _resultData['createdAt'] = dateTimeToJson(l$createdAt); - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; final l$service = service; _resultData['service'] = l$service.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; return _resultData; } @@ -1836,13 +1844,13 @@ class Query$AllBackupSnapshots$backup$allSnapshots int get hashCode { final l$id = id; final l$createdAt = createdAt; - final l$$__typename = $__typename; final l$service = service; + final l$$__typename = $__typename; return Object.hashAll([ l$id, l$createdAt, - l$$__typename, l$service, + l$$__typename, ]); } @@ -1865,16 +1873,16 @@ class Query$AllBackupSnapshots$backup$allSnapshots if (l$createdAt != lOther$createdAt) { return false; } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } final l$service = service; final lOther$service = other.service; if (l$service != lOther$service) { return false; } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } return true; } } @@ -1901,8 +1909,8 @@ abstract class CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { TRes call({ String? id, DateTime? createdAt, - String? $__typename, Query$AllBackupSnapshots$backup$allSnapshots$service? service, + String? $__typename, }); CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service get service; @@ -1924,20 +1932,20 @@ class _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots TRes call({ Object? id = _undefined, Object? createdAt = _undefined, - Object? $__typename = _undefined, Object? service = _undefined, + Object? $__typename = _undefined, }) => _then(Query$AllBackupSnapshots$backup$allSnapshots( id: id == _undefined || id == null ? _instance.id : (id as String), createdAt: createdAt == _undefined || createdAt == null ? _instance.createdAt : (createdAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), service: service == _undefined || service == null ? _instance.service : (service as Query$AllBackupSnapshots$backup$allSnapshots$service), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), )); CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service get service { @@ -1956,8 +1964,8 @@ class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots call({ String? id, DateTime? createdAt, - String? $__typename, Query$AllBackupSnapshots$backup$allSnapshots$service? service, + String? $__typename, }) => _res; CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service @@ -2121,29 +2129,28 @@ class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service< class Mutation$ForceSnapshotsReload { Mutation$ForceSnapshotsReload({ - required this.forceSnapshotsReload, + required this.backup, this.$__typename = 'Mutation', }); factory Mutation$ForceSnapshotsReload.fromJson(Map json) { - final l$forceSnapshotsReload = json['forceSnapshotsReload']; + final l$backup = json['backup']; final l$$__typename = json['__typename']; return Mutation$ForceSnapshotsReload( - forceSnapshotsReload: - Mutation$ForceSnapshotsReload$forceSnapshotsReload.fromJson( - (l$forceSnapshotsReload as Map)), + backup: Mutation$ForceSnapshotsReload$backup.fromJson( + (l$backup as Map)), $__typename: (l$$__typename as String), ); } - final Mutation$ForceSnapshotsReload$forceSnapshotsReload forceSnapshotsReload; + final Mutation$ForceSnapshotsReload$backup backup; final String $__typename; Map toJson() { final _resultData = {}; - final l$forceSnapshotsReload = forceSnapshotsReload; - _resultData['forceSnapshotsReload'] = l$forceSnapshotsReload.toJson(); + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -2151,10 +2158,10 @@ class Mutation$ForceSnapshotsReload { @override int get hashCode { - final l$forceSnapshotsReload = forceSnapshotsReload; + final l$backup = backup; final l$$__typename = $__typename; return Object.hashAll([ - l$forceSnapshotsReload, + l$backup, l$$__typename, ]); } @@ -2168,9 +2175,9 @@ class Mutation$ForceSnapshotsReload { runtimeType != other.runtimeType) { return false; } - final l$forceSnapshotsReload = forceSnapshotsReload; - final lOther$forceSnapshotsReload = other.forceSnapshotsReload; - if (l$forceSnapshotsReload != lOther$forceSnapshotsReload) { + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { return false; } final l$$__typename = $__typename; @@ -2201,11 +2208,10 @@ abstract class CopyWith$Mutation$ForceSnapshotsReload { _CopyWithStubImpl$Mutation$ForceSnapshotsReload; TRes call({ - Mutation$ForceSnapshotsReload$forceSnapshotsReload? forceSnapshotsReload, + Mutation$ForceSnapshotsReload$backup? backup, String? $__typename, }); - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload - get forceSnapshotsReload; + CopyWith$Mutation$ForceSnapshotsReload$backup get backup; } class _CopyWithImpl$Mutation$ForceSnapshotsReload @@ -2222,24 +2228,21 @@ class _CopyWithImpl$Mutation$ForceSnapshotsReload static const _undefined = {}; TRes call({ - Object? forceSnapshotsReload = _undefined, + Object? backup = _undefined, Object? $__typename = _undefined, }) => _then(Mutation$ForceSnapshotsReload( - forceSnapshotsReload: - forceSnapshotsReload == _undefined || forceSnapshotsReload == null - ? _instance.forceSnapshotsReload - : (forceSnapshotsReload - as Mutation$ForceSnapshotsReload$forceSnapshotsReload), + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$ForceSnapshotsReload$backup), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload - get forceSnapshotsReload { - final local$forceSnapshotsReload = _instance.forceSnapshotsReload; - return CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload( - local$forceSnapshotsReload, (e) => call(forceSnapshotsReload: e)); + CopyWith$Mutation$ForceSnapshotsReload$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$ForceSnapshotsReload$backup( + local$backup, (e) => call(backup: e)); } } @@ -2250,14 +2253,12 @@ class _CopyWithStubImpl$Mutation$ForceSnapshotsReload TRes _res; call({ - Mutation$ForceSnapshotsReload$forceSnapshotsReload? forceSnapshotsReload, + Mutation$ForceSnapshotsReload$backup? backup, String? $__typename, }) => _res; - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload - get forceSnapshotsReload => - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload.stub( - _res); + CopyWith$Mutation$ForceSnapshotsReload$backup get backup => + CopyWith$Mutation$ForceSnapshotsReload$backup.stub(_res); } const documentNodeMutationForceSnapshotsReload = DocumentNode(definitions: [ @@ -2268,14 +2269,29 @@ const documentNodeMutationForceSnapshotsReload = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'forceSnapshotsReload'), + name: NameNode(value: 'backup'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), + FieldNode( + name: NameNode(value: 'forceSnapshotsReload'), + alias: null, + arguments: [], directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), ), FieldNode( name: NameNode(value: '__typename'), @@ -2396,22 +2412,168 @@ extension ClientExtension$Mutation$ForceSnapshotsReload options ?? WatchOptions$Mutation$ForceSnapshotsReload()); } -class Mutation$ForceSnapshotsReload$forceSnapshotsReload +class Mutation$ForceSnapshotsReload$backup { + Mutation$ForceSnapshotsReload$backup({ + required this.forceSnapshotsReload, + this.$__typename = 'BackupMutations', + }); + + factory Mutation$ForceSnapshotsReload$backup.fromJson( + Map json) { + final l$forceSnapshotsReload = json['forceSnapshotsReload']; + final l$$__typename = json['__typename']; + return Mutation$ForceSnapshotsReload$backup( + forceSnapshotsReload: + Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload.fromJson( + (l$forceSnapshotsReload as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload + forceSnapshotsReload; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$forceSnapshotsReload = forceSnapshotsReload; + _resultData['forceSnapshotsReload'] = l$forceSnapshotsReload.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$forceSnapshotsReload = forceSnapshotsReload; + final l$$__typename = $__typename; + return Object.hashAll([ + l$forceSnapshotsReload, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ForceSnapshotsReload$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$forceSnapshotsReload = forceSnapshotsReload; + final lOther$forceSnapshotsReload = other.forceSnapshotsReload; + if (l$forceSnapshotsReload != lOther$forceSnapshotsReload) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$ForceSnapshotsReload$backup + on Mutation$ForceSnapshotsReload$backup { + CopyWith$Mutation$ForceSnapshotsReload$backup< + Mutation$ForceSnapshotsReload$backup> + get copyWith => CopyWith$Mutation$ForceSnapshotsReload$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$ForceSnapshotsReload$backup { + factory CopyWith$Mutation$ForceSnapshotsReload$backup( + Mutation$ForceSnapshotsReload$backup instance, + TRes Function(Mutation$ForceSnapshotsReload$backup) then, + ) = _CopyWithImpl$Mutation$ForceSnapshotsReload$backup; + + factory CopyWith$Mutation$ForceSnapshotsReload$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$ForceSnapshotsReload$backup; + + TRes call({ + Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload? + forceSnapshotsReload, + String? $__typename, + }); + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload + get forceSnapshotsReload; +} + +class _CopyWithImpl$Mutation$ForceSnapshotsReload$backup + implements CopyWith$Mutation$ForceSnapshotsReload$backup { + _CopyWithImpl$Mutation$ForceSnapshotsReload$backup( + this._instance, + this._then, + ); + + final Mutation$ForceSnapshotsReload$backup _instance; + + final TRes Function(Mutation$ForceSnapshotsReload$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? forceSnapshotsReload = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$ForceSnapshotsReload$backup( + forceSnapshotsReload: forceSnapshotsReload == _undefined || + forceSnapshotsReload == null + ? _instance.forceSnapshotsReload + : (forceSnapshotsReload + as Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload + get forceSnapshotsReload { + final local$forceSnapshotsReload = _instance.forceSnapshotsReload; + return CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload( + local$forceSnapshotsReload, (e) => call(forceSnapshotsReload: e)); + } +} + +class _CopyWithStubImpl$Mutation$ForceSnapshotsReload$backup + implements CopyWith$Mutation$ForceSnapshotsReload$backup { + _CopyWithStubImpl$Mutation$ForceSnapshotsReload$backup(this._res); + + TRes _res; + + call({ + Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload? + forceSnapshotsReload, + String? $__typename, + }) => + _res; + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload + get forceSnapshotsReload => + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload + .stub(_res); +} + +class Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload implements Fragment$basicMutationReturnFields$$GenericMutationReturn { - Mutation$ForceSnapshotsReload$forceSnapshotsReload({ + Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload({ required this.code, required this.message, required this.success, this.$__typename = 'GenericMutationReturn', }); - factory Mutation$ForceSnapshotsReload$forceSnapshotsReload.fromJson( + factory Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload.fromJson( Map json) { final l$code = json['code']; final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; - return Mutation$ForceSnapshotsReload$forceSnapshotsReload( + return Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload( code: (l$code as int), message: (l$message as String), success: (l$success as bool), @@ -2459,7 +2621,7 @@ class Mutation$ForceSnapshotsReload$forceSnapshotsReload if (identical(this, other)) { return true; } - if (!(other is Mutation$ForceSnapshotsReload$forceSnapshotsReload) || + if (!(other is Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload) || runtimeType != other.runtimeType) { return false; } @@ -2487,27 +2649,28 @@ class Mutation$ForceSnapshotsReload$forceSnapshotsReload } } -extension UtilityExtension$Mutation$ForceSnapshotsReload$forceSnapshotsReload - on Mutation$ForceSnapshotsReload$forceSnapshotsReload { - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload< - Mutation$ForceSnapshotsReload$forceSnapshotsReload> +extension UtilityExtension$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload + on Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload { + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload< + Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload> get copyWith => - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload( this, (i) => i, ); } -abstract class CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload< +abstract class CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload< TRes> { - factory CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload( - Mutation$ForceSnapshotsReload$forceSnapshotsReload instance, - TRes Function(Mutation$ForceSnapshotsReload$forceSnapshotsReload) then, - ) = _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload; + factory CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload( + Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload instance, + TRes Function(Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload) + then, + ) = _CopyWithImpl$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload; - factory CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload.stub( + factory CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload.stub( TRes res) = - _CopyWithStubImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload; + _CopyWithStubImpl$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload; TRes call({ int? code, @@ -2517,17 +2680,20 @@ abstract class CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload< }); } -class _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload +class _CopyWithImpl$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload< + TRes> implements - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload { - _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload< + TRes> { + _CopyWithImpl$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload( this._instance, this._then, ); - final Mutation$ForceSnapshotsReload$forceSnapshotsReload _instance; + final Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload _instance; - final TRes Function(Mutation$ForceSnapshotsReload$forceSnapshotsReload) _then; + final TRes Function(Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload) + _then; static const _undefined = {}; @@ -2537,7 +2703,7 @@ class _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload Object? success = _undefined, Object? $__typename = _undefined, }) => - _then(Mutation$ForceSnapshotsReload$forceSnapshotsReload( + _then(Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload( code: code == _undefined || code == null ? _instance.code : (code as int), message: message == _undefined || message == null @@ -2552,10 +2718,12 @@ class _CopyWithImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload )); } -class _CopyWithStubImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload +class _CopyWithStubImpl$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload< + TRes> implements - CopyWith$Mutation$ForceSnapshotsReload$forceSnapshotsReload { - _CopyWithStubImpl$Mutation$ForceSnapshotsReload$forceSnapshotsReload( + CopyWith$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload< + TRes> { + _CopyWithStubImpl$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReload( this._res); TRes _res; @@ -2675,28 +2843,28 @@ class _CopyWithStubImpl$Variables$Mutation$StartBackup class Mutation$StartBackup { Mutation$StartBackup({ - required this.startBackup, + required this.backup, this.$__typename = 'Mutation', }); factory Mutation$StartBackup.fromJson(Map json) { - final l$startBackup = json['startBackup']; + final l$backup = json['backup']; final l$$__typename = json['__typename']; return Mutation$StartBackup( - startBackup: Mutation$StartBackup$startBackup.fromJson( - (l$startBackup as Map)), + backup: Mutation$StartBackup$backup.fromJson( + (l$backup as Map)), $__typename: (l$$__typename as String), ); } - final Mutation$StartBackup$startBackup startBackup; + final Mutation$StartBackup$backup backup; final String $__typename; Map toJson() { final _resultData = {}; - final l$startBackup = startBackup; - _resultData['startBackup'] = l$startBackup.toJson(); + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -2704,10 +2872,10 @@ class Mutation$StartBackup { @override int get hashCode { - final l$startBackup = startBackup; + final l$backup = backup; final l$$__typename = $__typename; return Object.hashAll([ - l$startBackup, + l$backup, l$$__typename, ]); } @@ -2720,9 +2888,9 @@ class Mutation$StartBackup { if (!(other is Mutation$StartBackup) || runtimeType != other.runtimeType) { return false; } - final l$startBackup = startBackup; - final lOther$startBackup = other.startBackup; - if (l$startBackup != lOther$startBackup) { + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { return false; } final l$$__typename = $__typename; @@ -2752,10 +2920,10 @@ abstract class CopyWith$Mutation$StartBackup { _CopyWithStubImpl$Mutation$StartBackup; TRes call({ - Mutation$StartBackup$startBackup? startBackup, + Mutation$StartBackup$backup? backup, String? $__typename, }); - CopyWith$Mutation$StartBackup$startBackup get startBackup; + CopyWith$Mutation$StartBackup$backup get backup; } class _CopyWithImpl$Mutation$StartBackup @@ -2772,21 +2940,21 @@ class _CopyWithImpl$Mutation$StartBackup static const _undefined = {}; TRes call({ - Object? startBackup = _undefined, + Object? backup = _undefined, Object? $__typename = _undefined, }) => _then(Mutation$StartBackup( - startBackup: startBackup == _undefined || startBackup == null - ? _instance.startBackup - : (startBackup as Mutation$StartBackup$startBackup), + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$StartBackup$backup), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); - CopyWith$Mutation$StartBackup$startBackup get startBackup { - final local$startBackup = _instance.startBackup; - return CopyWith$Mutation$StartBackup$startBackup( - local$startBackup, (e) => call(startBackup: e)); + CopyWith$Mutation$StartBackup$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$StartBackup$backup( + local$backup, (e) => call(backup: e)); } } @@ -2797,12 +2965,12 @@ class _CopyWithStubImpl$Mutation$StartBackup TRes _res; call({ - Mutation$StartBackup$startBackup? startBackup, + Mutation$StartBackup$backup? backup, String? $__typename, }) => _res; - CopyWith$Mutation$StartBackup$startBackup get startBackup => - CopyWith$Mutation$StartBackup$startBackup.stub(_res); + CopyWith$Mutation$StartBackup$backup get backup => + CopyWith$Mutation$StartBackup$backup.stub(_res); } const documentNodeMutationStartBackup = DocumentNode(definitions: [ @@ -2823,19 +2991,34 @@ const documentNodeMutationStartBackup = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'startBackup'), + name: NameNode(value: 'backup'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'serviceId'), - value: VariableNode(name: NameNode(value: 'serviceId')), - ) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'basicMutationReturnFields'), + FieldNode( + name: NameNode(value: 'startBackup'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId')), + ) + ], directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), ), FieldNode( name: NameNode(value: '__typename'), @@ -2952,21 +3135,156 @@ extension ClientExtension$Mutation$StartBackup on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$StartBackup()); } -class Mutation$StartBackup$startBackup +class Mutation$StartBackup$backup { + Mutation$StartBackup$backup({ + required this.startBackup, + this.$__typename = 'BackupMutations', + }); + + factory Mutation$StartBackup$backup.fromJson(Map json) { + final l$startBackup = json['startBackup']; + final l$$__typename = json['__typename']; + return Mutation$StartBackup$backup( + startBackup: Mutation$StartBackup$backup$startBackup.fromJson( + (l$startBackup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$StartBackup$backup$startBackup startBackup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$startBackup = startBackup; + _resultData['startBackup'] = l$startBackup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$startBackup = startBackup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$startBackup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$StartBackup$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$startBackup = startBackup; + final lOther$startBackup = other.startBackup; + if (l$startBackup != lOther$startBackup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$StartBackup$backup + on Mutation$StartBackup$backup { + CopyWith$Mutation$StartBackup$backup + get copyWith => CopyWith$Mutation$StartBackup$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$StartBackup$backup { + factory CopyWith$Mutation$StartBackup$backup( + Mutation$StartBackup$backup instance, + TRes Function(Mutation$StartBackup$backup) then, + ) = _CopyWithImpl$Mutation$StartBackup$backup; + + factory CopyWith$Mutation$StartBackup$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$StartBackup$backup; + + TRes call({ + Mutation$StartBackup$backup$startBackup? startBackup, + String? $__typename, + }); + CopyWith$Mutation$StartBackup$backup$startBackup get startBackup; +} + +class _CopyWithImpl$Mutation$StartBackup$backup + implements CopyWith$Mutation$StartBackup$backup { + _CopyWithImpl$Mutation$StartBackup$backup( + this._instance, + this._then, + ); + + final Mutation$StartBackup$backup _instance; + + final TRes Function(Mutation$StartBackup$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? startBackup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$StartBackup$backup( + startBackup: startBackup == _undefined || startBackup == null + ? _instance.startBackup + : (startBackup as Mutation$StartBackup$backup$startBackup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$StartBackup$backup$startBackup get startBackup { + final local$startBackup = _instance.startBackup; + return CopyWith$Mutation$StartBackup$backup$startBackup( + local$startBackup, (e) => call(startBackup: e)); + } +} + +class _CopyWithStubImpl$Mutation$StartBackup$backup + implements CopyWith$Mutation$StartBackup$backup { + _CopyWithStubImpl$Mutation$StartBackup$backup(this._res); + + TRes _res; + + call({ + Mutation$StartBackup$backup$startBackup? startBackup, + String? $__typename, + }) => + _res; + CopyWith$Mutation$StartBackup$backup$startBackup get startBackup => + CopyWith$Mutation$StartBackup$backup$startBackup.stub(_res); +} + +class Mutation$StartBackup$backup$startBackup implements Fragment$basicMutationReturnFields$$GenericJobMutationReturn { - Mutation$StartBackup$startBackup({ + Mutation$StartBackup$backup$startBackup({ required this.code, required this.message, required this.success, this.$__typename = 'GenericJobMutationReturn', }); - factory Mutation$StartBackup$startBackup.fromJson(Map json) { + factory Mutation$StartBackup$backup$startBackup.fromJson( + Map json) { final l$code = json['code']; final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; - return Mutation$StartBackup$startBackup( + return Mutation$StartBackup$backup$startBackup( code: (l$code as int), message: (l$message as String), success: (l$success as bool), @@ -3014,7 +3332,7 @@ class Mutation$StartBackup$startBackup if (identical(this, other)) { return true; } - if (!(other is Mutation$StartBackup$startBackup) || + if (!(other is Mutation$StartBackup$backup$startBackup) || runtimeType != other.runtimeType) { return false; } @@ -3042,23 +3360,24 @@ class Mutation$StartBackup$startBackup } } -extension UtilityExtension$Mutation$StartBackup$startBackup - on Mutation$StartBackup$startBackup { - CopyWith$Mutation$StartBackup$startBackup - get copyWith => CopyWith$Mutation$StartBackup$startBackup( +extension UtilityExtension$Mutation$StartBackup$backup$startBackup + on Mutation$StartBackup$backup$startBackup { + CopyWith$Mutation$StartBackup$backup$startBackup< + Mutation$StartBackup$backup$startBackup> + get copyWith => CopyWith$Mutation$StartBackup$backup$startBackup( this, (i) => i, ); } -abstract class CopyWith$Mutation$StartBackup$startBackup { - factory CopyWith$Mutation$StartBackup$startBackup( - Mutation$StartBackup$startBackup instance, - TRes Function(Mutation$StartBackup$startBackup) then, - ) = _CopyWithImpl$Mutation$StartBackup$startBackup; +abstract class CopyWith$Mutation$StartBackup$backup$startBackup { + factory CopyWith$Mutation$StartBackup$backup$startBackup( + Mutation$StartBackup$backup$startBackup instance, + TRes Function(Mutation$StartBackup$backup$startBackup) then, + ) = _CopyWithImpl$Mutation$StartBackup$backup$startBackup; - factory CopyWith$Mutation$StartBackup$startBackup.stub(TRes res) = - _CopyWithStubImpl$Mutation$StartBackup$startBackup; + factory CopyWith$Mutation$StartBackup$backup$startBackup.stub(TRes res) = + _CopyWithStubImpl$Mutation$StartBackup$backup$startBackup; TRes call({ int? code, @@ -3068,16 +3387,16 @@ abstract class CopyWith$Mutation$StartBackup$startBackup { }); } -class _CopyWithImpl$Mutation$StartBackup$startBackup - implements CopyWith$Mutation$StartBackup$startBackup { - _CopyWithImpl$Mutation$StartBackup$startBackup( +class _CopyWithImpl$Mutation$StartBackup$backup$startBackup + implements CopyWith$Mutation$StartBackup$backup$startBackup { + _CopyWithImpl$Mutation$StartBackup$backup$startBackup( this._instance, this._then, ); - final Mutation$StartBackup$startBackup _instance; + final Mutation$StartBackup$backup$startBackup _instance; - final TRes Function(Mutation$StartBackup$startBackup) _then; + final TRes Function(Mutation$StartBackup$backup$startBackup) _then; static const _undefined = {}; @@ -3087,7 +3406,7 @@ class _CopyWithImpl$Mutation$StartBackup$startBackup Object? success = _undefined, Object? $__typename = _undefined, }) => - _then(Mutation$StartBackup$startBackup( + _then(Mutation$StartBackup$backup$startBackup( code: code == _undefined || code == null ? _instance.code : (code as int), message: message == _undefined || message == null @@ -3102,9 +3421,9 @@ class _CopyWithImpl$Mutation$StartBackup$startBackup )); } -class _CopyWithStubImpl$Mutation$StartBackup$startBackup - implements CopyWith$Mutation$StartBackup$startBackup { - _CopyWithStubImpl$Mutation$StartBackup$startBackup(this._res); +class _CopyWithStubImpl$Mutation$StartBackup$backup$startBackup + implements CopyWith$Mutation$StartBackup$backup$startBackup { + _CopyWithStubImpl$Mutation$StartBackup$backup$startBackup(this._res); TRes _res; @@ -3223,28 +3542,28 @@ class _CopyWithStubImpl$Variables$Mutation$SetAutobackupPeriod class Mutation$SetAutobackupPeriod { Mutation$SetAutobackupPeriod({ - required this.setAutobackupPeriod, + required this.backup, this.$__typename = 'Mutation', }); factory Mutation$SetAutobackupPeriod.fromJson(Map json) { - final l$setAutobackupPeriod = json['setAutobackupPeriod']; + final l$backup = json['backup']; final l$$__typename = json['__typename']; return Mutation$SetAutobackupPeriod( - setAutobackupPeriod: Fragment$genericBackupConfigReturn.fromJson( - (l$setAutobackupPeriod as Map)), + backup: Mutation$SetAutobackupPeriod$backup.fromJson( + (l$backup as Map)), $__typename: (l$$__typename as String), ); } - final Fragment$genericBackupConfigReturn setAutobackupPeriod; + final Mutation$SetAutobackupPeriod$backup backup; final String $__typename; Map toJson() { final _resultData = {}; - final l$setAutobackupPeriod = setAutobackupPeriod; - _resultData['setAutobackupPeriod'] = l$setAutobackupPeriod.toJson(); + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -3252,10 +3571,10 @@ class Mutation$SetAutobackupPeriod { @override int get hashCode { - final l$setAutobackupPeriod = setAutobackupPeriod; + final l$backup = backup; final l$$__typename = $__typename; return Object.hashAll([ - l$setAutobackupPeriod, + l$backup, l$$__typename, ]); } @@ -3269,9 +3588,9 @@ class Mutation$SetAutobackupPeriod { runtimeType != other.runtimeType) { return false; } - final l$setAutobackupPeriod = setAutobackupPeriod; - final lOther$setAutobackupPeriod = other.setAutobackupPeriod; - if (l$setAutobackupPeriod != lOther$setAutobackupPeriod) { + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { return false; } final l$$__typename = $__typename; @@ -3302,10 +3621,10 @@ abstract class CopyWith$Mutation$SetAutobackupPeriod { _CopyWithStubImpl$Mutation$SetAutobackupPeriod; TRes call({ - Fragment$genericBackupConfigReturn? setAutobackupPeriod, + Mutation$SetAutobackupPeriod$backup? backup, String? $__typename, }); - CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod; + CopyWith$Mutation$SetAutobackupPeriod$backup get backup; } class _CopyWithImpl$Mutation$SetAutobackupPeriod @@ -3322,22 +3641,21 @@ class _CopyWithImpl$Mutation$SetAutobackupPeriod static const _undefined = {}; TRes call({ - Object? setAutobackupPeriod = _undefined, + Object? backup = _undefined, Object? $__typename = _undefined, }) => _then(Mutation$SetAutobackupPeriod( - setAutobackupPeriod: - setAutobackupPeriod == _undefined || setAutobackupPeriod == null - ? _instance.setAutobackupPeriod - : (setAutobackupPeriod as Fragment$genericBackupConfigReturn), + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$SetAutobackupPeriod$backup), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); - CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod { - final local$setAutobackupPeriod = _instance.setAutobackupPeriod; - return CopyWith$Fragment$genericBackupConfigReturn( - local$setAutobackupPeriod, (e) => call(setAutobackupPeriod: e)); + CopyWith$Mutation$SetAutobackupPeriod$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$SetAutobackupPeriod$backup( + local$backup, (e) => call(backup: e)); } } @@ -3348,12 +3666,12 @@ class _CopyWithStubImpl$Mutation$SetAutobackupPeriod TRes _res; call({ - Fragment$genericBackupConfigReturn? setAutobackupPeriod, + Mutation$SetAutobackupPeriod$backup? backup, String? $__typename, }) => _res; - CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod => - CopyWith$Fragment$genericBackupConfigReturn.stub(_res); + CopyWith$Mutation$SetAutobackupPeriod$backup get backup => + CopyWith$Mutation$SetAutobackupPeriod$backup.stub(_res); } const documentNodeMutationSetAutobackupPeriod = DocumentNode(definitions: [ @@ -3374,19 +3692,34 @@ const documentNodeMutationSetAutobackupPeriod = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'setAutobackupPeriod'), + name: NameNode(value: 'backup'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'period'), - value: VariableNode(name: NameNode(value: 'period')), - ) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'genericBackupConfigReturn'), + FieldNode( + name: NameNode(value: 'setAutobackupPeriod'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'period'), + value: VariableNode(name: NameNode(value: 'period')), + ) + ], directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'genericBackupConfigReturn'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), ), FieldNode( name: NameNode(value: '__typename'), @@ -3510,30 +3843,31 @@ extension ClientExtension$Mutation$SetAutobackupPeriod options ?? WatchOptions$Mutation$SetAutobackupPeriod()); } -class Mutation$RemoveRepository { - Mutation$RemoveRepository({ - required this.removeRepository, - this.$__typename = 'Mutation', +class Mutation$SetAutobackupPeriod$backup { + Mutation$SetAutobackupPeriod$backup({ + required this.setAutobackupPeriod, + this.$__typename = 'BackupMutations', }); - factory Mutation$RemoveRepository.fromJson(Map json) { - final l$removeRepository = json['removeRepository']; + factory Mutation$SetAutobackupPeriod$backup.fromJson( + Map json) { + final l$setAutobackupPeriod = json['setAutobackupPeriod']; final l$$__typename = json['__typename']; - return Mutation$RemoveRepository( - removeRepository: Fragment$genericBackupConfigReturn.fromJson( - (l$removeRepository as Map)), + return Mutation$SetAutobackupPeriod$backup( + setAutobackupPeriod: Fragment$genericBackupConfigReturn.fromJson( + (l$setAutobackupPeriod as Map)), $__typename: (l$$__typename as String), ); } - final Fragment$genericBackupConfigReturn removeRepository; + final Fragment$genericBackupConfigReturn setAutobackupPeriod; final String $__typename; Map toJson() { final _resultData = {}; - final l$removeRepository = removeRepository; - _resultData['removeRepository'] = l$removeRepository.toJson(); + final l$setAutobackupPeriod = setAutobackupPeriod; + _resultData['setAutobackupPeriod'] = l$setAutobackupPeriod.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -3541,10 +3875,146 @@ class Mutation$RemoveRepository { @override int get hashCode { - final l$removeRepository = removeRepository; + final l$setAutobackupPeriod = setAutobackupPeriod; final l$$__typename = $__typename; return Object.hashAll([ - l$removeRepository, + l$setAutobackupPeriod, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$SetAutobackupPeriod$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$setAutobackupPeriod = setAutobackupPeriod; + final lOther$setAutobackupPeriod = other.setAutobackupPeriod; + if (l$setAutobackupPeriod != lOther$setAutobackupPeriod) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$SetAutobackupPeriod$backup + on Mutation$SetAutobackupPeriod$backup { + CopyWith$Mutation$SetAutobackupPeriod$backup< + Mutation$SetAutobackupPeriod$backup> + get copyWith => CopyWith$Mutation$SetAutobackupPeriod$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$SetAutobackupPeriod$backup { + factory CopyWith$Mutation$SetAutobackupPeriod$backup( + Mutation$SetAutobackupPeriod$backup instance, + TRes Function(Mutation$SetAutobackupPeriod$backup) then, + ) = _CopyWithImpl$Mutation$SetAutobackupPeriod$backup; + + factory CopyWith$Mutation$SetAutobackupPeriod$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$SetAutobackupPeriod$backup; + + TRes call({ + Fragment$genericBackupConfigReturn? setAutobackupPeriod, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod; +} + +class _CopyWithImpl$Mutation$SetAutobackupPeriod$backup + implements CopyWith$Mutation$SetAutobackupPeriod$backup { + _CopyWithImpl$Mutation$SetAutobackupPeriod$backup( + this._instance, + this._then, + ); + + final Mutation$SetAutobackupPeriod$backup _instance; + + final TRes Function(Mutation$SetAutobackupPeriod$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? setAutobackupPeriod = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$SetAutobackupPeriod$backup( + setAutobackupPeriod: + setAutobackupPeriod == _undefined || setAutobackupPeriod == null + ? _instance.setAutobackupPeriod + : (setAutobackupPeriod as Fragment$genericBackupConfigReturn), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod { + final local$setAutobackupPeriod = _instance.setAutobackupPeriod; + return CopyWith$Fragment$genericBackupConfigReturn( + local$setAutobackupPeriod, (e) => call(setAutobackupPeriod: e)); + } +} + +class _CopyWithStubImpl$Mutation$SetAutobackupPeriod$backup + implements CopyWith$Mutation$SetAutobackupPeriod$backup { + _CopyWithStubImpl$Mutation$SetAutobackupPeriod$backup(this._res); + + TRes _res; + + call({ + Fragment$genericBackupConfigReturn? setAutobackupPeriod, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupPeriod => + CopyWith$Fragment$genericBackupConfigReturn.stub(_res); +} + +class Mutation$RemoveRepository { + Mutation$RemoveRepository({ + required this.backup, + this.$__typename = 'Mutation', + }); + + factory Mutation$RemoveRepository.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Mutation$RemoveRepository( + backup: Mutation$RemoveRepository$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$RemoveRepository$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, l$$__typename, ]); } @@ -3558,9 +4028,9 @@ class Mutation$RemoveRepository { runtimeType != other.runtimeType) { return false; } - final l$removeRepository = removeRepository; - final lOther$removeRepository = other.removeRepository; - if (l$removeRepository != lOther$removeRepository) { + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { return false; } final l$$__typename = $__typename; @@ -3591,10 +4061,10 @@ abstract class CopyWith$Mutation$RemoveRepository { _CopyWithStubImpl$Mutation$RemoveRepository; TRes call({ - Fragment$genericBackupConfigReturn? removeRepository, + Mutation$RemoveRepository$backup? backup, String? $__typename, }); - CopyWith$Fragment$genericBackupConfigReturn get removeRepository; + CopyWith$Mutation$RemoveRepository$backup get backup; } class _CopyWithImpl$Mutation$RemoveRepository @@ -3611,22 +4081,21 @@ class _CopyWithImpl$Mutation$RemoveRepository static const _undefined = {}; TRes call({ - Object? removeRepository = _undefined, + Object? backup = _undefined, Object? $__typename = _undefined, }) => _then(Mutation$RemoveRepository( - removeRepository: - removeRepository == _undefined || removeRepository == null - ? _instance.removeRepository - : (removeRepository as Fragment$genericBackupConfigReturn), + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$RemoveRepository$backup), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); - CopyWith$Fragment$genericBackupConfigReturn get removeRepository { - final local$removeRepository = _instance.removeRepository; - return CopyWith$Fragment$genericBackupConfigReturn( - local$removeRepository, (e) => call(removeRepository: e)); + CopyWith$Mutation$RemoveRepository$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$RemoveRepository$backup( + local$backup, (e) => call(backup: e)); } } @@ -3637,12 +4106,12 @@ class _CopyWithStubImpl$Mutation$RemoveRepository TRes _res; call({ - Fragment$genericBackupConfigReturn? removeRepository, + Mutation$RemoveRepository$backup? backup, String? $__typename, }) => _res; - CopyWith$Fragment$genericBackupConfigReturn get removeRepository => - CopyWith$Fragment$genericBackupConfigReturn.stub(_res); + CopyWith$Mutation$RemoveRepository$backup get backup => + CopyWith$Mutation$RemoveRepository$backup.stub(_res); } const documentNodeMutationRemoveRepository = DocumentNode(definitions: [ @@ -3653,14 +4122,29 @@ const documentNodeMutationRemoveRepository = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'removeRepository'), + name: NameNode(value: 'backup'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'genericBackupConfigReturn'), + FieldNode( + name: NameNode(value: 'removeRepository'), + alias: null, + arguments: [], directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'genericBackupConfigReturn'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), ), FieldNode( name: NameNode(value: '__typename'), @@ -3777,6 +4261,141 @@ extension ClientExtension$Mutation$RemoveRepository on graphql.GraphQLClient { this.watchMutation(options ?? WatchOptions$Mutation$RemoveRepository()); } +class Mutation$RemoveRepository$backup { + Mutation$RemoveRepository$backup({ + required this.removeRepository, + this.$__typename = 'BackupMutations', + }); + + factory Mutation$RemoveRepository$backup.fromJson(Map json) { + final l$removeRepository = json['removeRepository']; + final l$$__typename = json['__typename']; + return Mutation$RemoveRepository$backup( + removeRepository: Fragment$genericBackupConfigReturn.fromJson( + (l$removeRepository as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Fragment$genericBackupConfigReturn removeRepository; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$removeRepository = removeRepository; + _resultData['removeRepository'] = l$removeRepository.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$removeRepository = removeRepository; + final l$$__typename = $__typename; + return Object.hashAll([ + l$removeRepository, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RemoveRepository$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$removeRepository = removeRepository; + final lOther$removeRepository = other.removeRepository; + if (l$removeRepository != lOther$removeRepository) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$RemoveRepository$backup + on Mutation$RemoveRepository$backup { + CopyWith$Mutation$RemoveRepository$backup + get copyWith => CopyWith$Mutation$RemoveRepository$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$RemoveRepository$backup { + factory CopyWith$Mutation$RemoveRepository$backup( + Mutation$RemoveRepository$backup instance, + TRes Function(Mutation$RemoveRepository$backup) then, + ) = _CopyWithImpl$Mutation$RemoveRepository$backup; + + factory CopyWith$Mutation$RemoveRepository$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveRepository$backup; + + TRes call({ + Fragment$genericBackupConfigReturn? removeRepository, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn get removeRepository; +} + +class _CopyWithImpl$Mutation$RemoveRepository$backup + implements CopyWith$Mutation$RemoveRepository$backup { + _CopyWithImpl$Mutation$RemoveRepository$backup( + this._instance, + this._then, + ); + + final Mutation$RemoveRepository$backup _instance; + + final TRes Function(Mutation$RemoveRepository$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? removeRepository = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$RemoveRepository$backup( + removeRepository: + removeRepository == _undefined || removeRepository == null + ? _instance.removeRepository + : (removeRepository as Fragment$genericBackupConfigReturn), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn get removeRepository { + final local$removeRepository = _instance.removeRepository; + return CopyWith$Fragment$genericBackupConfigReturn( + local$removeRepository, (e) => call(removeRepository: e)); + } +} + +class _CopyWithStubImpl$Mutation$RemoveRepository$backup + implements CopyWith$Mutation$RemoveRepository$backup { + _CopyWithStubImpl$Mutation$RemoveRepository$backup(this._res); + + TRes _res; + + call({ + Fragment$genericBackupConfigReturn? removeRepository, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn get removeRepository => + CopyWith$Fragment$genericBackupConfigReturn.stub(_res); +} + class Variables$Mutation$InitializeRepository { factory Variables$Mutation$InitializeRepository( {required Input$InitializeRepositoryInput repository}) => @@ -3880,28 +4499,28 @@ class _CopyWithStubImpl$Variables$Mutation$InitializeRepository class Mutation$InitializeRepository { Mutation$InitializeRepository({ - required this.initializeRepository, + required this.backup, this.$__typename = 'Mutation', }); factory Mutation$InitializeRepository.fromJson(Map json) { - final l$initializeRepository = json['initializeRepository']; + final l$backup = json['backup']; final l$$__typename = json['__typename']; return Mutation$InitializeRepository( - initializeRepository: Fragment$genericBackupConfigReturn.fromJson( - (l$initializeRepository as Map)), + backup: Mutation$InitializeRepository$backup.fromJson( + (l$backup as Map)), $__typename: (l$$__typename as String), ); } - final Fragment$genericBackupConfigReturn initializeRepository; + final Mutation$InitializeRepository$backup backup; final String $__typename; Map toJson() { final _resultData = {}; - final l$initializeRepository = initializeRepository; - _resultData['initializeRepository'] = l$initializeRepository.toJson(); + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -3909,10 +4528,10 @@ class Mutation$InitializeRepository { @override int get hashCode { - final l$initializeRepository = initializeRepository; + final l$backup = backup; final l$$__typename = $__typename; return Object.hashAll([ - l$initializeRepository, + l$backup, l$$__typename, ]); } @@ -3926,9 +4545,9 @@ class Mutation$InitializeRepository { runtimeType != other.runtimeType) { return false; } - final l$initializeRepository = initializeRepository; - final lOther$initializeRepository = other.initializeRepository; - if (l$initializeRepository != lOther$initializeRepository) { + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { return false; } final l$$__typename = $__typename; @@ -3959,10 +4578,10 @@ abstract class CopyWith$Mutation$InitializeRepository { _CopyWithStubImpl$Mutation$InitializeRepository; TRes call({ - Fragment$genericBackupConfigReturn? initializeRepository, + Mutation$InitializeRepository$backup? backup, String? $__typename, }); - CopyWith$Fragment$genericBackupConfigReturn get initializeRepository; + CopyWith$Mutation$InitializeRepository$backup get backup; } class _CopyWithImpl$Mutation$InitializeRepository @@ -3979,22 +4598,21 @@ class _CopyWithImpl$Mutation$InitializeRepository static const _undefined = {}; TRes call({ - Object? initializeRepository = _undefined, + Object? backup = _undefined, Object? $__typename = _undefined, }) => _then(Mutation$InitializeRepository( - initializeRepository: - initializeRepository == _undefined || initializeRepository == null - ? _instance.initializeRepository - : (initializeRepository as Fragment$genericBackupConfigReturn), + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$InitializeRepository$backup), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); - CopyWith$Fragment$genericBackupConfigReturn get initializeRepository { - final local$initializeRepository = _instance.initializeRepository; - return CopyWith$Fragment$genericBackupConfigReturn( - local$initializeRepository, (e) => call(initializeRepository: e)); + CopyWith$Mutation$InitializeRepository$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$InitializeRepository$backup( + local$backup, (e) => call(backup: e)); } } @@ -4005,12 +4623,12 @@ class _CopyWithStubImpl$Mutation$InitializeRepository TRes _res; call({ - Fragment$genericBackupConfigReturn? initializeRepository, + Mutation$InitializeRepository$backup? backup, String? $__typename, }) => _res; - CopyWith$Fragment$genericBackupConfigReturn get initializeRepository => - CopyWith$Fragment$genericBackupConfigReturn.stub(_res); + CopyWith$Mutation$InitializeRepository$backup get backup => + CopyWith$Mutation$InitializeRepository$backup.stub(_res); } const documentNodeMutationInitializeRepository = DocumentNode(definitions: [ @@ -4031,19 +4649,34 @@ const documentNodeMutationInitializeRepository = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'initializeRepository'), + name: NameNode(value: 'backup'), alias: null, - arguments: [ - ArgumentNode( - name: NameNode(value: 'repository'), - value: VariableNode(name: NameNode(value: 'repository')), - ) - ], + arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode( - name: NameNode(value: 'genericBackupConfigReturn'), + FieldNode( + name: NameNode(value: 'initializeRepository'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'repository'), + value: VariableNode(name: NameNode(value: 'repository')), + ) + ], directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'genericBackupConfigReturn'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), ), FieldNode( name: NameNode(value: '__typename'), @@ -4166,3 +4799,140 @@ extension ClientExtension$Mutation$InitializeRepository WatchOptions$Mutation$InitializeRepository options) => this.watchMutation(options); } + +class Mutation$InitializeRepository$backup { + Mutation$InitializeRepository$backup({ + required this.initializeRepository, + this.$__typename = 'BackupMutations', + }); + + factory Mutation$InitializeRepository$backup.fromJson( + Map json) { + final l$initializeRepository = json['initializeRepository']; + final l$$__typename = json['__typename']; + return Mutation$InitializeRepository$backup( + initializeRepository: Fragment$genericBackupConfigReturn.fromJson( + (l$initializeRepository as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Fragment$genericBackupConfigReturn initializeRepository; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$initializeRepository = initializeRepository; + _resultData['initializeRepository'] = l$initializeRepository.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$initializeRepository = initializeRepository; + final l$$__typename = $__typename; + return Object.hashAll([ + l$initializeRepository, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$InitializeRepository$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$initializeRepository = initializeRepository; + final lOther$initializeRepository = other.initializeRepository; + if (l$initializeRepository != lOther$initializeRepository) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$InitializeRepository$backup + on Mutation$InitializeRepository$backup { + CopyWith$Mutation$InitializeRepository$backup< + Mutation$InitializeRepository$backup> + get copyWith => CopyWith$Mutation$InitializeRepository$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$InitializeRepository$backup { + factory CopyWith$Mutation$InitializeRepository$backup( + Mutation$InitializeRepository$backup instance, + TRes Function(Mutation$InitializeRepository$backup) then, + ) = _CopyWithImpl$Mutation$InitializeRepository$backup; + + factory CopyWith$Mutation$InitializeRepository$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$InitializeRepository$backup; + + TRes call({ + Fragment$genericBackupConfigReturn? initializeRepository, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn get initializeRepository; +} + +class _CopyWithImpl$Mutation$InitializeRepository$backup + implements CopyWith$Mutation$InitializeRepository$backup { + _CopyWithImpl$Mutation$InitializeRepository$backup( + this._instance, + this._then, + ); + + final Mutation$InitializeRepository$backup _instance; + + final TRes Function(Mutation$InitializeRepository$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? initializeRepository = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$InitializeRepository$backup( + initializeRepository: + initializeRepository == _undefined || initializeRepository == null + ? _instance.initializeRepository + : (initializeRepository as Fragment$genericBackupConfigReturn), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn get initializeRepository { + final local$initializeRepository = _instance.initializeRepository; + return CopyWith$Fragment$genericBackupConfigReturn( + local$initializeRepository, (e) => call(initializeRepository: e)); + } +} + +class _CopyWithStubImpl$Mutation$InitializeRepository$backup + implements CopyWith$Mutation$InitializeRepository$backup { + _CopyWithStubImpl$Mutation$InitializeRepository$backup(this._res); + + TRes _res; + + call({ + Fragment$genericBackupConfigReturn? initializeRepository, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn get initializeRepository => + CopyWith$Fragment$genericBackupConfigReturn.stub(_res); +} diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 2c699c54..15ae463d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -38,6 +38,16 @@ type ApiKeyMutationReturn implements MutationReturnInterface { key: String } +type ApiMutations { + getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput = null): ApiKeyMutationReturn! + useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! + refreshDeviceApiToken: DeviceApiTokenMutationReturn! + deleteDeviceApiToken(device: String!): GenericMutationReturn! + getNewDeviceApiKey: ApiKeyMutationReturn! + invalidateNewDeviceApiKey: GenericMutationReturn! + authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! +} + type ApiRecoveryKeyStatus { exists: Boolean! valid: Boolean! @@ -78,6 +88,15 @@ type BackupConfiguration { locationId: String } +type BackupMutations { + initializeRepository(repository: InitializeRepositoryInput!): GenericBackupConfigReturn! + removeRepository: GenericBackupConfigReturn! + setAutobackupPeriod(period: Int = null): GenericBackupConfigReturn! + startBackup(serviceId: String!): GenericJobMutationReturn! + restoreBackup(snapshotId: String!): GenericJobMutationReturn! + forceSnapshotsReload: GenericMutationReturn! +} + enum BackupProvider { BACKBLAZE NONE @@ -96,9 +115,9 @@ type DeviceApiTokenMutationReturn implements MutationReturnInterface { } enum DnsProvider { - CLOUDFLARE, - DESEC, + CLOUDFLARE DIGITALOCEAN + DESEC } type DnsRecord { @@ -142,6 +161,10 @@ type Job { getJob(jobId: String!): ApiJob } +type JobMutations { + removeJob(jobId: String!): GenericMutationReturn! +} + input MigrateToBindsInput { emailBlockDevice: String! bitwardenBlockDevice: String! @@ -156,42 +179,43 @@ input MoveServiceInput { } type Mutation { - getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput = null): ApiKeyMutationReturn! - useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! - refreshDeviceApiToken: DeviceApiTokenMutationReturn! - deleteDeviceApiToken(device: String!): GenericMutationReturn! - getNewDeviceApiKey: ApiKeyMutationReturn! - invalidateNewDeviceApiKey: GenericMutationReturn! - authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! - changeTimezone(timezone: String!): TimezoneMutationReturn! - changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! - runSystemRebuild: GenericMutationReturn! - runSystemRollback: GenericMutationReturn! - runSystemUpgrade: GenericMutationReturn! - rebootSystem: GenericMutationReturn! - pullRepositoryChanges: GenericMutationReturn! - createUser(user: UserMutationInput!): UserMutationReturn! - deleteUser(username: String!): GenericMutationReturn! - updateUser(user: UserMutationInput!): UserMutationReturn! - addSshKey(sshInput: SshMutationInput!): UserMutationReturn! - removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! - resizeVolume(name: String!): GenericMutationReturn! - mountVolume(name: String!): GenericMutationReturn! - unmountVolume(name: String!): GenericMutationReturn! - migrateToBinds(input: MigrateToBindsInput!): GenericJobMutationReturn! - enableService(serviceId: String!): ServiceMutationReturn! - disableService(serviceId: String!): ServiceMutationReturn! - stopService(serviceId: String!): ServiceMutationReturn! - startService(serviceId: String!): ServiceMutationReturn! - restartService(serviceId: String!): ServiceMutationReturn! - moveService(input: MoveServiceInput!): ServiceJobMutationReturn! - removeJob(jobId: String!): GenericMutationReturn! - initializeRepository(repository: InitializeRepositoryInput!): GenericBackupConfigReturn! - removeRepository: GenericBackupConfigReturn! - setAutobackupPeriod(period: Int = null): GenericBackupConfigReturn! - startBackup(serviceId: String = null): GenericJobMutationReturn! - restoreBackup(snapshotId: String!): GenericJobMutationReturn! - forceSnapshotsReload: GenericMutationReturn! + getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput = null): ApiKeyMutationReturn! @deprecated(reason: "Use `api.get_new_recovery_api_key` instead") + useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! @deprecated(reason: "Use `api.use_recovery_api_key` instead") + refreshDeviceApiToken: DeviceApiTokenMutationReturn! @deprecated(reason: "Use `api.refresh_device_api_token` instead") + deleteDeviceApiToken(device: String!): GenericMutationReturn! @deprecated(reason: "Use `api.delete_device_api_token` instead") + getNewDeviceApiKey: ApiKeyMutationReturn! @deprecated(reason: "Use `api.get_new_device_api_key` instead") + invalidateNewDeviceApiKey: GenericMutationReturn! @deprecated(reason: "Use `api.invalidate_new_device_api_key` instead") + authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! @deprecated(reason: "Use `api.authorize_with_new_device_api_key` instead") + changeTimezone(timezone: String!): TimezoneMutationReturn! @deprecated(reason: "Use `system.change_timezone` instead") + changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! @deprecated(reason: "Use `system.change_auto_upgrade_settings` instead") + runSystemRebuild: GenericMutationReturn! @deprecated(reason: "Use `system.run_system_rebuild` instead") + runSystemRollback: GenericMutationReturn! @deprecated(reason: "Use `system.run_system_rollback` instead") + runSystemUpgrade: GenericMutationReturn! @deprecated(reason: "Use `system.run_system_upgrade` instead") + rebootSystem: GenericMutationReturn! @deprecated(reason: "Use `system.reboot_system` instead") + pullRepositoryChanges: GenericMutationReturn! @deprecated(reason: "Use `system.pull_repository_changes` instead") + createUser(user: UserMutationInput!): UserMutationReturn! @deprecated(reason: "Use `users.create_user` instead") + deleteUser(username: String!): GenericMutationReturn! @deprecated(reason: "Use `users.delete_user` instead") + updateUser(user: UserMutationInput!): UserMutationReturn! @deprecated(reason: "Use `users.update_user` instead") + addSshKey(sshInput: SshMutationInput!): UserMutationReturn! @deprecated(reason: "Use `users.add_ssh_key` instead") + removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! @deprecated(reason: "Use `users.remove_ssh_key` instead") + resizeVolume(name: String!): GenericMutationReturn! @deprecated(reason: "Use `storage.resize_volume` instead") + mountVolume(name: String!): GenericMutationReturn! @deprecated(reason: "Use `storage.mount_volume` instead") + unmountVolume(name: String!): GenericMutationReturn! @deprecated(reason: "Use `storage.unmount_volume` instead") + migrateToBinds(input: MigrateToBindsInput!): GenericJobMutationReturn! @deprecated(reason: "Use `storage.migrate_to_binds` instead") + enableService(serviceId: String!): ServiceMutationReturn! @deprecated(reason: "Use `services.enable_service` instead") + disableService(serviceId: String!): ServiceMutationReturn! @deprecated(reason: "Use `services.disable_service` instead") + stopService(serviceId: String!): ServiceMutationReturn! @deprecated(reason: "Use `services.stop_service` instead") + startService(serviceId: String!): ServiceMutationReturn! @deprecated(reason: "Use `services.start_service` instead") + restartService(serviceId: String!): ServiceMutationReturn! @deprecated(reason: "Use `services.restart_service` instead") + moveService(input: MoveServiceInput!): ServiceJobMutationReturn! @deprecated(reason: "Use `services.move_service` instead") + removeJob(jobId: String!): GenericMutationReturn! @deprecated(reason: "Use `jobs.remove_job` instead") + api: ApiMutations! + system: SystemMutations! + users: UsersMutations! + storage: StorageMutations! + services: ServicesMutations! + jobs: JobMutations! + backup: BackupMutations! testMutation: GenericMutationReturn! } @@ -202,8 +226,8 @@ interface MutationReturnInterface { } type Query { - system: System! api: Api! + system: System! users: Users! storage: Storage! jobs: Job! @@ -272,6 +296,15 @@ type Services { allServices: [Service!]! } +type ServicesMutations { + enableService(serviceId: String!): ServiceMutationReturn! + disableService(serviceId: String!): ServiceMutationReturn! + stopService(serviceId: String!): ServiceMutationReturn! + startService(serviceId: String!): ServiceMutationReturn! + restartService(serviceId: String!): ServiceMutationReturn! + moveService(input: MoveServiceInput!): ServiceJobMutationReturn! +} + enum Severity { INFO WARNING @@ -301,6 +334,13 @@ type Storage { volumes: [StorageVolume!]! } +type StorageMutations { + resizeVolume(name: String!): GenericMutationReturn! + mountVolume(name: String!): GenericMutationReturn! + unmountVolume(name: String!): GenericMutationReturn! + migrateToBinds(input: MigrateToBindsInput!): GenericJobMutationReturn! +} + interface StorageUsageInterface { usedSpace: String! volume: StorageVolume @@ -346,6 +386,16 @@ type SystemInfo { usingBinds: Boolean! } +type SystemMutations { + changeTimezone(timezone: String!): TimezoneMutationReturn! + changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! + runSystemRebuild: GenericMutationReturn! + runSystemRollback: GenericMutationReturn! + runSystemUpgrade: GenericMutationReturn! + rebootSystem: GenericMutationReturn! + pullRepositoryChanges: GenericMutationReturn! +} + type SystemProviderInfo { provider: ServerProvider! id: String! @@ -403,15 +453,10 @@ type Users { getUser(username: String!): User } -fragment dnsRecordFields on DnsRecord { - content - name - priority - recordType - ttl -} - -fragment backupSnapshotFields on SnapshotInfo { - id - createdAt +type UsersMutations { + createUser(user: UserMutationInput!): UserMutationReturn! + deleteUser(username: String!): GenericMutationReturn! + updateUser(user: UserMutationInput!): UserMutationReturn! + addSshKey(sshInput: SshMutationInput!): UserMutationReturn! + removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! } diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 0efab17a..e92ecc5e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1,5 +1,3 @@ -import 'package:gql/ast.dart'; -import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; class Input$AutoUpgradeSettingsInput { @@ -1312,16 +1310,16 @@ Enum$BackupProvider fromJson$Enum$BackupProvider(String value) { } } -enum Enum$DnsProvider { CLOUDFLARE, DESEC, DIGITALOCEAN, $unknown } +enum Enum$DnsProvider { CLOUDFLARE, DIGITALOCEAN, DESEC, $unknown } String toJson$Enum$DnsProvider(Enum$DnsProvider e) { switch (e) { case Enum$DnsProvider.CLOUDFLARE: return r'CLOUDFLARE'; - case Enum$DnsProvider.DESEC: - return r'DESEC'; case Enum$DnsProvider.DIGITALOCEAN: return r'DIGITALOCEAN'; + case Enum$DnsProvider.DESEC: + return r'DESEC'; case Enum$DnsProvider.$unknown: return r'$unknown'; } @@ -1331,10 +1329,10 @@ Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { switch (value) { case r'CLOUDFLARE': return Enum$DnsProvider.CLOUDFLARE; - case r'DESEC': - return Enum$DnsProvider.DESEC; case r'DIGITALOCEAN': return Enum$DnsProvider.DIGITALOCEAN; + case r'DESEC': + return Enum$DnsProvider.DESEC; default: return Enum$DnsProvider.$unknown; } @@ -1481,517 +1479,6 @@ Enum$UserType fromJson$Enum$UserType(String value) { } } -class Fragment$dnsRecordFields { - Fragment$dnsRecordFields({ - required this.content, - required this.name, - this.priority, - required this.recordType, - required this.ttl, - this.$__typename = 'DnsRecord', - }); - - factory Fragment$dnsRecordFields.fromJson(Map json) { - final l$content = json['content']; - final l$name = json['name']; - final l$priority = json['priority']; - final l$recordType = json['recordType']; - final l$ttl = json['ttl']; - final l$$__typename = json['__typename']; - return Fragment$dnsRecordFields( - content: (l$content as String), - name: (l$name as String), - priority: (l$priority as int?), - recordType: (l$recordType as String), - ttl: (l$ttl as int), - $__typename: (l$$__typename as String), - ); - } - - final String content; - - final String name; - - final int? priority; - - final String recordType; - - final int ttl; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$content = content; - _resultData['content'] = l$content; - final l$name = name; - _resultData['name'] = l$name; - final l$priority = priority; - _resultData['priority'] = l$priority; - final l$recordType = recordType; - _resultData['recordType'] = l$recordType; - final l$ttl = ttl; - _resultData['ttl'] = l$ttl; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$content = content; - final l$name = name; - final l$priority = priority; - final l$recordType = recordType; - final l$ttl = ttl; - final l$$__typename = $__typename; - return Object.hashAll([ - l$content, - l$name, - l$priority, - l$recordType, - l$ttl, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$dnsRecordFields) || - runtimeType != other.runtimeType) { - return false; - } - final l$content = content; - final lOther$content = other.content; - if (l$content != lOther$content) { - return false; - } - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) { - return false; - } - final l$priority = priority; - final lOther$priority = other.priority; - if (l$priority != lOther$priority) { - return false; - } - final l$recordType = recordType; - final lOther$recordType = other.recordType; - if (l$recordType != lOther$recordType) { - return false; - } - final l$ttl = ttl; - final lOther$ttl = other.ttl; - if (l$ttl != lOther$ttl) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$dnsRecordFields - on Fragment$dnsRecordFields { - CopyWith$Fragment$dnsRecordFields get copyWith => - CopyWith$Fragment$dnsRecordFields( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$dnsRecordFields { - factory CopyWith$Fragment$dnsRecordFields( - Fragment$dnsRecordFields instance, - TRes Function(Fragment$dnsRecordFields) then, - ) = _CopyWithImpl$Fragment$dnsRecordFields; - - factory CopyWith$Fragment$dnsRecordFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$dnsRecordFields; - - TRes call({ - String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$dnsRecordFields - implements CopyWith$Fragment$dnsRecordFields { - _CopyWithImpl$Fragment$dnsRecordFields( - this._instance, - this._then, - ); - - final Fragment$dnsRecordFields _instance; - - final TRes Function(Fragment$dnsRecordFields) _then; - - static const _undefined = {}; - - TRes call({ - Object? content = _undefined, - Object? name = _undefined, - Object? priority = _undefined, - Object? recordType = _undefined, - Object? ttl = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$dnsRecordFields( - content: content == _undefined || content == null - ? _instance.content - : (content as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - priority: - priority == _undefined ? _instance.priority : (priority as int?), - recordType: recordType == _undefined || recordType == null - ? _instance.recordType - : (recordType as String), - ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$dnsRecordFields - implements CopyWith$Fragment$dnsRecordFields { - _CopyWithStubImpl$Fragment$dnsRecordFields(this._res); - - TRes _res; - - call({ - String? content, - String? name, - int? priority, - String? recordType, - int? ttl, - String? $__typename, - }) => - _res; -} - -const fragmentDefinitiondnsRecordFields = FragmentDefinitionNode( - name: NameNode(value: 'dnsRecordFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'DnsRecord'), - isNonNull: false, - )), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'content'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'priority'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'recordType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'ttl'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - ]), -); -const documentNodeFragmentdnsRecordFields = DocumentNode(definitions: [ - fragmentDefinitiondnsRecordFields, -]); - -extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient { - void writeFragment$dnsRecordFields({ - required Fragment$dnsRecordFields data, - required Map idFields, - bool broadcast = true, - }) => - this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'dnsRecordFields', - document: documentNodeFragmentdnsRecordFields, - ), - ), - data: data.toJson(), - broadcast: broadcast, - ); - Fragment$dnsRecordFields? readFragment$dnsRecordFields({ - required Map idFields, - bool optimistic = true, - }) { - final result = this.readFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'dnsRecordFields', - document: documentNodeFragmentdnsRecordFields, - ), - ), - optimistic: optimistic, - ); - return result == null ? null : Fragment$dnsRecordFields.fromJson(result); - } -} - -class Fragment$backupSnapshotFields { - Fragment$backupSnapshotFields({ - required this.id, - required this.createdAt, - this.$__typename = 'SnapshotInfo', - }); - - factory Fragment$backupSnapshotFields.fromJson(Map json) { - final l$id = json['id']; - final l$createdAt = json['createdAt']; - final l$$__typename = json['__typename']; - return Fragment$backupSnapshotFields( - id: (l$id as String), - createdAt: dateTimeFromJson(l$createdAt), - $__typename: (l$$__typename as String), - ); - } - - final String id; - - final DateTime createdAt; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$id = id; - _resultData['id'] = l$id; - final l$createdAt = createdAt; - _resultData['createdAt'] = dateTimeToJson(l$createdAt); - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$id = id; - final l$createdAt = createdAt; - final l$$__typename = $__typename; - return Object.hashAll([ - l$id, - l$createdAt, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$backupSnapshotFields) || - runtimeType != other.runtimeType) { - return false; - } - final l$id = id; - final lOther$id = other.id; - if (l$id != lOther$id) { - return false; - } - final l$createdAt = createdAt; - final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$backupSnapshotFields - on Fragment$backupSnapshotFields { - CopyWith$Fragment$backupSnapshotFields - get copyWith => CopyWith$Fragment$backupSnapshotFields( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$backupSnapshotFields { - factory CopyWith$Fragment$backupSnapshotFields( - Fragment$backupSnapshotFields instance, - TRes Function(Fragment$backupSnapshotFields) then, - ) = _CopyWithImpl$Fragment$backupSnapshotFields; - - factory CopyWith$Fragment$backupSnapshotFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$backupSnapshotFields; - - TRes call({ - String? id, - DateTime? createdAt, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$backupSnapshotFields - implements CopyWith$Fragment$backupSnapshotFields { - _CopyWithImpl$Fragment$backupSnapshotFields( - this._instance, - this._then, - ); - - final Fragment$backupSnapshotFields _instance; - - final TRes Function(Fragment$backupSnapshotFields) _then; - - static const _undefined = {}; - - TRes call({ - Object? id = _undefined, - Object? createdAt = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$backupSnapshotFields( - id: id == _undefined || id == null ? _instance.id : (id as String), - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$backupSnapshotFields - implements CopyWith$Fragment$backupSnapshotFields { - _CopyWithStubImpl$Fragment$backupSnapshotFields(this._res); - - TRes _res; - - call({ - String? id, - DateTime? createdAt, - String? $__typename, - }) => - _res; -} - -const fragmentDefinitionbackupSnapshotFields = FragmentDefinitionNode( - name: NameNode(value: 'backupSnapshotFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'SnapshotInfo'), - isNonNull: false, - )), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'id'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - ]), -); -const documentNodeFragmentbackupSnapshotFields = DocumentNode(definitions: [ - fragmentDefinitionbackupSnapshotFields, -]); - -extension ClientExtension$Fragment$backupSnapshotFields - on graphql.GraphQLClient { - void writeFragment$backupSnapshotFields({ - required Fragment$backupSnapshotFields data, - required Map idFields, - bool broadcast = true, - }) => - this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'backupSnapshotFields', - document: documentNodeFragmentbackupSnapshotFields, - ), - ), - data: data.toJson(), - broadcast: broadcast, - ); - Fragment$backupSnapshotFields? readFragment$backupSnapshotFields({ - required Map idFields, - bool optimistic = true, - }) { - final result = this.readFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'backupSnapshotFields', - document: documentNodeFragmentbackupSnapshotFields, - ), - ), - optimistic: optimistic, - ); - return result == null - ? null - : Fragment$backupSnapshotFields.fromJson(result); - } -} - const possibleTypesMap = >{ 'MutationReturnInterface': { 'ApiKeyMutationReturn', diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql index 83e5f06e..a33a5fef 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql @@ -28,6 +28,14 @@ query SystemIsUsingBinds { } } +fragment fragmentDnsRecords on DnsRecord { + recordType + name + content + ttl + priority +} + query DomainInfo { system { domainInfo { @@ -35,7 +43,7 @@ query DomainInfo { hostname provider requiredDnsRecords { - ...dnsRecordFields + ...fragmentDnsRecords } } } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index 59bd5fdd..abbba037 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -2282,6 +2282,300 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< _res; } +class Fragment$fragmentDnsRecords { + Fragment$fragmentDnsRecords({ + required this.recordType, + required this.name, + required this.content, + required this.ttl, + this.priority, + this.$__typename = 'DnsRecord', + }); + + factory Fragment$fragmentDnsRecords.fromJson(Map json) { + final l$recordType = json['recordType']; + final l$name = json['name']; + final l$content = json['content']; + final l$ttl = json['ttl']; + final l$priority = json['priority']; + final l$$__typename = json['__typename']; + return Fragment$fragmentDnsRecords( + recordType: (l$recordType as String), + name: (l$name as String), + content: (l$content as String), + ttl: (l$ttl as int), + priority: (l$priority as int?), + $__typename: (l$$__typename as String), + ); + } + + final String recordType; + + final String name; + + final String content; + + final int ttl; + + final int? priority; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$recordType = recordType; + _resultData['recordType'] = l$recordType; + final l$name = name; + _resultData['name'] = l$name; + final l$content = content; + _resultData['content'] = l$content; + final l$ttl = ttl; + _resultData['ttl'] = l$ttl; + final l$priority = priority; + _resultData['priority'] = l$priority; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$recordType = recordType; + final l$name = name; + final l$content = content; + final l$ttl = ttl; + final l$priority = priority; + final l$$__typename = $__typename; + return Object.hashAll([ + l$recordType, + l$name, + l$content, + l$ttl, + l$priority, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$fragmentDnsRecords) || + runtimeType != other.runtimeType) { + return false; + } + final l$recordType = recordType; + final lOther$recordType = other.recordType; + if (l$recordType != lOther$recordType) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + final l$content = content; + final lOther$content = other.content; + if (l$content != lOther$content) { + return false; + } + final l$ttl = ttl; + final lOther$ttl = other.ttl; + if (l$ttl != lOther$ttl) { + return false; + } + final l$priority = priority; + final lOther$priority = other.priority; + if (l$priority != lOther$priority) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$fragmentDnsRecords + on Fragment$fragmentDnsRecords { + CopyWith$Fragment$fragmentDnsRecords + get copyWith => CopyWith$Fragment$fragmentDnsRecords( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$fragmentDnsRecords { + factory CopyWith$Fragment$fragmentDnsRecords( + Fragment$fragmentDnsRecords instance, + TRes Function(Fragment$fragmentDnsRecords) then, + ) = _CopyWithImpl$Fragment$fragmentDnsRecords; + + factory CopyWith$Fragment$fragmentDnsRecords.stub(TRes res) = + _CopyWithStubImpl$Fragment$fragmentDnsRecords; + + TRes call({ + String? recordType, + String? name, + String? content, + int? ttl, + int? priority, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$fragmentDnsRecords + implements CopyWith$Fragment$fragmentDnsRecords { + _CopyWithImpl$Fragment$fragmentDnsRecords( + this._instance, + this._then, + ); + + final Fragment$fragmentDnsRecords _instance; + + final TRes Function(Fragment$fragmentDnsRecords) _then; + + static const _undefined = {}; + + TRes call({ + Object? recordType = _undefined, + Object? name = _undefined, + Object? content = _undefined, + Object? ttl = _undefined, + Object? priority = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$fragmentDnsRecords( + recordType: recordType == _undefined || recordType == null + ? _instance.recordType + : (recordType as String), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + content: content == _undefined || content == null + ? _instance.content + : (content as String), + ttl: ttl == _undefined || ttl == null ? _instance.ttl : (ttl as int), + priority: + priority == _undefined ? _instance.priority : (priority as int?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$fragmentDnsRecords + implements CopyWith$Fragment$fragmentDnsRecords { + _CopyWithStubImpl$Fragment$fragmentDnsRecords(this._res); + + TRes _res; + + call({ + String? recordType, + String? name, + String? content, + int? ttl, + int? priority, + String? $__typename, + }) => + _res; +} + +const fragmentDefinitionfragmentDnsRecords = FragmentDefinitionNode( + name: NameNode(value: 'fragmentDnsRecords'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'DnsRecord'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'ttl'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); +const documentNodeFragmentfragmentDnsRecords = DocumentNode(definitions: [ + fragmentDefinitionfragmentDnsRecords, +]); + +extension ClientExtension$Fragment$fragmentDnsRecords on graphql.GraphQLClient { + void writeFragment$fragmentDnsRecords({ + required Fragment$fragmentDnsRecords data, + required Map idFields, + bool broadcast = true, + }) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'fragmentDnsRecords', + document: documentNodeFragmentfragmentDnsRecords, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$fragmentDnsRecords? readFragment$fragmentDnsRecords({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'fragmentDnsRecords', + document: documentNodeFragmentfragmentDnsRecords, + ), + ), + optimistic: optimistic, + ); + return result == null ? null : Fragment$fragmentDnsRecords.fromJson(result); + } +} + class Query$SystemSettings { Query$SystemSettings({ required this.system, @@ -4019,7 +4313,7 @@ const documentNodeQueryDomainInfo = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'dnsRecordFields'), + name: NameNode(value: 'fragmentDnsRecords'), directives: [], ), FieldNode( @@ -4058,7 +4352,7 @@ const documentNodeQueryDomainInfo = DocumentNode(definitions: [ ), ]), ), - fragmentDefinitiondnsRecordFields, + fragmentDefinitionfragmentDnsRecords, ]); Query$DomainInfo _parserFn$Query$DomainInfo(Map data) => Query$DomainInfo.fromJson(data); @@ -4331,7 +4625,7 @@ class Query$DomainInfo$system$domainInfo { provider: fromJson$Enum$DnsProvider((l$provider as String)), requiredDnsRecords: (l$requiredDnsRecords as List) .map((e) => - Fragment$dnsRecordFields.fromJson((e as Map))) + Fragment$fragmentDnsRecords.fromJson((e as Map))) .toList(), $__typename: (l$$__typename as String), ); @@ -4343,7 +4637,7 @@ class Query$DomainInfo$system$domainInfo { final Enum$DnsProvider provider; - final List requiredDnsRecords; + final List requiredDnsRecords; final String $__typename; @@ -4447,13 +4741,14 @@ abstract class CopyWith$Query$DomainInfo$system$domainInfo { String? domain, String? hostname, Enum$DnsProvider? provider, - List? requiredDnsRecords, + List? requiredDnsRecords, String? $__typename, }); TRes requiredDnsRecords( - Iterable Function( + Iterable Function( Iterable< - CopyWith$Fragment$dnsRecordFields>) + CopyWith$Fragment$fragmentDnsRecords< + Fragment$fragmentDnsRecords>>) _fn); } @@ -4490,20 +4785,20 @@ class _CopyWithImpl$Query$DomainInfo$system$domainInfo requiredDnsRecords: requiredDnsRecords == _undefined || requiredDnsRecords == null ? _instance.requiredDnsRecords - : (requiredDnsRecords as List), + : (requiredDnsRecords as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); TRes requiredDnsRecords( - Iterable Function( + Iterable Function( Iterable< - CopyWith$Fragment$dnsRecordFields< - Fragment$dnsRecordFields>>) + CopyWith$Fragment$fragmentDnsRecords< + Fragment$fragmentDnsRecords>>) _fn) => call( requiredDnsRecords: _fn(_instance.requiredDnsRecords - .map((e) => CopyWith$Fragment$dnsRecordFields( + .map((e) => CopyWith$Fragment$fragmentDnsRecords( e, (i) => i, ))).toList()); @@ -4519,7 +4814,7 @@ class _CopyWithStubImpl$Query$DomainInfo$system$domainInfo String? domain, String? hostname, Enum$DnsProvider? provider, - List? requiredDnsRecords, + List? requiredDnsRecords, String? $__typename, }) => _res; diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index 7998e5c0..9299ff7b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -10,7 +10,7 @@ query AllServices { description displayName dnsRecords { - ...dnsRecordFields + ...fragmentDnsRecords } id isEnabled diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 04eaaef9..64720f3e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -3,6 +3,7 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'server_settings.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -2454,7 +2455,7 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( - name: NameNode(value: 'dnsRecordFields'), + name: NameNode(value: 'fragmentDnsRecords'), directives: [], ), FieldNode( @@ -2593,7 +2594,7 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [ ), ]), ), - fragmentDefinitiondnsRecordFields, + fragmentDefinitionfragmentDnsRecords, ]); Query$AllServices _parserFn$Query$AllServices(Map data) => Query$AllServices.fromJson(data); @@ -2901,7 +2902,7 @@ class Query$AllServices$services$allServices { displayName: (l$displayName as String), dnsRecords: (l$dnsRecords as List?) ?.map((e) => - Fragment$dnsRecordFields.fromJson((e as Map))) + Fragment$fragmentDnsRecords.fromJson((e as Map))) .toList(), id: (l$id as String), isEnabled: (l$isEnabled as bool), @@ -2921,7 +2922,7 @@ class Query$AllServices$services$allServices { final String displayName; - final List? dnsRecords; + final List? dnsRecords; final String id; @@ -3106,7 +3107,7 @@ abstract class CopyWith$Query$AllServices$services$allServices { TRes call({ String? description, String? displayName, - List? dnsRecords, + List? dnsRecords, String? id, bool? isEnabled, bool? isMovable, @@ -3118,9 +3119,10 @@ abstract class CopyWith$Query$AllServices$services$allServices { String? $__typename, }); TRes dnsRecords( - Iterable? Function( + Iterable? Function( Iterable< - CopyWith$Fragment$dnsRecordFields>?) + CopyWith$Fragment$fragmentDnsRecords< + Fragment$fragmentDnsRecords>>?) _fn); CopyWith$Query$AllServices$services$allServices$storageUsage get storageUsage; @@ -3162,7 +3164,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices : (displayName as String), dnsRecords: dnsRecords == _undefined ? _instance.dnsRecords - : (dnsRecords as List?), + : (dnsRecords as List?), id: id == _undefined || id == null ? _instance.id : (id as String), isEnabled: isEnabled == _undefined || isEnabled == null ? _instance.isEnabled @@ -3189,14 +3191,14 @@ class _CopyWithImpl$Query$AllServices$services$allServices : ($__typename as String), )); TRes dnsRecords( - Iterable? Function( + Iterable? Function( Iterable< - CopyWith$Fragment$dnsRecordFields< - Fragment$dnsRecordFields>>?) + CopyWith$Fragment$fragmentDnsRecords< + Fragment$fragmentDnsRecords>>?) _fn) => call( dnsRecords: _fn(_instance.dnsRecords - ?.map((e) => CopyWith$Fragment$dnsRecordFields( + ?.map((e) => CopyWith$Fragment$fragmentDnsRecords( e, (i) => i, )))?.toList()); @@ -3217,7 +3219,7 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices call({ String? description, String? displayName, - List? dnsRecords, + List? dnsRecords, String? id, bool? isEnabled, bool? isMovable, diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 504a0cb5..bbcbb461 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -289,8 +289,10 @@ class ServerApi extends GraphQLApiMap } records = response.parsedData!.system.domainInfo.requiredDnsRecords .map( - (final Fragment$dnsRecordFields fragment) => - DnsRecord.fromGraphQL(fragment), + ( + final Fragment$fragmentDnsRecords record, + ) => + DnsRecord.fromGraphQL(record), ) .toList(); } catch (e) { diff --git a/lib/logic/models/json/dns_records.dart b/lib/logic/models/json/dns_records.dart index 1680e943..3951ae4e 100644 --- a/lib/logic/models/json/dns_records.dart +++ b/lib/logic/models/json/dns_records.dart @@ -1,5 +1,5 @@ import 'package:json_annotation/json_annotation.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; part 'dns_records.g.dart'; @@ -16,7 +16,7 @@ class DnsRecord { }); DnsRecord.fromGraphQL( - final Fragment$dnsRecordFields record, + final Fragment$fragmentDnsRecords record, ) : this( type: record.recordType, name: record.name, diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 039065e3..19cd39ea 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -6,6 +6,8 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql. import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import '../api_maps/graphql_maps/schema/server_settings.graphql.dart'; + class Service { Service.fromGraphQL(final Query$AllServices$services$allServices service) : this( @@ -24,7 +26,9 @@ class Service { svgIcon: utf8.decode(base64.decode(service.svgIcon)), dnsRecords: service.dnsRecords ?.map( - (final Fragment$dnsRecordFields record) => + ( + final Fragment$fragmentDnsRecords record, + ) => DnsRecord.fromGraphQL(record), ) .toList() ?? From a56f525060de29fd4ed8206459577f11e49362f7 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 26 Jun 2023 14:15:53 -0300 Subject: [PATCH 548/732] refactor(server-provider): Rearrange Server Provider interface - Move all implement functions accordingly to their position in interface - Get rid of duplicate toInfect() functions, move them to ServerDomain --- lib/logic/models/hive/server_domain.dart | 7 + .../server_providers/digital_ocean.dart | 740 +++++++++--------- .../providers/server_providers/hetzner.dart | 737 +++++++++-------- .../server_providers/server_provider.dart | 126 ++- 4 files changed, 831 insertions(+), 779 deletions(-) diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index 1649be2a..bd755bbc 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -47,4 +47,11 @@ enum DnsProviderType { return unknown; } } + + String toInfectName() => switch (this) { + digitalOcean => 'DIGITALOCEAN', + cloudflare => 'CLOUDFLARE', + desec => 'DESEC', + unknown => 'UNKNOWN', + }; } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 93371405..2f8e11c7 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -5,7 +5,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/digital_oc import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; @@ -52,86 +51,41 @@ class DigitalOceanServerProvider extends ServerProvider { ServerProviderType get type => ServerProviderType.digitalOcean; @override - Future> trySetServerLocation( - final String location, - ) async { - final bool apiInitialized = _adapter.api().isWithToken; - if (!apiInitialized) { + Future>> getServers() async { + List servers = []; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { return GenericResult( - success: true, - data: false, - message: 'Not authorized!', + success: result.success, + data: servers, + code: result.code, + message: result.message, ); } - _adapter = ApiAdapter( - isWithToken: true, - region: location, - ); - return success; - } + final List rawServers = result.data; + servers = rawServers.map( + (final server) { + String ipv4 = '0.0.0.0'; + if (server['networks']['v4'].isNotEmpty) { + for (final v4 in server['networks']['v4']) { + if (v4['type'].toString() == 'public') { + ipv4 = v4['ip_address'].toString(); + } + } + } - @override - Future> tryInitApiByToken(final String token) async { - final api = _adapter.api(getInitialized: false); - final result = await api.isApiTokenValid(token); - if (!result.data || !result.success) { - return result; - } + return ServerBasicInfo( + id: server['id'], + reverseDns: server['name'], + created: DateTime.now(), + ip: ipv4, + name: server['name'], + ); + }, + ).toList(); - _adapter = ApiAdapter(region: api.region, isWithToken: true); - return result; - } - - String? getEmojiFlag(final String query) { - String? emoji; - - switch (query.toLowerCase().substring(0, 3)) { - case 'fra': - emoji = '🇩🇪'; - break; - - case 'ams': - emoji = '🇳🇱'; - break; - - case 'sgp': - emoji = '🇸🇬'; - break; - - case 'lon': - emoji = '🇬🇧'; - break; - - case 'tor': - emoji = '🇨🇦'; - break; - - case 'blr': - emoji = '🇮🇳'; - break; - - case 'nyc': - case 'sfo': - emoji = '🇺🇸'; - break; - } - - return emoji; - } - - String dnsProviderToInfectName(final DnsProviderType dnsProvider) { - String dnsProviderType; - switch (dnsProvider) { - case DnsProviderType.digitalOcean: - dnsProviderType = 'DIGITALOCEAN'; - break; - case DnsProviderType.cloudflare: - default: - dnsProviderType = 'CLOUDFLARE'; - break; - } - return dnsProviderType; + return GenericResult(success: true, data: servers); } @override @@ -148,8 +102,7 @@ class DigitalOceanServerProvider extends ServerProvider { rootUser: installationData.rootUser, domainName: installationData.serverDomain.domainName, serverType: installationData.serverTypeId, - dnsProviderType: - dnsProviderToInfectName(installationData.dnsProviderType), + dnsProviderType: installationData.dnsProviderType.toInfectName(), hostName: hostname, base64Password: base64.encode( utf8.encode(installationData.rootUser.password ?? 'PASS'), @@ -244,6 +197,139 @@ class DigitalOceanServerProvider extends ServerProvider { return GenericResult(success: true, data: null); } + @override + Future> deleteServer( + final String hostname, + ) async { + final String deletionName = getHostnameFromDomain(hostname); + final serversResult = await getServers(); + try { + final servers = serversResult.data; + ServerBasicInfo? foundServer; + for (final server in servers) { + if (server.name == deletionName) { + foundServer = server; + break; + } + } + + final volumes = await getVolumes(); + final ServerVolume volumeToRemove; + volumeToRemove = volumes.data.firstWhere( + (final el) => el.serverId == foundServer!.id, + ); + + await _adapter.api().detachVolume( + volumeToRemove.name, + volumeToRemove.serverId!, + ); + + await Future.delayed(const Duration(seconds: 10)); + final List laterFutures = []; + laterFutures.add(_adapter.api().deleteVolume(volumeToRemove.uuid!)); + laterFutures.add(_adapter.api().deleteServer(foundServer!.id)); + + await Future.wait(laterFutures); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: null, + ), + CallbackDialogueChoice( + title: 'modals.try_again'.tr(), + callback: () async { + await Future.delayed(const Duration(seconds: 5)); + return deleteServer(hostname); + }, + ), + ], + description: 'modals.try_again'.tr(), + title: 'modals.server_deletion_error'.tr(), + ), + message: e.toString(), + ); + } + + return GenericResult( + success: true, + data: null, + ); + } + + @override + Future> tryInitApiByToken(final String token) async { + final api = _adapter.api(getInitialized: false); + final result = await api.isApiTokenValid(token); + if (!result.data || !result.success) { + return result; + } + + _adapter = ApiAdapter(region: api.region, isWithToken: true); + return result; + } + + @override + Future> trySetServerLocation( + final String location, + ) async { + final bool apiInitialized = _adapter.api().isWithToken; + if (!apiInitialized) { + return GenericResult( + success: true, + data: false, + message: 'Not authorized!', + ); + } + + _adapter = ApiAdapter( + isWithToken: true, + region: location, + ); + return success; + } + + String? getEmojiFlag(final String query) { + String? emoji; + + switch (query.toLowerCase().substring(0, 3)) { + case 'fra': + emoji = '🇩🇪'; + break; + + case 'ams': + emoji = '🇳🇱'; + break; + + case 'sgp': + emoji = '🇸🇬'; + break; + + case 'lon': + emoji = '🇬🇧'; + break; + + case 'tor': + emoji = '🇨🇦'; + break; + + case 'blr': + emoji = '🇮🇳'; + break; + + case 'nyc': + case 'sfo': + emoji = '🇺🇸'; + break; + } + + return emoji; + } + @override Future>> getAvailableLocations() async { @@ -318,43 +404,214 @@ class DigitalOceanServerProvider extends ServerProvider { } @override - Future>> getServers() async { - List servers = []; - final result = await _adapter.api().getServers(); - if (result.data.isEmpty || !result.success) { + Future> powerOn(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().powerOn(serverId); + if (!result.success) { return GenericResult( - success: result.success, - data: servers, + success: false, + data: timestamp, code: result.code, message: result.message, ); } - final List rawServers = result.data; - servers = rawServers.map( - (final server) { - String ipv4 = '0.0.0.0'; - if (server['networks']['v4'].isNotEmpty) { - for (final v4 in server['networks']['v4']) { - if (v4['type'].toString() == 'public') { - ipv4 = v4['ip_address'].toString(); - } - } - } + timestamp = DateTime.now(); - return ServerBasicInfo( - id: server['id'], - reverseDns: server['name'], - created: DateTime.now(), - ip: ipv4, - name: server['name'], - ); - }, - ).toList(); - - return GenericResult(success: true, data: servers); + return GenericResult( + success: true, + data: timestamp, + ); } + @override + Future> restart(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().restart(serverId); + if (!result.success) { + return GenericResult( + success: false, + data: timestamp, + code: result.code, + message: result.message, + ); + } + + timestamp = DateTime.now(); + + return GenericResult( + success: true, + data: timestamp, + ); + } + + /// Hardcoded on their documentation and there is no pricing API at all + /// Probably we should scrap the doc page manually + @override + Future> getPricePerGb() async => GenericResult( + success: true, + data: Price( + value: 0.10, + currency: currency, + ), + ); + + @override + Future>> getVolumes({ + final String? status, + }) async { + final List volumes = []; + + final result = await _adapter.api().getVolumes(); + + if (!result.success || result.data.isEmpty) { + return GenericResult( + data: [], + success: false, + code: result.code, + message: result.message, + ); + } + + try { + int id = 0; + for (final rawVolume in result.data) { + final String volumeName = rawVolume.name; + final volume = ServerVolume( + id: id++, + name: volumeName, + sizeByte: rawVolume.sizeGigabytes * 1024 * 1024 * 1024, + serverId: + (rawVolume.dropletIds != null && rawVolume.dropletIds!.isNotEmpty) + ? rawVolume.dropletIds![0] + : null, + linuxDevice: 'scsi-0DO_Volume_$volumeName', + uuid: rawVolume.id, + ); + volumes.add(volume); + } + } catch (e) { + print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } + + return GenericResult( + data: volumes, + success: true, + ); + } + + @override + Future> createVolume() async { + ServerVolume? volume; + + final result = await _adapter.api().createVolume(); + + if (!result.success || result.data == null) { + return GenericResult( + data: null, + success: false, + code: result.code, + message: result.message, + ); + } + + final getVolumesResult = await _adapter.api().getVolumes(); + + if (!getVolumesResult.success || getVolumesResult.data.isEmpty) { + return GenericResult( + data: null, + success: false, + code: result.code, + message: result.message, + ); + } + + final String volumeName = result.data!.name; + volume = ServerVolume( + id: getVolumesResult.data.length, + name: volumeName, + sizeByte: result.data!.sizeGigabytes, + serverId: null, + linuxDevice: '/dev/disk/by-id/scsi-0DO_Volume_$volumeName', + uuid: result.data!.id, + ); + + return GenericResult( + data: volume, + success: true, + ); + } + + Future> getVolume( + final String volumeUuid, + ) async { + ServerVolume? requestedVolume; + + final result = await getVolumes(); + + if (!result.success || result.data.isEmpty) { + return GenericResult( + data: null, + success: false, + code: result.code, + message: result.message, + ); + } + + for (final volume in result.data) { + if (volume.uuid == volumeUuid) { + requestedVolume = volume; + } + } + + return GenericResult( + data: requestedVolume, + success: true, + ); + } + + @override + Future> attachVolume( + final ServerVolume volume, + final int serverId, + ) async => + _adapter.api().attachVolume( + volume.name, + serverId, + ); + + @override + Future> detachVolume( + final ServerVolume volume, + ) async => + _adapter.api().detachVolume( + volume.name, + volume.serverId!, + ); + + @override + Future> deleteVolume( + final ServerVolume volume, + ) async => + _adapter.api().deleteVolume( + volume.uuid!, + ); + + @override + Future> resizeVolume( + final ServerVolume volume, + final DiskSize size, + ) async => + _adapter.api().resizeVolume( + volume.name, + size, + ); + @override Future>> getMetadata( final int serverId, @@ -536,277 +793,4 @@ class DigitalOceanServerProvider extends ServerProvider { return GenericResult(success: true, data: metrics); } - - @override - Future> restart(final int serverId) async { - DateTime? timestamp; - final result = await _adapter.api().restart(serverId); - if (!result.success) { - return GenericResult( - success: false, - data: timestamp, - code: result.code, - message: result.message, - ); - } - - timestamp = DateTime.now(); - - return GenericResult( - success: true, - data: timestamp, - ); - } - - @override - Future> deleteServer( - final String hostname, - ) async { - final String deletionName = getHostnameFromDomain(hostname); - final serversResult = await getServers(); - try { - final servers = serversResult.data; - ServerBasicInfo? foundServer; - for (final server in servers) { - if (server.name == deletionName) { - foundServer = server; - break; - } - } - - final volumes = await getVolumes(); - final ServerVolume volumeToRemove; - volumeToRemove = volumes.data.firstWhere( - (final el) => el.serverId == foundServer!.id, - ); - - await _adapter.api().detachVolume( - volumeToRemove.name, - volumeToRemove.serverId!, - ); - - await Future.delayed(const Duration(seconds: 10)); - final List laterFutures = []; - laterFutures.add(_adapter.api().deleteVolume(volumeToRemove.uuid!)); - laterFutures.add(_adapter.api().deleteServer(foundServer!.id)); - - await Future.wait(laterFutures); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: CallbackDialogueBranching( - choices: [ - CallbackDialogueChoice( - title: 'basis.cancel'.tr(), - callback: null, - ), - CallbackDialogueChoice( - title: 'modals.try_again'.tr(), - callback: () async { - await Future.delayed(const Duration(seconds: 5)); - return deleteServer(hostname); - }, - ), - ], - description: 'modals.try_again'.tr(), - title: 'modals.server_deletion_error'.tr(), - ), - message: e.toString(), - ); - } - - return GenericResult( - success: true, - data: null, - ); - } - - @override - Future>> getVolumes({ - final String? status, - }) async { - final List volumes = []; - - final result = await _adapter.api().getVolumes(); - - if (!result.success || result.data.isEmpty) { - return GenericResult( - data: [], - success: false, - code: result.code, - message: result.message, - ); - } - - try { - int id = 0; - for (final rawVolume in result.data) { - final String volumeName = rawVolume.name; - final volume = ServerVolume( - id: id++, - name: volumeName, - sizeByte: rawVolume.sizeGigabytes * 1024 * 1024 * 1024, - serverId: - (rawVolume.dropletIds != null && rawVolume.dropletIds!.isNotEmpty) - ? rawVolume.dropletIds![0] - : null, - linuxDevice: 'scsi-0DO_Volume_$volumeName', - uuid: rawVolume.id, - ); - volumes.add(volume); - } - } catch (e) { - print(e); - return GenericResult( - data: [], - success: false, - message: e.toString(), - ); - } - - return GenericResult( - data: volumes, - success: true, - ); - } - - @override - Future> createVolume() async { - ServerVolume? volume; - - final result = await _adapter.api().createVolume(); - - if (!result.success || result.data == null) { - return GenericResult( - data: null, - success: false, - code: result.code, - message: result.message, - ); - } - - final getVolumesResult = await _adapter.api().getVolumes(); - - if (!getVolumesResult.success || getVolumesResult.data.isEmpty) { - return GenericResult( - data: null, - success: false, - code: result.code, - message: result.message, - ); - } - - final String volumeName = result.data!.name; - volume = ServerVolume( - id: getVolumesResult.data.length, - name: volumeName, - sizeByte: result.data!.sizeGigabytes, - serverId: null, - linuxDevice: '/dev/disk/by-id/scsi-0DO_Volume_$volumeName', - uuid: result.data!.id, - ); - - return GenericResult( - data: volume, - success: true, - ); - } - - Future> getVolume( - final String volumeUuid, - ) async { - ServerVolume? requestedVolume; - - final result = await getVolumes(); - - if (!result.success || result.data.isEmpty) { - return GenericResult( - data: null, - success: false, - code: result.code, - message: result.message, - ); - } - - for (final volume in result.data) { - if (volume.uuid == volumeUuid) { - requestedVolume = volume; - } - } - - return GenericResult( - data: requestedVolume, - success: true, - ); - } - - @override - Future> deleteVolume( - final ServerVolume volume, - ) async => - _adapter.api().deleteVolume( - volume.uuid!, - ); - - @override - Future> attachVolume( - final ServerVolume volume, - final int serverId, - ) async => - _adapter.api().attachVolume( - volume.name, - serverId, - ); - - @override - Future> detachVolume( - final ServerVolume volume, - ) async => - _adapter.api().detachVolume( - volume.name, - volume.serverId!, - ); - - @override - Future> resizeVolume( - final ServerVolume volume, - final DiskSize size, - ) async => - _adapter.api().resizeVolume( - volume.name, - size, - ); - - /// Hardcoded on their documentation and there is no pricing API at all - /// Probably we should scrap the doc page manually - @override - Future> getPricePerGb() async => GenericResult( - success: true, - data: Price( - value: 0.10, - currency: currency, - ), - ); - - @override - Future> powerOn(final int serverId) async { - DateTime? timestamp; - final result = await _adapter.api().powerOn(serverId); - if (!result.success) { - return GenericResult( - success: false, - data: timestamp, - code: result.code, - message: result.message, - ); - } - - timestamp = DateTime.now(); - - return GenericResult( - success: true, - data: timestamp, - ); - } } diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index f7afeb3c..b61e458f 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -5,7 +5,6 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/server_providers/hetzner/he import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/hetzner_server_info.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/logic/models/price.dart'; @@ -51,131 +50,6 @@ class HetznerServerProvider extends ServerProvider { @override ServerProviderType get type => ServerProviderType.hetzner; - @override - Future> trySetServerLocation( - final String location, - ) async { - final bool apiInitialized = _adapter.api().isWithToken; - if (!apiInitialized) { - return GenericResult( - success: true, - data: false, - message: 'Not authorized!', - ); - } - - _adapter = ApiAdapter( - isWithToken: true, - region: location, - ); - return success; - } - - @override - Future> tryInitApiByToken(final String token) async { - final api = _adapter.api(getInitialized: false); - final result = await api.isApiTokenValid(token); - if (!result.data || !result.success) { - return result; - } - - _adapter = ApiAdapter(region: api.region, isWithToken: true); - return result; - } - - String? getEmojiFlag(final String query) { - String? emoji; - - switch (query.toLowerCase()) { - case 'de': - emoji = '🇩🇪'; - break; - - case 'fi': - emoji = '🇫🇮'; - break; - - case 'us': - emoji = '🇺🇸'; - break; - } - - return emoji; - } - - @override - Future>> - getAvailableLocations() async { - final List locations = []; - final result = await _adapter.api().getAvailableLocations(); - if (result.data.isEmpty || !result.success) { - return GenericResult( - success: result.success, - data: locations, - code: result.code, - message: result.message, - ); - } - - final List rawLocations = result.data; - for (final rawLocation in rawLocations) { - ServerProviderLocation? location; - try { - location = ServerProviderLocation( - title: rawLocation.city, - description: rawLocation.description, - flag: getEmojiFlag(rawLocation.country), - identifier: rawLocation.name, - ); - } catch (e) { - continue; - } - locations.add(location); - } - - return GenericResult(success: true, data: locations); - } - - @override - Future>> getServerTypes({ - required final ServerProviderLocation location, - }) async { - final List types = []; - final result = await _adapter.api().getAvailableServerTypes(); - if (result.data.isEmpty || !result.success) { - return GenericResult( - success: result.success, - data: types, - code: result.code, - message: result.message, - ); - } - - final rawTypes = result.data; - for (final rawType in rawTypes) { - for (final rawPrice in rawType.prices) { - if (rawPrice.location == location.identifier) { - types.add( - ServerType( - title: rawType.description, - identifier: rawType.name, - ram: rawType.memory.toDouble(), - cores: rawType.cores, - disk: DiskSize(byte: rawType.disk * 1024 * 1024 * 1024), - price: Price( - value: rawPrice.monthly, - currency: currency, - ), - location: location, - ), - ); - } - } - } - - return GenericResult(success: true, data: types); - } - @override Future>> getServers() async { final List servers = []; @@ -214,206 +88,6 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(success: true, data: servers); } - @override - Future>> getMetadata( - final int serverId, - ) async { - List metadata = []; - final result = await _adapter.api().getServers(); - if (result.data.isEmpty || !result.success) { - return GenericResult( - success: false, - data: metadata, - code: result.code, - message: result.message, - ); - } - - final List servers = result.data; - try { - final HetznerServerInfo server = servers.firstWhere( - (final server) => server.id == serverId, - ); - - metadata = [ - ServerMetadataEntity( - type: MetadataType.id, - trId: 'server.server_id', - value: server.id.toString(), - ), - ServerMetadataEntity( - type: MetadataType.status, - trId: 'server.status', - value: server.status.toString().split('.')[1].capitalize(), - ), - ServerMetadataEntity( - type: MetadataType.cpu, - trId: 'server.cpu', - value: server.serverType.cores.toString(), - ), - ServerMetadataEntity( - type: MetadataType.ram, - trId: 'server.ram', - value: '${server.serverType.memory.toString()} GB', - ), - ServerMetadataEntity( - type: MetadataType.cost, - trId: 'server.monthly_cost', - value: - '${server.serverType.prices[1].monthly.toStringAsFixed(2)} ${currency.shortcode}', - ), - ServerMetadataEntity( - type: MetadataType.location, - trId: 'server.location', - value: '${server.location.city}, ${server.location.country}', - ), - ServerMetadataEntity( - type: MetadataType.other, - trId: 'server.provider', - value: _adapter.api().displayProviderName, - ), - ]; - } catch (e) { - return GenericResult( - success: false, - data: [], - message: e.toString(), - ); - } - - return GenericResult(success: true, data: metadata); - } - - @override - Future> getMetrics( - final int serverId, - final DateTime start, - final DateTime end, - ) async { - ServerMetrics? metrics; - - List serializeTimeSeries( - final Map json, - final String type, - ) { - final List list = json['time_series'][type]['values']; - return list - .map((final el) => TimeSeriesData(el[0], double.parse(el[1]))) - .toList(); - } - - final cpuResult = await _adapter.api().getMetrics( - serverId, - start, - end, - 'cpu', - ); - - if (cpuResult.data.isEmpty || !cpuResult.success) { - return GenericResult( - success: false, - data: metrics, - code: cpuResult.code, - message: cpuResult.message, - ); - } - - final netResult = await _adapter.api().getMetrics( - serverId, - start, - end, - 'network', - ); - - if (cpuResult.data.isEmpty || !netResult.success) { - return GenericResult( - success: false, - data: metrics, - code: netResult.code, - message: netResult.message, - ); - } - - metrics = ServerMetrics( - cpu: serializeTimeSeries( - cpuResult.data, - 'cpu', - ), - bandwidthIn: serializeTimeSeries( - netResult.data, - 'network.0.bandwidth.in', - ), - bandwidthOut: serializeTimeSeries( - netResult.data, - 'network.0.bandwidth.out', - ), - end: end, - start: start, - stepsInSecond: cpuResult.data['step'], - ); - - return GenericResult(data: metrics, success: true); - } - - @override - Future> restart(final int serverId) async { - DateTime? timestamp; - final result = await _adapter.api().restart(serverId); - if (!result.success) { - return GenericResult( - success: false, - data: timestamp, - code: result.code, - message: result.message, - ); - } - - timestamp = DateTime.now(); - - return GenericResult( - success: true, - data: timestamp, - ); - } - - @override - Future> powerOn(final int serverId) async { - DateTime? timestamp; - final result = await _adapter.api().powerOn(serverId); - if (!result.success) { - return GenericResult( - success: false, - data: timestamp, - code: result.code, - message: result.message, - ); - } - - timestamp = DateTime.now(); - - return GenericResult( - success: true, - data: timestamp, - ); - } - - String dnsProviderToInfectName(final DnsProviderType dnsProvider) { - String dnsProviderType; - switch (dnsProvider) { - case DnsProviderType.digitalOcean: - dnsProviderType = 'DIGITALOCEAN'; - break; - case DnsProviderType.desec: - dnsProviderType = 'DESEC'; - break; - case DnsProviderType.cloudflare: - default: - dnsProviderType = 'CLOUDFLARE'; - break; - } - return dnsProviderType; - } - @override Future> launchInstallation( final LaunchInstallationData installationData, @@ -454,8 +128,7 @@ class HetznerServerProvider extends ServerProvider { rootUser: installationData.rootUser, domainName: installationData.serverDomain.domainName, serverType: installationData.serverTypeId, - dnsProviderType: - dnsProviderToInfectName(installationData.dnsProviderType), + dnsProviderType: installationData.dnsProviderType.toInfectName(), hostName: hostname, volumeId: volume.id, base64Password: base64.encode( @@ -651,10 +324,175 @@ class HetznerServerProvider extends ServerProvider { } @override - Future> createVolume() async { - ServerVolume? volume; + Future> tryInitApiByToken(final String token) async { + final api = _adapter.api(getInitialized: false); + final result = await api.isApiTokenValid(token); + if (!result.data || !result.success) { + return result; + } - final result = await _adapter.api().createVolume(); + _adapter = ApiAdapter(region: api.region, isWithToken: true); + return result; + } + + String? getEmojiFlag(final String query) { + String? emoji; + + switch (query.toLowerCase()) { + case 'de': + emoji = '🇩🇪'; + break; + + case 'fi': + emoji = '🇫🇮'; + break; + + case 'us': + emoji = '🇺🇸'; + break; + } + + return emoji; + } + + @override + Future> trySetServerLocation( + final String location, + ) async { + final bool apiInitialized = _adapter.api().isWithToken; + if (!apiInitialized) { + return GenericResult( + success: true, + data: false, + message: 'Not authorized!', + ); + } + + _adapter = ApiAdapter( + isWithToken: true, + region: location, + ); + return success; + } + + @override + Future>> + getAvailableLocations() async { + final List locations = []; + final result = await _adapter.api().getAvailableLocations(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: locations, + code: result.code, + message: result.message, + ); + } + + final List rawLocations = result.data; + for (final rawLocation in rawLocations) { + ServerProviderLocation? location; + try { + location = ServerProviderLocation( + title: rawLocation.city, + description: rawLocation.description, + flag: getEmojiFlag(rawLocation.country), + identifier: rawLocation.name, + ); + } catch (e) { + continue; + } + locations.add(location); + } + + return GenericResult(success: true, data: locations); + } + + @override + Future>> getServerTypes({ + required final ServerProviderLocation location, + }) async { + final List types = []; + final result = await _adapter.api().getAvailableServerTypes(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: types, + code: result.code, + message: result.message, + ); + } + + final rawTypes = result.data; + for (final rawType in rawTypes) { + for (final rawPrice in rawType.prices) { + if (rawPrice.location == location.identifier) { + types.add( + ServerType( + title: rawType.description, + identifier: rawType.name, + ram: rawType.memory.toDouble(), + cores: rawType.cores, + disk: DiskSize(byte: rawType.disk * 1024 * 1024 * 1024), + price: Price( + value: rawPrice.monthly, + currency: currency, + ), + location: location, + ), + ); + } + } + } + + return GenericResult(success: true, data: types); + } + + @override + Future> powerOn(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().powerOn(serverId); + if (!result.success) { + return GenericResult( + success: false, + data: timestamp, + code: result.code, + message: result.message, + ); + } + + timestamp = DateTime.now(); + + return GenericResult( + success: true, + data: timestamp, + ); + } + + @override + Future> restart(final int serverId) async { + DateTime? timestamp; + final result = await _adapter.api().restart(serverId); + if (!result.success) { + return GenericResult( + success: false, + data: timestamp, + code: result.code, + message: result.message, + ); + } + + timestamp = DateTime.now(); + + return GenericResult( + success: true, + data: timestamp, + ); + } + + @override + Future> getPricePerGb() async { + final result = await _adapter.api().getPricePerGb(); if (!result.success || result.data == null) { return GenericResult( @@ -665,28 +503,12 @@ class HetznerServerProvider extends ServerProvider { ); } - try { - volume = ServerVolume( - id: result.data!.id, - name: result.data!.name, - sizeByte: result.data!.size * 1024 * 1024 * 1024, - serverId: result.data!.serverId, - linuxDevice: result.data!.linuxDevice, - ); - } catch (e) { - print(e); - return GenericResult( - data: null, - success: false, - message: e.toString(), - ); - } - return GenericResult( - data: volume, success: true, - code: result.code, - message: result.message, + data: Price( + value: result.data!, + currency: currency, + ), ); } @@ -739,10 +561,66 @@ class HetznerServerProvider extends ServerProvider { ); } + @override + Future> createVolume() async { + ServerVolume? volume; + + final result = await _adapter.api().createVolume(); + + if (!result.success || result.data == null) { + return GenericResult( + data: null, + success: false, + message: result.message, + code: result.code, + ); + } + + try { + volume = ServerVolume( + id: result.data!.id, + name: result.data!.name, + sizeByte: result.data!.size * 1024 * 1024 * 1024, + serverId: result.data!.serverId, + linuxDevice: result.data!.linuxDevice, + ); + } catch (e) { + print(e); + return GenericResult( + data: null, + success: false, + message: e.toString(), + ); + } + + return GenericResult( + data: volume, + success: true, + code: result.code, + message: result.message, + ); + } + @override Future> deleteVolume(final ServerVolume volume) async => _adapter.api().deleteVolume(volume.id); + @override + Future> resizeVolume( + final ServerVolume volume, + final DiskSize size, + ) async => + _adapter.api().resizeVolume( + HetznerVolume( + volume.id, + volume.sizeByte, + volume.serverId, + volume.name, + volume.linuxDevice, + ), + size, + ); + @override Future> attachVolume( final ServerVolume volume, @@ -768,40 +646,143 @@ class HetznerServerProvider extends ServerProvider { ); @override - Future> resizeVolume( - final ServerVolume volume, - final DiskSize size, - ) async => - _adapter.api().resizeVolume( - HetznerVolume( - volume.id, - volume.sizeByte, - volume.serverId, - volume.name, - volume.linuxDevice, - ), - size, - ); - - @override - Future> getPricePerGb() async { - final result = await _adapter.api().getPricePerGb(); - - if (!result.success || result.data == null) { + Future>> getMetadata( + final int serverId, + ) async { + List metadata = []; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { return GenericResult( - data: null, success: false, - message: result.message, + data: metadata, code: result.code, + message: result.message, ); } - return GenericResult( - success: true, - data: Price( - value: result.data!, - currency: currency, + final List servers = result.data; + try { + final HetznerServerInfo server = servers.firstWhere( + (final server) => server.id == serverId, + ); + + metadata = [ + ServerMetadataEntity( + type: MetadataType.id, + trId: 'server.server_id', + value: server.id.toString(), + ), + ServerMetadataEntity( + type: MetadataType.status, + trId: 'server.status', + value: server.status.toString().split('.')[1].capitalize(), + ), + ServerMetadataEntity( + type: MetadataType.cpu, + trId: 'server.cpu', + value: server.serverType.cores.toString(), + ), + ServerMetadataEntity( + type: MetadataType.ram, + trId: 'server.ram', + value: '${server.serverType.memory.toString()} GB', + ), + ServerMetadataEntity( + type: MetadataType.cost, + trId: 'server.monthly_cost', + value: + '${server.serverType.prices[1].monthly.toStringAsFixed(2)} ${currency.shortcode}', + ), + ServerMetadataEntity( + type: MetadataType.location, + trId: 'server.location', + value: '${server.location.city}, ${server.location.country}', + ), + ServerMetadataEntity( + type: MetadataType.other, + trId: 'server.provider', + value: _adapter.api().displayProviderName, + ), + ]; + } catch (e) { + return GenericResult( + success: false, + data: [], + message: e.toString(), + ); + } + + return GenericResult(success: true, data: metadata); + } + + @override + Future> getMetrics( + final int serverId, + final DateTime start, + final DateTime end, + ) async { + ServerMetrics? metrics; + + List serializeTimeSeries( + final Map json, + final String type, + ) { + final List list = json['time_series'][type]['values']; + return list + .map((final el) => TimeSeriesData(el[0], double.parse(el[1]))) + .toList(); + } + + final cpuResult = await _adapter.api().getMetrics( + serverId, + start, + end, + 'cpu', + ); + + if (cpuResult.data.isEmpty || !cpuResult.success) { + return GenericResult( + success: false, + data: metrics, + code: cpuResult.code, + message: cpuResult.message, + ); + } + + final netResult = await _adapter.api().getMetrics( + serverId, + start, + end, + 'network', + ); + + if (cpuResult.data.isEmpty || !netResult.success) { + return GenericResult( + success: false, + data: metrics, + code: netResult.code, + message: netResult.message, + ); + } + + metrics = ServerMetrics( + cpu: serializeTimeSeries( + cpuResult.data, + 'cpu', ), + bandwidthIn: serializeTimeSeries( + netResult.data, + 'network.0.bandwidth.in', + ), + bandwidthOut: serializeTimeSeries( + netResult.data, + 'network.0.bandwidth.out', + ), + end: end, + start: start, + stepsInSecond: cpuResult.data['step'], ); + + return GenericResult(data: metrics, success: true); } } diff --git a/lib/logic/providers/server_providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart index b48662bf..f71ce09a 100644 --- a/lib/logic/providers/server_providers/server_provider.dart +++ b/lib/logic/providers/server_providers/server_provider.dart @@ -14,44 +14,124 @@ export 'package:selfprivacy/logic/api_maps/generic_result.dart'; export 'package:selfprivacy/logic/models/launch_installation_data.dart'; abstract class ServerProvider { + /// Returns an assigned enum value, respectively to which + /// provider implements [ServerProvider] interface. ServerProviderType get type; + + /// Returns [ServerBasicInfo] of all available machines + /// assigned to the authorized user. + /// + /// Only with public IPv4 addresses. Future>> getServers(); - Future> trySetServerLocation(final String location); + + /// Tries to launch installation of SelfPrivacy on + /// the requested server entry for the authorized account. + /// Depending on a server provider, the algorithm + /// and instructions vary drastically. + /// + /// If successly launched, stores new server information. + /// + /// If failure, returns error dialogue information to + /// write in ServerInstallationState. + Future> launchInstallation( + final LaunchInstallationData installationData, + ); + + /// Tries to delete the requested server entry + /// from the authorized account, including all assigned + /// storage extensions. + /// + /// If failure, returns error dialogue information to + /// write in ServerInstallationState. + Future> deleteServer( + final String hostname, + ); + + /// Tries to access an account linked to the provided token. + /// + /// To generate a token for your account follow instructions of your + /// server provider respectfully. + /// + /// If success, saves it for future usage. Future> tryInitApiByToken(final String token); + + /// Tries to assign the location shortcode for future usage. + /// + /// If API wasn't initialized with token by [tryInitApiByToken] beforehand, + /// returns 'Not authorized!' error. + Future> trySetServerLocation(final String location); + + /// Returns all available server locations + /// of the authorized user's server provider. Future>> getAvailableLocations(); + + /// Returns [ServerType] of all available + /// machine configurations available to the authorized account + /// within the requested provider location, + /// accessed from [getAvailableLocations]. Future>> getServerTypes({ required final ServerProviderLocation location, }); - Future> deleteServer( - final String hostname, - ); - Future> launchInstallation( - final LaunchInstallationData installationData, - ); + /// Tries to power on the requested accessible machine. + /// + /// If success, returns [DateTime] of when the server + /// answered the request. Future> powerOn(final int serverId); + + /// Tries to restart the requested accessible machine. + /// + /// If success, returns [DateTime] of when the server + /// answered the request. Future> restart(final int serverId); + + /// Returns [Price] information per one gigabyte of storage extension for + /// the requested accessible machine. + Future> getPricePerGb(); + + /// Returns [ServerVolume] of all available volumes + /// assigned to the authorized user and attached to active machine. + Future>> getVolumes({final String? status}); + + /// Tries to create an empty unattached [ServerVolume]. + /// + /// If success, returns this volume information. + Future> createVolume(); + + /// Tries to delete the requested accessible [ServerVolume]. + Future> deleteVolume(final ServerVolume volume); + + /// Tries to resize the requested accessible [ServerVolume] + /// to the provided size **(not by!)**, must be greater than current size. + Future> resizeVolume( + final ServerVolume volume, + final DiskSize size, + ); + + /// Tries to attach the requested accessible [ServerVolume] + /// to an accessible machine by the provided identificator. + Future> attachVolume( + final ServerVolume volume, + final int serverId, + ); + + /// Tries to attach the requested accessible [ServerVolume] + /// from any machine. + Future> detachVolume(final ServerVolume volume); + + /// Returns metedata of an accessible machine by the provided identificator + /// to show on ServerDetailsScreen. + Future>> getMetadata( + final int serverId, + ); + + /// Returns information about cpu and bandwidth load within the provided + /// time period of the requested accessible machine. Future> getMetrics( final int serverId, final DateTime start, final DateTime end, ); - Future> getPricePerGb(); - Future>> getVolumes({final String? status}); - Future> createVolume(); - Future> deleteVolume(final ServerVolume volume); - Future> resizeVolume( - final ServerVolume volume, - final DiskSize size, - ); - Future> attachVolume( - final ServerVolume volume, - final int serverId, - ); - Future> detachVolume(final ServerVolume volume); - Future>> getMetadata( - final int serverId, - ); GenericResult get success => GenericResult(success: true, data: true); } From d2d8add10d98b9930cf0eb1b85305821eb714ae6 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 29 Jun 2023 12:52:09 +0300 Subject: [PATCH 549/732] feat(backups): Update the models --- lib/config/hive_config.dart | 1 + .../graphql_maps/schema/backups.graphql | 2 +- .../graphql_maps/schema/backups.graphql.dart | 50 ++-- .../schema/disk_volumes.graphql.dart | 1 - .../graphql_maps/schema/schema.graphql | 1 + .../graphql_maps/schema/server_api.graphql | 1 + .../schema/server_api.graphql.dart | 29 +- .../schema/server_settings.graphql.dart | 2 +- .../graphql_maps/schema/services.graphql.dart | 1 + .../graphql_maps/schema/users.graphql.dart | 2 +- .../graphql_maps/server_api/backups_api.dart | 207 ++++++++++++++ .../graphql_maps/server_api/server_api.dart | 203 +------------- lib/logic/cubit/backups/backups_cubit.dart | 231 ++++++++-------- lib/logic/cubit/backups/backups_state.dart | 23 +- .../server_installation_cubit.dart | 4 +- lib/logic/models/backup.dart | 60 ++++ lib/logic/models/hive/backblaze_bucket.dart | 4 + lib/logic/models/hive/backblaze_bucket.g.dart | 7 +- lib/logic/models/hive/backups_credential.dart | 8 +- .../models/hive/backups_credential.g.dart | 30 +- .../models/initialize_repository_input.dart | 2 +- lib/logic/models/json/backup.dart | 65 ----- lib/logic/models/json/backup.g.dart | 44 --- .../pages/backup_details/backup_details.dart | 261 ++++++++++++------ lib/ui/pages/providers/providers.dart | 19 +- 25 files changed, 669 insertions(+), 589 deletions(-) create mode 100644 lib/logic/api_maps/graphql_maps/server_api/backups_api.dart create mode 100644 lib/logic/models/backup.dart delete mode 100644 lib/logic/models/json/backup.dart delete mode 100644 lib/logic/models/json/backup.g.dart diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 0bf1ca7c..25dee2c8 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -21,6 +21,7 @@ class HiveConfig { Hive.registerAdapter(UserTypeAdapter()); Hive.registerAdapter(DnsProviderTypeAdapter()); Hive.registerAdapter(ServerProviderTypeAdapter()); + Hive.registerAdapter(BackupsProviderTypeAdapter()); await Hive.openBox(BNames.appSettingsBox); diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index 0ee5aa6c..c0341b19 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -46,7 +46,7 @@ mutation ForceSnapshotsReload { } } -mutation StartBackup($serviceId: String = null) { +mutation StartBackup($serviceId: String!) { backup { startBackup(serviceId: $serviceId) { ...basicMutationReturnFields diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 7ebfa705..2ed668b1 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$genericBackupConfigReturn { Fragment$genericBackupConfigReturn({ @@ -2738,31 +2738,27 @@ class _CopyWithStubImpl$Mutation$ForceSnapshotsReload$backup$forceSnapshotsReloa } class Variables$Mutation$StartBackup { - factory Variables$Mutation$StartBackup({String? serviceId}) => + factory Variables$Mutation$StartBackup({required String serviceId}) => Variables$Mutation$StartBackup._({ - if (serviceId != null) r'serviceId': serviceId, + r'serviceId': serviceId, }); Variables$Mutation$StartBackup._(this._$data); factory Variables$Mutation$StartBackup.fromJson(Map data) { final result$data = {}; - if (data.containsKey('serviceId')) { - final l$serviceId = data['serviceId']; - result$data['serviceId'] = (l$serviceId as String?); - } + final l$serviceId = data['serviceId']; + result$data['serviceId'] = (l$serviceId as String); return Variables$Mutation$StartBackup._(result$data); } Map _$data; - String? get serviceId => (_$data['serviceId'] as String?); + String get serviceId => (_$data['serviceId'] as String); Map toJson() { final result$data = {}; - if (_$data.containsKey('serviceId')) { - final l$serviceId = serviceId; - result$data['serviceId'] = l$serviceId; - } + final l$serviceId = serviceId; + result$data['serviceId'] = l$serviceId; return result$data; } @@ -2782,10 +2778,6 @@ class Variables$Mutation$StartBackup { } final l$serviceId = serviceId; final lOther$serviceId = other.serviceId; - if (_$data.containsKey('serviceId') != - other._$data.containsKey('serviceId')) { - return false; - } if (l$serviceId != lOther$serviceId) { return false; } @@ -2795,8 +2787,7 @@ class Variables$Mutation$StartBackup { @override int get hashCode { final l$serviceId = serviceId; - return Object.hashAll( - [_$data.containsKey('serviceId') ? l$serviceId : const {}]); + return Object.hashAll([l$serviceId]); } } @@ -2828,7 +2819,8 @@ class _CopyWithImpl$Variables$Mutation$StartBackup TRes call({Object? serviceId = _undefined}) => _then(Variables$Mutation$StartBackup._({ ..._instance._$data, - if (serviceId != _undefined) 'serviceId': (serviceId as String?), + if (serviceId != _undefined && serviceId != null) + 'serviceId': (serviceId as String), })); } @@ -2982,9 +2974,9 @@ const documentNodeMutationStartBackup = DocumentNode(definitions: [ variable: VariableNode(name: NameNode(value: 'serviceId')), type: NamedTypeNode( name: NameNode(value: 'String'), - isNonNull: false, + isNonNull: true, ), - defaultValue: DefaultValueNode(value: NullValueNode()), + defaultValue: DefaultValueNode(value: null), directives: [], ) ], @@ -3052,7 +3044,7 @@ class Options$Mutation$StartBackup extends graphql.MutationOptions { Options$Mutation$StartBackup({ String? operationName, - Variables$Mutation$StartBackup? variables, + required Variables$Mutation$StartBackup variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -3064,7 +3056,7 @@ class Options$Mutation$StartBackup graphql.OnError? onError, }) : onCompletedWithParsed = onCompleted, super( - variables: variables?.toJson() ?? {}, + variables: variables.toJson(), operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, @@ -3098,7 +3090,7 @@ class WatchOptions$Mutation$StartBackup extends graphql.WatchQueryOptions { WatchOptions$Mutation$StartBackup({ String? operationName, - Variables$Mutation$StartBackup? variables, + required Variables$Mutation$StartBackup variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -3110,7 +3102,7 @@ class WatchOptions$Mutation$StartBackup bool carryForwardDataOnException = true, bool fetchResults = false, }) : super( - variables: variables?.toJson() ?? {}, + variables: variables.toJson(), operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, @@ -3128,11 +3120,11 @@ class WatchOptions$Mutation$StartBackup extension ClientExtension$Mutation$StartBackup on graphql.GraphQLClient { Future> mutate$StartBackup( - [Options$Mutation$StartBackup? options]) async => - await this.mutate(options ?? Options$Mutation$StartBackup()); + Options$Mutation$StartBackup options) async => + await this.mutate(options); graphql.ObservableQuery watchMutation$StartBackup( - [WatchOptions$Mutation$StartBackup? options]) => - this.watchMutation(options ?? WatchOptions$Mutation$StartBackup()); + WatchOptions$Mutation$StartBackup options) => + this.watchMutation(options); } class Mutation$StartBackup$backup { diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index e9e91eb8..c900dcc7 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -3,7 +3,6 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 15ae463d..d53da52e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -19,6 +19,7 @@ type ApiDevice { type ApiJob { uid: String! + typeId: String! name: String! description: String! status: String! diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index f1012815..9797e81f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -23,6 +23,7 @@ query GetApiJobs { status statusText uid + typeId updatedAt } } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 2e950aa1..7c09fbb7 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -2914,6 +2914,13 @@ const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ directives: [], selectionSet: null, ), + FieldNode( + name: NameNode(value: 'typeId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( name: NameNode(value: 'updatedAt'), alias: null, @@ -3229,6 +3236,7 @@ class Query$GetApiJobs$jobs$getJobs { required this.status, this.statusText, required this.uid, + required this.typeId, required this.updatedAt, this.$__typename = 'ApiJob', }); @@ -3244,6 +3252,7 @@ class Query$GetApiJobs$jobs$getJobs { final l$status = json['status']; final l$statusText = json['statusText']; final l$uid = json['uid']; + final l$typeId = json['typeId']; final l$updatedAt = json['updatedAt']; final l$$__typename = json['__typename']; return Query$GetApiJobs$jobs$getJobs( @@ -3257,6 +3266,7 @@ class Query$GetApiJobs$jobs$getJobs { status: (l$status as String), statusText: (l$statusText as String?), uid: (l$uid as String), + typeId: (l$typeId as String), updatedAt: dateTimeFromJson(l$updatedAt), $__typename: (l$$__typename as String), ); @@ -3282,6 +3292,8 @@ class Query$GetApiJobs$jobs$getJobs { final String uid; + final String typeId; + final DateTime updatedAt; final String $__typename; @@ -3309,6 +3321,8 @@ class Query$GetApiJobs$jobs$getJobs { _resultData['statusText'] = l$statusText; final l$uid = uid; _resultData['uid'] = l$uid; + final l$typeId = typeId; + _resultData['typeId'] = l$typeId; final l$updatedAt = updatedAt; _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); final l$$__typename = $__typename; @@ -3328,6 +3342,7 @@ class Query$GetApiJobs$jobs$getJobs { final l$status = status; final l$statusText = statusText; final l$uid = uid; + final l$typeId = typeId; final l$updatedAt = updatedAt; final l$$__typename = $__typename; return Object.hashAll([ @@ -3341,6 +3356,7 @@ class Query$GetApiJobs$jobs$getJobs { l$status, l$statusText, l$uid, + l$typeId, l$updatedAt, l$$__typename, ]); @@ -3405,6 +3421,11 @@ class Query$GetApiJobs$jobs$getJobs { if (l$uid != lOther$uid) { return false; } + final l$typeId = typeId; + final lOther$typeId = other.typeId; + if (l$typeId != lOther$typeId) { + return false; + } final l$updatedAt = updatedAt; final lOther$updatedAt = other.updatedAt; if (l$updatedAt != lOther$updatedAt) { @@ -3448,6 +3469,7 @@ abstract class CopyWith$Query$GetApiJobs$jobs$getJobs { String? status, String? statusText, String? uid, + String? typeId, DateTime? updatedAt, String? $__typename, }); @@ -3477,6 +3499,7 @@ class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs Object? status = _undefined, Object? statusText = _undefined, Object? uid = _undefined, + Object? typeId = _undefined, Object? updatedAt = _undefined, Object? $__typename = _undefined, }) => @@ -3504,6 +3527,9 @@ class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs ? _instance.statusText : (statusText as String?), uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + typeId: typeId == _undefined || typeId == null + ? _instance.typeId + : (typeId as String), updatedAt: updatedAt == _undefined || updatedAt == null ? _instance.updatedAt : (updatedAt as DateTime), @@ -3530,6 +3556,7 @@ class _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs String? status, String? statusText, String? uid, + String? typeId, DateTime? updatedAt, String? $__typename, }) => diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index abbba037..ae8aabcb 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 64720f3e..2fbf6c3d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 4df77d6f..d17316df 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart new file mode 100644 index 00000000..18fea675 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart @@ -0,0 +1,207 @@ +part of 'server_api.dart'; + +mixin BackupsApi on GraphQLApiMap { + Future> getBackups() async { + List backups; + QueryResult response; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$AllBackupSnapshots(); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + backups = []; + } + final List parsed = response.parsedData!.backup.allSnapshots + .map( + ( + final Query$AllBackupSnapshots$backup$allSnapshots snapshot, + ) => + Backup.fromGraphQL(snapshot), + ) + .toList(); + backups = parsed; + } catch (e) { + print(e); + backups = []; + } + + return backups; + } + + Future getBackupsConfiguration() async { + BackupConfiguration? backupConfiguration; + QueryResult response; + try { + final GraphQLClient client = await getClient(); + response = await client.query$BackupConfiguration(); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + backupConfiguration = null; + } + final BackupConfiguration parsed = BackupConfiguration.fromGraphQL( + response.parsedData!.backup.configuration, + ); + backupConfiguration = parsed; + } catch (e) { + print(e); + backupConfiguration = null; + } + + return backupConfiguration; + } + + Future forceBackupListReload() async { + try { + final GraphQLClient client = await getClient(); + await client.mutate$ForceSnapshotsReload(); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return GenericResult( + success: true, + data: null, + ); + } + + Future startBackup(final String serviceId) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$StartBackup(serviceId: serviceId); + final options = Options$Mutation$StartBackup(variables: variables); + response = await client.mutate$StartBackup(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: null, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } + + Future setAutobackupPeriod({final int? period}) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$SetAutobackupPeriod(period: period); + final options = + Options$Mutation$SetAutobackupPeriod(variables: variables); + response = await client.mutate$SetAutobackupPeriod(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: null, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } + + Future removeRepository() async { + try { + final GraphQLClient client = await getClient(); + await client.mutate$RemoveRepository(); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return GenericResult( + success: true, + data: null, + ); + } + + Future initializeRepository( + final InitializeRepositoryInput input, + ) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$InitializeRepository( + repository: Input$InitializeRepositoryInput( + locationId: input.locationId, + locationName: input.locationName, + login: input.login, + password: input.password, + provider: input.provider.toGraphQL(), + ), + ); + final options = + Options$Mutation$InitializeRepository(variables: variables); + response = await client.mutate$InitializeRepository(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: null, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } +} diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index bbcbb461..91694945 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -15,7 +15,7 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/initialize_repository_input.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; -import 'package:selfprivacy/logic/models/json/backup.dart'; +import 'package:selfprivacy/logic/models/backup.dart'; import 'package:selfprivacy/logic/models/json/device_token.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/models/json/recovery_token_status.dart'; @@ -32,9 +32,10 @@ part 'server_actions_api.dart'; part 'services_api.dart'; part 'users_api.dart'; part 'volume_api.dart'; +part 'backups_api.dart'; class ServerApi extends GraphQLApiMap - with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi { + with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi, BackupsApi { ServerApi({ this.hasLogger = false, this.isWithToken = true, @@ -512,202 +513,4 @@ class ServerApi extends GraphQLApiMap return token; } - - Future>> getBackups() async { - GenericResult> backups; - QueryResult response; - - try { - final GraphQLClient client = await getClient(); - response = await client.query$AllBackupSnapshots(); - if (response.hasException) { - final message = response.exception.toString(); - print(message); - backups = GenericResult>( - success: false, - data: [], - message: message, - ); - } - final List parsed = response.parsedData!.backup.allSnapshots - .map( - ( - final Query$AllBackupSnapshots$backup$allSnapshots snapshot, - ) => - Backup.fromGraphQL(snapshot), - ) - .toList(); - backups = GenericResult>( - success: true, - data: parsed, - ); - } catch (e) { - print(e); - backups = GenericResult>( - success: false, - data: [], - message: e.toString(), - ); - } - - return backups; - } - - Future forceBackupListReload() async { - try { - final GraphQLClient client = await getClient(); - await client.mutate$ForceSnapshotsReload(); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } - - return GenericResult( - success: true, - data: null, - ); - } - - Future startBackup({final String? serviceId}) async { - QueryResult response; - GenericResult? result; - - try { - final GraphQLClient client = await getClient(); - final variables = Variables$Mutation$StartBackup(serviceId: serviceId); - final options = Options$Mutation$StartBackup(variables: variables); - response = await client.mutate$StartBackup(options); - if (response.hasException) { - final message = response.exception.toString(); - print(message); - result = GenericResult( - success: false, - data: null, - message: message, - ); - } - result = GenericResult( - success: true, - data: null, - ); - } catch (e) { - print(e); - result = GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } - - return result; - } - - Future setAutobackupPeriod({final int? period}) async { - QueryResult response; - GenericResult? result; - - try { - final GraphQLClient client = await getClient(); - final variables = Variables$Mutation$SetAutobackupPeriod(period: period); - final options = - Options$Mutation$SetAutobackupPeriod(variables: variables); - response = await client.mutate$SetAutobackupPeriod(options); - if (response.hasException) { - final message = response.exception.toString(); - print(message); - result = GenericResult( - success: false, - data: null, - message: message, - ); - } - result = GenericResult( - success: true, - data: null, - ); - } catch (e) { - print(e); - result = GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } - - return result; - } - - Future getBackupStatus() async => BackupStatus( - progress: 0.0, - status: BackupStatusEnum.error, - errorMessage: null, - ); - - Future removeRepository() async { - try { - final GraphQLClient client = await getClient(); - await client.mutate$RemoveRepository(); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } - - return GenericResult( - success: true, - data: null, - ); - } - - Future initializeRepository( - final InitializeRepositoryInput input, - ) async { - QueryResult response; - GenericResult? result; - - try { - final GraphQLClient client = await getClient(); - final variables = Variables$Mutation$InitializeRepository( - repository: Input$InitializeRepositoryInput( - locationId: input.locationId, - locationName: input.locationName, - login: input.login, - password: input.password, - provider: input.provider.toGraphQL(), - ), - ); - final options = - Options$Mutation$InitializeRepository(variables: variables); - response = await client.mutate$InitializeRepository(options); - if (response.hasException) { - final message = response.exception.toString(); - print(message); - result = GenericResult( - success: false, - data: null, - message: message, - ); - } - result = GenericResult( - success: true, - data: null, - ); - } catch (e) { - print(e); - result = GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } - - return result; - } } diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index cb743161..4a1c980b 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -6,7 +6,10 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; -import 'package:selfprivacy/logic/models/json/backup.dart'; +import 'package:selfprivacy/logic/models/backup.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; +import 'package:selfprivacy/logic/models/initialize_repository_input.dart'; +import 'package:selfprivacy/logic/models/service.dart'; part 'backups_state.dart'; @@ -24,107 +27,83 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future load() async { if (serverInstallationCubit.state is ServerInstallationFinished) { final BackblazeBucket? bucket = getIt().backblazeBucket; - if (bucket == null) { - emit( - const BackupsState( - isInitialized: false, - preventActions: false, - refreshing: false, - ), - ); - } else { - final BackupStatus status = await api.getBackupStatus(); - switch (status.status) { - case BackupStatusEnum.noKey: - case BackupStatusEnum.notInitialized: - emit( - BackupsState( - backups: const [], - isInitialized: true, - preventActions: false, - progress: 0, - status: status.status, - refreshing: false, - ), - ); - break; - case BackupStatusEnum.initializing: - emit( - BackupsState( - backups: const [], - isInitialized: true, - preventActions: false, - progress: 0, - status: status.status, - refreshTimer: const Duration(seconds: 10), - refreshing: false, - ), - ); - break; - case BackupStatusEnum.initialized: - case BackupStatusEnum.error: - final result = await api.getBackups(); - emit( - BackupsState( - backups: result.data, - isInitialized: true, - preventActions: false, - progress: status.progress, - status: status.status, - error: status.errorMessage ?? '', - refreshing: false, - ), - ); - break; - case BackupStatusEnum.backingUp: - case BackupStatusEnum.restoring: - final result = await api.getBackups(); - emit( - BackupsState( - backups: result.data, - isInitialized: true, - preventActions: true, - progress: status.progress, - status: status.status, - error: status.errorMessage ?? '', - refreshTimer: const Duration(seconds: 5), - refreshing: false, - ), - ); - break; - default: - emit(const BackupsState()); - } - Timer(state.refreshTimer, () => updateBackups(useTimer: true)); - } + final BackupConfiguration? backupConfig = + await api.getBackupsConfiguration(); + final List backups = await api.getBackups(); + emit( + state.copyWith( + backblazeBucket: bucket, + isInitialized: backupConfig?.isInitialized, + autobackupPeriod: backupConfig?.autobackupPeriod, + backups: backups, + preventActions: false, + refreshing: false, + ), + ); + print(state); } } - Future createBucket() async { + Future initializeBackups() async { emit(state.copyWith(preventActions: true)); - final String domain = serverInstallationCubit.state.serverDomain!.domainName - .replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); - final int serverId = serverInstallationCubit.state.serverDetails!.id; - String bucketName = 'selfprivacy-$domain-$serverId'; - // If bucket name is too long, shorten it - if (bucketName.length > 49) { - bucketName = bucketName.substring(0, 49); + final String? encryptionKey = + (await api.getBackupsConfiguration())?.encryptionKey; + if (encryptionKey == null) { + getIt() + .showSnackBar("Couldn't get encryption key from your server."); + emit(state.copyWith(preventActions: false)); + return; } - final String bucketId = await backblaze.createBucket(bucketName); - final BackblazeApplicationKey key = await backblaze.createKey(bucketId); - final BackblazeBucket bucket = BackblazeBucket( - bucketId: bucketId, - bucketName: bucketName, - applicationKey: key.applicationKey, - applicationKeyId: key.applicationKeyId, + final BackblazeBucket bucket; + + if (state.backblazeBucket == null) { + final String domain = serverInstallationCubit + .state.serverDomain!.domainName + .replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-'); + final int serverId = serverInstallationCubit.state.serverDetails!.id; + String bucketName = 'selfprivacy-$domain-$serverId'; + // If bucket name is too long, shorten it + if (bucketName.length > 49) { + bucketName = bucketName.substring(0, 49); + } + final String bucketId = await backblaze.createBucket(bucketName); + + final BackblazeApplicationKey key = await backblaze.createKey(bucketId); + bucket = BackblazeBucket( + bucketId: bucketId, + bucketName: bucketName, + applicationKey: key.applicationKey, + applicationKeyId: key.applicationKeyId, + encryptionKey: encryptionKey, + ); + + await getIt().storeBackblazeBucket(bucket); + emit(state.copyWith(backblazeBucket: bucket)); + } else { + bucket = state.backblazeBucket!; + } + + final GenericResult result = await api.initializeRepository( + InitializeRepositoryInput( + provider: BackupsProviderType.backblaze, + locationId: bucket.bucketId, + locationName: bucket.bucketName, + login: bucket.applicationKeyId, + password: bucket.applicationKey, + ), ); - - await getIt().storeBackblazeBucket(bucket); - //await api.uploadBackblazeConfig(bucket); + if (result.success == false) { + getIt() + .showSnackBar(result.message ?? 'Unknown error'); + emit(state.copyWith(preventActions: false)); + return; + } await updateBackups(); + getIt().showSnackBar( + 'Backups repository is now initializing. It may take a while.'); - emit(state.copyWith(isInitialized: true, preventActions: false)); + emit(state.copyWith(preventActions: false)); } Future reuploadKey() async { @@ -132,42 +111,47 @@ class BackupsCubit extends ServerInstallationDependendCubit { final BackblazeBucket? bucket = getIt().backblazeBucket; if (bucket == null) { emit(state.copyWith(isInitialized: false)); + print('bucket is null'); } else { - //await api.uploadBackblazeConfig(bucket); - emit(state.copyWith(isInitialized: true, preventActions: false)); - getIt().showSnackBar('backup.reuploaded_key'); + print('bucket is not null'); + final GenericResult result = await api.initializeRepository( + InitializeRepositoryInput( + provider: BackupsProviderType.backblaze, + locationId: bucket.bucketId, + locationName: bucket.bucketName, + login: bucket.applicationKeyId, + password: bucket.applicationKey, + ), + ); + print('result is $result'); + if (result.success == false) { + getIt() + .showSnackBar(result.message ?? 'Unknown error'); + emit(state.copyWith(preventActions: false)); + return; + } else { + emit(state.copyWith(preventActions: false)); + getIt().showSnackBar('backup.reuploaded_key'); + await updateBackups(); + } } } - Duration refreshTimeFromState(final BackupStatusEnum status) { - switch (status) { - case BackupStatusEnum.backingUp: - case BackupStatusEnum.restoring: - return const Duration(seconds: 5); - case BackupStatusEnum.initializing: - return const Duration(seconds: 10); - default: - return const Duration(seconds: 60); - } - } + @Deprecated("we don't have states") + Duration refreshTimeFromState() => const Duration(seconds: 60); Future updateBackups({final bool useTimer = false}) async { emit(state.copyWith(refreshing: true)); - final result = await api.getBackups(); - if (!result.success || result.data.isEmpty) { - return; - } + final backups = await api.getBackups(); + final backupConfig = await api.getBackupsConfiguration(); - final List backups = result.data; - final BackupStatus status = await api.getBackupStatus(); emit( state.copyWith( backups: backups, - progress: status.progress, - status: status.status, - error: status.errorMessage, - refreshTimer: refreshTimeFromState(status.status), + refreshTimer: refreshTimeFromState(), refreshing: false, + isInitialized: backupConfig?.isInitialized ?? false, + autobackupPeriod: backupConfig?.autobackupPeriod, ), ); if (useTimer) { @@ -182,9 +166,18 @@ class BackupsCubit extends ServerInstallationDependendCubit { emit(state.copyWith(preventActions: false)); } - Future createBackup() async { + Future createMultipleBackups(final List services) async { emit(state.copyWith(preventActions: true)); - await api.startBackup(); + for (final service in services) { + await api.startBackup(service.id); + } + await updateBackups(); + emit(state.copyWith(preventActions: false)); + } + + Future createBackup(final String serviceId) async { + emit(state.copyWith(preventActions: true)); + await api.startBackup(serviceId); await updateBackups(); emit(state.copyWith(preventActions: false)); } diff --git a/lib/logic/cubit/backups/backups_state.dart b/lib/logic/cubit/backups/backups_state.dart index 33ec52c8..988f669b 100644 --- a/lib/logic/cubit/backups/backups_state.dart +++ b/lib/logic/cubit/backups/backups_state.dart @@ -4,31 +4,26 @@ class BackupsState extends ServerInstallationDependendState { const BackupsState({ this.isInitialized = false, this.backups = const [], - this.progress = 0.0, - this.status = BackupStatusEnum.noKey, this.preventActions = true, - this.error = '', this.refreshTimer = const Duration(seconds: 60), this.refreshing = true, + this.autobackupPeriod, + this.backblazeBucket, }); final bool isInitialized; final List backups; - final double progress; - final BackupStatusEnum status; final bool preventActions; - final String error; final Duration refreshTimer; final bool refreshing; + final Duration? autobackupPeriod; + final BackblazeBucket? backblazeBucket; @override List get props => [ isInitialized, backups, - progress, preventActions, - status, - error, refreshTimer, refreshing ]; @@ -36,21 +31,19 @@ class BackupsState extends ServerInstallationDependendState { BackupsState copyWith({ final bool? isInitialized, final List? backups, - final double? progress, - final BackupStatusEnum? status, final bool? preventActions, - final String? error, final Duration? refreshTimer, final bool? refreshing, + final Duration? autobackupPeriod, + final BackblazeBucket? backblazeBucket, }) => BackupsState( isInitialized: isInitialized ?? this.isInitialized, backups: backups ?? this.backups, - progress: progress ?? this.progress, - status: status ?? this.status, preventActions: preventActions ?? this.preventActions, - error: error ?? this.error, refreshTimer: refreshTimer ?? this.refreshTimer, refreshing: refreshing ?? this.refreshing, + autobackupPeriod: autobackupPeriod ?? this.autobackupPeriod, + backblazeBucket: backblazeBucket ?? this.backblazeBucket, ); } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index b2252e8e..3f00a5b5 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -197,7 +197,7 @@ class ServerInstallationCubit extends Cubit { final BackupsCredential backblazeCredential = BackupsCredential( keyId: keyId, applicationKey: applicationKey, - provider: BackupsProvider.backblaze, + provider: BackupsProviderType.backblaze, ); await repository.saveBackblazeKey(backblazeCredential); if (state is ServerInstallationRecovery) { @@ -699,7 +699,7 @@ class ServerInstallationCubit extends Cubit { provider: dnsProviderType, ), ); - await repository.setDnsApiToken(token); + // await repository.setDnsApiToken(token); emit( dataState.copyWith( serverDomain: ServerDomain( diff --git a/lib/logic/models/backup.dart b/lib/logic/models/backup.dart new file mode 100644 index 00000000..fda68375 --- /dev/null +++ b/lib/logic/models/backup.dart @@ -0,0 +1,60 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/backups.graphql.dart'; +import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; + +class Backup { + Backup.fromGraphQL( + final Query$AllBackupSnapshots$backup$allSnapshots snapshot, + ) : this( + id: snapshot.id, + time: snapshot.createdAt, + serviceId: snapshot.service.id, + fallbackServiceName: snapshot.service.displayName, + ); + + Backup({ + required this.time, + required this.id, + required this.serviceId, + required this.fallbackServiceName, + }); + + // Time of the backup + final DateTime time; + @JsonKey(name: 'short_id') + final String id; + final String serviceId; + final String fallbackServiceName; +} + +class BackupConfiguration { + BackupConfiguration.fromGraphQL( + final Query$BackupConfiguration$backup$configuration configuration, + ) : this( + // Provided by API as int of minutes + autobackupPeriod: configuration.autobackupPeriod != null + ? Duration(minutes: configuration.autobackupPeriod!) + : null, + encryptionKey: configuration.encryptionKey, + isInitialized: configuration.isInitialized, + locationId: configuration.locationId, + locationName: configuration.locationName, + provider: BackupsProviderType.fromGraphQL(configuration.provider), + ); + + BackupConfiguration({ + required this.autobackupPeriod, + required this.encryptionKey, + required this.isInitialized, + required this.locationId, + required this.locationName, + required this.provider, + }); + + final Duration? autobackupPeriod; + final String encryptionKey; + final bool isInitialized; + final String? locationId; + final String? locationName; + final BackupsProviderType provider; +} diff --git a/lib/logic/models/hive/backblaze_bucket.dart b/lib/logic/models/hive/backblaze_bucket.dart index 39b98cf5..6c4bbeea 100644 --- a/lib/logic/models/hive/backblaze_bucket.dart +++ b/lib/logic/models/hive/backblaze_bucket.dart @@ -9,6 +9,7 @@ class BackblazeBucket { required this.bucketName, required this.applicationKeyId, required this.applicationKey, + required this.encryptionKey, }); @HiveField(0) @@ -23,6 +24,9 @@ class BackblazeBucket { @HiveField(3) final String bucketName; + @HiveField(4) + final String encryptionKey; + @override String toString() => bucketName; } diff --git a/lib/logic/models/hive/backblaze_bucket.g.dart b/lib/logic/models/hive/backblaze_bucket.g.dart index 18802bc0..129905a5 100644 --- a/lib/logic/models/hive/backblaze_bucket.g.dart +++ b/lib/logic/models/hive/backblaze_bucket.g.dart @@ -21,13 +21,14 @@ class BackblazeBucketAdapter extends TypeAdapter { bucketName: fields[3] as String, applicationKeyId: fields[1] as String, applicationKey: fields[2] as String, + encryptionKey: fields[4] as String, ); } @override void write(BinaryWriter writer, BackblazeBucket obj) { writer - ..writeByte(4) + ..writeByte(5) ..writeByte(0) ..write(obj.bucketId) ..writeByte(1) @@ -35,7 +36,9 @@ class BackblazeBucketAdapter extends TypeAdapter { ..writeByte(2) ..write(obj.applicationKey) ..writeByte(3) - ..write(obj.bucketName); + ..write(obj.bucketName) + ..writeByte(4) + ..write(obj.encryptionKey); } @override diff --git a/lib/logic/models/hive/backups_credential.dart b/lib/logic/models/hive/backups_credential.dart index 9b14f067..0c0cf48d 100644 --- a/lib/logic/models/hive/backups_credential.dart +++ b/lib/logic/models/hive/backups_credential.dart @@ -19,8 +19,8 @@ class BackupsCredential { @HiveField(1) final String applicationKey; - @HiveField(2, defaultValue: BackupsProvider.backblaze) - final BackupsProvider provider; + @HiveField(2, defaultValue: BackupsProviderType.backblaze) + final BackupsProviderType provider; String get encodedApiKey => encodedBackblazeKey(keyId, applicationKey); @@ -35,7 +35,7 @@ String encodedBackblazeKey(final String? keyId, final String? applicationKey) { } @HiveType(typeId: 103) -enum BackupsProvider { +enum BackupsProviderType { @HiveField(0) none, @HiveField(1) @@ -45,7 +45,7 @@ enum BackupsProvider { @HiveField(3) backblaze; - factory BackupsProvider.fromGraphQL(final Enum$BackupProvider provider) => + factory BackupsProviderType.fromGraphQL(final Enum$BackupProvider provider) => switch (provider) { Enum$BackupProvider.NONE => none, Enum$BackupProvider.MEMORY => memory, diff --git a/lib/logic/models/hive/backups_credential.g.dart b/lib/logic/models/hive/backups_credential.g.dart index 2cf023df..13166d31 100644 --- a/lib/logic/models/hive/backups_credential.g.dart +++ b/lib/logic/models/hive/backups_credential.g.dart @@ -20,8 +20,8 @@ class BackupsCredentialAdapter extends TypeAdapter { keyId: fields[0] as String, applicationKey: fields[1] as String, provider: fields[2] == null - ? BackupsProvider.backblaze - : fields[2] as BackupsProvider, + ? BackupsProviderType.backblaze + : fields[2] as BackupsProviderType, ); } @@ -48,39 +48,39 @@ class BackupsCredentialAdapter extends TypeAdapter { typeId == other.typeId; } -class BackupsProviderAdapter extends TypeAdapter { +class BackupsProviderTypeAdapter extends TypeAdapter { @override final int typeId = 103; @override - BackupsProvider read(BinaryReader reader) { + BackupsProviderType read(BinaryReader reader) { switch (reader.readByte()) { case 0: - return BackupsProvider.none; + return BackupsProviderType.none; case 1: - return BackupsProvider.memory; + return BackupsProviderType.memory; case 2: - return BackupsProvider.file; + return BackupsProviderType.file; case 3: - return BackupsProvider.backblaze; + return BackupsProviderType.backblaze; default: - return BackupsProvider.none; + return BackupsProviderType.none; } } @override - void write(BinaryWriter writer, BackupsProvider obj) { + void write(BinaryWriter writer, BackupsProviderType obj) { switch (obj) { - case BackupsProvider.none: + case BackupsProviderType.none: writer.writeByte(0); break; - case BackupsProvider.memory: + case BackupsProviderType.memory: writer.writeByte(1); break; - case BackupsProvider.file: + case BackupsProviderType.file: writer.writeByte(2); break; - case BackupsProvider.backblaze: + case BackupsProviderType.backblaze: writer.writeByte(3); break; } @@ -92,7 +92,7 @@ class BackupsProviderAdapter extends TypeAdapter { @override bool operator ==(Object other) => identical(this, other) || - other is BackupsProviderAdapter && + other is BackupsProviderTypeAdapter && runtimeType == other.runtimeType && typeId == other.typeId; } diff --git a/lib/logic/models/initialize_repository_input.dart b/lib/logic/models/initialize_repository_input.dart index fcb137b0..7ccaa410 100644 --- a/lib/logic/models/initialize_repository_input.dart +++ b/lib/logic/models/initialize_repository_input.dart @@ -8,7 +8,7 @@ class InitializeRepositoryInput { required this.login, required this.password, }); - final BackupsProvider provider; + final BackupsProviderType provider; final String locationId; final String locationName; final String login; diff --git a/lib/logic/models/json/backup.dart b/lib/logic/models/json/backup.dart deleted file mode 100644 index a806d00b..00000000 --- a/lib/logic/models/json/backup.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/backups.graphql.dart'; - -part 'backup.g.dart'; - -@JsonSerializable() -class Backup { - factory Backup.fromJson(final Map json) => - _$BackupFromJson(json); - Backup.fromGraphQL( - final Query$AllBackupSnapshots$backup$allSnapshots snapshot, - ) : this( - id: snapshot.id, - time: snapshot.createdAt, - serviceId: snapshot.service.id, - fallbackServiceName: snapshot.service.displayName, - ); - - Backup({ - required this.time, - required this.id, - required this.serviceId, - required this.fallbackServiceName, - }); - - // Time of the backup - final DateTime time; - @JsonKey(name: 'short_id') - final String id; - final String serviceId; - final String fallbackServiceName; -} - -enum BackupStatusEnum { - @JsonValue('NO_KEY') - noKey, - @JsonValue('NOT_INITIALIZED') - notInitialized, - @JsonValue('INITIALIZED') - initialized, - @JsonValue('BACKING_UP') - backingUp, - @JsonValue('RESTORING') - restoring, - @JsonValue('ERROR') - error, - @JsonValue('INITIALIZING') - initializing, -} - -@JsonSerializable() -class BackupStatus { - factory BackupStatus.fromJson(final Map json) => - _$BackupStatusFromJson(json); - BackupStatus({ - required this.status, - required this.progress, - required this.errorMessage, - }); - - final BackupStatusEnum status; - final double progress; - @JsonKey(name: 'error_message') - final String? errorMessage; -} diff --git a/lib/logic/models/json/backup.g.dart b/lib/logic/models/json/backup.g.dart deleted file mode 100644 index 35148517..00000000 --- a/lib/logic/models/json/backup.g.dart +++ /dev/null @@ -1,44 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'backup.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Backup _$BackupFromJson(Map json) => Backup( - time: DateTime.parse(json['time'] as String), - id: json['short_id'] as String, - serviceId: json['serviceId'] as String, - fallbackServiceName: json['fallbackServiceName'] as String, - ); - -Map _$BackupToJson(Backup instance) => { - 'time': instance.time.toIso8601String(), - 'short_id': instance.id, - 'serviceId': instance.serviceId, - 'fallbackServiceName': instance.fallbackServiceName, - }; - -BackupStatus _$BackupStatusFromJson(Map json) => BackupStatus( - status: $enumDecode(_$BackupStatusEnumEnumMap, json['status']), - progress: (json['progress'] as num).toDouble(), - errorMessage: json['error_message'] as String?, - ); - -Map _$BackupStatusToJson(BackupStatus instance) => - { - 'status': _$BackupStatusEnumEnumMap[instance.status]!, - 'progress': instance.progress, - 'error_message': instance.errorMessage, - }; - -const _$BackupStatusEnumEnumMap = { - BackupStatusEnum.noKey: 'NO_KEY', - BackupStatusEnum.notInitialized: 'NOT_INITIALIZED', - BackupStatusEnum.initialized: 'INITIALIZED', - BackupStatusEnum.backingUp: 'BACKING_UP', - BackupStatusEnum.restoring: 'RESTORING', - BackupStatusEnum.error: 'ERROR', - BackupStatusEnum.initializing: 'INITIALIZING', -}; diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index f909e481..2dac9a0b 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -1,9 +1,14 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; -import 'package:selfprivacy/logic/models/json/backup.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; +import 'package:selfprivacy/logic/models/backup.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; +import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; @@ -29,19 +34,15 @@ class _BackupDetailsPageState extends State is ServerInstallationFinished; final bool isBackupInitialized = context.watch().state.isInitialized; - final BackupStatusEnum backupStatus = - context.watch().state.status; final StateType providerState = isReady && isBackupInitialized - ? (backupStatus == BackupStatusEnum.error - ? StateType.warning - : StateType.stable) + ? StateType.stable : StateType.uninitialized; final bool preventActions = context.watch().state.preventActions; - final double backupProgress = context.watch().state.progress; - final String backupError = context.watch().state.error; final List backups = context.watch().state.backups; final bool refreshing = context.watch().state.refreshing; + final List services = + context.watch().state.services; return BrandHeroScreen( heroIcon: BrandIcons.save, @@ -53,81 +54,45 @@ class _BackupDetailsPageState extends State onPressed: preventActions ? null : () async { - await context.read().createBucket(); + await context.read().initializeBackups(); }, text: 'backup.initialize'.tr(), ), - if (backupStatus == BackupStatusEnum.initializing) - Text( - 'backup.waiting_for_rebuild'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - if (backupStatus != BackupStatusEnum.initializing && - backupStatus != BackupStatusEnum.noKey) - OutlinedCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (backupStatus == BackupStatusEnum.initialized) - ListTile( - onTap: preventActions - ? null - : () async { - await context.read().createBackup(); - }, - leading: const Icon( - Icons.add_circle_outline_rounded, - ), - title: Text( - 'backup.create_new'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - ), - if (backupStatus == BackupStatusEnum.backingUp) - ListTile( - title: Text( - 'backup.creating'.tr( - args: [(backupProgress * 100).round().toString()], + ListTile( + onTap: preventActions + ? null + : () { + // await context.read().createBackup(); + showModalBottomSheet( + useRootNavigator: true, + context: context, + isScrollControlled: true, + builder: (final BuildContext context) => + DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.4, + initialChildSize: 0.6, + builder: (context, scrollController) => + CreateBackupsModal( + services: services, + scrollController: scrollController, ), - style: Theme.of(context).textTheme.titleLarge, ), - subtitle: LinearProgressIndicator( - value: backupProgress, - backgroundColor: Colors.grey.withOpacity(0.2), - ), - ), - if (backupStatus == BackupStatusEnum.restoring) - ListTile( - title: Text( - 'backup.restoring'.tr( - args: [(backupProgress * 100).round().toString()], - ), - style: Theme.of(context).textTheme.titleLarge, - ), - subtitle: LinearProgressIndicator( - backgroundColor: Colors.grey.withOpacity(0.2), - ), - ), - if (backupStatus == BackupStatusEnum.error) - ListTile( - leading: Icon( - Icons.error_outline, - color: Theme.of(context).colorScheme.error, - ), - title: Text( - 'backup.error_pending'.tr(), - style: Theme.of(context).textTheme.titleLarge, - ), - ), - ], - ), + ); + }, + leading: const Icon( + Icons.add_circle_outline_rounded, ), + title: Text( + 'backup.create_new'.tr(), + ), + ), const SizedBox(height: 16), // Card with a list of existing backups // Each list item has a date // When clicked, starts the restore action - if (backupStatus != BackupStatusEnum.initializing && - backupStatus != BackupStatusEnum.noKey) + if (isBackupInitialized) OutlinedCard( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -230,11 +195,151 @@ class _BackupDetailsPageState extends State ], ), ), - if (backupStatus == BackupStatusEnum.error) - Text( - backupError.toString(), - style: Theme.of(context).textTheme.bodyMedium, - ), + ], + ); + } +} + +class CreateBackupsModal extends StatefulWidget { + const CreateBackupsModal({ + super.key, + required this.services, + required this.scrollController, + }); + + final List services; + final ScrollController scrollController; + + @override + State createState() => _CreateBackupsModalState(); +} + +class _CreateBackupsModalState extends State { + // Store in state the selected services to backup + List selectedServices = []; + + // Select all services on modal open + @override + void initState() { + super.initState(); + final List busyServices = context + .read() + .state + .backupJobList + .where((final ServerJob job) => + job.status == JobStatusEnum.running || + job.status == JobStatusEnum.created) + .map((final ServerJob job) => job.typeId.split('.')[1]) + .toList(); + selectedServices.addAll(widget.services + .where((final Service service) => !busyServices.contains(service.id))); + } + + @override + Widget build(final BuildContext context) { + final List busyServices = context + .watch() + .state + .backupJobList + .where((final ServerJob job) => + job.status == JobStatusEnum.running || + job.status == JobStatusEnum.created) + .map((final ServerJob job) => job.typeId.split('.')[1]) + .toList(); + + return ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.create_new_select_headline'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 16), + // Select all services tile + CheckboxListTile( + onChanged: (final bool? value) { + setState(() { + if (value ?? true) { + setState(() { + selectedServices.clear(); + selectedServices.addAll(widget.services.where( + (final service) => !busyServices.contains(service.id))); + }); + } else { + selectedServices.clear(); + } + }); + }, + title: Text( + 'backup.select_all'.tr(), + ), + secondary: const Icon( + Icons.checklist_outlined, + ), + value: selectedServices.length >= + widget.services.length - busyServices.length, + ), + const Divider( + height: 1.0, + ), + ...widget.services.map( + (final Service service) { + final bool busy = busyServices.contains(service.id); + return CheckboxListTile( + onChanged: !busy + ? (final bool? value) { + setState(() { + if (value ?? true) { + setState(() { + selectedServices.add(service); + }); + } else { + setState(() { + selectedServices.remove(service); + }); + } + }); + } + : null, + title: Text( + service.displayName, + ), + subtitle: Text( + busy ? 'backup.service_busy'.tr() : service.description, + ), + secondary: SvgPicture.string( + service.svgIcon, + height: 24, + width: 24, + colorFilter: ColorFilter.mode( + busy + ? Theme.of(context).colorScheme.outlineVariant + : Theme.of(context).colorScheme.onBackground, + BlendMode.srcIn, + ), + ), + value: selectedServices.contains(service), + ); + }, + ), + const SizedBox(height: 16), + // Create backup button + FilledButton( + onPressed: selectedServices.isEmpty + ? null + : () { + context + .read() + .createMultipleBackups(selectedServices); + Navigator.of(context).pop(); + }, + child: Text( + 'backup.create'.tr(), + ), + ), ], ); } diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 25533a43..bdae6e07 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -97,16 +97,15 @@ class _ProvidersPageState extends State { ), const SizedBox(height: 16), // TODO: When backups are fixed, show this card - if (isBackupInitialized) - _Card( - state: isBackupInitialized - ? StateType.stable - : StateType.uninitialized, - icon: BrandIcons.save, - title: 'backup.card_title'.tr(), - subtitle: isBackupInitialized ? 'backup.card_subtitle'.tr() : '', - onTap: () => context.pushRoute(const BackupDetailsRoute()), - ), + _Card( + state: isBackupInitialized + ? StateType.stable + : StateType.uninitialized, + icon: BrandIcons.save, + title: 'backup.card_title'.tr(), + subtitle: isBackupInitialized ? 'backup.card_subtitle'.tr() : '', + onTap: () => context.pushRoute(const BackupDetailsRoute()), + ), ], ), ); From e1e4779c51a879c71f9bcd44329bfaea1628e8c0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 29 Jun 2023 12:52:37 +0300 Subject: [PATCH 550/732] feat(recovery): Couldn't save the dns token --- .../server_installation_repository.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 33d047b1..2a6829e6 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -170,12 +170,13 @@ class ServerInstallationRepository { Future getDomainId(final String token, final String domain) async { final result = await ProvidersController.currentDnsProvider!.tryInitApiByToken(token); - return result.success - ? (await ProvidersController.currentDnsProvider!.getZoneId( - domain, - )) - .data - : null; + if (!result.success) { + return null; + } + await setDnsApiToken(token); + return (await ProvidersController.currentDnsProvider!.getZoneId( + domain, + )).data; } Future> isDnsAddressesMatch( From 62e906d1a4a110e64f0a67ed018e5b1cbdeec842 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 29 Jun 2023 12:53:13 +0300 Subject: [PATCH 551/732] feat(jobs): Update the model and modal sheets --- lib/logic/cubit/server_jobs/server_jobs_state.dart | 5 +++++ lib/logic/models/json/server_job.dart | 3 +++ lib/logic/models/json/server_job.g.dart | 2 ++ lib/ui/components/jobs_content/jobs_content.dart | 10 ++++++++-- lib/ui/components/pre_styled_buttons/flash_fab.dart | 11 ++++++++++- lib/ui/layouts/brand_hero_screen.dart | 11 ++++++++++- .../binds_migration/services_migration.dart | 11 ++++++++++- 7 files changed, 48 insertions(+), 5 deletions(-) diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index 03b564c0..71732d67 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -21,6 +21,11 @@ class ServerJobsState extends ServerInstallationDependendState { } } + List get backupJobList => serverJobList.where( + // The backup jobs has the format of 'service..backup' + (final job) => job.typeId.contains('backup'), + ).toList(); + bool get hasRemovableJobs => serverJobList.any( (final job) => job.status == JobStatusEnum.finished || diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 2c448e81..6b125c5f 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -12,6 +12,7 @@ class ServerJob { required this.description, required this.status, required this.uid, + required this.typeId, required this.updatedAt, required this.createdAt, this.error, @@ -33,12 +34,14 @@ class ServerJob { status: JobStatusEnum.fromString(serverJob.status), statusText: serverJob.statusText, uid: serverJob.uid, + typeId: serverJob.typeId, updatedAt: serverJob.updatedAt, ); final String name; final String description; final JobStatusEnum status; final String uid; + final String typeId; final DateTime updatedAt; final DateTime createdAt; diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart index 5328547b..61ff259b 100644 --- a/lib/logic/models/json/server_job.g.dart +++ b/lib/logic/models/json/server_job.g.dart @@ -11,6 +11,7 @@ ServerJob _$ServerJobFromJson(Map json) => ServerJob( description: json['description'] as String, status: $enumDecode(_$JobStatusEnumEnumMap, json['status']), uid: json['uid'] as String, + typeId: json['typeId'] as String, updatedAt: DateTime.parse(json['updatedAt'] as String), createdAt: DateTime.parse(json['createdAt'] as String), error: json['error'] as String?, @@ -27,6 +28,7 @@ Map _$ServerJobToJson(ServerJob instance) => { 'description': instance.description, 'status': _$JobStatusEnumEnumMap[instance.status]!, 'uid': instance.uid, + 'typeId': instance.typeId, 'updatedAt': instance.updatedAt.toIso8601String(), 'createdAt': instance.createdAt.toIso8601String(), 'error': instance.error, diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index 5ba00f89..8db853ac 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -12,7 +12,12 @@ import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; class JobsContent extends StatelessWidget { - const JobsContent({super.key}); + const JobsContent({ + required this.controller, + super.key, + }); + + final ScrollController controller; @override Widget build(final BuildContext context) { @@ -119,9 +124,10 @@ class JobsContent extends StatelessWidget { ]; } return ListView( + controller: controller, padding: paddingH15V0, children: [ - const SizedBox(height: 15), + const SizedBox(height: 16), Center( child: Text( 'jobs.title'.tr(), diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/components/pre_styled_buttons/flash_fab.dart index 2098f79e..caffbfac 100644 --- a/lib/ui/components/pre_styled_buttons/flash_fab.dart +++ b/lib/ui/components/pre_styled_buttons/flash_fab.dart @@ -62,7 +62,16 @@ class _BrandFabState extends State // TODO: Make a hero animation to the screen showModalBottomSheet( context: context, - builder: (final BuildContext context) => const JobsContent(), + useRootNavigator: true, + isScrollControlled: true, + builder: (final BuildContext context) => DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.4, + initialChildSize: 0.6, + builder: (final context, final scrollController) => + JobsContent(controller: scrollController), + ), ); }, isExtended: widget.extended, diff --git a/lib/ui/layouts/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart index adb94902..e7b320c0 100644 --- a/lib/ui/layouts/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -145,7 +145,16 @@ class _HeroSliverAppBarState extends State { onPressed: () { showModalBottomSheet( context: context, - builder: (final BuildContext context) => const JobsContent(), + useRootNavigator: true, + isScrollControlled: true, + builder: (final BuildContext context) => DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.4, + initialChildSize: 0.6, + builder: (final context, final scrollController) => + JobsContent(controller: scrollController), + ), ); }, icon: Icon( diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index cdb3339b..f7c26c88 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -177,7 +177,16 @@ class _ServicesMigrationPageState extends State { context.router.popUntilRoot(); showModalBottomSheet( context: context, - builder: (final BuildContext context) => const JobsContent(), + useRootNavigator: true, + isScrollControlled: true, + builder: (final BuildContext context) => DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.4, + initialChildSize: 0.6, + builder: (final context, final scrollController) => + JobsContent(controller: scrollController), + ), ); }, ), From 90ab4244f671878b613f89e0f224ca29a4520ef5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 29 Jun 2023 13:51:38 +0300 Subject: [PATCH 552/732] feat(backups): Expose if the service can be backed up --- .../graphql_maps/schema/schema.graphql | 1 + .../graphql_maps/schema/services.graphql | 1 + lib/logic/cubit/backups/backups_cubit.dart | 3 +- lib/logic/cubit/services/services_state.dart | 4 ++ lib/logic/models/service.dart | 6 ++- .../pages/backup_details/backup_details.dart | 39 ++++++++++++------- 6 files changed, 37 insertions(+), 17 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index d53da52e..643dca4f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -254,6 +254,7 @@ type Service { isMovable: Boolean! isRequired: Boolean! isEnabled: Boolean! + canBeBackedUp: Boolean! status: ServiceStatusEnum! url: String dnsRecords: [DnsRecord!] diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index 9299ff7b..c27b568c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -16,6 +16,7 @@ query AllServices { isEnabled isMovable isRequired + canBeBackedUp status storageUsage { title diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 4a1c980b..61dcc576 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -101,7 +101,8 @@ class BackupsCubit extends ServerInstallationDependendCubit { } await updateBackups(); getIt().showSnackBar( - 'Backups repository is now initializing. It may take a while.'); + 'Backups repository is now initializing. It may take a while.', + ); emit(state.copyWith(preventActions: false)); } diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index 2d99880a..d6247bc1 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -12,6 +12,10 @@ class ServicesState extends ServerInstallationDependendState { final List services; final List lockedServices; + List get servicesThatCanBeBackedUp => services.where( + (final service) => service.canBeBackedUp, + ).toList(); + bool isServiceLocked(final String serviceId) => lockedServices.contains(serviceId); diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 19cd39ea..086d527d 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql. import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; -import '../api_maps/graphql_maps/schema/server_settings.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; class Service { Service.fromGraphQL(final Query$AllServices$services$allServices service) @@ -17,6 +17,7 @@ class Service { isEnabled: service.isEnabled, isRequired: service.isRequired, isMovable: service.isMovable, + canBeBackedUp: service.canBeBackedUp, status: ServiceStatus.fromGraphQL(service.status), storageUsage: ServiceStorageUsage( used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), @@ -42,6 +43,7 @@ class Service { required this.isEnabled, required this.isRequired, required this.isMovable, + required this.canBeBackedUp, required this.status, required this.storageUsage, required this.svgIcon, @@ -75,6 +77,7 @@ class Service { isEnabled: false, isRequired: false, isMovable: false, + canBeBackedUp: false, status: ServiceStatus.off, storageUsage: ServiceStorageUsage( used: const DiskSize(byte: 0), @@ -91,6 +94,7 @@ class Service { final bool isEnabled; final bool isRequired; final bool isMovable; + final bool canBeBackedUp; final ServiceStatus status; final ServiceStorageUsage storageUsage; final String svgIcon; diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 2dac9a0b..b3fa2348 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -42,7 +42,7 @@ class _BackupDetailsPageState extends State final List backups = context.watch().state.backups; final bool refreshing = context.watch().state.refreshing; final List services = - context.watch().state.services; + context.watch().state.servicesThatCanBeBackedUp; return BrandHeroScreen( heroIcon: BrandIcons.save, @@ -73,7 +73,7 @@ class _BackupDetailsPageState extends State maxChildSize: 0.9, minChildSize: 0.4, initialChildSize: 0.6, - builder: (context, scrollController) => + builder: (final context, final scrollController) => CreateBackupsModal( services: services, scrollController: scrollController, @@ -202,9 +202,9 @@ class _BackupDetailsPageState extends State class CreateBackupsModal extends StatefulWidget { const CreateBackupsModal({ - super.key, required this.services, required this.scrollController, + super.key, }); final List services; @@ -226,13 +226,17 @@ class _CreateBackupsModalState extends State { .read() .state .backupJobList - .where((final ServerJob job) => - job.status == JobStatusEnum.running || - job.status == JobStatusEnum.created) + .where( + (final ServerJob job) => + job.status == JobStatusEnum.running || + job.status == JobStatusEnum.created, + ) .map((final ServerJob job) => job.typeId.split('.')[1]) .toList(); - selectedServices.addAll(widget.services - .where((final Service service) => !busyServices.contains(service.id))); + selectedServices.addAll( + widget.services + .where((final Service service) => !busyServices.contains(service.id)), + ); } @override @@ -241,9 +245,11 @@ class _CreateBackupsModalState extends State { .watch() .state .backupJobList - .where((final ServerJob job) => - job.status == JobStatusEnum.running || - job.status == JobStatusEnum.created) + .where( + (final ServerJob job) => + job.status == JobStatusEnum.running || + job.status == JobStatusEnum.created, + ) .map((final ServerJob job) => job.typeId.split('.')[1]) .toList(); @@ -253,7 +259,7 @@ class _CreateBackupsModalState extends State { children: [ const SizedBox(height: 16), Text( - 'backup.create_new_select_headline'.tr(), + 'backup.create_new_select_heading'.tr(), style: Theme.of(context).textTheme.headlineSmall, textAlign: TextAlign.center, ), @@ -265,8 +271,11 @@ class _CreateBackupsModalState extends State { if (value ?? true) { setState(() { selectedServices.clear(); - selectedServices.addAll(widget.services.where( - (final service) => !busyServices.contains(service.id))); + selectedServices.addAll( + widget.services.where( + (final service) => !busyServices.contains(service.id), + ), + ); }); } else { selectedServices.clear(); @@ -337,7 +346,7 @@ class _CreateBackupsModalState extends State { Navigator.of(context).pop(); }, child: Text( - 'backup.create'.tr(), + 'backup.start'.tr(), ), ), ], From 7f5488c76b9c758b34af5c13397387503a4afdd2 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 29 Jun 2023 13:52:25 +0300 Subject: [PATCH 553/732] refactor(services): Remove unused state getters --- lib/logic/cubit/services/services_state.dart | 54 ++------------------ 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index d6247bc1..7a136b54 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -12,44 +12,15 @@ class ServicesState extends ServerInstallationDependendState { final List services; final List lockedServices; - List get servicesThatCanBeBackedUp => services.where( + List get servicesThatCanBeBackedUp => services + .where( (final service) => service.canBeBackedUp, - ).toList(); + ) + .toList(); bool isServiceLocked(final String serviceId) => lockedServices.contains(serviceId); - bool get isPasswordManagerEnable => services - .firstWhere( - (final service) => service.id == 'bitwarden', - orElse: () => Service.empty, - ) - .isEnabled; - bool get isCloudEnable => services - .firstWhere( - (final service) => service.id == 'nextcloud', - orElse: () => Service.empty, - ) - .isEnabled; - bool get isGitEnable => services - .firstWhere( - (final service) => service.id == 'gitea', - orElse: () => Service.empty, - ) - .isEnabled; - bool get isSocialNetworkEnable => services - .firstWhere( - (final service) => service.id == 'pleroma', - orElse: () => Service.empty, - ) - .isEnabled; - bool get isVpnEnable => services - .firstWhere( - (final service) => service.id == 'ocserv', - orElse: () => Service.empty, - ) - .isEnabled; - Service? getServiceById(final String id) { final service = services.firstWhere( (final service) => service.id == id, @@ -67,23 +38,6 @@ class ServicesState extends ServerInstallationDependendState { lockedServices, ]; - bool isEnableByType(final Service service) { - switch (service.id) { - case 'bitwarden': - return isPasswordManagerEnable; - case 'nextcloud': - return isCloudEnable; - case 'pleroma': - return isSocialNetworkEnable; - case 'gitea': - return isGitEnable; - case 'ocserv': - return isVpnEnable; - default: - throw Exception('wrong state'); - } - } - ServicesState copyWith({ final List? services, final List? lockedServices, From b3b7c83461006c012acdb2573ee64a068a522d26 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 29 Jun 2023 15:38:46 -0300 Subject: [PATCH 554/732] chore: Implement fragments for ServerJob type on backup requests --- .../graphql_maps/schema/backups.graphql | 14 + .../graphql_maps/schema/backups.graphql.dart | 802 ++++++++++++++- .../graphql_maps/schema/disk_volumes.graphql | 12 +- .../schema/disk_volumes.graphql.dart | 426 +------- .../graphql_maps/schema/server_api.graphql | 28 +- .../schema/server_api.graphql.dart | 934 ++++++++++-------- .../schema/server_settings.graphql.dart | 2 +- .../graphql_maps/schema/services.graphql | 12 +- .../graphql_maps/schema/services.graphql.dart | 452 +-------- .../graphql_maps/schema/users.graphql.dart | 2 +- .../graphql_maps/server_api/backups_api.dart | 47 +- lib/logic/models/json/server_job.dart | 2 +- .../providers/dns_providers/dns_provider.dart | 9 + 13 files changed, 1445 insertions(+), 1297 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index c0341b19..fae80432 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -50,6 +50,9 @@ mutation StartBackup($serviceId: String!) { backup { startBackup(serviceId: $serviceId) { ...basicMutationReturnFields + job { + ...basicApiJobsFields + } } } } @@ -77,3 +80,14 @@ mutation InitializeRepository($repository: InitializeRepositoryInput!) { } } } + +mutation RestoreBackup($snapshotId: String!) { + backup { + restoreBackup(snapshotId: $snapshotId) { + ...basicMutationReturnFields + job { + ...basicApiJobsFields + } + } + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 2ed668b1..52bf45eb 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -1,9 +1,10 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'server_api.graphql.dart'; +import 'services.graphql.dart'; class Fragment$genericBackupConfigReturn { Fragment$genericBackupConfigReturn({ @@ -3003,6 +3004,25 @@ const documentNodeMutationStartBackup = DocumentNode(definitions: [ name: NameNode(value: 'basicMutationReturnFields'), directives: [], ), + FieldNode( + name: NameNode(value: 'job'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicApiJobsFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -3031,6 +3051,7 @@ const documentNodeMutationStartBackup = DocumentNode(definitions: [ ]), ), fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionbasicApiJobsFields, ]); Mutation$StartBackup _parserFn$Mutation$StartBackup( Map data) => @@ -3268,6 +3289,7 @@ class Mutation$StartBackup$backup$startBackup required this.message, required this.success, this.$__typename = 'GenericJobMutationReturn', + this.job, }); factory Mutation$StartBackup$backup$startBackup.fromJson( @@ -3276,11 +3298,16 @@ class Mutation$StartBackup$backup$startBackup final l$message = json['message']; final l$success = json['success']; final l$$__typename = json['__typename']; + final l$job = json['job']; return Mutation$StartBackup$backup$startBackup( code: (l$code as int), message: (l$message as String), success: (l$success as bool), $__typename: (l$$__typename as String), + job: l$job == null + ? null + : Fragment$basicApiJobsFields.fromJson( + (l$job as Map)), ); } @@ -3292,6 +3319,8 @@ class Mutation$StartBackup$backup$startBackup final String $__typename; + final Fragment$basicApiJobsFields? job; + Map toJson() { final _resultData = {}; final l$code = code; @@ -3302,6 +3331,8 @@ class Mutation$StartBackup$backup$startBackup _resultData['success'] = l$success; final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; + final l$job = job; + _resultData['job'] = l$job?.toJson(); return _resultData; } @@ -3311,11 +3342,13 @@ class Mutation$StartBackup$backup$startBackup final l$message = message; final l$success = success; final l$$__typename = $__typename; + final l$job = job; return Object.hashAll([ l$code, l$message, l$success, l$$__typename, + l$job, ]); } @@ -3348,6 +3381,11 @@ class Mutation$StartBackup$backup$startBackup if (l$$__typename != lOther$$__typename) { return false; } + final l$job = job; + final lOther$job = other.job; + if (l$job != lOther$job) { + return false; + } return true; } } @@ -3376,7 +3414,9 @@ abstract class CopyWith$Mutation$StartBackup$backup$startBackup { String? message, bool? success, String? $__typename, + Fragment$basicApiJobsFields? job, }); + CopyWith$Fragment$basicApiJobsFields get job; } class _CopyWithImpl$Mutation$StartBackup$backup$startBackup @@ -3397,6 +3437,7 @@ class _CopyWithImpl$Mutation$StartBackup$backup$startBackup Object? message = _undefined, Object? success = _undefined, Object? $__typename = _undefined, + Object? job = _undefined, }) => _then(Mutation$StartBackup$backup$startBackup( code: @@ -3410,7 +3451,16 @@ class _CopyWithImpl$Mutation$StartBackup$backup$startBackup $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Fragment$basicApiJobsFields?), )); + CopyWith$Fragment$basicApiJobsFields get job { + final local$job = _instance.job; + return local$job == null + ? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance)) + : CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e)); + } } class _CopyWithStubImpl$Mutation$StartBackup$backup$startBackup @@ -3424,8 +3474,11 @@ class _CopyWithStubImpl$Mutation$StartBackup$backup$startBackup String? message, bool? success, String? $__typename, + Fragment$basicApiJobsFields? job, }) => _res; + CopyWith$Fragment$basicApiJobsFields get job => + CopyWith$Fragment$basicApiJobsFields.stub(_res); } class Variables$Mutation$SetAutobackupPeriod { @@ -4928,3 +4981,750 @@ class _CopyWithStubImpl$Mutation$InitializeRepository$backup CopyWith$Fragment$genericBackupConfigReturn get initializeRepository => CopyWith$Fragment$genericBackupConfigReturn.stub(_res); } + +class Variables$Mutation$RestoreBackup { + factory Variables$Mutation$RestoreBackup({required String snapshotId}) => + Variables$Mutation$RestoreBackup._({ + r'snapshotId': snapshotId, + }); + + Variables$Mutation$RestoreBackup._(this._$data); + + factory Variables$Mutation$RestoreBackup.fromJson(Map data) { + final result$data = {}; + final l$snapshotId = data['snapshotId']; + result$data['snapshotId'] = (l$snapshotId as String); + return Variables$Mutation$RestoreBackup._(result$data); + } + + Map _$data; + + String get snapshotId => (_$data['snapshotId'] as String); + Map toJson() { + final result$data = {}; + final l$snapshotId = snapshotId; + result$data['snapshotId'] = l$snapshotId; + return result$data; + } + + CopyWith$Variables$Mutation$RestoreBackup + get copyWith => CopyWith$Variables$Mutation$RestoreBackup( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$RestoreBackup) || + runtimeType != other.runtimeType) { + return false; + } + final l$snapshotId = snapshotId; + final lOther$snapshotId = other.snapshotId; + if (l$snapshotId != lOther$snapshotId) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$snapshotId = snapshotId; + return Object.hashAll([l$snapshotId]); + } +} + +abstract class CopyWith$Variables$Mutation$RestoreBackup { + factory CopyWith$Variables$Mutation$RestoreBackup( + Variables$Mutation$RestoreBackup instance, + TRes Function(Variables$Mutation$RestoreBackup) then, + ) = _CopyWithImpl$Variables$Mutation$RestoreBackup; + + factory CopyWith$Variables$Mutation$RestoreBackup.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$RestoreBackup; + + TRes call({String? snapshotId}); +} + +class _CopyWithImpl$Variables$Mutation$RestoreBackup + implements CopyWith$Variables$Mutation$RestoreBackup { + _CopyWithImpl$Variables$Mutation$RestoreBackup( + this._instance, + this._then, + ); + + final Variables$Mutation$RestoreBackup _instance; + + final TRes Function(Variables$Mutation$RestoreBackup) _then; + + static const _undefined = {}; + + TRes call({Object? snapshotId = _undefined}) => + _then(Variables$Mutation$RestoreBackup._({ + ..._instance._$data, + if (snapshotId != _undefined && snapshotId != null) + 'snapshotId': (snapshotId as String), + })); +} + +class _CopyWithStubImpl$Variables$Mutation$RestoreBackup + implements CopyWith$Variables$Mutation$RestoreBackup { + _CopyWithStubImpl$Variables$Mutation$RestoreBackup(this._res); + + TRes _res; + + call({String? snapshotId}) => _res; +} + +class Mutation$RestoreBackup { + Mutation$RestoreBackup({ + required this.backup, + this.$__typename = 'Mutation', + }); + + factory Mutation$RestoreBackup.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Mutation$RestoreBackup( + backup: Mutation$RestoreBackup$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$RestoreBackup$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RestoreBackup) || + runtimeType != other.runtimeType) { + return false; + } + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$RestoreBackup on Mutation$RestoreBackup { + CopyWith$Mutation$RestoreBackup get copyWith => + CopyWith$Mutation$RestoreBackup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$RestoreBackup { + factory CopyWith$Mutation$RestoreBackup( + Mutation$RestoreBackup instance, + TRes Function(Mutation$RestoreBackup) then, + ) = _CopyWithImpl$Mutation$RestoreBackup; + + factory CopyWith$Mutation$RestoreBackup.stub(TRes res) = + _CopyWithStubImpl$Mutation$RestoreBackup; + + TRes call({ + Mutation$RestoreBackup$backup? backup, + String? $__typename, + }); + CopyWith$Mutation$RestoreBackup$backup get backup; +} + +class _CopyWithImpl$Mutation$RestoreBackup + implements CopyWith$Mutation$RestoreBackup { + _CopyWithImpl$Mutation$RestoreBackup( + this._instance, + this._then, + ); + + final Mutation$RestoreBackup _instance; + + final TRes Function(Mutation$RestoreBackup) _then; + + static const _undefined = {}; + + TRes call({ + Object? backup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$RestoreBackup( + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$RestoreBackup$backup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$RestoreBackup$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$RestoreBackup$backup( + local$backup, (e) => call(backup: e)); + } +} + +class _CopyWithStubImpl$Mutation$RestoreBackup + implements CopyWith$Mutation$RestoreBackup { + _CopyWithStubImpl$Mutation$RestoreBackup(this._res); + + TRes _res; + + call({ + Mutation$RestoreBackup$backup? backup, + String? $__typename, + }) => + _res; + CopyWith$Mutation$RestoreBackup$backup get backup => + CopyWith$Mutation$RestoreBackup$backup.stub(_res); +} + +const documentNodeMutationRestoreBackup = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RestoreBackup'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'snapshotId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'backup'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'restoreBackup'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'snapshotId'), + value: VariableNode(name: NameNode(value: 'snapshotId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'job'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicApiJobsFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionbasicApiJobsFields, +]); +Mutation$RestoreBackup _parserFn$Mutation$RestoreBackup( + Map data) => + Mutation$RestoreBackup.fromJson(data); +typedef OnMutationCompleted$Mutation$RestoreBackup = FutureOr Function( + Map?, + Mutation$RestoreBackup?, +); + +class Options$Mutation$RestoreBackup + extends graphql.MutationOptions { + Options$Mutation$RestoreBackup({ + String? operationName, + required Variables$Mutation$RestoreBackup variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$RestoreBackup? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RestoreBackup? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RestoreBackup(data), + ), + update: update, + onError: onError, + document: documentNodeMutationRestoreBackup, + parserFn: _parserFn$Mutation$RestoreBackup, + ); + + final OnMutationCompleted$Mutation$RestoreBackup? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$RestoreBackup + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RestoreBackup({ + String? operationName, + required Variables$Mutation$RestoreBackup variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$RestoreBackup? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationRestoreBackup, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RestoreBackup, + ); +} + +extension ClientExtension$Mutation$RestoreBackup on graphql.GraphQLClient { + Future> mutate$RestoreBackup( + Options$Mutation$RestoreBackup options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$RestoreBackup( + WatchOptions$Mutation$RestoreBackup options) => + this.watchMutation(options); +} + +class Mutation$RestoreBackup$backup { + Mutation$RestoreBackup$backup({ + required this.restoreBackup, + this.$__typename = 'BackupMutations', + }); + + factory Mutation$RestoreBackup$backup.fromJson(Map json) { + final l$restoreBackup = json['restoreBackup']; + final l$$__typename = json['__typename']; + return Mutation$RestoreBackup$backup( + restoreBackup: Mutation$RestoreBackup$backup$restoreBackup.fromJson( + (l$restoreBackup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$RestoreBackup$backup$restoreBackup restoreBackup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$restoreBackup = restoreBackup; + _resultData['restoreBackup'] = l$restoreBackup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$restoreBackup = restoreBackup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$restoreBackup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RestoreBackup$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$restoreBackup = restoreBackup; + final lOther$restoreBackup = other.restoreBackup; + if (l$restoreBackup != lOther$restoreBackup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$RestoreBackup$backup + on Mutation$RestoreBackup$backup { + CopyWith$Mutation$RestoreBackup$backup + get copyWith => CopyWith$Mutation$RestoreBackup$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$RestoreBackup$backup { + factory CopyWith$Mutation$RestoreBackup$backup( + Mutation$RestoreBackup$backup instance, + TRes Function(Mutation$RestoreBackup$backup) then, + ) = _CopyWithImpl$Mutation$RestoreBackup$backup; + + factory CopyWith$Mutation$RestoreBackup$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$RestoreBackup$backup; + + TRes call({ + Mutation$RestoreBackup$backup$restoreBackup? restoreBackup, + String? $__typename, + }); + CopyWith$Mutation$RestoreBackup$backup$restoreBackup get restoreBackup; +} + +class _CopyWithImpl$Mutation$RestoreBackup$backup + implements CopyWith$Mutation$RestoreBackup$backup { + _CopyWithImpl$Mutation$RestoreBackup$backup( + this._instance, + this._then, + ); + + final Mutation$RestoreBackup$backup _instance; + + final TRes Function(Mutation$RestoreBackup$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? restoreBackup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$RestoreBackup$backup( + restoreBackup: restoreBackup == _undefined || restoreBackup == null + ? _instance.restoreBackup + : (restoreBackup as Mutation$RestoreBackup$backup$restoreBackup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$RestoreBackup$backup$restoreBackup get restoreBackup { + final local$restoreBackup = _instance.restoreBackup; + return CopyWith$Mutation$RestoreBackup$backup$restoreBackup( + local$restoreBackup, (e) => call(restoreBackup: e)); + } +} + +class _CopyWithStubImpl$Mutation$RestoreBackup$backup + implements CopyWith$Mutation$RestoreBackup$backup { + _CopyWithStubImpl$Mutation$RestoreBackup$backup(this._res); + + TRes _res; + + call({ + Mutation$RestoreBackup$backup$restoreBackup? restoreBackup, + String? $__typename, + }) => + _res; + CopyWith$Mutation$RestoreBackup$backup$restoreBackup + get restoreBackup => + CopyWith$Mutation$RestoreBackup$backup$restoreBackup.stub(_res); +} + +class Mutation$RestoreBackup$backup$restoreBackup + implements Fragment$basicMutationReturnFields$$GenericJobMutationReturn { + Mutation$RestoreBackup$backup$restoreBackup({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericJobMutationReturn', + this.job, + }); + + factory Mutation$RestoreBackup$backup$restoreBackup.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + final l$job = json['job']; + return Mutation$RestoreBackup$backup$restoreBackup( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + job: l$job == null + ? null + : Fragment$basicApiJobsFields.fromJson( + (l$job as Map)), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + final Fragment$basicApiJobsFields? job; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$job = job; + _resultData['job'] = l$job?.toJson(); + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$job = job; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$job, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$RestoreBackup$backup$restoreBackup) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + final l$job = job; + final lOther$job = other.job; + if (l$job != lOther$job) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$RestoreBackup$backup$restoreBackup + on Mutation$RestoreBackup$backup$restoreBackup { + CopyWith$Mutation$RestoreBackup$backup$restoreBackup< + Mutation$RestoreBackup$backup$restoreBackup> + get copyWith => CopyWith$Mutation$RestoreBackup$backup$restoreBackup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$RestoreBackup$backup$restoreBackup { + factory CopyWith$Mutation$RestoreBackup$backup$restoreBackup( + Mutation$RestoreBackup$backup$restoreBackup instance, + TRes Function(Mutation$RestoreBackup$backup$restoreBackup) then, + ) = _CopyWithImpl$Mutation$RestoreBackup$backup$restoreBackup; + + factory CopyWith$Mutation$RestoreBackup$backup$restoreBackup.stub(TRes res) = + _CopyWithStubImpl$Mutation$RestoreBackup$backup$restoreBackup; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$basicApiJobsFields? job, + }); + CopyWith$Fragment$basicApiJobsFields get job; +} + +class _CopyWithImpl$Mutation$RestoreBackup$backup$restoreBackup + implements CopyWith$Mutation$RestoreBackup$backup$restoreBackup { + _CopyWithImpl$Mutation$RestoreBackup$backup$restoreBackup( + this._instance, + this._then, + ); + + final Mutation$RestoreBackup$backup$restoreBackup _instance; + + final TRes Function(Mutation$RestoreBackup$backup$restoreBackup) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + Object? job = _undefined, + }) => + _then(Mutation$RestoreBackup$backup$restoreBackup( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + job: job == _undefined + ? _instance.job + : (job as Fragment$basicApiJobsFields?), + )); + CopyWith$Fragment$basicApiJobsFields get job { + final local$job = _instance.job; + return local$job == null + ? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance)) + : CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e)); + } +} + +class _CopyWithStubImpl$Mutation$RestoreBackup$backup$restoreBackup + implements CopyWith$Mutation$RestoreBackup$backup$restoreBackup { + _CopyWithStubImpl$Mutation$RestoreBackup$backup$restoreBackup(this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + Fragment$basicApiJobsFields? job, + }) => + _res; + CopyWith$Fragment$basicApiJobsFields get job => + CopyWith$Fragment$basicApiJobsFields.stub(_res); +} diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql index a5947f5e..e1d562d2 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql @@ -53,17 +53,7 @@ mutation MigrateToBinds($input: MigrateToBindsInput!) { migrateToBinds(input: $input) { ...basicMutationReturnFields job { - createdAt - description - error - finishedAt - name - progress - result - status - statusText - uid - updatedAt + ...basicApiJobsFields } } } diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index c900dcc7..2d7939a5 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -1,8 +1,9 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'server_api.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -5679,82 +5680,9 @@ const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], + FragmentSpreadNode( + name: NameNode(value: 'basicApiJobsFields'), directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, ), FieldNode( name: NameNode(value: '__typename'), @@ -5784,6 +5712,7 @@ const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [ ]), ), fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionbasicApiJobsFields, ]); Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds( Map data) => @@ -5906,7 +5835,7 @@ class Mutation$MigrateToBinds$migrateToBinds $__typename: (l$$__typename as String), job: l$job == null ? null - : Mutation$MigrateToBinds$migrateToBinds$job.fromJson( + : Fragment$basicApiJobsFields.fromJson( (l$job as Map)), ); } @@ -5919,7 +5848,7 @@ class Mutation$MigrateToBinds$migrateToBinds final String $__typename; - final Mutation$MigrateToBinds$migrateToBinds$job? job; + final Fragment$basicApiJobsFields? job; Map toJson() { final _resultData = {}; @@ -6014,9 +5943,9 @@ abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds { String? message, bool? success, String? $__typename, - Mutation$MigrateToBinds$migrateToBinds$job? job, + Fragment$basicApiJobsFields? job, }); - CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job; + CopyWith$Fragment$basicApiJobsFields get job; } class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds @@ -6053,15 +5982,13 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds : ($__typename as String), job: job == _undefined ? _instance.job - : (job as Mutation$MigrateToBinds$migrateToBinds$job?), + : (job as Fragment$basicApiJobsFields?), )); - CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job { + CopyWith$Fragment$basicApiJobsFields get job { final local$job = _instance.job; return local$job == null - ? CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub( - _then(_instance)) - : CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( - local$job, (e) => call(job: e)); + ? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance)) + : CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e)); } } @@ -6076,330 +6003,9 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds String? message, bool? success, String? $__typename, - Mutation$MigrateToBinds$migrateToBinds$job? job, - }) => - _res; - CopyWith$Mutation$MigrateToBinds$migrateToBinds$job get job => - CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(_res); -} - -class Mutation$MigrateToBinds$migrateToBinds$job { - Mutation$MigrateToBinds$migrateToBinds$job({ - required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - this.$__typename = 'ApiJob', - }); - - factory Mutation$MigrateToBinds$migrateToBinds$job.fromJson( - Map json) { - final l$createdAt = json['createdAt']; - final l$description = json['description']; - final l$error = json['error']; - final l$finishedAt = json['finishedAt']; - final l$name = json['name']; - final l$progress = json['progress']; - final l$result = json['result']; - final l$status = json['status']; - final l$statusText = json['statusText']; - final l$uid = json['uid']; - final l$updatedAt = json['updatedAt']; - final l$$__typename = json['__typename']; - return Mutation$MigrateToBinds$migrateToBinds$job( - createdAt: dateTimeFromJson(l$createdAt), - description: (l$description as String), - error: (l$error as String?), - finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), - name: (l$name as String), - progress: (l$progress as int?), - result: (l$result as String?), - status: (l$status as String), - statusText: (l$statusText as String?), - uid: (l$uid as String), - updatedAt: dateTimeFromJson(l$updatedAt), - $__typename: (l$$__typename as String), - ); - } - - final DateTime createdAt; - - final String description; - - final String? error; - - final DateTime? finishedAt; - - final String name; - - final int? progress; - - final String? result; - - final String status; - - final String? statusText; - - final String uid; - - final DateTime updatedAt; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$createdAt = createdAt; - _resultData['createdAt'] = dateTimeToJson(l$createdAt); - final l$description = description; - _resultData['description'] = l$description; - final l$error = error; - _resultData['error'] = l$error; - final l$finishedAt = finishedAt; - _resultData['finishedAt'] = - l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); - final l$name = name; - _resultData['name'] = l$name; - final l$progress = progress; - _resultData['progress'] = l$progress; - final l$result = result; - _resultData['result'] = l$result; - final l$status = status; - _resultData['status'] = l$status; - final l$statusText = statusText; - _resultData['statusText'] = l$statusText; - final l$uid = uid; - _resultData['uid'] = l$uid; - final l$updatedAt = updatedAt; - _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$createdAt = createdAt; - final l$description = description; - final l$error = error; - final l$finishedAt = finishedAt; - final l$name = name; - final l$progress = progress; - final l$result = result; - final l$status = status; - final l$statusText = statusText; - final l$uid = uid; - final l$updatedAt = updatedAt; - final l$$__typename = $__typename; - return Object.hashAll([ - l$createdAt, - l$description, - l$error, - l$finishedAt, - l$name, - l$progress, - l$result, - l$status, - l$statusText, - l$uid, - l$updatedAt, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Mutation$MigrateToBinds$migrateToBinds$job) || - runtimeType != other.runtimeType) { - return false; - } - final l$createdAt = createdAt; - final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) { - return false; - } - final l$description = description; - final lOther$description = other.description; - if (l$description != lOther$description) { - return false; - } - final l$error = error; - final lOther$error = other.error; - if (l$error != lOther$error) { - return false; - } - final l$finishedAt = finishedAt; - final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) { - return false; - } - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) { - return false; - } - final l$progress = progress; - final lOther$progress = other.progress; - if (l$progress != lOther$progress) { - return false; - } - final l$result = result; - final lOther$result = other.result; - if (l$result != lOther$result) { - return false; - } - final l$status = status; - final lOther$status = other.status; - if (l$status != lOther$status) { - return false; - } - final l$statusText = statusText; - final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) { - return false; - } - final l$uid = uid; - final lOther$uid = other.uid; - if (l$uid != lOther$uid) { - return false; - } - final l$updatedAt = updatedAt; - final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds$job - on Mutation$MigrateToBinds$migrateToBinds$job { - CopyWith$Mutation$MigrateToBinds$migrateToBinds$job< - Mutation$MigrateToBinds$migrateToBinds$job> - get copyWith => CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( - this, - (i) => i, - ); -} - -abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { - factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job( - Mutation$MigrateToBinds$migrateToBinds$job instance, - TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) then, - ) = _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job; - - factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(TRes res) = - _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job; - - TRes call({ - DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename, - }); -} - -class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job - implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { - _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job( - this._instance, - this._then, - ); - - final Mutation$MigrateToBinds$migrateToBinds$job _instance; - - final TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) _then; - - static const _undefined = {}; - - TRes call({ - Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined, - }) => - _then(Mutation$MigrateToBinds$migrateToBinds$job( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job - implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job { - _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job(this._res); - - TRes _res; - - call({ - DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename, + Fragment$basicApiJobsFields? job, }) => _res; + CopyWith$Fragment$basicApiJobsFields get job => + CopyWith$Fragment$basicApiJobsFields.stub(_res); } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index 9797e81f..631454db 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -4,6 +4,21 @@ fragment basicMutationReturnFields on MutationReturnInterface{ success } +fragment basicApiJobsFields on ApiJob{ + createdAt + description + error + finishedAt + name + progress + result + status + statusText + uid + typeId + updatedAt +} + query GetApiVersion { api { version @@ -13,18 +28,7 @@ query GetApiVersion { query GetApiJobs { jobs { getJobs { - createdAt - description - error - finishedAt - name - progress - result - status - statusText - uid - typeId - updatedAt + ...basicApiJobsFields } } } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 7c09fbb7..75b1f344 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ @@ -2283,6 +2283,486 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< _res; } +class Fragment$basicApiJobsFields { + Fragment$basicApiJobsFields({ + required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.typeId, + required this.updatedAt, + this.$__typename = 'ApiJob', + }); + + factory Fragment$basicApiJobsFields.fromJson(Map json) { + final l$createdAt = json['createdAt']; + final l$description = json['description']; + final l$error = json['error']; + final l$finishedAt = json['finishedAt']; + final l$name = json['name']; + final l$progress = json['progress']; + final l$result = json['result']; + final l$status = json['status']; + final l$statusText = json['statusText']; + final l$uid = json['uid']; + final l$typeId = json['typeId']; + final l$updatedAt = json['updatedAt']; + final l$$__typename = json['__typename']; + return Fragment$basicApiJobsFields( + createdAt: dateTimeFromJson(l$createdAt), + description: (l$description as String), + error: (l$error as String?), + finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), + name: (l$name as String), + progress: (l$progress as int?), + result: (l$result as String?), + status: (l$status as String), + statusText: (l$statusText as String?), + uid: (l$uid as String), + typeId: (l$typeId as String), + updatedAt: dateTimeFromJson(l$updatedAt), + $__typename: (l$$__typename as String), + ); + } + + final DateTime createdAt; + + final String description; + + final String? error; + + final DateTime? finishedAt; + + final String name; + + final int? progress; + + final String? result; + + final String status; + + final String? statusText; + + final String uid; + + final String typeId; + + final DateTime updatedAt; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$description = description; + _resultData['description'] = l$description; + final l$error = error; + _resultData['error'] = l$error; + final l$finishedAt = finishedAt; + _resultData['finishedAt'] = + l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); + final l$name = name; + _resultData['name'] = l$name; + final l$progress = progress; + _resultData['progress'] = l$progress; + final l$result = result; + _resultData['result'] = l$result; + final l$status = status; + _resultData['status'] = l$status; + final l$statusText = statusText; + _resultData['statusText'] = l$statusText; + final l$uid = uid; + _resultData['uid'] = l$uid; + final l$typeId = typeId; + _resultData['typeId'] = l$typeId; + final l$updatedAt = updatedAt; + _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$createdAt = createdAt; + final l$description = description; + final l$error = error; + final l$finishedAt = finishedAt; + final l$name = name; + final l$progress = progress; + final l$result = result; + final l$status = status; + final l$statusText = statusText; + final l$uid = uid; + final l$typeId = typeId; + final l$updatedAt = updatedAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$createdAt, + l$description, + l$error, + l$finishedAt, + l$name, + l$progress, + l$result, + l$status, + l$statusText, + l$uid, + l$typeId, + l$updatedAt, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$basicApiJobsFields) || + runtimeType != other.runtimeType) { + return false; + } + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) { + return false; + } + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) { + return false; + } + final l$error = error; + final lOther$error = other.error; + if (l$error != lOther$error) { + return false; + } + final l$finishedAt = finishedAt; + final lOther$finishedAt = other.finishedAt; + if (l$finishedAt != lOther$finishedAt) { + return false; + } + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) { + return false; + } + final l$progress = progress; + final lOther$progress = other.progress; + if (l$progress != lOther$progress) { + return false; + } + final l$result = result; + final lOther$result = other.result; + if (l$result != lOther$result) { + return false; + } + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) { + return false; + } + final l$statusText = statusText; + final lOther$statusText = other.statusText; + if (l$statusText != lOther$statusText) { + return false; + } + final l$uid = uid; + final lOther$uid = other.uid; + if (l$uid != lOther$uid) { + return false; + } + final l$typeId = typeId; + final lOther$typeId = other.typeId; + if (l$typeId != lOther$typeId) { + return false; + } + final l$updatedAt = updatedAt; + final lOther$updatedAt = other.updatedAt; + if (l$updatedAt != lOther$updatedAt) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$basicApiJobsFields + on Fragment$basicApiJobsFields { + CopyWith$Fragment$basicApiJobsFields + get copyWith => CopyWith$Fragment$basicApiJobsFields( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicApiJobsFields { + factory CopyWith$Fragment$basicApiJobsFields( + Fragment$basicApiJobsFields instance, + TRes Function(Fragment$basicApiJobsFields) then, + ) = _CopyWithImpl$Fragment$basicApiJobsFields; + + factory CopyWith$Fragment$basicApiJobsFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicApiJobsFields; + + TRes call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + String? typeId, + DateTime? updatedAt, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicApiJobsFields + implements CopyWith$Fragment$basicApiJobsFields { + _CopyWithImpl$Fragment$basicApiJobsFields( + this._instance, + this._then, + ); + + final Fragment$basicApiJobsFields _instance; + + final TRes Function(Fragment$basicApiJobsFields) _then; + + static const _undefined = {}; + + TRes call({ + Object? createdAt = _undefined, + Object? description = _undefined, + Object? error = _undefined, + Object? finishedAt = _undefined, + Object? name = _undefined, + Object? progress = _undefined, + Object? result = _undefined, + Object? status = _undefined, + Object? statusText = _undefined, + Object? uid = _undefined, + Object? typeId = _undefined, + Object? updatedAt = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicApiJobsFields( + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + description: description == _undefined || description == null + ? _instance.description + : (description as String), + error: error == _undefined ? _instance.error : (error as String?), + finishedAt: finishedAt == _undefined + ? _instance.finishedAt + : (finishedAt as DateTime?), + name: name == _undefined || name == null + ? _instance.name + : (name as String), + progress: + progress == _undefined ? _instance.progress : (progress as int?), + result: result == _undefined ? _instance.result : (result as String?), + status: status == _undefined || status == null + ? _instance.status + : (status as String), + statusText: statusText == _undefined + ? _instance.statusText + : (statusText as String?), + uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), + typeId: typeId == _undefined || typeId == null + ? _instance.typeId + : (typeId as String), + updatedAt: updatedAt == _undefined || updatedAt == null + ? _instance.updatedAt + : (updatedAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicApiJobsFields + implements CopyWith$Fragment$basicApiJobsFields { + _CopyWithStubImpl$Fragment$basicApiJobsFields(this._res); + + TRes _res; + + call({ + DateTime? createdAt, + String? description, + String? error, + DateTime? finishedAt, + String? name, + int? progress, + String? result, + String? status, + String? statusText, + String? uid, + String? typeId, + DateTime? updatedAt, + String? $__typename, + }) => + _res; +} + +const fragmentDefinitionbasicApiJobsFields = FragmentDefinitionNode( + name: NameNode(value: 'basicApiJobsFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'ApiJob'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'typeId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); +const documentNodeFragmentbasicApiJobsFields = DocumentNode(definitions: [ + fragmentDefinitionbasicApiJobsFields, +]); + +extension ClientExtension$Fragment$basicApiJobsFields on graphql.GraphQLClient { + void writeFragment$basicApiJobsFields({ + required Fragment$basicApiJobsFields data, + required Map idFields, + bool broadcast = true, + }) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicApiJobsFields', + document: documentNodeFragmentbasicApiJobsFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$basicApiJobsFields? readFragment$basicApiJobsFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicApiJobsFields', + document: documentNodeFragmentbasicApiJobsFields, + ), + ), + optimistic: optimistic, + ); + return result == null ? null : Fragment$basicApiJobsFields.fromJson(result); + } +} + class Query$GetApiVersion { Query$GetApiVersion({ required this.api, @@ -2844,89 +3324,9 @@ const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], + FragmentSpreadNode( + name: NameNode(value: 'basicApiJobsFields'), directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'typeId'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, ), FieldNode( name: NameNode(value: '__typename'), @@ -2955,6 +3355,7 @@ const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ ), ]), ), + fragmentDefinitionbasicApiJobsFields, ]); Query$GetApiJobs _parserFn$Query$GetApiJobs(Map data) => Query$GetApiJobs.fromJson(data); @@ -3083,14 +3484,14 @@ class Query$GetApiJobs$jobs { final l$$__typename = json['__typename']; return Query$GetApiJobs$jobs( getJobs: (l$getJobs as List) - .map((e) => Query$GetApiJobs$jobs$getJobs.fromJson( - (e as Map))) + .map((e) => + Fragment$basicApiJobsFields.fromJson((e as Map))) .toList(), $__typename: (l$$__typename as String), ); } - final List getJobs; + final List getJobs; final String $__typename; @@ -3160,14 +3561,14 @@ abstract class CopyWith$Query$GetApiJobs$jobs { _CopyWithStubImpl$Query$GetApiJobs$jobs; TRes call({ - List? getJobs, + List? getJobs, String? $__typename, }); TRes getJobs( - Iterable Function( + Iterable Function( Iterable< - CopyWith$Query$GetApiJobs$jobs$getJobs< - Query$GetApiJobs$jobs$getJobs>>) + CopyWith$Fragment$basicApiJobsFields< + Fragment$basicApiJobsFields>>) _fn); } @@ -3191,20 +3592,20 @@ class _CopyWithImpl$Query$GetApiJobs$jobs _then(Query$GetApiJobs$jobs( getJobs: getJobs == _undefined || getJobs == null ? _instance.getJobs - : (getJobs as List), + : (getJobs as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); TRes getJobs( - Iterable Function( + Iterable Function( Iterable< - CopyWith$Query$GetApiJobs$jobs$getJobs< - Query$GetApiJobs$jobs$getJobs>>) + CopyWith$Fragment$basicApiJobsFields< + Fragment$basicApiJobsFields>>) _fn) => call( - getJobs: _fn(_instance.getJobs - .map((e) => CopyWith$Query$GetApiJobs$jobs$getJobs( + getJobs: _fn( + _instance.getJobs.map((e) => CopyWith$Fragment$basicApiJobsFields( e, (i) => i, ))).toList()); @@ -3217,352 +3618,13 @@ class _CopyWithStubImpl$Query$GetApiJobs$jobs TRes _res; call({ - List? getJobs, + List? getJobs, String? $__typename, }) => _res; getJobs(_fn) => _res; } -class Query$GetApiJobs$jobs$getJobs { - Query$GetApiJobs$jobs$getJobs({ - required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.typeId, - required this.updatedAt, - this.$__typename = 'ApiJob', - }); - - factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) { - final l$createdAt = json['createdAt']; - final l$description = json['description']; - final l$error = json['error']; - final l$finishedAt = json['finishedAt']; - final l$name = json['name']; - final l$progress = json['progress']; - final l$result = json['result']; - final l$status = json['status']; - final l$statusText = json['statusText']; - final l$uid = json['uid']; - final l$typeId = json['typeId']; - final l$updatedAt = json['updatedAt']; - final l$$__typename = json['__typename']; - return Query$GetApiJobs$jobs$getJobs( - createdAt: dateTimeFromJson(l$createdAt), - description: (l$description as String), - error: (l$error as String?), - finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), - name: (l$name as String), - progress: (l$progress as int?), - result: (l$result as String?), - status: (l$status as String), - statusText: (l$statusText as String?), - uid: (l$uid as String), - typeId: (l$typeId as String), - updatedAt: dateTimeFromJson(l$updatedAt), - $__typename: (l$$__typename as String), - ); - } - - final DateTime createdAt; - - final String description; - - final String? error; - - final DateTime? finishedAt; - - final String name; - - final int? progress; - - final String? result; - - final String status; - - final String? statusText; - - final String uid; - - final String typeId; - - final DateTime updatedAt; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$createdAt = createdAt; - _resultData['createdAt'] = dateTimeToJson(l$createdAt); - final l$description = description; - _resultData['description'] = l$description; - final l$error = error; - _resultData['error'] = l$error; - final l$finishedAt = finishedAt; - _resultData['finishedAt'] = - l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); - final l$name = name; - _resultData['name'] = l$name; - final l$progress = progress; - _resultData['progress'] = l$progress; - final l$result = result; - _resultData['result'] = l$result; - final l$status = status; - _resultData['status'] = l$status; - final l$statusText = statusText; - _resultData['statusText'] = l$statusText; - final l$uid = uid; - _resultData['uid'] = l$uid; - final l$typeId = typeId; - _resultData['typeId'] = l$typeId; - final l$updatedAt = updatedAt; - _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$createdAt = createdAt; - final l$description = description; - final l$error = error; - final l$finishedAt = finishedAt; - final l$name = name; - final l$progress = progress; - final l$result = result; - final l$status = status; - final l$statusText = statusText; - final l$uid = uid; - final l$typeId = typeId; - final l$updatedAt = updatedAt; - final l$$__typename = $__typename; - return Object.hashAll([ - l$createdAt, - l$description, - l$error, - l$finishedAt, - l$name, - l$progress, - l$result, - l$status, - l$statusText, - l$uid, - l$typeId, - l$updatedAt, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Query$GetApiJobs$jobs$getJobs) || - runtimeType != other.runtimeType) { - return false; - } - final l$createdAt = createdAt; - final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) { - return false; - } - final l$description = description; - final lOther$description = other.description; - if (l$description != lOther$description) { - return false; - } - final l$error = error; - final lOther$error = other.error; - if (l$error != lOther$error) { - return false; - } - final l$finishedAt = finishedAt; - final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) { - return false; - } - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) { - return false; - } - final l$progress = progress; - final lOther$progress = other.progress; - if (l$progress != lOther$progress) { - return false; - } - final l$result = result; - final lOther$result = other.result; - if (l$result != lOther$result) { - return false; - } - final l$status = status; - final lOther$status = other.status; - if (l$status != lOther$status) { - return false; - } - final l$statusText = statusText; - final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) { - return false; - } - final l$uid = uid; - final lOther$uid = other.uid; - if (l$uid != lOther$uid) { - return false; - } - final l$typeId = typeId; - final lOther$typeId = other.typeId; - if (l$typeId != lOther$typeId) { - return false; - } - final l$updatedAt = updatedAt; - final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Query$GetApiJobs$jobs$getJobs - on Query$GetApiJobs$jobs$getJobs { - CopyWith$Query$GetApiJobs$jobs$getJobs - get copyWith => CopyWith$Query$GetApiJobs$jobs$getJobs( - this, - (i) => i, - ); -} - -abstract class CopyWith$Query$GetApiJobs$jobs$getJobs { - factory CopyWith$Query$GetApiJobs$jobs$getJobs( - Query$GetApiJobs$jobs$getJobs instance, - TRes Function(Query$GetApiJobs$jobs$getJobs) then, - ) = _CopyWithImpl$Query$GetApiJobs$jobs$getJobs; - - factory CopyWith$Query$GetApiJobs$jobs$getJobs.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs; - - TRes call({ - DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - String? typeId, - DateTime? updatedAt, - String? $__typename, - }); -} - -class _CopyWithImpl$Query$GetApiJobs$jobs$getJobs - implements CopyWith$Query$GetApiJobs$jobs$getJobs { - _CopyWithImpl$Query$GetApiJobs$jobs$getJobs( - this._instance, - this._then, - ); - - final Query$GetApiJobs$jobs$getJobs _instance; - - final TRes Function(Query$GetApiJobs$jobs$getJobs) _then; - - static const _undefined = {}; - - TRes call({ - Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? typeId = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined, - }) => - _then(Query$GetApiJobs$jobs$getJobs( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), - typeId: typeId == _undefined || typeId == null - ? _instance.typeId - : (typeId as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs - implements CopyWith$Query$GetApiJobs$jobs$getJobs { - _CopyWithStubImpl$Query$GetApiJobs$jobs$getJobs(this._res); - - TRes _res; - - call({ - DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - String? typeId, - DateTime? updatedAt, - String? $__typename, - }) => - _res; -} - class Variables$Mutation$RemoveJob { factory Variables$Mutation$RemoveJob({required String jobId}) => Variables$Mutation$RemoveJob._({ diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index ae8aabcb..abbba037 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index c27b568c..104d22b8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -65,17 +65,7 @@ mutation MoveService($input: MoveServiceInput!) { moveService(input: $input) { ...basicMutationReturnFields job { - createdAt - description - error - finishedAt - name - progress - result - status - statusText - uid - updatedAt + ...basicApiJobsFields } } } diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 2fbf6c3d..e2cd4056 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,9 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; -import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; +import 'server_api.graphql.dart'; import 'server_settings.graphql.dart'; class Fragment$basicMutationReturnFields { @@ -2496,6 +2495,13 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [ directives: [], selectionSet: null, ), + FieldNode( + name: NameNode(value: 'canBeBackedUp'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( name: NameNode(value: 'status'), alias: null, @@ -2877,6 +2883,7 @@ class Query$AllServices$services$allServices { required this.isEnabled, required this.isMovable, required this.isRequired, + required this.canBeBackedUp, required this.status, required this.storageUsage, required this.svgIcon, @@ -2893,6 +2900,7 @@ class Query$AllServices$services$allServices { final l$isEnabled = json['isEnabled']; final l$isMovable = json['isMovable']; final l$isRequired = json['isRequired']; + final l$canBeBackedUp = json['canBeBackedUp']; final l$status = json['status']; final l$storageUsage = json['storageUsage']; final l$svgIcon = json['svgIcon']; @@ -2909,6 +2917,7 @@ class Query$AllServices$services$allServices { isEnabled: (l$isEnabled as bool), isMovable: (l$isMovable as bool), isRequired: (l$isRequired as bool), + canBeBackedUp: (l$canBeBackedUp as bool), status: fromJson$Enum$ServiceStatusEnum((l$status as String)), storageUsage: Query$AllServices$services$allServices$storageUsage.fromJson( @@ -2933,6 +2942,8 @@ class Query$AllServices$services$allServices { final bool isRequired; + final bool canBeBackedUp; + final Enum$ServiceStatusEnum status; final Query$AllServices$services$allServices$storageUsage storageUsage; @@ -2959,6 +2970,8 @@ class Query$AllServices$services$allServices { _resultData['isMovable'] = l$isMovable; final l$isRequired = isRequired; _resultData['isRequired'] = l$isRequired; + final l$canBeBackedUp = canBeBackedUp; + _resultData['canBeBackedUp'] = l$canBeBackedUp; final l$status = status; _resultData['status'] = toJson$Enum$ServiceStatusEnum(l$status); final l$storageUsage = storageUsage; @@ -2981,6 +2994,7 @@ class Query$AllServices$services$allServices { final l$isEnabled = isEnabled; final l$isMovable = isMovable; final l$isRequired = isRequired; + final l$canBeBackedUp = canBeBackedUp; final l$status = status; final l$storageUsage = storageUsage; final l$svgIcon = svgIcon; @@ -2994,6 +3008,7 @@ class Query$AllServices$services$allServices { l$isEnabled, l$isMovable, l$isRequired, + l$canBeBackedUp, l$status, l$storageUsage, l$svgIcon, @@ -3057,6 +3072,11 @@ class Query$AllServices$services$allServices { if (l$isRequired != lOther$isRequired) { return false; } + final l$canBeBackedUp = canBeBackedUp; + final lOther$canBeBackedUp = other.canBeBackedUp; + if (l$canBeBackedUp != lOther$canBeBackedUp) { + return false; + } final l$status = status; final lOther$status = other.status; if (l$status != lOther$status) { @@ -3113,6 +3133,7 @@ abstract class CopyWith$Query$AllServices$services$allServices { bool? isEnabled, bool? isMovable, bool? isRequired, + bool? canBeBackedUp, Enum$ServiceStatusEnum? status, Query$AllServices$services$allServices$storageUsage? storageUsage, String? svgIcon, @@ -3150,6 +3171,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices Object? isEnabled = _undefined, Object? isMovable = _undefined, Object? isRequired = _undefined, + Object? canBeBackedUp = _undefined, Object? status = _undefined, Object? storageUsage = _undefined, Object? svgIcon = _undefined, @@ -3176,6 +3198,9 @@ class _CopyWithImpl$Query$AllServices$services$allServices isRequired: isRequired == _undefined || isRequired == null ? _instance.isRequired : (isRequired as bool), + canBeBackedUp: canBeBackedUp == _undefined || canBeBackedUp == null + ? _instance.canBeBackedUp + : (canBeBackedUp as bool), status: status == _undefined || status == null ? _instance.status : (status as Enum$ServiceStatusEnum), @@ -3225,6 +3250,7 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices bool? isEnabled, bool? isMovable, bool? isRequired, + bool? canBeBackedUp, Enum$ServiceStatusEnum? status, Query$AllServices$services$allServices$storageUsage? storageUsage, String? svgIcon, @@ -6561,82 +6587,9 @@ const documentNodeMutationMoveService = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'createdAt'), - alias: null, - arguments: [], + FragmentSpreadNode( + name: NameNode(value: 'basicApiJobsFields'), directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'description'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'error'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'finishedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'progress'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'result'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'statusText'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'uid'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'updatedAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, ), FieldNode( name: NameNode(value: '__typename'), @@ -6666,6 +6619,7 @@ const documentNodeMutationMoveService = DocumentNode(definitions: [ ]), ), fragmentDefinitionbasicMutationReturnFields, + fragmentDefinitionbasicApiJobsFields, ]); Mutation$MoveService _parserFn$Mutation$MoveService( Map data) => @@ -6785,7 +6739,7 @@ class Mutation$MoveService$moveService $__typename: (l$$__typename as String), job: l$job == null ? null - : Mutation$MoveService$moveService$job.fromJson( + : Fragment$basicApiJobsFields.fromJson( (l$job as Map)), ); } @@ -6798,7 +6752,7 @@ class Mutation$MoveService$moveService final String $__typename; - final Mutation$MoveService$moveService$job? job; + final Fragment$basicApiJobsFields? job; Map toJson() { final _resultData = {}; @@ -6892,9 +6846,9 @@ abstract class CopyWith$Mutation$MoveService$moveService { String? message, bool? success, String? $__typename, - Mutation$MoveService$moveService$job? job, + Fragment$basicApiJobsFields? job, }); - CopyWith$Mutation$MoveService$moveService$job get job; + CopyWith$Fragment$basicApiJobsFields get job; } class _CopyWithImpl$Mutation$MoveService$moveService @@ -6931,14 +6885,13 @@ class _CopyWithImpl$Mutation$MoveService$moveService : ($__typename as String), job: job == _undefined ? _instance.job - : (job as Mutation$MoveService$moveService$job?), + : (job as Fragment$basicApiJobsFields?), )); - CopyWith$Mutation$MoveService$moveService$job get job { + CopyWith$Fragment$basicApiJobsFields get job { final local$job = _instance.job; return local$job == null - ? CopyWith$Mutation$MoveService$moveService$job.stub(_then(_instance)) - : CopyWith$Mutation$MoveService$moveService$job( - local$job, (e) => call(job: e)); + ? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance)) + : CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e)); } } @@ -6953,330 +6906,9 @@ class _CopyWithStubImpl$Mutation$MoveService$moveService String? message, bool? success, String? $__typename, - Mutation$MoveService$moveService$job? job, - }) => - _res; - CopyWith$Mutation$MoveService$moveService$job get job => - CopyWith$Mutation$MoveService$moveService$job.stub(_res); -} - -class Mutation$MoveService$moveService$job { - Mutation$MoveService$moveService$job({ - required this.createdAt, - required this.description, - this.error, - this.finishedAt, - required this.name, - this.progress, - this.result, - required this.status, - this.statusText, - required this.uid, - required this.updatedAt, - this.$__typename = 'ApiJob', - }); - - factory Mutation$MoveService$moveService$job.fromJson( - Map json) { - final l$createdAt = json['createdAt']; - final l$description = json['description']; - final l$error = json['error']; - final l$finishedAt = json['finishedAt']; - final l$name = json['name']; - final l$progress = json['progress']; - final l$result = json['result']; - final l$status = json['status']; - final l$statusText = json['statusText']; - final l$uid = json['uid']; - final l$updatedAt = json['updatedAt']; - final l$$__typename = json['__typename']; - return Mutation$MoveService$moveService$job( - createdAt: dateTimeFromJson(l$createdAt), - description: (l$description as String), - error: (l$error as String?), - finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt), - name: (l$name as String), - progress: (l$progress as int?), - result: (l$result as String?), - status: (l$status as String), - statusText: (l$statusText as String?), - uid: (l$uid as String), - updatedAt: dateTimeFromJson(l$updatedAt), - $__typename: (l$$__typename as String), - ); - } - - final DateTime createdAt; - - final String description; - - final String? error; - - final DateTime? finishedAt; - - final String name; - - final int? progress; - - final String? result; - - final String status; - - final String? statusText; - - final String uid; - - final DateTime updatedAt; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$createdAt = createdAt; - _resultData['createdAt'] = dateTimeToJson(l$createdAt); - final l$description = description; - _resultData['description'] = l$description; - final l$error = error; - _resultData['error'] = l$error; - final l$finishedAt = finishedAt; - _resultData['finishedAt'] = - l$finishedAt == null ? null : dateTimeToJson(l$finishedAt); - final l$name = name; - _resultData['name'] = l$name; - final l$progress = progress; - _resultData['progress'] = l$progress; - final l$result = result; - _resultData['result'] = l$result; - final l$status = status; - _resultData['status'] = l$status; - final l$statusText = statusText; - _resultData['statusText'] = l$statusText; - final l$uid = uid; - _resultData['uid'] = l$uid; - final l$updatedAt = updatedAt; - _resultData['updatedAt'] = dateTimeToJson(l$updatedAt); - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$createdAt = createdAt; - final l$description = description; - final l$error = error; - final l$finishedAt = finishedAt; - final l$name = name; - final l$progress = progress; - final l$result = result; - final l$status = status; - final l$statusText = statusText; - final l$uid = uid; - final l$updatedAt = updatedAt; - final l$$__typename = $__typename; - return Object.hashAll([ - l$createdAt, - l$description, - l$error, - l$finishedAt, - l$name, - l$progress, - l$result, - l$status, - l$statusText, - l$uid, - l$updatedAt, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Mutation$MoveService$moveService$job) || - runtimeType != other.runtimeType) { - return false; - } - final l$createdAt = createdAt; - final lOther$createdAt = other.createdAt; - if (l$createdAt != lOther$createdAt) { - return false; - } - final l$description = description; - final lOther$description = other.description; - if (l$description != lOther$description) { - return false; - } - final l$error = error; - final lOther$error = other.error; - if (l$error != lOther$error) { - return false; - } - final l$finishedAt = finishedAt; - final lOther$finishedAt = other.finishedAt; - if (l$finishedAt != lOther$finishedAt) { - return false; - } - final l$name = name; - final lOther$name = other.name; - if (l$name != lOther$name) { - return false; - } - final l$progress = progress; - final lOther$progress = other.progress; - if (l$progress != lOther$progress) { - return false; - } - final l$result = result; - final lOther$result = other.result; - if (l$result != lOther$result) { - return false; - } - final l$status = status; - final lOther$status = other.status; - if (l$status != lOther$status) { - return false; - } - final l$statusText = statusText; - final lOther$statusText = other.statusText; - if (l$statusText != lOther$statusText) { - return false; - } - final l$uid = uid; - final lOther$uid = other.uid; - if (l$uid != lOther$uid) { - return false; - } - final l$updatedAt = updatedAt; - final lOther$updatedAt = other.updatedAt; - if (l$updatedAt != lOther$updatedAt) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Mutation$MoveService$moveService$job - on Mutation$MoveService$moveService$job { - CopyWith$Mutation$MoveService$moveService$job< - Mutation$MoveService$moveService$job> - get copyWith => CopyWith$Mutation$MoveService$moveService$job( - this, - (i) => i, - ); -} - -abstract class CopyWith$Mutation$MoveService$moveService$job { - factory CopyWith$Mutation$MoveService$moveService$job( - Mutation$MoveService$moveService$job instance, - TRes Function(Mutation$MoveService$moveService$job) then, - ) = _CopyWithImpl$Mutation$MoveService$moveService$job; - - factory CopyWith$Mutation$MoveService$moveService$job.stub(TRes res) = - _CopyWithStubImpl$Mutation$MoveService$moveService$job; - - TRes call({ - DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename, - }); -} - -class _CopyWithImpl$Mutation$MoveService$moveService$job - implements CopyWith$Mutation$MoveService$moveService$job { - _CopyWithImpl$Mutation$MoveService$moveService$job( - this._instance, - this._then, - ); - - final Mutation$MoveService$moveService$job _instance; - - final TRes Function(Mutation$MoveService$moveService$job) _then; - - static const _undefined = {}; - - TRes call({ - Object? createdAt = _undefined, - Object? description = _undefined, - Object? error = _undefined, - Object? finishedAt = _undefined, - Object? name = _undefined, - Object? progress = _undefined, - Object? result = _undefined, - Object? status = _undefined, - Object? statusText = _undefined, - Object? uid = _undefined, - Object? updatedAt = _undefined, - Object? $__typename = _undefined, - }) => - _then(Mutation$MoveService$moveService$job( - createdAt: createdAt == _undefined || createdAt == null - ? _instance.createdAt - : (createdAt as DateTime), - description: description == _undefined || description == null - ? _instance.description - : (description as String), - error: error == _undefined ? _instance.error : (error as String?), - finishedAt: finishedAt == _undefined - ? _instance.finishedAt - : (finishedAt as DateTime?), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - progress: - progress == _undefined ? _instance.progress : (progress as int?), - result: result == _undefined ? _instance.result : (result as String?), - status: status == _undefined || status == null - ? _instance.status - : (status as String), - statusText: statusText == _undefined - ? _instance.statusText - : (statusText as String?), - uid: uid == _undefined || uid == null ? _instance.uid : (uid as String), - updatedAt: updatedAt == _undefined || updatedAt == null - ? _instance.updatedAt - : (updatedAt as DateTime), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Mutation$MoveService$moveService$job - implements CopyWith$Mutation$MoveService$moveService$job { - _CopyWithStubImpl$Mutation$MoveService$moveService$job(this._res); - - TRes _res; - - call({ - DateTime? createdAt, - String? description, - String? error, - DateTime? finishedAt, - String? name, - int? progress, - String? result, - String? status, - String? statusText, - String? uid, - DateTime? updatedAt, - String? $__typename, + Fragment$basicApiJobsFields? job, }) => _res; + CopyWith$Fragment$basicApiJobsFields get job => + CopyWith$Fragment$basicApiJobsFields.stub(_res); } diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index d17316df..4df77d6f 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; +import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart index 18fea675..b652db03 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart @@ -72,9 +72,9 @@ mixin BackupsApi on GraphQLApiMap { ); } - Future startBackup(final String serviceId) async { + Future> startBackup(final String serviceId) async { QueryResult response; - GenericResult? result; + GenericResult? result; try { final GraphQLClient client = await getClient(); @@ -92,7 +92,9 @@ mixin BackupsApi on GraphQLApiMap { } result = GenericResult( success: true, - data: null, + data: ServerJob.fromGraphQL( + response.parsedData!.backup.startBackup.job!, + ), ); } catch (e) { print(e); @@ -204,4 +206,43 @@ mixin BackupsApi on GraphQLApiMap { return result; } + + Future> restoreBackup( + final String snapshotId, + ) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = + Variables$Mutation$RestoreBackup(snapshotId: snapshotId); + final options = Options$Mutation$RestoreBackup(variables: variables); + response = await client.mutate$RestoreBackup(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: ServerJob.fromGraphQL( + response.parsedData!.backup.restoreBackup.job!, + ), + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } } diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 6b125c5f..44fb2561 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -22,7 +22,7 @@ class ServerJob { this.finishedAt, }); - ServerJob.fromGraphQL(final Query$GetApiJobs$jobs$getJobs serverJob) + ServerJob.fromGraphQL(final Fragment$basicApiJobsFields serverJob) : this( createdAt: serverJob.createdAt, description: serverJob.description, diff --git a/lib/logic/providers/dns_providers/dns_provider.dart b/lib/logic/providers/dns_providers/dns_provider.dart index 60976f68..e27c4b00 100644 --- a/lib/logic/providers/dns_providers/dns_provider.dart +++ b/lib/logic/providers/dns_providers/dns_provider.dart @@ -5,7 +5,16 @@ import 'package:selfprivacy/logic/models/json/dns_records.dart'; export 'package:selfprivacy/logic/api_maps/generic_result.dart'; abstract class DnsProvider { + /// Returns an assigned enum value, respectively to which + /// provider implements [DnsProvider] interface. DnsProviderType get type; + + /// Tries to access an account linked to the provided token. + /// + /// To generate a token for your account follow instructions of your + /// DNS provider respectfully. + /// + /// If success, saves it for future usage. Future> tryInitApiByToken(final String token); Future> getZoneId(final String domain); Future> removeDomainRecords({ From 62b7a0ee7ec2b1100406a818255c2435ab61d12c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 2 Jul 2023 14:41:31 +0300 Subject: [PATCH 555/732] feat(backups): Add descriptions for backups --- .../graphql_maps/schema/backups.graphql.dart | 2 +- .../schema/disk_volumes.graphql.dart | 1 - .../graphql_maps/schema/schema.graphql | 1 + .../schema/server_api.graphql.dart | 2 +- .../schema/server_settings.graphql.dart | 2 +- .../graphql_maps/schema/services.graphql | 1 + .../graphql_maps/schema/services.graphql.dart | 29 ++++ .../graphql_maps/schema/users.graphql.dart | 2 +- lib/logic/cubit/backups/backups_cubit.dart | 2 + lib/logic/cubit/backups/backups_state.dart | 2 +- lib/logic/models/service.dart | 4 + lib/ui/layouts/brand_hero_screen.dart | 3 +- .../pages/backup_details/backup_details.dart | 125 +++++++++++------- 13 files changed, 121 insertions(+), 55 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 52bf45eb..14d1ab1a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -1,10 +1,10 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; -import 'services.graphql.dart'; class Fragment$genericBackupConfigReturn { Fragment$genericBackupConfigReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 2d7939a5..aae28508 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -3,7 +3,6 @@ import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 643dca4f..1f57a51a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -255,6 +255,7 @@ type Service { isRequired: Boolean! isEnabled: Boolean! canBeBackedUp: Boolean! + backupDescription: String! status: ServiceStatusEnum! url: String dnsRecords: [DnsRecord!] diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 75b1f344..eaddf55b 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,9 +1,9 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index abbba037..ae8aabcb 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index 104d22b8..ee5ee245 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -17,6 +17,7 @@ query AllServices { isMovable isRequired canBeBackedUp + backupDescription status storageUsage { title diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index e2cd4056..4d33f536 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; @@ -2502,6 +2503,13 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [ directives: [], selectionSet: null, ), + FieldNode( + name: NameNode(value: 'backupDescription'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( name: NameNode(value: 'status'), alias: null, @@ -2884,6 +2892,7 @@ class Query$AllServices$services$allServices { required this.isMovable, required this.isRequired, required this.canBeBackedUp, + required this.backupDescription, required this.status, required this.storageUsage, required this.svgIcon, @@ -2901,6 +2910,7 @@ class Query$AllServices$services$allServices { final l$isMovable = json['isMovable']; final l$isRequired = json['isRequired']; final l$canBeBackedUp = json['canBeBackedUp']; + final l$backupDescription = json['backupDescription']; final l$status = json['status']; final l$storageUsage = json['storageUsage']; final l$svgIcon = json['svgIcon']; @@ -2918,6 +2928,7 @@ class Query$AllServices$services$allServices { isMovable: (l$isMovable as bool), isRequired: (l$isRequired as bool), canBeBackedUp: (l$canBeBackedUp as bool), + backupDescription: (l$backupDescription as String), status: fromJson$Enum$ServiceStatusEnum((l$status as String)), storageUsage: Query$AllServices$services$allServices$storageUsage.fromJson( @@ -2944,6 +2955,8 @@ class Query$AllServices$services$allServices { final bool canBeBackedUp; + final String backupDescription; + final Enum$ServiceStatusEnum status; final Query$AllServices$services$allServices$storageUsage storageUsage; @@ -2972,6 +2985,8 @@ class Query$AllServices$services$allServices { _resultData['isRequired'] = l$isRequired; final l$canBeBackedUp = canBeBackedUp; _resultData['canBeBackedUp'] = l$canBeBackedUp; + final l$backupDescription = backupDescription; + _resultData['backupDescription'] = l$backupDescription; final l$status = status; _resultData['status'] = toJson$Enum$ServiceStatusEnum(l$status); final l$storageUsage = storageUsage; @@ -2995,6 +3010,7 @@ class Query$AllServices$services$allServices { final l$isMovable = isMovable; final l$isRequired = isRequired; final l$canBeBackedUp = canBeBackedUp; + final l$backupDescription = backupDescription; final l$status = status; final l$storageUsage = storageUsage; final l$svgIcon = svgIcon; @@ -3009,6 +3025,7 @@ class Query$AllServices$services$allServices { l$isMovable, l$isRequired, l$canBeBackedUp, + l$backupDescription, l$status, l$storageUsage, l$svgIcon, @@ -3077,6 +3094,11 @@ class Query$AllServices$services$allServices { if (l$canBeBackedUp != lOther$canBeBackedUp) { return false; } + final l$backupDescription = backupDescription; + final lOther$backupDescription = other.backupDescription; + if (l$backupDescription != lOther$backupDescription) { + return false; + } final l$status = status; final lOther$status = other.status; if (l$status != lOther$status) { @@ -3134,6 +3156,7 @@ abstract class CopyWith$Query$AllServices$services$allServices { bool? isMovable, bool? isRequired, bool? canBeBackedUp, + String? backupDescription, Enum$ServiceStatusEnum? status, Query$AllServices$services$allServices$storageUsage? storageUsage, String? svgIcon, @@ -3172,6 +3195,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices Object? isMovable = _undefined, Object? isRequired = _undefined, Object? canBeBackedUp = _undefined, + Object? backupDescription = _undefined, Object? status = _undefined, Object? storageUsage = _undefined, Object? svgIcon = _undefined, @@ -3201,6 +3225,10 @@ class _CopyWithImpl$Query$AllServices$services$allServices canBeBackedUp: canBeBackedUp == _undefined || canBeBackedUp == null ? _instance.canBeBackedUp : (canBeBackedUp as bool), + backupDescription: + backupDescription == _undefined || backupDescription == null + ? _instance.backupDescription + : (backupDescription as String), status: status == _undefined || status == null ? _instance.status : (status as Enum$ServiceStatusEnum), @@ -3251,6 +3279,7 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices bool? isMovable, bool? isRequired, bool? canBeBackedUp, + String? backupDescription, Enum$ServiceStatusEnum? status, Query$AllServices$services$allServices$storageUsage? storageUsage, String? svgIcon, diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 4df77d6f..d17316df 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; -import 'services.graphql.dart'; class Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields({ diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 61dcc576..6e34b410 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -30,6 +30,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { final BackupConfiguration? backupConfig = await api.getBackupsConfiguration(); final List backups = await api.getBackups(); + backups.sort((final a, final b) => b.time.compareTo(a.time)); emit( state.copyWith( backblazeBucket: bucket, @@ -144,6 +145,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future updateBackups({final bool useTimer = false}) async { emit(state.copyWith(refreshing: true)); final backups = await api.getBackups(); + backups.sort((final a, final b) => b.time.compareTo(a.time)); final backupConfig = await api.getBackupsConfiguration(); emit( diff --git a/lib/logic/cubit/backups/backups_state.dart b/lib/logic/cubit/backups/backups_state.dart index 988f669b..909e7f21 100644 --- a/lib/logic/cubit/backups/backups_state.dart +++ b/lib/logic/cubit/backups/backups_state.dart @@ -25,7 +25,7 @@ class BackupsState extends ServerInstallationDependendState { backups, preventActions, refreshTimer, - refreshing + refreshing, ]; BackupsState copyWith({ diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 086d527d..d79615e8 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -18,6 +18,7 @@ class Service { isRequired: service.isRequired, isMovable: service.isMovable, canBeBackedUp: service.canBeBackedUp, + backupDescription: service.backupDescription, status: ServiceStatus.fromGraphQL(service.status), storageUsage: ServiceStorageUsage( used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), @@ -44,6 +45,7 @@ class Service { required this.isRequired, required this.isMovable, required this.canBeBackedUp, + required this.backupDescription, required this.status, required this.storageUsage, required this.svgIcon, @@ -78,6 +80,7 @@ class Service { isRequired: false, isMovable: false, canBeBackedUp: false, + backupDescription: '', status: ServiceStatus.off, storageUsage: ServiceStorageUsage( used: const DiskSize(byte: 0), @@ -95,6 +98,7 @@ class Service { final bool isRequired; final bool isMovable; final bool canBeBackedUp; + final String backupDescription; final ServiceStatus status; final ServiceStorageUsage storageUsage; final String svgIcon; diff --git a/lib/ui/layouts/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart index e7b320c0..a7b8be74 100644 --- a/lib/ui/layouts/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -147,7 +147,8 @@ class _HeroSliverAppBarState extends State { context: context, useRootNavigator: true, isScrollControlled: true, - builder: (final BuildContext context) => DraggableScrollableSheet( + builder: (final BuildContext context) => + DraggableScrollableSheet( expand: false, maxChildSize: 0.9, minChildSize: 0.4, diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index b3fa2348..92491763 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -93,59 +93,88 @@ class _BackupDetailsPageState extends State // Each list item has a date // When clicked, starts the restore action if (isBackupInitialized) - OutlinedCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ListTile( + title: Text( + 'backups.latest_snapshots'.tr(), + style: Theme.of(context).textTheme.headlineSmall!.copyWith( + color: Theme.of(context).colorScheme.secondary, + ), + ), + subtitle: Text( + 'backups.latest_snapshots_subtitle'.tr(), + style: Theme.of(context).textTheme.labelMedium, + ), + ), + if (backups.isEmpty) ListTile( leading: const Icon( - Icons.refresh, - ), - title: Text( - 'backup.restore'.tr(), - style: Theme.of(context).textTheme.titleLarge, + Icons.error_outline, ), + title: Text('backup.no_backups'.tr()), ), - const Divider( - height: 1.0, - ), - if (backups.isEmpty) - ListTile( - leading: const Icon( - Icons.error_outline, - ), - title: Text('backup.no_backups'.tr()), - ), - if (backups.isNotEmpty) - Column( - children: backups - .map( - (final Backup backup) => ListTile( - onTap: preventActions - ? null - : () { - showPopUpAlert( - alertTitle: 'backup.restoring'.tr(), - description: 'backup.restore_alert'.tr( - args: [backup.time.toString()], - ), - actionButtonTitle: 'modals.yes'.tr(), - actionButtonOnPressed: () => { - context - .read() - .restoreBackup(backup.id) - }, - ); + if (backups.isNotEmpty) + Column( + children: backups.take(20).map( + (final Backup backup) { + final service = context + .read() + .state + .getServiceById(backup.serviceId); + return ListTile( + onTap: preventActions + ? null + : () { + showPopUpAlert( + alertTitle: 'backup.restoring'.tr(), + description: 'backup.restore_alert'.tr( + args: [backup.time.toString()], + ), + actionButtonTitle: 'modals.yes'.tr(), + actionButtonOnPressed: () => { + context + .read() + .restoreBackup(backup.id) }, - title: Text( - '${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}', - ), - ), - ) - .toList(), + ); + }, + title: Text( + '${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}', + ), + subtitle: Text( + service?.displayName ?? backup.fallbackServiceName, + ), + leading: service != null + ? SvgPicture.string( + service.svgIcon, + height: 24, + width: 24, + colorFilter: ColorFilter.mode( + Theme.of(context).colorScheme.onBackground, + BlendMode.srcIn, + ), + ) + : const Icon( + Icons.question_mark_outlined, + ), + ); + }, + ).toList(), + ), + if (backups.isNotEmpty && backups.length > 20) + ListTile( + title: Text( + 'backups.show_more'.tr(), + style: Theme.of(context).textTheme.labelMedium, ), - ], - ), + leading: const Icon( + Icons.arrow_drop_down, + ), + onTap: null, + ) + ], ), const SizedBox(height: 16), OutlinedCard( @@ -317,7 +346,7 @@ class _CreateBackupsModalState extends State { service.displayName, ), subtitle: Text( - busy ? 'backup.service_busy'.tr() : service.description, + busy ? 'backup.service_busy'.tr() : service.backupDescription, ), secondary: SvgPicture.string( service.svgIcon, From a8bddaaeba61edc4e35be26b8af7c219e320f53e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 2 Jul 2023 14:41:54 +0300 Subject: [PATCH 556/732] style: Reformatting --- .../server_installation/server_installation_repository.dart | 3 ++- lib/logic/cubit/server_jobs/server_jobs_state.dart | 6 ++++-- lib/ui/pages/more/app_settings/developer_settings.dart | 5 ++--- .../server_storage/binds_migration/services_migration.dart | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 2a6829e6..8ebe7c1a 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -176,7 +176,8 @@ class ServerInstallationRepository { await setDnsApiToken(token); return (await ProvidersController.currentDnsProvider!.getZoneId( domain, - )).data; + )) + .data; } Future> isDnsAddressesMatch( diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index 71732d67..2902ba3b 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -21,10 +21,12 @@ class ServerJobsState extends ServerInstallationDependendState { } } - List get backupJobList => serverJobList.where( + List get backupJobList => serverJobList + .where( // The backup jobs has the format of 'service..backup' (final job) => job.typeId.contains('backup'), - ).toList(); + ) + .toList(); bool get hasRemovableJobs => serverJobList.any( (final job) => diff --git a/lib/ui/pages/more/app_settings/developer_settings.dart b/lib/ui/pages/more/app_settings/developer_settings.dart index c2a34916..3c3addb4 100644 --- a/lib/ui/pages/more/app_settings/developer_settings.dart +++ b/lib/ui/pages/more/app_settings/developer_settings.dart @@ -44,11 +44,10 @@ class _DeveloperSettingsPageState extends State { ), SwitchListTile( title: Text('developer_settings.ignore_tls'.tr()), - subtitle: - Text('developer_settings.ignore_tls_description'.tr()), + subtitle: Text('developer_settings.ignore_tls_description'.tr()), value: TlsOptions.verifyCertificate, onChanged: (final bool value) => setState( - () => TlsOptions.verifyCertificate = value, + () => TlsOptions.verifyCertificate = value, ), ), Padding( diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index f7c26c88..f07c275e 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -179,7 +179,8 @@ class _ServicesMigrationPageState extends State { context: context, useRootNavigator: true, isScrollControlled: true, - builder: (final BuildContext context) => DraggableScrollableSheet( + builder: (final BuildContext context) => + DraggableScrollableSheet( expand: false, maxChildSize: 0.9, minChildSize: 0.4, From edb02764f78131ff16fcb0191e88625941d04502 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 2 Jul 2023 18:22:07 +0300 Subject: [PATCH 557/732] fix: GraphQL fragments deduplication --- .../graphql_maps/schema/backups.graphql.dart | 1 - .../graphql_maps/schema/disk_volumes.graphql | 6 - .../schema/disk_volumes.graphql.dart | 2278 ---------------- .../schema/server_api.graphql.dart | 1 - .../schema/server_settings.graphql | 6 - .../schema/server_settings.graphql.dart | 2280 +---------------- .../graphql_maps/schema/services.graphql | 6 - .../graphql_maps/schema/services.graphql.dart | 2279 ---------------- .../graphql_maps/schema/users.graphql | 6 - .../graphql_maps/schema/users.graphql.dart | 2280 +---------------- .../graphql_maps/server_api/server_api.dart | 8 +- 11 files changed, 9 insertions(+), 9142 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 14d1ab1a..428da3e4 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql index e1d562d2..76ba5475 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql @@ -1,9 +1,3 @@ -fragment basicMutationReturnFields on MutationReturnInterface{ - code - message - success -} - query GetServerDiskVolumes { storage { volumes { diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index aae28508..d448df1d 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -4,2284 +4,6 @@ import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; -class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields({ - required this.code, - required this.message, - required this.success, - required this.$__typename, - }); - - factory Fragment$basicMutationReturnFields.fromJson( - Map json) { - switch (json["__typename"] as String) { - case "ApiKeyMutationReturn": - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - .fromJson(json); - - case "AutoUpgradeSettingsMutationReturn": - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - .fromJson(json); - - case "DeviceApiTokenMutationReturn": - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - .fromJson(json); - - case "GenericBackupConfigReturn": - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - .fromJson(json); - - case "GenericJobMutationReturn": - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn - .fromJson(json); - - case "GenericMutationReturn": - return Fragment$basicMutationReturnFields$$GenericMutationReturn - .fromJson(json); - - case "ServiceJobMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - .fromJson(json); - - case "ServiceMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceMutationReturn - .fromJson(json); - - case "TimezoneMutationReturn": - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn - .fromJson(json); - - case "UserMutationReturn": - return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - json); - - default: - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields - on Fragment$basicMutationReturnFields { - CopyWith$Fragment$basicMutationReturnFields< - Fragment$basicMutationReturnFields> - get copyWith => CopyWith$Fragment$basicMutationReturnFields( - this, - (i) => i, - ); - _T when<_T>({ - required _T Function( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - apiKeyMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - autoUpgradeSettingsMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - deviceApiTokenMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - genericBackupConfigReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - genericJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericMutationReturn) - genericMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - serviceJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceMutationReturn) - serviceMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - timezoneMutationReturn, - required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - - case "AutoUpgradeSettingsMutationReturn": - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - - case "DeviceApiTokenMutationReturn": - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - - case "GenericBackupConfigReturn": - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - - case "GenericJobMutationReturn": - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - - case "GenericMutationReturn": - return genericMutationReturn( - this as Fragment$basicMutationReturnFields$$GenericMutationReturn); - - case "ServiceJobMutationReturn": - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - - case "ServiceMutationReturn": - return serviceMutationReturn( - this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - - case "TimezoneMutationReturn": - return timezoneMutationReturn( - this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - - case "UserMutationReturn": - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - - default: - return orElse(); - } - } - - _T maybeWhen<_T>({ - _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? - apiKeyMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? - autoUpgradeSettingsMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? - deviceApiTokenMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? - genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? - genericJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? - genericMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? - serviceJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? - serviceMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? - timezoneMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - if (apiKeyMutationReturn != null) { - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - } else { - return orElse(); - } - - case "AutoUpgradeSettingsMutationReturn": - if (autoUpgradeSettingsMutationReturn != null) { - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - } else { - return orElse(); - } - - case "DeviceApiTokenMutationReturn": - if (deviceApiTokenMutationReturn != null) { - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - } else { - return orElse(); - } - - case "GenericBackupConfigReturn": - if (genericBackupConfigReturn != null) { - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - } else { - return orElse(); - } - - case "GenericJobMutationReturn": - if (genericJobMutationReturn != null) { - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - } else { - return orElse(); - } - - case "GenericMutationReturn": - if (genericMutationReturn != null) { - return genericMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericMutationReturn); - } else { - return orElse(); - } - - case "ServiceJobMutationReturn": - if (serviceJobMutationReturn != null) { - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - } else { - return orElse(); - } - - case "ServiceMutationReturn": - if (serviceMutationReturn != null) { - return serviceMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - } else { - return orElse(); - } - - case "TimezoneMutationReturn": - if (timezoneMutationReturn != null) { - return timezoneMutationReturn(this - as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - } else { - return orElse(); - } - - case "UserMutationReturn": - if (userMutationReturn != null) { - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - } else { - return orElse(); - } - - default: - return orElse(); - } - } -} - -abstract class CopyWith$Fragment$basicMutationReturnFields { - factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields; - - factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields _instance; - - final TRes Function(Fragment$basicMutationReturnFields) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false, - )), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - ]), -); -const documentNodeFragmentbasicMutationReturnFields = - DocumentNode(definitions: [ - fragmentDefinitionbasicMutationReturnFields, -]); - -extension ClientExtension$Fragment$basicMutationReturnFields - on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields({ - required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true, - }) => - this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - data: data.toJson(), - broadcast: broadcast, - ); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ - required Map idFields, - bool optimistic = true, - }) { - final result = this.readFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - optimistic: optimistic, - ); - return result == null - ? null - : Fragment$basicMutationReturnFields.fromJson(result); - } -} - -class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ApiKeyMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'AutoUpgradeSettingsMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - instance, - TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'DeviceApiTokenMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, - TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericBackupConfigReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn - on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - Fragment$basicMutationReturnFields$$GenericJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn - on Fragment$basicMutationReturnFields$$GenericMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - Fragment$basicMutationReturnFields$$GenericMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - Fragment$basicMutationReturnFields$$GenericMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn - on Fragment$basicMutationReturnFields$$ServiceMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - Fragment$basicMutationReturnFields$$ServiceMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$TimezoneMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'TimezoneMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn - on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - Fragment$basicMutationReturnFields$$TimezoneMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$UserMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$UserMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'UserMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$UserMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn - on Fragment$basicMutationReturnFields$$UserMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - Fragment$basicMutationReturnFields$$UserMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - Fragment$basicMutationReturnFields$$UserMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$UserMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - class Query$GetServerDiskVolumes { Query$GetServerDiskVolumes({ required this.storage, diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index eaddf55b..3fed1110 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:selfprivacy/utils/scalars.dart'; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql index a33a5fef..f0fbedd6 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql @@ -1,9 +1,3 @@ -fragment basicMutationReturnFields on MutationReturnInterface{ - code - message - success -} - query SystemSettings { system { settings { diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart index ae8aabcb..bcc677e8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -1,2286 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; - -class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields({ - required this.code, - required this.message, - required this.success, - required this.$__typename, - }); - - factory Fragment$basicMutationReturnFields.fromJson( - Map json) { - switch (json["__typename"] as String) { - case "ApiKeyMutationReturn": - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - .fromJson(json); - - case "AutoUpgradeSettingsMutationReturn": - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - .fromJson(json); - - case "DeviceApiTokenMutationReturn": - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - .fromJson(json); - - case "GenericBackupConfigReturn": - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - .fromJson(json); - - case "GenericJobMutationReturn": - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn - .fromJson(json); - - case "GenericMutationReturn": - return Fragment$basicMutationReturnFields$$GenericMutationReturn - .fromJson(json); - - case "ServiceJobMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - .fromJson(json); - - case "ServiceMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceMutationReturn - .fromJson(json); - - case "TimezoneMutationReturn": - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn - .fromJson(json); - - case "UserMutationReturn": - return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - json); - - default: - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields - on Fragment$basicMutationReturnFields { - CopyWith$Fragment$basicMutationReturnFields< - Fragment$basicMutationReturnFields> - get copyWith => CopyWith$Fragment$basicMutationReturnFields( - this, - (i) => i, - ); - _T when<_T>({ - required _T Function( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - apiKeyMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - autoUpgradeSettingsMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - deviceApiTokenMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - genericBackupConfigReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - genericJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericMutationReturn) - genericMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - serviceJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceMutationReturn) - serviceMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - timezoneMutationReturn, - required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - - case "AutoUpgradeSettingsMutationReturn": - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - - case "DeviceApiTokenMutationReturn": - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - - case "GenericBackupConfigReturn": - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - - case "GenericJobMutationReturn": - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - - case "GenericMutationReturn": - return genericMutationReturn( - this as Fragment$basicMutationReturnFields$$GenericMutationReturn); - - case "ServiceJobMutationReturn": - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - - case "ServiceMutationReturn": - return serviceMutationReturn( - this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - - case "TimezoneMutationReturn": - return timezoneMutationReturn( - this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - - case "UserMutationReturn": - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - - default: - return orElse(); - } - } - - _T maybeWhen<_T>({ - _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? - apiKeyMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? - autoUpgradeSettingsMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? - deviceApiTokenMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? - genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? - genericJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? - genericMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? - serviceJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? - serviceMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? - timezoneMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - if (apiKeyMutationReturn != null) { - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - } else { - return orElse(); - } - - case "AutoUpgradeSettingsMutationReturn": - if (autoUpgradeSettingsMutationReturn != null) { - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - } else { - return orElse(); - } - - case "DeviceApiTokenMutationReturn": - if (deviceApiTokenMutationReturn != null) { - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - } else { - return orElse(); - } - - case "GenericBackupConfigReturn": - if (genericBackupConfigReturn != null) { - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - } else { - return orElse(); - } - - case "GenericJobMutationReturn": - if (genericJobMutationReturn != null) { - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - } else { - return orElse(); - } - - case "GenericMutationReturn": - if (genericMutationReturn != null) { - return genericMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericMutationReturn); - } else { - return orElse(); - } - - case "ServiceJobMutationReturn": - if (serviceJobMutationReturn != null) { - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - } else { - return orElse(); - } - - case "ServiceMutationReturn": - if (serviceMutationReturn != null) { - return serviceMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - } else { - return orElse(); - } - - case "TimezoneMutationReturn": - if (timezoneMutationReturn != null) { - return timezoneMutationReturn(this - as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - } else { - return orElse(); - } - - case "UserMutationReturn": - if (userMutationReturn != null) { - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - } else { - return orElse(); - } - - default: - return orElse(); - } - } -} - -abstract class CopyWith$Fragment$basicMutationReturnFields { - factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields; - - factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields _instance; - - final TRes Function(Fragment$basicMutationReturnFields) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false, - )), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - ]), -); -const documentNodeFragmentbasicMutationReturnFields = - DocumentNode(definitions: [ - fragmentDefinitionbasicMutationReturnFields, -]); - -extension ClientExtension$Fragment$basicMutationReturnFields - on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields({ - required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true, - }) => - this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - data: data.toJson(), - broadcast: broadcast, - ); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ - required Map idFields, - bool optimistic = true, - }) { - final result = this.readFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - optimistic: optimistic, - ); - return result == null - ? null - : Fragment$basicMutationReturnFields.fromJson(result); - } -} - -class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ApiKeyMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'AutoUpgradeSettingsMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - instance, - TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'DeviceApiTokenMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, - TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericBackupConfigReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn - on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - Fragment$basicMutationReturnFields$$GenericJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn - on Fragment$basicMutationReturnFields$$GenericMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - Fragment$basicMutationReturnFields$$GenericMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - Fragment$basicMutationReturnFields$$GenericMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn - on Fragment$basicMutationReturnFields$$ServiceMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - Fragment$basicMutationReturnFields$$ServiceMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$TimezoneMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'TimezoneMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn - on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - Fragment$basicMutationReturnFields$$TimezoneMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$UserMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$UserMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'UserMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$UserMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn - on Fragment$basicMutationReturnFields$$UserMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - Fragment$basicMutationReturnFields$$UserMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - Fragment$basicMutationReturnFields$$UserMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$UserMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} +import 'server_api.graphql.dart'; class Fragment$fragmentDnsRecords { Fragment$fragmentDnsRecords({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index ee5ee245..a2430dcf 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -1,9 +1,3 @@ -fragment basicMutationReturnFields on MutationReturnInterface{ - code - message - success -} - query AllServices { services { allServices { diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart index 4d33f536..798167fd 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -1,2289 +1,10 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; import 'server_api.graphql.dart'; import 'server_settings.graphql.dart'; -class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields({ - required this.code, - required this.message, - required this.success, - required this.$__typename, - }); - - factory Fragment$basicMutationReturnFields.fromJson( - Map json) { - switch (json["__typename"] as String) { - case "ApiKeyMutationReturn": - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - .fromJson(json); - - case "AutoUpgradeSettingsMutationReturn": - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - .fromJson(json); - - case "DeviceApiTokenMutationReturn": - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - .fromJson(json); - - case "GenericBackupConfigReturn": - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - .fromJson(json); - - case "GenericJobMutationReturn": - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn - .fromJson(json); - - case "GenericMutationReturn": - return Fragment$basicMutationReturnFields$$GenericMutationReturn - .fromJson(json); - - case "ServiceJobMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - .fromJson(json); - - case "ServiceMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceMutationReturn - .fromJson(json); - - case "TimezoneMutationReturn": - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn - .fromJson(json); - - case "UserMutationReturn": - return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - json); - - default: - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields - on Fragment$basicMutationReturnFields { - CopyWith$Fragment$basicMutationReturnFields< - Fragment$basicMutationReturnFields> - get copyWith => CopyWith$Fragment$basicMutationReturnFields( - this, - (i) => i, - ); - _T when<_T>({ - required _T Function( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - apiKeyMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - autoUpgradeSettingsMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - deviceApiTokenMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - genericBackupConfigReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - genericJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericMutationReturn) - genericMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - serviceJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceMutationReturn) - serviceMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - timezoneMutationReturn, - required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - - case "AutoUpgradeSettingsMutationReturn": - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - - case "DeviceApiTokenMutationReturn": - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - - case "GenericBackupConfigReturn": - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - - case "GenericJobMutationReturn": - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - - case "GenericMutationReturn": - return genericMutationReturn( - this as Fragment$basicMutationReturnFields$$GenericMutationReturn); - - case "ServiceJobMutationReturn": - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - - case "ServiceMutationReturn": - return serviceMutationReturn( - this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - - case "TimezoneMutationReturn": - return timezoneMutationReturn( - this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - - case "UserMutationReturn": - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - - default: - return orElse(); - } - } - - _T maybeWhen<_T>({ - _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? - apiKeyMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? - autoUpgradeSettingsMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? - deviceApiTokenMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? - genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? - genericJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? - genericMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? - serviceJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? - serviceMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? - timezoneMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - if (apiKeyMutationReturn != null) { - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - } else { - return orElse(); - } - - case "AutoUpgradeSettingsMutationReturn": - if (autoUpgradeSettingsMutationReturn != null) { - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - } else { - return orElse(); - } - - case "DeviceApiTokenMutationReturn": - if (deviceApiTokenMutationReturn != null) { - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - } else { - return orElse(); - } - - case "GenericBackupConfigReturn": - if (genericBackupConfigReturn != null) { - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - } else { - return orElse(); - } - - case "GenericJobMutationReturn": - if (genericJobMutationReturn != null) { - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - } else { - return orElse(); - } - - case "GenericMutationReturn": - if (genericMutationReturn != null) { - return genericMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericMutationReturn); - } else { - return orElse(); - } - - case "ServiceJobMutationReturn": - if (serviceJobMutationReturn != null) { - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - } else { - return orElse(); - } - - case "ServiceMutationReturn": - if (serviceMutationReturn != null) { - return serviceMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - } else { - return orElse(); - } - - case "TimezoneMutationReturn": - if (timezoneMutationReturn != null) { - return timezoneMutationReturn(this - as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - } else { - return orElse(); - } - - case "UserMutationReturn": - if (userMutationReturn != null) { - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - } else { - return orElse(); - } - - default: - return orElse(); - } - } -} - -abstract class CopyWith$Fragment$basicMutationReturnFields { - factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields; - - factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields _instance; - - final TRes Function(Fragment$basicMutationReturnFields) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false, - )), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - ]), -); -const documentNodeFragmentbasicMutationReturnFields = - DocumentNode(definitions: [ - fragmentDefinitionbasicMutationReturnFields, -]); - -extension ClientExtension$Fragment$basicMutationReturnFields - on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields({ - required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true, - }) => - this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - data: data.toJson(), - broadcast: broadcast, - ); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ - required Map idFields, - bool optimistic = true, - }) { - final result = this.readFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - optimistic: optimistic, - ); - return result == null - ? null - : Fragment$basicMutationReturnFields.fromJson(result); - } -} - -class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ApiKeyMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'AutoUpgradeSettingsMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - instance, - TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'DeviceApiTokenMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, - TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericBackupConfigReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn - on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - Fragment$basicMutationReturnFields$$GenericJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn - on Fragment$basicMutationReturnFields$$GenericMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - Fragment$basicMutationReturnFields$$GenericMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - Fragment$basicMutationReturnFields$$GenericMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn - on Fragment$basicMutationReturnFields$$ServiceMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - Fragment$basicMutationReturnFields$$ServiceMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$TimezoneMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'TimezoneMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn - on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - Fragment$basicMutationReturnFields$$TimezoneMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$UserMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$UserMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'UserMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$UserMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn - on Fragment$basicMutationReturnFields$$UserMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - Fragment$basicMutationReturnFields$$UserMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - Fragment$basicMutationReturnFields$$UserMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$UserMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - class Query$AllServices { Query$AllServices({ required this.services, diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql b/lib/logic/api_maps/graphql_maps/schema/users.graphql index 78de71ff..7ce64f8a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql @@ -1,9 +1,3 @@ -fragment basicMutationReturnFields on MutationReturnInterface{ - code - message - success -} - fragment userFields on User{ username userType diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index d17316df..5d86dc05 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -1,2286 +1,8 @@ import 'dart:async'; -import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'schema.graphql.dart'; - -class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields({ - required this.code, - required this.message, - required this.success, - required this.$__typename, - }); - - factory Fragment$basicMutationReturnFields.fromJson( - Map json) { - switch (json["__typename"] as String) { - case "ApiKeyMutationReturn": - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - .fromJson(json); - - case "AutoUpgradeSettingsMutationReturn": - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - .fromJson(json); - - case "DeviceApiTokenMutationReturn": - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - .fromJson(json); - - case "GenericBackupConfigReturn": - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - .fromJson(json); - - case "GenericJobMutationReturn": - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn - .fromJson(json); - - case "GenericMutationReturn": - return Fragment$basicMutationReturnFields$$GenericMutationReturn - .fromJson(json); - - case "ServiceJobMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - .fromJson(json); - - case "ServiceMutationReturn": - return Fragment$basicMutationReturnFields$$ServiceMutationReturn - .fromJson(json); - - case "TimezoneMutationReturn": - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn - .fromJson(json); - - case "UserMutationReturn": - return Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - json); - - default: - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields - on Fragment$basicMutationReturnFields { - CopyWith$Fragment$basicMutationReturnFields< - Fragment$basicMutationReturnFields> - get copyWith => CopyWith$Fragment$basicMutationReturnFields( - this, - (i) => i, - ); - _T when<_T>({ - required _T Function( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - apiKeyMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - autoUpgradeSettingsMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - deviceApiTokenMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - genericBackupConfigReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - genericJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$GenericMutationReturn) - genericMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - serviceJobMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$ServiceMutationReturn) - serviceMutationReturn, - required _T Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - timezoneMutationReturn, - required _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - - case "AutoUpgradeSettingsMutationReturn": - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - - case "DeviceApiTokenMutationReturn": - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - - case "GenericBackupConfigReturn": - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - - case "GenericJobMutationReturn": - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - - case "GenericMutationReturn": - return genericMutationReturn( - this as Fragment$basicMutationReturnFields$$GenericMutationReturn); - - case "ServiceJobMutationReturn": - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - - case "ServiceMutationReturn": - return serviceMutationReturn( - this as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - - case "TimezoneMutationReturn": - return timezoneMutationReturn( - this as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - - case "UserMutationReturn": - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - - default: - return orElse(); - } - } - - _T maybeWhen<_T>({ - _T Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn)? - apiKeyMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn)? - autoUpgradeSettingsMutationReturn, - _T Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? - deviceApiTokenMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? - genericBackupConfigReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn)? - genericJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? - genericMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn)? - serviceJobMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn)? - serviceMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn)? - timezoneMutationReturn, - _T Function(Fragment$basicMutationReturnFields$$UserMutationReturn)? - userMutationReturn, - required _T Function() orElse, - }) { - switch ($__typename) { - case "ApiKeyMutationReturn": - if (apiKeyMutationReturn != null) { - return apiKeyMutationReturn( - this as Fragment$basicMutationReturnFields$$ApiKeyMutationReturn); - } else { - return orElse(); - } - - case "AutoUpgradeSettingsMutationReturn": - if (autoUpgradeSettingsMutationReturn != null) { - return autoUpgradeSettingsMutationReturn(this - as Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn); - } else { - return orElse(); - } - - case "DeviceApiTokenMutationReturn": - if (deviceApiTokenMutationReturn != null) { - return deviceApiTokenMutationReturn(this - as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); - } else { - return orElse(); - } - - case "GenericBackupConfigReturn": - if (genericBackupConfigReturn != null) { - return genericBackupConfigReturn(this - as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); - } else { - return orElse(); - } - - case "GenericJobMutationReturn": - if (genericJobMutationReturn != null) { - return genericJobMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericJobMutationReturn); - } else { - return orElse(); - } - - case "GenericMutationReturn": - if (genericMutationReturn != null) { - return genericMutationReturn(this - as Fragment$basicMutationReturnFields$$GenericMutationReturn); - } else { - return orElse(); - } - - case "ServiceJobMutationReturn": - if (serviceJobMutationReturn != null) { - return serviceJobMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceJobMutationReturn); - } else { - return orElse(); - } - - case "ServiceMutationReturn": - if (serviceMutationReturn != null) { - return serviceMutationReturn(this - as Fragment$basicMutationReturnFields$$ServiceMutationReturn); - } else { - return orElse(); - } - - case "TimezoneMutationReturn": - if (timezoneMutationReturn != null) { - return timezoneMutationReturn(this - as Fragment$basicMutationReturnFields$$TimezoneMutationReturn); - } else { - return orElse(); - } - - case "UserMutationReturn": - if (userMutationReturn != null) { - return userMutationReturn( - this as Fragment$basicMutationReturnFields$$UserMutationReturn); - } else { - return orElse(); - } - - default: - return orElse(); - } - } -} - -abstract class CopyWith$Fragment$basicMutationReturnFields { - factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, - TRes Function(Fragment$basicMutationReturnFields) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields; - - factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithImpl$Fragment$basicMutationReturnFields( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields _instance; - - final TRes Function(Fragment$basicMutationReturnFields) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields - implements CopyWith$Fragment$basicMutationReturnFields { - _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( - name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode( - on: NamedTypeNode( - name: NameNode(value: 'MutationReturnInterface'), - isNonNull: false, - )), - directives: [], - selectionSet: SelectionSetNode(selections: [ - FieldNode( - name: NameNode(value: 'code'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'message'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: 'success'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - FieldNode( - name: NameNode(value: '__typename'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - ]), -); -const documentNodeFragmentbasicMutationReturnFields = - DocumentNode(definitions: [ - fragmentDefinitionbasicMutationReturnFields, -]); - -extension ClientExtension$Fragment$basicMutationReturnFields - on graphql.GraphQLClient { - void writeFragment$basicMutationReturnFields({ - required Fragment$basicMutationReturnFields data, - required Map idFields, - bool broadcast = true, - }) => - this.writeFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - data: data.toJson(), - broadcast: broadcast, - ); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({ - required Map idFields, - bool optimistic = true, - }) { - final result = this.readFragment( - graphql.FragmentRequest( - idFields: idFields, - fragment: const graphql.Fragment( - fragmentName: 'basicMutationReturnFields', - document: documentNodeFragmentbasicMutationReturnFields, - ), - ), - optimistic: optimistic, - ); - return result == null - ? null - : Fragment$basicMutationReturnFields.fromJson(result); - } -} - -class Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ApiKeyMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn - on Fragment$basicMutationReturnFields$$ApiKeyMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - Fragment$basicMutationReturnFields$$ApiKeyMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ApiKeyMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ApiKeyMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'AutoUpgradeSettingsMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - on Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - instance, - TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then( - Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'DeviceApiTokenMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - on Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn instance, - TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn - _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericBackupConfigReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn - on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$GenericJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericJobMutationReturn - on Fragment$basicMutationReturnFields$$GenericJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - Fragment$basicMutationReturnFields$$GenericJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$GenericJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$GenericMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$GenericMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'GenericMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$GenericMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$GenericMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$GenericMutationReturn - on Fragment$basicMutationReturnFields$$GenericMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - Fragment$basicMutationReturnFields$$GenericMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn( - Fragment$basicMutationReturnFields$$GenericMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$GenericMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$GenericMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$GenericMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$GenericMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceJobMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn - on Fragment$basicMutationReturnFields$$ServiceJobMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceJobMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$ServiceJobMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceJobMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$ServiceMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$ServiceMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'ServiceMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$ServiceMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$ServiceMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$ServiceMutationReturn - on Fragment$basicMutationReturnFields$$ServiceMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - Fragment$basicMutationReturnFields$$ServiceMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - Fragment$basicMutationReturnFields$$ServiceMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$ServiceMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$ServiceMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$ServiceMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$ServiceMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$ServiceMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$TimezoneMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$TimezoneMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'TimezoneMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$TimezoneMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other - is Fragment$basicMutationReturnFields$$TimezoneMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$TimezoneMutationReturn - on Fragment$basicMutationReturnFields$$TimezoneMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - Fragment$basicMutationReturnFields$$TimezoneMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$TimezoneMutationReturn) - then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$TimezoneMutationReturn _instance; - - final TRes Function( - Fragment$basicMutationReturnFields$$TimezoneMutationReturn) _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$TimezoneMutationReturn< - TRes> { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$TimezoneMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} - -class Fragment$basicMutationReturnFields$$UserMutationReturn - implements Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields$$UserMutationReturn({ - required this.code, - required this.message, - required this.success, - this.$__typename = 'UserMutationReturn', - }); - - factory Fragment$basicMutationReturnFields$$UserMutationReturn.fromJson( - Map json) { - final l$code = json['code']; - final l$message = json['message']; - final l$success = json['success']; - final l$$__typename = json['__typename']; - return Fragment$basicMutationReturnFields$$UserMutationReturn( - code: (l$code as int), - message: (l$message as String), - success: (l$success as bool), - $__typename: (l$$__typename as String), - ); - } - - final int code; - - final String message; - - final bool success; - - final String $__typename; - - Map toJson() { - final _resultData = {}; - final l$code = code; - _resultData['code'] = l$code; - final l$message = message; - _resultData['message'] = l$message; - final l$success = success; - _resultData['success'] = l$success; - final l$$__typename = $__typename; - _resultData['__typename'] = l$$__typename; - return _resultData; - } - - @override - int get hashCode { - final l$code = code; - final l$message = message; - final l$success = success; - final l$$__typename = $__typename; - return Object.hashAll([ - l$code, - l$message, - l$success, - l$$__typename, - ]); - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (!(other is Fragment$basicMutationReturnFields$$UserMutationReturn) || - runtimeType != other.runtimeType) { - return false; - } - final l$code = code; - final lOther$code = other.code; - if (l$code != lOther$code) { - return false; - } - final l$message = message; - final lOther$message = other.message; - if (l$message != lOther$message) { - return false; - } - final l$success = success; - final lOther$success = other.success; - if (l$success != lOther$success) { - return false; - } - final l$$__typename = $__typename; - final lOther$$__typename = other.$__typename; - if (l$$__typename != lOther$$__typename) { - return false; - } - return true; - } -} - -extension UtilityExtension$Fragment$basicMutationReturnFields$$UserMutationReturn - on Fragment$basicMutationReturnFields$$UserMutationReturn { - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - Fragment$basicMutationReturnFields$$UserMutationReturn> - get copyWith => - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - this, - (i) => i, - ); -} - -abstract class CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> { - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn( - Fragment$basicMutationReturnFields$$UserMutationReturn instance, - TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) then, - ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - factory CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn.stub( - TRes res) = - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn; - - TRes call({ - int? code, - String? message, - bool? success, - String? $__typename, - }); -} - -class _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._instance, - this._then, - ); - - final Fragment$basicMutationReturnFields$$UserMutationReturn _instance; - - final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn) - _then; - - static const _undefined = {}; - - TRes call({ - Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined, - }) => - _then(Fragment$basicMutationReturnFields$$UserMutationReturn( - code: - code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null - ? _instance.message - : (message as String), - success: success == _undefined || success == null - ? _instance.success - : (success as bool), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String), - )); -} - -class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn< - TRes> - implements - CopyWith$Fragment$basicMutationReturnFields$$UserMutationReturn { - _CopyWithStubImpl$Fragment$basicMutationReturnFields$$UserMutationReturn( - this._res); - - TRes _res; - - call({ - int? code, - String? message, - bool? success, - String? $__typename, - }) => - _res; -} +import 'server_api.graphql.dart'; class Fragment$userFields { Fragment$userFields({ diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart index 91694945..bc28a681 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_api.dart @@ -35,7 +35,13 @@ part 'volume_api.dart'; part 'backups_api.dart'; class ServerApi extends GraphQLApiMap - with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi, BackupsApi { + with + VolumeApi, + JobsApi, + ServerActionsApi, + ServicesApi, + UsersApi, + BackupsApi { ServerApi({ this.hasLogger = false, this.isWithToken = true, From 290c4166c5e010c459da6fa8e0cb3bbe3f439ca2 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 2 Jul 2023 18:22:27 +0300 Subject: [PATCH 558/732] feat: Add pub:duration as a dependency --- pubspec.lock | 8 ++++++++ pubspec.yaml | 1 + 2 files changed, 9 insertions(+) diff --git a/pubspec.lock b/pubspec.lock index d812a890..05045a0a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -297,6 +297,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.1.2" + duration: + dependency: "direct main" + description: + name: duration + sha256: d0b29d0a345429e3986ac56d60e4aef65b37d11e653022b2b9a4b361332b777f + url: "https://pub.dev" + source: hosted + version: "3.0.12" dynamic_color: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 4e5e35d7..4fc007e8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,6 +15,7 @@ dependencies: cubit_form: ^2.0.1 device_info_plus: ^9.0.2 dio: ^5.1.2 + duration: 3.0.12 dynamic_color: ^1.6.5 easy_localization: ^3.0.2 either_option: ^2.0.1-dev.1 From 2b8d3ee6d0357fd08f28b318a0609929449b316f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 2 Jul 2023 18:23:12 +0300 Subject: [PATCH 559/732] refactor: Getters for backup-related jobs --- lib/logic/cubit/backups/backups_cubit.dart | 28 +++++++++++++++---- lib/logic/cubit/backups/backups_state.dart | 10 ++++++- .../cubit/server_jobs/server_jobs_state.dart | 3 +- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 6e34b410..ef3cec4d 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -35,7 +35,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { state.copyWith( backblazeBucket: bucket, isInitialized: backupConfig?.isInitialized, - autobackupPeriod: backupConfig?.autobackupPeriod, + autobackupPeriod: backupConfig?.autobackupPeriod ?? Duration.zero, backups: backups, preventActions: false, refreshing: false, @@ -164,8 +164,8 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future forceUpdateBackups() async { emit(state.copyWith(preventActions: true)); - await api.forceBackupListReload(); getIt().showSnackBar('backup.refetching_list'.tr()); + await api.forceBackupListReload(); emit(state.copyWith(preventActions: false)); } @@ -187,12 +187,30 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future restoreBackup(final String backupId) async { emit(state.copyWith(preventActions: true)); - - /// TOOD: ??? - //await api.restoreBackup(backupId); + await api.restoreBackup(backupId); emit(state.copyWith(preventActions: false)); } + Future setAutobackupPeriod(final Duration? period) async { + emit(state.copyWith(preventActions: true)); + final result = await api.setAutobackupPeriod(period: period?.inMinutes); + if (result.success == false) { + getIt() + .showSnackBar(result.message ?? 'Unknown error'); + emit(state.copyWith(preventActions: false)); + } else { + getIt() + .showSnackBar('backup.autobackup_period_set'.tr()); + emit( + state.copyWith( + preventActions: false, + autobackupPeriod: period ?? Duration.zero, + ), + ); + } + await updateBackups(); + } + @override void clear() async { emit(const BackupsState()); diff --git a/lib/logic/cubit/backups/backups_state.dart b/lib/logic/cubit/backups/backups_state.dart index 909e7f21..52b9b106 100644 --- a/lib/logic/cubit/backups/backups_state.dart +++ b/lib/logic/cubit/backups/backups_state.dart @@ -19,6 +19,10 @@ class BackupsState extends ServerInstallationDependendState { final Duration? autobackupPeriod; final BackblazeBucket? backblazeBucket; + List serviceBackups(final String serviceId) => backups + .where((final backup) => backup.serviceId == serviceId) + .toList(growable: false); + @override List get props => [ isInitialized, @@ -43,7 +47,11 @@ class BackupsState extends ServerInstallationDependendState { preventActions: preventActions ?? this.preventActions, refreshTimer: refreshTimer ?? this.refreshTimer, refreshing: refreshing ?? this.refreshing, - autobackupPeriod: autobackupPeriod ?? this.autobackupPeriod, + // The autobackupPeriod might be null, so if the duration is set to 0, we + // set it to null. + autobackupPeriod: autobackupPeriod?.inSeconds == 0 + ? null + : autobackupPeriod ?? this.autobackupPeriod, backblazeBucket: backblazeBucket ?? this.backblazeBucket, ); } diff --git a/lib/logic/cubit/server_jobs/server_jobs_state.dart b/lib/logic/cubit/server_jobs/server_jobs_state.dart index 2902ba3b..9a18dd51 100644 --- a/lib/logic/cubit/server_jobs/server_jobs_state.dart +++ b/lib/logic/cubit/server_jobs/server_jobs_state.dart @@ -24,7 +24,8 @@ class ServerJobsState extends ServerInstallationDependendState { List get backupJobList => serverJobList .where( // The backup jobs has the format of 'service..backup' - (final job) => job.typeId.contains('backup'), + (final job) => + job.typeId.contains('backup') || job.typeId.contains('restore'), ) .toList(); From df214a07bc34a27d58a0aea7e40d68bede850b0c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 2 Jul 2023 18:23:33 +0300 Subject: [PATCH 560/732] refactor: Remove unused utils, add duration formatter --- lib/utils/extensions/duration.dart | 30 +++++++++++--------------- lib/utils/route_transitions/basic.dart | 9 -------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/lib/utils/extensions/duration.dart b/lib/utils/extensions/duration.dart index 2c302fb8..0e20b07a 100644 --- a/lib/utils/extensions/duration.dart +++ b/lib/utils/extensions/duration.dart @@ -1,13 +1,12 @@ // ignore_for_file: unnecessary_this -extension DurationFormatter on Duration { - String toDayHourMinuteSecondFormat() => [ - this.inHours.remainder(24), - this.inMinutes.remainder(60), - this.inSeconds.remainder(60) - ].map((final int seg) => seg.toString().padLeft(2, '0')).join(':'); +import 'dart:ui'; - String toDayHourMinuteFormat() { +import 'package:duration/duration.dart'; +import 'package:duration/locale.dart'; + +extension DurationFormatter on Duration { + String toTimezoneOffsetFormat() { final designator = this >= Duration.zero ? '+' : '-'; final Iterable segments = [ @@ -18,15 +17,10 @@ extension DurationFormatter on Duration { return '$designator${segments.first}:${segments.last}'; } -// WAT: https://flutterigniter.com/how-to-format-duration/ - String toHoursMinutesSecondsFormat() => - this.toString().split('.').first.padLeft(8, '0'); - - String toDayHourMinuteFormat2() { - final Iterable segments = [ - this.inHours.remainder(24), - this.inMinutes.remainder(60), - ].map((final int seg) => seg.toString().padLeft(2, '0')); - return '${segments.first} h ${segments.last} min'; - } + String toPrettyString(final Locale locale) => + prettyDuration(this, locale: getDurationLocale(locale)); } + +DurationLocale getDurationLocale(final Locale locale) => + DurationLocale.fromLanguageCode(locale.languageCode) ?? + const EnglishDurationLocale(); diff --git a/lib/utils/route_transitions/basic.dart b/lib/utils/route_transitions/basic.dart index a3148e1d..b72d9a94 100644 --- a/lib/utils/route_transitions/basic.dart +++ b/lib/utils/route_transitions/basic.dart @@ -3,12 +3,3 @@ import 'package:flutter/material.dart'; Route materialRoute(final Widget widget) => MaterialPageRoute( builder: (final BuildContext context) => widget, ); - -Route noAnimationRoute(final Widget widget) => PageRouteBuilder( - pageBuilder: ( - final BuildContext context, - final Animation animation1, - final Animation animation2, - ) => - widget, - ); From a4dbba096875283ed2c59b346dda4d0237249299 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 2 Jul 2023 18:24:07 +0300 Subject: [PATCH 561/732] feat(backups): Backups screens --- assets/translations/en.json | 26 +- .../backup_details.dart | 352 ++++----- lib/ui/pages/backups/backups_list.dart | 85 +++ lib/ui/pages/backups/change_period_modal.dart | 108 +++ .../pages/backups/create_backups_modal.dart | 161 +++++ .../server_details/time_zone/time_zone.dart | 4 +- lib/ui/pages/services/service_page.dart | 13 + lib/ui/router/router.dart | 6 +- lib/ui/router/router.gr.dart | 668 ++++++++++-------- 9 files changed, 901 insertions(+), 522 deletions(-) rename lib/ui/pages/{backup_details => backups}/backup_details.dart (55%) create mode 100644 lib/ui/pages/backups/backups_list.dart create mode 100644 lib/ui/pages/backups/change_period_modal.dart create mode 100644 lib/ui/pages/backups/create_backups_modal.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 4ca6159a..70756bfa 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -162,6 +162,7 @@ }, "backup": { "card_title": "Backup", + "card_subtitle": "Manage your backups", "description": "Will save your day in case of incident: hackers attack, server deletion, etc.", "reupload_key": "Force reupload key", "reuploaded_key": "Key reuploaded", @@ -176,7 +177,27 @@ "restore_alert": "You are about to restore from backup created on {}. All current data will be lost. Are you sure?", "refresh": "Refresh status", "refetch_backups": "Refetch backup list", - "refetching_list": "In a few minutes list will be updated" + "refetch_backups_subtitle": "Invalidate cache and refetch data from your storage provider. May cause additional charges.", + "reupload_key_subtitle": "Will instruct the server to initialize backup storage again. Use if something is broken.", + "refetching_list": "In a few minutes list will be updated", + "select_all": "Backup everything", + "create_new_select_heading": "Select what to backup", + "start": "Start backup", + "service_busy": "Another backup operation is in progress", + "latest_snapshots": "Latest snapshots", + "latest_snapshots_subtitle": "Showing last 15 snapshots", + "show_more": "Show more", + "autobackup_period_title": "Automatic backups period", + "autobackup_period_subtitle": "Backups created every {period}", + "autobackup_period_never": "Automatic backups are disabled", + "autobackup_period_every": "Every {period}", + "autobackup_period_disable": "Disable automatic backups", + "autobackup_custom": "Custom", + "autobackup_custom_hint": "Enter custom period in minutes", + "autobackup_set_period": "Set period", + "autobackup_period_set": "Period set", + "pending_jobs": "Currently running backup jobs", + "snapshots_title": "Snapshot list" }, "storage": { "card_title": "Server Storage", @@ -210,6 +231,7 @@ "enable": "Enable service", "move": "Move to another volume", "uses": "Uses {usage} on {volume}", + "snapshots": "Backup snapshots", "status": { "active": "Up and running", "inactive": "Stopped", @@ -514,4 +536,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} \ No newline at end of file +} diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backups/backup_details.dart similarity index 55% rename from lib/ui/pages/backup_details/backup_details.dart rename to lib/ui/pages/backups/backup_details.dart index 92491763..0e23e2fe 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -11,10 +11,14 @@ import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; +import 'package:selfprivacy/ui/pages/backups/change_period_modal.dart'; +import 'package:selfprivacy/ui/pages/backups/create_backups_modal.dart'; +import 'package:selfprivacy/ui/router/router.dart'; +import 'package:selfprivacy/utils/extensions/duration.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -43,13 +47,30 @@ class _BackupDetailsPageState extends State final bool refreshing = context.watch().state.refreshing; final List services = context.watch().state.servicesThatCanBeBackedUp; + final Duration? autobackupPeriod = + context.watch().state.autobackupPeriod; + final List backupJobs = context + .watch() + .state + .backupJobList + .where((final job) => job.status != JobStatusEnum.finished) + .toList(); - return BrandHeroScreen( - heroIcon: BrandIcons.save, - heroTitle: 'backup.card_title'.tr(), - heroSubtitle: 'backup.description'.tr(), - children: [ - if (isReady && !isBackupInitialized) + if (!isReady) { + return BrandHeroScreen( + heroIcon: BrandIcons.save, + heroTitle: 'backup.card_title'.tr(), + heroSubtitle: 'not_ready_card.in_menu'.tr(), + children: const [], + ); + } + + if (!isBackupInitialized) { + return BrandHeroScreen( + heroIcon: BrandIcons.save, + heroTitle: 'backup.card_title'.tr(), + heroSubtitle: 'backup.description'.tr(), + children: [ BrandButton.rised( onPressed: preventActions ? null @@ -58,11 +79,19 @@ class _BackupDetailsPageState extends State }, text: 'backup.initialize'.tr(), ), + ], + ); + } + + return BrandHeroScreen( + heroIcon: BrandIcons.save, + heroTitle: 'backup.card_title'.tr(), + heroSubtitle: 'backup.description'.tr(), + children: [ ListTile( onTap: preventActions ? null : () { - // await context.read().createBackup(); showModalBottomSheet( useRootNavigator: true, context: context, @@ -88,7 +117,66 @@ class _BackupDetailsPageState extends State 'backup.create_new'.tr(), ), ), + ListTile( + onTap: preventActions + ? null + : () { + // await context.read().createBackup(); + showModalBottomSheet( + useRootNavigator: true, + context: context, + isScrollControlled: true, + builder: (final BuildContext context) => + DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.4, + initialChildSize: 0.6, + builder: (final context, final scrollController) => + ChangeAutobackupsPeriodModal( + scrollController: scrollController, + ), + ), + ); + }, + leading: const Icon( + Icons.manage_history_outlined, + ), + title: Text( + 'backup.autobackup_period_title'.tr(), + ), + subtitle: Text( + autobackupPeriod != null + ? 'backup.autobackup_period_subtitle'.tr( + namedArgs: { + 'period': autobackupPeriod.toPrettyString(context.locale) + }, + ) + : 'backup.autobackup_period_never'.tr(), + ), + ), const SizedBox(height: 16), + if (backupJobs.isNotEmpty) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ListTile( + title: Text( + 'backup.pending_jobs'.tr(), + style: Theme.of(context).textTheme.headlineSmall!.copyWith( + color: Theme.of(context).colorScheme.secondary, + ), + ), + ), + for (final job in backupJobs) + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: ServerJobCard( + serverJob: job, + ), + ), + ], + ), // Card with a list of existing backups // Each list item has a date // When clicked, starts the restore action @@ -98,13 +186,13 @@ class _BackupDetailsPageState extends State children: [ ListTile( title: Text( - 'backups.latest_snapshots'.tr(), + 'backup.latest_snapshots'.tr(), style: Theme.of(context).textTheme.headlineSmall!.copyWith( color: Theme.of(context).colorScheme.secondary, ), ), subtitle: Text( - 'backups.latest_snapshots_subtitle'.tr(), + 'backup.latest_snapshots_subtitle'.tr(), style: Theme.of(context).textTheme.labelMedium, ), ), @@ -117,7 +205,7 @@ class _BackupDetailsPageState extends State ), if (backups.isNotEmpty) Column( - children: backups.take(20).map( + children: backups.take(15).map( (final Backup backup) { final service = context .read() @@ -163,221 +251,71 @@ class _BackupDetailsPageState extends State }, ).toList(), ), - if (backups.isNotEmpty && backups.length > 20) + if (backups.isNotEmpty && backups.length > 15) ListTile( title: Text( - 'backups.show_more'.tr(), + 'backup.show_more'.tr(), style: Theme.of(context).textTheme.labelMedium, ), leading: const Icon( Icons.arrow_drop_down, ), - onTap: null, + onTap: () => + context.pushRoute(BackupsListRoute(service: null)), ) ], ), - const SizedBox(height: 16), - OutlinedCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + const SizedBox(height: 8), + const Divider(), + const SizedBox(height: 8), + ListTile( + title: Text( + 'backup.refresh'.tr(), + ), + onTap: refreshing + ? null + : () => {context.read().updateBackups()}, + enabled: !refreshing, + leading: const Icon( + Icons.refresh_outlined, + ), + ), + if (providerState != StateType.uninitialized) + Column( children: [ ListTile( title: Text( - 'backup.refresh'.tr(), + 'backup.refetch_backups'.tr(), ), - onTap: refreshing + subtitle: Text( + 'backup.refetch_backups_subtitle'.tr(), + ), + leading: const Icon( + Icons.cached_outlined, + ), + onTap: preventActions ? null - : () => {context.read().updateBackups()}, - enabled: !refreshing, + : () => {context.read().forceUpdateBackups()}, ), - if (providerState != StateType.uninitialized) - Column( - children: [ - const Divider( - height: 1.0, - ), - ListTile( - title: Text( - 'backup.refetch_backups'.tr(), - ), - onTap: preventActions - ? null - : () => { - context - .read() - .forceUpdateBackups() - }, - ), - const Divider( - height: 1.0, - ), - ListTile( - title: Text( - 'backup.reupload_key'.tr(), - ), - onTap: preventActions - ? null - : () => {context.read().reuploadKey()}, - ), - ], + const SizedBox(height: 8), + const Divider(), + const SizedBox(height: 8), + ListTile( + title: Text( + 'backup.reupload_key'.tr(), ), + subtitle: Text( + 'backup.reupload_key_subtitle'.tr(), + ), + leading: const Icon( + Icons.warning_amber_outlined, + ), + onTap: preventActions + ? null + : () => {context.read().reuploadKey()}, + ), ], ), - ), - ], - ); - } -} - -class CreateBackupsModal extends StatefulWidget { - const CreateBackupsModal({ - required this.services, - required this.scrollController, - super.key, - }); - - final List services; - final ScrollController scrollController; - - @override - State createState() => _CreateBackupsModalState(); -} - -class _CreateBackupsModalState extends State { - // Store in state the selected services to backup - List selectedServices = []; - - // Select all services on modal open - @override - void initState() { - super.initState(); - final List busyServices = context - .read() - .state - .backupJobList - .where( - (final ServerJob job) => - job.status == JobStatusEnum.running || - job.status == JobStatusEnum.created, - ) - .map((final ServerJob job) => job.typeId.split('.')[1]) - .toList(); - selectedServices.addAll( - widget.services - .where((final Service service) => !busyServices.contains(service.id)), - ); - } - - @override - Widget build(final BuildContext context) { - final List busyServices = context - .watch() - .state - .backupJobList - .where( - (final ServerJob job) => - job.status == JobStatusEnum.running || - job.status == JobStatusEnum.created, - ) - .map((final ServerJob job) => job.typeId.split('.')[1]) - .toList(); - - return ListView( - controller: widget.scrollController, - padding: const EdgeInsets.all(16), - children: [ - const SizedBox(height: 16), - Text( - 'backup.create_new_select_heading'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - textAlign: TextAlign.center, - ), - const SizedBox(height: 16), - // Select all services tile - CheckboxListTile( - onChanged: (final bool? value) { - setState(() { - if (value ?? true) { - setState(() { - selectedServices.clear(); - selectedServices.addAll( - widget.services.where( - (final service) => !busyServices.contains(service.id), - ), - ); - }); - } else { - selectedServices.clear(); - } - }); - }, - title: Text( - 'backup.select_all'.tr(), - ), - secondary: const Icon( - Icons.checklist_outlined, - ), - value: selectedServices.length >= - widget.services.length - busyServices.length, - ), - const Divider( - height: 1.0, - ), - ...widget.services.map( - (final Service service) { - final bool busy = busyServices.contains(service.id); - return CheckboxListTile( - onChanged: !busy - ? (final bool? value) { - setState(() { - if (value ?? true) { - setState(() { - selectedServices.add(service); - }); - } else { - setState(() { - selectedServices.remove(service); - }); - } - }); - } - : null, - title: Text( - service.displayName, - ), - subtitle: Text( - busy ? 'backup.service_busy'.tr() : service.backupDescription, - ), - secondary: SvgPicture.string( - service.svgIcon, - height: 24, - width: 24, - colorFilter: ColorFilter.mode( - busy - ? Theme.of(context).colorScheme.outlineVariant - : Theme.of(context).colorScheme.onBackground, - BlendMode.srcIn, - ), - ), - value: selectedServices.contains(service), - ); - }, - ), - const SizedBox(height: 16), - // Create backup button - FilledButton( - onPressed: selectedServices.isEmpty - ? null - : () { - context - .read() - .createMultipleBackups(selectedServices); - Navigator.of(context).pop(); - }, - child: Text( - 'backup.start'.tr(), - ), - ), ], ); } diff --git a/lib/ui/pages/backups/backups_list.dart b/lib/ui/pages/backups/backups_list.dart new file mode 100644 index 00000000..5241693a --- /dev/null +++ b/lib/ui/pages/backups/backups_list.dart @@ -0,0 +1,85 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; +import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; +import 'package:selfprivacy/logic/models/backup.dart'; +import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; +import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; + +@RoutePage() +class BackupsListPage extends StatelessWidget { + const BackupsListPage({ + required this.service, + super.key, + }); + + final Service? service; + + @override + Widget build(final BuildContext context) { + // If the service is null, get all backups from state. If not null, call the + // serviceBackups(serviceId) on the backups state. + final List backups = service == null + ? context.watch().state.backups + : context.watch().state.serviceBackups(service!.id); + final bool preventActions = + context.watch().state.preventActions; + return BrandHeroScreen( + heroTitle: 'backup.snapshots_title'.tr(), + children: [ + if (backups.isEmpty) + Center( + child: Text( + 'backup.no_backups'.tr(), + ), + ) + else + ...backups.map((final Backup backup) { + final service = context + .read() + .state + .getServiceById(backup.serviceId); + return ListTile( + onTap: preventActions + ? null + : () { + showPopUpAlert( + alertTitle: 'backup.restoring'.tr(), + description: 'backup.restore_alert'.tr( + args: [backup.time.toString()], + ), + actionButtonTitle: 'modals.yes'.tr(), + actionButtonOnPressed: () => { + context.read().restoreBackup(backup.id) + }, + ); + }, + title: Text( + '${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}', + ), + subtitle: Text( + service?.displayName ?? backup.fallbackServiceName, + ), + leading: service != null + ? SvgPicture.string( + service.svgIcon, + height: 24, + width: 24, + colorFilter: ColorFilter.mode( + Theme.of(context).colorScheme.onBackground, + BlendMode.srcIn, + ), + ) + : const Icon( + Icons.question_mark_outlined, + ), + ); + }) + ], + ); + } +} diff --git a/lib/ui/pages/backups/change_period_modal.dart b/lib/ui/pages/backups/change_period_modal.dart new file mode 100644 index 00000000..f3fb2ce3 --- /dev/null +++ b/lib/ui/pages/backups/change_period_modal.dart @@ -0,0 +1,108 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/utils/extensions/duration.dart'; + +class ChangeAutobackupsPeriodModal extends StatefulWidget { + const ChangeAutobackupsPeriodModal({ + required this.scrollController, + super.key, + }); + + final ScrollController scrollController; + + @override + State createState() => + _ChangeAutobackupsPeriodModalState(); +} + +class _ChangeAutobackupsPeriodModalState + extends State { + // This is a modal with radio buttons to select the autobackup period + // Period might be none, selected from predefined list or custom + // Store in state the selected period + Duration? selectedPeriod; + + static const List autobackupPeriods = [ + Duration(hours: 12), + Duration(days: 1), + Duration(days: 2), + Duration(days: 3), + Duration(days: 7), + ]; + + // Set initial period to the one currently set + @override + void initState() { + super.initState(); + selectedPeriod = context.read().state.autobackupPeriod; + } + + @override + Widget build(final BuildContext context) { + final Duration? initialAutobackupPeriod = + context.watch().state.autobackupPeriod; + return ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.autobackup_period_title'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 16), + // Select all services tile + RadioListTile( + onChanged: (final Duration? value) { + setState(() { + selectedPeriod = value; + }); + }, + title: Text( + 'backup.autobackup_period_disable'.tr(), + ), + value: null, + groupValue: selectedPeriod, + ), + const Divider( + height: 1.0, + ), + ...autobackupPeriods.map( + (final Duration period) => RadioListTile( + onChanged: (final Duration? value) { + setState(() { + selectedPeriod = value; + }); + }, + title: Text( + 'backup.autobackup_period_every'.tr( + namedArgs: {'period': period.toPrettyString(context.locale)}, + ), + ), + value: period, + groupValue: selectedPeriod, + ), + ), + const SizedBox(height: 16), + // Create backup button + FilledButton( + onPressed: selectedPeriod == initialAutobackupPeriod + ? null + : () { + context + .read() + .setAutobackupPeriod(selectedPeriod); + Navigator.of(context).pop(); + }, + child: Text( + 'backup.autobackup_set_period'.tr(), + ), + ), + ], + ); + } +} diff --git a/lib/ui/pages/backups/create_backups_modal.dart b/lib/ui/pages/backups/create_backups_modal.dart new file mode 100644 index 00000000..3f461da1 --- /dev/null +++ b/lib/ui/pages/backups/create_backups_modal.dart @@ -0,0 +1,161 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; +import 'package:selfprivacy/logic/models/service.dart'; + +class CreateBackupsModal extends StatefulWidget { + const CreateBackupsModal({ + required this.services, + required this.scrollController, + super.key, + }); + + final List services; + final ScrollController scrollController; + + @override + State createState() => _CreateBackupsModalState(); +} + +class _CreateBackupsModalState extends State { + // Store in state the selected services to backup + List selectedServices = []; + + // Select all services on modal open + @override + void initState() { + super.initState(); + final List busyServices = context + .read() + .state + .backupJobList + .where( + (final ServerJob job) => + job.status == JobStatusEnum.running || + job.status == JobStatusEnum.created, + ) + .map((final ServerJob job) => job.typeId.split('.')[1]) + .toList(); + selectedServices.addAll( + widget.services + .where((final Service service) => !busyServices.contains(service.id)), + ); + } + + @override + Widget build(final BuildContext context) { + final List busyServices = context + .watch() + .state + .backupJobList + .where( + (final ServerJob job) => + job.status == JobStatusEnum.running || + job.status == JobStatusEnum.created, + ) + .map((final ServerJob job) => job.typeId.split('.')[1]) + .toList(); + + return ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.create_new_select_heading'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 16), + // Select all services tile + CheckboxListTile( + onChanged: (final bool? value) { + setState(() { + if (value ?? true) { + setState(() { + selectedServices.clear(); + selectedServices.addAll( + widget.services.where( + (final service) => !busyServices.contains(service.id), + ), + ); + }); + } else { + selectedServices.clear(); + } + }); + }, + title: Text( + 'backup.select_all'.tr(), + ), + secondary: const Icon( + Icons.checklist_outlined, + ), + value: selectedServices.length >= + widget.services.length - busyServices.length, + ), + const Divider( + height: 1.0, + ), + ...widget.services.map( + (final Service service) { + final bool busy = busyServices.contains(service.id); + return CheckboxListTile( + onChanged: !busy + ? (final bool? value) { + setState(() { + if (value ?? true) { + setState(() { + selectedServices.add(service); + }); + } else { + setState(() { + selectedServices.remove(service); + }); + } + }); + } + : null, + title: Text( + service.displayName, + ), + subtitle: Text( + busy ? 'backup.service_busy'.tr() : service.backupDescription, + ), + secondary: SvgPicture.string( + service.svgIcon, + height: 24, + width: 24, + colorFilter: ColorFilter.mode( + busy + ? Theme.of(context).colorScheme.outlineVariant + : Theme.of(context).colorScheme.onBackground, + BlendMode.srcIn, + ), + ), + value: selectedServices.contains(service), + ); + }, + ), + const SizedBox(height: 16), + // Create backup button + FilledButton( + onPressed: selectedServices.isEmpty + ? null + : () { + context + .read() + .createMultipleBackups(selectedServices); + Navigator.of(context).pop(); + }, + child: Text( + 'backup.start'.tr(), + ), + ), + ], + ); + } +} diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index 6863bfe8..5eb369bc 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -107,7 +107,7 @@ class _SelectTimezoneState extends State { Duration( milliseconds: location.currentTimeZone.offset, ) - .toDayHourMinuteFormat() + .toTimezoneOffsetFormat() .contains(timezoneFilterValue!), ) .toList() @@ -137,7 +137,7 @@ class _SelectTimezoneState extends State { location.name, ), subtitle: Text( - 'GMT ${duration.toDayHourMinuteFormat()} ${area.isNotEmpty ? '($area)' : ''}', + 'GMT ${duration.toTimezoneOffsetFormat()} ${area.isNotEmpty ? '($area)' : ''}', ), onTap: () { context.read().repository.setTimezone( diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 0c7beafb..0b713e79 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -141,6 +141,19 @@ class _ServicePageState extends State { ), enabled: !serviceDisabled && !serviceLocked, ), + if (service.canBeBackedUp) + ListTile( + iconColor: Theme.of(context).colorScheme.onBackground, + // Open page ServicesMigrationPage + onTap: () => context.pushRoute( + BackupsListRoute(service: service), + ), + leading: const Icon(Icons.settings_backup_restore_outlined), + title: Text( + 'service_page.snapshots'.tr(), + style: Theme.of(context).textTheme.titleMedium, + ), + ), ], ); } diff --git a/lib/ui/router/router.dart b/lib/ui/router/router.dart index af0743ca..764aacd7 100644 --- a/lib/ui/router/router.dart +++ b/lib/ui/router/router.dart @@ -3,7 +3,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; +import 'package:selfprivacy/ui/pages/backups/backup_details.dart'; +import 'package:selfprivacy/ui/pages/backups/backups_list.dart'; import 'package:selfprivacy/ui/pages/devices/devices.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; import 'package:selfprivacy/ui/pages/more/about_application.dart'; @@ -96,6 +97,7 @@ class RootRouter extends _$RootRouter { AutoRoute(page: ServerDetailsRoute.page), AutoRoute(page: DnsDetailsRoute.page), AutoRoute(page: BackupDetailsRoute.page), + AutoRoute(page: BackupsListRoute.page), AutoRoute(page: ServerStorageRoute.page), AutoRoute(page: ExtendingVolumeRoute.page), ], @@ -141,6 +143,8 @@ String getRouteTitle(final String routeName) { return 'server.card_title'; case 'BackupDetailsRoute': return 'backup.card_title'; + case 'BackupsListRoute': + return 'backup.snapshots_title'; case 'ServerStorageRoute': return 'storage.card_title'; case 'ExtendingVolumeRoute': diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index 6fbfd79b..ef06ccf6 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -15,16 +15,103 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { - BackupDetailsRoute.name: (routeData) { + DevicesRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const BackupDetailsPage(), + child: const DevicesScreen(), ); }, - RootRoute.name: (routeData) { + DnsDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: WrappedRoute(child: const RootPage()), + child: const DnsDetailsPage(), + ); + }, + AppSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AppSettingsPage(), + ); + }, + DeveloperSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DeveloperSettingsPage(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), + ); + }, + ProvidersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ProvidersPage(), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), + ); + }, + ServerDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServerDetailsScreen(), + ); + }, + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServicesMigrationPage( + services: args.services, + diskStatus: args.diskStatus, + isMigration: args.isMigration, + key: args.key, + ), + ); + }, + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServerStoragePage( + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + ExtendingVolumeRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ExtendingVolumePage( + diskVolumeToResize: args.diskVolumeToResize, + diskStatus: args.diskStatus, + key: args.key, + ), ); }, ServiceRoute.name: (routeData) { @@ -43,10 +130,16 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, - ServerDetailsRoute.name: (routeData) { + InitializingRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const ServerDetailsScreen(), + child: const InitializingPage(), + ); + }, + RecoveryRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryRouting(), ); }, UsersRoute.name: (routeData) { @@ -71,274 +164,59 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - AppSettingsRoute.name: (routeData) { + RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AppSettingsPage(), + child: WrappedRoute(child: const RootPage()), ); }, - DeveloperSettingsRoute.name: (routeData) { + BackupDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const DeveloperSettingsPage(), + child: const BackupDetailsPage(), ); }, - MoreRoute.name: (routeData) { + BackupsListRoute.name: (routeData) { + final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: const MorePage(), - ); - }, - AboutApplicationRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AboutApplicationPage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - ProvidersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ProvidersPage(), - ); - }, - RecoveryKeyRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryKeyPage(), - ); - }, - DnsDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DnsDetailsPage(), - ); - }, - RecoveryRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryRouting(), - ); - }, - InitializingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const InitializingPage(), - ); - }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServerStoragePage( - diskStatus: args.diskStatus, + child: BackupsListPage( + service: args.service, key: args.key, ), ); }, - ExtendingVolumeRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ExtendingVolumePage( - diskVolumeToResize: args.diskVolumeToResize, - diskStatus: args.diskStatus, - key: args.key, - ), - ); - }, - ServicesMigrationRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServicesMigrationPage( - services: args.services, - diskStatus: args.diskStatus, - isMigration: args.isMigration, - key: args.key, - ), - ); - }, - DevicesRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DevicesScreen(), - ); - }, - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), - ); - }, }; } /// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) : super( - BackupDetailsRoute.name, + DevicesRoute.name, initialChildren: children, ); - static const String name = 'BackupDetailsRoute'; + static const String name = 'DevicesRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute({List? children}) : super( - RootRoute.name, + DnsDetailsRoute.name, initialChildren: children, ); - static const String name = 'RootRoute'; + static const String name = 'DnsDetailsRoute'; static const PageInfo page = PageInfo(name); } -/// generated route for -/// [ServicePage] -class ServiceRoute extends PageRouteInfo { - ServiceRoute({ - required String serviceId, - Key? key, - List? children, - }) : super( - ServiceRoute.name, - args: ServiceRouteArgs( - serviceId: serviceId, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ServiceRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ServiceRouteArgs { - const ServiceRouteArgs({ - required this.serviceId, - this.key, - }); - - final String serviceId; - - final Key? key; - - @override - String toString() { - return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; - } -} - -/// generated route for -/// [ServicesPage] -class ServicesRoute extends PageRouteInfo { - const ServicesRoute({List? children}) - : super( - ServicesRoute.name, - initialChildren: children, - ); - - static const String name = 'ServicesRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) - : super( - ServerDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'ServerDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UsersPage] -class UsersRoute extends PageRouteInfo { - const UsersRoute({List? children}) - : super( - UsersRoute.name, - initialChildren: children, - ); - - static const String name = 'UsersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [NewUserPage] -class NewUserRoute extends PageRouteInfo { - const NewUserRoute({List? children}) - : super( - NewUserRoute.name, - initialChildren: children, - ); - - static const String name = 'NewUserRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UserDetailsPage] -class UserDetailsRoute extends PageRouteInfo { - UserDetailsRoute({ - required String login, - Key? key, - List? children, - }) : super( - UserDetailsRoute.name, - args: UserDetailsRouteArgs( - login: login, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'UserDetailsRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class UserDetailsRouteArgs { - const UserDetailsRouteArgs({ - required this.login, - this.key, - }); - - final String login; - - final Key? key; - - @override - String toString() { - return 'UserDetailsRouteArgs{login: $login, key: $key}'; - } -} - /// generated route for /// [AppSettingsPage] class AppSettingsRoute extends PageRouteInfo { @@ -367,20 +245,6 @@ class DeveloperSettingsRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [MorePage] -class MoreRoute extends PageRouteInfo { - const MoreRoute({List? children}) - : super( - MoreRoute.name, - initialChildren: children, - ); - - static const String name = 'MoreRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [AboutApplicationPage] class AboutApplicationRoute extends PageRouteInfo { @@ -395,6 +259,20 @@ class AboutApplicationRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute({List? children}) + : super( + MoreRoute.name, + initialChildren: children, + ); + + static const String name = 'MoreRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [ConsolePage] class ConsoleRoute extends PageRouteInfo { @@ -409,6 +287,20 @@ class ConsoleRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [ProvidersPage] class ProvidersRoute extends PageRouteInfo { @@ -438,45 +330,65 @@ class RecoveryKeyRoute extends PageRouteInfo { } /// generated route for -/// [DnsDetailsPage] -class DnsDetailsRoute extends PageRouteInfo { - const DnsDetailsRoute({List? children}) +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) : super( - DnsDetailsRoute.name, + ServerDetailsRoute.name, initialChildren: children, ); - static const String name = 'DnsDetailsRoute'; + static const String name = 'ServerDetailsRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [RecoveryRouting] -class RecoveryRoute extends PageRouteInfo { - const RecoveryRoute({List? children}) - : super( - RecoveryRoute.name, +/// [ServicesMigrationPage] +class ServicesMigrationRoute extends PageRouteInfo { + ServicesMigrationRoute({ + required List services, + required DiskStatus diskStatus, + required bool isMigration, + Key? key, + List? children, + }) : super( + ServicesMigrationRoute.name, + args: ServicesMigrationRouteArgs( + services: services, + diskStatus: diskStatus, + isMigration: isMigration, + key: key, + ), initialChildren: children, ); - static const String name = 'RecoveryRoute'; + static const String name = 'ServicesMigrationRoute'; - static const PageInfo page = PageInfo(name); + static const PageInfo page = + PageInfo(name); } -/// generated route for -/// [InitializingPage] -class InitializingRoute extends PageRouteInfo { - const InitializingRoute({List? children}) - : super( - InitializingRoute.name, - initialChildren: children, - ); +class ServicesMigrationRouteArgs { + const ServicesMigrationRouteArgs({ + required this.services, + required this.diskStatus, + required this.isMigration, + this.key, + }); - static const String name = 'InitializingRoute'; + final List services; - static const PageInfo page = PageInfo(name); + final DiskStatus diskStatus; + + final bool isMigration; + + final Key? key; + + @override + String toString() { + return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; + } } /// generated route for @@ -561,77 +473,213 @@ class ExtendingVolumeRouteArgs { } /// generated route for -/// [ServicesMigrationPage] -class ServicesMigrationRoute extends PageRouteInfo { - ServicesMigrationRoute({ - required List services, - required DiskStatus diskStatus, - required bool isMigration, +/// [ServicePage] +class ServiceRoute extends PageRouteInfo { + ServiceRoute({ + required String serviceId, Key? key, List? children, }) : super( - ServicesMigrationRoute.name, - args: ServicesMigrationRouteArgs( - services: services, - diskStatus: diskStatus, - isMigration: isMigration, + ServiceRoute.name, + args: ServiceRouteArgs( + serviceId: serviceId, key: key, ), initialChildren: children, ); - static const String name = 'ServicesMigrationRoute'; + static const String name = 'ServiceRoute'; - static const PageInfo page = - PageInfo(name); + static const PageInfo page = + PageInfo(name); } -class ServicesMigrationRouteArgs { - const ServicesMigrationRouteArgs({ - required this.services, - required this.diskStatus, - required this.isMigration, +class ServiceRouteArgs { + const ServiceRouteArgs({ + required this.serviceId, this.key, }); - final List services; - - final DiskStatus diskStatus; - - final bool isMigration; + final String serviceId; final Key? key; @override String toString() { - return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; + return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; } } /// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) +/// [ServicesPage] +class ServicesRoute extends PageRouteInfo { + const ServicesRoute({List? children}) : super( - DevicesRoute.name, + ServicesRoute.name, initialChildren: children, ); - static const String name = 'DevicesRoute'; + static const String name = 'ServicesRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute({List? children}) : super( - OnboardingRoute.name, + InitializingRoute.name, initialChildren: children, ); - static const String name = 'OnboardingRoute'; + static const String name = 'InitializingRoute'; static const PageInfo page = PageInfo(name); } + +/// generated route for +/// [RecoveryRouting] +class RecoveryRoute extends PageRouteInfo { + const RecoveryRoute({List? children}) + : super( + RecoveryRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UsersPage] +class UsersRoute extends PageRouteInfo { + const UsersRoute({List? children}) + : super( + UsersRoute.name, + initialChildren: children, + ); + + static const String name = 'UsersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [NewUserPage] +class NewUserRoute extends PageRouteInfo { + const NewUserRoute({List? children}) + : super( + NewUserRoute.name, + initialChildren: children, + ); + + static const String name = 'NewUserRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UserDetailsPage] +class UserDetailsRoute extends PageRouteInfo { + UserDetailsRoute({ + required String login, + Key? key, + List? children, + }) : super( + UserDetailsRoute.name, + args: UserDetailsRouteArgs( + login: login, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'UserDetailsRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class UserDetailsRouteArgs { + const UserDetailsRouteArgs({ + required this.login, + this.key, + }); + + final String login; + + final Key? key; + + @override + String toString() { + return 'UserDetailsRouteArgs{login: $login, key: $key}'; + } +} + +/// generated route for +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) + : super( + RootRoute.name, + initialChildren: children, + ); + + static const String name = 'RootRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) + : super( + BackupDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'BackupDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [BackupsListPage] +class BackupsListRoute extends PageRouteInfo { + BackupsListRoute({ + required Service? service, + Key? key, + List? children, + }) : super( + BackupsListRoute.name, + args: BackupsListRouteArgs( + service: service, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'BackupsListRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class BackupsListRouteArgs { + const BackupsListRouteArgs({ + required this.service, + this.key, + }); + + final Service? service; + + final Key? key; + + @override + String toString() { + return 'BackupsListRouteArgs{service: $service, key: $key}'; + } +} From 7d974159a238e1041e0a37c3d45cfb5c291f1713 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 3 Jul 2023 23:37:23 +0300 Subject: [PATCH 562/732] style(backups): Fix some UI issues of backup_details.dart --- lib/ui/pages/backups/backup_details.dart | 28 ++++++------------------ 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 0e23e2fe..e3fe427b 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -20,35 +20,25 @@ import 'package:selfprivacy/ui/pages/backups/create_backups_modal.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; -GlobalKey navigatorKey = GlobalKey(); - @RoutePage() -class BackupDetailsPage extends StatefulWidget { +class BackupDetailsPage extends StatelessWidget { const BackupDetailsPage({super.key}); - @override - State createState() => _BackupDetailsPageState(); -} - -class _BackupDetailsPageState extends State - with SingleTickerProviderStateMixin { @override Widget build(final BuildContext context) { final bool isReady = context.watch().state is ServerInstallationFinished; - final bool isBackupInitialized = - context.watch().state.isInitialized; + final BackupsState backupsState = context.watch().state; + final bool isBackupInitialized = backupsState.isInitialized; final StateType providerState = isReady && isBackupInitialized ? StateType.stable : StateType.uninitialized; - final bool preventActions = - context.watch().state.preventActions; - final List backups = context.watch().state.backups; - final bool refreshing = context.watch().state.refreshing; + final bool preventActions = backupsState.preventActions; + final List backups = backupsState.backups; + final bool refreshing = backupsState.refreshing; final List services = context.watch().state.servicesThatCanBeBackedUp; - final Duration? autobackupPeriod = - context.watch().state.autobackupPeriod; + final Duration? autobackupPeriod = backupsState.autobackupPeriod; final List backupJobs = context .watch() .state @@ -121,7 +111,6 @@ class _BackupDetailsPageState extends State onTap: preventActions ? null : () { - // await context.read().createBackup(); showModalBottomSheet( useRootNavigator: true, context: context, @@ -177,9 +166,6 @@ class _BackupDetailsPageState extends State ), ], ), - // Card with a list of existing backups - // Each list item has a date - // When clicked, starts the restore action if (isBackupInitialized) Column( crossAxisAlignment: CrossAxisAlignment.start, From 91b22f531e96d43aa010b803f7bb930677e24b8c Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 5 Jul 2023 06:34:35 -0300 Subject: [PATCH 563/732] refactor(dns-provider): Rearrange DNS Provider interface Move all implement functions accordingly to their position in interface --- .../providers/dns_providers/cloudflare.dart | 86 ++++---- lib/logic/providers/dns_providers/desec.dart | 208 +++++++++--------- .../dns_providers/digital_ocean_dns.dart | 84 +++---- .../providers/dns_providers/dns_provider.dart | 56 ++++- 4 files changed, 236 insertions(+), 198 deletions(-) diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index abd4f1ba..83d665b3 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -45,21 +45,40 @@ class CloudflareDnsProvider extends DnsProvider { } @override - Future> getZoneId(final String domain) async { - String? id; - final result = await _adapter.api().getZones(domain); + Future>> domainList() async { + List domains = []; + final result = await _adapter.api().getDomains(); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, - data: id, + data: domains, code: result.code, message: result.message, ); } - id = result.data[0]['id']; + domains = result.data + .map( + (final el) => el['name'] as String, + ) + .toList(); - return GenericResult(success: true, data: id); + return GenericResult( + success: true, + data: domains, + ); + } + + @override + Future> createDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) { + final records = getProjectDnsRecords(domain.domainName, ip4); + return _adapter.api().createMultipleDnsRecords( + domain: domain, + records: records, + ); } @override @@ -116,18 +135,6 @@ class CloudflareDnsProvider extends DnsProvider { ); } - @override - Future> createDomainRecords({ - required final ServerDomain domain, - final String? ip4, - }) { - final records = getProjectDnsRecords(domain.domainName, ip4); - return _adapter.api().createMultipleDnsRecords( - domain: domain, - records: records, - ); - } - @override Future> setDnsRecord( final DnsRecord record, @@ -138,31 +145,6 @@ class CloudflareDnsProvider extends DnsProvider { records: [record], ); - @override - Future>> domainList() async { - List domains = []; - final result = await _adapter.api().getDomains(); - if (result.data.isEmpty || !result.success) { - return GenericResult( - success: result.success, - data: domains, - code: result.code, - message: result.message, - ); - } - - domains = result.data - .map( - (final el) => el['name'] as String, - ) - .toList(); - - return GenericResult( - success: true, - data: domains, - ); - } - @override Future>> validateDnsRecords( final ServerDomain domain, @@ -353,4 +335,22 @@ class CloudflareDnsProvider extends DnsProvider { vpn ]; } + + @override + Future> getZoneId(final String domain) async { + String? id; + final result = await _adapter.api().getZones(domain); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: id, + code: result.code, + message: result.message, + ); + } + + id = result.data[0]['id']; + + return GenericResult(success: true, data: id); + } } diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index 7111c0ba..acf384c6 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -45,11 +45,57 @@ class DesecDnsProvider extends DnsProvider { } @override - Future> getZoneId(final String domain) async => - GenericResult( - data: domain, - success: true, + Future>> domainList() async { + List domains = []; + final result = await _adapter.api().getDomains(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: domains, + code: result.code, + message: result.message, ); + } + + domains = result.data + .map( + (final el) => el['name'] as String, + ) + .toList(); + + return GenericResult( + success: true, + data: domains, + ); + } + + @override + Future> createDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) async { + final List listDnsRecords = projectDnsRecords( + domain.domainName, + ip4, + ); + + final List bulkRecords = []; + for (final DnsRecord record in listDnsRecords) { + bulkRecords.add( + { + 'subname': record.name, + 'type': record.type, + 'ttl': record.ttl, + 'records': [extractContent(record)], + }, + ); + } + + return _adapter.api().createRecords( + domain: domain, + records: bulkRecords, + ); + } @override Future> removeDomainRecords({ @@ -128,81 +174,6 @@ class DesecDnsProvider extends DnsProvider { return GenericResult(success: true, data: records); } - List projectDnsRecords( - final String? domainName, - final String? ip4, - ) { - final DnsRecord domainA = DnsRecord(type: 'A', name: '', content: ip4); - - final DnsRecord mx = - DnsRecord(type: 'MX', name: '', content: '10 $domainName.'); - final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); - final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); - final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); - final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); - final DnsRecord passwordA = - DnsRecord(type: 'A', name: 'password', content: ip4); - final DnsRecord socialA = - DnsRecord(type: 'A', name: 'social', content: ip4); - final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); - - final DnsRecord txt1 = DnsRecord( - type: 'TXT', - name: '_dmarc', - content: '"v=DMARC1; p=none"', - ttl: 18000, - ); - - final DnsRecord txt2 = DnsRecord( - type: 'TXT', - name: '', - content: '"v=spf1 a mx ip4:$ip4 -all"', - ttl: 18000, - ); - - return [ - domainA, - apiA, - cloudA, - gitA, - meetA, - passwordA, - socialA, - mx, - txt1, - txt2, - vpn - ]; - } - - @override - Future> createDomainRecords({ - required final ServerDomain domain, - final String? ip4, - }) async { - final List listDnsRecords = projectDnsRecords( - domain.domainName, - ip4, - ); - - final List bulkRecords = []; - for (final DnsRecord record in listDnsRecords) { - bulkRecords.add( - { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, - ); - } - - return _adapter.api().createRecords( - domain: domain, - records: bulkRecords, - ); - } - @override Future> setDnsRecord( final DnsRecord record, @@ -235,31 +206,6 @@ class DesecDnsProvider extends DnsProvider { return content; } - @override - Future>> domainList() async { - List domains = []; - final result = await _adapter.api().getDomains(); - if (result.data.isEmpty || !result.success) { - return GenericResult( - success: result.success, - data: domains, - code: result.code, - message: result.message, - ); - } - - domains = result.data - .map( - (final el) => el['name'] as String, - ) - .toList(); - - return GenericResult( - success: true, - data: domains, - ); - } - @override Future>> validateDnsRecords( final ServerDomain domain, @@ -334,6 +280,53 @@ class DesecDnsProvider extends DnsProvider { ); } + List projectDnsRecords( + final String? domainName, + final String? ip4, + ) { + final DnsRecord domainA = DnsRecord(type: 'A', name: '', content: ip4); + + final DnsRecord mx = + DnsRecord(type: 'MX', name: '', content: '10 $domainName.'); + final DnsRecord apiA = DnsRecord(type: 'A', name: 'api', content: ip4); + final DnsRecord cloudA = DnsRecord(type: 'A', name: 'cloud', content: ip4); + final DnsRecord gitA = DnsRecord(type: 'A', name: 'git', content: ip4); + final DnsRecord meetA = DnsRecord(type: 'A', name: 'meet', content: ip4); + final DnsRecord passwordA = + DnsRecord(type: 'A', name: 'password', content: ip4); + final DnsRecord socialA = + DnsRecord(type: 'A', name: 'social', content: ip4); + final DnsRecord vpn = DnsRecord(type: 'A', name: 'vpn', content: ip4); + + final DnsRecord txt1 = DnsRecord( + type: 'TXT', + name: '_dmarc', + content: '"v=DMARC1; p=none"', + ttl: 18000, + ); + + final DnsRecord txt2 = DnsRecord( + type: 'TXT', + name: '', + content: '"v=spf1 a mx ip4:$ip4 -all"', + ttl: 18000, + ); + + return [ + domainA, + apiA, + cloudA, + gitA, + meetA, + passwordA, + socialA, + mx, + txt1, + txt2, + vpn + ]; + } + @override List getDesiredDnsRecords( final String? domainName, @@ -415,4 +408,11 @@ class DesecDnsProvider extends DnsProvider { ), ]; } + + @override + Future> getZoneId(final String domain) async => + GenericResult( + data: domain, + success: true, + ); } diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index 7f852a44..17e1a085 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -45,11 +45,42 @@ class DigitalOceanDnsProvider extends DnsProvider { } @override - Future> getZoneId(final String domain) async => - GenericResult( - data: domain, - success: true, + Future>> domainList() async { + List domains = []; + final result = await _adapter.api().domainList(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: domains, + code: result.code, + message: result.message, ); + } + + domains = result.data + .map( + (final el) => el['name'] as String, + ) + .toList(); + + return GenericResult( + success: true, + data: domains, + ); + } + + @override + Future> createDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }) async => + _adapter.api().createMultipleDnsRecords( + domain: domain, + records: getProjectDnsRecords( + domain.domainName, + ip4, + ), + ); @override Future> removeDomainRecords({ @@ -111,19 +142,6 @@ class DigitalOceanDnsProvider extends DnsProvider { return GenericResult(data: records, success: true); } - @override - Future> createDomainRecords({ - required final ServerDomain domain, - final String? ip4, - }) async => - _adapter.api().createMultipleDnsRecords( - domain: domain, - records: getProjectDnsRecords( - domain.domainName, - ip4, - ), - ); - @override Future> setDnsRecord( final DnsRecord record, @@ -134,31 +152,6 @@ class DigitalOceanDnsProvider extends DnsProvider { records: [record], ); - @override - Future>> domainList() async { - List domains = []; - final result = await _adapter.api().domainList(); - if (result.data.isEmpty || !result.success) { - return GenericResult( - success: result.success, - data: domains, - code: result.code, - message: result.message, - ); - } - - domains = result.data - .map( - (final el) => el['name'] as String, - ) - .toList(); - - return GenericResult( - success: true, - data: domains, - ); - } - @override Future>> validateDnsRecords( final ServerDomain domain, @@ -356,4 +349,11 @@ class DigitalOceanDnsProvider extends DnsProvider { ), ]; } + + @override + Future> getZoneId(final String domain) async => + GenericResult( + data: domain, + success: true, + ); } diff --git a/lib/logic/providers/dns_providers/dns_provider.dart b/lib/logic/providers/dns_providers/dns_provider.dart index e27c4b00..28517a83 100644 --- a/lib/logic/providers/dns_providers/dns_provider.dart +++ b/lib/logic/providers/dns_providers/dns_provider.dart @@ -16,31 +16,69 @@ abstract class DnsProvider { /// /// If success, saves it for future usage. Future> tryInitApiByToken(final String token); - Future> getZoneId(final String domain); - Future> removeDomainRecords({ - required final ServerDomain domain, - final String? ip4, - }); - Future>> getDnsRecords({ - required final ServerDomain domain, - }); + + /// Returns list of all available domain entries assigned to the account. + Future>> domainList(); + + /// Tries to create all main domain records needed + /// for SelfPrivacy to launch on requested domain by ip4. + /// + /// Doesn't check for duplication, cleaning has + /// to be done beforehand by [removeDomainRecords] Future> createDomainRecords({ required final ServerDomain domain, final String? ip4, }); + + /// Tries to remove all domain records of requested domain by ip4. + /// + /// Will remove all entries, including the ones + /// that weren't created by SelfPrivacy. + Future> removeDomainRecords({ + required final ServerDomain domain, + final String? ip4, + }); + + /// Returns list of all [DnsRecord] entries assigned to requested domain. + Future>> getDnsRecords({ + required final ServerDomain domain, + }); + + /// Tries to create or update a domain record needed + /// on requested domain. + /// + /// Doesn't check for duplication, cleaning has + /// to be done beforehand by [removeDomainRecords] Future> setDnsRecord( final DnsRecord record, final ServerDomain domain, ); - Future>> domainList(); + + /// Tries to check whether all known DNS records on the domain by ip4 + /// match expectations of SelfPrivacy in order to launch. + /// + /// Will return list of [DesiredDnsRecord] objects, which represent + /// only those records which have successfully passed validation. Future>> validateDnsRecords( final ServerDomain domain, final String ip4, final String dkimPublicKey, ); + + /// Will return list of [DesiredDnsRecord] objects, which represent + /// samples of perfect DNS records we need to know about in order to launch + /// SelfPrivacy application correctly. List getDesiredDnsRecords( final String? domainName, final String? ip4, final String? dkimPublicKey, ); + + /// Tries to access zone of requested domain. + /// + /// If a DNS provider doesn't support zones, + /// will return domain without any changes. + /// + /// If success, returns an initializing string of zone id. + Future> getZoneId(final String domain); } From eeb5dfc642d55f17511313e5ab36ce9eaf89aa11 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 10 Jul 2023 05:44:04 -0300 Subject: [PATCH 564/732] chore(ui): Update router.gr --- lib/ui/router/router.gr.dart | 660 +++++++++++++++++------------------ 1 file changed, 330 insertions(+), 330 deletions(-) diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index ef06ccf6..5bbd9c47 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -15,103 +15,10 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { - DevicesRoute.name: (routeData) { + RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const DevicesScreen(), - ); - }, - DnsDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DnsDetailsPage(), - ); - }, - AppSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AppSettingsPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - AboutApplicationRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AboutApplicationPage(), - ); - }, - MoreRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const MorePage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), - ); - }, - ProvidersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ProvidersPage(), - ); - }, - RecoveryKeyRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryKeyPage(), - ); - }, - ServerDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServerDetailsScreen(), - ); - }, - ServicesMigrationRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServicesMigrationPage( - services: args.services, - diskStatus: args.diskStatus, - isMigration: args.isMigration, - key: args.key, - ), - ); - }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServerStoragePage( - diskStatus: args.diskStatus, - key: args.key, - ), - ); - }, - ExtendingVolumeRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ExtendingVolumePage( - diskVolumeToResize: args.diskVolumeToResize, - diskStatus: args.diskStatus, - key: args.key, - ), + child: WrappedRoute(child: const RootPage()), ); }, ServiceRoute.name: (routeData) { @@ -130,16 +37,10 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, - InitializingRoute.name: (routeData) { + ServerDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const InitializingPage(), - ); - }, - RecoveryRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryRouting(), + child: const ServerDetailsScreen(), ); }, UsersRoute.name: (routeData) { @@ -164,16 +65,103 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - RootRoute.name: (routeData) { + AppSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: WrappedRoute(child: const RootPage()), + child: const AppSettingsPage(), ); }, - BackupDetailsRoute.name: (routeData) { + DeveloperSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const BackupDetailsPage(), + child: const DeveloperSettingsPage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + ProvidersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ProvidersPage(), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), + ); + }, + DnsDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DnsDetailsPage(), + ); + }, + RecoveryRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryRouting(), + ); + }, + InitializingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const InitializingPage(), + ); + }, + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServerStoragePage( + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + ExtendingVolumeRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ExtendingVolumePage( + diskVolumeToResize: args.diskVolumeToResize, + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServicesMigrationPage( + services: args.services, + diskStatus: args.diskStatus, + isMigration: args.isMigration, + key: args.key, + ), + ); + }, + DevicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DevicesScreen(), ); }, BackupsListRoute.name: (routeData) { @@ -186,37 +174,167 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, + BackupDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const BackupDetailsPage(), + ); + }, + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), + ); + }, }; } /// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) : super( - DevicesRoute.name, + RootRoute.name, initialChildren: children, ); - static const String name = 'DevicesRoute'; + static const String name = 'RootRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [DnsDetailsPage] -class DnsDetailsRoute extends PageRouteInfo { - const DnsDetailsRoute({List? children}) - : super( - DnsDetailsRoute.name, +/// [ServicePage] +class ServiceRoute extends PageRouteInfo { + ServiceRoute({ + required String serviceId, + Key? key, + List? children, + }) : super( + ServiceRoute.name, + args: ServiceRouteArgs( + serviceId: serviceId, + key: key, + ), initialChildren: children, ); - static const String name = 'DnsDetailsRoute'; + static const String name = 'ServiceRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServiceRouteArgs { + const ServiceRouteArgs({ + required this.serviceId, + this.key, + }); + + final String serviceId; + + final Key? key; + + @override + String toString() { + return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; + } +} + +/// generated route for +/// [ServicesPage] +class ServicesRoute extends PageRouteInfo { + const ServicesRoute({List? children}) + : super( + ServicesRoute.name, + initialChildren: children, + ); + + static const String name = 'ServicesRoute'; static const PageInfo page = PageInfo(name); } +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) + : super( + ServerDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'ServerDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UsersPage] +class UsersRoute extends PageRouteInfo { + const UsersRoute({List? children}) + : super( + UsersRoute.name, + initialChildren: children, + ); + + static const String name = 'UsersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [NewUserPage] +class NewUserRoute extends PageRouteInfo { + const NewUserRoute({List? children}) + : super( + NewUserRoute.name, + initialChildren: children, + ); + + static const String name = 'NewUserRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UserDetailsPage] +class UserDetailsRoute extends PageRouteInfo { + UserDetailsRoute({ + required String login, + Key? key, + List? children, + }) : super( + UserDetailsRoute.name, + args: UserDetailsRouteArgs( + login: login, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'UserDetailsRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class UserDetailsRouteArgs { + const UserDetailsRouteArgs({ + required this.login, + this.key, + }); + + final String login; + + final Key? key; + + @override + String toString() { + return 'UserDetailsRouteArgs{login: $login, key: $key}'; + } +} + /// generated route for /// [AppSettingsPage] class AppSettingsRoute extends PageRouteInfo { @@ -245,20 +363,6 @@ class DeveloperSettingsRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) - : super( - AboutApplicationRoute.name, - initialChildren: children, - ); - - static const String name = 'AboutApplicationRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [MorePage] class MoreRoute extends PageRouteInfo { @@ -273,6 +377,20 @@ class MoreRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [ConsolePage] class ConsoleRoute extends PageRouteInfo { @@ -287,20 +405,6 @@ class ConsoleRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) - : super( - OnboardingRoute.name, - initialChildren: children, - ); - - static const String name = 'OnboardingRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [ProvidersPage] class ProvidersRoute extends PageRouteInfo { @@ -330,65 +434,45 @@ class RecoveryKeyRoute extends PageRouteInfo { } /// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute({List? children}) : super( - ServerDetailsRoute.name, + DnsDetailsRoute.name, initialChildren: children, ); - static const String name = 'ServerDetailsRoute'; + static const String name = 'DnsDetailsRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [ServicesMigrationPage] -class ServicesMigrationRoute extends PageRouteInfo { - ServicesMigrationRoute({ - required List services, - required DiskStatus diskStatus, - required bool isMigration, - Key? key, - List? children, - }) : super( - ServicesMigrationRoute.name, - args: ServicesMigrationRouteArgs( - services: services, - diskStatus: diskStatus, - isMigration: isMigration, - key: key, - ), +/// [RecoveryRouting] +class RecoveryRoute extends PageRouteInfo { + const RecoveryRoute({List? children}) + : super( + RecoveryRoute.name, initialChildren: children, ); - static const String name = 'ServicesMigrationRoute'; + static const String name = 'RecoveryRoute'; - static const PageInfo page = - PageInfo(name); + static const PageInfo page = PageInfo(name); } -class ServicesMigrationRouteArgs { - const ServicesMigrationRouteArgs({ - required this.services, - required this.diskStatus, - required this.isMigration, - this.key, - }); +/// generated route for +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute({List? children}) + : super( + InitializingRoute.name, + initialChildren: children, + ); - final List services; + static const String name = 'InitializingRoute'; - final DiskStatus diskStatus; - - final bool isMigration; - - final Key? key; - - @override - String toString() { - return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; - } + static const PageInfo page = PageInfo(name); } /// generated route for @@ -473,175 +557,63 @@ class ExtendingVolumeRouteArgs { } /// generated route for -/// [ServicePage] -class ServiceRoute extends PageRouteInfo { - ServiceRoute({ - required String serviceId, +/// [ServicesMigrationPage] +class ServicesMigrationRoute extends PageRouteInfo { + ServicesMigrationRoute({ + required List services, + required DiskStatus diskStatus, + required bool isMigration, Key? key, List? children, }) : super( - ServiceRoute.name, - args: ServiceRouteArgs( - serviceId: serviceId, + ServicesMigrationRoute.name, + args: ServicesMigrationRouteArgs( + services: services, + diskStatus: diskStatus, + isMigration: isMigration, key: key, ), initialChildren: children, ); - static const String name = 'ServiceRoute'; + static const String name = 'ServicesMigrationRoute'; - static const PageInfo page = - PageInfo(name); + static const PageInfo page = + PageInfo(name); } -class ServiceRouteArgs { - const ServiceRouteArgs({ - required this.serviceId, +class ServicesMigrationRouteArgs { + const ServicesMigrationRouteArgs({ + required this.services, + required this.diskStatus, + required this.isMigration, this.key, }); - final String serviceId; + final List services; + + final DiskStatus diskStatus; + + final bool isMigration; final Key? key; @override String toString() { - return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; + return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; } } /// generated route for -/// [ServicesPage] -class ServicesRoute extends PageRouteInfo { - const ServicesRoute({List? children}) +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) : super( - ServicesRoute.name, + DevicesRoute.name, initialChildren: children, ); - static const String name = 'ServicesRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [InitializingPage] -class InitializingRoute extends PageRouteInfo { - const InitializingRoute({List? children}) - : super( - InitializingRoute.name, - initialChildren: children, - ); - - static const String name = 'InitializingRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [RecoveryRouting] -class RecoveryRoute extends PageRouteInfo { - const RecoveryRoute({List? children}) - : super( - RecoveryRoute.name, - initialChildren: children, - ); - - static const String name = 'RecoveryRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UsersPage] -class UsersRoute extends PageRouteInfo { - const UsersRoute({List? children}) - : super( - UsersRoute.name, - initialChildren: children, - ); - - static const String name = 'UsersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [NewUserPage] -class NewUserRoute extends PageRouteInfo { - const NewUserRoute({List? children}) - : super( - NewUserRoute.name, - initialChildren: children, - ); - - static const String name = 'NewUserRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UserDetailsPage] -class UserDetailsRoute extends PageRouteInfo { - UserDetailsRoute({ - required String login, - Key? key, - List? children, - }) : super( - UserDetailsRoute.name, - args: UserDetailsRouteArgs( - login: login, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'UserDetailsRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class UserDetailsRouteArgs { - const UserDetailsRouteArgs({ - required this.login, - this.key, - }); - - final String login; - - final Key? key; - - @override - String toString() { - return 'UserDetailsRouteArgs{login: $login, key: $key}'; - } -} - -/// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) - : super( - RootRoute.name, - initialChildren: children, - ); - - static const String name = 'RootRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) - : super( - BackupDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'BackupDetailsRoute'; + static const String name = 'DevicesRoute'; static const PageInfo page = PageInfo(name); } @@ -683,3 +655,31 @@ class BackupsListRouteArgs { return 'BackupsListRouteArgs{service: $service, key: $key}'; } } + +/// generated route for +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) + : super( + BackupDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'BackupDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; + + static const PageInfo page = PageInfo(name); +} From 70991e6bacb1d4e21912c1feabb89ff23ddef74d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 10 Jul 2023 05:44:56 -0300 Subject: [PATCH 565/732] chore(models): Add commentary for Hetzner Volume replicating Hetzner documentation --- lib/logic/models/json/hetzner_server_info.dart | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index b0706599..557f8ea7 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -137,6 +137,12 @@ class HetznerLocation { _$HetznerLocationFromJson(json); } +/// A Volume is a highly-available, scalable, and SSD-based block storage for Servers. +/// +/// Pricing for Volumes depends on the Volume size and Location, not the actual used storage. +/// +/// Please see Hetzner Docs for more details about Volumes. +/// https://docs.hetzner.cloud/#volumes @JsonSerializable() class HetznerVolume { HetznerVolume( @@ -146,11 +152,20 @@ class HetznerVolume { this.name, this.linuxDevice, ); + + /// ID of the Resource final int id; + + /// Size in GB of the Volume final int size; + + /// ID of the Server the Volume is attached to, null if it is not attached at all final int? serverId; + + /// Name of the Resource. Is unique per Project. final String name; + /// Device path on the file system for the Volume @JsonKey(name: 'linux_device') final String? linuxDevice; From aa5327df6ecc509f56dc8014d27dad94a0365061 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 10 Jul 2023 05:45:22 -0300 Subject: [PATCH 566/732] bug: Remove unused breaking isHidden field --- lib/logic/models/json/server_job.dart | 1 - lib/logic/models/json/server_job.g.dart | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 44fb2561..70d6d103 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -50,7 +50,6 @@ class ServerJob { final String? result; final String? statusText; final DateTime? finishedAt; - bool isHidden = false; } enum JobStatusEnum { diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart index 61ff259b..712c086f 100644 --- a/lib/logic/models/json/server_job.g.dart +++ b/lib/logic/models/json/server_job.g.dart @@ -21,7 +21,7 @@ ServerJob _$ServerJobFromJson(Map json) => ServerJob( finishedAt: json['finishedAt'] == null ? null : DateTime.parse(json['finishedAt'] as String), - )..isHidden = json['isHidden'] as bool; + ); Map _$ServerJobToJson(ServerJob instance) => { 'name': instance.name, @@ -36,7 +36,6 @@ Map _$ServerJobToJson(ServerJob instance) => { 'result': instance.result, 'statusText': instance.statusText, 'finishedAt': instance.finishedAt?.toIso8601String(), - 'isHidden': instance.isHidden, }; const _$JobStatusEnumEnumMap = { From c0d8d37989a36a4691d1b5f97ea69cb8b960dcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Mon, 10 Jul 2023 12:00:46 +0300 Subject: [PATCH 567/732] chore: Merge backups-testing to master - Remove unused breaking isHidden field - Add commentary for Hetzner Volume replicating Hetzner documentation - Update router.gr (when i ran build_runner this file changed for some reason) Co-authored-by: NaiJi Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/232 Reviewed-by: Inex Code --- .../models/json/hetzner_server_info.dart | 15 + lib/logic/models/json/server_job.dart | 1 - lib/logic/models/json/server_job.g.dart | 3 +- lib/ui/router/router.gr.dart | 660 +++++++++--------- 4 files changed, 346 insertions(+), 333 deletions(-) diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index b0706599..557f8ea7 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -137,6 +137,12 @@ class HetznerLocation { _$HetznerLocationFromJson(json); } +/// A Volume is a highly-available, scalable, and SSD-based block storage for Servers. +/// +/// Pricing for Volumes depends on the Volume size and Location, not the actual used storage. +/// +/// Please see Hetzner Docs for more details about Volumes. +/// https://docs.hetzner.cloud/#volumes @JsonSerializable() class HetznerVolume { HetznerVolume( @@ -146,11 +152,20 @@ class HetznerVolume { this.name, this.linuxDevice, ); + + /// ID of the Resource final int id; + + /// Size in GB of the Volume final int size; + + /// ID of the Server the Volume is attached to, null if it is not attached at all final int? serverId; + + /// Name of the Resource. Is unique per Project. final String name; + /// Device path on the file system for the Volume @JsonKey(name: 'linux_device') final String? linuxDevice; diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 44fb2561..70d6d103 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -50,7 +50,6 @@ class ServerJob { final String? result; final String? statusText; final DateTime? finishedAt; - bool isHidden = false; } enum JobStatusEnum { diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart index 61ff259b..712c086f 100644 --- a/lib/logic/models/json/server_job.g.dart +++ b/lib/logic/models/json/server_job.g.dart @@ -21,7 +21,7 @@ ServerJob _$ServerJobFromJson(Map json) => ServerJob( finishedAt: json['finishedAt'] == null ? null : DateTime.parse(json['finishedAt'] as String), - )..isHidden = json['isHidden'] as bool; + ); Map _$ServerJobToJson(ServerJob instance) => { 'name': instance.name, @@ -36,7 +36,6 @@ Map _$ServerJobToJson(ServerJob instance) => { 'result': instance.result, 'statusText': instance.statusText, 'finishedAt': instance.finishedAt?.toIso8601String(), - 'isHidden': instance.isHidden, }; const _$JobStatusEnumEnumMap = { diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index ef06ccf6..5bbd9c47 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -15,103 +15,10 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { - DevicesRoute.name: (routeData) { + RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const DevicesScreen(), - ); - }, - DnsDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DnsDetailsPage(), - ); - }, - AppSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AppSettingsPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - AboutApplicationRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AboutApplicationPage(), - ); - }, - MoreRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const MorePage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), - ); - }, - ProvidersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ProvidersPage(), - ); - }, - RecoveryKeyRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryKeyPage(), - ); - }, - ServerDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServerDetailsScreen(), - ); - }, - ServicesMigrationRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServicesMigrationPage( - services: args.services, - diskStatus: args.diskStatus, - isMigration: args.isMigration, - key: args.key, - ), - ); - }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServerStoragePage( - diskStatus: args.diskStatus, - key: args.key, - ), - ); - }, - ExtendingVolumeRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ExtendingVolumePage( - diskVolumeToResize: args.diskVolumeToResize, - diskStatus: args.diskStatus, - key: args.key, - ), + child: WrappedRoute(child: const RootPage()), ); }, ServiceRoute.name: (routeData) { @@ -130,16 +37,10 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, - InitializingRoute.name: (routeData) { + ServerDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const InitializingPage(), - ); - }, - RecoveryRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryRouting(), + child: const ServerDetailsScreen(), ); }, UsersRoute.name: (routeData) { @@ -164,16 +65,103 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - RootRoute.name: (routeData) { + AppSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: WrappedRoute(child: const RootPage()), + child: const AppSettingsPage(), ); }, - BackupDetailsRoute.name: (routeData) { + DeveloperSettingsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const BackupDetailsPage(), + child: const DeveloperSettingsPage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + ProvidersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ProvidersPage(), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), + ); + }, + DnsDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DnsDetailsPage(), + ); + }, + RecoveryRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryRouting(), + ); + }, + InitializingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const InitializingPage(), + ); + }, + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServerStoragePage( + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + ExtendingVolumeRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ExtendingVolumePage( + diskVolumeToResize: args.diskVolumeToResize, + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServicesMigrationPage( + services: args.services, + diskStatus: args.diskStatus, + isMigration: args.isMigration, + key: args.key, + ), + ); + }, + DevicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DevicesScreen(), ); }, BackupsListRoute.name: (routeData) { @@ -186,37 +174,167 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, + BackupDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const BackupDetailsPage(), + ); + }, + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), + ); + }, }; } /// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) : super( - DevicesRoute.name, + RootRoute.name, initialChildren: children, ); - static const String name = 'DevicesRoute'; + static const String name = 'RootRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [DnsDetailsPage] -class DnsDetailsRoute extends PageRouteInfo { - const DnsDetailsRoute({List? children}) - : super( - DnsDetailsRoute.name, +/// [ServicePage] +class ServiceRoute extends PageRouteInfo { + ServiceRoute({ + required String serviceId, + Key? key, + List? children, + }) : super( + ServiceRoute.name, + args: ServiceRouteArgs( + serviceId: serviceId, + key: key, + ), initialChildren: children, ); - static const String name = 'DnsDetailsRoute'; + static const String name = 'ServiceRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServiceRouteArgs { + const ServiceRouteArgs({ + required this.serviceId, + this.key, + }); + + final String serviceId; + + final Key? key; + + @override + String toString() { + return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; + } +} + +/// generated route for +/// [ServicesPage] +class ServicesRoute extends PageRouteInfo { + const ServicesRoute({List? children}) + : super( + ServicesRoute.name, + initialChildren: children, + ); + + static const String name = 'ServicesRoute'; static const PageInfo page = PageInfo(name); } +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) + : super( + ServerDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'ServerDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UsersPage] +class UsersRoute extends PageRouteInfo { + const UsersRoute({List? children}) + : super( + UsersRoute.name, + initialChildren: children, + ); + + static const String name = 'UsersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [NewUserPage] +class NewUserRoute extends PageRouteInfo { + const NewUserRoute({List? children}) + : super( + NewUserRoute.name, + initialChildren: children, + ); + + static const String name = 'NewUserRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [UserDetailsPage] +class UserDetailsRoute extends PageRouteInfo { + UserDetailsRoute({ + required String login, + Key? key, + List? children, + }) : super( + UserDetailsRoute.name, + args: UserDetailsRouteArgs( + login: login, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'UserDetailsRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class UserDetailsRouteArgs { + const UserDetailsRouteArgs({ + required this.login, + this.key, + }); + + final String login; + + final Key? key; + + @override + String toString() { + return 'UserDetailsRouteArgs{login: $login, key: $key}'; + } +} + /// generated route for /// [AppSettingsPage] class AppSettingsRoute extends PageRouteInfo { @@ -245,20 +363,6 @@ class DeveloperSettingsRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) - : super( - AboutApplicationRoute.name, - initialChildren: children, - ); - - static const String name = 'AboutApplicationRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [MorePage] class MoreRoute extends PageRouteInfo { @@ -273,6 +377,20 @@ class MoreRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [ConsolePage] class ConsoleRoute extends PageRouteInfo { @@ -287,20 +405,6 @@ class ConsoleRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) - : super( - OnboardingRoute.name, - initialChildren: children, - ); - - static const String name = 'OnboardingRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [ProvidersPage] class ProvidersRoute extends PageRouteInfo { @@ -330,65 +434,45 @@ class RecoveryKeyRoute extends PageRouteInfo { } /// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute({List? children}) : super( - ServerDetailsRoute.name, + DnsDetailsRoute.name, initialChildren: children, ); - static const String name = 'ServerDetailsRoute'; + static const String name = 'DnsDetailsRoute'; static const PageInfo page = PageInfo(name); } /// generated route for -/// [ServicesMigrationPage] -class ServicesMigrationRoute extends PageRouteInfo { - ServicesMigrationRoute({ - required List services, - required DiskStatus diskStatus, - required bool isMigration, - Key? key, - List? children, - }) : super( - ServicesMigrationRoute.name, - args: ServicesMigrationRouteArgs( - services: services, - diskStatus: diskStatus, - isMigration: isMigration, - key: key, - ), +/// [RecoveryRouting] +class RecoveryRoute extends PageRouteInfo { + const RecoveryRoute({List? children}) + : super( + RecoveryRoute.name, initialChildren: children, ); - static const String name = 'ServicesMigrationRoute'; + static const String name = 'RecoveryRoute'; - static const PageInfo page = - PageInfo(name); + static const PageInfo page = PageInfo(name); } -class ServicesMigrationRouteArgs { - const ServicesMigrationRouteArgs({ - required this.services, - required this.diskStatus, - required this.isMigration, - this.key, - }); +/// generated route for +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute({List? children}) + : super( + InitializingRoute.name, + initialChildren: children, + ); - final List services; + static const String name = 'InitializingRoute'; - final DiskStatus diskStatus; - - final bool isMigration; - - final Key? key; - - @override - String toString() { - return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; - } + static const PageInfo page = PageInfo(name); } /// generated route for @@ -473,175 +557,63 @@ class ExtendingVolumeRouteArgs { } /// generated route for -/// [ServicePage] -class ServiceRoute extends PageRouteInfo { - ServiceRoute({ - required String serviceId, +/// [ServicesMigrationPage] +class ServicesMigrationRoute extends PageRouteInfo { + ServicesMigrationRoute({ + required List services, + required DiskStatus diskStatus, + required bool isMigration, Key? key, List? children, }) : super( - ServiceRoute.name, - args: ServiceRouteArgs( - serviceId: serviceId, + ServicesMigrationRoute.name, + args: ServicesMigrationRouteArgs( + services: services, + diskStatus: diskStatus, + isMigration: isMigration, key: key, ), initialChildren: children, ); - static const String name = 'ServiceRoute'; + static const String name = 'ServicesMigrationRoute'; - static const PageInfo page = - PageInfo(name); + static const PageInfo page = + PageInfo(name); } -class ServiceRouteArgs { - const ServiceRouteArgs({ - required this.serviceId, +class ServicesMigrationRouteArgs { + const ServicesMigrationRouteArgs({ + required this.services, + required this.diskStatus, + required this.isMigration, this.key, }); - final String serviceId; + final List services; + + final DiskStatus diskStatus; + + final bool isMigration; final Key? key; @override String toString() { - return 'ServiceRouteArgs{serviceId: $serviceId, key: $key}'; + return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; } } /// generated route for -/// [ServicesPage] -class ServicesRoute extends PageRouteInfo { - const ServicesRoute({List? children}) +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) : super( - ServicesRoute.name, + DevicesRoute.name, initialChildren: children, ); - static const String name = 'ServicesRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [InitializingPage] -class InitializingRoute extends PageRouteInfo { - const InitializingRoute({List? children}) - : super( - InitializingRoute.name, - initialChildren: children, - ); - - static const String name = 'InitializingRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [RecoveryRouting] -class RecoveryRoute extends PageRouteInfo { - const RecoveryRoute({List? children}) - : super( - RecoveryRoute.name, - initialChildren: children, - ); - - static const String name = 'RecoveryRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UsersPage] -class UsersRoute extends PageRouteInfo { - const UsersRoute({List? children}) - : super( - UsersRoute.name, - initialChildren: children, - ); - - static const String name = 'UsersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [NewUserPage] -class NewUserRoute extends PageRouteInfo { - const NewUserRoute({List? children}) - : super( - NewUserRoute.name, - initialChildren: children, - ); - - static const String name = 'NewUserRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [UserDetailsPage] -class UserDetailsRoute extends PageRouteInfo { - UserDetailsRoute({ - required String login, - Key? key, - List? children, - }) : super( - UserDetailsRoute.name, - args: UserDetailsRouteArgs( - login: login, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'UserDetailsRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class UserDetailsRouteArgs { - const UserDetailsRouteArgs({ - required this.login, - this.key, - }); - - final String login; - - final Key? key; - - @override - String toString() { - return 'UserDetailsRouteArgs{login: $login, key: $key}'; - } -} - -/// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) - : super( - RootRoute.name, - initialChildren: children, - ); - - static const String name = 'RootRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) - : super( - BackupDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'BackupDetailsRoute'; + static const String name = 'DevicesRoute'; static const PageInfo page = PageInfo(name); } @@ -683,3 +655,31 @@ class BackupsListRouteArgs { return 'BackupsListRouteArgs{service: $service, key: $key}'; } } + +/// generated route for +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) + : super( + BackupDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'BackupDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; + + static const PageInfo page = PageInfo(name); +} From bc6b08d62188cbab47f98e7cf76b0b65636bfd61 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 10 Jul 2023 09:39:57 -0300 Subject: [PATCH 568/732] fix(ui): Add background for dialogue pop ups and move them to root navigator --- lib/ui/pages/root_route.dart | 2 -- lib/ui/pages/users/user_details.dart | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ui/pages/root_route.dart b/lib/ui/pages/root_route.dart index 65d4cd8d..b50f453b 100644 --- a/lib/ui/pages/root_route.dart +++ b/lib/ui/pages/root_route.dart @@ -131,8 +131,6 @@ class MainScreenNavigationDrawer extends StatelessWidget { width: 296, child: LayoutBuilder( builder: (final context, final constraints) => NavigationDrawer( - // backgroundColor: Theme.of(context).colorScheme.surfaceVariant, - // surfaceTintColor: Colors.transparent, key: const Key('PrimaryNavigationDrawer'), selectedIndex: activeIndex, onDestinationSelected: (final index) { diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index be7205fb..72180e8c 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -50,7 +50,7 @@ class UserDetailsPage extends StatelessWidget { showModalBottomSheet( context: context, isScrollControlled: true, - backgroundColor: Colors.transparent, + useRootNavigator: true, builder: (final BuildContext context) => Padding( padding: MediaQuery.of(context).viewInsets, child: ResetPassword(user: user), @@ -178,7 +178,7 @@ class _SshKeysCard extends StatelessWidget { showModalBottomSheet( context: context, isScrollControlled: true, - backgroundColor: Colors.transparent, + useRootNavigator: true, builder: (final BuildContext context) => Padding( padding: MediaQuery.of(context).viewInsets, child: NewSshKey(user), From ddf2f71ac316f270f92baef11deab65990f5b96e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 12 Jul 2023 13:14:46 -0300 Subject: [PATCH 569/732] fix(ui): Make currency be properly shown again via shortcode --- lib/ui/pages/setup/initializing/server_type_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 3c1c5380..8ca01e44 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -314,7 +314,7 @@ class SelectTypePage extends StatelessWidget { 'initializing.choose_server_type_payment_per_month' .tr( args: [ - '${type.price.value.toString()} ${type.price.currency}' + '${type.price.value.toString()} ${type.price.currency.shortcode}' ], ), style: Theme.of(context) From 7ff1e361612ec32383bea32927dcd9fcf7920a40 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 13 Jul 2023 06:22:39 -0300 Subject: [PATCH 570/732] refactor(rest-api): Move rest api methods according to their business logic files positions - Rename unmatching functions --- .../cloudflare/cloudflare_api.dart | 114 +-- .../dns_providers/desec/desec_api.dart | 114 +-- .../digital_ocean_dns_api.dart | 124 +-- .../digital_ocean/digital_ocean_api.dart | 438 +++++------ .../server_providers/hetzner/hetzner_api.dart | 728 +++++++++--------- lib/logic/providers/dns_providers/desec.dart | 6 +- .../dns_providers/digital_ocean_dns.dart | 2 +- 7 files changed, 763 insertions(+), 763 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index 9fe74841..ae015d9d 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -92,22 +92,23 @@ class CloudflareApi extends RestApiMap { ); } - Future>> getZones(final String domain) async { - List zones = []; + Future> getDomains() async { + final String url = '$rootAddress/zones'; + List domains = []; late final Response? response; final Dio client = await getClient(); try { response = await client.get( - '/zones', - queryParameters: {'name': domain}, + url, + queryParameters: {'per_page': 50}, ); - zones = response.data['result']; + domains = response.data['result']; } catch (e) { print(e); - GenericResult( + return GenericResult( success: false, - data: zones, + data: domains, code: response?.statusCode, message: response?.statusMessage, ); @@ -115,7 +116,47 @@ class CloudflareApi extends RestApiMap { close(client); } - return GenericResult(success: true, data: zones); + return GenericResult( + success: true, + data: domains, + code: response.statusCode, + message: response.statusMessage, + ); + } + + Future> createMultipleDnsRecords({ + required final ServerDomain domain, + required final List records, + }) async { + final String domainZoneId = domain.zoneId; + final List allCreateFutures = []; + + final Dio client = await getClient(); + try { + for (final DnsRecord record in records) { + allCreateFutures.add( + client.post( + '/zones/$domainZoneId/dns_records', + data: record.toJson(), + ), + ); + } + await Future.wait(allCreateFutures); + } on DioError catch (e) { + print(e.message); + rethrow; + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); } Future> removeSimilarRecords({ @@ -183,58 +224,22 @@ class CloudflareApi extends RestApiMap { return GenericResult(data: allRecords, success: true); } - Future> createMultipleDnsRecords({ - required final ServerDomain domain, - required final List records, - }) async { - final String domainZoneId = domain.zoneId; - final List allCreateFutures = []; - - final Dio client = await getClient(); - try { - for (final DnsRecord record in records) { - allCreateFutures.add( - client.post( - '/zones/$domainZoneId/dns_records', - data: record.toJson(), - ), - ); - } - await Future.wait(allCreateFutures); - } on DioError catch (e) { - print(e.message); - rethrow; - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: null); - } - - Future> getDomains() async { - final String url = '$rootAddress/zones'; - List domains = []; + Future>> getZones(final String domain) async { + List zones = []; late final Response? response; final Dio client = await getClient(); try { response = await client.get( - url, - queryParameters: {'per_page': 50}, + '/zones', + queryParameters: {'name': domain}, ); - domains = response.data['result']; + zones = response.data['result']; } catch (e) { print(e); - return GenericResult( + GenericResult( success: false, - data: domains, + data: zones, code: response?.statusCode, message: response?.statusMessage, ); @@ -242,11 +247,6 @@ class CloudflareApi extends RestApiMap { close(client); } - return GenericResult( - success: true, - data: domains, - code: response.statusCode, - message: response.statusMessage, - ); + return GenericResult(success: true, data: zones); } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index e5eff146..960df30f 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -92,7 +92,63 @@ class DesecApi extends RestApiMap { ); } - Future> updateRecords({ + Future> getDomains() async { + List domains = []; + + late final Response? response; + final Dio client = await getClient(); + try { + response = await client.get( + '', + ); + await Future.delayed(const Duration(seconds: 1)); + domains = response.data; + } catch (e) { + print(e); + return GenericResult( + success: false, + data: domains, + code: response?.statusCode, + message: response?.statusMessage, + ); + } finally { + close(client); + } + + return GenericResult( + success: true, + data: domains, + code: response.statusCode, + message: response.statusMessage, + ); + } + + Future> createMultipleDnsRecords({ + required final ServerDomain domain, + required final List records, + }) async { + final String domainName = domain.domainName; + final String url = '/$domainName/rrsets/'; + + final Dio client = await getClient(); + try { + await client.post(url, data: records); + await Future.delayed(const Duration(seconds: 1)); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); + } + + Future> removeSimilarRecords({ required final ServerDomain domain, required final List records, }) async { @@ -145,60 +201,4 @@ class DesecApi extends RestApiMap { return GenericResult(data: allRecords, success: true); } - - Future> createRecords({ - required final ServerDomain domain, - required final List records, - }) async { - final String domainName = domain.domainName; - final String url = '/$domainName/rrsets/'; - - final Dio client = await getClient(); - try { - await client.post(url, data: records); - await Future.delayed(const Duration(seconds: 1)); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: null); - } - - Future> getDomains() async { - List domains = []; - - late final Response? response; - final Dio client = await getClient(); - try { - response = await client.get( - '', - ); - await Future.delayed(const Duration(seconds: 1)); - domains = response.data; - } catch (e) { - print(e); - return GenericResult( - success: false, - data: domains, - code: response?.statusCode, - message: response?.statusMessage, - ); - } finally { - close(client); - } - - return GenericResult( - success: true, - data: domains, - code: response.statusCode, - message: response.statusMessage, - ); - } } diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 348edc77..70a70b7c 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -92,6 +92,68 @@ class DigitalOceanDnsApi extends RestApiMap { ); } + Future> getDomains() async { + List domains = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get('/domains'); + domains = response.data['domains']; + } catch (e) { + print(e); + return GenericResult( + data: domains, + success: false, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(data: domains, success: true); + } + + Future> createMultipleDnsRecords({ + required final ServerDomain domain, + required final List records, + }) async { + final String domainName = domain.domainName; + final List allCreateFutures = []; + + final Dio client = await getClient(); + try { + for (final DnsRecord record in records) { + allCreateFutures.add( + client.post( + '/domains/$domainName/records', + data: { + 'type': record.type, + 'name': record.name, + 'data': record.content, + 'ttl': record.ttl, + 'priority': record.priority, + }, + ), + ); + } + await Future.wait(allCreateFutures); + } on DioError catch (e) { + print(e.message); + rethrow; + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); + } + Future> removeSimilarRecords({ required final ServerDomain domain, required final List records, @@ -152,66 +214,4 @@ class DigitalOceanDnsApi extends RestApiMap { return GenericResult(data: allRecords, success: true); } - - Future> createMultipleDnsRecords({ - required final ServerDomain domain, - required final List records, - }) async { - final String domainName = domain.domainName; - final List allCreateFutures = []; - - final Dio client = await getClient(); - try { - for (final DnsRecord record in records) { - allCreateFutures.add( - client.post( - '/domains/$domainName/records', - data: { - 'type': record.type, - 'name': record.name, - 'data': record.content, - 'ttl': record.ttl, - 'priority': record.priority, - }, - ), - ); - } - await Future.wait(allCreateFutures); - } on DioError catch (e) { - print(e.message); - rethrow; - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: null); - } - - Future> domainList() async { - List domains = []; - - final Dio client = await getClient(); - try { - final Response response = await client.get('/domains'); - domains = response.data['domains']; - } catch (e) { - print(e); - return GenericResult( - data: domains, - success: false, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(data: domains, success: true); - } } diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 807d03a0..cebb568c 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -48,6 +48,100 @@ class DigitalOceanApi extends RestApiMap { String get infectProviderName => 'digitalocean'; String get displayProviderName => 'Digital Ocean'; + Future> getServers() async { + List servers = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get('/droplets'); + servers = response.data['droplets']; + } catch (e) { + print(e); + return GenericResult( + success: false, + data: servers, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: servers); + } + + Future> createServer({ + required final String dnsApiToken, + required final String dnsProviderType, + required final String serverApiToken, + required final User rootUser, + required final String base64Password, + required final String databasePassword, + required final String domainName, + required final String hostName, + required final String serverType, + }) async { + final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false'; + + int? dropletId; + Response? serverCreateResponse; + final Dio client = await getClient(); + try { + final Map data = { + 'name': hostName, + 'size': serverType, + 'image': 'ubuntu-20-04-x64', + 'user_data': '#cloud-config\n' + 'runcmd:\n' + '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/digital-ocean/nixos-infect | ' + "PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' DOMAIN='$domainName' " + "LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword " + 'API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | tee /tmp/infect.log', + 'region': region!, + }; + print('Decoded data: $data'); + + serverCreateResponse = await client.post( + '/droplets', + data: data, + ); + dropletId = serverCreateResponse.data['droplet']['id']; + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult( + data: dropletId, + success: true, + code: serverCreateResponse.statusCode, + message: serverCreateResponse.statusMessage, + ); + } + + Future> deleteServer(final int serverId) async { + final Dio client = await getClient(); + try { + await client.delete('/droplets/$serverId'); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); + } + Future> isApiTokenValid(final String token) async { bool isValid = false; Response? response; @@ -94,41 +188,103 @@ class DigitalOceanApi extends RestApiMap { ); } - Future> createVolume() async { - DigitalOceanVolume? volume; - Response? createVolumeResponse; + Future>> + getAvailableLocations() async { + final List locations = []; + final Dio client = await getClient(); try { - await Future.delayed(const Duration(seconds: 6)); - - createVolumeResponse = await client.post( - '/volumes', - data: { - 'size_gigabytes': 10, - 'name': 'volume${StringGenerators.storageName()}', - 'labels': {'labelkey': 'value'}, - 'region': region, - 'filesystem_type': 'ext4', - }, + final Response response = await client.get( + '/regions', ); - volume = DigitalOceanVolume.fromJson(createVolumeResponse.data['volume']); + + for (final region in response.data!['regions']) { + locations.add(DigitalOceanLocation.fromJson(region)); + } } catch (e) { print(e); return GenericResult( - data: null, + data: [], success: false, message: e.toString(), ); } finally { - client.close(); + close(client); } - return GenericResult( - data: volume, - success: true, - code: createVolumeResponse.statusCode, - message: createVolumeResponse.statusMessage, - ); + return GenericResult(data: locations, success: true); + } + + Future>> + getAvailableServerTypes() async { + final List types = []; + + final Dio client = await getClient(); + try { + final Response response = await client.get( + '/sizes', + ); + for (final size in response.data!['sizes']) { + types.add(DigitalOceanServerType.fromJson(size)); + } + } catch (e) { + print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(data: types, success: true); + } + + Future> powerOn(final int serverId) async { + final Dio client = await getClient(); + try { + await client.post( + '/droplets/$serverId/actions', + data: { + 'type': 'power_on', + }, + ); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); + } + + Future> restart(final int serverId) async { + final Dio client = await getClient(); + try { + await client.post( + '/droplets/$serverId/actions', + data: { + 'type': 'reboot', + }, + ); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); } Future>> getVolumes({ @@ -165,10 +321,24 @@ class DigitalOceanApi extends RestApiMap { ); } - Future> deleteVolume(final String uuid) async { + Future> createVolume() async { + DigitalOceanVolume? volume; + Response? createVolumeResponse; final Dio client = await getClient(); try { - await client.delete('/volumes/$uuid'); + await Future.delayed(const Duration(seconds: 6)); + + createVolumeResponse = await client.post( + '/volumes', + data: { + 'size_gigabytes': 10, + 'name': 'volume${StringGenerators.storageName()}', + 'labels': {'labelkey': 'value'}, + 'region': region, + 'filesystem_type': 'ext4', + }, + ); + volume = DigitalOceanVolume.fromJson(createVolumeResponse.data['volume']); } catch (e) { print(e); return GenericResult( @@ -181,8 +351,10 @@ class DigitalOceanApi extends RestApiMap { } return GenericResult( - data: null, + data: volume, success: true, + code: createVolumeResponse.statusCode, + message: createVolumeResponse.statusMessage, ); } @@ -262,6 +434,27 @@ class DigitalOceanApi extends RestApiMap { ); } + Future> deleteVolume(final String uuid) async { + final Dio client = await getClient(); + try { + await client.delete('/volumes/$uuid'); + } catch (e) { + print(e); + return GenericResult( + data: null, + success: false, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult( + data: null, + success: true, + ); + } + Future> resizeVolume( final String name, final DiskSize size, @@ -299,125 +492,6 @@ class DigitalOceanApi extends RestApiMap { ); } - Future> createServer({ - required final String dnsApiToken, - required final String dnsProviderType, - required final String serverApiToken, - required final User rootUser, - required final String base64Password, - required final String databasePassword, - required final String domainName, - required final String hostName, - required final String serverType, - }) async { - final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false'; - - int? dropletId; - Response? serverCreateResponse; - final Dio client = await getClient(); - try { - final Map data = { - 'name': hostName, - 'size': serverType, - 'image': 'ubuntu-20-04-x64', - 'user_data': '#cloud-config\n' - 'runcmd:\n' - '- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/providers/digital-ocean/nixos-infect | ' - "PROVIDER=$infectProviderName DNS_PROVIDER_TYPE=$dnsProviderType STAGING_ACME='$stagingAcme' DOMAIN='$domainName' " - "LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$databasePassword " - 'API_TOKEN=$serverApiToken HOSTNAME=$hostName bash 2>&1 | tee /tmp/infect.log', - 'region': region!, - }; - print('Decoded data: $data'); - - serverCreateResponse = await client.post( - '/droplets', - data: data, - ); - dropletId = serverCreateResponse.data['droplet']['id']; - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult( - data: dropletId, - success: true, - code: serverCreateResponse.statusCode, - message: serverCreateResponse.statusMessage, - ); - } - - Future> deleteServer(final int serverId) async { - final Dio client = await getClient(); - try { - await client.delete('/droplets/$serverId'); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: null); - } - - Future> restart(final int serverId) async { - final Dio client = await getClient(); - try { - await client.post( - '/droplets/$serverId/actions', - data: { - 'type': 'reboot', - }, - ); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: null); - } - - Future> powerOn(final int serverId) async { - final Dio client = await getClient(); - try { - await client.post( - '/droplets/$serverId/actions', - data: { - 'type': 'power_on', - }, - ); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: null); - } - Future> getMetricsCpu( final int serverId, final DateTime start, @@ -484,78 +558,4 @@ class DigitalOceanApi extends RestApiMap { return GenericResult(success: true, data: metrics); } - - Future> getServers() async { - List servers = []; - - final Dio client = await getClient(); - try { - final Response response = await client.get('/droplets'); - servers = response.data['droplets']; - } catch (e) { - print(e); - return GenericResult( - success: false, - data: servers, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: servers); - } - - Future>> - getAvailableLocations() async { - final List locations = []; - - final Dio client = await getClient(); - try { - final Response response = await client.get( - '/regions', - ); - - for (final region in response.data!['regions']) { - locations.add(DigitalOceanLocation.fromJson(region)); - } - } catch (e) { - print(e); - return GenericResult( - data: [], - success: false, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(data: locations, success: true); - } - - Future>> - getAvailableServerTypes() async { - final List types = []; - - final Dio client = await getClient(); - try { - final Response response = await client.get( - '/sizes', - ); - for (final size in response.data!['sizes']) { - types.add(DigitalOceanServerType.fromJson(size)); - } - } catch (e) { - print(e); - return GenericResult( - data: [], - success: false, - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(data: types, success: true); - } } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index b320d4f5..7fbf3dac 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -48,289 +48,29 @@ class HetznerApi extends RestApiMap { String get infectProviderName => 'hetzner'; String get displayProviderName => 'Hetzner'; - Future> isApiTokenValid(final String token) async { - bool isValid = false; - Response? response; - String message = ''; + Future>> getServers() async { + List servers = []; + final Dio client = await getClient(); try { - response = await client.get( - '/servers', - options: Options( - followRedirects: false, - validateStatus: (final status) => - status != null && (status >= 200 || status == 401), - headers: {'Authorization': 'Bearer $token'}, - ), - ); + final Response response = await client.get('/servers'); + servers = response.data!['servers'] + .map( + (final e) => HetznerServerInfo.fromJson(e), + ) + .toList(); } catch (e) { print(e); - isValid = false; - message = e.toString(); + return GenericResult( + success: false, + data: [], + message: e.toString(), + ); } finally { close(client); } - if (response == null) { - return GenericResult( - data: isValid, - success: false, - message: message, - ); - } - - if (response.statusCode == HttpStatus.ok) { - isValid = true; - } else if (response.statusCode == HttpStatus.unauthorized) { - isValid = false; - } else { - throw Exception('code: ${response.statusCode}'); - } - - return GenericResult( - data: isValid, - success: true, - message: response.statusMessage, - ); - } - - Future> getPricePerGb() async { - double? price; - - final Response pricingResponse; - final Dio client = await getClient(); - try { - pricingResponse = await client.get('/pricing'); - - final volume = pricingResponse.data['pricing']['volume']; - final volumePrice = volume['price_per_gb_month']['gross']; - price = double.parse(volumePrice); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: price, - message: e.toString(), - ); - } finally { - client.close(); - } - - return GenericResult(success: true, data: price); - } - - Future> createVolume() async { - Response? createVolumeResponse; - HetznerVolume? volume; - final Dio client = await getClient(); - try { - createVolumeResponse = await client.post( - '/volumes', - data: { - 'size': 10, - 'name': StringGenerators.storageName(), - 'labels': {'labelkey': 'value'}, - 'location': region, - 'automount': false, - 'format': 'ext4' - }, - ); - volume = HetznerVolume.fromJson(createVolumeResponse.data['volume']); - } catch (e) { - print(e); - return GenericResult( - data: null, - success: false, - message: e.toString(), - ); - } finally { - client.close(); - } - - return GenericResult( - data: volume, - success: true, - code: createVolumeResponse.statusCode, - message: createVolumeResponse.statusMessage, - ); - } - - Future>> getVolumes({ - final String? status, - }) async { - final List volumes = []; - - Response? getVolumesResonse; - final Dio client = await getClient(); - try { - getVolumesResonse = await client.get( - '/volumes', - queryParameters: { - 'status': status, - }, - ); - for (final volume in getVolumesResonse.data['volumes']) { - volumes.add(HetznerVolume.fromJson(volume)); - } - } catch (e) { - print(e); - return GenericResult( - data: [], - success: false, - message: e.toString(), - ); - } finally { - client.close(); - } - - return GenericResult( - data: volumes, - success: true, - code: getVolumesResonse.statusCode, - message: getVolumesResonse.statusMessage, - ); - } - - Future> getVolume( - final String volumeId, - ) async { - HetznerVolume? volume; - - final Response getVolumeResponse; - final Dio client = await getClient(); - try { - getVolumeResponse = await client.get('/volumes/$volumeId'); - volume = HetznerVolume.fromJson(getVolumeResponse.data['volume']); - } catch (e) { - print(e); - return GenericResult( - data: null, - success: false, - message: e.toString(), - ); - } finally { - client.close(); - } - - return GenericResult( - data: volume, - success: true, - ); - } - - Future> deleteVolume(final int volumeId) async { - final Dio client = await getClient(); - try { - await client.delete('/volumes/$volumeId'); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: false, - message: e.toString(), - ); - } finally { - client.close(); - } - - return GenericResult( - success: true, - data: true, - ); - } - - Future> attachVolume( - final HetznerVolume volume, - final int serverId, - ) async { - bool success = false; - - Response? attachVolumeResponse; - final Dio client = await getClient(); - try { - attachVolumeResponse = await client.post( - '/volumes/${volume.id}/actions/attach', - data: { - 'automount': true, - 'server': serverId, - }, - ); - success = - attachVolumeResponse.data['action']['status'].toString() != 'error'; - } catch (e) { - print(e); - } finally { - client.close(); - } - - return GenericResult( - data: success, - success: true, - code: attachVolumeResponse?.statusCode, - message: attachVolumeResponse?.statusMessage, - ); - } - - Future> detachVolume(final int volumeId) async { - bool success = false; - - final Response detachVolumeResponse; - final Dio client = await getClient(); - try { - detachVolumeResponse = await client.post( - '/volumes/$volumeId/actions/detach', - ); - success = - detachVolumeResponse.data['action']['status'].toString() != 'error'; - } catch (e) { - print(e); - return GenericResult( - success: false, - data: false, - message: e.toString(), - ); - } finally { - client.close(); - } - - return GenericResult( - success: false, - data: success, - ); - } - - Future> resizeVolume( - final HetznerVolume volume, - final DiskSize size, - ) async { - bool success = false; - - final Response resizeVolumeResponse; - final Dio client = await getClient(); - try { - resizeVolumeResponse = await client.post( - '/volumes/${volume.id}/actions/resize', - data: { - 'size': size.gibibyte, - }, - ); - success = - resizeVolumeResponse.data['action']['status'].toString() != 'error'; - } catch (e) { - print(e); - return GenericResult( - data: false, - success: false, - message: e.toString(), - ); - } finally { - client.close(); - } - - return GenericResult( - data: success, - success: true, - ); + return GenericResult(data: servers, success: true); } Future> createServer({ @@ -402,6 +142,34 @@ class HetznerApi extends RestApiMap { ); } + Future> createReverseDns({ + required final int serverId, + required final String ip4, + required final String dnsPtr, + }) async { + final Dio client = await getClient(); + try { + await client.post( + '/servers/$serverId/actions/change_dns_ptr', + data: { + 'ip': ip4, + 'dns_ptr': dnsPtr, + }, + ); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); + } + Future> deleteServer({ required final int serverId, }) async { @@ -422,98 +190,50 @@ class HetznerApi extends RestApiMap { return GenericResult(success: true, data: null); } - Future> restart(final int serverId) async { + Future> isApiTokenValid(final String token) async { + bool isValid = false; + Response? response; + String message = ''; final Dio client = await getClient(); try { - await client.post('/servers/$serverId/actions/reset'); + response = await client.get( + '/servers', + options: Options( + followRedirects: false, + validateStatus: (final status) => + status != null && (status >= 200 || status == 401), + headers: {'Authorization': 'Bearer $token'}, + ), + ); } catch (e) { print(e); - return GenericResult( - success: false, - data: null, - message: e.toString(), - ); + isValid = false; + message = e.toString(); } finally { close(client); } - return GenericResult(success: true, data: null); - } - - Future> powerOn(final int serverId) async { - final Dio client = await getClient(); - try { - await client.post('/servers/$serverId/actions/poweron'); - } catch (e) { - print(e); + if (response == null) { return GenericResult( + data: isValid, success: false, - data: null, - message: e.toString(), + message: message, ); - } finally { - close(client); } - return GenericResult(success: true, data: null); - } - - Future>> getMetrics( - final int serverId, - final DateTime start, - final DateTime end, - final String type, - ) async { - Map metrics = {}; - final Dio client = await getClient(); - try { - final Map queryParameters = { - 'start': start.toUtc().toIso8601String(), - 'end': end.toUtc().toIso8601String(), - 'type': type - }; - final Response res = await client.get( - '/servers/$serverId/metrics', - queryParameters: queryParameters, - ); - metrics = res.data['metrics']; - } catch (e) { - print(e); - return GenericResult( - success: false, - data: {}, - message: e.toString(), - ); - } finally { - close(client); + if (response.statusCode == HttpStatus.ok) { + isValid = true; + } else if (response.statusCode == HttpStatus.unauthorized) { + isValid = false; + } else { + throw Exception('code: ${response.statusCode}'); } - return GenericResult(data: metrics, success: true); - } - - Future>> getServers() async { - List servers = []; - - final Dio client = await getClient(); - try { - final Response response = await client.get('/servers'); - servers = response.data!['servers'] - .map( - (final e) => HetznerServerInfo.fromJson(e), - ) - .toList(); - } catch (e) { - print(e); - return GenericResult( - success: false, - data: [], - message: e.toString(), - ); - } finally { - close(client); - } - - return GenericResult(data: servers, success: true); + return GenericResult( + data: isValid, + success: true, + message: response.statusMessage, + ); } Future>> getAvailableLocations() async { @@ -565,20 +285,10 @@ class HetznerApi extends RestApiMap { return GenericResult(data: types, success: true); } - Future> createReverseDns({ - required final int serverId, - required final String ip4, - required final String dnsPtr, - }) async { + Future> powerOn(final int serverId) async { final Dio client = await getClient(); try { - await client.post( - '/servers/$serverId/actions/change_dns_ptr', - data: { - 'ip': ip4, - 'dns_ptr': dnsPtr, - }, - ); + await client.post('/servers/$serverId/actions/poweron'); } catch (e) { print(e); return GenericResult( @@ -592,4 +302,294 @@ class HetznerApi extends RestApiMap { return GenericResult(success: true, data: null); } + + Future> restart(final int serverId) async { + final Dio client = await getClient(); + try { + await client.post('/servers/$serverId/actions/reset'); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(success: true, data: null); + } + + Future> getPricePerGb() async { + double? price; + + final Response pricingResponse; + final Dio client = await getClient(); + try { + pricingResponse = await client.get('/pricing'); + + final volume = pricingResponse.data['pricing']['volume']; + final volumePrice = volume['price_per_gb_month']['gross']; + price = double.parse(volumePrice); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: price, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult(success: true, data: price); + } + + Future>> getVolumes({ + final String? status, + }) async { + final List volumes = []; + + Response? getVolumesResonse; + final Dio client = await getClient(); + try { + getVolumesResonse = await client.get( + '/volumes', + queryParameters: { + 'status': status, + }, + ); + for (final volume in getVolumesResonse.data['volumes']) { + volumes.add(HetznerVolume.fromJson(volume)); + } + } catch (e) { + print(e); + return GenericResult( + data: [], + success: false, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult( + data: volumes, + success: true, + code: getVolumesResonse.statusCode, + message: getVolumesResonse.statusMessage, + ); + } + + Future> createVolume() async { + Response? createVolumeResponse; + HetznerVolume? volume; + final Dio client = await getClient(); + try { + createVolumeResponse = await client.post( + '/volumes', + data: { + 'size': 10, + 'name': StringGenerators.storageName(), + 'labels': {'labelkey': 'value'}, + 'location': region, + 'automount': false, + 'format': 'ext4' + }, + ); + volume = HetznerVolume.fromJson(createVolumeResponse.data['volume']); + } catch (e) { + print(e); + return GenericResult( + data: null, + success: false, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult( + data: volume, + success: true, + code: createVolumeResponse.statusCode, + message: createVolumeResponse.statusMessage, + ); + } + + Future> deleteVolume(final int volumeId) async { + final Dio client = await getClient(); + try { + await client.delete('/volumes/$volumeId'); + } catch (e) { + print(e); + return GenericResult( + success: false, + data: false, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult( + success: true, + data: true, + ); + } + + Future> getVolume( + final String volumeId, + ) async { + HetznerVolume? volume; + + final Response getVolumeResponse; + final Dio client = await getClient(); + try { + getVolumeResponse = await client.get('/volumes/$volumeId'); + volume = HetznerVolume.fromJson(getVolumeResponse.data['volume']); + } catch (e) { + print(e); + return GenericResult( + data: null, + success: false, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult( + data: volume, + success: true, + ); + } + + Future> detachVolume(final int volumeId) async { + bool success = false; + + final Response detachVolumeResponse; + final Dio client = await getClient(); + try { + detachVolumeResponse = await client.post( + '/volumes/$volumeId/actions/detach', + ); + success = + detachVolumeResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + return GenericResult( + success: false, + data: false, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult( + success: false, + data: success, + ); + } + + Future> attachVolume( + final HetznerVolume volume, + final int serverId, + ) async { + bool success = false; + + Response? attachVolumeResponse; + final Dio client = await getClient(); + try { + attachVolumeResponse = await client.post( + '/volumes/${volume.id}/actions/attach', + data: { + 'automount': true, + 'server': serverId, + }, + ); + success = + attachVolumeResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + } finally { + client.close(); + } + + return GenericResult( + data: success, + success: true, + code: attachVolumeResponse?.statusCode, + message: attachVolumeResponse?.statusMessage, + ); + } + + Future> resizeVolume( + final HetznerVolume volume, + final DiskSize size, + ) async { + bool success = false; + + final Response resizeVolumeResponse; + final Dio client = await getClient(); + try { + resizeVolumeResponse = await client.post( + '/volumes/${volume.id}/actions/resize', + data: { + 'size': size.gibibyte, + }, + ); + success = + resizeVolumeResponse.data['action']['status'].toString() != 'error'; + } catch (e) { + print(e); + return GenericResult( + data: false, + success: false, + message: e.toString(), + ); + } finally { + client.close(); + } + + return GenericResult( + data: success, + success: true, + ); + } + + Future>> getMetrics( + final int serverId, + final DateTime start, + final DateTime end, + final String type, + ) async { + Map metrics = {}; + final Dio client = await getClient(); + try { + final Map queryParameters = { + 'start': start.toUtc().toIso8601String(), + 'end': end.toUtc().toIso8601String(), + 'type': type + }; + final Response res = await client.get( + '/servers/$serverId/metrics', + queryParameters: queryParameters, + ); + metrics = res.data['metrics']; + } catch (e) { + print(e); + return GenericResult( + success: false, + data: {}, + message: e.toString(), + ); + } finally { + close(client); + } + + return GenericResult(data: metrics, success: true); + } } diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index acf384c6..41d504e4 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -91,7 +91,7 @@ class DesecDnsProvider extends DnsProvider { ); } - return _adapter.api().createRecords( + return _adapter.api().createMultipleDnsRecords( domain: domain, records: bulkRecords, ); @@ -127,7 +127,7 @@ class DesecDnsProvider extends DnsProvider { }, ); - return _adapter.api().updateRecords( + return _adapter.api().removeSimilarRecords( domain: domain, records: bulkRecords, ); @@ -179,7 +179,7 @@ class DesecDnsProvider extends DnsProvider { final DnsRecord record, final ServerDomain domain, ) async { - final result = await _adapter.api().createRecords( + final result = await _adapter.api().createMultipleDnsRecords( domain: domain, records: [ { diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index 17e1a085..87f8a479 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -47,7 +47,7 @@ class DigitalOceanDnsProvider extends DnsProvider { @override Future>> domainList() async { List domains = []; - final result = await _adapter.api().domainList(); + final result = await _adapter.api().getDomains(); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, From 81aa6003be151490746d48ce8472b3ab97dbe4b4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 16 Jul 2023 07:25:14 -0300 Subject: [PATCH 571/732] fix(installation): Add proper server type value loading --- .../server_installation/server_installation_repository.dart | 4 +++- .../cubit/server_installation/server_installation_state.dart | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 8ebe7c1a..24e3adc6 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -77,7 +77,7 @@ class ServerInstallationRepository { return ServerInstallationFinished( installationDialoguePopUp: null, providerApiToken: providerApiToken!, - serverTypeIdentificator: serverTypeIdentificator ?? '', + serverTypeIdentificator: serverTypeIdentificator!, dnsApiToken: dnsApiToken!, serverDomain: serverDomain!, backblazeCredential: backblazeCredential!, @@ -97,6 +97,7 @@ class ServerInstallationRepository { providerApiToken: providerApiToken, dnsApiToken: dnsApiToken, serverDomain: serverDomain, + serverTypeIdentificator: serverTypeIdentificator, backblazeCredential: backblazeCredential, serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), @@ -114,6 +115,7 @@ class ServerInstallationRepository { providerApiToken: providerApiToken, dnsApiToken: dnsApiToken, serverDomain: serverDomain, + serverTypeIdentificator: serverTypeIdentificator, backblazeCredential: backblazeCredential, serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index a163b145..9f701a0a 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -200,7 +200,7 @@ class ServerInstallationNotFinished extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, - serverTypeIdentificator: serverTypeIdentificator ?? '', + serverTypeIdentificator: serverTypeIdentificator!, dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, @@ -346,7 +346,7 @@ class ServerInstallationRecovery extends ServerInstallationState { ServerInstallationFinished finish() => ServerInstallationFinished( providerApiToken: providerApiToken!, - serverTypeIdentificator: serverTypeIdentificator ?? '', + serverTypeIdentificator: serverTypeIdentificator!, dnsApiToken: dnsApiToken!, backblazeCredential: backblazeCredential!, serverDomain: serverDomain!, From 56231a4197d5afbb4a8ae4375eedb43e23a6a358 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 16 Jul 2023 10:05:37 -0300 Subject: [PATCH 572/732] feat(provider): Implement proper load functions for DNS and Server providers --- .../server_installation_repository.dart | 2 ++ .../dns_providers/dns_provider_factory.dart | 18 +++++++++++++++--- lib/logic/providers/provider_settings.dart | 4 ++++ .../server_providers/digital_ocean.dart | 4 ++-- .../providers/server_providers/hetzner.dart | 4 ++-- .../server_provider_factory.dart | 14 ++++++++++++-- 6 files changed, 37 insertions(+), 9 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 24e3adc6..717b7535 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -57,6 +57,7 @@ class ServerInstallationRepository { ProvidersController.initServerProvider( ServerProviderSettings( provider: serverProvider ?? serverDetails!.provider, + isAuthorized: providerApiToken != null, location: location, ), ); @@ -67,6 +68,7 @@ class ServerInstallationRepository { serverDomain.provider != DnsProviderType.unknown)) { ProvidersController.initDnsProvider( DnsProviderSettings( + isAuthorized: dnsApiToken != null, provider: dnsProvider ?? serverDomain!.provider, ), ); diff --git a/lib/logic/providers/dns_providers/dns_provider_factory.dart b/lib/logic/providers/dns_providers/dns_provider_factory.dart index a2b1694e..e02928b6 100644 --- a/lib/logic/providers/dns_providers/dns_provider_factory.dart +++ b/lib/logic/providers/dns_providers/dns_provider_factory.dart @@ -16,11 +16,23 @@ class DnsProviderFactory { ) { switch (settings.provider) { case DnsProviderType.cloudflare: - return CloudflareDnsProvider(); + return settings.isAuthorized + ? CloudflareDnsProvider.load( + settings.isAuthorized, + ) + : CloudflareDnsProvider(); case DnsProviderType.digitalOcean: - return DigitalOceanDnsProvider(); + return settings.isAuthorized + ? DigitalOceanDnsProvider.load( + settings.isAuthorized, + ) + : DigitalOceanDnsProvider(); case DnsProviderType.desec: - return DesecDnsProvider(); + return settings.isAuthorized + ? DesecDnsProvider.load( + settings.isAuthorized, + ) + : DesecDnsProvider(); case DnsProviderType.unknown: throw UnknownProviderException('Unknown server provider'); } diff --git a/lib/logic/providers/provider_settings.dart b/lib/logic/providers/provider_settings.dart index 8ffe79e6..835697cd 100644 --- a/lib/logic/providers/provider_settings.dart +++ b/lib/logic/providers/provider_settings.dart @@ -4,9 +4,11 @@ import 'package:selfprivacy/logic/models/hive/server_domain.dart'; class ServerProviderSettings { ServerProviderSettings({ required this.provider, + this.isAuthorized = false, this.location, }); + final bool isAuthorized; final ServerProviderType provider; final String? location; } @@ -14,7 +16,9 @@ class ServerProviderSettings { class DnsProviderSettings { DnsProviderSettings({ required this.provider, + this.isAuthorized = false, }); + final bool isAuthorized; final DnsProviderType provider; } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 2f8e11c7..057c99df 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -37,11 +37,11 @@ class ApiAdapter { class DigitalOceanServerProvider extends ServerProvider { DigitalOceanServerProvider() : _adapter = ApiAdapter(); DigitalOceanServerProvider.load( - final ServerType serverType, + final String? location, final bool isAuthotized, ) : _adapter = ApiAdapter( isWithToken: isAuthotized, - region: serverType.location.identifier, + region: location, ); ApiAdapter _adapter; diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index b61e458f..ae680088 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -37,11 +37,11 @@ class ApiAdapter { class HetznerServerProvider extends ServerProvider { HetznerServerProvider() : _adapter = ApiAdapter(); HetznerServerProvider.load( - final ServerType serverType, + final String? location, final bool isAuthotized, ) : _adapter = ApiAdapter( isWithToken: isAuthotized, - region: serverType.location.identifier, + region: location, ); ApiAdapter _adapter; diff --git a/lib/logic/providers/server_providers/server_provider_factory.dart b/lib/logic/providers/server_providers/server_provider_factory.dart index 786b1c02..9aff1ab5 100644 --- a/lib/logic/providers/server_providers/server_provider_factory.dart +++ b/lib/logic/providers/server_providers/server_provider_factory.dart @@ -15,9 +15,19 @@ class ServerProviderFactory { ) { switch (settings.provider) { case ServerProviderType.hetzner: - return HetznerServerProvider(); + return settings.isAuthorized + ? HetznerServerProvider.load( + settings.location, + settings.isAuthorized, + ) + : HetznerServerProvider(); case ServerProviderType.digitalOcean: - return DigitalOceanServerProvider(); + return settings.isAuthorized + ? DigitalOceanServerProvider.load( + settings.location, + settings.isAuthorized, + ) + : DigitalOceanServerProvider(); case ServerProviderType.unknown: throw UnknownProviderException('Unknown server provider'); } From 538fc01d2319a82af4e40532de9ab4695cc93a30 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 17 Mar 2023 12:37:48 +0000 Subject: [PATCH 573/732] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/ --- assets/markdown/how_digital_ocean-be.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/assets/markdown/how_digital_ocean-be.md b/assets/markdown/how_digital_ocean-be.md index 8cc4876d..dc6355c2 100644 --- a/assets/markdown/how_digital_ocean-be.md +++ b/assets/markdown/how_digital_ocean-be.md @@ -1,10 +1,12 @@ -### Як атрымаць Digital Ocean API Токен -1. Перайдзіце па наступнай спасылцы [link](https://cloud.digitalocean.com/) і ўвайдзіце ў новы акаўнт. -2. Увайдзіце ў раней створаны праект. Калі вы яшчэ не стварылі, калі ласка працягвайце. -3. Перайдзіце па спасылцы «API» на панэлі злева. -4. Націсніце на "Generate New Token". -5. Увядзіце любое імя для токена. -6. Пастаўце тэрмін прыдатнасці "No expiry". -7. Усталюйце сцяжок "Write (optional)". -8. Цяпер націсніце кнопку "Generate Token". -9. Пасля гэтага будзе паказаны токен. Захоўвайце яго ў любым надзейным месцы, пажадана ў менеджэры пароляў. \ No newline at end of file +### How to get Digital Ocean API Token +1. Visit the following [link](https://cloud.digitalocean.com/) and sign + into newly created account. +2. Enter into previously created project. If you haven't created one, + then please proceed. +3. Go to the "API" link on the left bar. +4. Click on the "Generate New Token". +5. Enter any name for the token. +6. Put expiration time to "No expiry". +7. Check the "Write (optional)" checkbox. +8. Now click on the "Generate Token" button. +9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file From c5b0df8ff00037d9854768d223ae3b999bc63b14 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Fri, 17 Mar 2023 19:13:07 +0000 Subject: [PATCH 574/732] Translated using Weblate (Czech) Currently translated at 35.2% (141 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/cs/ --- assets/translations/cs.json | 133 +++++++++++++++++++++++++++++++++++- 1 file changed, 132 insertions(+), 1 deletion(-) diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 5b56fbd8..a3061e8d 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -32,6 +32,137 @@ "apply": "Použít", "done": "Hotovo", "continue": "Pokračovat", - "alert": "Upozornění" + "alert": "Upozornění", + "later": "Přeskočit na nastavení později" + }, + "about_application_page": { + "title": "O příloze", + "privacy_policy": "Zásady ochrany osobních údajů", + "api_version_text": "Verze API serveru {}", + "application_version_text": "Verze aplikace {}" + }, + "more_page": { + "about_project": "O nás", + "about_application": "O příloze", + "onboarding": "", + "console": "Konzole", + "application_settings": "Nastavení aplikace", + "configuration_wizard": "Průvodce nastavením", + "create_ssh_key": "Superuživatelské klíče SSH" + }, + "console_page": { + "title": "Konzole", + "waiting": "Čekání na inicializaci…" + }, + "application_settings": { + "title": "Nastavení aplikace", + "dark_theme_title": "Tmavé téma", + "reset_config_title": "Obnovení konfigurace aplikace", + "reset_config_description": "Obnovení klíčů api a uživatele root", + "delete_server_title": "Odstranit server", + "dark_theme_description": "Přepnutí tématu aplikace", + "delete_server_description": "Tím odstraníte svůj server. Nebude již přístupný." + }, + "ssh": { + "title": "Klíče SSH", + "create": "Vytvoření klíče SSH", + "delete": "Odstranění klíče SSH", + "delete_confirm_question": "Jste si jisti, že chcete odstranit klíč SSH?", + "subtitle_with_keys": "{} klíče", + "subtitle_without_keys": "Žádné klíče", + "no_key_name": "Nejmenovaný klíč", + "root_title": "Jedná se o klíče superuživatele", + "input_label": "Veřejný klíč ED25519 nebo RSA", + "root_subtitle": "Majitelé těchto klíčů získají plný přístup k serveru a mohou na něm dělat cokoli. Na server můžete přidávat pouze své vlastní klíče." + }, + "onboarding": { + "page1_title": "Digitální nezávislost dostupná nám všem", + "page1_text": "Mail, VPN, Messenger, sociální sítě a mnoho dalšího na vašem soukromém serveru, který máte pod kontrolou.", + "page2_text": "Služba SelfPrivacy spolupracuje pouze s poskytovateli, které si vyberete. Pokud u nich nemáte požadované účty, pomůžeme vám je vytvořit.", + "page2_server_provider_title": "Poskytovatel serveru", + "page2_dns_provider_title": "Poskytovatel DNS", + "page2_backup_provider_title": "Poskytovatel zálohování", + "page2_backup_provider_text": "Co když se něco stane s vaším serverem? Představte si útok hackera, náhodné smazání dat nebo odepření služby? Vaše data budou v bezpečí u poskytovatele záloh. Budou bezpečně zašifrovány a kdykoli přístupné pro obnovení vašeho serveru.", + "page2_title": "SelfPrivacy není cloud, je to vaše osobní datové centrum", + "page2_server_provider_text": "Poskytovatel serveru udržuje váš server ve vlastním datovém centru. SelfPrivacy se automaticky připojí k poskytovateli a nastaví vše potřebné.", + "page2_dns_provider_text": "Abyste měli místo na internetu, potřebujete doménu. A také potřebujete spolehlivého poskytovatele DNS, aby doména směřovala na váš server. Doporučíme vám vybrat podporovaného poskytovatele DNS pro automatické nastavení sítě." + }, + "resource_chart": { + "month": "Měsíc", + "day": "Den", + "hour": "Hodina", + "cpu_title": "Využití CPU", + "network_title": "Používání sítě", + "in": "Převzato z", + "out": "Odesláno" + }, + "server": { + "card_title": "Server", + "description": "Všechny vaše služby jsou k dispozici zde", + "general_information": "Obecné informace", + "resource_usage": "Využití zdrojů", + "allow_autoupgrade": "Povolit automatickou aktualizaci", + "allow_autoupgrade_hint": "Povolení automatických aktualizací balíčků na serveru" + }, + "initializing": { + "locations_not_found": "Ups!", + "connect_to_server": "Začněme serverem.", + "select_provider": "Vyberte si libovolného poskytovatele z následujícího seznamu, všichni podporují službu SelfPrivacy", + "select_provider_notice": "Pod pojmem \"relativně malý\" rozumíme počítač se dvěma jádry procesoru a dvěma gigabajty paměti RAM.", + "select_provider_countries_text_do": "USA, Nizozemsko, Singapur, Velká Británie, Německo, Kanada, Indie, Austrálie.", + "select_provider_email_notice": "E-mailový hosting nebude pro nové klienty k dispozici. Nicméně bude odemčen, jakmile dokončíte první platbu.", + "choose_location_type_text": "Různá místa poskytují různé konfigurace serverů, ceny a rychlosti připojení.", + "choose_server_type_text": "Různé možnosti prostředků podporují různé služby. Nebojte se, svůj server můžete kdykoli rozšířit", + "manage_domain_dns": "Správa domény DNS", + "use_this_domain_text": "Vámi zadaný token poskytuje přístup k následující doméně", + "no_connected_domains": "V současné době nejsou připojeny žádné domény", + "found_more_domains": "Nalezeno více než jedna doména. V zájmu vlastní bezpečnosti vás prosíme o odstranění nepotřebných domén", + "server_created": "Vytvořený server. Probíhá kontrola DNS a spouštění serveru…", + "choose_server_type_notice": "Důležité je zaměřit se na procesor a paměť RAM. Data vašich služeb budou uložena na připojeném svazku, který lze snadno rozšířit a za který se platí zvlášť.", + "cloudflare_api_token": "Token API CloudFlare", + "connect_backblaze_storage": "Připojení úložiště Backblaze", + "save_domain": "Uložit doménu", + "final": "Závěrečný krok", + "create_server": "Vytvořit server", + "what": "Co to znamená?", + "server_rebooted": "Server byl restartován. Čeká se na poslední ověření…", + "select_provider_countries_title": "Dostupné země", + "select_provider_countries_text_hetzner": "Německo, Finsko, USA", + "select_provider_price_title": "Průměrná cena", + "select_provider_price_text_hetzner": "8 € měsíčně za relativně malý server a 50 GB diskového úložiště", + "select_provider_price_text_do": "17 dolarů měsíčně za relativně malý server a 50 GB diskového úložiště", + "select_provider_payment_title": "Platební metody", + "select_provider_payment_text_hetzner": "Kreditní karty, SWIFT, SEPA, PayPal", + "select_provider_payment_text_do": "Kreditní karty, Google Pay, PayPal", + "select_provider_site_button": "Navštivte stránku", + "connect_to_server_provider": "Nyní se přihlaste ", + "connect_to_server_provider_text": "S tokenem API si SelfPrivacy bude moci pronajmout počítač a nastavit na něm svůj server", + "how": "Jak získat token API", + "provider_bad_key_error": "Klíč API poskytovatele je neplatný", + "could_not_connect": "Nelze se připojit k poskytovateli.", + "choose_location_type": "Kde si chcete objednat server?", + "locations_not_found_text": "Nejsou k dispozici žádné servery k pronájmu", + "back_to_locations": "Vyberte něco jiného", + "no_locations_found": "Nebyla nalezena žádná dostupná místa, ujistěte se, že je váš účet přístupný", + "choose_server_type": "Jaký typ serveru potřebujete?", + "choose_server_type_ram": "{} GB paměti RAM", + "choose_server_type_storage": "{} GB systémového úložiště", + "choose_server_type_payment_per_month": "{} měsíčně", + "no_server_types_found": "Nebyly nalezeny žádné dostupné typy serverů. Ujistěte se, že je váš účet přístupný, a zkuste změnit umístění serveru.", + "cloudflare_bad_key_error": "Klíč API služby Cloudflare je neplatný", + "backblaze_bad_key_error": "Informace o úložišti Backblaze jsou neplatné", + "select_dns": "Nyní vybereme poskytovatele DNS", + "use_this_domain": "Použít tuto doménu?", + "server_started": "Server byl spuštěn. Nyní bude ověřen a restartován…", + "until_the_next_check": "Do příští kontroly: ", + "check": "Podívejte se na stránky", + "one_more_restart": "Ještě jeden restart pro použití bezpečnostních certifikátů.", + "create_master_account": "Vytvoření hlavního účtu" + }, + "about_us_page": { + "title": "O nás" + }, + "users": { + "no_ssh_notice": "Pro tohoto uživatele jsou vytvořeny pouze účty e-mailu a SSH. Jednotné přihlašování pro všechny služby se chystá brzy." } } From 3a84e8e502c5634fd3a6144cf61c6c9706482ff6 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Thu, 30 Mar 2023 13:20:59 +0000 Subject: [PATCH 575/732] Translated using Weblate (Czech) Currently translated at 84.5% (338 of 400 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/cs/ --- assets/translations/cs.json | 246 +++++++++++++++++++++++++++++++++++- 1 file changed, 242 insertions(+), 4 deletions(-) diff --git a/assets/translations/cs.json b/assets/translations/cs.json index a3061e8d..1ea5893c 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -44,7 +44,7 @@ "more_page": { "about_project": "O nás", "about_application": "O příloze", - "onboarding": "", + "onboarding": "Pozdravy", "console": "Konzole", "application_settings": "Nastavení aplikace", "configuration_wizard": "Průvodce nastavením", @@ -102,7 +102,27 @@ "general_information": "Obecné informace", "resource_usage": "Využití zdrojů", "allow_autoupgrade": "Povolit automatickou aktualizaci", - "allow_autoupgrade_hint": "Povolení automatických aktualizací balíčků na serveru" + "allow_autoupgrade_hint": "Povolení automatických aktualizací balíčků na serveru", + "reboot_after_upgrade": "Restart po aktualizaci", + "reboot_after_upgrade_hint": "Restartování bez výzvy po použití změn na serveru", + "timezone_search_bar": "Název časového pásma nebo hodnota časového posunu", + "server_id": "ID serveru", + "status": "Stav", + "cpu": "CPU", + "ram": "Paměť", + "disk": "Místní disk", + "monthly_cost": "Měsíční náklady", + "location": "Umístění", + "provider": "Poskytovatel", + "core_count": { + "two": "{} jádra", + "few": "{} jádra", + "many": "{} jádra", + "other": "{} jádra", + "one": "{} jádro" + }, + "server_timezone": "Časové pásmo serveru", + "select_timezone": "Časové pásmo serveru" }, "initializing": { "locations_not_found": "Ups!", @@ -157,12 +177,230 @@ "until_the_next_check": "Do příští kontroly: ", "check": "Podívejte se na stránky", "one_more_restart": "Ještě jeden restart pro použití bezpečnostních certifikátů.", - "create_master_account": "Vytvoření hlavního účtu" + "create_master_account": "Vytvoření hlavního účtu", + "loading_domain_list": "Načítání seznamu domén", + "enter_username_and_password": "Zadejte uživatelské jméno a silné heslo", + "finish": "Vše je inicializováno", + "checks": "Kontroly byly dokončeny\n{} z {}" }, "about_us_page": { "title": "O nás" }, "users": { - "no_ssh_notice": "Pro tohoto uživatele jsou vytvořeny pouze účty e-mailu a SSH. Jednotné přihlašování pro všechny služby se chystá brzy." + "no_ssh_notice": "Pro tohoto uživatele jsou vytvořeny pouze účty e-mailu a SSH. Jednotné přihlašování pro všechny služby se chystá brzy.", + "add_new_user": "Přidání prvního uživatele", + "new_user": "Nový uživatel", + "nobody_here": "Nikdo zde není", + "login": "Přihlášení", + "new_user_info_note": "Novému uživateli bude automaticky přidělen přístup ke všem službám", + "delete_confirm_question": "Jste si jistý?", + "reset_password": "Obnovení hesla", + "account": "Účet", + "send_registration_data": "Sdílení přihlašovacích údajů", + "could_not_fetch_users": "Nepodařilo se načíst seznam uživatelů", + "could_not_fetch_description": "Zkontrolujte prosím své internetové připojení a zkuste to znovu", + "refresh_users": "Obnovení seznamu uživatelů", + "could_not_create_user": "Nepodařilo se vytvořit uživatele", + "could_not_delete_user": "Nepodařilo se odstranit uživatele", + "email_login": "Přihlášení e-mailem", + "delete_user": "Odstranění uživatele", + "not_ready": "Připojte prosím server, doménu a DNS na kartě Poskytovatelé, abyste mohli přidat prvního uživatele", + "could_not_add_ssh_key": "Nepodařilo se přidat klíč SSH", + "username_rule": "Uživatelské jméno musí obsahovat pouze malá písmena latinky, číslice a podtržítka, nesmí začínat číslicí" + }, + "record": { + "root": "Kořenová doména", + "api": "API SelfPrivacy", + "cloud": "Oblak souborů", + "git": "Server Git", + "social": "Sociální síť", + "password": "Správce hesel", + "vpn": "VPN", + "mx": "Záznam MX", + "dmarc": "Záznam DMARC", + "spf": "Záznam SPF", + "dkim": "Klíč DKIM", + "meet": "Videokonference" + }, + "domain": { + "card_title": "Doména", + "ok": "Záznamy jsou v pořádku", + "error": "Zjištěné problémy", + "error_subtitle": "Klepnutím sem je opravíte", + "refreshing": "Obnovení stavu…", + "services_title": "Služby", + "services_subtitle": "Pro každou službu jsou vyžadovány záznamy typu \"A\".", + "email_title": "Email", + "email_subtitle": "Záznamy nezbytné pro bezpečnou výměnu emailů.", + "update_list": "Aktualizace seznamu", + "screen_title": "Doména a DNS", + "uninitialized": "Data ještě nejsou načtena" + }, + "backup": { + "card_title": "Záloha", + "reupload_key": "Vynutit klíč k opětovnému nahrání", + "reuploaded_key": "Znovu nahraný klíč", + "initialize": "Inicializace", + "waiting_for_rebuild": "První zálohu budete moci vytvořit během několika minut.", + "restore": "Obnovení ze zálohy", + "no_backups": "Zatím nejsou k dispozici žádné zálohy", + "creating": "Vytvoření nové zálohy: {}%", + "restoring": "Obnovení ze zálohy", + "error_pending": "Server vrátil chybu, zkontrolujte ji níže", + "refresh": "Stav obnovení", + "refetch_backups": "Opětovné načtení seznamu záloh", + "description": "Zachrání vás v případě incidentu: útoku hackerů, vymazání serveru atd.", + "create_new": "Vytvoření nové zálohy", + "restore_alert": "Chystáte se obnovit ze zálohy vytvořené dne {}. Všechna aktuální data budou ztracena. Jste si jisti?", + "refetching_list": "Za několik minut bude seznam aktualizován" + }, + "storage": { + "card_title": "Úložiště serveru", + "status_ok": "Využití disku je v pořádku", + "status_error": "Málo místa na disku", + "disk_usage": "{} použito", + "disk_total": "{} celkem - {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Byty", + "extend_volume_button": "Rozšíření objemu", + "extending_volume_title": "Rozšíření objemu", + "extending_volume_price_info": "Cena je uvedena včetně DPH a je odhadnuta na základě cenových údajů poskytnutých společností Hetzner. Po změně velikosti bude server restartován.", + "extending_volume_error": "Nepodařilo se inicializovat rozšíření svazku.", + "size": "Velikost", + "euro": "Euro", + "data_migration_title": "Migrace dat", + "data_migration_notice": "Během migrace budou všechny služby vypnuty.", + "start_migration_button": "Zahájení migrace", + "migration_process": "Migrace…", + "migration_done": "Dokončení", + "extending_volume_description": "Změna velikosti svazku vám umožní uložit na server více dat, aniž byste museli rozšiřovat samotný server. Svazek lze pouze rozšířit: zmenšení není možné." + }, + "service_page": { + "open_in_browser": "Otevřít v prohlížeči", + "disable": "Zakázat službu", + "enable": "Povolení služby", + "move": "Přesun do jiného svazku", + "status": { + "active": "Zprovoznění a provoz", + "inactive": "Zastaveno", + "off": "Bezbariérový", + "activating": "Aktivace", + "reloading": "Restartování", + "failed": "Nepodařilo se spustit", + "deactivating": "Deaktivace" + }, + "restart": "Restartování služby", + "uses": "Používá {usage} na {volume}" + }, + "mail": { + "title": "E-mail", + "subtitle": "E-mail pro společnost a rodinu.", + "login_info": "Použijte uživatelské jméno a heslo z karty uživatelů. Port IMAP je 143 se STARTTLS, port SMTP je 587 se STARTTLS." + }, + "cloud": { + "title": "Cloudové úložiště", + "subtitle": "Nedovolte cloudovým službám číst vaše data pomocí služby NextCloud.", + "login_info": "Přihlašovací jméno je admin, heslo je stejné jako u hlavního uživatele. Vytvoření nových účtů v rozhraní Nextcloud." + }, + "password_manager": { + "title": "Správce hesel", + "login_info": "Na webových stránkách si musíte vytvořit účet.", + "subtitle": "Základna vašeho zabezpečení. Bitwarden vám pomůže vytvářet, ukládat a přesouvat hesla mezi zařízeními a také je zadávat na vyžádání pomocí automatického doplňování." + }, + "video": { + "title": "Videomeet", + "subtitle": "Zoom a Google Meet jsou dobré, ale Jitsi Meet je hodnotná alternativa, která vám navíc dává jistotu, že vás nikdo neposlouchá.", + "login_info": "Není potřeba žádný účet." + }, + "social_network": { + "title": "Sociální síť", + "login_info": "Na webových stránkách si musíte vytvořit účet.", + "subtitle": "Je těžké tomu uvěřit, ale je možné vytvořit si vlastní sociální síť s vlastními pravidly a cílovou skupinou." + }, + "git": { + "title": "Server Git", + "subtitle": "Soukromá alternativa ke Githubu, která patří vám, ale ne Microsoftu.", + "login_info": "Na webových stránkách si musíte vytvořit účet. První uživatel se stane administrátorem." + }, + "vpn": { + "title": "Server VPN", + "subtitle": "Soukromý server VPN" + }, + "recovering": { + "recovery_main_header": "Připojení k existujícímu serveru", + "domain_recover_placeholder": "Vaše doména", + "domain_recover_error": "Server s takovou doménou nebyl nalezen", + "method_select_description": "Vyberte metodu obnovy:", + "method_select_other_device": "Mám přístup na jiném zařízení", + "method_select_recovery_key": "Mám klíč pro obnovení", + "method_select_nothing": "Nic z toho nemám", + "method_device_button": "Obdržel jsem svůj žeton", + "method_device_input_description": "Zadejte svůj autorizační token", + "method_device_input_placeholder": "Token", + "method_recovery_input_description": "Zadejte svůj klíč k obnovení", + "fallback_select_description": "Co přesně máte? Vyberte první dostupnou možnost:", + "fallback_select_token_copy": "Kopie tokenu autentizace z jiné verze aplikace.", + "fallback_select_root_ssh": "Kořenový přístup SSH k serveru.", + "fallback_select_provider_console": "Přístup ke konzole serveru mého prodiveru.", + "authorization_failed": "Nelze se přihlásit pomocí tohoto klíče", + "server_provider_connected": "Připojení k poskytovateli serveru", + "server_provider_connected_description": "Komunikace navázána. Zadejte svůj token s přístupem k {}:", + "server_provider_connected_placeholder": "Token poskytovatele serveru", + "confirm_server": "Potvrzení serveru", + "confirm_server_accept": "Ano! To je ono", + "confirm_server_decline": "Výběr jiného serveru", + "choose_server": "Výběr serveru", + "choose_server_description": "Nepodařilo se nám zjistit, ke kterému serveru se snažíte připojit.", + "no_servers": "Na vašem účtu nejsou k dispozici žádné servery.", + "modal_confirmation_title": "Je to skutečně váš server?", + "modal_confirmation_description": "Pokud se připojíte k nesprávnému serveru, můžete přijít o všechna data.", + "modal_confirmation_dns_valid": "Reverzní DNS je platný", + "modal_confirmation_dns_invalid": "Reverzní DNS ukazuje na jinou doménu", + "modal_confirmation_ip_invalid": "IP není stejná jako v záznamu DNS", + "confirm_cloudflare": "Připojení ke službě CloudFlare", + "confirm_cloudflare_description": "Zadejte token Cloudflare s přístupem k {}:", + "confirm_backblaze": "Připojení k službě Backblaze", + "generic_error": "Operace se nezdařila, zkuste to prosím znovu.", + "domain_recovery_description": "Zadejte doménu serveru, ke které chcete získat přístup:", + "method_device_description": "Otevřete aplikaci v jiném zařízení a přejděte na stránku zařízení. Stisknutím tlačítka \"Přidat zařízení\" získáte token.", + "fallback_select_provider_console_hint": "Například: Hetzner.", + "confirm_server_description": "Našel jsem váš server! Potvrďte, že je to ten správný:", + "domain_not_available_on_token": "Vybraná doména není na tomto tokenu k dispozici.", + "modal_confirmation_ip_valid": "IP je stejná jako v záznamu DNS", + "confirm_backblaze_description": "Zadejte token Backblaze s přístupem k úložišti záloh:" + }, + "devices": { + "main_screen": { + "header": "Zařízení", + "description": "Tato zařízení mají plný přístup k serveru prostřednictvím aplikace SelfPrivacy.", + "tip": "Stisknutím tlačítka na zařízení zrušíte přístup.", + "this_device": "Toto zařízení", + "other_devices": "Ostatní zařízení", + "authorize_new_device": "Autorizace nového zařízení", + "access_granted_on": "Přístup udělen na {}" + }, + "revoke_device_alert": { + "header": "Zrušit přístup?", + "description": "Zařízení {} již nebude mít přístup k serveru.", + "yes": "Zrušit", + "no": "Zrušit" + }, + "add_new_device_screen": { + "header": "Autorizace nového zařízení", + "description": "Zadejte klíč zařízení, které chcete autorizovat:", + "please_wait": "Počkejte prosím", + "tip": "Klíč je platný po dobu 10 minut.", + "expired": "Platnost klíče vypršela.", + "get_new_key": "Získat nový klíč" + } + }, + "not_ready_card": { + "in_menu": "Server ještě není nastaven. Pro další práci dokončete nastavení pomocí průvodce nastavením." + }, + "recovery_key": { + "key_connection_error": "Nepodařilo se připojit k serveru.", + "key_synchronizing": "Synchronizace…" } } From b644c7d2183254ee21548efc1b78af1f1e7821e4 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 17:38:23 +0000 Subject: [PATCH 576/732] Translated using Weblate (Russian) Currently translated at 99.0% (423 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 39 ++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 054b2522..2dc64913 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -33,7 +33,8 @@ "apply": "Применить", "done": "Готово", "continue": "Продолжить", - "alert": "Уведомление" + "alert": "Уведомление", + "app_name": "SelfPrivacy" }, "more_page": { "configuration_wizard": "Мастер настройки", @@ -46,7 +47,8 @@ }, "console_page": { "title": "Консоль", - "waiting": "Ждём инициализации…" + "waiting": "Ждём инициализации…", + "copy": "Копировать" }, "about_us_page": { "title": "О проекте SelfPrivacy" @@ -64,7 +66,10 @@ "reset_config_title": "Сброс настроек", "reset_config_description": "Сбросить API ключи, а также root пользователя", "delete_server_title": "Удалить сервер", - "delete_server_description": "Действие приведёт к удалению сервера. После этого он будет недоступен." + "delete_server_description": "Действие приведёт к удалению сервера. После этого он будет недоступен.", + "system_dark_theme_title": "Системная тема по-умолчанию", + "system_dark_theme_description": "Использкуйте светлуж или темную темы в зависимости от системных настроек", + "dangerous_settings": "Опасные настройки" }, "ssh": { "title": "SSH ключи", @@ -269,7 +274,8 @@ "could_not_add_ssh_key": "Не удалось создать SSH ключ", "username_rule": "Имя может содержать только маленькие латинские буквы, цифры, подчёркивания, не может начинаться с цифр", "email_login": "Авторизация по Email", - "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована." + "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована.", + "details_title": "Пользовательские данные" }, "initializing": { "dns_provider_description": "Это позволит связать ваш домен с IP адресом:", @@ -333,7 +339,20 @@ "enter_username_and_password": "Введите имя пользователя и сложный пароль", "finish": "Всё инициализировано", "checks": "Проверок выполнено: \n{} / {}", - "select_dns": "Сейчас выберите DNS провайдера" + "select_dns": "Сейчас выберите DNS провайдера", + "steps": { + "hosting": "Хостинг", + "server_type": "Тип сервера", + "nixos_installation": "Установка NixOS", + "dns_provider": "DNS провайдер", + "backups_provider": "Резервные копии", + "domain": "Домен", + "master_account": "Мастер аккаунт", + "server": "Сервер", + "dns_setup": "Установка DNS", + "server_reboot": "Перезагрузка сервера", + "final_checks": "Финальные проверки" + } }, "recovering": { "generic_error": "Ошибка проведения операции, попробуйте ещё раз.", @@ -476,5 +495,15 @@ "root_name": "Имя пользователя не может быть 'root'", "length_not_equal": "Длина строки [], должна быть равна {}", "length_longer": "Длина строки [], должна быть меньше либо равна {}" + }, + "support": { + "title": "Поддержка SelfPrivacy" + }, + "developer_settings": { + "title": "Настройки разработчика", + "subtitle": "Эти настройки предназначены только для отладки. Не изменяйте их, если не знаете, что делаете.", + "server_setup": "Настройка сервера", + "use_staging_acme": "Использование промежуточного ACME сервера", + "use_staging_acme_description": "Пересоберите приложение, чтобы изменить это значение." } } \ No newline at end of file From a303efde5aeb69d2b33028a78984f002eaeb85ee Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 23 Apr 2023 18:08:14 +0000 Subject: [PATCH 577/732] Translated using Weblate (Russian) Currently translated at 99.7% (426 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 2dc64913..b74c95a6 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -502,8 +502,11 @@ "developer_settings": { "title": "Настройки разработчика", "subtitle": "Эти настройки предназначены только для отладки. Не изменяйте их, если не знаете, что делаете.", - "server_setup": "Настройка сервера", - "use_staging_acme": "Использование промежуточного ACME сервера", - "use_staging_acme_description": "Пересоберите приложение, чтобы изменить это значение." + "server_setup": "Мастер установки сервера", + "use_staging_acme": "Использование тестового ACME сервера", + "use_staging_acme_description": "Пересоберите приложение, чтобы изменить это значение.", + "routing": "Роулинг приложения", + "reset_onboarding": "Сбросить флаг посещения приветствия", + "cubit_statuses": "Текущий статут кубитов загрузки" } } \ No newline at end of file From 1014df7ceacdc21e2cebe5fb4c2199cfbf6ec3c8 Mon Sep 17 00:00:00 2001 From: FoxMeste Date: Sun, 23 Apr 2023 21:40:02 +0000 Subject: [PATCH 578/732] Translated using Weblate (English) Currently translated at 100.0% (427 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/en/ --- assets/translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 70756bfa..fc7e1eb2 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -395,7 +395,7 @@ "fallback_select_description": "What exactly do you have? Pick the first available option:", "fallback_select_token_copy": "Copy of auth token from other version of the application.", "fallback_select_root_ssh": "Root SSH access to the server.", - "fallback_select_provider_console": "Access to the server console of my prodiver.", + "fallback_select_provider_console": "Access to the server console of my provider.", "authorization_failed": "Couldn't log in with this key", "fallback_select_provider_console_hint": "For example: Hetzner.", "server_provider_connected": "Connect to your Server Provider", From fa8e588772074c43992e29cc35114b146817d84d Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 19:35:45 +0000 Subject: [PATCH 579/732] Translated using Weblate (Russian) Currently translated at 99.7% (426 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index b74c95a6..be4a807b 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -68,7 +68,7 @@ "delete_server_title": "Удалить сервер", "delete_server_description": "Действие приведёт к удалению сервера. После этого он будет недоступен.", "system_dark_theme_title": "Системная тема по-умолчанию", - "system_dark_theme_description": "Использкуйте светлуж или темную темы в зависимости от системных настроек", + "system_dark_theme_description": "Используйте светлую или темную темы в зависимости от системных настроек", "dangerous_settings": "Опасные настройки" }, "ssh": { @@ -505,8 +505,9 @@ "server_setup": "Мастер установки сервера", "use_staging_acme": "Использование тестового ACME сервера", "use_staging_acme_description": "Пересоберите приложение, чтобы изменить это значение.", - "routing": "Роулинг приложения", + "routing": "Маршрутизация приложений", "reset_onboarding": "Сбросить флаг посещения приветствия", - "cubit_statuses": "Текущий статут кубитов загрузки" + "cubit_statuses": "Текущий статут кубитов загрузки", + "reset_onboarding_description": "Сброс переключателя включения для повторного отображения экрана включения" } } \ No newline at end of file From 65e51a0fe92dd680e0c2c247164db19a30b94373 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 21:01:54 +0000 Subject: [PATCH 580/732] Translated using Weblate (Russian) Currently translated at 100.0% (6 of 6 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: about Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-about/ru/ --- assets/markdown/about-ru.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/about-ru.md b/assets/markdown/about-ru.md index c93abce2..15c0f237 100644 --- a/assets/markdown/about-ru.md +++ b/assets/markdown/about-ru.md @@ -5,7 +5,7 @@ ### Миссия проекта -Цифровая независимость и приватность доступная каждому. +Цифровая независимость и приватность, доступная каждому ### Цель From 240d66d156efd0c331e22667f93a52728b4ce235 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 21:07:34 +0000 Subject: [PATCH 581/732] Translated using Weblate (Russian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/ru/ --- assets/markdown/how_cloudflare-ru.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/assets/markdown/how_cloudflare-ru.md b/assets/markdown/how_cloudflare-ru.md index d6cc0072..12a9a139 100644 --- a/assets/markdown/how_cloudflare-ru.md +++ b/assets/markdown/how_cloudflare-ru.md @@ -1,3 +1,19 @@ +### Как получить токен API Cloudflare +1. Перейдите по следующей ссылке: https://dash.cloudflare.com/. +2. в правом углу нажмите на значок профиля (человечек в круге). Для мобильной версии сайта, в левом верхнем углу нажмите на кнопку **Menu** (три горизонтальные полоски), в выпадающем меню нажмите на **My Profile**. +3. На выбор предлагаются четыре категории настроек: *Communication*, *Authentication*, **API Tokens**, *Session*. Выберите **API Tokens**. +4. Нажмите на кнопку **Create token**. +5. Спуститесь в самый низ, увидите поле **Create Custom Token** и нажмите кнопку **Get Started** справа. +6. В поле **Token Name** дайте имя вашему токену. +7. Далее у нас есть права доступа. В крайнем левом поле выберите **Zone**. В самом длинном поле, по центру, выберите **DNS**. В крайнем правом поле выберите **Edit**. +8. Далее, прямо под этой строкой, нажмите Добавить еще. Появится аналогичное поле. +9. В крайнем левом поле новой строки выберите, аналогично предыдущей строке - **Zone**. В центральном - немного иначе. Здесь выберите то же, что и в левом - **Zone**. В крайнем правом поле выберите **Read**. +10. Далее посмотрите на **Resources Zone**. Под этой надписью находится строка с двумя полями. В левом должно быть **Include**, а в правом - **Specific Zone**. Как только вы выберете Specific Zone, справа появится еще одно поле. Выберите в нем свой домен. +11. Перейдите в самый низ и нажмите синюю кнопку **Continue to Summary**. +12. Проверьте, все ли вы сделали правильно. Должна присутствовать аналогичная строка: *Domain - DNS:Edit, Zone:Read*. +13. Нажмите на **Create Token**. +14. Копируем созданный токен и сохраняем его в надежном месте (желательно в менеджере паролей). + ### Как получить Cloudflare API Token 1. Переходим по [ссылке](https://dash.cloudflare.com/) и авторизуемся в ранее созданном аккаунте. https://dash.cloudflare.com/ 2. В правом верхнем углу кликаем на иконку профиля (для мобильной версии сайта: в верхнем левом углу нажимаем кнопку **Меню** с тремя горизонтальными полосками). В выпавшем меню кликаем на пункт **My Profile**. @@ -14,5 +30,3 @@ 10. Проверяем, всё ли мы правильно выбрали. Должна присутствовать подобная строка: ваш.домен — **DNS:Edit, Zone:Read**. 11. Нажимаем **Create Token**. 12. Копируем созданный токен, и сохраняем его в надёжном месте (желательно — в менеджере паролей). - -![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) From d8c006aa3cea1bb661eac9f933a8c007975a3797 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 18:20:39 +0000 Subject: [PATCH 582/732] Translated using Weblate (Russian) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/ru/ --- assets/markdown/how_digital_ocean-ru.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_digital_ocean-ru.md b/assets/markdown/how_digital_ocean-ru.md index dc6355c2..6913c1fa 100644 --- a/assets/markdown/how_digital_ocean-ru.md +++ b/assets/markdown/how_digital_ocean-ru.md @@ -1,12 +1,12 @@ -### How to get Digital Ocean API Token -1. Visit the following [link](https://cloud.digitalocean.com/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Go to the "API" link on the left bar. -4. Click on the "Generate New Token". -5. Enter any name for the token. -6. Put expiration time to "No expiry". -7. Check the "Write (optional)" checkbox. -8. Now click on the "Generate Token" button. -9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file +### Как получить API-токен Digital Ocean +1. Перейдите по следующей [link](https://cloud.digitalocean.com/) и войдите + в только что созданную учетную запись. +2. Войдите в ранее созданный проект. Если вы еще не создали проект, + тогда приступайте. +3. Перейдите по ссылке "API" на левой панели. +4. Нажмите на кнопку "Generate New Token". +5. Введите любое имя для токена. +6. Установите срок действия на "No expiry". +7. Установите флажок "Write (optional)". +8. Теперь нажмите на кнопку "Generate Token". +9. После этого на экране появится токен. Храните его в любом надежном месте, лучше всего в менеджере паролей. \ No newline at end of file From 91fe44a729add2cbf784c77cbf5490689e84171b Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 19:55:06 +0000 Subject: [PATCH 583/732] Translated using Weblate (Czech) Currently translated at 99.7% (426 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/cs/ --- assets/translations/cs.json | 115 ++++++++++++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 6 deletions(-) diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 1ea5893c..f537272c 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -33,7 +33,8 @@ "done": "Hotovo", "continue": "Pokračovat", "alert": "Upozornění", - "later": "Přeskočit na nastavení později" + "later": "Přeskočit na nastavení později", + "app_name": "SelfPrivacy" }, "about_application_page": { "title": "O příloze", @@ -52,7 +53,8 @@ }, "console_page": { "title": "Konzole", - "waiting": "Čekání na inicializaci…" + "waiting": "Čekání na inicializaci…", + "copy": "Kopírovat" }, "application_settings": { "title": "Nastavení aplikace", @@ -61,7 +63,10 @@ "reset_config_description": "Obnovení klíčů api a uživatele root", "delete_server_title": "Odstranit server", "dark_theme_description": "Přepnutí tématu aplikace", - "delete_server_description": "Tím odstraníte svůj server. Nebude již přístupný." + "delete_server_description": "Tím odstraníte svůj server. Nebude již přístupný.", + "system_dark_theme_title": "Výchozí téma systému", + "system_dark_theme_description": "Použití světlého nebo tmavého motivu v závislosti na nastavení systému", + "dangerous_settings": "Nebezpečná nastavení" }, "ssh": { "title": "Klíče SSH", @@ -181,7 +186,20 @@ "loading_domain_list": "Načítání seznamu domén", "enter_username_and_password": "Zadejte uživatelské jméno a silné heslo", "finish": "Vše je inicializováno", - "checks": "Kontroly byly dokončeny\n{} z {}" + "checks": "Kontroly byly dokončeny\n{} z {}", + "steps": { + "server": "Server", + "dns_setup": "Instalace služby DNS", + "hosting": "Hostování", + "server_type": "Typ serveru", + "dns_provider": "Poskytovatel DNS", + "backups_provider": "Zálohování", + "domain": "Doména", + "master_account": "Hlavní účet", + "nixos_installation": "Instalace systému NixOS", + "server_reboot": "Restartování serveru", + "final_checks": "Závěrečné kontroly" + } }, "about_us_page": { "title": "O nás" @@ -206,7 +224,8 @@ "delete_user": "Odstranění uživatele", "not_ready": "Připojte prosím server, doménu a DNS na kartě Poskytovatelé, abyste mohli přidat prvního uživatele", "could_not_add_ssh_key": "Nepodařilo se přidat klíč SSH", - "username_rule": "Uživatelské jméno musí obsahovat pouze malá písmena latinky, číslice a podtržítka, nesmí začínat číslicí" + "username_rule": "Uživatelské jméno musí obsahovat pouze malá písmena latinky, číslice a podtržítka, nesmí začínat číslicí", + "details_title": "Údaje o uživateli" }, "record": { "root": "Kořenová doména", @@ -401,6 +420,90 @@ }, "recovery_key": { "key_connection_error": "Nepodařilo se připojit k serveru.", - "key_synchronizing": "Synchronizace…" + "key_synchronizing": "Synchronizace…", + "key_receiving_done": "Hotovo!", + "generation_error": "Nepodařilo se vygenerovat klíč pro obnovení. {}", + "key_main_header": "Klíč pro obnovu", + "key_main_description": "Vyžaduje se pro autorizaci SelfPrivacy, pokud nejsou k dispozici autorizovaná zařízení.", + "key_amount_toggle": "Omezit používání", + "key_amount_field_title": "Maximální počet použití", + "key_duedate_toggle": "Omezit dobu používání", + "key_duedate_field_title": "Datum vypršení platnosti", + "key_receive_button": "Přijmout klíč", + "key_valid": "Váš klíč je platný", + "key_invalid": "Váš klíč již není platný", + "key_valid_until": "Platí do {}", + "key_valid_for": "{} můžete použít vícekrát", + "key_creation_date": "Vytvořeno {}", + "key_replace_button": "Generování nového klíče", + "key_receiving_description": "Tento klíč si zapište na bezpečné místo. Umožní vám plný přístup k serveru:", + "key_receiving_info": "Tento klíč se již nebude zobrazovat, ale můžete jej nahradit novým." + }, + "timer": { + "sec": "{} sek" + }, + "jobs": { + "title": "Seznam pracovních míst", + "start": "Start", + "empty": "Žádná pracovní místa", + "create_user": "Vytvoření uživatele", + "delete_user": "Odstranění uživatele", + "service_turn_off": "Zastavte", + "service_turn_on": "Zapnout", + "job_added": "Přidaná práce", + "run_jobs": "Spouštění úloh", + "reboot_success": "Server se restartuje", + "reboot_failed": "Server se nepodařilo restartovat. Zkontrolujte protokoly aplikace.", + "config_pull_failed": "Nepodařilo se stáhnout aktualizaci konfigurace. Přesto byla spuštěna aktualizace softwaru.", + "upgrade_success": "Zahájena aktualizace serveru", + "upgrade_failed": "Aktualizace serveru nefungovala", + "upgrade_server": "Aktualizace serveru", + "reboot_server": "Restartování serveru", + "create_ssh_key": "Vytvoření klíče SSH pro {}", + "delete_ssh_key": "Odstranění klíče SSH pro {}", + "server_jobs": "Úlohy na serveru", + "reset_user_password": "Obnovení hesla uživatele", + "generic_error": "Nelze se připojit k serveru!" + }, + "validations": { + "already_exist": "Již existuje", + "invalid_format": "Nesprávný formát", + "root_name": "Nemůže být 'root'", + "required": "Povinné pole", + "invalid_format_password": "Nesmí obsahovat prázdné znaky", + "invalid_format_ssh": "Musí dodržovat formát klíče SSH", + "length_not_equal": "Délka je [], mělo by být {}", + "length_longer": "Délka je [], měla by být kratší nebo rovna {}." + }, + "modals": { + "dns_removal_error": "Nepodařilo se odstranit záznamy DNS.", + "server_deletion_error": "Nepodařilo se odstranit aktivní server.", + "server_validators_error": "Nelze načíst seznam serverů.", + "already_exists": "Takový server již existuje.", + "unexpected_error": "Neočekávaná chyba při umisťování na straně poskytovatele.", + "destroy_server": "Zničit server a vytvořit nový?", + "try_again": "Mám to zkusit znovu?", + "are_you_sure": "Jste si jistý?", + "purge_all_keys": "Vyčistit všechny ověřovací klíče?", + "purge_all_keys_confirm": "Ano, vyčistěte všechny mé žetony", + "delete_server_volume": "Smazat server a svazek?", + "reboot": "Restartovat", + "you_cant_use_this_api": "Toto rozhraní API nelze použít pro doménu s podobnou TLD.", + "yes": "Ano", + "no": "Ne" + }, + "support": { + "title": "Podpora SelfPrivacy" + }, + "developer_settings": { + "title": "Nastavení vývojáře", + "subtitle": "Tato nastavení slouží pouze k ladění. Neměňte je, pokud nevíte, co děláte.", + "server_setup": "Nastavení serveru", + "use_staging_acme": "Použití testovacího serveru ACME", + "use_staging_acme_description": "Chcete-li tuto hodnotu změnit, znovu sestavte aplikaci.", + "routing": "Směrování aplikací", + "reset_onboarding": "Obnovení uvítací vlajky pro návštěvu", + "reset_onboarding_description": "Resetování vypínače pro opětovné zobrazení obrazovky pro zapnutí napájení", + "cubit_statuses": "Stavy nakládky zařízení Cubit" } } From 5fa0b0c23cbdc9e5e8165fa0b8f7fb5fdee54c78 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 19:00:50 +0000 Subject: [PATCH 584/732] Translated using Weblate (Belarusian) Currently translated at 99.7% (426 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/be/ --- assets/translations/be.json | 43 ++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/assets/translations/be.json b/assets/translations/be.json index 83f68786..9aff7934 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -56,7 +56,20 @@ "select_provider_email_notice": "Хостынг электроннай пошты недаступны для новых кліентаў. Разблакаваць можна будзе пасля першай аплаты.", "select_provider_site_button": "Наведаць сайт", "connect_to_server_provider": "Аўтарызавацца ў ", - "connect_to_server_provider_text": "З дапамогай API токена праграма SelfPrivacy зможа ад вашага імя замовіць і наладзіць сервер" + "connect_to_server_provider_text": "З дапамогай API токена праграма SelfPrivacy зможа ад вашага імя замовіць і наладзіць сервер", + "steps": { + "nixos_installation": "Ўстаноўка NixOS", + "hosting": "Хостынг", + "server_type": "Тып сервера", + "dns_provider": "DNS правайдэр", + "backups_provider": "Рэзервовыя копіі", + "domain": "Дамен", + "master_account": "Майстар акаўнт", + "server": "Сервер", + "dns_setup": "Устаноўка DNS", + "server_reboot": "Перазагрузка сервера", + "final_checks": "Фінальныя праверкі" + } }, "recovering": { "generic_error": "Памылка правядзення аперацыі, паспрабуйце яшчэ раз.", @@ -160,7 +173,8 @@ "apply": "Ужыць", "done": "Гатова", "continue": "Працягнуць", - "alert": "Паведамленне" + "alert": "Паведамленне", + "app_name": "SelfPrivacy" }, "recovery_key": { "key_connection_error": "Не ўдалося злучыцца з серверам.", @@ -248,7 +262,10 @@ "dark_theme_title": "Цёмная тэма", "dark_theme_description": "Змяніць каляровую тэму", "reset_config_title": "Скід налад", - "delete_server_title": "Выдаліць сервер" + "delete_server_title": "Выдаліць сервер", + "system_dark_theme_title": "Сістэмная тэма па-змаўчанні", + "system_dark_theme_description": "Выкарыстоўвайце светлую ці цёмную тэмы ў залежнасці ад сістэмных налад", + "dangerous_settings": "Небяспечныя наладкі" }, "ssh": { "root_subtitle": "Уладальнікі паказаных тут ключоў атрымліваюць поўны доступ да дадзеных і налад сервера. Дадавайце выключна свае ключы.", @@ -371,7 +388,8 @@ }, "console_page": { "title": "Кансоль", - "waiting": "Чакаем ініцыялізацыі…" + "waiting": "Чакаем ініцыялізацыі…", + "copy": "Капіяваць" }, "about_us_page": { "title": "Аб праекце SelfPrivacy" @@ -470,6 +488,21 @@ "could_not_add_ssh_key": "Не ўдалося стварыць SSH ключ", "username_rule": "Імя можа мець толькі маленькія лацінскія літары, лічбы, падкрэслення і не можа пачынацца з лічбы", "email_login": "Аўтарызацыя па Email", - "no_ssh_notice": "Для гэтага карыстальніка створаны толькі SSH і Email акаўнты. Адзіная аўтарызацыя для ўсіх сэрвісаў яшчэ не рэалізавана." + "no_ssh_notice": "Для гэтага карыстальніка створаны толькі SSH і Email акаўнты. Адзіная аўтарызацыя для ўсіх сэрвісаў яшчэ не рэалізавана.", + "details_title": "Карыстальніцкія дадзеныя" + }, + "developer_settings": { + "reset_onboarding_description": "Скід перамыкача ўключэння для паўторнага адлюстравання экрана ўключэння", + "title": "Налады распрацоўніка", + "subtitle": "Гэтыя налады прызначаны толькі для адладкі. Не мяняйце іх, калі не ведаеце, што робіце.", + "server_setup": "Майстар усталёўкі сервера", + "use_staging_acme": "Выкарыстанне тэставага ACME сервера", + "use_staging_acme_description": "Перазбярыце дадатак, каб змяніць гэта значэнне.", + "routing": "Маршрутызацыя прыкладанняў", + "reset_onboarding": "Скінуць сцяг наведвання прывітання", + "cubit_statuses": "Бягучы статут кубітаў загрузкі" + }, + "support": { + "title": "Падтрымка SelfPrivacy" } } \ No newline at end of file From 49cc8768ec7dc64cb2dd725df62435effa0191bd Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 19:14:04 +0000 Subject: [PATCH 585/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_hetzner Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_hetzner/be/ --- assets/markdown/how_hetzner-be.md | 40 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/assets/markdown/how_hetzner-be.md b/assets/markdown/how_hetzner-be.md index 6f859c18..5f07a6df 100644 --- a/assets/markdown/how_hetzner-be.md +++ b/assets/markdown/how_hetzner-be.md @@ -1,23 +1,19 @@ -### How to get Hetzner API Token -1. Visit the following [link](https://console.hetzner.cloud/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Hover side panel with mouse cursor. Panel should expand and show us - a menu. We're interested in the last one — **Security** (icon of a - key). -4. Next, in the upper part of an interface, we can see approximately - the following: **SSH Keys, API Tokens, Certificates, Members.** You - need **API Tokens**. Click on it. -5. In the right part of the interface, there should be **Generate API - token** button. If you're using mobile version og a webpage, in the - lower right corner you'll see **red cross**. Push that button. -6. In the **Description** field, give our token a name (this can be any - name that you like. It doesn't influence the essence. -7. Under the **Description** field we can see a possibility to choose - **permissions**. Pick **Read & Write**. -8. Click **Generate API Token.** -9. After that, our key will be shown. Store it in the reliable place, - or in the password manager, which is better. +### Як атрымаць Hetzner API токен. +1. Перайдзіце па наступнай [link](https://console.hetzner.cloud/) і ўвайдзіце +ў толькі што створаны акаўнт. +2. Увайдзіце ў раней створаны праект. Калі вы яшчэ не стварылі яго, калі ласка працягвайце. +3. Навядзіце курсор мышы на бакавую панэль. Панэль павінна разгарнуцца і паказаць нас + меню. Нас цікавіць апошні — **Security** (значок ключа). +4. Далей у верхняй частцы інтэрфейсу мы бачым прыкладна наступнае: **SSH Keys, API Tokens, Certificates, Members.** Вам патрэны **API Tokens**. Націсніце на яго. +5. У правай частцы інтэрфейсу павінна быць кнопка **Generate API + token**. Калі вы карыстаецеся мабільнай версіяй вэб-старонкі, у + у правым ніжнім куце вы ўбачыце **red cross**. Націсніце гэтую кнопку. +6. У полі **Description** дайце нашаму токену імя (гэта можа быць любое + імя, якое вам падабаецца. На сутнасць гэта не ўплывае. +7. Пад полем **Description** мы бачым магчымасць выбару +**permissions**. Выберыце **Read & Write**. +8. Націсніце на **Generate API Token.** +9. Пасля гэтага будзе паказаны наш ключ. Захоўвайце яго ў надзейным месцы, + або ў менеджэры пароляў, што лепш. -![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) +![Настройка токена Hetzner](resource:assets/images/gifs/Hetzner.gif) From 97561b31f1871014e813e4fbee32ebd47fa99711 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 20:43:44 +0000 Subject: [PATCH 586/732] Translated using Weblate (Czech) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_hetzner Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_hetzner/cs/ --- assets/markdown/how_hetzner-cs.md | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/assets/markdown/how_hetzner-cs.md b/assets/markdown/how_hetzner-cs.md index 6f859c18..500efe54 100644 --- a/assets/markdown/how_hetzner-cs.md +++ b/assets/markdown/how_hetzner-cs.md @@ -1,23 +1,23 @@ -### How to get Hetzner API Token -1. Visit the following [link](https://console.hetzner.cloud/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Hover side panel with mouse cursor. Panel should expand and show us - a menu. We're interested in the last one — **Security** (icon of a - key). -4. Next, in the upper part of an interface, we can see approximately - the following: **SSH Keys, API Tokens, Certificates, Members.** You - need **API Tokens**. Click on it. -5. In the right part of the interface, there should be **Generate API - token** button. If you're using mobile version og a webpage, in the - lower right corner you'll see **red cross**. Push that button. -6. In the **Description** field, give our token a name (this can be any - name that you like. It doesn't influence the essence. -7. Under the **Description** field we can see a possibility to choose - **permissions**. Pick **Read & Write**. -8. Click **Generate API Token.** -9. After that, our key will be shown. Store it in the reliable place, - or in the password manager, which is better. +### Jak získat Hetzner API Token +1. Navštivte následující [link](https://console.hetzner.cloud/) a podepište se. + k nově vytvořenému účtu. +2. Vstupte do dříve vytvořeného projektu. Pokud jste žádný nevytvořili, + pak prosím pokračujte. +3. Kurzorem myši najeďte na boční panel. Panel by se měl rozbalit a zobrazit nám + nabídku. Nás zajímá poslední z nich - **Security** (ikona tzv. + klávesy). +4. Dále v horní části rozhraní vidíme přibližně následující položky + následující: ***SSH Keys, API Tokens, Certificates, Members**. + potřebujete **API Tokens**. Klepněte na něj. +5. V pravé části rozhraní by se mělo nacházet **Generate API + token** tlačítko. Pokud používáte mobilní verzi og webové stránky, v části + pravém dolním rohu uvidíte **červený křížek**. Stiskněte toto tlačítko. +6. V poli **Description** pojmenujte náš token (může to být libovolný název). + název, který se vám líbí. Na podstatu to nemá vliv. +7. Pod polem **Description** vidíme možnost zvolit si. + **Permissions**. Vyberte možnost **Read && Write**. +8. Klikněte na tlačítko **Generate API Token**. +9. Poté se zobrazí náš klíč. Uložte jej na spolehlivé místo, + nebo ve správci hesel, což je lepší. -![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) +![Nastavení tokenu Hetzner](resource:assets/images/gifs/Hetzner.gif) From 6af96cf36fe25b2bd9f4f8b0b2f5721c95e132c2 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 20:05:34 +0000 Subject: [PATCH 587/732] Translated using Weblate (Czech) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_ssh Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_ssh/cs/ --- assets/markdown/how_fallback_ssh-cs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/markdown/how_fallback_ssh-cs.md b/assets/markdown/how_fallback_ssh-cs.md index ce90e76a..90b136d5 100644 --- a/assets/markdown/how_fallback_ssh-cs.md +++ b/assets/markdown/how_fallback_ssh-cs.md @@ -1,10 +1,10 @@ -Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` +Přihlaste se k serveru jako uživatel root a podívejte se na obsah souboru `/etc/nixos/userdata/tokens.json` ```sh cat /etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Tento soubor bude mít podobnou konstrukci: ```json { @@ -16,4 +16,4 @@ This file will have a similar construction: } ``` -Copy the token from the file and paste it in the next window. +Zkopírujte token ze souboru a vložte jej do dalšího okna. From f17d27647dbcacf80f57d7419b0654e8f8259bd2 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 20:50:28 +0000 Subject: [PATCH 588/732] Translated using Weblate (Czech) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_old Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_old/cs/ --- assets/markdown/how_fallback_old-cs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/markdown/how_fallback_old-cs.md b/assets/markdown/how_fallback_old-cs.md index c12504e7..2080eded 100644 --- a/assets/markdown/how_fallback_old-cs.md +++ b/assets/markdown/how_fallback_old-cs.md @@ -1,3 +1,3 @@ -In the next window, enter the token obtained from the console of the previous version of the application. +V dalším okně zadejte token získaný z konzoly předchozí verze aplikace. -Enter it without the word *Bearer*. +Zadejte ji bez slova *Bearer*. From da5c7520692aecefe3896d7beeb3a60b8f96bb47 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 20:17:59 +0000 Subject: [PATCH 589/732] Translated using Weblate (Czech) Currently translated at 83.3% (5 of 6 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: about Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-about/cs/ --- assets/markdown/about-cs.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/markdown/about-cs.md b/assets/markdown/about-cs.md index 3963aa6e..4d0a01e2 100644 --- a/assets/markdown/about-cs.md +++ b/assets/markdown/about-cs.md @@ -1,12 +1,12 @@ -### About us +### O nás More and more corporations want to control our data. We want to have full control of our **data** on our own. -### Our mission +### Naše poslání -Digital independence and privacy, available to everyone +Digitální nezávislost a soukromí dostupné všem -### Target +### Cíl -Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file +Rozvíjet program, který umožní každému nasadit své soukromé služby pro sebe a své sousedy. \ No newline at end of file From 19a4a2f5c3316e34526994b126923636d3f0e2e0 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 20:23:44 +0000 Subject: [PATCH 590/732] Translated using Weblate (Czech) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_backblaze Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_backblaze/cs/ --- assets/markdown/how_backblaze-cs.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/markdown/how_backblaze-cs.md b/assets/markdown/how_backblaze-cs.md index b1e341d1..f1a87840 100644 --- a/assets/markdown/how_backblaze-cs.md +++ b/assets/markdown/how_backblaze-cs.md @@ -1,8 +1,8 @@ -### How to get Backblaze API Token -1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm -2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. -3. Click on the blue **Generate New Master Application Key** button. -4. In the appeared pop-up window confirm the generation. -5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. +### Jak získat Backblaze API Token +1. Navštivte následující odkaz a autorizujte se: https://secure.backblaze.com/user_signin.htm +2. V levé části rozhraní vyberte položku **App Keys** v podkategorii **B2 Cloud Storage**. +3. Klikněte na modré tlačítko **Generate New Master Application Key** (Vygenerovat nový hlavní aplikační klíč**). +4. V zobrazeném vyskakovacím okně potvrďte vygenerování. +5. Save _keyID_ and _applicationKey_ in the safe place.. Například ve správci hesel. -![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) +![Nastavení tokenu Backblaze](resource:assets/images/gifs/Backblaze.gif) From a90037a4e5cfac647467a174e3db0b98a0ca7830 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 20:06:05 +0000 Subject: [PATCH 591/732] Translated using Weblate (Czech) Currently translated at 100.0% (8 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/cs/ --- assets/markdown/how_fallback_terminal-cs.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/markdown/how_fallback_terminal-cs.md b/assets/markdown/how_fallback_terminal-cs.md index 77c97efa..2866deff 100644 --- a/assets/markdown/how_fallback_terminal-cs.md +++ b/assets/markdown/how_fallback_terminal-cs.md @@ -1,17 +1,17 @@ -In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. +V ovládacím panelu serveru Hetzner přejděte na kartu **Rescue**. Poté klikněte na možnost **Enable rescue & power cycle**. -In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. +V části *Choose a Recue OS* vyberte **linux64** a v části *SSH Key* vyberte svůj klíč, pokud byl přidán do vašeho účtu Hetzner. -Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. +Klikněte na tlačítko **Enable rescue & power cycle** a počkejte, až se server restartuje. Na obrazovce se zobrazí přihlašovací jméno a heslo. Přihlaste se k uživateli root pomocí přihlašovacích údajů a hesla. -Mount your server file system and see the contents of the token file: +Připojte souborový systém serveru a zobrazte obsah souboru token: ```sh mount /dev/sda1 /mnt cat /mnt/etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +Tento soubor bude mít podobnou konstrukci: ```json { @@ -23,4 +23,4 @@ This file will have a similar construction: } ``` -Copy the token from the file and paste it in the next window. +Zkopírujte token ze souboru a vložte jej do dalšího okna. From 918aced080bf12769318ac305d0c2c98d295dae7 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 21:27:54 +0000 Subject: [PATCH 592/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/be/ --- assets/markdown/how_digital_ocean-be.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_digital_ocean-be.md b/assets/markdown/how_digital_ocean-be.md index dc6355c2..d817db12 100644 --- a/assets/markdown/how_digital_ocean-be.md +++ b/assets/markdown/how_digital_ocean-be.md @@ -1,12 +1,12 @@ -### How to get Digital Ocean API Token -1. Visit the following [link](https://cloud.digitalocean.com/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Go to the "API" link on the left bar. -4. Click on the "Generate New Token". -5. Enter any name for the token. -6. Put expiration time to "No expiry". -7. Check the "Write (optional)" checkbox. -8. Now click on the "Generate Token" button. -9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file +### Як атрымаць токен Digital Ocean API +1. Перайдзіце па наступнай [link](https://cloud.digitalocean.com/) і падпішыцеся + у толькі што створаны ўліковы запіс. +2. Увайдзіце ў раней створаны праект. Калі вы яго не стварылі, + тады, калі ласка, працягвайце. +3. Перайдзіце па спасылцы "API" на панэлі злева. +4. Націсніце на кнопку "Generation New Token". +5. Увядзіце любую назву токена. +6. Усталюйце час заканчэння тэрміну дзеяння на "No Expiry". +7. Усталюйце сцяжок "Write (optional)". +8. Цяпер націсніце на кнопку "Generate Token". +9. Пасля гэтага будзе паказаны токен. Захоўвайце яго ў любым надзейным месцы, пажадана ў менеджэры пароляў. \ No newline at end of file From 28a78640e83520a3538a3363117876a52e5a8e27 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 20:48:52 +0000 Subject: [PATCH 593/732] Translated using Weblate (Czech) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/cs/ --- assets/markdown/how_digital_ocean-cs.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_digital_ocean-cs.md b/assets/markdown/how_digital_ocean-cs.md index dc6355c2..9d20f2dd 100644 --- a/assets/markdown/how_digital_ocean-cs.md +++ b/assets/markdown/how_digital_ocean-cs.md @@ -1,12 +1,12 @@ -### How to get Digital Ocean API Token -1. Visit the following [link](https://cloud.digitalocean.com/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Go to the "API" link on the left bar. -4. Click on the "Generate New Token". -5. Enter any name for the token. -6. Put expiration time to "No expiry". -7. Check the "Write (optional)" checkbox. -8. Now click on the "Generate Token" button. -9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file +### Jak získat token API Digital Ocean +1. Navštivte následující [link](https://cloud.digitalocean.com/) a podepište se. + k nově vytvořenému účtu. +2. Vstupte do dříve vytvořeného projektu. Pokud jste žádný nevytvořili, + pak prosím pokračujte. +3. Přejděte na odkaz "API" na levé liště. +4. Klikněte na tlačítko "Generate New Token" (Vygenerovat nový token). +5. Zadejte libovolný název tokenu. +6. Nastavte dobu platnosti na "No expiry". +7. Zaškrtněte políčko "Write (optional)". +8. Nyní klikněte na tlačítko "Generate Token". +9. Poté se zobrazí token. Uložte jej na libovolné spolehlivé místo, nejlépe do správce hesel. \ No newline at end of file From 58f05cd6f6e6b8c38a7cfb7f229ba9698deeb113 Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 23 Apr 2023 18:30:06 +0000 Subject: [PATCH 594/732] Translated using Weblate (Azerbaijani) Currently translated at 99.7% (426 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/az/ --- assets/translations/az.json | 43 ++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index 1d9fb716..9cde2752 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -33,7 +33,8 @@ "alert": "Bildiriş", "services_title": "Şəxsi, şəxsi və müstəqil xidmətləriniz.", "loading": "Yüklənir…", - "apply": "Müraciət edin" + "apply": "Müraciət edin", + "app_name": "SelfPrivacy" }, "more_page": { "configuration_wizard": "Quraşdırma Sihirbazı", @@ -46,7 +47,8 @@ }, "console_page": { "title": "Konsol", - "waiting": "Başlama gözlənilir…" + "waiting": "Başlama gözlənilir…", + "copy": "Kopyalayın" }, "about_application_page": { "application_version_text": "Tətbiq versiyası {}", @@ -61,7 +63,10 @@ "reset_config_description": "API və Super İstifadəçi Açarlarını sıfırlayın", "delete_server_title": "Serveri silin", "dark_theme_description": "Rəng mövzusunu dəyişdirin", - "delete_server_description": "Əməliyyat serveri siləcək. Bundan sonra o, əlçatmaz olacaq." + "delete_server_description": "Əməliyyat serveri siləcək. Bundan sonra o, əlçatmaz olacaq.", + "system_dark_theme_title": "Defolt sistem mövzusu", + "system_dark_theme_description": "Sistem parametrlərindən asılı olaraq açıq və ya qaranlıq mövzudan istifadə edin", + "dangerous_settings": "Təhlükəli Parametrlər" }, "ssh": { "title": "SSH açarları", @@ -252,7 +257,8 @@ "could_not_delete_user": "İstifadəçini silmək alınmadı", "could_not_add_ssh_key": "SSH açarı yaratmaq alınmadı", "email_login": "E-poçt Avtorizasiyası", - "no_ssh_notice": "Bu istifadəçi üçün yalnız SSH və E-poçt hesabları yaradılmışdır. Bütün xidmətlər üçün vahid icazə hələ tətbiq edilməyib." + "no_ssh_notice": "Bu istifadəçi üçün yalnız SSH və E-poçt hesabları yaradılmışdır. Bütün xidmətlər üçün vahid icazə hələ tətbiq edilməyib.", + "details_title": "İstifadəçi məlumatları" }, "initializing": { "select_provider": "Aşağıda SelfPrivacy tərəfindən dəstəklənən provayderlərin seçimi var", @@ -311,7 +317,20 @@ "create_master_account": "Əsas hesab yaradın", "enter_username_and_password": "İstifadəçi adı və mürəkkəb parol daxil edin", "finish": "Hər şey işə salınıb", - "checks": "Yoxlamalar aparıldı:. \n{} / {}" + "checks": "Yoxlamalar aparıldı:. \n{} / {}", + "steps": { + "hosting": "Hostinq", + "server_type": "Server növü", + "dns_provider": "DNS provayderi", + "backups_provider": "Yedəkləmələr", + "domain": "Domen", + "master_account": "Master hesab", + "server": "Server", + "dns_setup": "DNS qurulması", + "nixos_installation": "NixOS quraşdırılması", + "server_reboot": "Serverin yenidən yüklənməsi", + "final_checks": "Son yoxlamalar" + } }, "recovering": { "domain_recovery_description": "Serverə daxil olmaq istədiyiniz domeni daxil edin:", @@ -471,5 +490,19 @@ }, "timer": { "sec": "{} san" + }, + "support": { + "title": "SelfPrivacy Dəstək" + }, + "developer_settings": { + "title": "Tərtibatçı Seçimləri\naçar", + "subtitle": "Bu parametrlər yalnız sazlama üçündür. Nə etdiyinizi bilmirsinizsə, onları dəyişməyin.", + "server_setup": "Server Quraşdırma Sihirbazı", + "use_staging_acme": "Test ACME serverindən istifadə", + "use_staging_acme_description": "Bu dəyəri dəyişdirmək üçün tətbiqi yenidən qurun.", + "routing": "Roulinq tətbiqləri", + "reset_onboarding": "Xoş gəldin ziyarət bayrağını sıfırlayın", + "reset_onboarding_description": "Enerji ekranını yenidən göstərmək üçün güc açarının sıfırlanması", + "cubit_statuses": "Yükləmə kubitlərinin cari vəziyyəti" } } \ No newline at end of file From 978e9f38a524f2314ea8625414bf1fcc59363326 Mon Sep 17 00:00:00 2001 From: Mithras Date: Mon, 24 Apr 2023 11:15:20 +0000 Subject: [PATCH 595/732] Translated using Weblate (Czech) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/cs/ --- assets/markdown/how_cloudflare-cs.md | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/markdown/how_cloudflare-cs.md b/assets/markdown/how_cloudflare-cs.md index 61fb4b4e..8dc86bb4 100644 --- a/assets/markdown/how_cloudflare-cs.md +++ b/assets/markdown/how_cloudflare-cs.md @@ -1,17 +1,17 @@ -### How to get Cloudflare API Token -1. Visit the following link: https://dash.cloudflare.com/ -2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** -3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. -4. Click on **Create Token** button. -5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. -6. In the **Token Name** field, give your token a name. -7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. -8. Next, right under this line, click Add More. Similar field will appear. -9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. -10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. -11. Flick to the bottom and press the blue **Continue to Summary** button. -12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. -13. Click on **Create Token**. -14. We copy the created token, and save it in a reliable place (preferably in the password manager). +### Jak získat token API Cloudflare +1. Přejděte na následující odkaz: https://dash.cloudflare.com/. +2. V pravém rohu klikněte na ikonu profilu (mužík v kruhu). V případě mobilní verze webu klikněte v levém horním rohu na **Menu** (tři vodorovné pruhy), v rozbalovací nabídce klikněte na **My profile**. +Na výběr jsou čtyři kategorie nastavení: *Communication*, *Authentication*, **API Tokens**, *Session*. Vyberte možnost **API Tokens**. +4. Klikněte na tlačítko **Create Token**. +5. Přejděte dolů, zobrazte pole **Create Custom Token** a klikněte na tlačítko **Get Started** vpravo. +6. V poli **Token Name** pojmenujte svůj token. +7. Dále máme přístupová práva. V poli zcela vlevo vyberte možnost **Zone**. V nejdelším poli uprostřed vyberte položku **DNS**. V pravém krajním poli vyberte možnost **Edit**. +8. Poté hned pod tímto řádkem klepněte na tlačítko Přidat další. Zobrazí se podobné pole. +9. Na zcela levé straně nového řádku vyberte totéž co u předchozího řádku - **Zone**. Prostřední pole se mírně liší. Zde vyberte totéž co na levém okraji - **Zone**. Na pravém okraji zcela vpravo vyberte možnost **Read**. +10. Dále se podívejte na položku **Zone Resources**. Pod ním se nachází řádek se dvěma poli. V levém z nich by mělo být uvedeno **Include** a v pravém **Specific Zone**. Jakmile vyberete možnost Specifická zóna, objeví se vpravo další pole. V něm vyberte svou doménu. +11. Přejděte úplně dolů a klikněte na modré tlačítko **Continue to Summary**. +12. Zkontrolujte, zda jste vše provedli správně. Měl by se objevit podobný řádek: *Domain - DNS:Edit, Zone:Read*. +13. Klepněte na tlačítko **Create Token**. +14. Zkopírujte vytvořený token a uložte jej na bezpečné místo (nejlépe do správce hesel). ![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) From 4a43b5d3fbc8bb9fd257ad106e8a201f60da0f40 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:24:24 +0000 Subject: [PATCH 596/732] Translated using Weblate (Polish) Currently translated at 100.0% (427 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 47 +++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index e1f2e1d6..a75a51b9 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -31,7 +31,8 @@ "apply": "Zastosuj to", "done": "Gotowe", "continue": "Kontynuować", - "alert": "Powiadomienie" + "alert": "Powiadomienie", + "app_name": "SelfPrivacy" }, "test": "pl-test", "locale": "pl", @@ -46,7 +47,8 @@ }, "console_page": { "title": "Konsola", - "waiting": "Oczekiwanie na inicjalizację…" + "waiting": "Oczekiwanie na inicjalizację…", + "copy": "Kopia" }, "about_us_page": { "title": "O projekcie \"SelfPrivacy\"" @@ -64,7 +66,10 @@ "reset_config_title": "Resetowanie", "reset_config_description": "Zresetuj klucze API i użytkownika root", "delete_server_title": "Usuń serwer", - "delete_server_description": "Ta czynność usunie serwer. Po tym będzie niedostępny." + "delete_server_description": "Ta czynność usunie serwer. Po tym będzie niedostępny.", + "system_dark_theme_description": "Użyj jasnego lub ciemnego motywu w zależności od ustawień systemu", + "system_dark_theme_title": "Domyślny motyw systemowy", + "dangerous_settings": "Niebezpieczne ustawienia" }, "ssh": { "title": "klucze SSH", @@ -266,7 +271,8 @@ "could_not_add_ssh_key": "Nie udało się utworzyć SSH klucz", "username_rule": "Nazwa użytkownika może zawierać tylko małe litery alfabetu łacińskiego, cyfry i podkreślenia, nie może zaczynać się od cyfry", "email_login": "Logowanie e-mailem", - "no_ssh_notice": "Dla tego użytkownika tworzone są tylko konta e-mail i SSH. Jednokrotne logowanie do wszystkich usług będzie dostępne wkrótce." + "no_ssh_notice": "Dla tego użytkownika tworzone są tylko konta e-mail i SSH. Jednokrotne logowanie do wszystkich usług będzie dostępne wkrótce.", + "details_title": "Dane użytkownika" }, "validations": { "length_longer": "Długość ciągu znaków [] musi być mniejsza lub równa {}", @@ -322,7 +328,7 @@ "what": "Co to znaczy?", "backblaze_bad_key_error": "Informacja o Blackbaze nieprawidłowa", "select_dns": "Teraz wybierz provajdera DNS", - "manage_domain_dns": "Dla kirowania DNS", + "manage_domain_dns": "Aby zarządzać DNS domeny", "create_master_account": "Dodać konto administratora", "use_this_domain_text": "Podany token zapewnia kontrolę nad tą domeną", "loading_domain_list": "Ładowanie listy domen", @@ -338,7 +344,20 @@ "one_more_restart": "Teraz nastąpi dodatkowe ponowne uruchomienie komputera w celu aktywacji certyfikatów bezpieczeństwa.", "enter_username_and_password": "Wprowadź nazwę użytkownika i złożone hasło", "finish": "Wszystko jest inicjalizowane", - "checks": "Kontrole wykonane:\n{} / {}" + "checks": "Kontrole wykonane:\n{} / {}", + "steps": { + "hosting": "Hosting", + "nixos_installation": "Instalacja NixOS", + "server_type": "Typ serwera", + "dns_provider": "Dostawca DNS", + "backups_provider": "Kopie zapasowe", + "domain": "Domena", + "master_account": "Rachunek główny", + "server": "Serwer", + "dns_setup": "Instalacja DNS", + "server_reboot": "Restart serwera", + "final_checks": "Kontrole końcowe" + } }, "jobs": { "delete_ssh_key": "Wydalić SSH-klucz dla {}", @@ -409,7 +428,7 @@ "domain_not_available_on_token": "Wprowadzony token nie ma dostępu do żądanej domeny.", "confirm_cloudflare_description": "Podaj token Cloudflare, który ma prawa do {}:", "method_recovery_input_description": "Wprowadź swój token odzyskiwania", - "fallback_select_provider_console": "Dostęp do konsoli hostingowej.", + "fallback_select_provider_console": "Dostęp do konsoli serwera mojego dostawcy.", "confirm_server_description": "Znalazłem twój serwer! Potwierdź, że jest to właściwe:", "confirm_server": "Potwierdzić serwer", "modal_confirmation_title": "Czy to naprawdę twój serwer?", @@ -471,5 +490,19 @@ "expired": "Klucz stracił ważność.", "get_new_key": "Uzyskaj nowy klucz" } + }, + "support": { + "title": "Wsparcie SelfPrivacy" + }, + "developer_settings": { + "subtitle": "Te ustawienia służą wyłącznie do celów debugowania. Nie zmieniaj ich, jeśli nie wiesz, co robisz.", + "title": "Ustawienia dewelopera", + "server_setup": "Kreator instalacji serwera", + "use_staging_acme": "Korzystanie z serwera testów ACME", + "use_staging_acme_description": "Ponownie skompiluj aplikację, aby zmienić tę wartość.", + "routing": "Trasowanie aplikacji", + "reset_onboarding": "Wyzerowanie flagi powitalnej dla wizyty", + "reset_onboarding_description": "Resetowanie przełącznika zasilania w celu ponownego wyświetlenia ekranu włączania zasilania", + "cubit_statuses": "Aktualny stan qubitów ładujących" } } \ No newline at end of file From a76425ad307f27b874b96f854c483bcb3a430a95 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 10:40:05 +0000 Subject: [PATCH 597/732] Translated using Weblate (Slovak) Currently translated at 100.0% (427 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/sk/ --- assets/translations/sk.json | 45 ++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/assets/translations/sk.json b/assets/translations/sk.json index af5a7c76..efa0dab0 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -83,7 +83,8 @@ "alert": "Upozornenie", "services_title": "Vaše osobné, súkromné a nezávislé služby.", "loading": "Načítanie…", - "apply": "Uplatniť" + "apply": "Uplatniť", + "app_name": "SelfPrivacy" }, "more_page": { "configuration_wizard": "Sprievodca nastavením", @@ -96,7 +97,8 @@ }, "console_page": { "title": "Konzola", - "waiting": "Čakáme na inicializáciu…" + "waiting": "Čakáme na inicializáciu…", + "copy": "Kopírovať" }, "about_us_page": { "title": "O nás" @@ -114,7 +116,10 @@ "reset_config_title": "Resetovať nastavenia aplikácie", "reset_config_description": "Resetovať kľúče API a užívateľa root", "delete_server_title": "Zmazať server", - "delete_server_description": "Tým sa odstráni váš server. Už nebude prístupným." + "delete_server_description": "Tým sa odstráni váš server. Už nebude prístupným.", + "system_dark_theme_description": "Použitie svetlej alebo tmavej témy v závislosti od nastavení systému", + "system_dark_theme_title": "Systémová predvolená téma", + "dangerous_settings": "Nebezpečné nastavenia" }, "ssh": { "title": "Kľúče SSH", @@ -322,7 +327,20 @@ "manage_domain_dns": "Na správu DNS vašej domény", "use_this_domain": "Chcete použiť túto doménu?", "create_master_account": "Vytvorte hlavný účet", - "checks": "Kontroly boli ukončené\n{} z {}" + "checks": "Kontroly boli ukončené\n{} z {}", + "steps": { + "nixos_installation": "Inštalácia NixOS", + "hosting": "Hosting", + "server_type": "Typ servera", + "dns_provider": "Poskytovateľ DNS", + "backups_provider": "Záložné kópie", + "domain": "Doména", + "master_account": "Hlavný účet", + "server": "Server", + "dns_setup": "Nastavenie DNS", + "server_reboot": "Reštartovanie servera", + "final_checks": "Záverečné previerky" + } }, "mail": { "subtitle": "Email pre rodinu alebo spoločnosť.", @@ -364,7 +382,8 @@ "refresh_users": "Aktualizovať zoznam používateľov", "could_not_create_user": "Nepodarilo sa vytvoriť účet", "email_login": "Emailová autorizácia", - "no_ssh_notice": "Pre tohto používateľa sú vytvorené iba e-mailové účty a účty SSH. Čoskoro bude k dispozícii jednotné prihlásenie pre všetky služby." + "no_ssh_notice": "Pre tohto používateľa sú vytvorené iba e-mailové účty a účty SSH. Čoskoro bude k dispozícii jednotné prihlásenie pre všetky služby.", + "details_title": "Detaily používateľa" }, "recovering": { "recovery_main_header": "Pripojiť sa k existujúcemu serveru", @@ -389,7 +408,7 @@ "fallback_select_description": "Čo z toho máte? Vyberte prvý, ktorý vyhovuje:", "fallback_select_token_copy": "Kópia autorizačného tokenu z inej verzie aplikácie.", "fallback_select_root_ssh": "Rootový prístup k serveru cez SSH.", - "fallback_select_provider_console": "Prístup k serverovej konzole môjho poskytovateľa.", + "fallback_select_provider_console": "Prístup ku konzole servera môjho poskytovateľa.", "authorization_failed": "Pomocou tohto kľúča sa nepodarilo prihlásiť", "fallback_select_provider_console_hint": "Napríklad Hetzner.", "server_provider_connected_description": "Spojenie bolo nadviazané. Zadajte svoj token s prístupom k {}:", @@ -471,5 +490,19 @@ "vpn": { "title": "Server VPN", "subtitle": "Súkromný server VPN" + }, + "support": { + "title": "Podpora SelfPrivacy" + }, + "developer_settings": { + "subtitle": "Tieto nastavenia slúžia len na ladenie. Nemeňte ich, ak neviete, čo robíte.", + "reset_onboarding": "Obnovenie uvítacej vlajky pre návštevu", + "title": "Nastavenia vývojára", + "server_setup": "Nastavenie servera", + "use_staging_acme": "Používanie testovacieho servera ACME", + "use_staging_acme_description": "Ak chcete túto hodnotu zmeniť, prekompilujte aplikáciu.", + "routing": "Smerovanie aplikácie", + "reset_onboarding_description": "Resetovanie vypínača na opätovné zobrazenie obrazovky zapnutia", + "cubit_statuses": "Aktuálny stav načítavania qubitov" } } \ No newline at end of file From 89f51f2ba094fff8104df98a28b207246329adaf Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:18:42 +0000 Subject: [PATCH 598/732] Translated using Weblate (Slovak) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/sk/ --- assets/markdown/how_cloudflare-sk.md | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/markdown/how_cloudflare-sk.md b/assets/markdown/how_cloudflare-sk.md index 61fb4b4e..752bbf1e 100644 --- a/assets/markdown/how_cloudflare-sk.md +++ b/assets/markdown/how_cloudflare-sk.md @@ -1,17 +1,17 @@ -### How to get Cloudflare API Token -1. Visit the following link: https://dash.cloudflare.com/ -2. the right corner, click on the profile icon (a man in a circle). For the mobile version of the site, in the upper left corner, click the **Menu** button (three horizontal bars), in the dropdown menu, click on **My Profile** -3. There are four configuration categories to choose from: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. -4. Click on **Create Token** button. -5. Go down to the bottom and see the **Create Custom Token** field and press **Get Started** button on the right side. -6. In the **Token Name** field, give your token a name. -7. Next we have Permissions. In the leftmost field, select **Zone**. In the longest field, center, select **DNS**. In the rightmost field, select **Edit**. -8. Next, right under this line, click Add More. Similar field will appear. -9. In the leftmost field of the new line, select, similar to the last line — **Zone**. In the center — a little different. Here choose the same as in the left — **Zone**. In the rightmost field, select **Read**. -10. Next look at **Zone Resources**. Under this inscription there is a line with two fields. The left must have **Include** and the right must have **Specific Zone**. Once you select Specific Zone, another field appears on the right. Choose your domain in it. -11. Flick to the bottom and press the blue **Continue to Summary** button. -12. Check if you got everything right. A similar string must be present: *Domain — DNS:Edit, Zone:Read*. -13. Click on **Create Token**. -14. We copy the created token, and save it in a reliable place (preferably in the password manager). +### Ako získať token API Cloudflare +1. Navštívte nasledujúce prepojenie: https://dash.cloudflare.com/ +2. V pravom rohu kliknite na ikonu profilu (muž v kruhu). V prípade mobilnej verzie stránky kliknite v ľavom hornom rohu na tlačidlo **Menu** (tri vodorovné pruhy), v rozbaľovacej ponuke kliknite na **My profile** +3. Na výber sú štyri kategórie konfigurácie: *Communication*, *Authentication*, **Toky API**, *Session*. Vyberte **API Tokens**. +4. Kliknite na tlačidlo **Create Token**. +5. Prejdite na spodnú časť a zobrazte pole **Create Custom Token** a stlačte tlačidlo **Get Started** na pravej strane. +6. V poli **Token Name** zadajte svoj token. +7. Ďalej tu máme položku Permissions. V ľavom krajnom poli vyberte položku **Zone**. V najdlhšom poli uprostred vyberte položku **DNS**. V krajnom pravom poli vyberte položku **Edit**. +8. Ďalej priamo pod týmto riadkom kliknite na položku Pridať ďalšie. Zobrazí sa podobné pole. +9. V krajnom ľavom poli nového riadku vyberte podobne ako v predchádzajúcom riadku - **Zone**. V strede - trochu inak. Tu vyberte rovnako ako v ľavom poli - **Zone**. V krajnom pravom poli vyberte položku **Read**. +10. Ďalej sa pozrite na položku **Zone Resources**. Pod týmto nápisom sa nachádza riadok s dvoma poľami. V ľavom musí byť uvedené **Include** a v pravom **Specific Zone**. Keď vyberiete položku Špecifická zóna, vpravo sa objaví ďalšie pole. V ňom vyberte svoju doménu. +11. Prejdite na spodnú časť a stlačte modré tlačidlo **Continue to Summary**. +12. Skontrolujte, či máte všetko správne. Musí sa vyskytovať podobný reťazec: *Domain — DNS:Edit, Zone:Read*. +13. Kliknite na **Create Token**. +14. Vytvorený token skopírujeme a uložíme ho na spoľahlivé miesto (najlepšie do správcu hesiel). ![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) From e6f367e57a6faff491af7e2818d750c32bf745ed Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 11:03:05 +0000 Subject: [PATCH 599/732] Translated using Weblate (Slovak) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_hetzner Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_hetzner/sk/ --- assets/markdown/how_hetzner-sk.md | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/assets/markdown/how_hetzner-sk.md b/assets/markdown/how_hetzner-sk.md index 6f859c18..f5ab24dc 100644 --- a/assets/markdown/how_hetzner-sk.md +++ b/assets/markdown/how_hetzner-sk.md @@ -1,23 +1,23 @@ -### How to get Hetzner API Token -1. Visit the following [link](https://console.hetzner.cloud/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Hover side panel with mouse cursor. Panel should expand and show us - a menu. We're interested in the last one — **Security** (icon of a - key). -4. Next, in the upper part of an interface, we can see approximately - the following: **SSH Keys, API Tokens, Certificates, Members.** You - need **API Tokens**. Click on it. -5. In the right part of the interface, there should be **Generate API - token** button. If you're using mobile version og a webpage, in the - lower right corner you'll see **red cross**. Push that button. -6. In the **Description** field, give our token a name (this can be any - name that you like. It doesn't influence the essence. -7. Under the **Description** field we can see a possibility to choose - **permissions**. Pick **Read & Write**. -8. Click **Generate API Token.** -9. After that, our key will be shown. Store it in the reliable place, - or in the password manager, which is better. +### Ako získať Hetzner API Token +1. Navštívte nasledujúci [link](https://console.hetzner.cloud/) a prihláste sa + do novo vytvoreného účtu. +2. Vstúpte do predtým vytvoreného projektu. Ak ste ho ešte nevytvorili, + potom pokračujte ďalej. +3. Kurzorom myši prejdite na bočný panel. Panel by sa mal rozbaliť a zobraziť nám + ponuku. Zaujíma nás posledné z nich - **Security** (ikona + klávesu). +4. Ďalej v hornej časti rozhrania vidíme približne + nasledovné: **SSH Keys, API Tokens, Certificates, Members.**. + potrebujete **API Tokens**. Kliknite naň. +5. V pravej časti rozhrania by sa malo nachádzať **Generate API + token** tlačidlo. Ak používate mobilnú verziu og webovej stránky, v časti + pravom dolnom rohu uvidíte **red cross**. Stlačte toto tlačidlo. +6. V poli **Description** uveďte názov nášho tokenu (môže to byť akýkoľvek názov + , ktorý sa vám páči. Nemá to vplyv na podstatu. +7. Pod poľom **Description** vidíme možnosť výberu + **permissions**. Vyberte možnosť **Read & Write**. +8. Kliknite na tlačidlo **Generate API Token.**. +9. Potom sa zobrazí náš kľúč. Uložte ho na spoľahlivé miesto, + alebo v správcovi hesiel, čo je lepšie. -![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) +![Nastavenie tokenu Hetzner](resource:assets/images/gifs/Hetzner.gif) From 000cff7b8cc98f8ef489d03bbdab1de07132c914 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:10:50 +0000 Subject: [PATCH 600/732] Translated using Weblate (Slovak) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_ssh Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_ssh/sk/ --- assets/markdown/how_fallback_ssh-sk.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/markdown/how_fallback_ssh-sk.md b/assets/markdown/how_fallback_ssh-sk.md index ce90e76a..bd5d4a86 100644 --- a/assets/markdown/how_fallback_ssh-sk.md +++ b/assets/markdown/how_fallback_ssh-sk.md @@ -1,19 +1,19 @@ -Login as root user to your server and look at the contents of the file `/etc/nixos/userdata/tokens.json` +Prihláste sa ako používateľ root na server a pozrite sa na obsah súboru `/etc/nixos/userdata/tokens.json ```sh cat /etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +V tomto súbore bude podobný dizajn: -```json +``json { - "tokens": [ + {"tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + {"token": "token_which_has_been_scoped", + {"name": "device_name", + {"date": "date" } ``` -Copy the token from the file and paste it in the next window. +Skopírujte token zo súboru a vložte ho do ďalšieho okna. From e36b9b37bebdb48593dd54af5a60ac149b01e6de Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:21:20 +0000 Subject: [PATCH 601/732] Translated using Weblate (Slovak) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_old Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_old/sk/ --- assets/markdown/how_fallback_old-sk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/markdown/how_fallback_old-sk.md b/assets/markdown/how_fallback_old-sk.md index c12504e7..2c307149 100644 --- a/assets/markdown/how_fallback_old-sk.md +++ b/assets/markdown/how_fallback_old-sk.md @@ -1,3 +1,3 @@ -In the next window, enter the token obtained from the console of the previous version of the application. +V ďalšom okne zadajte token získaný z konzoly predchádzajúcej verzie aplikácie. -Enter it without the word *Bearer*. +Musíte vstúpiť bez slova *Bearer*. From 9f77dc6da07a56e97f63c9079361c03e048f94de Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:10:08 +0000 Subject: [PATCH 602/732] Translated using Weblate (Slovak) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: about Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-about/sk/ --- assets/markdown/about-sk.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/markdown/about-sk.md b/assets/markdown/about-sk.md index 3963aa6e..d3135d3b 100644 --- a/assets/markdown/about-sk.md +++ b/assets/markdown/about-sk.md @@ -1,12 +1,12 @@ -### About us +### O nás More and more corporations want to control our data. We want to have full control of our **data** on our own. -### Our mission +### Naše poslanie -Digital independence and privacy, available to everyone +Digitálna nezávislosť a súkromie dostupné pre každého -### Target +### Cieľ -Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file +Vytvorte program, ktorý umožní každému vytvoriť súkromné služby pre seba a svojich blízkych. \ No newline at end of file From 715255de8107bd1e1ab81a2b5fb833577409fcfb Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 10:52:47 +0000 Subject: [PATCH 603/732] Translated using Weblate (Slovak) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_backblaze Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_backblaze/sk/ --- assets/markdown/how_backblaze-sk.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/markdown/how_backblaze-sk.md b/assets/markdown/how_backblaze-sk.md index b1e341d1..7736c858 100644 --- a/assets/markdown/how_backblaze-sk.md +++ b/assets/markdown/how_backblaze-sk.md @@ -1,8 +1,8 @@ -### How to get Backblaze API Token -1. Visit the following link and authorize: https://secure.backblaze.com/user_signin.htm -2. On the left side of the interface, select **App Keys** in the **B2 Cloud Storage** subcategory. -3. Click on the blue **Generate New Master Application Key** button. -4. In the appeared pop-up window confirm the generation. -5. Save _keyID_ and _applicationKey_ in the safe place. For example, in the password manager. +### Ako získať token API spoločnosti Backblaze +1. Navštívte nasledujúci odkaz a autorizujte sa: https://secure.backblaze.com/user_signin.htm +2. Na ľavej strane rozhrania vyberte položku **App Keys** v podkategórii **B2 Cloud Storage** podkategória. +3. Kliknite na modré tlačidlo **Generate New Master Application Key**. +4. V zobrazenom pop-up okne potvrďte generovanie. +5. Uložte _keyID_ and _applicationKey_ in bezpečné miesto. Napríklad v správcovi hesiel. -![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) +![Prijatie tokenu Backblaze](resource:assets/images/gifs/Backblaze.gif) From cc36bc2aa045c75b2ae16944a085399f06a81cba Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:11:43 +0000 Subject: [PATCH 604/732] Translated using Weblate (Slovak) Currently translated at 100.0% (8 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/sk/ --- assets/markdown/how_fallback_terminal-sk.md | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/assets/markdown/how_fallback_terminal-sk.md b/assets/markdown/how_fallback_terminal-sk.md index 77c97efa..40a8f231 100644 --- a/assets/markdown/how_fallback_terminal-sk.md +++ b/assets/markdown/how_fallback_terminal-sk.md @@ -1,26 +1,26 @@ -In the Hetzner server control panel, go to the **Rescue** tab. Then, click on **Enable rescue & power cycle**. +V ovládacom paneli servera Hetzner prejdite na kartu **Rescue**. Potom kliknite na **Enable rescue & power cycle**. -In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. +V časti *Choose a Recue OS* vyberte **linux64** a v časti *SSH Key* vyberte svoj kľúč, ak bol pridaný do vášho účtu Hetzner. -Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. +Stlačte tlačidlo **Enable rescue & power cycle** a počkajte, kým sa server reštartuje. Zobrazí sa prihlasovacie heslo. Prihláste sa ako používateľ root pomocou prihlasovacích údajov a hesla. -Mount your server file system and see the contents of the token file: +Pripojte súborový systém servera a pozrite si obsah súboru token: ```sh mount /dev/sda1 /mnt cat /mnt/etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +V tomto súbore bude podobný dizajn: -```json +``json { - "tokens": [ + {"tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + {"token": "token_which_has_been_scoped", + {"name": "device_name", + {"date": "date" } ``` -Copy the token from the file and paste it in the next window. +Skopírujte token zo súboru a vložte ho do ďalšieho okna. From aef47ce9a79ee2e7de585e019e179fa854498679 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 10:49:03 +0000 Subject: [PATCH 605/732] Translated using Weblate (Slovak) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/sk/ --- assets/markdown/how_digital_ocean-sk.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_digital_ocean-sk.md b/assets/markdown/how_digital_ocean-sk.md index dc6355c2..92b7561f 100644 --- a/assets/markdown/how_digital_ocean-sk.md +++ b/assets/markdown/how_digital_ocean-sk.md @@ -1,12 +1,12 @@ -### How to get Digital Ocean API Token -1. Visit the following [link](https://cloud.digitalocean.com/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Go to the "API" link on the left bar. -4. Click on the "Generate New Token". -5. Enter any name for the token. -6. Put expiration time to "No expiry". -7. Check the "Write (optional)" checkbox. -8. Now click on the "Generate Token" button. -9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file +### Ako získať token API Digital Ocean +1. Navštívte nasledujúci [link](https://cloud.digitalocean.com/) a prihláste sa + do novo vytvoreného účtu. +2. Vstúpte do predtým vytvoreného projektu. Ak ste ho ešte nevytvorili, + potom pokračujte ďalej. +3. Prejdite na odkaz "API" na ľavej lište. +4. Kliknite na tlačidlo "Generate New Token". +5. Zadajte ľubovoľný názov tokenu. +6. Nastavte čas vypršania platnosti na "No expiry". +7. Začiarknite políčko "Write (optional)" zaškrtávacie políčko. +8. Teraz kliknite na tlačidlo "Generate Token" tlačidlo. +9. Potom sa zobrazí token. Uložte ho na akékoľvek spoľahlivé miesto, najlepšie do správcu hesiel. \ No newline at end of file From a17d8184c7a59e9200a741c0b320dfe0c4b29b6c Mon Sep 17 00:00:00 2001 From: Thary Date: Fri, 28 Apr 2023 14:25:52 +0000 Subject: [PATCH 606/732] Translated using Weblate (Polish) Currently translated at 100.0% (427 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index a75a51b9..003b16f2 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -328,7 +328,7 @@ "what": "Co to znaczy?", "backblaze_bad_key_error": "Informacja o Blackbaze nieprawidłowa", "select_dns": "Teraz wybierz provajdera DNS", - "manage_domain_dns": "Aby zarządzać DNS domeny", + "manage_domain_dns": "Jak kierować DNS dla twojego domena?", "create_master_account": "Dodać konto administratora", "use_this_domain_text": "Podany token zapewnia kontrolę nad tą domeną", "loading_domain_list": "Ładowanie listy domen", From b20f8f777d827c9cdb9217e59984e266ec4abe5b Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:50:42 +0000 Subject: [PATCH 607/732] Translated using Weblate (German) Currently translated at 100.0% (427 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/de/ --- assets/translations/de.json | 45 ++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/assets/translations/de.json b/assets/translations/de.json index c2b5a6db..15beece2 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -33,7 +33,8 @@ "continue": "Fortfahren", "alert": "Alarm", "services_title": "Ihre persönliche, private und unabhängige Dienste.", - "apply": "Anwenden" + "apply": "Anwenden", + "app_name": "SelfPrivacy" }, "more_page": { "configuration_wizard": "Setup-Assistent", @@ -46,7 +47,8 @@ }, "console_page": { "title": "Konsole", - "waiting": "Warten auf Initialisierung…" + "waiting": "Warten auf Initialisierung…", + "copy": "Kopieren" }, "about_us_page": { "title": "Über uns" @@ -64,7 +66,10 @@ "reset_config_title": "Anwendungseinstellungen zurücksetzen", "reset_config_description": "API Sclüssel und root Benutzer zurücksetzen", "delete_server_title": "Server löschen", - "delete_server_description": "Das wird Ihren Server löschen. Es wird nicht mehr zugänglich sein." + "delete_server_description": "Das wird Ihren Server löschen. Es wird nicht mehr zugänglich sein.", + "system_dark_theme_title": "Standard-Systemthema", + "system_dark_theme_description": "Verwenden Sie je nach Systemeinstellungen ein helles oder dunkles Thema", + "dangerous_settings": "Gefährliche Einstellungen" }, "ssh": { "title": "SSH Schlüssel", @@ -322,7 +327,20 @@ "check": "Überprüfung", "create_master_account": "Hauptkonto erstellen", "enter_username_and_password": "Geben Sie den Benutzernamen und ein gutes Passwort ein", - "finish": "Alles initialisiert" + "finish": "Alles initialisiert", + "steps": { + "hosting": "Hosting", + "server_type": "Server-Typ", + "dns_provider": "DNS-Anbieter", + "backups_provider": "Sicherungskopien", + "domain": "Bereich", + "master_account": "Hauptkonto", + "server": "Server", + "dns_setup": "DNS-Einrichtung", + "nixos_installation": "NixOS-Installation", + "server_reboot": "Server-Neustart", + "final_checks": "Endgültige Kontrollen" + } }, "validations": { "length_not_equal": "Länge ist [], sollte {} sein", @@ -354,7 +372,8 @@ "could_not_fetch_users": "Benutzerliste konnte nicht abgerufen werden", "could_not_fetch_description": "Bitte überprüfen Sie Ihre Internetverbindung und versuchen Sie es erneut", "refresh_users": "Benutzerliste aktualisieren", - "email_login": "E-Mail-Anmeldung" + "email_login": "E-Mail-Anmeldung", + "details_title": "Angaben zum Benutzer" }, "devices": { "main_screen": { @@ -405,7 +424,7 @@ "method_recovery_input_description": "Geben Sie Ihren Wiederherstellungsschlüssel ein", "fallback_select_description": "Was genau haben Sie? Wählen Sie die erste verfügbare Option:", "fallback_select_root_ssh": "Root-SSH-Zugriff auf den Server.", - "fallback_select_provider_console": "Zugriff auf die Serverkonsole meines Prodivers.", + "fallback_select_provider_console": "Zugang zur Serverkonsole meines Providers.", "authorization_failed": "Anmeldung mit diesem Schlüssel nicht möglich", "fallback_select_provider_console_hint": "Zum Beispiel: Hetzner.", "server_provider_connected": "Verbinden Sie sich mit Ihrem Serveranbieter", @@ -471,5 +490,19 @@ }, "timer": { "sec": "{} Sek" + }, + "support": { + "title": "SelfPrivacy-Unterstützung" + }, + "developer_settings": { + "title": "Einstellungen für Entwickler", + "subtitle": "Diese Einstellungen sind nur für Debugging-Zwecke gedacht. Ändern Sie sie nicht, wenn Sie nicht wissen, was Sie tun.", + "server_setup": "Server-Einrichtung", + "use_staging_acme": "Verwendung des ACME-Testservers", + "use_staging_acme_description": "Erstellen Sie die Anwendung neu, um diesen Wert zu ändern.", + "routing": "Anwendungsrouting", + "reset_onboarding": "Setzen Sie die Willkommensflagge für den Besuch zurück", + "reset_onboarding_description": "Zurücksetzen des Netzschalters, um den Einschaltbildschirm erneut aufzurufen", + "cubit_statuses": "Aktueller Status der Ladequbits" } } \ No newline at end of file From 2bff45aab1f6a038142124f5c6e474701378b820 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:26:36 +0000 Subject: [PATCH 608/732] Translated using Weblate (Polish) Currently translated at 100.0% (427 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 003b16f2..a75a51b9 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -328,7 +328,7 @@ "what": "Co to znaczy?", "backblaze_bad_key_error": "Informacja o Blackbaze nieprawidłowa", "select_dns": "Teraz wybierz provajdera DNS", - "manage_domain_dns": "Jak kierować DNS dla twojego domena?", + "manage_domain_dns": "Aby zarządzać DNS domeny", "create_master_account": "Dodać konto administratora", "use_this_domain_text": "Podany token zapewnia kontrolę nad tą domeną", "loading_domain_list": "Ładowanie listy domen", From b68de55a9b9d9476e0556452398c8bb6b5d04cf7 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 15:02:31 +0000 Subject: [PATCH 609/732] Translated using Weblate (German) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/de/ --- assets/markdown/how_cloudflare-de.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_cloudflare-de.md b/assets/markdown/how_cloudflare-de.md index fd9d066d..4b81e00f 100644 --- a/assets/markdown/how_cloudflare-de.md +++ b/assets/markdown/how_cloudflare-de.md @@ -1,17 +1,17 @@ -### So erhalten Sie das Cloudflare-API-Token -1. Besuchen Sie den folgenden Link: https://dash.cloudflare.com/ -2. Klicken Sie in der rechten Ecke auf das Profilsymbol (ein Mann im Kreis). Klicken Sie für die mobile Version der Website in der oberen linken Ecke auf die Schaltfläche **Menu** (drei horizontale Balken) und im Dropdown-Menü auf **My Profile** -3. Es stehen vier Konfigurationskategorien zur Auswahl: *Communication*, *Authentication*, **API Tokens**, *Session*. Choose **API Tokens**. +### Wie man Cloudflare API Token bekommt +1. Besuchen Sie den folgenden link: https://dash.cloudflare.com/ +2. Klicken Sie in der rechten Ecke auf das Profilsymbol (ein Mann in einem Kreis). Bei der mobilen Version der Website klicken Sie in der oberen linken Ecke auf die Schaltfläche **Menu** (drei horizontale Balken), im Dropdown-Menü klicken Sie auf **My Profile** +3. Es gibt vier Konfigurationskategorien, aus denen Sie wählen können: *Communication*, *Authentication*, **API Tokens**, *Session*. Wählen Sie **API Tokens**. 4. Klicken Sie auf die Schaltfläche **Create Token**. -5. Gehen Sie nach unten und sehen Sie sich das Feld **Create Custom Token** an und klicken Sie auf die Schaltfläche **Get Started** auf der rechten Seite. -6. Geben Sie Ihrem Token im Feld **Token Name** einen Namen. -7. Als nächstes haben wir Berechtigungen. Wählen Sie im linken Feld **Zone** aus. Wählen Sie im längsten Feld in der Mitte **DNS** aus. Wählen Sie im Feld ganz rechts **Edit** aus. -8. Klicken Sie als Nächstes direkt unter dieser Zeile auf Mehr hinzufügen. Ein ähnliches Feld wird angezeigt. -9. Wählen Sie im linken Feld der neuen Zeile ähnlich wie in der letzten Zeile — **Zone**. In der Mitte – etwas anders. Wählen Sie hier dasselbe wie links – **Zone**. Wählen Sie im Feld ganz rechts **Read** aus. -10. Sehen Sie sich als Nächstes **Zone Resources** an. Unter dieser Inschrift befindet sich eine Zeile mit zwei Feldern. Auf der linken Seite muss **Include** und auf der rechten Seite **Specific Zone** stehen. Nachdem Sie Spezifische Zone ausgewählt haben, erscheint rechts ein weiteres Feld. Wählen Sie darin Ihre Domain aus. -11. Blättern Sie nach unten und drücken Sie die blaue Schaltfläche **Continue to Summary**. +5. Gehen Sie nach unten und sehen Sie das Feld **Create Custom Token** und klicken Sie auf der rechten Seite auf die Schaltfläche **Get Started**. +6. Geben Sie in das Feld **Token Name** einen Namen für Ihr Token ein. +7. Als nächstes folgen die Berechtigungen. Wählen Sie im Feld ganz links **Zone**. Wählen Sie im längsten Feld in der Mitte **DNS**. Wählen Sie im Feld ganz rechts **Edit**. +8. Klicken Sie anschließend direkt unter dieser Zeile auf Add More. Ein ähnliches Feld wird angezeigt. +9. Wählen Sie im ganz linken Feld der neuen Zeile, ähnlich wie in der letzten Zeile, **Zone**. In der Mitte - ein wenig anders. Wählen Sie hier dasselbe wie in der linken Zeile - **Zone**. Im Feld ganz rechts wählen Sie **Read**. +10. Als nächstes sehen Sie sich **Zone Resources** an. Unter dieser Aufschrift befindet sich eine Zeile mit zwei Feldern. Auf der linken Seite muss **Include** und auf der rechten Seite **Specific Zone** stehen. Sobald Sie Spezifische Zone auswählen, erscheint rechts ein weiteres Feld. Wählen Sie dort Ihre Domain aus. +11. Streichen Sie nach unten und drücken Sie die blaue Schaltfläche **Continue to Summary**. 12. Überprüfen Sie, ob Sie alles richtig gemacht haben. Eine ähnliche Zeichenfolge muss vorhanden sein: *Domain — DNS:Edit, Zone:Read*. 13. Klicken Sie auf **Create Token**. -14. Wir kopieren das erstellte Token und speichern es an einem zuverlässigen Ort (vorzugsweise im Passwort-Manager). +14. Kopieren Sie das erstellte Token und speichern Sie es an einem zuverlässigen Ort (vorzugsweise im Passwort-Manager). ![Cloudflare token Einrichtung](resource:assets/images/gifs/CloudFlare.gif) From 10f43e6bd942503225209ee5b3ab94eb78c431af Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:45:48 +0000 Subject: [PATCH 610/732] Translated using Weblate (Polish) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/pl/ --- assets/markdown/how_cloudflare-pl.md | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/markdown/how_cloudflare-pl.md b/assets/markdown/how_cloudflare-pl.md index 3a0caee9..2cfb615b 100644 --- a/assets/markdown/how_cloudflare-pl.md +++ b/assets/markdown/how_cloudflare-pl.md @@ -1,17 +1,17 @@ -### Jak otrzymać Cloudflare API Token -1. Odwiedź ten link: https://dash.cloudflare.com/ -2. W prawym rogu kliknij ikonę profilu (mężczyzna w kółku). W wersji mobilnej strony w lewym górnym rogu kliknij przycisk **Menu** (trzy poziome kreski), w rozwijanym menu kliknij **My profile** -3. Do wyboru są cztery kategorie konfiguracji: *Communication*, *Authentication*, **API Tokens**, *Session*. Wybierż **API Tokens**. -4. Kliknij na **Create Token**. -5. Zejdź na dół i zobacz **Create Custom Token** pole and naciśnij **Get Started** po prawej stronie. -6. W polu **Token Name** podaj nazwę swojego tokena. -7. Dalej mamy Uprawnienia. W skrajnym lewym polu wybierz **Zone**. W najdłuższym polu pośrodku wybierz **DNS**. W polu po prawej stronie wybierz **Edit**. -8. Następnie, tuż pod tą linią, kliknij Dodaj więcej. Pojawi się podobne okno. -9. W skrajnym lewym polu nowej linii wybierz, podobnie jak w ostatniej linii — **Zone**. W centrum — trochę inaczej: tutaj wybieramy to samo co po lewej — **Zone**. W polu po prawej stronie wybierz **Read**. -10. Następnie spójrz na **Zone Resources**. Pod tym napisem znajduje się linia z dwoma polami. Po lewej musi mieć opcję **Include**, a po prawej **Specific Zone**. Po wybraniu określonej strefy po prawej stronie pojawi się kolejne pole. Wybierz w nim swoją domenę. -11. Przesuń w dół i naciśnij niebieski przycisk **Continue to Summary**. -12. Sprawdź, czy wszystko zrobiłeś dobrze. Podobny ciąg musi być obecny: *Domain — DNS:Edit, Zone:Read*. -13. Naciśnij na **Create Token**. -14. Stworzony token kopiujemy i zapisujemy w bezpiecznym miejscu (najlepiej w menedżerze haseł). +### Jak uzyskać token API Cloudflare'a +1. Przejdź pod następujący link: https://dash.cloudflare.com/. +2. W prawym rogu kliknij ikonę profilu (człowiek w kółku). W przypadku wersji mobilnej strony, w lewym górnym rogu kliknij **Menu** (trzy poziome paski), w rozwijanym menu kliknij **My Profile**. +Do wyboru są cztery kategorie ustawień: *Communication*, *Authentication*, **API Tokens**, *Session*. Należy wybrać **API Tokens**. +4. Kliknij przycisk **Create token**. +5. Zjedź na dół, zobacz pole **Create Custom Token** i kliknij przycisk **Get Started** po prawej stronie. +6. W polu **Token Name** nadaj nazwę swojemu tokenowi. +7. Następnie mamy prawa dostępu. W skrajnie lewym polu wybierz **Zone**. W najdłuższym polu, środkowym, wybierz **DNS**. W skrajnie prawym polu wybierz **Edit**. +8. Następnie, tuż pod tym wierszem, kliknij Add more. Pojawi się podobne pole. +9. W skrajnie lewej części nowej linii wybierz to samo, co w poprzedniej linii - **Zone**. Środkowe pole jest nieco inne. Tutaj wybierz to samo, co na lewym marginesie - **Zone**. W skrajnie prawym marginesie wybierz **Read**. +10. Następnie spójrz na **Strefę zasobów**. Poniżej tego znajduje się linia z dwoma polami. W lewym powinno być **Include**, a w prawym **Specific Zone**. Gdy wybierzesz Specific Zone, po prawej stronie pojawi się kolejne pole. Wybierz w nim swoją domenę. +11. Przejdź na sam dół i kliknij niebieski przycisk **Continue to Summary**. +12. Sprawdź, czy wszystko zrobiłeś poprawnie. Powinna pojawić się podobna linia: *Domain - DNS:Edit, Zone:Read*. +13. Kliknij na **Create Token**. +14. Skopiuj utworzony token i zapisz go w bezpiecznym miejscu (najlepiej w menedżerze haseł). ![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) From ef8174a3c66f5487453c6e7b7019b0019cee7cc7 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:35:34 +0000 Subject: [PATCH 611/732] Translated using Weblate (Polish) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_hetzner Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_hetzner/pl/ --- assets/markdown/how_hetzner-pl.md | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/assets/markdown/how_hetzner-pl.md b/assets/markdown/how_hetzner-pl.md index 6f859c18..f16aec17 100644 --- a/assets/markdown/how_hetzner-pl.md +++ b/assets/markdown/how_hetzner-pl.md @@ -1,23 +1,23 @@ -### How to get Hetzner API Token -1. Visit the following [link](https://console.hetzner.cloud/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Hover side panel with mouse cursor. Panel should expand and show us - a menu. We're interested in the last one — **Security** (icon of a - key). -4. Next, in the upper part of an interface, we can see approximately - the following: **SSH Keys, API Tokens, Certificates, Members.** You - need **API Tokens**. Click on it. -5. In the right part of the interface, there should be **Generate API - token** button. If you're using mobile version og a webpage, in the - lower right corner you'll see **red cross**. Push that button. -6. In the **Description** field, give our token a name (this can be any - name that you like. It doesn't influence the essence. -7. Under the **Description** field we can see a possibility to choose +### Jak uzyskać Hetzner API Token +1. Odwiedź następujący [link](https://console.hetzner.cloud/) i zaloguj się + na nowo utworzone konto. +2. Wejdź do wcześniej utworzonego projektu. Jeśli jeszcze go nie stworzyłeś, + to proszę przejść dalej. +3. Najedź kursorem myszy na panel boczny. Panel powinien się rozwinąć i pokazać nam + menu. Nas interesuje ostatnie z nich - **Security** (ikona klucza). + . +4. Następnie w górnej części interfejsu możemy zobaczyć ok. + następujące elementy: ***SSH Keys, API Tokens, Certificates, Members.** +Klikamy na nie. +5. W prawej części interfejsu powinien znajdować się przycisk **Generate API + token**. Jeśli korzystasz z mobilnej wersji strony, w prawym dolnym rogu pojawi się + dolnym prawym rogu pojawi się **red cross**. Wciśnij ten przycisk. +6. W polu **Description** nadaj naszemu tokenowi nazwę (może to być dowolna nazwa). + nazwa, która Ci się podoba. Nie ma ona wpływu na istotę. +7. Pod polem **Description** widzimy możliwość wyboru. **permissions**. Pick **Read & Write**. -8. Click **Generate API Token.** -9. After that, our key will be shown. Store it in the reliable place, - or in the password manager, which is better. +8. Klikamy **Generate API Token**. +9. Po tej czynności pojawi się nasz klucz. Przechowuj go w wiarygodnym miejscu, +lub w menedżerze haseł, co jest lepsze. -![Hetzner token setup](resource:assets/images/gifs/Hetzner.gif) +![Ustawienie tokena Hetznera](resource:assets/images/gifs/Hetzner.gif) From 7302b4780983c011ccaa54cf2ee6b29388a7be1f Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:38:43 +0000 Subject: [PATCH 612/732] Translated using Weblate (Polish) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_ssh Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_ssh/pl/ --- assets/markdown/how_fallback_ssh-pl.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/markdown/how_fallback_ssh-pl.md b/assets/markdown/how_fallback_ssh-pl.md index 1659d662..0e18b3e5 100644 --- a/assets/markdown/how_fallback_ssh-pl.md +++ b/assets/markdown/how_fallback_ssh-pl.md @@ -4,16 +4,16 @@ Zaloguj się jako użytkownik root na swoim serwerze i przejrzyj zawartość pli cat /etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +W tym pliku będzie podobny wzór: -```json +`json { - "tokens": [ + { "tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + { "token": "token_który_był_skopedowany", + { "name": "device_name", + { "data": "data" } ``` -Copy the token from the file and paste it in the next window. +Skopiuj token z pliku i wklej w kolejnym oknie. From 17e59e04bdec519d7b882aeaa1d1182a82e8e6a1 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:46:41 +0000 Subject: [PATCH 613/732] Translated using Weblate (Polish) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_old Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_old/pl/ --- assets/markdown/how_fallback_old-pl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_fallback_old-pl.md b/assets/markdown/how_fallback_old-pl.md index 351d9647..e5c2f114 100644 --- a/assets/markdown/how_fallback_old-pl.md +++ b/assets/markdown/how_fallback_old-pl.md @@ -1,3 +1,3 @@ W kolejnym oknie wprowadź token uzyskany z konsoli poprzedniej wersji aplikacji. -Enter it without the word *Bearer*. +Należy wpisać bez słowa *Bearer*. From 5e7c6d63c2ebe835d8e363a24ed739551841254c Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:37:33 +0000 Subject: [PATCH 614/732] Translated using Weblate (Polish) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: about Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-about/pl/ --- assets/markdown/about-pl.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/markdown/about-pl.md b/assets/markdown/about-pl.md index 3963aa6e..ebd41246 100644 --- a/assets/markdown/about-pl.md +++ b/assets/markdown/about-pl.md @@ -3,10 +3,10 @@ More and more corporations want to control our data. We want to have full control of our **data** on our own. -### Our mission +### Misja projektu -Digital independence and privacy, available to everyone +Niezależność i prywatność cyfrowa dostępna dla wszystkich -### Target +### Cel -Develop the program, which will allow everyone to deploy their private services for themselves and their neighbours. \ No newline at end of file +Opracuj program, dzięki któremu każdy będzie mógł stworzyć prywatne usługi dla siebie i swoich bliskich. \ No newline at end of file From fd8cf5cf78f8b5b63e7e7f15750bf0900adc87b6 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:46:56 +0000 Subject: [PATCH 615/732] Translated using Weblate (Polish) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_backblaze Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_backblaze/pl/ --- assets/markdown/how_backblaze-pl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_backblaze-pl.md b/assets/markdown/how_backblaze-pl.md index f5e195a7..a14ec3ed 100644 --- a/assets/markdown/how_backblaze-pl.md +++ b/assets/markdown/how_backblaze-pl.md @@ -5,4 +5,4 @@ 4. W wyświetlonym oknie podręcznym potwierdź generację. 5. Zapisz _keyID_ i _applicationKey_ w bezpiecznym miejscu. Na przykład w menedżerze haseł. -![Backblaze token setup](resource:assets/images/gifs/Backblaze.gif) +![Otrzymanie tokena Backblaze](resource:assets/images/gifs/Backblaze.gif) From 38538c5568801e36d280bd4847157214e76f6847 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:38:43 +0000 Subject: [PATCH 616/732] Translated using Weblate (Polish) Currently translated at 100.0% (8 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/pl/ --- assets/markdown/how_fallback_terminal-pl.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/markdown/how_fallback_terminal-pl.md b/assets/markdown/how_fallback_terminal-pl.md index 03695810..2abbe479 100644 --- a/assets/markdown/how_fallback_terminal-pl.md +++ b/assets/markdown/how_fallback_terminal-pl.md @@ -1,26 +1,26 @@ W panelu sterowania serwera Hetzner przejdź do zakładki **Rescue**. Następnie kliknij **Enable rescue & power cycle**. -In *Choose a Recue OS* select **linux64**, and in *SSH Key* select your key if it has been added to your Hetzner account. +W *Choose a Recue OS* wybierz **linux64**, a w *SSH Key* swój klucz, jeśli został dodany do konta Hetznera. -Click **Enable rescue & power cycle** and wait for the server to reboot. The login and password will be displayed on the screen. Login to the root user using your login and password information. +Naciśnij **Enable rescue & power cycle** i poczekaj na ponowne uruchomienie serwera. Zostanie wyświetlone hasło logowania. Zaloguj się na użytkownika root, używając informacji o loginie i haśle. -Mount your server file system and see the contents of the token file: +Zamontuj system plików swojego serwera i spójrz na zawartość pliku token: ```sh mount /dev/sda1 /mnt cat /mnt/etc/nixos/userdata/tokens.json ``` -This file will have a similar construction: +W tym pliku będzie podobny wzór: -```json +`json { - "tokens": [ + { "tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + { "token": "token_który_był_skopedowany", + { "name": "device_name", + { "data": "data" } ``` -Copy the token from the file and paste it in the next window. +Skopiuj token z pliku i wklej w kolejnym oknie. From d04bd5e6a22297282f59b9fac67fcbad4d54ca97 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 28 Apr 2023 14:27:43 +0000 Subject: [PATCH 617/732] Translated using Weblate (Polish) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/pl/ --- assets/markdown/how_digital_ocean-pl.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/markdown/how_digital_ocean-pl.md b/assets/markdown/how_digital_ocean-pl.md index dc6355c2..42496f98 100644 --- a/assets/markdown/how_digital_ocean-pl.md +++ b/assets/markdown/how_digital_ocean-pl.md @@ -1,12 +1,12 @@ -### How to get Digital Ocean API Token -1. Visit the following [link](https://cloud.digitalocean.com/) and sign - into newly created account. -2. Enter into previously created project. If you haven't created one, - then please proceed. -3. Go to the "API" link on the left bar. -4. Click on the "Generate New Token". -5. Enter any name for the token. -6. Put expiration time to "No expiry". -7. Check the "Write (optional)" checkbox. -8. Now click on the "Generate Token" button. -9. After that, the token will be shown. Store it in any reliable place, preferably a password manager. \ No newline at end of file +### Jak uzyskać token API Digital Ocean +1. Wejdź na stronę [link](https://cloud.digitalocean.com/) i zaloguj się + na konto, które właśnie utworzyłeś. +2. Zaloguj się do wcześniej utworzonego projektu. Jeśli jeszcze nie utworzyłeś projektu, + to przejdź dalej. +3. Kliknij na link "API" w lewym panelu. +4. Kliknij na przycisk "Generate New Token". +5. Wprowadź dowolną nazwę dla tokena. +6. Ustaw datę wygaśnięcia na "No expiry". +7. Zaznacz pole wyboru "Write (optional)". +8. Teraz kliknij przycisk "Generate Token". +9. Na ekranie pojawi się wówczas token. Przechowuj go w dowolnym bezpiecznym miejscu, najlepiej w menedżerze haseł. \ No newline at end of file From 54afeb04cc0b26630e0c242e2d2f9769d7d6253d Mon Sep 17 00:00:00 2001 From: Mithras Date: Mon, 8 May 2023 21:01:29 +0000 Subject: [PATCH 618/732] Translated using Weblate (Slovenian) Currently translated at 3.9% (17 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/sl/ --- assets/translations/sl.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/translations/sl.json b/assets/translations/sl.json index 0967ef42..1c7ccc78 100644 --- a/assets/translations/sl.json +++ b/assets/translations/sl.json @@ -1 +1,21 @@ -{} +{ + "test": "sl-test", + "locale": "sl", + "basis": { + "providers_title": "Vaš podatkovni center", + "select": "Izberite", + "services": "Storitve", + "users": "Uporabniki", + "more": "Več", + "next": "Naslednji", + "got_it": "Imam ga", + "settings": "Nastavitve", + "password": "Geslo", + "create": "Dodajte novo", + "confirmation": "Potrditev", + "cancel": "Prekliči", + "providers": "Ponudniki", + "services_title": "Vaše osebne, zasebne in neodvisne storitve.", + "app_name": "SelfPrivacy" + } +} From 649260bce27f065335f22bb639ccf17003871c50 Mon Sep 17 00:00:00 2001 From: Mithras Date: Mon, 8 May 2023 21:08:37 +0000 Subject: [PATCH 619/732] Translated using Weblate (Slovenian) Currently translated at 6.0% (26 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/sl/ --- assets/translations/sl.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/translations/sl.json b/assets/translations/sl.json index 1c7ccc78..c2526639 100644 --- a/assets/translations/sl.json +++ b/assets/translations/sl.json @@ -16,6 +16,15 @@ "cancel": "Prekliči", "providers": "Ponudniki", "services_title": "Vaše osebne, zasebne in neodvisne storitve.", - "app_name": "SelfPrivacy" + "app_name": "SelfPrivacy", + "delete": "Izbriši", + "close": "Zapri", + "connect": "Povežite", + "domain": "Domena", + "saving": "Varčevanje…", + "username": "Uporabniško ime", + "loading": "Nalaganje…", + "later": "Preskočite in prilagodite pozneje", + "connect_to_existing": "Preskočite in prilagodite pozneje" } } From 3fc7a76a669beb2e3c9cae82d456c545c440e8a0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 11 May 2023 17:30:21 +0000 Subject: [PATCH 620/732] Added translation using Weblate (Latvian) --- assets/translations/lv.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/translations/lv.json diff --git a/assets/translations/lv.json b/assets/translations/lv.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/assets/translations/lv.json @@ -0,0 +1 @@ +{} From 5c0a9ee7be73c3c5d71e3dfb0c7a8f6aaaab8c92 Mon Sep 17 00:00:00 2001 From: Mithras Date: Thu, 11 May 2023 17:12:40 +0000 Subject: [PATCH 621/732] Translated using Weblate (Slovenian) Currently translated at 29.7% (127 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/sl/ --- assets/translations/sl.json | 127 +++++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) diff --git a/assets/translations/sl.json b/assets/translations/sl.json index c2526639..25b85c2e 100644 --- a/assets/translations/sl.json +++ b/assets/translations/sl.json @@ -25,6 +25,131 @@ "username": "Uporabniško ime", "loading": "Nalaganje…", "later": "Preskočite in prilagodite pozneje", - "connect_to_existing": "Preskočite in prilagodite pozneje" + "connect_to_existing": "Preskočite in prilagodite pozneje", + "reset": "Ponastavitev", + "details": "Podrobne informacije", + "no_data": "Ni podatkov", + "wait": "Prenesi", + "remove": "Izbriši", + "apply": "Uporabi", + "done": "Končano", + "continue": "Nadaljuj", + "alert": "Opozorilo" + }, + "more_page": { + "about_application": "O prilogi", + "about_project": "O storitvi SelfPrivacy", + "onboarding": "Pozdravi", + "console": "Konzola", + "application_settings": "Nastavitve aplikacije", + "create_ssh_key": "Superuporabniški ključi SSH", + "configuration_wizard": "Pomočnik za nastavitev" + }, + "console_page": { + "title": "Konzole", + "waiting": "Čakanje na inicializacijo…", + "copy": "Kopiraj" + }, + "about_us_page": { + "title": "O storitvi SelfPrivacy" + }, + "about_application_page": { + "title": "O dodatku", + "api_version_text": "Različica API strežnika {}", + "privacy_policy": "Pravilnik o zasebnosti", + "application_version_text": "Različica aplikacije {}" + }, + "application_settings": { + "dark_theme_title": "Temna tema", + "title": "Nastavitve aplikacije", + "system_dark_theme_title": "Privzeta tema sistema", + "system_dark_theme_description": "Uporaba svetle ali temne teme glede na sistemske nastavitve", + "dark_theme_description": "Spreminjanje barvne teme", + "dangerous_settings": "Nevarne nastavitve", + "reset_config_title": "Ponastavitev konfiguracije aplikacije", + "reset_config_description": "Сбросить API ключи, а также root пользователя", + "delete_server_title": "Brisanje strežnika", + "delete_server_description": "To dejanje povzroči izbris strežnika. Nato bo nedosegljiv." + }, + "onboarding": { + "page1_title": "Digitalna neodvisnost je na voljo vsem", + "page1_text": "Pošta, VPN, messenger, družabna omrežja in še veliko več na lastnem zasebnem strežniku pod vašim popolnim nadzorom.", + "page2_title": "SelfPrivacy ni oblak, temveč vaš osebni podatkovni center", + "page2_text": "Storitev SelfPrivacy sodeluje le s ponudnikom storitev po vaši izbiri. Če nimate računov, vam jih lahko pomagamo ustvariti.", + "page2_server_provider_title": "Ponudnik strežnika", + "page2_server_provider_text": "Ponudnik strežnika bo vaš strežnik vzdrževal v svojem podatkovnem centru. SelfPrivacy se bo samodejno povezal z njim in nastavil vaš strežnik.", + "page2_dns_provider_title": "Ponudnik storitev DNS", + "page2_dns_provider_text": "To be on the Internet, you need a domain. To have a domain point to your server, you need a reliable DNS server. We will offer you to choose one of the supported DNS servers and automatically configure all entries. Want to configure them manually? You can do that too.", + "page2_backup_provider_title": "Ponudnik varnostnih kopij", + "page2_backup_provider_text": "Kaj če se kaj zgodi z vašim strežnikom? Predstavljajte si hekerski napad, nenamerno brisanje podatkov ali zavrnitev storitve? Vaši podatki bodo na varnem pri ponudniku varnostnih kopij. Te bodo varno šifrirane in kadar koli dostopne za obnovitev strežnika." + }, + "resource_chart": { + "month": "Mesec", + "day": "Dan", + "hour": "Ura", + "cpu_title": "Poraba CPU", + "out": "Poslano", + "network_title": "Uporaba omrežja", + "in": "Pridobljeno iz" + }, + "server": { + "card_title": "Server", + "description": "Vse vaše storitve so na voljo tukaj", + "general_information": "Splošne informacije", + "resource_usage": "Uporaba virov", + "allow_autoupgrade": "Dovolite samodejno nadgradnjo", + "allow_autoupgrade_hint": "Omogočite samodejne nadgradnje paketov na strežniku", + "reboot_after_upgrade": "Ponovni zagon po nadgradnji", + "core_count": { + "two": "{} jedra", + "few": "{} jedra", + "one": "{} jedro", + "many": "{} jedra", + "other": "{} jeder" + }, + "reboot_after_upgrade_hint": "Ponovni zagon brez poziva po uporabi sprememb v strežniku", + "server_timezone": "Časovni pas strežnika", + "select_timezone": "Izberite časovni pas", + "timezone_search_bar": "Ime časovnega pasu ali vrednost časovnega zamika", + "server_id": "ID strežnika", + "status": "Status", + "cpu": "CPU", + "ram": "Glavni pomnilnik", + "disk": "Lokalni disk", + "monthly_cost": "Mesečni stroški", + "location": "Lokacija", + "provider": "Ponudnik" + }, + "ssh": { + "root_subtitle": "Lastniki tukaj navedenih ključev imajo popoln dostop do podatkov in nastavitev strežnika. Dodajte samo svoje ključe.", + "title": "Ključi SSH", + "create": "Dodajanje ključa SSH", + "delete": "Odstranitev ključa SSH", + "delete_confirm_question": "Ali ste prepričani, da želite izbrisati naslednjo tipko?", + "subtitle_with_keys": "Ključi: {}", + "subtitle_without_keys": "Brez ključev", + "no_key_name": "Ključ brez imena", + "root_title": "To so ključi superuporabnika", + "input_label": "Javni ključ ED25519 ali RSA" + }, + "record": { + "cloud": "Oblak datotek", + "root": "Korenska domena", + "api": "SelfPrivacy API", + "git": "Git Strežnik", + "meet": "Videokonferenca", + "social": "Družabno omrežje", + "password": "Upravitelj gesel", + "vpn": "VPN", + "mx": "Zapis MX", + "dmarc": "DMARC zapis", + "spf": "SPF zapis", + "dkim": "DKIM ključ" + }, + "domain": { + "screen_title": "Domena in DNS", + "card_title": "Domena", + "ok": "Zapisi so v redu", + "error": "Ugotovljene težave" } } From 9d202b42dd16bdd87ced304c9344560ad94a507f Mon Sep 17 00:00:00 2001 From: Not Telling Lol Date: Thu, 11 May 2023 17:45:46 +0000 Subject: [PATCH 622/732] Translated using Weblate (Latvian) Currently translated at 12.6% (54 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/lv/ --- assets/translations/lv.json | 69 ++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/assets/translations/lv.json b/assets/translations/lv.json index 0967ef42..80c0f3b1 100644 --- a/assets/translations/lv.json +++ b/assets/translations/lv.json @@ -1 +1,68 @@ -{} +{ + "test": "lv-test", + "basis": { + "app_name": "SelfPrivacy", + "providers_title": "Tavs Datu Centrs", + "select": "Izvēlies", + "services": "Servisi", + "services_title": "Tavi personīgie, privātie un neatkarīgie servisi.", + "users": "Lietotāji", + "more": "Vairāk", + "next": "Nākamais", + "got_it": "Sapratu", + "password": "Parole", + "create": "Pievienot jaunu", + "confirmation": "Apstiprinājums", + "cancel": "Atcelt", + "delete": "Izdzēst", + "close": "Aizvērt", + "connect": "Savienoties", + "domain": "Domēna", + "saving": "Saglabā…", + "username": "Lietotājvārds", + "later": "Izlaist un iestatīt vēlāk", + "connect_to_existing": "Savienoties ar esošu serveri", + "reset": "Atiestatīt", + "details": "Detaļas", + "no_data": "Nav dati", + "wait": "Uzgaidiet", + "remove": "Noņemt", + "apply": "Pieteikties", + "done": "Pabeigts", + "alert": "Brīdinājums", + "providers": "Sniedzēji", + "settings": "Iestatījumi", + "loading": "Lādē…", + "continue": "Turpināt" + }, + "more_page": { + "configuration_wizard": "Iestatīšanas vednis", + "about_project": "Par mums", + "about_application": "Par", + "onboarding": "Pievienošanās", + "console": "Konsole", + "application_settings": "Aplikācijas iestatījumi", + "create_ssh_key": "Superlietotāja SSH atslēgas" + }, + "console_page": { + "title": "Konsole", + "copy": "Kopēt", + "waiting": "Gaida inicializatīnu…" + }, + "about_us_page": { + "title": "Par mums" + }, + "about_application_page": { + "title": "Par", + "application_version_text": "Aplikācijas versija {}", + "api_version_text": "Servera API versija {}", + "privacy_policy": "Privātuma politika" + }, + "application_settings": { + "system_dark_theme_title": "Sistēmas noklusējuma dizains", + "dark_theme_title": "Tumšs dizains", + "title": "Aplikācijas iestatījumi", + "system_dark_theme_description": "Izmantojiet gaišu vai tumšu dizainu atkarībā no sistēmas iestatījumiem" + }, + "locale": "lv" +} From 779708c0bf97acc7db4fe33aa0c3eba8991ba753 Mon Sep 17 00:00:00 2001 From: Mithras Date: Thu, 11 May 2023 18:32:51 +0000 Subject: [PATCH 623/732] Translated using Weblate (Slovenian) Currently translated at 48.2% (206 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/sl/ --- assets/translations/sl.json | 105 +++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/assets/translations/sl.json b/assets/translations/sl.json index 25b85c2e..bef66acb 100644 --- a/assets/translations/sl.json +++ b/assets/translations/sl.json @@ -150,6 +150,109 @@ "screen_title": "Domena in DNS", "card_title": "Domena", "ok": "Zapisi so v redu", - "error": "Ugotovljene težave" + "error": "Ugotovljene težave", + "error_subtitle": "Kliknite tukaj za popravek", + "refreshing": "Posodobitev podatkov…", + "uninitialized": "Podatki še niso na voljo", + "services_title": "Storitve", + "services_subtitle": "Za vsako storitev so potrebni zapisi tipa \"A\".", + "email_title": "E-pošta", + "email_subtitle": "Zapisi, potrebni za varno izmenjavo e-pošte.", + "update_list": "Seznam posodobitev" + }, + "backup": { + "restore": "Obnovitev iz varnostne kopije", + "no_backups": "Varnostnih kopij še ni", + "card_title": "Varnostna kopija", + "description": "V primeru incidenta: napada hekerjev, izbrisa strežnika itd.", + "reupload_key": "Prisilna posodobitev ključa", + "reuploaded_key": "Ključ v strežniku je bil posodobljen", + "initialize": "Inicializacija", + "waiting_for_rebuild": "Prvo varnostno kopijo boste lahko ustvarili v nekaj minutah.", + "create_new": "Ustvarite novo varnostno kopijo", + "creating": "Ustvarjanje nove varnostne kopije: {}%", + "restoring": "Obnovitev iz varnostne kopije", + "error_pending": "Strežnik je vrnil napako, preverite spodaj", + "restore_alert": "Obnavljate iz varnostne kopije, ustvarjene dne {}. Vsi trenutni podatki bodo izgubljeni. Ste prepričani?", + "refresh": "Osvežitev stanja", + "refetch_backups": "Ponovno pridobivanje seznama varnostnih kopij", + "refetching_list": "V nekaj minutah bo seznam posodobljen" + }, + "mail": { + "login_info": "Uporabite uporabniško ime in geslo iz zavihka uporabniki. Vrata IMAP: 143, STARTTLS. Vrata SMTP: 587, STARTTLS.", + "title": "E-naslov", + "subtitle": "E-pošta za družbo in družino." + }, + "password_manager": { + "title": "Upravitelj gesel", + "subtitle": "Osnova vaše varnosti. Bitwarden vam bo pomagal ustvarjati, shranjevati in prenašati gesla med napravami ter jih na zahtevo vnašati z uporabo samodejnega dopolnjevanja.", + "login_info": "Na spletnem mestu boste morali ustvariti račun." + }, + "video": { + "title": "Videokonferenca", + "subtitle": "Zoom in Google Meet sta dobra, vendar je Jitsi Meet vredna alternativa, ki vam daje tudi zagotovilo, da vam nihče ne prisluškuje.", + "login_info": "Račun ni potreben." + }, + "storage": { + "extending_volume_price_info": "Cena vključuje DDV in je izračunana na podlagi podatkov o cenah, ki jih je posredoval Hetzner. Strežnik se med postopkom ponovno zažene.", + "data_migration_notice": "Med migracijo bodo vse storitve izklopljene.", + "card_title": "Shranjevanje podatkov v strežniku", + "status_ok": "Uporaba diska je v redu", + "status_error": "Malo prostora na disku", + "disk_usage": "{} uporablja se", + "disk_total": "{} skupaj - {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Bajti", + "extend_volume_button": "Podaljšanje glasnosti", + "extending_volume_title": "Razširitev prostora za shranjevanje", + "extending_volume_description": "Če spremenite velikost shrambe, lahko v strežniku shranite več podatkov, ne da bi pri tem povečali sam strežnik. Obseg je mogoče samo povečati: ni ga mogoče zmanjšati.", + "extending_volume_error": "Ni uspelo zagnati razširitve shrambe.", + "size": "Velikost", + "euro": "Euro", + "data_migration_title": "Migracija podatkov", + "start_migration_button": "Začetek migracije", + "migration_process": "Selitev…", + "migration_done": "Zaključek" + }, + "service_page": { + "uses": "Uporablja {usage} na {volume}", + "status": { + "reloading": "Ponovni zagon spletne strani", + "active": "Vzpostavitev in delovanje", + "inactive": "Ustavljeno", + "failed": "Ni se uspelo zagnati", + "off": "Invalidi", + "activating": "Aktivacija spletne strani", + "deactivating": "Deaktiviranje spletne strani" + }, + "open_in_browser": "Odprite v brskalniku", + "restart": "Ponovni zagon storitve", + "disable": "Onemogočite storitev", + "enable": "Omogočite storitev", + "move": "Premik na drug zvezek" + }, + "social_network": { + "subtitle": "Težko je verjeti, vendar je mogoče ustvariti lastno družbeno omrežje z lastnimi pravili in občinstvom.", + "title": "Družbeno omrežje", + "login_info": "Na spletišču morate ustvariti račun." + }, + "not_ready_card": { + "in_menu": "Strežnik še ni bil nastavljen, uporabite čarovnika za povezavo." + }, + "cloud": { + "title": "Shranjevanje v oblaku", + "subtitle": "Storitvam v oblaku ne dovolite vpogleda v svoje podatke. Uporabite NextCloud - varen dom za vse svoje podatke.", + "login_info": "Prijava skrbnika: admin, geslo je enako geslu glavnega uporabnika. Ustvarite nove uporabnike v skrbniškem vmesniku NextCloud." + }, + "git": { + "title": "Git Strežnik", + "subtitle": "Zasebna alternativa Githubu, ki pripada vam, ne pa Microsoftu.", + "login_info": "Na spletnem mestu morate ustvariti račun. Prvi uporabnik bo postal administrator." + }, + "vpn": { + "title": "VPN Strežnik", + "subtitle": "Zasebni strežnik VPN" } } From 8326b89b8355908cc5fa2a8a17058159b878e47f Mon Sep 17 00:00:00 2001 From: Not Telling Lol Date: Thu, 11 May 2023 18:11:03 +0000 Subject: [PATCH 624/732] Translated using Weblate (Latvian) Currently translated at 34.6% (148 of 427 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/lv/ --- assets/translations/lv.json | 114 +++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/assets/translations/lv.json b/assets/translations/lv.json index 80c0f3b1..d9cfd290 100644 --- a/assets/translations/lv.json +++ b/assets/translations/lv.json @@ -62,7 +62,117 @@ "system_dark_theme_title": "Sistēmas noklusējuma dizains", "dark_theme_title": "Tumšs dizains", "title": "Aplikācijas iestatījumi", - "system_dark_theme_description": "Izmantojiet gaišu vai tumšu dizainu atkarībā no sistēmas iestatījumiem" + "system_dark_theme_description": "Izmantojiet gaišu vai tumšu dizainu atkarībā no sistēmas iestatījumiem", + "dark_theme_description": "Lietojumprogrammas dizaina pārslēgšana", + "dangerous_settings": "Bīstamie iestatījumi", + "reset_config_title": "Atiestatīt lietojumprogrammas konfigurāciju", + "reset_config_description": "Atiestatīt API atslēgas un saknes lietotāju", + "delete_server_title": "Izdzēst serveri", + "delete_server_description": "Šis izdzēš jūsu serveri. Tas vairs nebūs pieejams." }, - "locale": "lv" + "locale": "lv", + "ssh": { + "title": "SSH atslēgas", + "create": "Izveidot SSH atslēgu", + "delete": "Izdzēst SSH atslēgu", + "subtitle_with_keys": "{} atslēgas", + "subtitle_without_keys": "Nav atslēgu", + "no_key_name": "Nenosaukta atslēga", + "root_title": "Šīs ir superlietotāja atslēgas", + "input_label": "Publiska ED25519 vai RSA atslēga", + "delete_confirm_question": "Vai jūs esat pārliecināti, ka vēlaties izdzēst SSH atslēgu?", + "root_subtitle": "Šo atslēgu īpašnieki saņem pilnu piekļuvi serverim un var ar to kaut ko darīt. Pievienojiet serverim tikai savas atslēgas." + }, + "onboarding": { + "page1_title": "Digitālā neatkarība, kas pieejama mums visiem", + "page1_text": "Pasts, VPN, Ziņnesis, sociālie tīkli un daudz cits uz tava privātā servera, zem tavas kontroles.", + "page2_title": "SelfPrivacy nav mākonis, tas ir tavs personīgais datu centrs", + "page2_server_provider_title": "Servera sniedzējs", + "page2_server_provider_text": "Servera sniedzējs uztur tavu serveri savā datu centrā. SelfPrivacy automātiksi savienosies ar sniedzēju un uzstādīs visas vajadzīgās lietas.", + "page2_dns_provider_title": "DNS sniedzējs", + "page2_backup_provider_title": "Dublēšanas pakalpojumu sniedzējs", + "page2_backup_provider_text": "Ko darīt, ja kaut kas notiek ar jūsu serveri? Iedomājieties hakeru uzbrukumu, nejaušu datu dzēšanu vai pakalpojuma atteikumu? Jūsu dati tiks glabāti drošībā pie dublējumu nodrošinātāja. Tie būs droši šifrēti un jebkurā laikā pieejami, lai atjaunotu jūsu serveri ar.", + "page2_text": "SelfPrivacy tikai darbojas ar tiem sniedzējiem, ko tu izvēlies. Ja tev nav nepieciešamie konti tajos, mēs tev palīdzēsim tos uztaisīt.", + "page2_dns_provider_text": "Jums ir nepieciešams domēns, lai būtu vieta internetā. Un jums ir nepieciešams arī uzticams DNS nodrošinātājs, lai domēns būtu vērsts uz jūsu serveri. Mēs iesakām izvēlēties atbalstītu DNS nodrošinātāju, lai automātiski iestatītu tīklošanu." + }, + "resource_chart": { + "month": "Mēnesis", + "day": "Diena", + "hour": "Stunda", + "cpu_title": "CPU izmantošana", + "network_title": "Tīkla lietojums", + "in": "Iekšā", + "out": "Ārā" + }, + "server": { + "card_title": "Serveris", + "description": "Visi tavi serveri dzīvo šeit", + "general_information": "Vispārīga informācija", + "resource_usage": "Resursu izmantošana", + "allow_autoupgrade": "Atļaut automātisko jaunināšanu", + "allow_autoupgrade_hint": "Automātisko pakotņu jaunināšanas atļaušana serverī", + "reboot_after_upgrade": "Atsāknēšana pēc jaunināšanas", + "reboot_after_upgrade_hint": "Atsāknēšana bez tūlītējas pēc izmaiņu piemērošanas serverī", + "select_timezone": "Laika joslas atlasīšana", + "timezone_search_bar": "Laika joslas nosaukums vai laika nobīdes vērtība", + "server_id": "Servera ID", + "status": "Status", + "cpu": "CPU", + "disk": "Disks lokāls", + "monthly_cost": "Mēneša maksa", + "location": "Vieta", + "provider": "Sniedzējs", + "core_count": { + "one": "{} kodols", + "two": "{} kodoli", + "few": "{} kodoli", + "many": "{} kodoli", + "other": "{} kodoli" + }, + "server_timezone": "Servera laika josla", + "ram": "Atmiņa" + }, + "record": { + "root": "Saknes domēns", + "api": "SelfPrivacy API", + "cloud": "Failu mākonis", + "git": "Git serveris", + "meet": "Video konference", + "social": "Sociālais tīkls", + "password": "Paroļu pārvaldnieks", + "vpn": "VPN", + "mx": "MX ieraksts", + "spf": "SPF ieraksts", + "dkim": "DKIM atslēga", + "dmarc": "DMARC ieraksts" + }, + "domain": { + "card_title": "Domēns", + "screen_title": "Domēns un DNS", + "ok": "Ieraksti ir kārtībā", + "error": "Atrastas problēmas", + "refreshing": "Notiek statusa atsvaidzināšana…", + "uninitialized": "Dati vēl nav izgūti", + "services_title": "Pakalpojumi", + "email_title": "E-pasts", + "email_subtitle": "Ieraksti nepieciešami drošai e-pasta apmaiņai.", + "update_list": "Atjaunināt sarakstu", + "error_subtitle": "Pieskarieties šeit, lai tos labotu", + "services_subtitle": "Tips \"A\" ieraksti nepieciešami katram pakalpojumam." + }, + "backup": { + "card_title": "Rezerves", + "description": "Izglābs jūsu dienu incidenta gadījumā: hakeru uzbrukums, servera dzēšana utt.", + "reupload_key": "Piespiedu atkārtotas augšupielādes atslēga", + "initialize": "Inicializēt", + "restore": "Atjaunono dublējuma", + "no_backups": "Vēl nav dublējumu", + "create_new": "Jauna dublējuma izveide", + "creating": "Veido jaunu dublējumu: {}%", + "error_pending": "Servera atgrieztā kļūda, pārbaudiet to zemāk", + "refresh": "Atsvaidzināšanas statuss", + "reuploaded_key": "Atslēga atkārtoti ielādēta", + "waiting_for_rebuild": "Pirmo dublējumu varēsit izveidot dažu minūšu laikā.", + "restore_alert": "Jūs gatavojaties atjaunot no dublējuma, kas izveidots {}. Visi pašreizējie dati tiks zaudēti. Vai esi pārliecināts?" + } } From e8056e9c3cf3358cb61e824978638b99f2934405 Mon Sep 17 00:00:00 2001 From: Mithras Date: Wed, 14 Jun 2023 14:05:22 +0000 Subject: [PATCH 625/732] Translated using Weblate (French) Currently translated at 53.6% (230 of 429 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/fr/ --- assets/translations/fr.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 914f3cbd..945d1f5a 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -33,7 +33,8 @@ "alert": "Alerte", "continue": "Continuer", "apply": "Appliquer", - "done": "Effectué" + "done": "Effectué", + "app_name": "SelfPrivacy" }, "more_page": { "about_application": "À propos", From 28be8bd58a6d37b0f82afa3424227b3f11ab25bb Mon Sep 17 00:00:00 2001 From: Mithras Date: Wed, 14 Jun 2023 14:28:41 +0000 Subject: [PATCH 626/732] Translated using Weblate (Ukrainian) Currently translated at 92.5% (397 of 429 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/uk/ --- assets/translations/uk.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/translations/uk.json b/assets/translations/uk.json index ebbdee7a..cc2a145a 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -32,7 +32,8 @@ "cancel": "Відмінити", "delete": "Видалити", "close": "Закрити", - "connect": "Підключіться" + "connect": "Підключіться", + "app_name": "SelfPrivacy" }, "locale": "ua", "application_settings": { @@ -67,7 +68,8 @@ }, "console_page": { "title": "Консоль", - "waiting": "Очікування ініціалізації…" + "waiting": "Очікування ініціалізації…", + "copy": "Copie" }, "about_us_page": { "title": "Про нас" From d2f4e07cc16c33a2f235245f1638d684a1031d7a Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 19 Jun 2023 20:04:05 +0000 Subject: [PATCH 627/732] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ --- assets/translations/az.json | 1 - assets/translations/be.json | 1 - assets/translations/cs.json | 1 - assets/translations/de.json | 1 - assets/translations/pl.json | 1 - assets/translations/sk.json | 1 - assets/translations/uk.json | 1 - 7 files changed, 7 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index 9cde2752..a49dd1ff 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -295,7 +295,6 @@ "choose_server_type_ram": "RAM üçün {} GB", "choose_server_type_storage": "{} GB sistem yaddaşı", "choose_server_type_payment_per_month": "{} aylıq", - "cloudflare_bad_key_error": "Cloudflare API açarı yanlışdır", "backblaze_bad_key_error": "Backblaze vault haqqında məlumat yanlışdır", "select_dns": "İndi DNS provayderini seçək", "manage_domain_dns": "Domeninizin DNS-ni idarə etmək üçün", diff --git a/assets/translations/be.json b/assets/translations/be.json index 9aff7934..a276f348 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -12,7 +12,6 @@ "choose_server_type_ram": "{} GB RAM", "choose_server_type_payment_per_month": "{} у месяц", "no_server_types_found": "Не знойдзена даступных тыпаў сервера! Калі ласка, пераканайцеся, што ў вас ёсць доступ да правайдэра сервера...", - "cloudflare_bad_key_error": "Cloudflare API ключ няправільны", "backblaze_bad_key_error": "Інфармацыя аб Backblaze сховішча няслушная", "select_dns": "Цяпер давайце выберам DNS-правайдэра", "what": "Што гэта значыць?", diff --git a/assets/translations/cs.json b/assets/translations/cs.json index f537272c..d4c79b96 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -174,7 +174,6 @@ "choose_server_type_storage": "{} GB systémového úložiště", "choose_server_type_payment_per_month": "{} měsíčně", "no_server_types_found": "Nebyly nalezeny žádné dostupné typy serverů. Ujistěte se, že je váš účet přístupný, a zkuste změnit umístění serveru.", - "cloudflare_bad_key_error": "Klíč API služby Cloudflare je neplatný", "backblaze_bad_key_error": "Informace o úložišti Backblaze jsou neplatné", "select_dns": "Nyní vybereme poskytovatele DNS", "use_this_domain": "Použít tuto doménu?", diff --git a/assets/translations/de.json b/assets/translations/de.json index 15beece2..693ade34 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -318,7 +318,6 @@ "choose_server_type_ram": "{} GB Arbeitsspeicher", "choose_server_type_storage": "{} GB Systemspeicher", "choose_server_type_payment_per_month": "{} pro Monat", - "cloudflare_bad_key_error": "Der Cloudflare-API-Schlüssel ist ungültig", "what": "Was bedeutet das?", "server_rebooted": "Server neugestartet. Warten auf die letzte Bestätigung…", "server_started": "Server gestartet. Es wird jetzt validiert und neugestartet…", diff --git a/assets/translations/pl.json b/assets/translations/pl.json index a75a51b9..1f664f0b 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -320,7 +320,6 @@ "choose_server_type_storage": "{} GB pamięci na diskie", "choose_server_type_payment_per_month": "{} miesięcznie", "no_server_types_found": "Nie znaleziono dostępnych typów serwerów! Proszę upewnić się, że masz dostęp do dostawcy serwera...", - "cloudflare_bad_key_error": "Klucz API Cloudflare jest nieprawidłowy", "use_this_domain": "Kto używa ten domen?", "cloudflare_api_token": "Klucz CloudFlare API", "connect_backblaze_storage": "Dodajcie Blackblaze", diff --git a/assets/translations/sk.json b/assets/translations/sk.json index efa0dab0..9573ccae 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -321,7 +321,6 @@ "choose_server_type_storage": "{} GB systémového úložiska", "choose_server_type_payment_per_month": "{} mesačne", "no_server_types_found": "Nenašli sa žiadne dostupné typy serverov. Uistite sa, že je váš účet prístupný a skúste zmeniť umiestnenie servera.", - "cloudflare_bad_key_error": "Kľúč Cloudflare API je neplatný", "backblaze_bad_key_error": "Informácie o úložisku Backblaze sú neplatné", "select_dns": "Teraz vyberme poskytovateľa DNS", "manage_domain_dns": "Na správu DNS vašej domény", diff --git a/assets/translations/uk.json b/assets/translations/uk.json index cc2a145a..7a80b0dd 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -130,7 +130,6 @@ "choose_server_type_storage": "{} ГБ системного сховища", "choose_server_type_payment_per_month": "{} щомісячно", "no_server_types_found": "Не знайдено доступних типів серверів. Переконайтеся, що ваш обліковий запис доступний і спробуйте змінити розташування вашого сервера.", - "cloudflare_bad_key_error": "Некоректний ключ API CloudFlare", "backblaze_bad_key_error": "Інформація про зберігання Backblaze є недійсною", "select_dns": "Тепер давайте оберемо DNS-провайдера", "manage_domain_dns": "Для управління DNS домену", From f350e8ced97fa49653a38a2033f493287bdfb977 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 23 Jun 2023 01:17:09 +0000 Subject: [PATCH 628/732] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ --- assets/translations/cs.json | 1 - assets/translations/sl.json | 1 - 2 files changed, 2 deletions(-) diff --git a/assets/translations/cs.json b/assets/translations/cs.json index d4c79b96..a82a9337 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -287,7 +287,6 @@ "extending_volume_price_info": "Cena je uvedena včetně DPH a je odhadnuta na základě cenových údajů poskytnutých společností Hetzner. Po změně velikosti bude server restartován.", "extending_volume_error": "Nepodařilo se inicializovat rozšíření svazku.", "size": "Velikost", - "euro": "Euro", "data_migration_title": "Migrace dat", "data_migration_notice": "Během migrace budou všechny služby vypnuty.", "start_migration_button": "Zahájení migrace", diff --git a/assets/translations/sl.json b/assets/translations/sl.json index bef66acb..c8bcd3b8 100644 --- a/assets/translations/sl.json +++ b/assets/translations/sl.json @@ -210,7 +210,6 @@ "extending_volume_description": "Če spremenite velikost shrambe, lahko v strežniku shranite več podatkov, ne da bi pri tem povečali sam strežnik. Obseg je mogoče samo povečati: ni ga mogoče zmanjšati.", "extending_volume_error": "Ni uspelo zagnati razširitve shrambe.", "size": "Velikost", - "euro": "Euro", "data_migration_title": "Migracija podatkov", "start_migration_button": "Začetek migracije", "migration_process": "Selitev…", From 8bf910390dd869ac57f85db0db41467edafc7065 Mon Sep 17 00:00:00 2001 From: Not Telling Lol Date: Tue, 27 Jun 2023 11:33:38 +0000 Subject: [PATCH 629/732] Translated using Weblate (Latvian) Currently translated at 41.3% (180 of 435 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/lv/ --- assets/translations/lv.json | 42 ++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/assets/translations/lv.json b/assets/translations/lv.json index d9cfd290..b4a38c8e 100644 --- a/assets/translations/lv.json +++ b/assets/translations/lv.json @@ -173,6 +173,46 @@ "refresh": "Atsvaidzināšanas statuss", "reuploaded_key": "Atslēga atkārtoti ielādēta", "waiting_for_rebuild": "Pirmo dublējumu varēsit izveidot dažu minūšu laikā.", - "restore_alert": "Jūs gatavojaties atjaunot no dublējuma, kas izveidots {}. Visi pašreizējie dati tiks zaudēti. Vai esi pārliecināts?" + "restore_alert": "Jūs gatavojaties atjaunot no dublējuma, kas izveidots {}. Visi pašreizējie dati tiks zaudēti. Vai esi pārliecināts?", + "restoring": "Atjaunošana no dublējuma", + "refetch_backups": "Atkārtoti ielādēt dublējumkopiju sarakstu", + "refetching_list": "Pēc dažām minūtēm saraksts tiks atjaunināts" + }, + "service_page": { + "uses": "Izmanto {usage} uz {volume}", + "open_in_browser": "Atvērt pārlūkprogrammā", + "restart": "Restartējiet pakalpojumu", + "disable": "Atspējot pakalpojumu", + "enable": "Iespējot pakalpojumu", + "move": "Pāriet uz citu sējumu", + "status": { + "active": "Darbojas", + "inactive": "Apstājies" + } + }, + "storage": { + "start_migration_button": "Sāciet migrāciju", + "card_title": "Servera krātuve", + "status_ok": "Diska lietojums ir kārtībā", + "status_error": "Maz vietas diskā", + "disk_usage": "{} izmantots", + "disk_total": "{} Kopā · {}", + "gb": "{} GB", + "mb": "{} MB", + "kb": "{} KB", + "bytes": "Baiti", + "extend_volume_button": "Pagarināt skaļumu", + "extending_volume_title": "Skaļuma paplašināšana", + "extending_volume_description": "Skaļuma lieluma maiņa ļaus serverī saglabāt vairāk datu, nepagarinot pašu serveri. Skaļumu var tikai palielināt: sarukt nav iespējams.", + "extending_volume_price_info": "Cenā ir iekļauts PVN, un tā ir aprēķināta no Hetzner sniegtajiem cenu datiem. Pēc izmēra maiņas serveris tiks restartēts.", + "extending_volume_error": "Nevarēja inicializēt skaļuma palielināšanu.", + "size": "Lielums", + "data_migration_title": "Datu migrācija", + "data_migration_notice": "Migrācijas laikā visi pakalpojumi tiks izslēgti.", + "migration_process": "Notiek migrēšana…", + "migration_done": "Pabeigt" + }, + "not_ready_card": { + "in_menu": "Serveris vēl nav iestatīts. Lūdzu, pabeidziet iestatīšanu, izmantojot iestatīšanas vedni, lai turpinātu darbu." } } From 602449e483c7c6da0aff1dbb4327fba11f7bbd96 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 08:06:48 +0000 Subject: [PATCH 630/732] Translated using Weblate (Russian) Currently translated at 100.0% (435 of 435 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index be4a807b..51a069e5 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -352,7 +352,8 @@ "dns_setup": "Установка DNS", "server_reboot": "Перезагрузка сервера", "final_checks": "Финальные проверки" - } + }, + "server_provider_description": "Место, где будут находиться ваши данные и службы SelfPrivacy:" }, "recovering": { "generic_error": "Ошибка проведения операции, попробуйте ещё раз.", @@ -458,7 +459,8 @@ "reboot": "Перезагрузить", "you_cant_use_this_api": "Нельзя использовать этот API для доменом с подобным TLD.", "yes": "Да", - "no": "Нет" + "no": "Нет", + "volume_creation_error": "Не удалось создать том." }, "timer": { "sec": "{} сек" @@ -504,10 +506,12 @@ "subtitle": "Эти настройки предназначены только для отладки. Не изменяйте их, если не знаете, что делаете.", "server_setup": "Мастер установки сервера", "use_staging_acme": "Использование тестового ACME сервера", - "use_staging_acme_description": "Пересоберите приложение, чтобы изменить это значение.", + "use_staging_acme_description": "Применяется при настройке нового сервера.", "routing": "Маршрутизация приложений", "reset_onboarding": "Сбросить флаг посещения приветствия", "cubit_statuses": "Текущий статут кубитов загрузки", - "reset_onboarding_description": "Сброс переключателя включения для повторного отображения экрана включения" + "reset_onboarding_description": "Сброс переключателя включения для повторного отображения экрана включения", + "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", + "ignore_tls": "Не проверять сертификаты TLS" } -} \ No newline at end of file +} From 9718990c66eb17c4cba8492dcfbb9327be428724 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 10:17:32 +0000 Subject: [PATCH 631/732] Translated using Weblate (German) Currently translated at 100.0% (435 of 435 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/de/ --- assets/translations/de.json | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/assets/translations/de.json b/assets/translations/de.json index 693ade34..4774dcbe 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -245,7 +245,8 @@ "reboot": "Neustarten", "you_cant_use_this_api": "Sie können diese API nicht für Domains mit einer solchen TLD verwenden.", "yes": "Ja", - "no": "Nein" + "no": "Nein", + "volume_creation_error": "Volume konnte nicht erstellt werden." }, "jobs": { "create_user": "Benutzer erstellen", @@ -277,7 +278,7 @@ "manage_domain_dns": "Zum Verwalten des DNS Ihrer Domain", "use_this_domain": "Diese Domäne verwenden?", "use_this_domain_text": "Das von Ihnen bereitgestellte Token gewährt Zugriff auf die folgende Domäne", - "cloudflare_api_token": "CloudFlare-API-Token", + "cloudflare_api_token": "API-Schlüssel des DNS-Anbieters", "connect_backblaze_storage": "Backblaze-Speicher verbinden", "no_connected_domains": "Derzeit keine verbundenen Domains", "loading_domain_list": "Domänenliste wird geladen", @@ -339,14 +340,21 @@ "nixos_installation": "NixOS-Installation", "server_reboot": "Server-Neustart", "final_checks": "Endgültige Kontrollen" - } + }, + "dns_provider_bad_key_error": "Der API-Schlüssel ist ungültig", + "connect_to_dns": "Verbinden Sie den DNS-Anbieter", + "connect_to_dns_provider_text": "Mithilfe der Token-API konfiguriert die SelfPrivacy-Anwendung DNS-Einträge", + "server_provider_description": "Der Ort, an dem sich Ihre Daten und SelfPrivacy-Dienste befinden:", + "dns_provider_description": "Dadurch wird Ihre Domain mit einer IP-Adresse verknüpft:", + "select_provider_price_free": "Kostenlos", + "select_provider_payment_text_cloudflare": "Bankkarten" }, "validations": { "length_not_equal": "Länge ist [], sollte {} sein", "required": "Erforderlich", "already_exist": "Ist bereits vorhanden", "invalid_format": "Ungültiges Format", - "invalid_format_password": "Darf keine Leerzeichen enthalten", + "invalid_format_password": "Das Passwort darf keine Leerzeichen enthalten", "invalid_format_ssh": "Muss dem SSH-Schlüsselformat entsprechen", "root_name": "Benutzername darf nicht root sein", "length_longer": "Länge ist [], sollte kürzer oder gleich {} sein" @@ -406,7 +414,7 @@ "server_provider_connected_description": "Kommunikation hergestellt. Eingabe Ihres Tokens Token mit Zugriff auf {}:", "choose_server_description": "Wir konnten nicht herausfinden, mit welchem Server Sie sich verbinden möchten.", "modal_confirmation_dns_invalid": "Reverse DNS zeigt auf eine andere Domain", - "confirm_cloudflare_description": "Eingabe des Cloudflare-Tokens mit Zugriff auf {}:", + "confirm_cloudflare_description": "Geben Sie das DNS-Token des Anbieters ein, der Rechte für {} hat:", "confirm_backblaze": "Mit Backblaze verbinden", "confirm_backblaze_description": "Geben Sie ein Backblaze-Token mit Zugriff auf den Sicherungsspeicher ein:", "generic_error": "Vorgang fehlgeschlagen, bitte versuchen Sie es erneut.", @@ -440,7 +448,7 @@ "modal_confirmation_dns_valid": "Reverse DNS ist gültig", "modal_confirmation_ip_valid": "Die IP ist die gleiche wie im DNS-Eintrag", "modal_confirmation_ip_invalid": "Die IP ist nicht dieselbe wie im DNS-Eintrag", - "confirm_cloudflare": "Mit CloudFlare verbinden" + "confirm_cloudflare": "Verbindung zu einem DNS-Anbieter herstellen" }, "recovery_key": { "key_connection_error": "Es konnte keine Verbindung zum Server hergestellt werden.", @@ -498,10 +506,12 @@ "subtitle": "Diese Einstellungen sind nur für Debugging-Zwecke gedacht. Ändern Sie sie nicht, wenn Sie nicht wissen, was Sie tun.", "server_setup": "Server-Einrichtung", "use_staging_acme": "Verwendung des ACME-Testservers", - "use_staging_acme_description": "Erstellen Sie die Anwendung neu, um diesen Wert zu ändern.", + "use_staging_acme_description": "Wird beim Einrichten eines neuen Servers verwendet.", "routing": "Anwendungsrouting", "reset_onboarding": "Setzen Sie die Willkommensflagge für den Besuch zurück", "reset_onboarding_description": "Zurücksetzen des Netzschalters, um den Einschaltbildschirm erneut aufzurufen", - "cubit_statuses": "Aktueller Status der Ladequbits" + "cubit_statuses": "Aktueller Status der Ladequbits", + "ignore_tls": "Überprüfen Sie keine TLS-Zertifikate", + "ignore_tls_description": "Die Anwendung validiert TLS-Zertifikate nicht, wenn sie eine Verbindung zum Server herstellt." } -} \ No newline at end of file +} From aa5bbd425b36dfc313e97375871c390c6d851b42 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 10:57:34 +0000 Subject: [PATCH 632/732] Translated using Weblate (Polish) Currently translated at 99.7% (434 of 435 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/pl/ --- assets/translations/pl.json | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 1f664f0b..93bdb733 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -282,7 +282,7 @@ "required": "Potrzebien", "root_name": "Nie może być 'root'", "invalid_format_ssh": "Potrzebien format klucza SSH", - "invalid_format_password": "Nie musi mieć puste symbole" + "invalid_format_password": "Hasło nie może zawierać spacji" }, "not_ready_card": { "in_menu": "Serwer jeszcze nie jest skonfigurowany, użyj kreatora połączeń." @@ -321,7 +321,7 @@ "choose_server_type_payment_per_month": "{} miesięcznie", "no_server_types_found": "Nie znaleziono dostępnych typów serwerów! Proszę upewnić się, że masz dostęp do dostawcy serwera...", "use_this_domain": "Kto używa ten domen?", - "cloudflare_api_token": "Klucz CloudFlare API", + "cloudflare_api_token": "Klucz API dostawcy DNS", "connect_backblaze_storage": "Dodajcie Blackblaze", "no_connected_domains": "Niema podłączonych domenów", "what": "Co to znaczy?", @@ -356,7 +356,14 @@ "dns_setup": "Instalacja DNS", "server_reboot": "Restart serwera", "final_checks": "Kontrole końcowe" - } + }, + "dns_provider_bad_key_error": "Klucz API jest nieprawidłowy", + "connect_to_dns_provider_text": "Za pomocą interfejsu API tokena aplikacja SelfPrivacy skonfiguruje rekordy DNS", + "server_provider_description": "Lokalizacja, w której będą znajdować się Twoje dane i usługi SelfPrivacy:", + "dns_provider_description": "Spowoduje to połączenie Twojej domeny z adresem IP:", + "select_provider_price_free": "Za darmo", + "select_provider_payment_text_cloudflare": "Karty bankowe", + "connect_to_dns": "Połącz dostawcę DNS" }, "jobs": { "delete_ssh_key": "Wydalić SSH-klucz dla {}", @@ -396,7 +403,8 @@ "try_again": "Mam spróbować jeszcze raz?", "purge_all_keys_confirm": "Tak, wymazać wszystkie klucze", "delete_server_volume": "Usunąć serwer i pamięć masową?", - "you_cant_use_this_api": "Nie możesz użyć tego API dla domeny z podobnym TLD." + "you_cant_use_this_api": "Nie możesz użyć tego API dla domeny z podobnym TLD.", + "volume_creation_error": "Nie udało się utworzyć woluminu." }, "recovery_key": { "key_main_header": "Klucz odzyskania", @@ -425,7 +433,7 @@ "recovering": { "confirm_server_decline": "Wybierz inny serwer", "domain_not_available_on_token": "Wprowadzony token nie ma dostępu do żądanej domeny.", - "confirm_cloudflare_description": "Podaj token Cloudflare, który ma prawa do {}:", + "confirm_cloudflare_description": "Wprowadź token DNS dostawcy, który ma uprawnienia do {}:", "method_recovery_input_description": "Wprowadź swój token odzyskiwania", "fallback_select_provider_console": "Dostęp do konsoli serwera mojego dostawcy.", "confirm_server_description": "Znalazłem twój serwer! Potwierdź, że jest to właściwe:", @@ -453,7 +461,7 @@ "modal_confirmation_dns_invalid": "Odwrócony DNS wskazuje na inną domenę", "modal_confirmation_ip_valid": "IP jest takie samo jak w rekordzie DNS", "modal_confirmation_ip_invalid": "IP nie jest zgodne z tym w rekordzie DNS", - "confirm_cloudflare": "Łączenie się z Cloudflare", + "confirm_cloudflare": "Łączenie z dostawcą DNS", "confirm_backblaze": "Podłączanie do Backblaze", "confirm_backblaze_description": "Wpisz token Backblaze, który ma prawa do magazynu kopii zapasowych:", "fallback_select_description": "Które z nich posiadasz? Wybierz pierwszą, która pasuje:", @@ -498,10 +506,11 @@ "title": "Ustawienia dewelopera", "server_setup": "Kreator instalacji serwera", "use_staging_acme": "Korzystanie z serwera testów ACME", - "use_staging_acme_description": "Ponownie skompiluj aplikację, aby zmienić tę wartość.", + "use_staging_acme_description": "Używane podczas konfigurowania nowego serwera.", "routing": "Trasowanie aplikacji", "reset_onboarding": "Wyzerowanie flagi powitalnej dla wizyty", "reset_onboarding_description": "Resetowanie przełącznika zasilania w celu ponownego wyświetlenia ekranu włączania zasilania", - "cubit_statuses": "Aktualny stan qubitów ładujących" + "cubit_statuses": "Aktualny stan qubitów ładujących", + "ignore_tls": "Używane podczas konfigurowania nowego serwera." } -} \ No newline at end of file +} From b9370fc74b124d658d7755c495769a7658dd1213 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 08:45:16 +0000 Subject: [PATCH 633/732] Translated using Weblate (Czech) Currently translated at 100.0% (435 of 435 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/cs/ --- assets/translations/cs.json | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/assets/translations/cs.json b/assets/translations/cs.json index a82a9337..1fb6dfde 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -134,7 +134,7 @@ "connect_to_server": "Začněme serverem.", "select_provider": "Vyberte si libovolného poskytovatele z následujícího seznamu, všichni podporují službu SelfPrivacy", "select_provider_notice": "Pod pojmem \"relativně malý\" rozumíme počítač se dvěma jádry procesoru a dvěma gigabajty paměti RAM.", - "select_provider_countries_text_do": "USA, Nizozemsko, Singapur, Velká Británie, Německo, Kanada, Indie, Austrálie.", + "select_provider_countries_text_do": "USA, Nizozemsko, Singapur, Velká Británie, Německo, Kanada, Indie, Austrálie", "select_provider_email_notice": "E-mailový hosting nebude pro nové klienty k dispozici. Nicméně bude odemčen, jakmile dokončíte první platbu.", "choose_location_type_text": "Různá místa poskytují různé konfigurace serverů, ceny a rychlosti připojení.", "choose_server_type_text": "Různé možnosti prostředků podporují různé služby. Nebojte se, svůj server můžete kdykoli rozšířit", @@ -144,7 +144,7 @@ "found_more_domains": "Nalezeno více než jedna doména. V zájmu vlastní bezpečnosti vás prosíme o odstranění nepotřebných domén", "server_created": "Vytvořený server. Probíhá kontrola DNS a spouštění serveru…", "choose_server_type_notice": "Důležité je zaměřit se na procesor a paměť RAM. Data vašich služeb budou uložena na připojeném svazku, který lze snadno rozšířit a za který se platí zvlášť.", - "cloudflare_api_token": "Token API CloudFlare", + "cloudflare_api_token": "Klíč API poskytovatele DNS", "connect_backblaze_storage": "Připojení úložiště Backblaze", "save_domain": "Uložit doménu", "final": "Závěrečný krok", @@ -198,7 +198,14 @@ "nixos_installation": "Instalace systému NixOS", "server_reboot": "Restartování serveru", "final_checks": "Závěrečné kontroly" - } + }, + "server_provider_description": "Místo, kde budou umístěna vaše data a služby SelfPrivacy:", + "dns_provider_description": "Toto propojí vaši doménu s IP adresou:", + "dns_provider_bad_key_error": "Klíč API je neplatný", + "connect_to_dns": "Připojte poskytovatele DNS", + "select_provider_price_free": "Zdarma", + "select_provider_payment_text_cloudflare": "Bankovní karty", + "connect_to_dns_provider_text": "Pomocí rozhraní token API nakonfiguruje aplikace SelfPrivacy záznamy DNS" }, "about_us_page": { "title": "O nás" @@ -327,7 +334,7 @@ "subtitle": "Základna vašeho zabezpečení. Bitwarden vám pomůže vytvářet, ukládat a přesouvat hesla mezi zařízeními a také je zadávat na vyžádání pomocí automatického doplňování." }, "video": { - "title": "Videomeet", + "title": "Video konference", "subtitle": "Zoom a Google Meet jsou dobré, ale Jitsi Meet je hodnotná alternativa, která vám navíc dává jistotu, že vás nikdo neposlouchá.", "login_info": "Není potřeba žádný účet." }, @@ -376,8 +383,8 @@ "modal_confirmation_dns_valid": "Reverzní DNS je platný", "modal_confirmation_dns_invalid": "Reverzní DNS ukazuje na jinou doménu", "modal_confirmation_ip_invalid": "IP není stejná jako v záznamu DNS", - "confirm_cloudflare": "Připojení ke službě CloudFlare", - "confirm_cloudflare_description": "Zadejte token Cloudflare s přístupem k {}:", + "confirm_cloudflare": "Připojení k poskytovateli DNS", + "confirm_cloudflare_description": "Zadejte token DNS poskytovatele, který má práva k {}:", "confirm_backblaze": "Připojení k službě Backblaze", "generic_error": "Operace se nezdařila, zkuste to prosím znovu.", "domain_recovery_description": "Zadejte doménu serveru, ke které chcete získat přístup:", @@ -468,10 +475,10 @@ "invalid_format": "Nesprávný formát", "root_name": "Nemůže být 'root'", "required": "Povinné pole", - "invalid_format_password": "Nesmí obsahovat prázdné znaky", + "invalid_format_password": "Heslo nesmí obsahovat mezery", "invalid_format_ssh": "Musí dodržovat formát klíče SSH", "length_not_equal": "Délka je [], mělo by být {}", - "length_longer": "Délka je [], měla by být kratší nebo rovna {}." + "length_longer": "Délka řetězce [] musí být menší nebo rovna {}" }, "modals": { "dns_removal_error": "Nepodařilo se odstranit záznamy DNS.", @@ -488,7 +495,8 @@ "reboot": "Restartovat", "you_cant_use_this_api": "Toto rozhraní API nelze použít pro doménu s podobnou TLD.", "yes": "Ano", - "no": "Ne" + "no": "Ne", + "volume_creation_error": "Svazek se nepodařilo vytvořit." }, "support": { "title": "Podpora SelfPrivacy" @@ -498,10 +506,12 @@ "subtitle": "Tato nastavení slouží pouze k ladění. Neměňte je, pokud nevíte, co děláte.", "server_setup": "Nastavení serveru", "use_staging_acme": "Použití testovacího serveru ACME", - "use_staging_acme_description": "Chcete-li tuto hodnotu změnit, znovu sestavte aplikaci.", + "use_staging_acme_description": "Používá se při nastavování nového serveru.", "routing": "Směrování aplikací", "reset_onboarding": "Obnovení uvítací vlajky pro návštěvu", "reset_onboarding_description": "Resetování vypínače pro opětovné zobrazení obrazovky pro zapnutí napájení", - "cubit_statuses": "Stavy nakládky zařízení Cubit" + "cubit_statuses": "Stavy nakládky zařízení Cubit", + "ignore_tls": "Nekontrolujte certifikáty TLS", + "ignore_tls_description": "Aplikace nebude při připojování k serveru ověřovat certifikáty TLS." } } From f63de69561414cac72e19f138d017adaf33b7e07 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 08:24:13 +0000 Subject: [PATCH 634/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (435 of 435 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/be/ --- assets/translations/be.json | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/assets/translations/be.json b/assets/translations/be.json index a276f348..f6eff55c 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -32,7 +32,7 @@ "manage_domain_dns": "Для кіравання DNS вашага дамена", "use_this_domain": "Ужываем гэты дамен?", "use_this_domain_text": "Указаны вамі токен дае кантроль над гэтым даменам", - "cloudflare_api_token": "CloudFlare API ключ", + "cloudflare_api_token": "API ключ DNS правайдэра", "connect_backblaze_storage": "Падлучыце хмарнае сховішча Backblaze", "no_connected_domains": "У дадзены момант падлучаных даменаў няма", "loading_domain_list": "Загружаем спіс даменаў", @@ -68,7 +68,14 @@ "dns_setup": "Устаноўка DNS", "server_reboot": "Перазагрузка сервера", "final_checks": "Фінальныя праверкі" - } + }, + "server_provider_description": "Месца, дзе будуць знаходзіцца вашыя дадзеныя і службы SelfPrivacy:", + "dns_provider_description": "Гэта дазволіць звязаць ваш дамен з IP адрасам:", + "connect_to_dns": "Падлучыце DNS правайдэра", + "select_provider_payment_text_cloudflare": "Банкаўскія карты", + "dns_provider_bad_key_error": "API ключ няслушны", + "select_provider_price_free": "Бясплатна", + "connect_to_dns_provider_text": "З дапамогай API токена прыкладанне SelfPrivacy наладзіць DNS запісы" }, "recovering": { "generic_error": "Памылка правядзення аперацыі, паспрабуйце яшчэ раз.", @@ -110,8 +117,8 @@ "no_servers": "На вашым акаўнце няма даступных сэрвэраў.", "modal_confirmation_description": "Падлучэнне да няправільнага сервера можа прывесці да дэструктыўных наступстваў.", "modal_confirmation_ip_valid": "IP супадае з паказаным у DNS запісу", - "confirm_cloudflare": "Падключэнне да Cloudflare", - "confirm_cloudflare_description": "Увядзіце токен Cloudflare, які мае правы на {}:" + "confirm_cloudflare": "Падключэнне да DNS Правайдэра", + "confirm_cloudflare_description": "Увядзіце токен DNS Правайдэра, які мае правы на {}:" }, "devices": { "main_screen": { @@ -211,7 +218,8 @@ "dns_removal_error": "Немагчыма выдаліць запісы DNS.", "server_deletion_error": "Немагчыма выдаліць сервер.", "unexpected_error": "Непрадбачаная памылка з боку правайдэра.", - "delete_server_volume": "Выдаліць сервер і сховішча?" + "delete_server_volume": "Выдаліць сервер і сховішча?", + "volume_creation_error": "Не ўдалося стварыць том." }, "timer": { "sec": "{} сек" @@ -339,7 +347,7 @@ "validations": { "required": "Абавязковае поле", "already_exist": "Ужо існуе", - "invalid_format_password": "Не павінен змяшчаць пустыя сімвалы", + "invalid_format_password": "Пароль не павінен змяшчаць прабелы", "root_name": "Імя карыстальніка не можа быць 'root'", "length_not_equal": "Даўжыня радка [], павінна быць роўна {}", "length_longer": "Даўжыня радка [], павінна быць менш або роўна {}", @@ -496,12 +504,14 @@ "subtitle": "Гэтыя налады прызначаны толькі для адладкі. Не мяняйце іх, калі не ведаеце, што робіце.", "server_setup": "Майстар усталёўкі сервера", "use_staging_acme": "Выкарыстанне тэставага ACME сервера", - "use_staging_acme_description": "Перазбярыце дадатак, каб змяніць гэта значэнне.", + "use_staging_acme_description": "Ужываецца пры наладзе новага сервера.", "routing": "Маршрутызацыя прыкладанняў", "reset_onboarding": "Скінуць сцяг наведвання прывітання", - "cubit_statuses": "Бягучы статут кубітаў загрузкі" + "cubit_statuses": "Бягучы статут кубітаў загрузкі", + "ignore_tls": "Не правяраць сертыфікаты TLS", + "ignore_tls_description": "Прыкладанне не будзе правяраць сертыфікаты TLS пры падключэнні да сервера." }, "support": { "title": "Падтрымка SelfPrivacy" } -} \ No newline at end of file +} From 1306d42b6655e0858d9136220509804bb83f892c Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 08:42:57 +0000 Subject: [PATCH 635/732] Translated using Weblate (Belarusian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_hetzner Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_hetzner/be/ --- assets/markdown/how_hetzner-be.md | 36 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/assets/markdown/how_hetzner-be.md b/assets/markdown/how_hetzner-be.md index 5f07a6df..758f6ca0 100644 --- a/assets/markdown/how_hetzner-be.md +++ b/assets/markdown/how_hetzner-be.md @@ -1,19 +1,21 @@ -### Як атрымаць Hetzner API токен. -1. Перайдзіце па наступнай [link](https://console.hetzner.cloud/) і ўвайдзіце -ў толькі што створаны акаўнт. -2. Увайдзіце ў раней створаны праект. Калі вы яшчэ не стварылі яго, калі ласка працягвайце. -3. Навядзіце курсор мышы на бакавую панэль. Панэль павінна разгарнуцца і паказаць нас - меню. Нас цікавіць апошні — **Security** (значок ключа). -4. Далей у верхняй частцы інтэрфейсу мы бачым прыкладна наступнае: **SSH Keys, API Tokens, Certificates, Members.** Вам патрэны **API Tokens**. Націсніце на яго. -5. У правай частцы інтэрфейсу павінна быць кнопка **Generate API - token**. Калі вы карыстаецеся мабільнай версіяй вэб-старонкі, у - у правым ніжнім куце вы ўбачыце **red cross**. Націсніце гэтую кнопку. +### Як атрымаць Hetzner API Token +1. Перайдзіце па наступнай [спасылцы](https://console.hetzner.cloud/) і падпішыцеся + у толькі што створаны ўліковы запіс. +2. Увайдзіце ў раней створаны праект. Калі вы яго не стварылі, + тады, калі ласка, працягвайце. +3. Навядзіце курсор мышы на бакавую панэль. Панэль павінна разгарнуцца і паказаць нас + меню. Нас цікавіць апошні — **Security** (значок а ключ). +4. Далей у верхняй частцы інтэрфейсу мы бачым прыблізна + наступнае: **SSH Keys, API Tokens, Certificates, Members.** Вы + патрэбныя **API Tokens**. Націсніце на яго. +5. У правай частцы інтэрфейсу павінна быць **Generate API token** button. Калі вы карыстаецеся мабільнай версіяй вэб-старонкі, у + у правым ніжнім куце вы ўбачыце **red cross**. Націсніце гэтую кнопку. 6. У полі **Description** дайце нашаму токену імя (гэта можа быць любое - імя, якое вам падабаецца. На сутнасць гэта не ўплывае. -7. Пад полем **Description** мы бачым магчымасць выбару -**permissions**. Выберыце **Read & Write**. -8. Націсніце на **Generate API Token.** -9. Пасля гэтага будзе паказаны наш ключ. Захоўвайце яго ў надзейным месцы, - або ў менеджэры пароляў, што лепш. + імя, якое вам падабаецца. На сутнасць гэта не ўплывае. +7. Пад полем **permissions** мы бачым магчымасць выбару + **дазволы**. Выберыце **Read & Write**. +8. Націсніце **Generate API Token.** +9. Пасля гэтага будзе паказаны наш ключ. Захоўвайце яго ў надзейным месцы, + або ў менеджэры пароляў, што лепш. -![Настройка токена Hetzner](resource:assets/images/gifs/Hetzner.gif) +![Наладжванне маркера Hetzner](рэсурс:assets/images/gifs/Hetzner.gif) From e684eb1e8571bf79b9a9d521ec24dbf280765ed5 Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 08:47:30 +0000 Subject: [PATCH 636/732] Translated using Weblate (Czech) Currently translated at 100.0% (5 of 5 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_ssh Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_ssh/cs/ --- assets/markdown/how_fallback_ssh-cs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/markdown/how_fallback_ssh-cs.md b/assets/markdown/how_fallback_ssh-cs.md index 90b136d5..7b74ac74 100644 --- a/assets/markdown/how_fallback_ssh-cs.md +++ b/assets/markdown/how_fallback_ssh-cs.md @@ -10,9 +10,9 @@ Tento soubor bude mít podobnou konstrukci: { "tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + "token": "token_ke_zkopírování", + "name": "název_zařízení", + "date": "datum" } ``` From baa356e84043c8dfe89224484d3a5693293f67ec Mon Sep 17 00:00:00 2001 From: Mithras Date: Fri, 30 Jun 2023 08:47:30 +0000 Subject: [PATCH 637/732] Translated using Weblate (Czech) Currently translated at 100.0% (8 of 8 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_fallback_terminal Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_fallback_terminal/cs/ --- assets/markdown/how_fallback_terminal-cs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/markdown/how_fallback_terminal-cs.md b/assets/markdown/how_fallback_terminal-cs.md index 2866deff..16a993a1 100644 --- a/assets/markdown/how_fallback_terminal-cs.md +++ b/assets/markdown/how_fallback_terminal-cs.md @@ -17,9 +17,9 @@ Tento soubor bude mít podobnou konstrukci: { "tokens": [ { - "token": "token_to_copy", - "name": "device_name", - "date": "date" + "token": "token_ke_zkopírování", + "name": "název_zařízení", + "date": "datum" } ``` From be50de12bd437f1137e222e00e6f2a094c7cd7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Mon, 10 Jul 2023 07:24:27 +0000 Subject: [PATCH 638/732] Translated using Weblate (Russian) Currently translated at 100.0% (457 of 457 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 51a069e5..12c161b9 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -176,7 +176,28 @@ "restore_alert": "Вы собираетесь восстановить из копии созданной {}. Все текущие данные будут потеряны. Вы уверены?", "refresh": "Обновить статус", "refetch_backups": "Обновить список копий", - "refetching_list": "Через несколько минут список будет обновлён" + "refetching_list": "Через несколько минут список будет обновлён", + "reupload_key_subtitle": "Ещё раз проинициализирует хранилище резервных копий. Используйте, если что-то сломалось.", + "service_busy": "Сейчас создаются другие резервные копии", + "autobackup_period_never": "Автоматическое копирование отключено", + "pending_jobs": "Активные задачи на копирование", + "card_subtitle": "Управляйте резервными копиями", + "refetch_backups_subtitle": "Сбросить кэш и запросить данные у провайдера. Может повлечь дополнительные расходы.", + "select_all": "Копировать всё", + "create_new_select_heading": "Выбрать сервисы для копирования", + "start": "Начать создание копий", + "latest_snapshots": "Последние снимки", + "latest_snapshots_subtitle": "Последние 15 снимков", + "show_more": "Показать ещё", + "autobackup_period_title": "Период автоматического копирования", + "autobackup_period_subtitle": "Создание копий раз в {period}", + "autobackup_period_every": "Раз в {period}", + "autobackup_period_disable": "Отключить автоматические копирование", + "autobackup_custom": "Другое", + "autobackup_custom_hint": "Введите период в минутах", + "autobackup_set_period": "Установить период", + "autobackup_period_set": "Период установлен", + "snapshots_title": "Список снимков" }, "storage": { "card_title": "Хранилище", @@ -218,7 +239,8 @@ "activating": "Включается", "deactivating": "Выключается", "reloading": "Перезапускается" - } + }, + "snapshots": "Снимки резервных копий" }, "mail": { "title": "Почта", @@ -274,7 +296,7 @@ "could_not_add_ssh_key": "Не удалось создать SSH ключ", "username_rule": "Имя может содержать только маленькие латинские буквы, цифры, подчёркивания, не может начинаться с цифр", "email_login": "Авторизация по Email", - "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунты. Единая авторизация для всех сервисов ещё не реализована.", + "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунт. Единая авторизация для всех сервисов ещё не реализована.", "details_title": "Пользовательские данные" }, "initializing": { From afa9b25564ed55f541032ee8772ddf881ef27c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Mon, 10 Jul 2023 06:46:30 +0000 Subject: [PATCH 639/732] Translated using Weblate (Russian) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/ru/ --- assets/markdown/how_cloudflare-ru.md | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/assets/markdown/how_cloudflare-ru.md b/assets/markdown/how_cloudflare-ru.md index 12a9a139..0eb2fca9 100644 --- a/assets/markdown/how_cloudflare-ru.md +++ b/assets/markdown/how_cloudflare-ru.md @@ -1,12 +1,12 @@ ### Как получить токен API Cloudflare 1. Перейдите по следующей ссылке: https://dash.cloudflare.com/. -2. в правом углу нажмите на значок профиля (человечек в круге). Для мобильной версии сайта, в левом верхнем углу нажмите на кнопку **Menu** (три горизонтальные полоски), в выпадающем меню нажмите на **My Profile**. +2. В правом углу нажмите на значок профиля (человечек в круге). Для мобильной версии сайта: в левом верхнем углу нажмите на кнопку **Menu** (три горизонтальные полоски), в выпадающем меню нажмите на **My Profile**. 3. На выбор предлагаются четыре категории настроек: *Communication*, *Authentication*, **API Tokens**, *Session*. Выберите **API Tokens**. 4. Нажмите на кнопку **Create token**. 5. Спуститесь в самый низ, увидите поле **Create Custom Token** и нажмите кнопку **Get Started** справа. 6. В поле **Token Name** дайте имя вашему токену. 7. Далее у нас есть права доступа. В крайнем левом поле выберите **Zone**. В самом длинном поле, по центру, выберите **DNS**. В крайнем правом поле выберите **Edit**. -8. Далее, прямо под этой строкой, нажмите Добавить еще. Появится аналогичное поле. +8. Далее, прямо под этой строкой, нажмите **Добавить еще**. Появится аналогичное поле. 9. В крайнем левом поле новой строки выберите, аналогично предыдущей строке - **Zone**. В центральном - немного иначе. Здесь выберите то же, что и в левом - **Zone**. В крайнем правом поле выберите **Read**. 10. Далее посмотрите на **Resources Zone**. Под этой надписью находится строка с двумя полями. В левом должно быть **Include**, а в правом - **Specific Zone**. Как только вы выберете Specific Zone, справа появится еще одно поле. Выберите в нем свой домен. 11. Перейдите в самый низ и нажмите синюю кнопку **Continue to Summary**. @@ -14,19 +14,4 @@ 13. Нажмите на **Create Token**. 14. Копируем созданный токен и сохраняем его в надежном месте (желательно в менеджере паролей). -### Как получить Cloudflare API Token -1. Переходим по [ссылке](https://dash.cloudflare.com/) и авторизуемся в ранее созданном аккаунте. https://dash.cloudflare.com/ -2. В правом верхнем углу кликаем на иконку профиля (для мобильной версии сайта: в верхнем левом углу нажимаем кнопку **Меню** с тремя горизонтальными полосками). В выпавшем меню кликаем на пункт **My Profile**. -![My profile](resource:assets/images/pics/myprofile.png) -3. Нам предлагается на выбор, четыре категории настройки: **Preferences**, **Authentication**, **API Tokens**, **Sessions**. Выбираем **API Tokens**. -4. Самым первым пунктом видим кнопку **Create Token**. С полной уверенностью в себе и желанием обрести приватность, нажимаем на неё. -5. Спускаемся в самый низ и видим поле **Create Custom Token** и кнопку **Get Started** с правой стороны. Нажимаем. -6. В поле **Token Name** даём своему токену имя. Можете покреативить и отнестись к этому как к наименованию домашнего зверька :) -7. Далее, у нас **Permissions**. В первом поле выбираем **Zone**. Во втором поле, по центру, выбираем **DNS**. В последнем поле выбираем **Edit**. -8. Нажимаем на синюю надпись снизу **+ Add more** (сразу же под левым полем которое мы заполняли ранее). Вуаля, у нас появились новые поля. Заполняем по аналогии с предыдущим пунктом, в первом поле выбираем **Zone**, во-втором тоже **Zone**. А уже в третьем нажимаем на **Read**. Давайте сверим с тем, что у вас получилось: -![Permissions](resource:assets/images/pics/permissions.png) -8. Далее смотрим на **Zone Resources**. Под этой надписью есть строка с двумя полями. В первом должно быть **Include**, а во втором — **Specific Zone**. Как только Вы выберите **Specific Zone**, справа появится ещё одно поле. В нём выбираем наш домен. -9. Листаем в самый низ и нажимаем на синюю кнопку **Continue to Summary**. -10. Проверяем, всё ли мы правильно выбрали. Должна присутствовать подобная строка: ваш.домен — **DNS:Edit, Zone:Read**. -11. Нажимаем **Create Token**. -12. Копируем созданный токен, и сохраняем его в надёжном месте (желательно — в менеджере паролей). +![Cloudflare token setup](resource:assets/images/gifs/CloudFlare.gif) From 28188ffec6f1c0236409399f61da9b50d0286d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Mon, 10 Jul 2023 07:53:26 +0000 Subject: [PATCH 640/732] Translated using Weblate (Russian) Currently translated at 100.0% (1 of 1 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_digital_ocean Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_digital_ocean/ru/ --- assets/markdown/how_digital_ocean-ru.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/markdown/how_digital_ocean-ru.md b/assets/markdown/how_digital_ocean-ru.md index 6913c1fa..ad3ddaa3 100644 --- a/assets/markdown/how_digital_ocean-ru.md +++ b/assets/markdown/how_digital_ocean-ru.md @@ -9,4 +9,4 @@ 6. Установите срок действия на "No expiry". 7. Установите флажок "Write (optional)". 8. Теперь нажмите на кнопку "Generate Token". -9. После этого на экране появится токен. Храните его в любом надежном месте, лучше всего в менеджере паролей. \ No newline at end of file +9. После этого на экране появится токен. Сохраните его в любом надежном месте, лучше всего в менеджере паролей. \ No newline at end of file From 8565c0a04e75e4734e61eb912f46465048753528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Mon, 10 Jul 2023 08:00:19 +0000 Subject: [PATCH 641/732] Translated using Weblate (Czech) Currently translated at 95.1% (435 of 457 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/cs/ --- assets/translations/cs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 1fb6dfde..22b82f52 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -406,9 +406,9 @@ "access_granted_on": "Přístup udělen na {}" }, "revoke_device_alert": { - "header": "Zrušit přístup?", + "header": "Odvolání přístup?", "description": "Zařízení {} již nebude mít přístup k serveru.", - "yes": "Zrušit", + "yes": "Odvolání", "no": "Zrušit" }, "add_new_device_screen": { From 44bb4155cb74966532837e3cdeaac6cb637c9c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Mon, 10 Jul 2023 07:52:44 +0000 Subject: [PATCH 642/732] Translated using Weblate (Slovak) Currently translated at 100.0% (2 of 2 strings) Translation: SelfPrivacy/SelfPrivacy App Markdown: how_cloudflare Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app-markdown-how_cloudflare/sk/ --- assets/markdown/how_cloudflare-sk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/markdown/how_cloudflare-sk.md b/assets/markdown/how_cloudflare-sk.md index 752bbf1e..63df2bd4 100644 --- a/assets/markdown/how_cloudflare-sk.md +++ b/assets/markdown/how_cloudflare-sk.md @@ -6,9 +6,9 @@ 5. Prejdite na spodnú časť a zobrazte pole **Create Custom Token** a stlačte tlačidlo **Get Started** na pravej strane. 6. V poli **Token Name** zadajte svoj token. 7. Ďalej tu máme položku Permissions. V ľavom krajnom poli vyberte položku **Zone**. V najdlhšom poli uprostred vyberte položku **DNS**. V krajnom pravom poli vyberte položku **Edit**. -8. Ďalej priamo pod týmto riadkom kliknite na položku Pridať ďalšie. Zobrazí sa podobné pole. +8. Ďalej priamo pod týmto riadkom kliknite na položku **Pridať ďalšie**. Zobrazí sa podobné pole. 9. V krajnom ľavom poli nového riadku vyberte podobne ako v predchádzajúcom riadku - **Zone**. V strede - trochu inak. Tu vyberte rovnako ako v ľavom poli - **Zone**. V krajnom pravom poli vyberte položku **Read**. -10. Ďalej sa pozrite na položku **Zone Resources**. Pod týmto nápisom sa nachádza riadok s dvoma poľami. V ľavom musí byť uvedené **Include** a v pravom **Specific Zone**. Keď vyberiete položku Špecifická zóna, vpravo sa objaví ďalšie pole. V ňom vyberte svoju doménu. +10. Ďalej sa pozrite na položku **Zone Resources**. Pod týmto nápisom sa nachádza riadok s dvoma poľami. V ľavom musí byť uvedené **Include** a v pravom **Specific Zone**. Keď vyberiete položku **Špecifická zóna**, vpravo sa objaví ďalšie pole. V ňom vyberte svoju doménu. 11. Prejdite na spodnú časť a stlačte modré tlačidlo **Continue to Summary**. 12. Skontrolujte, či máte všetko správne. Musí sa vyskytovať podobný reťazec: *Domain — DNS:Edit, Zone:Read*. 13. Kliknite na **Create Token**. From cbef1d578b275becf9e2da030a4a29166735a0f3 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 17 Jul 2023 12:23:17 -0300 Subject: [PATCH 643/732] feat(location): Make flag getter a part of server provider location object --- .../json/digital_ocean_server_info.dart | 37 ++++++++++++++++ .../models/json/hetzner_server_info.dart | 18 ++++++++ .../models/server_provider_location.dart | 6 +-- .../server_providers/digital_ocean.dart | 42 +------------------ .../providers/server_providers/hetzner.dart | 22 +--------- .../initializing/server_type_picker.dart | 2 +- 6 files changed, 61 insertions(+), 66 deletions(-) diff --git a/lib/logic/models/json/digital_ocean_server_info.dart b/lib/logic/models/json/digital_ocean_server_info.dart index 9351761d..811536e4 100644 --- a/lib/logic/models/json/digital_ocean_server_info.dart +++ b/lib/logic/models/json/digital_ocean_server_info.dart @@ -36,6 +36,43 @@ class DigitalOceanLocation { static DigitalOceanLocation fromJson(final Map json) => _$DigitalOceanLocationFromJson(json); + + String get flag { + String emoji = ''; + + switch (slug.substring(0, 3)) { + case 'fra': + emoji = '🇩🇪'; + break; + + case 'ams': + emoji = '🇳🇱'; + break; + + case 'sgp': + emoji = '🇸🇬'; + break; + + case 'lon': + emoji = '🇬🇧'; + break; + + case 'tor': + emoji = '🇨🇦'; + break; + + case 'blr': + emoji = '🇮🇳'; + break; + + case 'nyc': + case 'sfo': + emoji = '🇺🇸'; + break; + } + + return emoji; + } } @JsonSerializable() diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index 557f8ea7..ece29de0 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -135,6 +135,24 @@ class HetznerLocation { static HetznerLocation fromJson(final Map json) => _$HetznerLocationFromJson(json); + + String get flag { + String emoji = ''; + switch (country.substring(0, 2)) { + case 'DE': + emoji = '🇩🇪'; + break; + + case 'FI': + emoji = '🇫🇮'; + break; + + case 'US': + emoji = '🇺🇸'; + break; + } + return emoji; + } } /// A Volume is a highly-available, scalable, and SSD-based block storage for Servers. diff --git a/lib/logic/models/server_provider_location.dart b/lib/logic/models/server_provider_location.dart index f76c226f..688eb972 100644 --- a/lib/logic/models/server_provider_location.dart +++ b/lib/logic/models/server_provider_location.dart @@ -3,13 +3,11 @@ class ServerProviderLocation { required this.title, required this.identifier, this.description, - this.flag, + this.flag = '', }); final String title; final String identifier; final String? description; - - /// as emoji - final String? flag; + final String flag; } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 057c99df..1269fa18 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -293,43 +293,6 @@ class DigitalOceanServerProvider extends ServerProvider { return success; } - String? getEmojiFlag(final String query) { - String? emoji; - - switch (query.toLowerCase().substring(0, 3)) { - case 'fra': - emoji = '🇩🇪'; - break; - - case 'ams': - emoji = '🇳🇱'; - break; - - case 'sgp': - emoji = '🇸🇬'; - break; - - case 'lon': - emoji = '🇬🇧'; - break; - - case 'tor': - emoji = '🇨🇦'; - break; - - case 'blr': - emoji = '🇮🇳'; - break; - - case 'nyc': - case 'sfo': - emoji = '🇺🇸'; - break; - } - - return emoji; - } - @override Future>> getAvailableLocations() async { @@ -351,7 +314,7 @@ class DigitalOceanServerProvider extends ServerProvider { location = ServerProviderLocation( title: rawLocation.slug, description: rawLocation.name, - flag: getEmojiFlag(rawLocation.slug), + flag: rawLocation.flag, identifier: rawLocation.slug, ); } catch (e) { @@ -662,8 +625,7 @@ class DigitalOceanServerProvider extends ServerProvider { ServerMetadataEntity( type: MetadataType.location, trId: 'server.location', - value: - '${droplet['region']['name']} ${getEmojiFlag(droplet['region']['slug'].toString()) ?? ''}', + value: '${droplet['region']['name']}', ), ServerMetadataEntity( type: MetadataType.other, diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index ae680088..140c1542 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -335,26 +335,6 @@ class HetznerServerProvider extends ServerProvider { return result; } - String? getEmojiFlag(final String query) { - String? emoji; - - switch (query.toLowerCase()) { - case 'de': - emoji = '🇩🇪'; - break; - - case 'fi': - emoji = '🇫🇮'; - break; - - case 'us': - emoji = '🇺🇸'; - break; - } - - return emoji; - } - @override Future> trySetServerLocation( final String location, @@ -396,7 +376,7 @@ class HetznerServerProvider extends ServerProvider { location = ServerProviderLocation( title: rawLocation.city, description: rawLocation.description, - flag: getEmojiFlag(rawLocation.country), + flag: rawLocation.flag, identifier: rawLocation.name, ); } catch (e) { diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 8ca01e44..6212bec3 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -107,7 +107,7 @@ class SelectLocationPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - '${location.flag ?? ''} ${location.title}', + '${location.flag} ${location.title}', style: Theme.of(context) .textTheme .titleMedium, From 1e5b6c12e6297aaf6a41d6644f3e4e0ff0620080 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 20 Jul 2023 12:53:56 -0300 Subject: [PATCH 644/732] feat(digital-ocean): Implement uniqueness check - Suggest to delete duplicate server - Increase timeout by 5 iterations --- .../server_providers/digital_ocean.dart | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 1269fa18..bca7bd97 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -97,6 +97,38 @@ class DigitalOceanServerProvider extends ServerProvider { final hostname = getHostnameFromDomain( installationData.serverDomain.domainName, ); + final pastServers = await getServers(); + for (final pastServer in pastServers.data) { + if (pastServer.name == hostname) { + return GenericResult( + data: CallbackDialogueBranching( + choices: [ + CallbackDialogueChoice( + title: 'basis.cancel'.tr(), + callback: () async => installationData.errorCallback(), + ), + CallbackDialogueChoice( + title: 'modals.yes'.tr(), + callback: () async { + final deleting = await deleteServer(hostname); + if (deleting.success) { + await Future.delayed(const Duration(seconds: 20)); + return launchInstallation(installationData); + } + + return deleting; + }, + ), + ], + description: 'modals.destroy_server'.tr(), + title: 'modals.already_exists'.tr(), + ), + success: false, + message: 'Droplet "$hostname" already exists.', + ); + } + } + final serverResult = await _adapter.api().createServer( dnsApiToken: installationData.dnsApiToken, rootUser: installationData.rootUser, @@ -144,7 +176,7 @@ class DigitalOceanServerProvider extends ServerProvider { String? ipv4; int attempts = 0; - while (attempts < 5 && ipv4 == null) { + while (attempts < 10 && ipv4 == null) { await Future.delayed(const Duration(seconds: 20)); final servers = await getServers(); for (final server in servers.data) { From 68ed7767856437ddee04f5fd6286a71fd4a86ca3 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 20 Jul 2023 17:06:17 -0300 Subject: [PATCH 645/732] feat(platform): Implement custom platform-dependent storage path definition - Create new PlatformAdapter util and hide i/o there - Move other usages of Platform class in PlatformAdapter --- lib/config/hive_config.dart | 3 +- .../server_installation_repository.dart | 49 ++++----------- lib/utils/platform_adapter.dart | 59 +++++++++++++++++++ 3 files changed, 71 insertions(+), 40 deletions(-) create mode 100644 lib/utils/platform_adapter.dart diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 25dee2c8..5d6e3eca 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -8,10 +8,11 @@ import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; +import 'package:selfprivacy/utils/platform_adapter.dart'; class HiveConfig { static Future init() async { - await Hive.initFlutter(); + await Hive.initFlutter(PlatformAdapter.storagePath); Hive.registerAdapter(UserAdapter()); Hive.registerAdapter(ServerHostingDetailsAdapter()); Hive.registerAdapter(ServerDomainAdapter()); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 717b7535..45b19b21 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -1,9 +1,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:device_info_plus/device_info_plus.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:pub_semver/pub_semver.dart'; import 'package:selfprivacy/config/get_it_config.dart'; @@ -22,6 +20,7 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; import 'package:selfprivacy/utils/network_utils.dart'; +import 'package:selfprivacy/utils/platform_adapter.dart'; class IpNotFoundException implements Exception { IpNotFoundException(this.message); @@ -285,40 +284,6 @@ class ServerInstallationRepository { return domain!; } - Future getDeviceName() async { - final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); - if (kIsWeb) { - return deviceInfo.webBrowserInfo.then( - (final WebBrowserInfo value) => - '${value.browserName} ${value.platform}', - ); - } else { - if (Platform.isAndroid) { - return deviceInfo.androidInfo.then( - (final AndroidDeviceInfo value) => - '${value.model} ${value.version.release}', - ); - } else if (Platform.isIOS) { - return deviceInfo.iosInfo.then( - (final IosDeviceInfo value) => - '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', - ); - } else if (Platform.isLinux) { - return deviceInfo.linuxInfo - .then((final LinuxDeviceInfo value) => value.prettyName); - } else if (Platform.isMacOS) { - return deviceInfo.macOsInfo.then( - (final MacOsDeviceInfo value) => - '${value.hostName} ${value.computerName}', - ); - } else if (Platform.isWindows) { - return deviceInfo.windowsInfo - .then((final WindowsDeviceInfo value) => value.computerName); - } - } - return 'Unidentified'; - } - Future authorizeByNewDeviceKey( final ServerDomain serverDomain, final String newDeviceKey, @@ -330,7 +295,10 @@ class ServerInstallationRepository { ); final String serverIp = await getServerIpFromDomain(serverDomain); final GenericResult result = await serverApi.authorizeDevice( - DeviceToken(device: await getDeviceName(), token: newDeviceKey), + DeviceToken( + device: await PlatformAdapter.deviceName, + token: newDeviceKey, + ), ); if (result.success) { @@ -367,7 +335,7 @@ class ServerInstallationRepository { ); final String serverIp = await getServerIpFromDomain(serverDomain); final GenericResult result = await serverApi.useRecoveryToken( - DeviceToken(device: await getDeviceName(), token: recoveryKey), + DeviceToken(device: await PlatformAdapter.deviceName, token: recoveryKey), ); if (result.success) { @@ -430,7 +398,10 @@ class ServerInstallationRepository { final GenericResult deviceAuthKey = await serverApi.createDeviceToken(); final GenericResult result = await serverApi.authorizeDevice( - DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), + DeviceToken( + device: await PlatformAdapter.deviceName, + token: deviceAuthKey.data, + ), ); if (result.success) { diff --git a/lib/utils/platform_adapter.dart b/lib/utils/platform_adapter.dart new file mode 100644 index 00000000..6a37d035 --- /dev/null +++ b/lib/utils/platform_adapter.dart @@ -0,0 +1,59 @@ +import 'dart:io'; + +import 'package:device_info_plus/device_info_plus.dart'; +import 'package:flutter/foundation.dart'; + +/// SelfPrivacy wrapper for Platform information provider. +class PlatformAdapter { + /// Persistent storage directory for data files. + static String get storagePath { + String path = '.'; + if (Platform.isLinux) { + // https://wiki.archlinux.org/title/XDG_Base_Directory + path = Platform.environment['XDG_DATA_HOME'] ?? '.'; + if (path == '.') { + final String home = Platform.environment['HOME'] ?? '.'; + path += '$home/.local/share'; + } + path += '/selfprivacy'; + } + + return path; + } + + /// Running operation environment. + static Future get deviceName async { + final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); + if (kIsWeb) { + return deviceInfo.webBrowserInfo.then( + (final WebBrowserInfo value) => + '${value.browserName} ${value.platform}', + ); + } else { + if (Platform.isAndroid) { + return deviceInfo.androidInfo.then( + (final AndroidDeviceInfo value) => + '${value.model} ${value.version.release}', + ); + } else if (Platform.isIOS) { + return deviceInfo.iosInfo.then( + (final IosDeviceInfo value) => + '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', + ); + } else if (Platform.isLinux) { + return deviceInfo.linuxInfo + .then((final LinuxDeviceInfo value) => value.prettyName); + } else if (Platform.isMacOS) { + return deviceInfo.macOsInfo.then( + (final MacOsDeviceInfo value) => + '${value.hostName} ${value.computerName}', + ); + } else if (Platform.isWindows) { + return deviceInfo.windowsInfo + .then((final WindowsDeviceInfo value) => value.computerName); + } + } + + return 'Unidentified'; + } +} From 25d68818379d8bf3605b2ad02112e98a7bf15d24 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 20 Jul 2023 17:07:08 -0300 Subject: [PATCH 646/732] chore: Remove misleading commentary --- lib/ui/pages/providers/providers.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index bdae6e07..64b87d34 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -96,7 +96,6 @@ class _ProvidersPageState extends State { onTap: () => context.pushRoute(const DnsDetailsRoute()), ), const SizedBox(height: 16), - // TODO: When backups are fixed, show this card _Card( state: isBackupInitialized ? StateType.stable From 3b1eee5a9478dca6e9795de1071308f8d704df26 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 20 Jul 2023 17:14:17 -0300 Subject: [PATCH 647/732] fix(platform): Make platform storage path nullable for compability with previous behaviour --- lib/utils/platform_adapter.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/utils/platform_adapter.dart b/lib/utils/platform_adapter.dart index 6a37d035..c1bdcbde 100644 --- a/lib/utils/platform_adapter.dart +++ b/lib/utils/platform_adapter.dart @@ -6,14 +6,14 @@ import 'package:flutter/foundation.dart'; /// SelfPrivacy wrapper for Platform information provider. class PlatformAdapter { /// Persistent storage directory for data files. - static String get storagePath { - String path = '.'; + static String? get storagePath { + String? path; if (Platform.isLinux) { // https://wiki.archlinux.org/title/XDG_Base_Directory - path = Platform.environment['XDG_DATA_HOME'] ?? '.'; - if (path == '.') { + path = Platform.environment['XDG_DATA_HOME']; + if (path == null) { final String home = Platform.environment['HOME'] ?? '.'; - path += '$home/.local/share'; + path = '$home/.local/share'; } path += '/selfprivacy'; } From 06a857aa8c03dd7d1caa7c244872f28713c707b2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 20 Jul 2023 17:19:29 -0300 Subject: [PATCH 648/732] chore(platform): Fix comment typo --- lib/utils/platform_adapter.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/platform_adapter.dart b/lib/utils/platform_adapter.dart index c1bdcbde..fa40d7d9 100644 --- a/lib/utils/platform_adapter.dart +++ b/lib/utils/platform_adapter.dart @@ -21,7 +21,7 @@ class PlatformAdapter { return path; } - /// Running operation environment. + /// Running operating environment. static Future get deviceName async { final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); if (kIsWeb) { From d8660b9f3aa7d112c434093cab412f9070653682 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Jul 2023 14:44:01 -0300 Subject: [PATCH 649/732] feat(platform): Print storage path before Hive initialization --- lib/config/hive_config.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index 5d6e3eca..01118bba 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -12,7 +12,9 @@ import 'package:selfprivacy/utils/platform_adapter.dart'; class HiveConfig { static Future init() async { - await Hive.initFlutter(PlatformAdapter.storagePath); + final String? storagePath = PlatformAdapter.storagePath; + print('HiveConfig: Custom storage path: $storagePath'); + await Hive.initFlutter(storagePath); Hive.registerAdapter(UserAdapter()); Hive.registerAdapter(ServerHostingDetailsAdapter()); Hive.registerAdapter(ServerDomainAdapter()); From 80f28463ec167556fca6b87fad4f3026d3a8e7e5 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Jul 2023 18:07:26 -0300 Subject: [PATCH 650/732] fix(recovery): Implement server type id requesting on recovery finish --- .../server_installation_cubit.dart | 3 ++ lib/logic/models/server_basic_info.dart | 4 ++ .../server_providers/digital_ocean.dart | 52 +++++++++++++++++++ .../providers/server_providers/hetzner.dart | 48 +++++++++++++++++ .../server_providers/server_provider.dart | 7 +++ 5 files changed, 114 insertions(+) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 3f00a5b5..968444e8 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -721,12 +721,15 @@ class ServerInstallationCubit extends Cubit { await repository.saveIsServerResetedSecondTime(true); await repository.saveHasFinalChecked(true); await repository.saveIsRecoveringServer(false); + final serverInfo = await ProvidersController.currentServerProvider! + .getServerInfo(state.serverDetails!.id); final User mainUser = await repository.getMainUser(); await repository.saveRootUser(mainUser); final ServerInstallationRecovery updatedState = (state as ServerInstallationRecovery).copyWith( backblazeCredential: backblazeCredential, rootUser: mainUser, + serverTypeIdentificator: serverInfo.data?.serverTypeId ?? '', ); emit(updatedState.finish()); } diff --git a/lib/logic/models/server_basic_info.dart b/lib/logic/models/server_basic_info.dart index 3037a2d5..dc7b9165 100644 --- a/lib/logic/models/server_basic_info.dart +++ b/lib/logic/models/server_basic_info.dart @@ -3,12 +3,14 @@ class ServerBasicInfo { required this.id, required this.name, required this.reverseDns, + required this.serverTypeId, required this.ip, required this.created, }); final int id; final String name; final String reverseDns; + final String serverTypeId; final String ip; final DateTime created; } @@ -22,6 +24,7 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { id: serverBasicInfo.id, name: serverBasicInfo.name, reverseDns: serverBasicInfo.reverseDns, + serverTypeId: serverBasicInfo.serverTypeId, ip: serverBasicInfo.ip, created: serverBasicInfo.created, isIpValid: isIpValid, @@ -32,6 +35,7 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { required super.id, required super.name, required super.reverseDns, + required super.serverTypeId, required super.ip, required super.created, required this.isIpValid, diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index bca7bd97..7b613698 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -81,6 +81,7 @@ class DigitalOceanServerProvider extends ServerProvider { created: DateTime.now(), ip: ipv4, name: server['name'], + serverTypeId: server['region']['slug'], ); }, ).toList(); @@ -88,6 +89,57 @@ class DigitalOceanServerProvider extends ServerProvider { return GenericResult(success: true, data: servers); } + @override + Future> getServerInfo( + final int serverId, + ) async { + ServerBasicInfo? server; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: server, + code: result.code, + message: result.message, + ); + } + + final rawServers = result.data; + for (final rawServer in rawServers) { + String? ipv4; + if (rawServer['networks']['v4'].isNotEmpty) { + for (final v4 in rawServer['networks']['v4']) { + if (v4['type'].toString() == 'public') { + ipv4 = v4['ip_address'].toString(); + } + } + } + + try { + server = ServerBasicInfo( + id: rawServer['id'], + reverseDns: rawServer['name'], + created: DateTime.now(), + ip: ipv4!, + name: rawServer['name'], + serverTypeId: rawServer['region']['slug'], + ); + } catch (e) { + print(e); + continue; + } + } + + if (server == null) { + return GenericResult( + success: false, + data: server, + ); + } + + return GenericResult(success: true, data: server); + } + @override Future> launchInstallation( final LaunchInstallationData installationData, diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index 140c1542..db9ddc03 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -77,6 +77,7 @@ class HetznerServerProvider extends ServerProvider { ip: hetznerServer.publicNet.ipv4!.ip, reverseDns: hetznerServer.publicNet.ipv4!.reverseDns, created: hetznerServer.created, + serverTypeId: hetznerServer.name, ); } catch (e) { continue; @@ -88,6 +89,53 @@ class HetznerServerProvider extends ServerProvider { return GenericResult(success: true, data: servers); } + @override + Future> getServerInfo( + final int serverId, + ) async { + ServerBasicInfo? server; + final result = await _adapter.api().getServers(); + if (result.data.isEmpty || !result.success) { + return GenericResult( + success: result.success, + data: server, + code: result.code, + message: result.message, + ); + } + + final List hetznerServers = result.data; + for (final hetznerServer in hetznerServers) { + if (hetznerServer.publicNet.ipv4 == null || + hetznerServer.id != serverId) { + continue; + } + + try { + server = ServerBasicInfo( + id: hetznerServer.id, + name: hetznerServer.name, + ip: hetznerServer.publicNet.ipv4!.ip, + reverseDns: hetznerServer.publicNet.ipv4!.reverseDns, + created: hetznerServer.created, + serverTypeId: hetznerServer.serverType.name, + ); + } catch (e) { + print(e); + continue; + } + } + + if (server == null) { + return GenericResult( + success: false, + data: server, + ); + } + + return GenericResult(success: true, data: server); + } + @override Future> launchInstallation( final LaunchInstallationData installationData, diff --git a/lib/logic/providers/server_providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart index f71ce09a..4182d9fc 100644 --- a/lib/logic/providers/server_providers/server_provider.dart +++ b/lib/logic/providers/server_providers/server_provider.dart @@ -24,6 +24,13 @@ abstract class ServerProvider { /// Only with public IPv4 addresses. Future>> getServers(); + /// Returns actual [ServerBasicInfo] of the + /// requested server entry assigned + /// to the authorized user. + /// + /// Only with public IPv4 address. + Future> getServerInfo(final int serverId); + /// Tries to launch installation of SelfPrivacy on /// the requested server entry for the authorized account. /// Depending on a server provider, the algorithm From 7b0207434512d4544cf8392c0ce314061724266f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Jul 2023 19:48:00 -0300 Subject: [PATCH 651/732] fix(recovery): Replace server basic info request method with server type info request method --- .../server_installation_cubit.dart | 9 +- .../server_providers/digital_ocean.dart | 84 +++++++++++++------ .../providers/server_providers/hetzner.dart | 73 ++++++++++------ .../server_providers/server_provider.dart | 6 +- 4 files changed, 117 insertions(+), 55 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 968444e8..c669cf75 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -721,15 +721,18 @@ class ServerInstallationCubit extends Cubit { await repository.saveIsServerResetedSecondTime(true); await repository.saveHasFinalChecked(true); await repository.saveIsRecoveringServer(false); - final serverInfo = await ProvidersController.currentServerProvider! - .getServerInfo(state.serverDetails!.id); + final serverType = await ProvidersController.currentServerProvider! + .getServerType(state.serverDetails!.id); + await repository.saveServerType(serverType.data!); + await ProvidersController.currentServerProvider! + .trySetServerLocation(serverType.data!.location.identifier); final User mainUser = await repository.getMainUser(); await repository.saveRootUser(mainUser); final ServerInstallationRecovery updatedState = (state as ServerInstallationRecovery).copyWith( backblazeCredential: backblazeCredential, rootUser: mainUser, - serverTypeIdentificator: serverInfo.data?.serverTypeId ?? '', + serverTypeIdentificator: serverType.data!.identifier, ); emit(updatedState.finish()); } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 7b613698..4082abe5 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -90,54 +90,90 @@ class DigitalOceanServerProvider extends ServerProvider { } @override - Future> getServerInfo( - final int serverId, - ) async { - ServerBasicInfo? server; + Future> getServerType(final int serverId) async { + ServerType? serverType; + dynamic server; final result = await _adapter.api().getServers(); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, - data: server, + data: serverType, code: result.code, message: result.message, ); } - final rawServers = result.data; + final List rawServers = result.data; for (final rawServer in rawServers) { - String? ipv4; if (rawServer['networks']['v4'].isNotEmpty) { for (final v4 in rawServer['networks']['v4']) { if (v4['type'].toString() == 'public') { - ipv4 = v4['ip_address'].toString(); + server = rawServer; } } } - - try { - server = ServerBasicInfo( - id: rawServer['id'], - reverseDns: rawServer['name'], - created: DateTime.now(), - ip: ipv4!, - name: rawServer['name'], - serverTypeId: rawServer['region']['slug'], - ); - } catch (e) { - print(e); - continue; - } } if (server == null) { + const String msg = 'getServerType: no server!'; + print(msg); return GenericResult( success: false, - data: server, + data: serverType, + message: msg, ); } - return GenericResult(success: true, data: server); + final rawLocationsResult = await getAvailableLocations(); + if (rawLocationsResult.data.isEmpty || !rawLocationsResult.success) { + return GenericResult( + success: rawLocationsResult.success, + data: serverType, + code: rawLocationsResult.code, + message: rawLocationsResult.message, + ); + } + + ServerProviderLocation? location; + for (final rawLocation in rawLocationsResult.data) { + if (rawLocation.identifier == server['region']['slug']) { + location = rawLocation; + } + } + + if (location == null) { + const String msg = 'getServerType: no location!'; + print(msg); + return GenericResult( + success: false, + data: serverType, + message: msg, + ); + } + + ServerType? type; + final rawSize = DigitalOceanServerType.fromJson(server['size']); + for (final rawRegion in rawSize.regions) { + if (rawRegion == server['region']['slug']) { + type = ServerType( + title: rawSize.description, + identifier: rawSize.slug, + ram: rawSize.memory / 1024, + cores: rawSize.vcpus, + disk: DiskSize(byte: rawSize.disk * 1024 * 1024 * 1024), + price: Price( + value: rawSize.priceMonthly, + currency: currency, + ), + location: location, + ); + } + } + + return GenericResult( + success: true, + data: type, + ); } @override diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index db9ddc03..e902a788 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -90,15 +90,14 @@ class HetznerServerProvider extends ServerProvider { } @override - Future> getServerInfo( - final int serverId, - ) async { - ServerBasicInfo? server; + Future> getServerType(final int serverId) async { + ServerType? serverType; + HetznerServerInfo? server; final result = await _adapter.api().getServers(); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, - data: server, + data: serverType, code: result.code, message: result.message, ); @@ -106,34 +105,60 @@ class HetznerServerProvider extends ServerProvider { final List hetznerServers = result.data; for (final hetznerServer in hetznerServers) { - if (hetznerServer.publicNet.ipv4 == null || - hetznerServer.id != serverId) { - continue; - } - - try { - server = ServerBasicInfo( - id: hetznerServer.id, - name: hetznerServer.name, - ip: hetznerServer.publicNet.ipv4!.ip, - reverseDns: hetznerServer.publicNet.ipv4!.reverseDns, - created: hetznerServer.created, - serverTypeId: hetznerServer.serverType.name, - ); - } catch (e) { - print(e); - continue; + if (hetznerServer.publicNet.ipv4 != null || + hetznerServer.id == serverId) { + server = hetznerServer; + break; } } if (server == null) { + const String msg = 'getServerType: no server!'; + print(msg); return GenericResult( success: false, - data: server, + data: serverType, + message: msg, ); } - return GenericResult(success: true, data: server); + double? priceValue; + for (final price in server.serverType.prices) { + if (price.location == server.location.name) { + priceValue = price.monthly; + } + } + + if (priceValue == null) { + const String msg = 'getServerType: no price!'; + print(msg); + return GenericResult( + success: false, + data: serverType, + message: msg, + ); + } + + return GenericResult( + success: true, + data: ServerType( + title: server.serverType.description, + identifier: server.serverType.name, + ram: server.serverType.memory.toDouble(), + cores: server.serverType.cores, + disk: DiskSize(byte: server.serverType.disk * 1024 * 1024 * 1024), + price: Price( + value: priceValue, + currency: currency, + ), + location: ServerProviderLocation( + title: server.location.city, + description: server.location.description, + flag: server.location.flag, + identifier: server.location.name, + ), + ), + ); } @override diff --git a/lib/logic/providers/server_providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart index 4182d9fc..cfcf3f5e 100644 --- a/lib/logic/providers/server_providers/server_provider.dart +++ b/lib/logic/providers/server_providers/server_provider.dart @@ -24,12 +24,10 @@ abstract class ServerProvider { /// Only with public IPv4 addresses. Future>> getServers(); - /// Returns actual [ServerBasicInfo] of the + /// Returns actual [ServerType] of the /// requested server entry assigned /// to the authorized user. - /// - /// Only with public IPv4 address. - Future> getServerInfo(final int serverId); + Future> getServerType(final int serverId); /// Tries to launch installation of SelfPrivacy on /// the requested server entry for the authorized account. From 69822f24ca0ee05fe74e437c7f315e526101e415 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 21 Jul 2023 19:50:20 -0300 Subject: [PATCH 652/732] chore: Remove unused server basic info attribute --- lib/logic/models/server_basic_info.dart | 4 ---- lib/logic/providers/server_providers/digital_ocean.dart | 1 - lib/logic/providers/server_providers/hetzner.dart | 1 - 3 files changed, 6 deletions(-) diff --git a/lib/logic/models/server_basic_info.dart b/lib/logic/models/server_basic_info.dart index dc7b9165..3037a2d5 100644 --- a/lib/logic/models/server_basic_info.dart +++ b/lib/logic/models/server_basic_info.dart @@ -3,14 +3,12 @@ class ServerBasicInfo { required this.id, required this.name, required this.reverseDns, - required this.serverTypeId, required this.ip, required this.created, }); final int id; final String name; final String reverseDns; - final String serverTypeId; final String ip; final DateTime created; } @@ -24,7 +22,6 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { id: serverBasicInfo.id, name: serverBasicInfo.name, reverseDns: serverBasicInfo.reverseDns, - serverTypeId: serverBasicInfo.serverTypeId, ip: serverBasicInfo.ip, created: serverBasicInfo.created, isIpValid: isIpValid, @@ -35,7 +32,6 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { required super.id, required super.name, required super.reverseDns, - required super.serverTypeId, required super.ip, required super.created, required this.isIpValid, diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 4082abe5..da246b18 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -81,7 +81,6 @@ class DigitalOceanServerProvider extends ServerProvider { created: DateTime.now(), ip: ipv4, name: server['name'], - serverTypeId: server['region']['slug'], ); }, ).toList(); diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index e902a788..ec15801e 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -77,7 +77,6 @@ class HetznerServerProvider extends ServerProvider { ip: hetznerServer.publicNet.ipv4!.ip, reverseDns: hetznerServer.publicNet.ipv4!.reverseDns, created: hetznerServer.created, - serverTypeId: hetznerServer.name, ); } catch (e) { continue; From 08f32586156eed103dab79a4cb08e7cda88846fa Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 22 Jul 2023 11:15:43 -0300 Subject: [PATCH 653/732] feat(graphql): Implement Accept-Language header for GraphQL API map --- .../graphql_maps/graphql_api_map.dart | 10 +++- lib/logic/get_it/api_config.dart | 8 +++ lib/main.dart | 60 ++++++++++--------- 3 files changed, 49 insertions(+), 29 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/graphql_api_map.dart b/lib/logic/api_maps/graphql_maps/graphql_api_map.dart index 2c11c127..f91fc7a7 100644 --- a/lib/logic/api_maps/graphql_maps/graphql_api_map.dart +++ b/lib/logic/api_maps/graphql_maps/graphql_api_map.dart @@ -71,6 +71,7 @@ abstract class GraphQLApiMap { 'https://api.$rootAddress/graphql', httpClient: ioClient, parser: ResponseLoggingParser(), + defaultHeaders: {'Accept-Language': _locale}, ); final String token = _getApiToken(); @@ -101,7 +102,12 @@ abstract class GraphQLApiMap { 'ws://api.$rootAddress/graphql', config: SocketClientConfig( autoReconnect: true, - headers: token.isEmpty ? null : {'Authorization': 'Bearer $token'}, + headers: token.isEmpty + ? null + : { + 'Authorization': 'Bearer $token', + 'Accept-Language': _locale, + }, ), ); @@ -111,6 +117,8 @@ abstract class GraphQLApiMap { ); } + String get _locale => getIt.get().localeCode ?? 'en'; + String _getApiToken() { String token = ''; final serverDetails = getIt().serverDetails; diff --git a/lib/logic/get_it/api_config.dart b/lib/logic/get_it/api_config.dart index 18c8a02c..ac889dcc 100644 --- a/lib/logic/get_it/api_config.dart +++ b/lib/logic/get_it/api_config.dart @@ -9,6 +9,7 @@ class ApiConfigModel { final Box _box = Hive.box(BNames.serverInstallationBox); ServerHostingDetails? get serverDetails => _serverDetails; + String? get localeCode => _localeCode; String? get serverProviderKey => _serverProviderKey; String? get serverLocation => _serverLocation; String? get serverType => _serverType; @@ -20,6 +21,7 @@ class ApiConfigModel { ServerDomain? get serverDomain => _serverDomain; BackblazeBucket? get backblazeBucket => _backblazeBucket; + String? _localeCode; String? _serverProviderKey; String? _serverLocation; String? _dnsProviderKey; @@ -31,6 +33,10 @@ class ApiConfigModel { ServerDomain? _serverDomain; BackblazeBucket? _backblazeBucket; + Future setLocaleCode(final String value) async { + _localeCode = value; + } + Future storeServerProviderType(final ServerProviderType value) async { await _box.put(BNames.serverProvider, value); _serverProvider = value; @@ -82,6 +88,7 @@ class ApiConfigModel { } void clear() { + _localeCode = null; _serverProviderKey = null; _dnsProvider = null; _serverLocation = null; @@ -95,6 +102,7 @@ class ApiConfigModel { } void init() { + _localeCode = 'en'; _serverProviderKey = _box.get(BNames.hetznerKey); _serverLocation = _box.get(BNames.serverLocation); _dnsProviderKey = _box.get(BNames.cloudFlareKey); diff --git a/lib/main.dart b/lib/main.dart index e6358ba7..7ba0114a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -71,34 +71,38 @@ class SelfprivacyApp extends StatelessWidget { builder: ( final BuildContext context, final AppSettingsState appSettings, - ) => - MaterialApp.router( - routeInformationParser: _appRouter.defaultRouteParser(), - routerDelegate: _appRouter.delegate(), - scaffoldMessengerKey: - getIt.get().scaffoldMessengerKey, - localizationsDelegates: context.localizationDelegates, - supportedLocales: context.supportedLocales, - locale: context.locale, - debugShowCheckedModeBanner: false, - title: 'SelfPrivacy', - theme: lightThemeData, - darkTheme: darkThemeData, - themeMode: appSettings.isAutoDarkModeOn - ? ThemeMode.system - : appSettings.isDarkModeOn - ? ThemeMode.dark - : ThemeMode.light, - builder: (final BuildContext context, final Widget? widget) { - Widget error = const Text('...rendering error...'); - if (widget is Scaffold || widget is Navigator) { - error = Scaffold(body: Center(child: error)); - } - ErrorWidget.builder = - (final FlutterErrorDetails errorDetails) => error; - return widget!; - }, - ), + ) { + getIt.get().setLocaleCode( + context.locale.languageCode, + ); + return MaterialApp.router( + routeInformationParser: _appRouter.defaultRouteParser(), + routerDelegate: _appRouter.delegate(), + scaffoldMessengerKey: + getIt.get().scaffoldMessengerKey, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + debugShowCheckedModeBanner: false, + title: 'SelfPrivacy', + theme: lightThemeData, + darkTheme: darkThemeData, + themeMode: appSettings.isAutoDarkModeOn + ? ThemeMode.system + : appSettings.isDarkModeOn + ? ThemeMode.dark + : ThemeMode.light, + builder: (final BuildContext context, final Widget? widget) { + Widget error = const Text('...rendering error...'); + if (widget is Scaffold || widget is Navigator) { + error = Scaffold(body: Center(child: error)); + } + ErrorWidget.builder = + (final FlutterErrorDetails errorDetails) => error; + return widget!; + }, + ); + }, ), ), ); From 27aaf9383875eff37c86885773230e28c18e1142 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 22 Jul 2023 11:26:48 -0300 Subject: [PATCH 654/732] chore: Rename '_getApiToken' to 'get _token' for GraphQL API map --- lib/logic/api_maps/graphql_maps/graphql_api_map.dart | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/graphql_api_map.dart b/lib/logic/api_maps/graphql_maps/graphql_api_map.dart index f91fc7a7..6a00f5b6 100644 --- a/lib/logic/api_maps/graphql_maps/graphql_api_map.dart +++ b/lib/logic/api_maps/graphql_maps/graphql_api_map.dart @@ -74,13 +74,11 @@ abstract class GraphQLApiMap { defaultHeaders: {'Accept-Language': _locale}, ); - final String token = _getApiToken(); - final Link graphQLLink = RequestLoggingLink().concat( isWithToken ? AuthLink( getToken: () async => - customToken == '' ? 'Bearer $token' : customToken, + customToken == '' ? 'Bearer $_token' : customToken, ).concat(httpLink) : httpLink, ); @@ -96,16 +94,14 @@ abstract class GraphQLApiMap { } Future getSubscriptionClient() async { - final String token = _getApiToken(); - final WebSocketLink webSocketLink = WebSocketLink( 'ws://api.$rootAddress/graphql', config: SocketClientConfig( autoReconnect: true, - headers: token.isEmpty + headers: _token.isEmpty ? null : { - 'Authorization': 'Bearer $token', + 'Authorization': 'Bearer $_token', 'Accept-Language': _locale, }, ), @@ -119,7 +115,7 @@ abstract class GraphQLApiMap { String get _locale => getIt.get().localeCode ?? 'en'; - String _getApiToken() { + String get _token { String token = ''; final serverDetails = getIt().serverDetails; if (serverDetails != null) { From c3752673f7fd311756ea587f9afbbbdd91426d28 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 20 Jul 2023 18:35:13 -0300 Subject: [PATCH 655/732] feat(backups): Implement modal for copying backups encryption key --- assets/translations/en.json | 6 +- assets/translations/ru.json | 4 +- lib/ui/pages/backups/backup_details.dart | 29 ++++++ .../backups/copy_encryption_key_modal.dart | 88 +++++++++++++++++++ 4 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 lib/ui/pages/backups/copy_encryption_key_modal.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index fc7e1eb2..f1ef524f 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -34,7 +34,8 @@ "apply": "Apply", "done": "Done", "continue": "Continue", - "alert": "Alert" + "alert": "Alert", + "copied_to_clipboard": "Copied to clipboard!" }, "more_page": { "configuration_wizard": "Setup wizard", @@ -196,6 +197,7 @@ "autobackup_custom_hint": "Enter custom period in minutes", "autobackup_set_period": "Set period", "autobackup_period_set": "Period set", + "backups_encryption_key": "Encryption key", "pending_jobs": "Currently running backup jobs", "snapshots_title": "Snapshot list" }, @@ -536,4 +538,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} +} \ No newline at end of file diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 12c161b9..e906e838 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -34,6 +34,7 @@ "done": "Готово", "continue": "Продолжить", "alert": "Уведомление", + "copied_to_clipboard": "Скопировано в буфер обмена!", "app_name": "SelfPrivacy" }, "more_page": { @@ -197,6 +198,7 @@ "autobackup_custom_hint": "Введите период в минутах", "autobackup_set_period": "Установить период", "autobackup_period_set": "Период установлен", + "backups_encryption_key": "Ключ шифрования", "snapshots_title": "Список снимков" }, "storage": { @@ -536,4 +538,4 @@ "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", "ignore_tls": "Не проверять сертификаты TLS" } -} +} \ No newline at end of file diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index e3fe427b..54136412 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -16,6 +16,7 @@ import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/backups/change_period_modal.dart'; +import 'package:selfprivacy/ui/pages/backups/copy_encryption_key_modal.dart'; import 'package:selfprivacy/ui/pages/backups/create_backups_modal.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; @@ -144,6 +145,34 @@ class BackupDetailsPage extends StatelessWidget { : 'backup.autobackup_period_never'.tr(), ), ), + ListTile( + onTap: preventActions + ? null + : () { + showModalBottomSheet( + useRootNavigator: true, + context: context, + isScrollControlled: true, + builder: (final BuildContext context) => + DraggableScrollableSheet( + expand: false, + maxChildSize: 0.6, + minChildSize: 0.3, + initialChildSize: 0.3, + builder: (final context, final scrollController) => + CopyEncryptionKeyModal( + scrollController: scrollController, + ), + ), + ); + }, + leading: const Icon( + Icons.key_outlined, + ), + title: Text( + 'backup.backups_encryption_key'.tr(), + ), + ), const SizedBox(height: 16), if (backupJobs.isNotEmpty) Column( diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart new file mode 100644 index 00000000..5421b2a8 --- /dev/null +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -0,0 +1,88 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; + +class CopyEncryptionKeyModal extends StatefulWidget { + const CopyEncryptionKeyModal({ + required this.scrollController, + super.key, + }); + + final ScrollController scrollController; + + @override + State createState() => _CopyEncryptionKeyModalState(); +} + +class _CopyEncryptionKeyModalState extends State { + bool isKeyVisible = false; + @override + Widget build(final BuildContext context) { + final String encryptionKey = + context.watch().state.backblazeBucket!.encryptionKey; + return ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.backups_encryption_key'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 8), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + icon: Icon( + isKeyVisible + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, + ), + onPressed: () { + setState( + () { + isKeyVisible = !isKeyVisible; + }, + ); + }, + ), + IconButton( + icon: const Icon(Icons.copy_all_outlined), + onPressed: () { + getIt() + .showSnackBar('basis.copied_to_clipboard'.tr()); + Clipboard.setData( + ClipboardData( + text: encryptionKey, + ), + ); + }, + ), + ], + ), + Flexible( + child: isKeyVisible + ? SelectableText( + encryptionKey, + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ) + : Text( + ''.padLeft(encryptionKey.length, '●'), + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + ), + ], + ); + } +} From 3b1e71d7712b824d30722948f7b3cd20a959b21e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 25 Jul 2023 18:39:58 +0300 Subject: [PATCH 656/732] fix: Add a workaround for the case when we don't have sreverTypeId --- .../server_installation_repository.dart | 53 +++++++++++++------ 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 717b7535..5b39463b 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -76,21 +76,44 @@ class ServerInstallationRepository { if (box.get(BNames.hasFinalChecked, defaultValue: false)) { TlsOptions.verifyCertificate = true; - return ServerInstallationFinished( - installationDialoguePopUp: null, - providerApiToken: providerApiToken!, - serverTypeIdentificator: serverTypeIdentificator!, - dnsApiToken: dnsApiToken!, - serverDomain: serverDomain!, - backblazeCredential: backblazeCredential!, - serverDetails: serverDetails!, - rootUser: box.get(BNames.rootUser), - isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), - isServerResetedFirstTime: - box.get(BNames.isServerResetedFirstTime, defaultValue: false), - isServerResetedSecondTime: - box.get(BNames.isServerResetedSecondTime, defaultValue: false), - ); + if (serverTypeIdentificator == null && serverDetails != null) { + final finalServerType = await ProvidersController.currentServerProvider! + .getServerType(serverDetails.id); + await saveServerType(finalServerType.data!); + await ProvidersController.currentServerProvider! + .trySetServerLocation(finalServerType.data!.location.identifier); + return ServerInstallationFinished( + installationDialoguePopUp: null, + providerApiToken: providerApiToken!, + serverTypeIdentificator: finalServerType.data!.identifier, + dnsApiToken: dnsApiToken!, + serverDomain: serverDomain!, + backblazeCredential: backblazeCredential!, + serverDetails: serverDetails, + rootUser: box.get(BNames.rootUser), + isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), + isServerResetedFirstTime: + box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: + box.get(BNames.isServerResetedSecondTime, defaultValue: false), + ); + } else { + return ServerInstallationFinished( + installationDialoguePopUp: null, + providerApiToken: providerApiToken!, + serverTypeIdentificator: serverTypeIdentificator!, + dnsApiToken: dnsApiToken!, + serverDomain: serverDomain!, + backblazeCredential: backblazeCredential!, + serverDetails: serverDetails!, + rootUser: box.get(BNames.rootUser), + isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), + isServerResetedFirstTime: + box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: + box.get(BNames.isServerResetedSecondTime, defaultValue: false), + ); + } } if (box.get(BNames.isRecoveringServer, defaultValue: false) && From cfcfd5d70859f779a4f73d39b6185d82fddc36d0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 25 Jul 2023 22:25:08 +0300 Subject: [PATCH 657/732] feat(backups): Update the UI of the encryption key modal --- assets/translations/en.json | 6 +- lib/ui/pages/backups/backup_details.dart | 9 +- lib/ui/pages/backups/change_period_modal.dart | 3 - .../backups/copy_encryption_key_modal.dart | 108 +++++++++++------- 4 files changed, 78 insertions(+), 48 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index f1ef524f..b442b683 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -198,6 +198,10 @@ "autobackup_set_period": "Set period", "autobackup_period_set": "Period set", "backups_encryption_key": "Encryption key", + "backups_encryption_key_subtitle": "Keep it in a safe place.", + "backups_encryption_key_copy": "Copy the encryption key", + "backups_encryption_key_show": "Show the encryption key", + "backups_encryption_key_description": "This key is used to encrypt your backups. If you lose it, you will not be able to restore your backups. Keep it in a safe place, as it will be useful if you ever need to restore from backups manually.", "pending_jobs": "Currently running backup jobs", "snapshots_title": "Snapshot list" }, @@ -538,4 +542,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} \ No newline at end of file +} diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 54136412..44995577 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -156,9 +156,9 @@ class BackupDetailsPage extends StatelessWidget { builder: (final BuildContext context) => DraggableScrollableSheet( expand: false, - maxChildSize: 0.6, - minChildSize: 0.3, - initialChildSize: 0.3, + maxChildSize: 0.9, + minChildSize: 0.5, + initialChildSize: 0.7, builder: (final context, final scrollController) => CopyEncryptionKeyModal( scrollController: scrollController, @@ -172,6 +172,9 @@ class BackupDetailsPage extends StatelessWidget { title: Text( 'backup.backups_encryption_key'.tr(), ), + subtitle: Text( + 'backup.backups_encryption_key_subtitle'.tr(), + ), ), const SizedBox(height: 16), if (backupJobs.isNotEmpty) diff --git a/lib/ui/pages/backups/change_period_modal.dart b/lib/ui/pages/backups/change_period_modal.dart index f3fb2ce3..dbee981e 100644 --- a/lib/ui/pages/backups/change_period_modal.dart +++ b/lib/ui/pages/backups/change_period_modal.dart @@ -20,9 +20,6 @@ class ChangeAutobackupsPeriodModal extends StatefulWidget { class _ChangeAutobackupsPeriodModalState extends State { - // This is a modal with radio buttons to select the autobackup period - // Period might be none, selected from predefined list or custom - // Store in state the selected period Duration? selectedPeriod; static const List autobackupPeriods = [ diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart index 5421b2a8..7b9ce40f 100644 --- a/lib/ui/pages/backups/copy_encryption_key_modal.dart +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -20,6 +20,7 @@ class CopyEncryptionKeyModal extends StatefulWidget { class _CopyEncryptionKeyModalState extends State { bool isKeyVisible = false; + @override Widget build(final BuildContext context) { final String encryptionKey = @@ -35,52 +36,77 @@ class _CopyEncryptionKeyModalState extends State { textAlign: TextAlign.center, ), const SizedBox(height: 8), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - IconButton( - icon: Icon( - isKeyVisible - ? Icons.visibility_outlined - : Icons.visibility_off_outlined, - ), - onPressed: () { - setState( - () { - isKeyVisible = !isKeyVisible; - }, - ); - }, - ), - IconButton( - icon: const Icon(Icons.copy_all_outlined), - onPressed: () { - getIt() - .showSnackBar('basis.copied_to_clipboard'.tr()); - Clipboard.setData( - ClipboardData( - text: encryptionKey, - ), - ); - }, - ), - ], + Text( + 'backup.backups_encryption_key_description'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + textAlign: TextAlign.center, ), - Flexible( - child: isKeyVisible - ? SelectableText( + const SizedBox(height: 8), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: Theme.of(context).colorScheme.surfaceVariant, + ), + padding: const EdgeInsets.all(16), + child: Stack( + children: [ + SelectableText( encryptionKey, style: Theme.of(context).textTheme.titleMedium?.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ) - : Text( - ''.padLeft(encryptionKey.length, '●'), - style: Theme.of(context).textTheme.titleMedium?.copyWith( - color: Theme.of(context).colorScheme.onBackground, + color: Theme.of(context).colorScheme.onSurfaceVariant, ), ), + Positioned.fill( + child: InkWell( + onTap: () { + setState( + () { + isKeyVisible = !isKeyVisible; + }, + ); + }, + child: AnimatedOpacity( + duration: const Duration(milliseconds: 200), + opacity: isKeyVisible ? 0 : 1, + child: Container( + color: Theme.of(context).colorScheme.surfaceVariant, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.visibility_outlined), + const SizedBox(width: 8), + Text( + 'backup.backups_encryption_key_show'.tr(), + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: Theme.of(context) + .colorScheme + .onSurfaceVariant, + ), + ), + ], + )), + ), + ), + ), + ], + )), + const SizedBox(height: 8), + FilledButton.icon( + onPressed: () { + getIt() + .showSnackBar('basis.copied_to_clipboard'.tr()); + Clipboard.setData( + ClipboardData( + text: encryptionKey, + ), + ); + }, + icon: const Icon(Icons.copy_all_outlined), + label: Text('backup.backups_encryption_key_copy'.tr()), ), ], ); From bbc619deed692dfd5b9b706d375722d8b9f77abd Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 25 Jul 2023 22:43:28 +0300 Subject: [PATCH 658/732] feat(backups): Show the user that the key is copied --- .../backups/copy_encryption_key_modal.dart | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart index 7b9ce40f..289ea184 100644 --- a/lib/ui/pages/backups/copy_encryption_key_modal.dart +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -1,7 +1,8 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; @@ -20,6 +21,14 @@ class CopyEncryptionKeyModal extends StatefulWidget { class _CopyEncryptionKeyModalState extends State { bool isKeyVisible = false; + bool copiedToClipboard = false; + Timer? copyToClipboardTimer; + + @override + void dispose() { + copyToClipboardTimer?.cancel(); + super.dispose(); + } @override Widget build(final BuildContext context) { @@ -97,8 +106,23 @@ class _CopyEncryptionKeyModalState extends State { const SizedBox(height: 8), FilledButton.icon( onPressed: () { - getIt() - .showSnackBar('basis.copied_to_clipboard'.tr()); + setState( + () { + copiedToClipboard = true; + }, + ); + // Make a timer to reset the copyToClipboardTime + setState(() { + copyToClipboardTimer?.cancel(); + copyToClipboardTimer = Timer( + const Duration(seconds: 5), + () { + setState(() { + copiedToClipboard = false; + }); + }, + ); + }); Clipboard.setData( ClipboardData( text: encryptionKey, @@ -106,7 +130,11 @@ class _CopyEncryptionKeyModalState extends State { ); }, icon: const Icon(Icons.copy_all_outlined), - label: Text('backup.backups_encryption_key_copy'.tr()), + label: Text( + copiedToClipboard + ? 'basis.copied_to_clipboard'.tr() + : 'backup.backups_encryption_key_copy'.tr(), + ), ), ], ); From 5df1d676f67bbbb06a1b6f75c3ade895f35898f8 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 25 Jul 2023 22:45:44 +0300 Subject: [PATCH 659/732] style: Remove misleading code comment --- lib/ui/pages/backups/copy_encryption_key_modal.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart index 289ea184..aff629f7 100644 --- a/lib/ui/pages/backups/copy_encryption_key_modal.dart +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -111,7 +111,6 @@ class _CopyEncryptionKeyModalState extends State { copiedToClipboard = true; }, ); - // Make a timer to reset the copyToClipboardTime setState(() { copyToClipboardTimer?.cancel(); copyToClipboardTimer = Timer( From 4dae3404fadd8ce4105886f4755e4e332618d9d3 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 25 Jul 2023 18:56:47 -0300 Subject: [PATCH 660/732] fix(ui): Prevent service moving if volume is null for some reason --- lib/ui/pages/services/service_page.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 0b713e79..e1e00ec0 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -139,7 +139,9 @@ class _ServicePageState extends State { ), style: Theme.of(context).textTheme.bodyMedium, ), - enabled: !serviceDisabled && !serviceLocked, + enabled: !serviceDisabled && + !serviceLocked && + service.storageUsage.volume != null, ), if (service.canBeBackedUp) ListTile( From b313cd340e2e62b92458013acd3b39969c18ceeb Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 26 Jul 2023 20:27:10 -0300 Subject: [PATCH 661/732] refactor: Remove unused id field from DnsRecords object --- lib/logic/models/json/dns_records.dart | 4 ---- lib/logic/providers/dns_providers/digital_ocean_dns.dart | 1 - 2 files changed, 5 deletions(-) diff --git a/lib/logic/models/json/dns_records.dart b/lib/logic/models/json/dns_records.dart index 3951ae4e..8b0fdf23 100644 --- a/lib/logic/models/json/dns_records.dart +++ b/lib/logic/models/json/dns_records.dart @@ -9,7 +9,6 @@ class DnsRecord { required this.type, required this.name, required this.content, - this.id, this.ttl = 3600, this.priority = 10, this.proxied = false, @@ -32,8 +31,5 @@ class DnsRecord { final int priority; final bool proxied; - /// TODO: Refactoring refactoring refactoring refactoring >:c - final int? id; - Map toJson() => _$DnsRecordToJson(this); } diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index 87f8a479..3056f94d 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -129,7 +129,6 @@ class DigitalOceanDnsProvider extends DnsProvider { for (final rawRecord in result.data) { records.add( DnsRecord( - id: rawRecord['id'], name: rawRecord['name'], type: rawRecord['type'], content: rawRecord['data'], From 146350f8f41b209802b10c42d353f0bf588eb539 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 26 Jul 2023 21:23:37 -0300 Subject: [PATCH 662/732] refactor(desec): Implement basic DTO for DESEC to avoid dynamic objects --- .../dns_providers/desec/desec_api.dart | 47 +++++++----- lib/logic/models/json/desec_dns_info.dart | 63 ++++++++++++++++ lib/logic/models/json/desec_dns_info.g.dart | 35 +++++++++ lib/logic/models/json/dns_records.g.dart | 1 - lib/logic/providers/dns_providers/desec.dart | 74 +++++++++---------- 5 files changed, 164 insertions(+), 56 deletions(-) create mode 100644 lib/logic/models/json/desec_dns_info.dart create mode 100644 lib/logic/models/json/desec_dns_info.g.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart index 960df30f..9856242d 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart @@ -4,7 +4,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/desec_dns_info.dart'; class DesecApi extends RestApiMap { DesecApi({ @@ -92,8 +92,8 @@ class DesecApi extends RestApiMap { ); } - Future> getDomains() async { - List domains = []; + Future>> getDomains() async { + List domains = []; late final Response? response; final Dio client = await getClient(); @@ -102,7 +102,11 @@ class DesecApi extends RestApiMap { '', ); await Future.delayed(const Duration(seconds: 1)); - domains = response.data; + domains = response.data! + .map( + (final e) => DesecDomain.fromJson(e), + ) + .toList(); } catch (e) { print(e); return GenericResult( @@ -124,15 +128,17 @@ class DesecApi extends RestApiMap { } Future> createMultipleDnsRecords({ - required final ServerDomain domain, - required final List records, + required final String domainName, + required final List records, }) async { - final String domainName = domain.domainName; final String url = '/$domainName/rrsets/'; final Dio client = await getClient(); try { - await client.post(url, data: records); + await client.post( + url, + data: records.map((final rec) => rec.toJson()).toList(), + ); await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); @@ -149,15 +155,17 @@ class DesecApi extends RestApiMap { } Future> removeSimilarRecords({ - required final ServerDomain domain, - required final List records, + required final String domainName, + required final List records, }) async { - final String domainName = domain.domainName; final String url = '/$domainName/rrsets/'; final Dio client = await getClient(); try { - await client.put(url, data: records); + await client.put( + url, + data: records.map((final rec) => rec.toJson()).toList(), + ); await Future.delayed(const Duration(seconds: 1)); } catch (e) { print(e); @@ -173,12 +181,11 @@ class DesecApi extends RestApiMap { return GenericResult(success: true, data: null); } - Future>> getDnsRecords({ - required final ServerDomain domain, - }) async { + Future>> getDnsRecords( + final String domainName, + ) async { Response? response; - final String domainName = domain.domainName; - List allRecords = []; + List allRecords = []; final String url = '/$domainName/rrsets/'; @@ -186,7 +193,11 @@ class DesecApi extends RestApiMap { try { response = await client.get(url); await Future.delayed(const Duration(seconds: 1)); - allRecords = response.data; + allRecords = response.data! + .map( + (final e) => DesecDnsRecord.fromJson(e), + ) + .toList(); } catch (e) { print(e); return GenericResult( diff --git a/lib/logic/models/json/desec_dns_info.dart b/lib/logic/models/json/desec_dns_info.dart new file mode 100644 index 00000000..e6023da7 --- /dev/null +++ b/lib/logic/models/json/desec_dns_info.dart @@ -0,0 +1,63 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'desec_dns_info.g.dart'; + +/// https://desec.readthedocs.io/en/latest/dns/domains.html#domain-management +@JsonSerializable() +class DesecDomain { + DesecDomain( + this.name, + this.minimumTtl, + ); + + /// Restrictions on what is a valid domain name apply on + /// a per-user basis. + /// + /// The maximum length is 191. + final String name; + + /// Smallest TTL that can be used in an RRset. + /// The value is set automatically by DESEC + @JsonKey(name: 'minimum_ttl') + final int minimumTtl; + + static DesecDomain fromJson(final Map json) => + _$DesecDomainFromJson(json); +} + +/// https://desec.readthedocs.io/en/latest/dns/rrsets.html#retrieving-and-creating-dns-records +@JsonSerializable() +class DesecDnsRecord { + DesecDnsRecord({ + required this.subname, + required this.type, + required this.ttl, + required this.records, + }); + + /// Subdomain string which, together with domain, defines the RRset name. + /// Typical examples are www or _443._tcp. + final String subname; + + /// RRset type (uppercase). A broad range of record types is supported, + /// with most DNSSEC-related types (and the SOA type) managed automagically + /// by the backend. + final String type; + + /// Time-to-live value, which dictates for how long resolvers may + /// cache this RRset, measured in seconds. + /// + /// The smallest acceptable value is given by the domain’s minimum TTL setting. + /// The maximum value is 86400 (one day). + final int ttl; + + /// Array of record content strings. + /// + /// The maximum number of array elements is 4091, + /// and the maximum length of the array is 64,000 (after JSON encoding). + final List records; + + static DesecDnsRecord fromJson(final Map json) => + _$DesecDnsRecordFromJson(json); + Map toJson() => _$DesecDnsRecordToJson(this); +} diff --git a/lib/logic/models/json/desec_dns_info.g.dart b/lib/logic/models/json/desec_dns_info.g.dart new file mode 100644 index 00000000..b82ed777 --- /dev/null +++ b/lib/logic/models/json/desec_dns_info.g.dart @@ -0,0 +1,35 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'desec_dns_info.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DesecDomain _$DesecDomainFromJson(Map json) => DesecDomain( + json['name'] as String, + json['minimum_ttl'] as int, + ); + +Map _$DesecDomainToJson(DesecDomain instance) => + { + 'name': instance.name, + 'minimum_ttl': instance.minimumTtl, + }; + +DesecDnsRecord _$DesecDnsRecordFromJson(Map json) => + DesecDnsRecord( + subname: json['subname'] as String, + type: json['type'] as String, + ttl: json['ttl'] as int, + records: + (json['records'] as List).map((e) => e as String).toList(), + ); + +Map _$DesecDnsRecordToJson(DesecDnsRecord instance) => + { + 'subname': instance.subname, + 'type': instance.type, + 'ttl': instance.ttl, + 'records': instance.records, + }; diff --git a/lib/logic/models/json/dns_records.g.dart b/lib/logic/models/json/dns_records.g.dart index b58db5de..c8c12c34 100644 --- a/lib/logic/models/json/dns_records.g.dart +++ b/lib/logic/models/json/dns_records.g.dart @@ -13,5 +13,4 @@ Map _$DnsRecordToJson(DnsRecord instance) => { 'ttl': instance.ttl, 'priority': instance.priority, 'proxied': instance.proxied, - 'id': instance.id, }; diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index 41d504e4..e20d82bf 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -1,6 +1,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desec/desec_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/desec_dns_info.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; @@ -59,7 +60,7 @@ class DesecDnsProvider extends DnsProvider { domains = result.data .map( - (final el) => el['name'] as String, + (final el) => el.name, ) .toList(); @@ -79,20 +80,20 @@ class DesecDnsProvider extends DnsProvider { ip4, ); - final List bulkRecords = []; + final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { bulkRecords.add( - { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, + DesecDnsRecord( + subname: record.name ?? '', + type: record.type, + ttl: record.ttl, + records: [extractContent(record) ?? ''], + ), ); } return _adapter.api().createMultipleDnsRecords( - domain: domain, + domainName: domain.domainName, records: bulkRecords, ); } @@ -107,28 +108,28 @@ class DesecDnsProvider extends DnsProvider { ip4, ); - final List bulkRecords = []; + final List bulkRecords = []; for (final DnsRecord record in listDnsRecords) { bulkRecords.add( - { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [], - }, + DesecDnsRecord( + subname: record.name ?? '', + type: record.type, + ttl: record.ttl, + records: [], + ), ); } bulkRecords.add( - { - 'subname': 'selector._domainkey', - 'type': 'TXT', - 'ttl': 18000, - 'records': [], - }, + DesecDnsRecord( + subname: 'selector._domainkey', + type: 'TXT', + ttl: 18000, + records: [], + ), ); return _adapter.api().removeSimilarRecords( - domain: domain, + domainName: domain.domainName, records: bulkRecords, ); } @@ -138,7 +139,7 @@ class DesecDnsProvider extends DnsProvider { required final ServerDomain domain, }) async { final List records = []; - final result = await _adapter.api().getDnsRecords(domain: domain); + final result = await _adapter.api().getDnsRecords(domain.domainName); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, @@ -150,15 +151,14 @@ class DesecDnsProvider extends DnsProvider { try { for (final record in result.data) { - final String? content = (record['records'] is List) - ? record['records'][0] - : record['records']; + final String? content = + record.records.isEmpty ? null : record.records[0]; records.add( DnsRecord( - name: record['subname'], - type: record['type'], + name: record.subname, + type: record.type, content: content, - ttl: record['ttl'], + ttl: record.ttl, ), ); } @@ -180,14 +180,14 @@ class DesecDnsProvider extends DnsProvider { final ServerDomain domain, ) async { final result = await _adapter.api().createMultipleDnsRecords( - domain: domain, + domainName: domain.domainName, records: [ - { - 'subname': record.name, - 'type': record.type, - 'ttl': record.ttl, - 'records': [extractContent(record)], - }, + DesecDnsRecord( + subname: record.name ?? '', + type: record.type, + ttl: record.ttl, + records: [extractContent(record) ?? ''], + ), ], ); From ccac0ff7fafdbceb57a1d6241222e8ef3d2d0c57 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 27 Jul 2023 20:55:32 -0300 Subject: [PATCH 663/732] refactor(digital-ocean-dns): Implement basic DTO for Digital Ocean DNS to avoid dynamic objects --- .../digital_ocean_dns_api.dart | 52 +++++++-------- .../models/json/digital_ocean_dns_info.dart | 66 +++++++++++++++++++ .../models/json/digital_ocean_dns_info.g.dart | 41 ++++++++++++ .../dns_providers/digital_ocean_dns.dart | 49 ++++++++++---- 4 files changed, 167 insertions(+), 41 deletions(-) create mode 100644 lib/logic/models/json/digital_ocean_dns_info.dart create mode 100644 lib/logic/models/json/digital_ocean_dns_info.g.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart index 70a70b7c..e1b5c601 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart @@ -4,8 +4,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/logic/models/json/digital_ocean_dns_info.dart'; class DigitalOceanDnsApi extends RestApiMap { DigitalOceanDnsApi({ @@ -92,13 +91,17 @@ class DigitalOceanDnsApi extends RestApiMap { ); } - Future> getDomains() async { - List domains = []; + Future>> getDomains() async { + List domains = []; final Dio client = await getClient(); try { final Response response = await client.get('/domains'); - domains = response.data['domains']; + domains = response.data['domains']! + .map( + (final e) => DigitalOceanDomain.fromJson(e), + ) + .toList(); } catch (e) { print(e); return GenericResult( @@ -114,25 +117,18 @@ class DigitalOceanDnsApi extends RestApiMap { } Future> createMultipleDnsRecords({ - required final ServerDomain domain, - required final List records, + required final String domainName, + required final List records, }) async { - final String domainName = domain.domainName; final List allCreateFutures = []; final Dio client = await getClient(); try { - for (final DnsRecord record in records) { + for (final DigitalOceanDnsRecord record in records) { allCreateFutures.add( client.post( '/domains/$domainName/records', - data: { - 'type': record.type, - 'name': record.name, - 'data': record.content, - 'ttl': record.ttl, - 'priority': record.priority, - }, + data: record.toJson(), ), ); } @@ -155,17 +151,15 @@ class DigitalOceanDnsApi extends RestApiMap { } Future> removeSimilarRecords({ - required final ServerDomain domain, - required final List records, + required final String domainName, + required final List records, }) async { - final String domainName = domain.domainName; - final Dio client = await getClient(); try { final List allDeleteFutures = []; for (final record in records) { allDeleteFutures.add( - client.delete("/domains/$domainName/records/${record['id']}"), + client.delete('/domains/$domainName/records/${record.id}'), ); } await Future.wait(allDeleteFutures); @@ -183,12 +177,11 @@ class DigitalOceanDnsApi extends RestApiMap { return GenericResult(success: true, data: null); } - Future> getDnsRecords({ - required final ServerDomain domain, - }) async { + Future>> getDnsRecords( + final String domainName, + ) async { Response response; - final String domainName = domain.domainName; - List allRecords = []; + List allRecords = []; /// Default amount is 20, but we will eventually overflow it, /// so I hardcode it to the maximum available amount in advance just in case @@ -200,7 +193,12 @@ class DigitalOceanDnsApi extends RestApiMap { final Dio client = await getClient(); try { response = await client.get(url); - allRecords = response.data['domain_records'] ?? []; + allRecords = response.data['domain_records'] + .map( + (final e) => DigitalOceanDnsRecord.fromJson(e), + ) + .toList() ?? + []; } catch (e) { print(e); GenericResult( diff --git a/lib/logic/models/json/digital_ocean_dns_info.dart b/lib/logic/models/json/digital_ocean_dns_info.dart new file mode 100644 index 00000000..0881b214 --- /dev/null +++ b/lib/logic/models/json/digital_ocean_dns_info.dart @@ -0,0 +1,66 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'digital_ocean_dns_info.g.dart'; + +/// https://docs.digitalocean.com/reference/api/api-reference/#tag/Domains +@JsonSerializable() +class DigitalOceanDomain { + DigitalOceanDomain({ + required this.name, + this.ttl, + }); + + /// The name of the domain itself. + /// This should follow the standard domain format of domain.TLD. + /// + /// For instance, example.com is a valid domain name. + final String name; + + /// This value is the time to live for the records on this domain, in seconds. + /// + /// This defines the time frame that clients can cache queried information before a refresh should be requested. + final int? ttl; + + static DigitalOceanDomain fromJson(final Map json) => + _$DigitalOceanDomainFromJson(json); +} + +/// https://docs.digitalocean.com/reference/api/api-reference/#tag/Domain-Records +@JsonSerializable() +class DigitalOceanDnsRecord { + DigitalOceanDnsRecord({ + required this.id, + required this.name, + required this.type, + required this.ttl, + required this.data, + this.priority, + }); + + /// A unique identifier for each domain record. + final int? id; + + /// The host name, alias, or service being defined by the record. + final String name; + + /// The type of the DNS record. For example: A, CNAME, TXT, ... + final String type; + + /// This value is the time to live for the record, in seconds. + /// + /// This defines the time frame that clients can cache queried information before a refresh should be requested. + final int ttl; + + /// Variable data depending on record type. + /// + /// For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. + /// For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. + final String data; + + /// The priority for SRV and MX records. + final int? priority; + + static DigitalOceanDnsRecord fromJson(final Map json) => + _$DigitalOceanDnsRecordFromJson(json); + Map toJson() => _$DigitalOceanDnsRecordToJson(this); +} diff --git a/lib/logic/models/json/digital_ocean_dns_info.g.dart b/lib/logic/models/json/digital_ocean_dns_info.g.dart new file mode 100644 index 00000000..d66c0352 --- /dev/null +++ b/lib/logic/models/json/digital_ocean_dns_info.g.dart @@ -0,0 +1,41 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'digital_ocean_dns_info.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DigitalOceanDomain _$DigitalOceanDomainFromJson(Map json) => + DigitalOceanDomain( + name: json['name'] as String, + ttl: json['ttl'] as int?, + ); + +Map _$DigitalOceanDomainToJson(DigitalOceanDomain instance) => + { + 'name': instance.name, + 'ttl': instance.ttl, + }; + +DigitalOceanDnsRecord _$DigitalOceanDnsRecordFromJson( + Map json) => + DigitalOceanDnsRecord( + id: json['id'] as int?, + name: json['name'] as String, + type: json['type'] as String, + ttl: json['ttl'] as int, + data: json['data'] as String, + priority: json['priority'] as int?, + ); + +Map _$DigitalOceanDnsRecordToJson( + DigitalOceanDnsRecord instance) => + { + 'id': instance.id, + 'name': instance.name, + 'type': instance.type, + 'ttl': instance.ttl, + 'data': instance.data, + 'priority': instance.priority, + }; diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index 3056f94d..7397f41c 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -1,6 +1,7 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/digital_ocean_dns/digital_ocean_dns_api.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/digital_ocean_dns_info.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; @@ -59,7 +60,7 @@ class DigitalOceanDnsProvider extends DnsProvider { domains = result.data .map( - (final el) => el['name'] as String, + (final el) => el.name, ) .toList(); @@ -75,11 +76,22 @@ class DigitalOceanDnsProvider extends DnsProvider { final String? ip4, }) async => _adapter.api().createMultipleDnsRecords( - domain: domain, + domainName: domain.domainName, records: getProjectDnsRecords( domain.domainName, ip4, - ), + ) + .map( + (final e) => DigitalOceanDnsRecord( + name: e.name ?? '', + id: null, + data: e.content ?? '', + ttl: e.ttl, + type: e.type, + priority: e.priority, + ), + ) + .toList(), ); @override @@ -87,7 +99,7 @@ class DigitalOceanDnsProvider extends DnsProvider { required final ServerDomain domain, final String? ip4, }) async { - final result = await _adapter.api().getDnsRecords(domain: domain); + final result = await _adapter.api().getDnsRecords(domain.domainName); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, @@ -98,15 +110,15 @@ class DigitalOceanDnsProvider extends DnsProvider { } const ignoreType = 'SOA'; - final filteredRecords = []; + final List filteredRecords = []; for (final record in result.data) { - if (record['type'] != ignoreType) { + if (record.type != ignoreType) { filteredRecords.add(record); } } return _adapter.api().removeSimilarRecords( - domain: domain, + domainName: domain.domainName, records: filteredRecords, ); } @@ -116,7 +128,7 @@ class DigitalOceanDnsProvider extends DnsProvider { required final ServerDomain domain, }) async { final List records = []; - final result = await _adapter.api().getDnsRecords(domain: domain); + final result = await _adapter.api().getDnsRecords(domain.domainName); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, @@ -129,10 +141,10 @@ class DigitalOceanDnsProvider extends DnsProvider { for (final rawRecord in result.data) { records.add( DnsRecord( - name: rawRecord['name'], - type: rawRecord['type'], - content: rawRecord['data'], - ttl: rawRecord['ttl'], + name: rawRecord.name, + type: rawRecord.type, + content: rawRecord.data, + ttl: rawRecord.ttl, proxied: false, ), ); @@ -147,8 +159,17 @@ class DigitalOceanDnsProvider extends DnsProvider { final ServerDomain domain, ) async => _adapter.api().createMultipleDnsRecords( - domain: domain, - records: [record], + domainName: domain.domainName, + records: [ + DigitalOceanDnsRecord( + data: record.content ?? '', + id: null, + name: record.name ?? '', + ttl: record.ttl, + type: record.type, + priority: record.priority, + ), + ], ); @override From 34e15e504780d7790bcb5dab7ca323f148316df8 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 28 Jul 2023 06:21:11 +0300 Subject: [PATCH 664/732] chore(i18l): Change DNS error alert to warn user about deleting custom DNS records --- assets/translations/de.json | 2 +- assets/translations/en.json | 2 +- assets/translations/ru.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/translations/de.json b/assets/translations/de.json index 4774dcbe..105b5f2f 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -150,7 +150,7 @@ "screen_title": "Domäne und DNS", "ok": "Aufnahmen sind in Ordnung", "error": "Probleme gefunden", - "error_subtitle": "Tippen sie hier, um sie zu beheben", + "error_subtitle": "Tippen sie hier, um sie zu beheben. Dadurch werden auch benutzerdefinierte DNS-Einträge entfernt.", "uninitialized": "Daten sind noch nicht vorhanden", "services_title": "Dienste", "email_title": "E-Mail", diff --git a/assets/translations/en.json b/assets/translations/en.json index b442b683..f66df742 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -152,7 +152,7 @@ "screen_title": "Domain and DNS", "ok": "Records are OK", "error": "Problems found", - "error_subtitle": "Tap here to fix them", + "error_subtitle": "Tap here to fix them. This will also remove custom records.", "refreshing": "Refreshing status…", "uninitialized": "Data is not retrieved yet", "services_title": "Services", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index e906e838..738bceea 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -152,7 +152,7 @@ "screen_title": "Домен и DNS", "ok": "Записи в норме", "error": "Обнаружены проблемы", - "error_subtitle": "Нажмите здесь, чтобы исправить", + "error_subtitle": "Нажмите здесь, чтобы исправить. Это также удалит все сторонние записи.", "refreshing": "Обновление данных…", "uninitialized": "Данные ещё не получены", "services_title": "Сервисы", @@ -538,4 +538,4 @@ "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", "ignore_tls": "Не проверять сертификаты TLS" } -} \ No newline at end of file +} From bd8faf876088f32668422b5efcb575f59bf15808 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 28 Jul 2023 20:42:41 -0300 Subject: [PATCH 665/732] feat: Replace general entity naming on UI with specifics. - Pass actual provider namings to .tr functions as arguments - Remove hardcoded namings where known - Get rid of general mentions of 'DNS Provider' or 'Server Provider' where confusing --- assets/translations/az.json | 12 +++----- assets/translations/be.json | 14 ++++------ assets/translations/cs.json | 14 ++++------ assets/translations/de.json | 14 ++++------ assets/translations/en.json | 19 ++++++------- assets/translations/pl.json | 12 +++----- assets/translations/ru.json | 14 ++++------ assets/translations/sk.json | 12 +++----- assets/translations/uk.json | 12 +++----- .../digital_ocean/digital_ocean_api.dart | 1 - .../server_providers/hetzner/hetzner_api.dart | 1 - .../server_detailed_info_repository.dart | 28 +++++++++++++++---- .../server_installation_cubit.dart | 20 +++++++++++-- lib/logic/models/hive/server_details.dart | 15 ++++------ lib/logic/models/hive/server_domain.dart | 7 +++++ .../server_providers/digital_ocean.dart | 4 +-- .../providers/server_providers/hetzner.dart | 4 +-- .../server_storage/extending_volume.dart | 12 +++----- .../recovery_confirm_backblaze.dart | 6 ++-- .../recovering/recovery_confirm_dns.dart | 14 +++++++--- .../recovery_server_provider_connected.dart | 17 ++++++++--- 21 files changed, 132 insertions(+), 120 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index a49dd1ff..81d678c7 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -355,9 +355,9 @@ "fallback_select_provider_console": "Hostinq konsoluna giriş.", "authorization_failed": "Bu açarla daxil olmaq alınmadı", "fallback_select_provider_console_hint": "Məsələn: Hetzner.", - "server_provider_connected": "Server provayderinizə qoşulur", - "server_provider_connected_description": "Əlaqə quruldu. {} girişi ilə nişanınızı daxil edin:", - "server_provider_connected_placeholder": "Server provayderi nişanı", + "provider_connected": "{} qoşulur", + "provider_connected_description": "Əlaqə quruldu. {} girişi ilə nişanınızı daxil edin:", + "provider_connected_placeholder": "{} nişanı", "confirm_server": "Serveri təsdiqləyin", "confirm_server_description": "Server tapdım! Onun olduğunu təsdiq edin:", "confirm_server_accept": "Bəli, odur", @@ -368,11 +368,7 @@ "domain_not_available_on_token": "Daxil edilmiş işarənin tələb olunan domenə girişi yoxdur.", "modal_confirmation_dns_valid": "Əks DNS düzgündür", "modal_confirmation_dns_invalid": "Əks DNS fərqli domenə işarə edir", - "modal_confirmation_ip_valid": "IP DNS qeydində göstərilənə uyğun gəlir", - "confirm_cloudflare": "Cloudflare-ə qoşulur", - "confirm_cloudflare_description": "{} hüququ olan Cloudflare tokenini daxil edin:", - "confirm_backblaze": "Backblaze-ə qoşulur", - "confirm_backblaze_description": "Ehtiyat saxlama hüququ olan Backblaze tokenini daxil edin:" + "modal_confirmation_ip_valid": "IP DNS qeydində göstərilənə uyğun gəlir" }, "devices": { "main_screen": { diff --git a/assets/translations/be.json b/assets/translations/be.json index f6eff55c..3a5e84a8 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -97,8 +97,8 @@ "fallback_select_root_ssh": "Каранёвы доступ да сервера праз SSH.", "authorization_failed": "Не ўдалося ўвайсці з гэтым ключом", "fallback_select_provider_console_hint": "Напрыклад, Hetzner.", - "server_provider_connected": "Падлучэнне да вашага сервернага правайдэра", - "server_provider_connected_placeholder": "Токен сервернага правайдэра", + "provider_connected": "Падлучэнне да вашага {}", + "provider_connected_placeholder": "Токен {}", "confirm_server": "Пацвердзіце сервер", "confirm_server_description": "Знайшлі сервер! Пацьвердзіце, што гэта ён:", "confirm_server_accept": "Да, гэта ён", @@ -109,16 +109,12 @@ "modal_confirmation_dns_valid": "Зваротны DNS карэктны", "modal_confirmation_dns_invalid": "Зваротны DNS паказвае на іншы дамен", "modal_confirmation_ip_invalid": "IP не супадае з паказаным у DNS запісу", - "confirm_backblaze": "Падключэнне да Backblaze", - "confirm_backblaze_description": "Увядзіце токен Backblaze, які мае правы на сховішча рэзервовых копій:", "fallback_select_provider_console": "Доступ да кансолі хостынгу.", - "server_provider_connected_description": "Сувязь устаноўлена. Увядзіце свой токен з доступам да {}:", + "provider_connected_description": "Сувязь устаноўлена. Увядзіце свой токен з доступам да {}:", "choose_server": "Выберыце сервер", "no_servers": "На вашым акаўнце няма даступных сэрвэраў.", "modal_confirmation_description": "Падлучэнне да няправільнага сервера можа прывесці да дэструктыўных наступстваў.", - "modal_confirmation_ip_valid": "IP супадае з паказаным у DNS запісу", - "confirm_cloudflare": "Падключэнне да DNS Правайдэра", - "confirm_cloudflare_description": "Увядзіце токен DNS Правайдэра, які мае правы на {}:" + "modal_confirmation_ip_valid": "IP супадае з паказаным у DNS запісу" }, "devices": { "main_screen": { @@ -514,4 +510,4 @@ "support": { "title": "Падтрымка SelfPrivacy" } -} +} \ No newline at end of file diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 22b82f52..818cd320 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -369,9 +369,9 @@ "fallback_select_root_ssh": "Kořenový přístup SSH k serveru.", "fallback_select_provider_console": "Přístup ke konzole serveru mého prodiveru.", "authorization_failed": "Nelze se přihlásit pomocí tohoto klíče", - "server_provider_connected": "Připojení k poskytovateli serveru", - "server_provider_connected_description": "Komunikace navázána. Zadejte svůj token s přístupem k {}:", - "server_provider_connected_placeholder": "Token poskytovatele serveru", + "provider_connected": "Připojení k poskytovateli {}", + "provider_connected_description": "Komunikace navázána. Zadejte svůj token s přístupem k {}:", + "provider_connected_placeholder": "Token {}", "confirm_server": "Potvrzení serveru", "confirm_server_accept": "Ano! To je ono", "confirm_server_decline": "Výběr jiného serveru", @@ -383,17 +383,13 @@ "modal_confirmation_dns_valid": "Reverzní DNS je platný", "modal_confirmation_dns_invalid": "Reverzní DNS ukazuje na jinou doménu", "modal_confirmation_ip_invalid": "IP není stejná jako v záznamu DNS", - "confirm_cloudflare": "Připojení k poskytovateli DNS", - "confirm_cloudflare_description": "Zadejte token DNS poskytovatele, který má práva k {}:", - "confirm_backblaze": "Připojení k službě Backblaze", "generic_error": "Operace se nezdařila, zkuste to prosím znovu.", "domain_recovery_description": "Zadejte doménu serveru, ke které chcete získat přístup:", "method_device_description": "Otevřete aplikaci v jiném zařízení a přejděte na stránku zařízení. Stisknutím tlačítka \"Přidat zařízení\" získáte token.", "fallback_select_provider_console_hint": "Například: Hetzner.", "confirm_server_description": "Našel jsem váš server! Potvrďte, že je to ten správný:", "domain_not_available_on_token": "Vybraná doména není na tomto tokenu k dispozici.", - "modal_confirmation_ip_valid": "IP je stejná jako v záznamu DNS", - "confirm_backblaze_description": "Zadejte token Backblaze s přístupem k úložišti záloh:" + "modal_confirmation_ip_valid": "IP je stejná jako v záznamu DNS" }, "devices": { "main_screen": { @@ -514,4 +510,4 @@ "ignore_tls": "Nekontrolujte certifikáty TLS", "ignore_tls_description": "Aplikace nebude při připojování k serveru ověřovat certifikáty TLS." } -} +} \ No newline at end of file diff --git a/assets/translations/de.json b/assets/translations/de.json index 105b5f2f..9b8b1093 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -411,12 +411,9 @@ "domain_recovery_description": "Geben Sie eine Serverdomäne ein, für die Sie Zugriff erhalten möchten:", "method_device_description": "Öffnen Sie die Anwendung auf einem anderen Gerät und gehen Sie dann zur Geräteseite. Drücken Sie auf „Gerät hinzufügen“, um Ihren Token zu erhalten.", "fallback_select_token_copy": "Kopie des Authentifizierungstokens von einer anderen Version der Anwendung.", - "server_provider_connected_description": "Kommunikation hergestellt. Eingabe Ihres Tokens Token mit Zugriff auf {}:", + "provider_connected_description": "Kommunikation hergestellt. Eingabe Ihres Tokens Token mit Zugriff auf {}:", "choose_server_description": "Wir konnten nicht herausfinden, mit welchem Server Sie sich verbinden möchten.", "modal_confirmation_dns_invalid": "Reverse DNS zeigt auf eine andere Domain", - "confirm_cloudflare_description": "Geben Sie das DNS-Token des Anbieters ein, der Rechte für {} hat:", - "confirm_backblaze": "Mit Backblaze verbinden", - "confirm_backblaze_description": "Geben Sie ein Backblaze-Token mit Zugriff auf den Sicherungsspeicher ein:", "generic_error": "Vorgang fehlgeschlagen, bitte versuchen Sie es erneut.", "recovery_main_header": "Verbindung zu einem vorhandenen Server herstellen", "domain_recover_placeholder": "Ihre Domain", @@ -434,8 +431,8 @@ "fallback_select_provider_console": "Zugang zur Serverkonsole meines Providers.", "authorization_failed": "Anmeldung mit diesem Schlüssel nicht möglich", "fallback_select_provider_console_hint": "Zum Beispiel: Hetzner.", - "server_provider_connected": "Verbinden Sie sich mit Ihrem Serveranbieter", - "server_provider_connected_placeholder": "Token des Serveranbieters", + "provider_connected": "Verbinden Sie sich mit Ihrem {}", + "provider_connected_placeholder": "Token des {}", "confirm_server": "Server bestätigen", "confirm_server_description": "Server gefunden! Bestätigen Sie, dass es das Richtige ist:", "confirm_server_accept": "Ja! Das ist es", @@ -447,8 +444,7 @@ "modal_confirmation_description": "Wenn Sie sich mit einem falschen Server verbinden, können Sie alle Ihre Daten verlieren.", "modal_confirmation_dns_valid": "Reverse DNS ist gültig", "modal_confirmation_ip_valid": "Die IP ist die gleiche wie im DNS-Eintrag", - "modal_confirmation_ip_invalid": "Die IP ist nicht dieselbe wie im DNS-Eintrag", - "confirm_cloudflare": "Verbindung zu einem DNS-Anbieter herstellen" + "modal_confirmation_ip_invalid": "Die IP ist nicht dieselbe wie im DNS-Eintrag" }, "recovery_key": { "key_connection_error": "Es konnte keine Verbindung zum Server hergestellt werden.", @@ -514,4 +510,4 @@ "ignore_tls": "Überprüfen Sie keine TLS-Zertifikate", "ignore_tls_description": "Die Anwendung validiert TLS-Zertifikate nicht, wenn sie eine Verbindung zum Server herstellt." } -} +} \ No newline at end of file diff --git a/assets/translations/en.json b/assets/translations/en.json index f66df742..51c47263 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -124,7 +124,8 @@ "disk": "Disk local", "monthly_cost": "Monthly cost", "location": "Location", - "provider": "Provider", + "server_provider": "Server Provider", + "dns_provider": "DNS Provider", "core_count": { "one": "{} core", "two": "{} cores", @@ -218,7 +219,7 @@ "extend_volume_button": "Extend volume", "extending_volume_title": "Extending volume", "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", - "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by Hetzner. Server will be rebooted after resizing.", + "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by your server provider. Server will be rebooted after resizing.", "extending_volume_error": "Couldn't initialize volume extending.", "size": "Size", "data_migration_title": "Data migration", @@ -404,9 +405,9 @@ "fallback_select_provider_console": "Access to the server console of my provider.", "authorization_failed": "Couldn't log in with this key", "fallback_select_provider_console_hint": "For example: Hetzner.", - "server_provider_connected": "Connect to your Server Provider", - "server_provider_connected_description": "Communication established. Enter you token with access to {}:", - "server_provider_connected_placeholder": "Server Provider token", + "provider_connected": "Connect to {}", + "provider_connected_description": "Enter your token with access to {}:", + "provider_connected_placeholder": "{} token", "confirm_server": "Confirm server", "confirm_server_description": "Found your server! Confirm it is the right one:", "confirm_server_accept": "Yes! That's it", @@ -420,11 +421,7 @@ "modal_confirmation_dns_valid": "Reverse DNS is valid", "modal_confirmation_dns_invalid": "Reverse DNS points to another domain", "modal_confirmation_ip_valid": "IP is the same as in DNS record", - "modal_confirmation_ip_invalid": "IP is not the same as in DNS record", - "confirm_cloudflare": "Connect to your DNS Provider", - "confirm_cloudflare_description": "Enter a token of your DNS Provider with access to {}:", - "confirm_backblaze": "Connect to Backblaze", - "confirm_backblaze_description": "Enter a Backblaze token with access to backup storage:" + "modal_confirmation_ip_invalid": "IP is not the same as in DNS record" }, "devices": { "main_screen": { @@ -542,4 +539,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} +} \ No newline at end of file diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 93bdb733..0f0acdb0 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -433,7 +433,6 @@ "recovering": { "confirm_server_decline": "Wybierz inny serwer", "domain_not_available_on_token": "Wprowadzony token nie ma dostępu do żądanej domeny.", - "confirm_cloudflare_description": "Wprowadź token DNS dostawcy, który ma uprawnienia do {}:", "method_recovery_input_description": "Wprowadź swój token odzyskiwania", "fallback_select_provider_console": "Dostęp do konsoli serwera mojego dostawcy.", "confirm_server_description": "Znalazłem twój serwer! Potwierdź, że jest to właściwe:", @@ -461,17 +460,14 @@ "modal_confirmation_dns_invalid": "Odwrócony DNS wskazuje na inną domenę", "modal_confirmation_ip_valid": "IP jest takie samo jak w rekordzie DNS", "modal_confirmation_ip_invalid": "IP nie jest zgodne z tym w rekordzie DNS", - "confirm_cloudflare": "Łączenie z dostawcą DNS", - "confirm_backblaze": "Podłączanie do Backblaze", - "confirm_backblaze_description": "Wpisz token Backblaze, który ma prawa do magazynu kopii zapasowych:", "fallback_select_description": "Które z nich posiadasz? Wybierz pierwszą, która pasuje:", "fallback_select_token_copy": "Kopia tokena autoryzacyjnego z innej wersji aplikacji.", "fallback_select_root_ssh": "Dostęp Root do serwera poprzez SSH.", "authorization_failed": "Nie udało się zalogować za pomocą tego klucza", "fallback_select_provider_console_hint": "Na przykład: Hetzner.", - "server_provider_connected": "Połączenie z dostawcą serwera", - "server_provider_connected_description": "Połączenie ustanowione. Podaj swój token z dostępem do {}:", - "server_provider_connected_placeholder": "Token dostawcy serwera" + "provider_connected": "Połączenie z dostawcą {}", + "provider_connected_description": "Połączenie ustanowione. Podaj swój token z dostępem do {}:", + "provider_connected_placeholder": "{} Token " }, "devices": { "main_screen": { @@ -513,4 +509,4 @@ "cubit_statuses": "Aktualny stan qubitów ładujących", "ignore_tls": "Używane podczas konfigurowania nowego serwera." } -} +} \ No newline at end of file diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 738bceea..fdc276cd 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -214,7 +214,7 @@ "extend_volume_button": "Расширить хранилище", "extending_volume_title": "Расширение хранилища", "extending_volume_description": "Изменение размера хранилища позволит вам держать больше данных на вашем сервере без расширения самого сервера. Объем можно только увеличить: уменьшить нельзя.", - "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных Hetzner. Сервер будет перезагружен во время процесса.", + "extending_volume_price_info": "Цена включает НДС и рассчитана на основе данных о ценах, предоставленных вашим провайдером. Сервер будет перезагружен во время процесса.", "extending_volume_error": "Не удалось начать расширение хранилища.", "size": "Размер", "data_migration_title": "Миграция данных", @@ -414,13 +414,9 @@ "modal_confirmation_dns_invalid": "Обратный DNS указывает на другой домен", "modal_confirmation_ip_valid": "IP совпадает с указанным в DNS записи", "modal_confirmation_ip_invalid": "IP не совпадает с указанным в DNS записи", - "confirm_cloudflare": "Подключение к DNS Провайдеру", - "confirm_cloudflare_description": "Введите токен DNS Провайдера, который имеет права на {}:", - "confirm_backblaze_description": "Введите токен Backblaze, который имеет права на хранилище резервных копий:", - "confirm_backblaze": "Подключение к Backblaze", - "server_provider_connected": "Подключение к вашему серверному провайдеру", - "server_provider_connected_description": "Связь установлена. Введите свой токен с доступом к {}:", - "server_provider_connected_placeholder": "Токен серверного провайдера" + "provider_connected": "Подключение к вашему {}", + "provider_connected_description": "Связь установлена. Введите свой токен с доступом к {}:", + "provider_connected_placeholder": "{} Токен" }, "devices": { "main_screen": { @@ -538,4 +534,4 @@ "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", "ignore_tls": "Не проверять сертификаты TLS" } -} +} \ No newline at end of file diff --git a/assets/translations/sk.json b/assets/translations/sk.json index 9573ccae..c45523d4 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -388,11 +388,10 @@ "recovery_main_header": "Pripojiť sa k existujúcemu serveru", "method_select_other_device": "Mám prístup na inom zariadení", "method_device_description": "Otvorte aplikáciu na inom zariadení a otvorte obrazovku správy zariadenia. Kliknutím na „Pridať zariadenie“ získate autorizačný token.", - "server_provider_connected": "Pripojiť sa k poskytovateľovi servera", + "provider_connected": "Pripojiť sa k poskytovateľovi {}", "choose_server": "Vyberte si svoj server", "domain_not_available_on_token": "Vybraná doména nie je na tomto tokene dostupná.", "modal_confirmation_ip_valid": "IP je rovnaká ako v DNS zázname", - "confirm_backblaze_description": "Zadajte token Backblaze, ktorý má práva na úložisko záloh:", "generic_error": "Operácia zlyhala, skúste to znova.", "domain_recovery_description": "Zadajte doménu servera, pre ktorú chcete získať prístup:", "domain_recover_placeholder": "Vaša doména", @@ -410,8 +409,8 @@ "fallback_select_provider_console": "Prístup ku konzole servera môjho poskytovateľa.", "authorization_failed": "Pomocou tohto kľúča sa nepodarilo prihlásiť", "fallback_select_provider_console_hint": "Napríklad Hetzner.", - "server_provider_connected_description": "Spojenie bolo nadviazané. Zadajte svoj token s prístupom k {}:", - "server_provider_connected_placeholder": "Token poskytovateľa servera", + "provider_connected_description": "Spojenie bolo nadviazané. Zadajte svoj token s prístupom k {}:", + "provider_connected_placeholder": "{} Token", "confirm_server": "Potvrďte server", "confirm_server_description": "Našiel sa server! Potvrďte, že je to on:", "confirm_server_accept": "Áno, to je on", @@ -422,10 +421,7 @@ "modal_confirmation_description": "Ak sa pripojíte k nesprávnemu serveru, môžete stratiť všetky svoje údaje.", "modal_confirmation_dns_valid": "Reverzný DNS je platný", "modal_confirmation_dns_invalid": "Reverzné DNS ukazuje na inú doménu", - "modal_confirmation_ip_invalid": "IP nie je rovnaká ako v DNS zázname", - "confirm_cloudflare": "Pripojenie k službe CloudFlare", - "confirm_cloudflare_description": "Zadajte token Cloudflare, ktorý má práva na {}:", - "confirm_backblaze": "Pripojenie ku Backblaze" + "modal_confirmation_ip_invalid": "IP nie je rovnaká ako v DNS zázname" }, "devices": { "add_new_device_screen": { diff --git a/assets/translations/uk.json b/assets/translations/uk.json index 7a80b0dd..0d5726bf 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -171,9 +171,9 @@ "fallback_select_provider_console": "Доступ до серверної консолі мого продiвера.", "authorization_failed": "Не можу авторизуватись за цим ключем", "fallback_select_provider_console_hint": "Наприклад: Hetzner.", - "server_provider_connected": "Підключіться до провайдера сервера", - "server_provider_connected_description": "Зв'язок встановлений. Введіть свій токен з доступом до {}:", - "server_provider_connected_placeholder": "Токен провайдера сервера", + "provider_connected": "Підключіться до {}", + "provider_connected_description": "Зв'язок встановлений. Введіть свій токен з доступом до {}:", + "provider_connected_placeholder": "{} Токен", "confirm_server": "Підтвердити сервер", "confirm_server_description": "Знайдено ваш сервер! Підтвердіть, що він правильний:", "confirm_server_accept": "Так! Це воно", @@ -187,11 +187,7 @@ "modal_confirmation_dns_valid": "Зворотна DNS дійсна", "modal_confirmation_dns_invalid": "Зворотна DNS вказує на інший домен", "modal_confirmation_ip_valid": "IP той же, що і в записі DNS", - "modal_confirmation_ip_invalid": "IP не такий, як в DNS-записі", - "confirm_cloudflare": "Підключення до CloudFlare", - "confirm_cloudflare_description": "Введіть токен CloudFlare з доступом до {}:", - "confirm_backblaze": "Підкючитися до Backblaze", - "confirm_backblaze_description": "Введіть токен Backblaze із доступом до сховища резервних копій:" + "modal_confirmation_ip_invalid": "IP не такий, як в DNS-записі" }, "resource_chart": { "month": "Місяць", diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index cebb568c..6a886e75 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -46,7 +46,6 @@ class DigitalOceanApi extends RestApiMap { @override String get rootAddress => 'https://api.digitalocean.com/v2'; String get infectProviderName => 'digitalocean'; - String get displayProviderName => 'Digital Ocean'; Future> getServers() async { List servers = []; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 7fbf3dac..afb061d1 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -46,7 +46,6 @@ class HetznerApi extends RestApiMap { @override String get rootAddress => 'https://api.hetzner.cloud/v1'; String get infectProviderName => 'hetzner'; - String get displayProviderName => 'Hetzner'; Future>> getServers() async { List servers = []; diff --git a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart index 3bad75eb..0d2d80e3 100644 --- a/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart +++ b/lib/logic/cubit/server_detailed_info/server_detailed_info_repository.dart @@ -9,20 +9,38 @@ class ServerDetailsRepository { ServerApi server = ServerApi(); Future load() async { - final serverProviderApi = ProvidersController.currentServerProvider; final settings = await server.getSystemSettings(); - final serverId = getIt().serverDetails!.id; - final metadata = await serverProviderApi?.getMetadata(serverId); - return ServerDetailsRepositoryDto( autoUpgradeSettings: settings.autoUpgradeSettings, - metadata: metadata!.data, + metadata: await metadata, serverTimezone: TimeZoneSettings.fromString( settings.timezone, ), ); } + Future> get metadata async { + List data = []; + + final serverProviderApi = ProvidersController.currentServerProvider; + final dnsProviderApi = ProvidersController.currentDnsProvider; + if (serverProviderApi != null && dnsProviderApi != null) { + final serverId = getIt().serverDetails?.id ?? 0; + final metadataResult = await serverProviderApi.getMetadata(serverId); + metadataResult.data.add( + ServerMetadataEntity( + trId: 'server.dns_provider', + value: dnsProviderApi.type.displayName, + type: MetadataType.other, + ), + ); + + data = metadataResult.data; + } + + return data; + } + Future setAutoUpgradeSettings( final AutoUpgradeSettings settings, ) async { diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index c669cf75..25fa4c01 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -532,13 +532,29 @@ class ServerInstallationCubit extends Cubit { .showSnackBar('recovering.generic_error'.tr()); return; } - await repository.saveServerDetails(serverDetails); + final newServerDetails = ServerHostingDetails( + provider: serverProvider, + apiToken: serverDetails.apiToken, + createTime: serverDetails.createTime, + id: serverDetails.id, + ip4: serverDetails.ip4, + volume: serverDetails.volume, + startTime: serverDetails.startTime, + ); + final newServerDomain = ServerDomain( + domainName: serverDomain.domainName, + zoneId: serverDomain.zoneId, + provider: dnsProvider, + ); + await repository.saveServerDetails(newServerDetails); await repository.saveDnsProviderType(dnsProvider); + await repository.saveDomain(newServerDomain); setServerProviderType(serverProvider); setDnsProviderType(dnsProvider); emit( dataState.copyWith( - serverDetails: serverDetails, + serverDetails: newServerDetails, + serverDomain: newServerDomain, currentStep: RecoveryStep.serverProviderToken, ), ); diff --git a/lib/logic/models/hive/server_details.dart b/lib/logic/models/hive/server_details.dart index e746dd75..0e9d825a 100644 --- a/lib/logic/models/hive/server_details.dart +++ b/lib/logic/models/hive/server_details.dart @@ -96,14 +96,9 @@ enum ServerProviderType { } } - String get displayName { - switch (this) { - case ServerProviderType.hetzner: - return 'Hetzner Cloud'; - case ServerProviderType.digitalOcean: - return 'Digital Ocean'; - default: - return 'Unknown'; - } - } + String get displayName => switch (this) { + digitalOcean => 'Digital Ocean', + hetzner => 'Hetzner Cloud', + unknown => 'Unknown', + }; } diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index bd755bbc..5eb20bd8 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -54,4 +54,11 @@ enum DnsProviderType { desec => 'DESEC', unknown => 'UNKNOWN', }; + + String get displayName => switch (this) { + digitalOcean => 'Digital Ocean DNS', + cloudflare => 'Cloudflare', + desec => 'deSEC', + unknown => 'Unknown', + }; } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index da246b18..945977fb 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -748,8 +748,8 @@ class DigitalOceanServerProvider extends ServerProvider { ), ServerMetadataEntity( type: MetadataType.other, - trId: 'server.provider', - value: _adapter.api().displayProviderName, + trId: 'server.server_provider', + value: type.displayName, ), ]; } catch (e) { diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index ec15801e..857c5a6e 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -752,8 +752,8 @@ class HetznerServerProvider extends ServerProvider { ), ServerMetadataEntity( type: MetadataType.other, - trId: 'server.provider', - value: _adapter.api().displayProviderName, + trId: 'server.server_provider', + value: type.displayName, ), ]; } catch (e) { diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 39872494..004995a0 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -7,6 +7,7 @@ import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart' import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; @@ -165,16 +166,11 @@ class _ExtendingVolumePageState extends State { height: 1.0, ), const SizedBox(height: 16), - const Align( - alignment: Alignment.centerLeft, - child: Icon( - Icons.info_outlined, - size: 24, - ), + InfoBox( + text: 'storage.extending_volume_price_info'.tr(), + isWarning: false, ), const SizedBox(height: 16), - Text('storage.extending_volume_price_info'.tr()), - const SizedBox(height: 16), ], ); }, diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index f7216a74..a4d04aae 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -23,8 +23,10 @@ class RecoveryConfirmBackblaze extends StatelessWidget { context.watch().state; return BrandHeroScreen( - heroTitle: 'recovering.confirm_backblaze'.tr(), - heroSubtitle: 'recovering.confirm_backblaze_description'.tr(), + heroTitle: 'recovering.provider_connected'.tr(args: ['Backblaze']), + heroSubtitle: 'recovering.provider_connected_description'.tr( + args: ['Backblaze'], + ), hasBackButton: true, ignoreBreakpoints: true, hasSupportDrawer: true, diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart index 9dcad056..02a2afeb 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart @@ -21,10 +21,14 @@ class RecoveryConfirmDns extends StatelessWidget { builder: (final BuildContext context) { final FormCubitState formCubitState = context.watch().state; - + final String providerDisplayName = + appConfig.state.serverDomain?.provider.displayName ?? + 'DNS Provider'; return BrandHeroScreen( - heroTitle: 'recovering.confirm_cloudflare'.tr(), - heroSubtitle: 'recovering.confirm_cloudflare_description'.tr( + heroTitle: 'recovering.provider_connected'.tr( + args: [providerDisplayName], + ), + heroSubtitle: 'recovering.provider_connected_description'.tr( args: [appConfig.state.serverDomain?.domainName ?? 'your domain'], ), hasBackButton: true, @@ -38,7 +42,9 @@ class RecoveryConfirmDns extends StatelessWidget { formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), - labelText: 'initializing.cloudflare_api_token'.tr(), + labelText: 'recovering.provider_connected_placeholder'.tr( + args: [providerDisplayName], + ), ), ), const SizedBox(height: 16), diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 82c29ba2..86a1bf44 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -20,8 +20,13 @@ class RecoveryServerProviderConnected extends StatelessWidget { ServerProviderFormCubit(appConfig), child: Builder( builder: (final BuildContext context) => BrandHeroScreen( - heroTitle: 'recovering.server_provider_connected'.tr(), - heroSubtitle: 'recovering.server_provider_connected_description'.tr( + heroTitle: 'recovering.provider_connected'.tr( + args: [ + appConfig.state.serverDetails?.provider.displayName ?? + 'Server Provider' + ], + ), + heroSubtitle: 'recovering.provider_connected_description'.tr( args: [appConfig.state.serverDomain?.domainName ?? 'your domain'], ), hasBackButton: true, @@ -36,8 +41,12 @@ class RecoveryServerProviderConnected extends StatelessWidget { formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), - labelText: - 'recovering.server_provider_connected_placeholder'.tr(), + labelText: 'recovering.provider_connected_placeholder'.tr( + args: [ + appConfig.state.serverDetails?.provider.displayName ?? + 'Server Provider' + ], + ), ), ), const SizedBox(height: 16), From b2c67c80bd580436aba476258999414f7081681f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 31 Jul 2023 23:40:25 -0300 Subject: [PATCH 666/732] refactor: Implement Cloudflare objects to avoid usage of dynamic blobs - Get rid of ZoneId term outside of Cloudflare --- .../cloudflare/cloudflare_api.dart | 80 +++------- .../initializing/domain_setup_cubit.dart | 18 +-- .../server_installation_cubit.dart | 10 +- .../server_installation_repository.dart | 18 ++- lib/logic/models/hive/server_domain.dart | 7 +- lib/logic/models/hive/server_domain.g.dart | 5 +- .../models/json/cloudflare_dns_info.dart | 86 +++++++++++ .../models/json/cloudflare_dns_info.g.dart | 42 +++++ .../providers/dns_providers/cloudflare.dart | 144 +++++++++++++++--- lib/logic/providers/dns_providers/desec.dart | 7 - .../dns_providers/digital_ocean_dns.dart | 7 - .../providers/dns_providers/dns_provider.dart | 8 - 12 files changed, 296 insertions(+), 136 deletions(-) create mode 100644 lib/logic/models/json/cloudflare_dns_info.dart create mode 100644 lib/logic/models/json/cloudflare_dns_info.g.dart diff --git a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart index ae015d9d..0ba88ee3 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart @@ -4,8 +4,7 @@ import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; -import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/logic/models/json/dns_records.dart'; +import 'package:selfprivacy/logic/models/json/cloudflare_dns_info.dart'; class CloudflareApi extends RestApiMap { CloudflareApi({ @@ -92,9 +91,9 @@ class CloudflareApi extends RestApiMap { ); } - Future> getDomains() async { + Future>> getZones() async { final String url = '$rootAddress/zones'; - List domains = []; + List domains = []; late final Response? response; final Dio client = await getClient(); @@ -103,7 +102,11 @@ class CloudflareApi extends RestApiMap { url, queryParameters: {'per_page': 50}, ); - domains = response.data['result']; + domains = response.data['result']! + .map( + (final json) => CloudflareZone.fromJson(json), + ) + .toList(); } catch (e) { print(e); return GenericResult( @@ -125,18 +128,17 @@ class CloudflareApi extends RestApiMap { } Future> createMultipleDnsRecords({ - required final ServerDomain domain, - required final List records, + required final String zoneId, + required final List records, }) async { - final String domainZoneId = domain.zoneId; final List allCreateFutures = []; final Dio client = await getClient(); try { - for (final DnsRecord record in records) { + for (final CloudflareDnsRecord record in records) { allCreateFutures.add( client.post( - '/zones/$domainZoneId/dns_records', + '/zones/$zoneId/dns_records', data: record.toJson(), ), ); @@ -160,11 +162,10 @@ class CloudflareApi extends RestApiMap { } Future> removeSimilarRecords({ - required final ServerDomain domain, - required final List records, + required final String zoneId, + required final List records, }) async { - final String domainZoneId = domain.zoneId; - final String url = '/zones/$domainZoneId/dns_records'; + final String url = '/zones/$zoneId/dns_records'; final Dio client = await getClient(); try { @@ -172,7 +173,7 @@ class CloudflareApi extends RestApiMap { for (final record in records) { allDeleteFutures.add( - client.delete('$url/${record["id"]}'), + client.delete('$url/${record.id}'), ); } await Future.wait(allDeleteFutures); @@ -190,26 +191,21 @@ class CloudflareApi extends RestApiMap { return GenericResult(success: true, data: null); } - Future> getDnsRecords({ - required final ServerDomain domain, + Future>> getDnsRecords({ + required final String zoneId, }) async { Response response; - final String domainName = domain.domainName; - final String domainZoneId = domain.zoneId; - final List allRecords = []; - - final String url = '/zones/$domainZoneId/dns_records'; + List allRecords = []; + final String url = '/zones/$zoneId/dns_records'; final Dio client = await getClient(); try { response = await client.get(url); - final List records = response.data['result'] ?? []; - - for (final record in records) { - if (record['zone_name'] == domainName) { - allRecords.add(record); - } - } + allRecords = response.data['result']! + .map( + (final json) => CloudflareDnsRecord.fromJson(json), + ) + .toList(); } catch (e) { print(e); return GenericResult( @@ -223,30 +219,4 @@ class CloudflareApi extends RestApiMap { return GenericResult(data: allRecords, success: true); } - - Future>> getZones(final String domain) async { - List zones = []; - - late final Response? response; - final Dio client = await getClient(); - try { - response = await client.get( - '/zones', - queryParameters: {'name': domain}, - ); - zones = response.data['result']; - } catch (e) { - print(e); - GenericResult( - success: false, - data: zones, - code: response?.statusCode, - message: response?.statusMessage, - ); - } finally { - close(client); - } - - return GenericResult(success: true, data: zones); - } } diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index 8c66deb7..f4597439 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -25,23 +25,17 @@ class DomainSetupCubit extends Cubit { Future saveDomain() async { assert(state is Loaded, 'wrong state'); final String domainName = (state as Loaded).domain; - emit(Loading(LoadingTypes.saving)); final dnsProvider = ProvidersController.currentDnsProvider!; - final GenericResult zoneIdResult = - await dnsProvider.getZoneId(domainName); - if (zoneIdResult.success || zoneIdResult.data != null) { - final ServerDomain domain = ServerDomain( - domainName: domainName, - zoneId: zoneIdResult.data!, - provider: dnsProvider.type, - ); + final ServerDomain domain = ServerDomain( + domainName: domainName, + provider: dnsProvider.type, + ); - serverInstallationCubit.setDomain(domain); - emit(DomainSet()); - } + serverInstallationCubit.setDomain(domain); + emit(DomainSet()); } } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index c669cf75..f29f70c5 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -467,7 +467,6 @@ class ServerInstallationCubit extends Cubit { final ServerDomain serverDomain = ServerDomain( domainName: domain, provider: DnsProviderType.unknown, - zoneId: '', ); final ServerRecoveryCapabilities recoveryCapabilities = await repository.getRecoveryCapabilities(serverDomain); @@ -681,9 +680,9 @@ class ServerInstallationCubit extends Cubit { if (serverDomain == null) { return; } - final String? zoneId = - await repository.getDomainId(token, serverDomain.domainName); - if (zoneId == null) { + final isTokenValid = + await repository.validateDnsToken(token, serverDomain.domainName); + if (!isTokenValid) { getIt() .showSnackBar('recovering.domain_not_available_on_token'.tr()); return; @@ -695,16 +694,13 @@ class ServerInstallationCubit extends Cubit { await repository.saveDomain( ServerDomain( domainName: serverDomain.domainName, - zoneId: zoneId, provider: dnsProviderType, ), ); - // await repository.setDnsApiToken(token); emit( dataState.copyWith( serverDomain: ServerDomain( domainName: serverDomain.domainName, - zoneId: zoneId, provider: dnsProviderType, ), dnsApiToken: token, diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index dd3388c6..1518d7ac 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -193,17 +193,23 @@ class ServerInstallationRepository { return server; } - Future getDomainId(final String token, final String domain) async { + Future validateDnsToken( + final String token, + final String domain, + ) async { final result = await ProvidersController.currentDnsProvider!.tryInitApiByToken(token); if (!result.success) { - return null; + return false; } await setDnsApiToken(token); - return (await ProvidersController.currentDnsProvider!.getZoneId( - domain, - )) - .data; + final domainResult = + await ProvidersController.currentDnsProvider!.domainList(); + if (!domainResult.success || domainResult.data.isEmpty) { + return false; + } + + return domain == domainResult.data[0]; } Future> isDnsAddressesMatch( diff --git a/lib/logic/models/hive/server_domain.dart b/lib/logic/models/hive/server_domain.dart index bd755bbc..4415ab20 100644 --- a/lib/logic/models/hive/server_domain.dart +++ b/lib/logic/models/hive/server_domain.dart @@ -7,21 +7,16 @@ part 'server_domain.g.dart'; class ServerDomain { ServerDomain({ required this.domainName, - required this.zoneId, required this.provider, }); @HiveField(0) final String domainName; - @HiveField(1) - final String zoneId; + // @HiveField(1) @HiveField(2, defaultValue: DnsProviderType.cloudflare) final DnsProviderType provider; - - @override - String toString() => '$domainName: $zoneId'; } @HiveType(typeId: 100) diff --git a/lib/logic/models/hive/server_domain.g.dart b/lib/logic/models/hive/server_domain.g.dart index 303407bc..2557ec43 100644 --- a/lib/logic/models/hive/server_domain.g.dart +++ b/lib/logic/models/hive/server_domain.g.dart @@ -18,7 +18,6 @@ class ServerDomainAdapter extends TypeAdapter { }; return ServerDomain( domainName: fields[0] as String, - zoneId: fields[1] as String, provider: fields[2] == null ? DnsProviderType.cloudflare : fields[2] as DnsProviderType, @@ -28,11 +27,9 @@ class ServerDomainAdapter extends TypeAdapter { @override void write(BinaryWriter writer, ServerDomain obj) { writer - ..writeByte(3) + ..writeByte(2) ..writeByte(0) ..write(obj.domainName) - ..writeByte(1) - ..write(obj.zoneId) ..writeByte(2) ..write(obj.provider); } diff --git a/lib/logic/models/json/cloudflare_dns_info.dart b/lib/logic/models/json/cloudflare_dns_info.dart new file mode 100644 index 00000000..3cd11bcd --- /dev/null +++ b/lib/logic/models/json/cloudflare_dns_info.dart @@ -0,0 +1,86 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'cloudflare_dns_info.g.dart'; + +/// https://developers.cloudflare.com/api/operations/zones-get +@JsonSerializable() +class CloudflareZone { + CloudflareZone({ + required this.id, + required this.name, + }); + + /// Zone identifier + /// + /// `<= 32 characters` + /// + /// Example: 023e105f4ecef8ad9ca31a8372d0c353 + final String id; + + /// The domain name + /// + /// `<= 253 characters` + /// + /// Example: example.com + final String name; + + static CloudflareZone fromJson(final Map json) => + _$CloudflareZoneFromJson(json); +} + +/// https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-list-dns-records +@JsonSerializable() +class CloudflareDnsRecord { + CloudflareDnsRecord({ + required this.type, + required this.name, + required this.content, + required this.zoneName, + this.ttl = 3600, + this.priority = 10, + this.id, + }); + + /// Record identifier + /// + /// `<= 32 characters` + /// Example: 023e105f4ecef8ad9ca31a8372d0c353 + final String? id; + + /// Record type. + /// + /// Example: A + final String type; + + /// DNS record name (or @ for the zone apex) in Punycode. + /// + /// `<= 255 characters` + /// + /// Example: example.com + final String? name; + + /// Valid DNS Record string content. + /// + /// Example: A valid IPv4 address "198.51.100.4" + final String? content; + + /// The domain of the record. + /// + /// Example: example.com + @JsonKey(name: 'zone_name') + final String zoneName; + + /// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + /// + /// Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + final int ttl; + + /// Required for MX, SRV and URI records; unused by other record types. Records with lower priorities are preferred. + /// + /// `>= 0 <= 65535` + final int priority; + + static CloudflareDnsRecord fromJson(final Map json) => + _$CloudflareDnsRecordFromJson(json); + Map toJson() => _$CloudflareDnsRecordToJson(this); +} diff --git a/lib/logic/models/json/cloudflare_dns_info.g.dart b/lib/logic/models/json/cloudflare_dns_info.g.dart new file mode 100644 index 00000000..d02fc2d2 --- /dev/null +++ b/lib/logic/models/json/cloudflare_dns_info.g.dart @@ -0,0 +1,42 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cloudflare_dns_info.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CloudflareZone _$CloudflareZoneFromJson(Map json) => + CloudflareZone( + id: json['id'] as String, + name: json['name'] as String, + ); + +Map _$CloudflareZoneToJson(CloudflareZone instance) => + { + 'id': instance.id, + 'name': instance.name, + }; + +CloudflareDnsRecord _$CloudflareDnsRecordFromJson(Map json) => + CloudflareDnsRecord( + type: json['type'] as String, + name: json['name'] as String?, + content: json['content'] as String?, + zoneName: json['zone_name'] as String, + ttl: json['ttl'] as int? ?? 3600, + priority: json['priority'] as int? ?? 10, + id: json['id'] as String?, + ); + +Map _$CloudflareDnsRecordToJson( + CloudflareDnsRecord instance) => + { + 'id': instance.id, + 'type': instance.type, + 'name': instance.name, + 'content': instance.content, + 'zone_name': instance.zoneName, + 'ttl': instance.ttl, + 'priority': instance.priority, + }; diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index 83d665b3..596c03ab 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -1,12 +1,16 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/cloudflare/cloudflare_api.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; +import 'package:selfprivacy/logic/models/json/cloudflare_dns_info.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; class ApiAdapter { - ApiAdapter({final bool isWithToken = true}) - : _api = CloudflareApi( + ApiAdapter({ + final bool isWithToken = true, + this.cachedDomain = '', + this.cachedZoneId = '', + }) : _api = CloudflareApi( isWithToken: isWithToken, ); @@ -17,6 +21,8 @@ class ApiAdapter { ); final CloudflareApi _api; + final String cachedZoneId; + final String cachedDomain; } class CloudflareDnsProvider extends DnsProvider { @@ -47,7 +53,7 @@ class CloudflareDnsProvider extends DnsProvider { @override Future>> domainList() async { List domains = []; - final result = await _adapter.api().getDomains(); + final result = await _adapter.api().getZones(); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, @@ -59,10 +65,18 @@ class CloudflareDnsProvider extends DnsProvider { domains = result.data .map( - (final el) => el['name'] as String, + (final el) => el.name, ) .toList(); + /// TODO: Remove when domain selection for more than one domain on account is implemented, move cachedZoneId writing to domain saving method + _adapter = ApiAdapter( + isWithToken: true, + cachedDomain: result.data[0].name, + cachedZoneId: result.data[0].id, + ); + print('cachedZoneId saved for the first time!!!'); + return GenericResult( success: true, data: domains, @@ -73,11 +87,27 @@ class CloudflareDnsProvider extends DnsProvider { Future> createDomainRecords({ required final ServerDomain domain, final String? ip4, - }) { + }) async { + final syncZoneIdResult = await syncZoneId(domain.domainName); + if (!syncZoneIdResult.success) { + return syncZoneIdResult; + } + final records = getProjectDnsRecords(domain.domainName, ip4); return _adapter.api().createMultipleDnsRecords( - domain: domain, - records: records, + zoneId: _adapter.cachedZoneId, + records: records + .map( + (final rec) => CloudflareDnsRecord( + content: rec.content, + name: rec.name, + type: rec.type, + zoneName: domain.domainName, + id: null, + ttl: rec.ttl, + ), + ) + .toList(), ); } @@ -86,7 +116,13 @@ class CloudflareDnsProvider extends DnsProvider { required final ServerDomain domain, final String? ip4, }) async { - final result = await _adapter.api().getDnsRecords(domain: domain); + final syncZoneIdResult = await syncZoneId(domain.domainName); + if (!syncZoneIdResult.success) { + return syncZoneIdResult; + } + + final result = + await _adapter.api().getDnsRecords(zoneId: _adapter.cachedZoneId); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, @@ -97,7 +133,7 @@ class CloudflareDnsProvider extends DnsProvider { } return _adapter.api().removeSimilarRecords( - domain: domain, + zoneId: _adapter.cachedZoneId, records: result.data, ); } @@ -106,8 +142,19 @@ class CloudflareDnsProvider extends DnsProvider { Future>> getDnsRecords({ required final ServerDomain domain, }) async { + final syncZoneIdResult = await syncZoneId(domain.domainName); + if (!syncZoneIdResult.success) { + return GenericResult( + success: syncZoneIdResult.success, + data: [], + code: syncZoneIdResult.code, + message: syncZoneIdResult.message, + ); + } + final List records = []; - final result = await _adapter.api().getDnsRecords(domain: domain); + final result = + await _adapter.api().getDnsRecords(zoneId: _adapter.cachedZoneId); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, @@ -120,11 +167,10 @@ class CloudflareDnsProvider extends DnsProvider { for (final rawRecord in result.data) { records.add( DnsRecord( - name: rawRecord['name'], - type: rawRecord['type'], - content: rawRecord['content'], - ttl: rawRecord['ttl'], - proxied: rawRecord['proxied'], + name: rawRecord.name, + type: rawRecord.type, + content: rawRecord.content, + ttl: rawRecord.ttl, ), ); } @@ -139,11 +185,26 @@ class CloudflareDnsProvider extends DnsProvider { Future> setDnsRecord( final DnsRecord record, final ServerDomain domain, - ) async => - _adapter.api().createMultipleDnsRecords( - domain: domain, - records: [record], - ); + ) async { + final syncZoneIdResult = await syncZoneId(domain.domainName); + if (!syncZoneIdResult.success) { + return syncZoneIdResult; + } + + return _adapter.api().createMultipleDnsRecords( + zoneId: _adapter.cachedZoneId, + records: [ + CloudflareDnsRecord( + content: record.content, + id: null, + name: record.name, + type: record.type, + zoneName: domain.domainName, + ttl: record.ttl, + ), + ], + ); + } @override Future>> validateDnsRecords( @@ -336,10 +397,41 @@ class CloudflareDnsProvider extends DnsProvider { ]; } - @override + Future> syncZoneId(final String domain) async { + if (domain == _adapter.cachedDomain && _adapter.cachedZoneId.isNotEmpty) { + return GenericResult( + success: true, + data: null, + ); + } + + print('syncZoneId!!!'); + + final getZoneIdResult = await getZoneId(domain); + if (!getZoneIdResult.success || getZoneIdResult.data == null) { + return GenericResult( + success: false, + data: null, + code: getZoneIdResult.code, + message: getZoneIdResult.message, + ); + } + + _adapter = ApiAdapter( + isWithToken: true, + cachedDomain: domain, + cachedZoneId: getZoneIdResult.data!, + ); + + return GenericResult( + success: true, + data: null, + ); + } + Future> getZoneId(final String domain) async { String? id; - final result = await _adapter.api().getZones(domain); + final result = await _adapter.api().getZones(); if (result.data.isEmpty || !result.success) { return GenericResult( success: result.success, @@ -349,8 +441,12 @@ class CloudflareDnsProvider extends DnsProvider { ); } - id = result.data[0]['id']; + for (final availableDomain in result.data) { + if (availableDomain.name == domain) { + id = availableDomain.id; + } + } - return GenericResult(success: true, data: id); + return GenericResult(success: id != null, data: id); } } diff --git a/lib/logic/providers/dns_providers/desec.dart b/lib/logic/providers/dns_providers/desec.dart index e20d82bf..a5e3e8d7 100644 --- a/lib/logic/providers/dns_providers/desec.dart +++ b/lib/logic/providers/dns_providers/desec.dart @@ -408,11 +408,4 @@ class DesecDnsProvider extends DnsProvider { ), ]; } - - @override - Future> getZoneId(final String domain) async => - GenericResult( - data: domain, - success: true, - ); } diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index 7397f41c..4fac4b65 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -369,11 +369,4 @@ class DigitalOceanDnsProvider extends DnsProvider { ), ]; } - - @override - Future> getZoneId(final String domain) async => - GenericResult( - data: domain, - success: true, - ); } diff --git a/lib/logic/providers/dns_providers/dns_provider.dart b/lib/logic/providers/dns_providers/dns_provider.dart index 28517a83..647e84ea 100644 --- a/lib/logic/providers/dns_providers/dns_provider.dart +++ b/lib/logic/providers/dns_providers/dns_provider.dart @@ -73,12 +73,4 @@ abstract class DnsProvider { final String? ip4, final String? dkimPublicKey, ); - - /// Tries to access zone of requested domain. - /// - /// If a DNS provider doesn't support zones, - /// will return domain without any changes. - /// - /// If success, returns an initializing string of zone id. - Future> getZoneId(final String domain); } From bd9a383d38e794e56c9154bf75fda5ebabfece4f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 2 Aug 2023 16:08:26 -0300 Subject: [PATCH 667/732] chore: Remove debug prints --- lib/logic/providers/dns_providers/cloudflare.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index 596c03ab..4a8062f1 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -75,7 +75,6 @@ class CloudflareDnsProvider extends DnsProvider { cachedDomain: result.data[0].name, cachedZoneId: result.data[0].id, ); - print('cachedZoneId saved for the first time!!!'); return GenericResult( success: true, @@ -405,8 +404,6 @@ class CloudflareDnsProvider extends DnsProvider { ); } - print('syncZoneId!!!'); - final getZoneIdResult = await getZoneId(domain); if (!getZoneIdResult.success || getZoneIdResult.data == null) { return GenericResult( From ffe923ef136356f7685cec4eeff96a864baf3519 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 2 Aug 2023 18:08:23 -0300 Subject: [PATCH 668/732] fix: Replace hard reset from server provider with direct server reboot --- .../server_api/server_actions_api.dart | 18 +++++++++++++----- .../cubit/client_jobs/client_jobs_cubit.dart | 4 ++-- .../server_installation_repository.dart | 6 +++--- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart index f6fd5201..131a6a6d 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart @@ -20,15 +20,23 @@ mixin ServerActionsApi on GraphQLApiMap { return result; } - Future reboot() async { + Future> reboot() async { + DateTime? time; try { final GraphQLClient client = await getClient(); - return await _commonBoolRequest( - () async => client.mutate$RebootSystem(), - ); + final response = await client.mutate$RunSystemRebuild(); + if (response.hasException) { + print(response.exception.toString()); + } + if (response.parsedData!.runSystemRebuild.success) { + time = DateTime.now(); + } } catch (e) { - return false; + print(e); + return GenericResult(data: time, success: false); } + + return GenericResult(data: time, success: true); } Future pullConfigurationUpdate() async { diff --git a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart index 8b6a66b4..59a33673 100644 --- a/lib/logic/cubit/client_jobs/client_jobs_cubit.dart +++ b/lib/logic/cubit/client_jobs/client_jobs_cubit.dart @@ -54,8 +54,8 @@ class JobsCubit extends Cubit { Future rebootServer() async { emit(JobsStateLoading()); - final bool isSuccessful = await api.reboot(); - if (isSuccessful) { + final rebootResult = await api.reboot(); + if (rebootResult.success && rebootResult.data != null) { getIt().showSnackBar('jobs.reboot_success'.tr()); } else { getIt().showSnackBar('jobs.reboot_failed'.tr()); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index dd3388c6..4799a7d8 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -254,12 +254,12 @@ class ServerInstallationRepository { Future restart() async { final server = getIt().serverDetails!; - final result = await ProvidersController.currentServerProvider!.restart( - server.id, - ); + final result = await ServerApi().reboot(); if (result.success && result.data != null) { server.copyWith(startTime: result.data); + } else { + getIt().showSnackBar('jobs.reboot_failed'.tr()); } return server; From e97d52bad5733eda71a2d5f1c78c9ecd57039906 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 6 Aug 2023 18:24:41 -0300 Subject: [PATCH 669/732] fix: Replace runSystemRebuild with rebootSystem --- .../api_maps/graphql_maps/server_api/server_actions_api.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart index 131a6a6d..05269d33 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server_actions_api.dart @@ -24,11 +24,11 @@ mixin ServerActionsApi on GraphQLApiMap { DateTime? time; try { final GraphQLClient client = await getClient(); - final response = await client.mutate$RunSystemRebuild(); + final response = await client.mutate$RebootSystem(); if (response.hasException) { print(response.exception.toString()); } - if (response.parsedData!.runSystemRebuild.success) { + if (response.parsedData!.rebootSystem.success) { time = DateTime.now(); } } catch (e) { From 4f8f87f8a87058db1316c67ceeef4486ff77e708 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 6 Aug 2023 20:28:02 -0300 Subject: [PATCH 670/732] feat: Include volume cost to overall monthly cost per server --- assets/translations/en.json | 3 +- assets/translations/ru.json | 3 +- .../digital_ocean/digital_ocean_api.dart | 4 +- .../server_providers/hetzner/hetzner_api.dart | 4 +- .../provider_volume_cubit.dart | 8 +- .../server_installation_cubit.dart | 4 + .../models/launch_installation_data.dart | 3 + .../server_providers/digital_ocean.dart | 35 +- .../providers/server_providers/hetzner.dart | 43 +- .../server_providers/server_provider.dart | 2 +- .../setup/initializing/initializing.dart | 6 +- .../initializing/server_type_picker.dart | 395 ++++++++++-------- 12 files changed, 306 insertions(+), 204 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index f66df742..b68d17ea 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -341,6 +341,7 @@ "choose_server_type_ram": "{} GB of RAM", "choose_server_type_storage": "{} GB of system storage", "choose_server_type_payment_per_month": "{} per month", + "choose_server_type_per_month_description": "{} for server and {} for storage", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "dns_provider_bad_key_error": "API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", @@ -542,4 +543,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} +} \ No newline at end of file diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 738bceea..33f0c147 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -336,6 +336,7 @@ "choose_server_type_ram": "{} GB у RAM", "choose_server_type_storage": "{} GB системного хранилища", "choose_server_type_payment_per_month": "{} в месяц", + "choose_server_type_per_month_description": "{} за сервер и {} за хранилище", "no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...", "dns_provider_bad_key_error": "API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", @@ -538,4 +539,4 @@ "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", "ignore_tls": "Не проверять сертификаты TLS" } -} +} \ No newline at end of file diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index cebb568c..637aabb7 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -321,7 +321,7 @@ class DigitalOceanApi extends RestApiMap { ); } - Future> createVolume() async { + Future> createVolume(final int gb) async { DigitalOceanVolume? volume; Response? createVolumeResponse; final Dio client = await getClient(); @@ -331,7 +331,7 @@ class DigitalOceanApi extends RestApiMap { createVolumeResponse = await client.post( '/volumes', data: { - 'size_gigabytes': 10, + 'size_gigabytes': gb, 'name': 'volume${StringGenerators.storageName()}', 'labels': {'labelkey': 'value'}, 'region': region, diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 7fbf3dac..458ac7aa 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -382,7 +382,7 @@ class HetznerApi extends RestApiMap { ); } - Future> createVolume() async { + Future> createVolume(final int gb) async { Response? createVolumeResponse; HetznerVolume? volume; final Dio client = await getClient(); @@ -390,7 +390,7 @@ class HetznerApi extends RestApiMap { createVolumeResponse = await client.post( '/volumes', data: { - 'size': 10, + 'size': gb, 'name': StringGenerators.storageName(), 'labels': {'labelkey': 'value'}, 'location': region, diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index 46137c59..d7166b77 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -113,9 +113,11 @@ class ApiProviderVolumeCubit return true; } - Future createVolume() async { - final ServerVolume? volume = - (await ProvidersController.currentServerProvider!.createVolume()).data; + Future createVolume(final DiskSize size) async { + final ServerVolume? volume = (await ProvidersController + .currentServerProvider! + .createVolume(size.gibibyte.toInt())) + .data; final diskVolume = DiskVolume(providerVolume: volume); await attachVolume(diskVolume); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index c669cf75..60a9d0f5 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -6,6 +6,7 @@ import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; import 'package:selfprivacy/logic/api_maps/tls_options.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -32,6 +33,8 @@ class ServerInstallationCubit extends Cubit { Timer? timer; + final DiskSize initialStorage = DiskSize.fromGibibyte(10); + Future load() async { final ServerInstallationState state = await repository.load(); @@ -257,6 +260,7 @@ class ServerInstallationCubit extends Cubit { serverTypeId: state.serverTypeIdentificator!, errorCallback: clearAppConfig, successCallback: onCreateServerSuccess, + storageSize: initialStorage, ); final result = diff --git a/lib/logic/models/launch_installation_data.dart b/lib/logic/models/launch_installation_data.dart index c1f32ee6..00d89335 100644 --- a/lib/logic/models/launch_installation_data.dart +++ b/lib/logic/models/launch_installation_data.dart @@ -1,3 +1,4 @@ +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @@ -11,6 +12,7 @@ class LaunchInstallationData { required this.serverTypeId, required this.errorCallback, required this.successCallback, + required this.storageSize, }); final User rootUser; @@ -20,4 +22,5 @@ class LaunchInstallationData { final String serverTypeId; final Function() errorCallback; final Function(ServerHostingDetails details) successCallback; + final DiskSize storageSize; } diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index da246b18..62893a0e 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -254,7 +254,9 @@ class DigitalOceanServerProvider extends ServerProvider { try { final int dropletId = serverResult.data!; - final newVolume = (await createVolume()).data; + final newVolume = + (await createVolume(installationData.storageSize.gibibyte.toInt())) + .data; final bool attachedVolume = (await _adapter.api().attachVolume( newVolume!.name, dropletId, @@ -588,10 +590,10 @@ class DigitalOceanServerProvider extends ServerProvider { } @override - Future> createVolume() async { + Future> createVolume(final int gb) async { ServerVolume? volume; - final result = await _adapter.api().createVolume(); + final result = await _adapter.api().createVolume(gb); if (!result.success || result.data == null) { return GenericResult( @@ -708,13 +710,37 @@ class DigitalOceanServerProvider extends ServerProvider { message: result.message, ); } + final resultVolumes = await _adapter.api().getVolumes(); + if (resultVolumes.data.isEmpty || !resultVolumes.success) { + return GenericResult( + success: false, + data: metadata, + code: resultVolumes.code, + message: resultVolumes.message, + ); + } + final resultPricePerGb = await getPricePerGb(); + if (resultPricePerGb.data == null || !resultPricePerGb.success) { + return GenericResult( + success: false, + data: metadata, + code: resultPricePerGb.code, + message: resultPricePerGb.message, + ); + } final List servers = result.data; + final List volumes = resultVolumes.data; + final Price pricePerGb = resultPricePerGb.data!; try { final droplet = servers.firstWhere( (final server) => server['id'] == serverId, ); + final volume = volumes.firstWhere( + (final volume) => droplet['volume_ids'].contains(volume.id), + ); + metadata = [ ServerMetadataEntity( type: MetadataType.id, @@ -739,7 +765,8 @@ class DigitalOceanServerProvider extends ServerProvider { ServerMetadataEntity( type: MetadataType.cost, trId: 'server.monthly_cost', - value: '${droplet['size']['price_monthly']} ${currency.shortcode}', + value: + '${droplet['size']['price_monthly']} + ${(volume.sizeGigabytes * pricePerGb.value).toStringAsFixed(2)} ${currency.shortcode}', ), ServerMetadataEntity( type: MetadataType.location, diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index ec15801e..aae1e564 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -164,7 +164,9 @@ class HetznerServerProvider extends ServerProvider { Future> launchInstallation( final LaunchInstallationData installationData, ) async { - final volumeResult = await _adapter.api().createVolume(); + final volumeResult = await _adapter.api().createVolume( + installationData.storageSize.gibibyte.toInt(), + ); if (!volumeResult.success || volumeResult.data == null) { return GenericResult( @@ -614,10 +616,10 @@ class HetznerServerProvider extends ServerProvider { } @override - Future> createVolume() async { + Future> createVolume(final int gb) async { ServerVolume? volume; - final result = await _adapter.api().createVolume(); + final result = await _adapter.api().createVolume(gb); if (!result.success || result.data == null) { return GenericResult( @@ -702,22 +704,45 @@ class HetznerServerProvider extends ServerProvider { final int serverId, ) async { List metadata = []; - final result = await _adapter.api().getServers(); - if (result.data.isEmpty || !result.success) { + final resultServers = await _adapter.api().getServers(); + if (resultServers.data.isEmpty || !resultServers.success) { return GenericResult( success: false, data: metadata, - code: result.code, - message: result.message, + code: resultServers.code, + message: resultServers.message, + ); + } + final resultVolumes = await _adapter.api().getVolumes(); + if (resultVolumes.data.isEmpty || !resultVolumes.success) { + return GenericResult( + success: false, + data: metadata, + code: resultVolumes.code, + message: resultVolumes.message, + ); + } + final resultPricePerGb = await getPricePerGb(); + if (resultPricePerGb.data == null || !resultPricePerGb.success) { + return GenericResult( + success: false, + data: metadata, + code: resultPricePerGb.code, + message: resultPricePerGb.message, ); } - final List servers = result.data; + final List servers = resultServers.data; + final List volumes = resultVolumes.data; + final Price pricePerGb = resultPricePerGb.data!; try { final HetznerServerInfo server = servers.firstWhere( (final server) => server.id == serverId, ); + final HetznerVolume volume = volumes + .firstWhere((final volume) => server.volumes.contains(volume.id)); + metadata = [ ServerMetadataEntity( type: MetadataType.id, @@ -743,7 +768,7 @@ class HetznerServerProvider extends ServerProvider { type: MetadataType.cost, trId: 'server.monthly_cost', value: - '${server.serverType.prices[1].monthly.toStringAsFixed(2)} ${currency.shortcode}', + '${server.serverType.prices[1].monthly.toStringAsFixed(2)} + ${(volume.size * pricePerGb.value).toStringAsFixed(2)} ${currency.shortcode}', ), ServerMetadataEntity( type: MetadataType.location, diff --git a/lib/logic/providers/server_providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart index cfcf3f5e..2a1a8b08 100644 --- a/lib/logic/providers/server_providers/server_provider.dart +++ b/lib/logic/providers/server_providers/server_provider.dart @@ -101,7 +101,7 @@ abstract class ServerProvider { /// Tries to create an empty unattached [ServerVolume]. /// /// If success, returns this volume information. - Future> createVolume(); + Future> createVolume(final int gb); /// Tries to delete the requested accessible [ServerVolume]. Future> deleteVolume(final ServerVolume volume); diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index c74fa4a4..fb01df9c 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -3,6 +3,7 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; @@ -31,6 +32,7 @@ class InitializingPage extends StatelessWidget { @override Widget build(final BuildContext context) { final cubit = context.watch(); + final volumeCubit = context.read(); if (cubit.state is ServerInstallationRecovery) { return const RecoveryRouting(); @@ -39,7 +41,7 @@ class InitializingPage extends StatelessWidget { if (cubit.state is! ServerInstallationFinished) { actualInitializingPage = [ () => _stepServerProviderToken(cubit), - () => _stepServerType(cubit), + () => _stepServerType(cubit, volumeCubit), () => _stepDnsProviderToken(cubit), () => _stepBackblaze(cubit), () => _stepDomain(cubit), @@ -226,6 +228,7 @@ class InitializingPage extends StatelessWidget { Widget _stepServerType( final ServerInstallationCubit serverInstallationCubit, + final ApiProviderVolumeCubit apiProviderVolumeCubit, ) => BlocProvider( create: (final context) => @@ -233,6 +236,7 @@ class InitializingPage extends StatelessWidget { child: Builder( builder: (final context) => ServerTypePicker( serverInstallationCubit: serverInstallationCubit, + apiProviderVolumeCubit: apiProviderVolumeCubit, ), ), ); diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 6212bec3..950b0f4d 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -3,6 +3,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/illustrations/stray_deer.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; +import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; +import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; @@ -12,10 +14,12 @@ import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; class ServerTypePicker extends StatefulWidget { const ServerTypePicker({ required this.serverInstallationCubit, + required this.apiProviderVolumeCubit, super.key, }); final ServerInstallationCubit serverInstallationCubit; + final ApiProviderVolumeCubit apiProviderVolumeCubit; @override State createState() => _ServerTypePickerState(); @@ -43,6 +47,7 @@ class _ServerTypePickerState extends State { return SelectTypePage( location: serverProviderLocation!, serverInstallationCubit: widget.serverInstallationCubit, + apiProviderVolumeCubit: widget.apiProviderVolumeCubit, backToLocationPickingCallback: () { setServerProviderLocation(null); }, @@ -145,202 +150,232 @@ class SelectTypePage extends StatelessWidget { required this.backToLocationPickingCallback, required this.location, required this.serverInstallationCubit, + required this.apiProviderVolumeCubit, super.key, }); final ServerProviderLocation location; final ServerInstallationCubit serverInstallationCubit; + final ApiProviderVolumeCubit apiProviderVolumeCubit; final Function backToLocationPickingCallback; @override - Widget build(final BuildContext context) => FutureBuilder( - future: serverInstallationCubit.fetchAvailableTypesByLocation(location), - builder: ( - final BuildContext context, - final AsyncSnapshot snapshot, - ) { - if (snapshot.hasData) { - if ((snapshot.data as List).isEmpty) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.locations_not_found'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.locations_not_found_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - LayoutBuilder( - builder: (final context, final constraints) => CustomPaint( - size: Size( - constraints.maxWidth, - (constraints.maxWidth * 1).toDouble(), - ), - painter: StrayDeerPainter( - colorScheme: Theme.of(context).colorScheme, - colorPalette: context - .read() - .state - .corePaletteOrDefault, - ), + Widget build(final BuildContext context) { + final Future> serverTypes = + serverInstallationCubit.fetchAvailableTypesByLocation(location); + final Future pricePerGb = apiProviderVolumeCubit.getPricePerGb(); + return FutureBuilder( + future: Future.wait([ + serverTypes, + pricePerGb, + ]), + builder: ( + final BuildContext context, + final AsyncSnapshot> snapshot, + ) { + if (snapshot.hasData) { + if ((snapshot.data![0] as List).isEmpty || + (snapshot.data![1] as Price?) == null) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.locations_not_found'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.locations_not_found_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + LayoutBuilder( + builder: (final context, final constraints) => CustomPaint( + size: Size( + constraints.maxWidth, + (constraints.maxWidth * 1).toDouble(), + ), + painter: StrayDeerPainter( + colorScheme: Theme.of(context).colorScheme, + colorPalette: context + .read() + .state + .corePaletteOrDefault, ), ), - const SizedBox(height: 16), - BrandButton.rised( - onPressed: () { - backToLocationPickingCallback(); - }, - text: 'initializing.back_to_locations'.tr(), - ), - ], - ); - } - return ResponsiveLayoutWithInfobox( - topChild: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.choose_server_type'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.choose_server_type_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - primaryColumn: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ...(snapshot.data! as List).map( - (final type) => Column( - children: [ - SizedBox( - width: double.infinity, - child: InkWell( - onTap: () { - serverInstallationCubit.setServerType(type); - }, - child: Card( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - type.title, - style: Theme.of(context) - .textTheme - .titleMedium, - ), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.memory_outlined, - color: Theme.of(context) - .colorScheme - .onSurface, + ), + const SizedBox(height: 16), + BrandButton.rised( + onPressed: () { + backToLocationPickingCallback(); + }, + text: 'initializing.back_to_locations'.tr(), + ), + ], + ); + } + return ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'initializing.choose_server_type'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + 'initializing.choose_server_type_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...(snapshot.data![0] as List).map( + (final type) => Column( + children: [ + SizedBox( + width: double.infinity, + child: InkWell( + onTap: () { + serverInstallationCubit.setServerType(type); + }, + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + type.title, + style: + Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.memory_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'server.core_count'.plural(type.cores), + style: Theme.of(context) + .textTheme + .bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.memory_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_ram' + .tr(args: [type.ram.toString()]), + style: Theme.of(context) + .textTheme + .bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.sd_card_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_storage' + .tr( + args: [type.disk.gibibyte.toString()], ), - const SizedBox(width: 8), - Text( - 'server.core_count' - .plural(type.cores), - style: Theme.of(context) - .textTheme - .bodyMedium, + style: Theme.of(context) + .textTheme + .bodyMedium, + ), + ], + ), + const SizedBox(height: 8), + const Divider(height: 8), + const SizedBox(height: 8), + Row( + children: [ + Icon( + Icons.payments_outlined, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_payment_per_month' + .tr( + args: [ + '${type.price.value + (serverInstallationCubit.initialStorage.gibibyte * (snapshot.data![1] as Price).value)} ${type.price.currency.shortcode}' + ], ), - ], - ), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.memory_outlined, - color: Theme.of(context) - .colorScheme - .onSurface, + style: Theme.of(context) + .textTheme + .bodyLarge, + ), + ], + ), + Row( + children: [ + Icon( + Icons.info_outline, + color: Theme.of(context) + .colorScheme + .onSurface, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_per_month_description' + .tr( + args: [ + type.price.value.toString(), + '${serverInstallationCubit.initialStorage.gibibyte * (snapshot.data![1] as Price).value}', + ], ), - const SizedBox(width: 8), - Text( - 'initializing.choose_server_type_ram' - .tr(args: [type.ram.toString()]), - style: Theme.of(context) - .textTheme - .bodyMedium, - ), - ], - ), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.sd_card_outlined, - color: Theme.of(context) - .colorScheme - .onSurface, - ), - const SizedBox(width: 8), - Text( - 'initializing.choose_server_type_storage' - .tr( - args: [ - type.disk.gibibyte.toString() - ], - ), - style: Theme.of(context) - .textTheme - .bodyMedium, - ), - ], - ), - const SizedBox(height: 8), - const Divider(height: 8), - const SizedBox(height: 8), - Row( - children: [ - Icon( - Icons.payments_outlined, - color: Theme.of(context) - .colorScheme - .onSurface, - ), - const SizedBox(width: 8), - Text( - 'initializing.choose_server_type_payment_per_month' - .tr( - args: [ - '${type.price.value.toString()} ${type.price.currency.shortcode}' - ], - ), - style: Theme.of(context) - .textTheme - .bodyLarge, - ), - ], - ), - ], - ), + style: Theme.of(context) + .textTheme + .bodyLarge, + ), + ], + ), + ], ), ), ), ), - const SizedBox(height: 8), - ], - ), + ), + const SizedBox(height: 8), + ], ), - ], - ), - secondaryColumn: - InfoBox(text: 'initializing.choose_server_type_notice'.tr()), - ); - } else { - return const Center(child: CircularProgressIndicator()); - } - }, - ); + ), + ], + ), + secondaryColumn: + InfoBox(text: 'initializing.choose_server_type_notice'.tr()), + ); + } else { + return const Center(child: CircularProgressIndicator()); + } + }, + ); + } } From 4b1c85c4a8c6ee5eedf4708b63aefc30fd935294 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sun, 6 Aug 2023 20:32:05 -0300 Subject: [PATCH 671/732] chore: Add missing trailing commas to encryption key modal page --- .../backups/copy_encryption_key_modal.dart | 96 ++++++++++--------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart index aff629f7..42bc1ba9 100644 --- a/lib/ui/pages/backups/copy_encryption_key_modal.dart +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -52,57 +52,59 @@ class _CopyEncryptionKeyModalState extends State { ), const SizedBox(height: 8), Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - color: Theme.of(context).colorScheme.surfaceVariant, - ), - padding: const EdgeInsets.all(16), - child: Stack( - children: [ - SelectableText( - encryptionKey, - style: Theme.of(context).textTheme.titleMedium?.copyWith( - color: Theme.of(context).colorScheme.onSurfaceVariant, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: Theme.of(context).colorScheme.surfaceVariant, + ), + padding: const EdgeInsets.all(16), + child: Stack( + children: [ + SelectableText( + encryptionKey, + style: Theme.of(context).textTheme.titleMedium?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + Positioned.fill( + child: InkWell( + onTap: () { + setState( + () { + isKeyVisible = !isKeyVisible; + }, + ); + }, + child: AnimatedOpacity( + duration: const Duration(milliseconds: 200), + opacity: isKeyVisible ? 0 : 1, + child: Container( + color: Theme.of(context).colorScheme.surfaceVariant, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.visibility_outlined), + const SizedBox(width: 8), + Text( + 'backup.backups_encryption_key_show'.tr(), + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: Theme.of(context) + .colorScheme + .onSurfaceVariant, + ), + ), + ], ), - ), - Positioned.fill( - child: InkWell( - onTap: () { - setState( - () { - isKeyVisible = !isKeyVisible; - }, - ); - }, - child: AnimatedOpacity( - duration: const Duration(milliseconds: 200), - opacity: isKeyVisible ? 0 : 1, - child: Container( - color: Theme.of(context).colorScheme.surfaceVariant, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Icon(Icons.visibility_outlined), - const SizedBox(width: 8), - Text( - 'backup.backups_encryption_key_show'.tr(), - style: Theme.of(context) - .textTheme - .bodyMedium - ?.copyWith( - color: Theme.of(context) - .colorScheme - .onSurfaceVariant, - ), - ), - ], - )), ), ), ), - ], - )), + ), + ], + ), + ), const SizedBox(height: 8), FilledButton.icon( onPressed: () { From 719a5a7274a78e832a91f705de8907cd29cb32c2 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 7 Aug 2023 04:08:54 -0300 Subject: [PATCH 672/732] fix(hetzner): Normalize CPU usage percentage by cached amount of cores --- .../providers/server_providers/hetzner.dart | 52 +++++++++++++++++-- .../server_details/charts/cpu_chart.dart | 6 +-- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index ec15801e..fb32dc12 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -46,6 +46,7 @@ class HetznerServerProvider extends ServerProvider { ApiAdapter _adapter; final Currency currency = Currency.fromType(CurrencyType.eur); + int? cachedCoreAmount; @override ServerProviderType get type => ServerProviderType.hetzner; @@ -287,6 +288,8 @@ class HetznerServerProvider extends ServerProvider { provider: ServerProviderType.hetzner, ); + cachedCoreAmount = serverResult.data!.serverType.cores; + final createDnsResult = await _adapter.api().createReverseDns( serverId: serverDetails.id, ip4: serverDetails.ip4, @@ -775,7 +778,7 @@ class HetznerServerProvider extends ServerProvider { ) async { ServerMetrics? metrics; - List serializeTimeSeries( + List serializeTimeNetworkSeries( final Map json, final String type, ) { @@ -785,6 +788,47 @@ class HetznerServerProvider extends ServerProvider { .toList(); } + if (cachedCoreAmount == null) { + final serversResult = await _adapter.api().getServers(); + if (serversResult.data.isEmpty || !serversResult.success) { + return GenericResult( + success: false, + data: metrics, + code: serversResult.code, + message: serversResult.message, + ); + } + + for (final server in serversResult.data) { + if (server.id == serverId) { + cachedCoreAmount = server.serverType.cores; + } + } + + if (cachedCoreAmount == null) { + return GenericResult( + success: false, + data: metrics, + message: "Couldn't find active server to cache core amount", + ); + } + } + + List serializeTimeCpuSeries( + final Map json, + final String type, + ) { + final List list = json['time_series'][type]['values']; + return list + .map( + (final el) => TimeSeriesData( + el[0], + double.parse(el[1]) / cachedCoreAmount!, + ), + ) + .toList(); + } + final cpuResult = await _adapter.api().getMetrics( serverId, start, @@ -818,15 +862,15 @@ class HetznerServerProvider extends ServerProvider { } metrics = ServerMetrics( - cpu: serializeTimeSeries( + cpu: serializeTimeCpuSeries( cpuResult.data, 'cpu', ), - bandwidthIn: serializeTimeSeries( + bandwidthIn: serializeTimeNetworkSeries( netResult.data, 'network.0.bandwidth.in', ), - bandwidthOut: serializeTimeSeries( + bandwidthOut: serializeTimeNetworkSeries( netResult.data, 'network.0.bandwidth.out', ), diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart index 2ec349a0..a11361d4 100644 --- a/lib/ui/pages/server_details/charts/cpu_chart.dart +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -1,5 +1,3 @@ -import 'dart:math'; - import 'package:flutter/material.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; @@ -85,9 +83,7 @@ class CpuChart extends StatelessWidget { ], minY: 0, // Maximal value of data by 100 step - maxY: - ((data.map((final e) => e.value).reduce(max) - 1) / 100).ceil() * - 100.0, + maxY: 100, minX: 0, titlesData: FlTitlesData( topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), From 037498070a611c9ba91ddc06778c89f8bb3c5978 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 7 Aug 2023 07:51:47 -0300 Subject: [PATCH 673/732] fix: Include IPv4 cost to overall server cost --- assets/translations/en.json | 5 +- assets/translations/ru.json | 5 +- .../server_providers/hetzner/hetzner_api.dart | 25 +++++-- .../provider_volume_cubit.dart | 13 +++- .../server_installation_cubit.dart | 22 +++++- .../models/json/hetzner_server_info.dart | 19 +++++ lib/logic/models/price.dart | 9 +++ .../server_providers/digital_ocean.dart | 22 ++++-- .../providers/server_providers/hetzner.dart | 31 +++++--- .../server_providers/server_provider.dart | 6 +- .../server_storage/extending_volume.dart | 1 + .../setup/initializing/initializing.dart | 6 +- .../initializing/server_type_picker.dart | 73 ++++++++++--------- 13 files changed, 165 insertions(+), 72 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index b68d17ea..a8669cb1 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -125,6 +125,7 @@ "monthly_cost": "Monthly cost", "location": "Location", "provider": "Provider", + "pricing_error": "Couldn't fetch provider prices", "core_count": { "one": "{} core", "two": "{} cores", @@ -341,7 +342,9 @@ "choose_server_type_ram": "{} GB of RAM", "choose_server_type_storage": "{} GB of system storage", "choose_server_type_payment_per_month": "{} per month", - "choose_server_type_per_month_description": "{} for server and {} for storage", + "choose_server_type_payment_server": "{} for server", + "choose_server_type_payment_storage": "{} for additional storage", + "choose_server_type_payment_ip": "{} for public IPv4", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "dns_provider_bad_key_error": "API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 33f0c147..81ba4a61 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -125,6 +125,7 @@ "monthly_cost": "Ежемесячная стоимость", "location": "Размещение", "provider": "Провайдер", + "pricing_error": "Не удалось получить цены провайдера", "core_count": { "one": "{} ядро", "two": "{} ядра", @@ -336,7 +337,9 @@ "choose_server_type_ram": "{} GB у RAM", "choose_server_type_storage": "{} GB системного хранилища", "choose_server_type_payment_per_month": "{} в месяц", - "choose_server_type_per_month_description": "{} за сервер и {} за хранилище", + "choose_server_type_payment_server": "{} за сам сервер", + "choose_server_type_payment_storage": "{} за расширяемое хранилище", + "choose_server_type_payment_ip": "{} за публичный IPv4", "no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...", "dns_provider_bad_key_error": "API ключ неверен", "backblaze_bad_key_error": "Информация о Backblaze хранилище неверна", diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart index 458ac7aa..2631550e 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner_api.dart @@ -321,8 +321,8 @@ class HetznerApi extends RestApiMap { return GenericResult(success: true, data: null); } - Future> getPricePerGb() async { - double? price; + Future> getPricing() async { + HetznerPricing? pricing; final Response pricingResponse; final Dio client = await getClient(); @@ -331,19 +331,34 @@ class HetznerApi extends RestApiMap { final volume = pricingResponse.data['pricing']['volume']; final volumePrice = volume['price_per_gb_month']['gross']; - price = double.parse(volumePrice); + final primaryIps = pricingResponse.data['pricing']['primary_ips']; + String? ipPrice; + for (final primaryIp in primaryIps) { + if (primaryIp['type'] == 'ipv4') { + for (final primaryIpPrice in primaryIp['prices']) { + if (primaryIpPrice['location'] == region!) { + ipPrice = primaryIpPrice['price_monthly']['gross']; + } + } + } + } + pricing = HetznerPricing( + region!, + double.parse(volumePrice), + double.parse(ipPrice!), + ); } catch (e) { print(e); return GenericResult( success: false, - data: price, + data: pricing, message: e.toString(), ); } finally { client.close(); } - return GenericResult(success: true, data: price); + return GenericResult(success: true, data: pricing); } Future>> getVolumes({ diff --git a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart index d7166b77..fed7b083 100644 --- a/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart +++ b/lib/logic/cubit/provider_volumes/provider_volume_cubit.dart @@ -26,8 +26,17 @@ class ApiProviderVolumeCubit } } - Future getPricePerGb() async => - (await ProvidersController.currentServerProvider!.getPricePerGb()).data; + Future getPricePerGb() async { + Price? price; + final pricingResult = + await ProvidersController.currentServerProvider!.getAdditionalPricing(); + if (pricingResult.data == null || !pricingResult.success) { + getIt().showSnackBar('server.pricing_error'.tr()); + return price; + } + price = pricingResult.data!.perVolumeGb; + return price; + } Future refresh() async { emit(const ApiProviderVolumeState([], LoadingStatus.refreshing, false)); diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 60a9d0f5..fe4449e7 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -14,6 +14,7 @@ import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/launch_installation_data.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_repository.dart'; +import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -150,6 +151,19 @@ class ServerInstallationCubit extends Cubit { return apiResult.data; } + Future fetchAvailableAdditionalPricing() async { + AdditionalPricing? prices; + final pricingResult = + await ProvidersController.currentServerProvider!.getAdditionalPricing(); + if (pricingResult.data == null || !pricingResult.success) { + getIt().showSnackBar('server.pricing_error'.tr()); + return prices; + } + + prices = pricingResult.data; + return prices; + } + void setServerProviderKey(final String serverProviderKey) async { await repository.saveServerProviderKey(serverProviderKey); @@ -170,12 +184,14 @@ class ServerInstallationCubit extends Cubit { ); } + Future setLocationIdentifier(final String locationId) async { + await ProvidersController.currentServerProvider! + .trySetServerLocation(locationId); + } + void setServerType(final ServerType serverType) async { await repository.saveServerType(serverType); - await ProvidersController.currentServerProvider! - .trySetServerLocation(serverType.location.identifier); - emit( (state as ServerInstallationNotFinished).copyWith( serverTypeIdentificator: serverType.identifier, diff --git a/lib/logic/models/json/hetzner_server_info.dart b/lib/logic/models/json/hetzner_server_info.dart index ece29de0..6d51f2b8 100644 --- a/lib/logic/models/json/hetzner_server_info.dart +++ b/lib/logic/models/json/hetzner_server_info.dart @@ -190,3 +190,22 @@ class HetznerVolume { static HetznerVolume fromJson(final Map json) => _$HetznerVolumeFromJson(json); } + +/// Prices for Hetzner resources in Euro (monthly). +/// https://docs.hetzner.cloud/#pricing +class HetznerPricing { + HetznerPricing( + this.region, + this.perVolumeGb, + this.perPublicIpv4, + ); + + /// Region name to which current price listing applies + final String region; + + /// The cost of Volume per GB/month + final double perVolumeGb; + + /// Costs of Primary IP type + final double perPublicIpv4; +} diff --git a/lib/logic/models/price.dart b/lib/logic/models/price.dart index b60cf5bf..494b1511 100644 --- a/lib/logic/models/price.dart +++ b/lib/logic/models/price.dart @@ -53,3 +53,12 @@ class Currency { final String? fontcode; final String? symbol; } + +class AdditionalPricing { + AdditionalPricing({ + required this.perVolumeGb, + required this.perPublicIpv4, + }); + final Price perVolumeGb; + final Price perPublicIpv4; +} diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 62893a0e..db770b42 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -529,14 +529,20 @@ class DigitalOceanServerProvider extends ServerProvider { ); } - /// Hardcoded on their documentation and there is no pricing API at all - /// Probably we should scrap the doc page manually @override - Future> getPricePerGb() async => GenericResult( + Future> getAdditionalPricing() async => + GenericResult( success: true, - data: Price( - value: 0.10, - currency: currency, + data: AdditionalPricing( + perVolumeGb: Price( + /// Hardcoded in their documentation and there is no pricing API + value: 0.10, + currency: currency, + ), + perPublicIpv4: Price( + value: 0, + currency: currency, + ), ), ); @@ -719,7 +725,7 @@ class DigitalOceanServerProvider extends ServerProvider { message: resultVolumes.message, ); } - final resultPricePerGb = await getPricePerGb(); + final resultPricePerGb = await getAdditionalPricing(); if (resultPricePerGb.data == null || !resultPricePerGb.success) { return GenericResult( success: false, @@ -731,8 +737,8 @@ class DigitalOceanServerProvider extends ServerProvider { final List servers = result.data; final List volumes = resultVolumes.data; - final Price pricePerGb = resultPricePerGb.data!; try { + final Price pricePerGb = resultPricePerGb.data!.perVolumeGb; final droplet = servers.firstWhere( (final server) => server['id'] == serverId, ); diff --git a/lib/logic/providers/server_providers/hetzner.dart b/lib/logic/providers/server_providers/hetzner.dart index aae1e564..aef446a3 100644 --- a/lib/logic/providers/server_providers/hetzner.dart +++ b/lib/logic/providers/server_providers/hetzner.dart @@ -545,8 +545,8 @@ class HetznerServerProvider extends ServerProvider { } @override - Future> getPricePerGb() async { - final result = await _adapter.api().getPricePerGb(); + Future> getAdditionalPricing() async { + final result = await _adapter.api().getPricing(); if (!result.success || result.data == null) { return GenericResult( @@ -559,9 +559,15 @@ class HetznerServerProvider extends ServerProvider { return GenericResult( success: true, - data: Price( - value: result.data!, - currency: currency, + data: AdditionalPricing( + perVolumeGb: Price( + value: result.data!.perVolumeGb, + currency: currency, + ), + perPublicIpv4: Price( + value: result.data!.perPublicIpv4, + currency: currency, + ), ), ); } @@ -722,7 +728,7 @@ class HetznerServerProvider extends ServerProvider { message: resultVolumes.message, ); } - final resultPricePerGb = await getPricePerGb(); + final resultPricePerGb = await getAdditionalPricing(); if (resultPricePerGb.data == null || !resultPricePerGb.success) { return GenericResult( success: false, @@ -734,14 +740,16 @@ class HetznerServerProvider extends ServerProvider { final List servers = resultServers.data; final List volumes = resultVolumes.data; - final Price pricePerGb = resultPricePerGb.data!; + try { + final Price pricePerGb = resultPricePerGb.data!.perVolumeGb; + final Price pricePerIp = resultPricePerGb.data!.perPublicIpv4; final HetznerServerInfo server = servers.firstWhere( (final server) => server.id == serverId, ); - - final HetznerVolume volume = volumes - .firstWhere((final volume) => server.volumes.contains(volume.id)); + final HetznerVolume volume = volumes.firstWhere( + (final volume) => server.volumes.contains(volume.id), + ); metadata = [ ServerMetadataEntity( @@ -768,7 +776,8 @@ class HetznerServerProvider extends ServerProvider { type: MetadataType.cost, trId: 'server.monthly_cost', value: - '${server.serverType.prices[1].monthly.toStringAsFixed(2)} + ${(volume.size * pricePerGb.value).toStringAsFixed(2)} ${currency.shortcode}', + // TODO: Make more descriptive + '${server.serverType.prices[1].monthly.toStringAsFixed(2)} + ${(volume.size * pricePerGb.value).toStringAsFixed(2)} + ${pricePerIp.value.toStringAsFixed(2)} ${currency.shortcode}', ), ServerMetadataEntity( type: MetadataType.location, diff --git a/lib/logic/providers/server_providers/server_provider.dart b/lib/logic/providers/server_providers/server_provider.dart index 2a1a8b08..ce7b6944 100644 --- a/lib/logic/providers/server_providers/server_provider.dart +++ b/lib/logic/providers/server_providers/server_provider.dart @@ -90,9 +90,9 @@ abstract class ServerProvider { /// answered the request. Future> restart(final int serverId); - /// Returns [Price] information per one gigabyte of storage extension for - /// the requested accessible machine. - Future> getPricePerGb(); + /// Returns [Price] information map of all additional resources, excluding + /// main server type pricing + Future> getAdditionalPricing(); /// Returns [ServerVolume] of all available volumes /// assigned to the authorized user and attached to active machine. diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 39872494..752a6281 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -45,6 +45,7 @@ class _ExtendingVolumePageState extends State { late double _currentSliderGbValue; double _pricePerGb = 1.0; + // TODO: Wtfff hardcode?!?!? final DiskSize maxSize = const DiskSize(byte: 500000000000); late DiskSize minSize; diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index fb01df9c..c74fa4a4 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -3,7 +3,6 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/server_provider_form_cubit.dart'; -import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart'; @@ -32,7 +31,6 @@ class InitializingPage extends StatelessWidget { @override Widget build(final BuildContext context) { final cubit = context.watch(); - final volumeCubit = context.read(); if (cubit.state is ServerInstallationRecovery) { return const RecoveryRouting(); @@ -41,7 +39,7 @@ class InitializingPage extends StatelessWidget { if (cubit.state is! ServerInstallationFinished) { actualInitializingPage = [ () => _stepServerProviderToken(cubit), - () => _stepServerType(cubit, volumeCubit), + () => _stepServerType(cubit), () => _stepDnsProviderToken(cubit), () => _stepBackblaze(cubit), () => _stepDomain(cubit), @@ -228,7 +226,6 @@ class InitializingPage extends StatelessWidget { Widget _stepServerType( final ServerInstallationCubit serverInstallationCubit, - final ApiProviderVolumeCubit apiProviderVolumeCubit, ) => BlocProvider( create: (final context) => @@ -236,7 +233,6 @@ class InitializingPage extends StatelessWidget { child: Builder( builder: (final context) => ServerTypePicker( serverInstallationCubit: serverInstallationCubit, - apiProviderVolumeCubit: apiProviderVolumeCubit, ), ), ); diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 950b0f4d..cb9b496a 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/illustrations/stray_deer.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; -import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; @@ -14,12 +13,10 @@ import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; class ServerTypePicker extends StatefulWidget { const ServerTypePicker({ required this.serverInstallationCubit, - required this.apiProviderVolumeCubit, super.key, }); final ServerInstallationCubit serverInstallationCubit; - final ApiProviderVolumeCubit apiProviderVolumeCubit; @override State createState() => _ServerTypePickerState(); @@ -29,7 +26,12 @@ class _ServerTypePickerState extends State { ServerProviderLocation? serverProviderLocation; ServerType? serverType; - void setServerProviderLocation(final ServerProviderLocation? location) { + void setServerProviderLocation(final ServerProviderLocation? location) async { + if (location != null) { + await widget.serverInstallationCubit.setLocationIdentifier( + location.identifier, + ); + } setState(() { serverProviderLocation = location; }); @@ -47,7 +49,6 @@ class _ServerTypePickerState extends State { return SelectTypePage( location: serverProviderLocation!, serverInstallationCubit: widget.serverInstallationCubit, - apiProviderVolumeCubit: widget.apiProviderVolumeCubit, backToLocationPickingCallback: () { setServerProviderLocation(null); }, @@ -150,24 +151,23 @@ class SelectTypePage extends StatelessWidget { required this.backToLocationPickingCallback, required this.location, required this.serverInstallationCubit, - required this.apiProviderVolumeCubit, super.key, }); final ServerProviderLocation location; final ServerInstallationCubit serverInstallationCubit; - final ApiProviderVolumeCubit apiProviderVolumeCubit; final Function backToLocationPickingCallback; @override Widget build(final BuildContext context) { final Future> serverTypes = serverInstallationCubit.fetchAvailableTypesByLocation(location); - final Future pricePerGb = apiProviderVolumeCubit.getPricePerGb(); + final Future prices = + serverInstallationCubit.fetchAvailableAdditionalPricing(); return FutureBuilder( future: Future.wait([ serverTypes, - pricePerGb, + prices, ]), builder: ( final BuildContext context, @@ -175,7 +175,7 @@ class SelectTypePage extends StatelessWidget { ) { if (snapshot.hasData) { if ((snapshot.data![0] as List).isEmpty || - (snapshot.data![1] as Price?) == null) { + (snapshot.data![1] as AdditionalPricing?) == null) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -213,6 +213,10 @@ class SelectTypePage extends StatelessWidget { ], ); } + final prices = snapshot.data![1] as AdditionalPricing; + final storagePrice = serverInstallationCubit.initialStorage.gibibyte * + prices.perVolumeGb.value; + final publicIpPrice = prices.perPublicIpv4.value; return ResponsiveLayoutWithInfobox( topChild: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -325,7 +329,7 @@ class SelectTypePage extends StatelessWidget { 'initializing.choose_server_type_payment_per_month' .tr( args: [ - '${type.price.value + (serverInstallationCubit.initialStorage.gibibyte * (snapshot.data![1] as Price).value)} ${type.price.currency.shortcode}' + '${(type.price.value + storagePrice + publicIpPrice).toStringAsFixed(4)} ${type.price.currency.shortcode}' ], ), style: Theme.of(context) @@ -334,29 +338,32 @@ class SelectTypePage extends StatelessWidget { ), ], ), - Row( - children: [ - Icon( - Icons.info_outline, - color: Theme.of(context) - .colorScheme - .onSurface, - ), - const SizedBox(width: 8), - Text( - 'initializing.choose_server_type_per_month_description' - .tr( - args: [ - type.price.value.toString(), - '${serverInstallationCubit.initialStorage.gibibyte * (snapshot.data![1] as Price).value}', - ], - ), - style: Theme.of(context) - .textTheme - .bodyLarge, - ), - ], + Text( + 'initializing.choose_server_type_payment_server' + .tr( + args: [type.price.value.toString()], + ), + style: + Theme.of(context).textTheme.bodyMedium, ), + Text( + 'initializing.choose_server_type_payment_storage' + .tr( + args: [storagePrice.toString()], + ), + style: + Theme.of(context).textTheme.bodyMedium, + ), + if (publicIpPrice != 0) + Text( + 'initializing.choose_server_type_payment_ip' + .tr( + args: [publicIpPrice.toString()], + ), + style: Theme.of(context) + .textTheme + .bodyMedium, + ), ], ), ), From dce33b2d4cd10bd6bc06f1ae127b603c21871578 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 7 Aug 2023 08:09:24 -0300 Subject: [PATCH 674/732] fix: Remove unuzed ZoneId member --- .../cubit/server_installation/server_installation_cubit.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index 29da1b05..a10532ef 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -542,7 +542,6 @@ class ServerInstallationCubit extends Cubit { ); final newServerDomain = ServerDomain( domainName: serverDomain.domainName, - zoneId: serverDomain.zoneId, provider: dnsProvider, ); await repository.saveServerDetails(newServerDetails); From 75b8a7b9ac1005df38f7886ddf1f837ebcab5ce4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 7 Aug 2023 09:23:48 -0300 Subject: [PATCH 675/732] feat(backups): Implement restore backup strategy --- .../graphql_maps/schema/backups.graphql | 4 +- .../graphql_maps/schema/backups.graphql.dart | 61 ++++++++++++++++--- .../graphql_maps/schema/schema.graphql | 8 ++- .../graphql_maps/schema/schema.graphql.dart | 24 ++++++++ .../graphql_maps/server_api/backups_api.dart | 7 ++- lib/logic/cubit/backups/backups_cubit.dart | 7 ++- lib/logic/models/backup.dart | 24 ++++++++ lib/ui/pages/backups/backup_details.dart | 7 ++- lib/ui/pages/backups/backups_list.dart | 5 +- 9 files changed, 129 insertions(+), 18 deletions(-) diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index fae80432..432678d0 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -81,9 +81,9 @@ mutation InitializeRepository($repository: InitializeRepositoryInput!) { } } -mutation RestoreBackup($snapshotId: String!) { +mutation RestoreBackup($snapshotId: String!, $strategy: RestoreStrategy! = DOWNLOAD_VERIFY_OVERWRITE) { backup { - restoreBackup(snapshotId: $snapshotId) { + restoreBackup(snapshotId: $snapshotId, strategy: $strategy) { ...basicMutationReturnFields job { ...basicApiJobsFields diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 428da3e4..72399c2c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -4982,9 +4982,13 @@ class _CopyWithStubImpl$Mutation$InitializeRepository$backup } class Variables$Mutation$RestoreBackup { - factory Variables$Mutation$RestoreBackup({required String snapshotId}) => + factory Variables$Mutation$RestoreBackup({ + required String snapshotId, + required Enum$RestoreStrategy strategy, + }) => Variables$Mutation$RestoreBackup._({ r'snapshotId': snapshotId, + r'strategy': strategy, }); Variables$Mutation$RestoreBackup._(this._$data); @@ -4993,16 +4997,23 @@ class Variables$Mutation$RestoreBackup { final result$data = {}; final l$snapshotId = data['snapshotId']; result$data['snapshotId'] = (l$snapshotId as String); + final l$strategy = data['strategy']; + result$data['strategy'] = + fromJson$Enum$RestoreStrategy((l$strategy as String)); return Variables$Mutation$RestoreBackup._(result$data); } Map _$data; String get snapshotId => (_$data['snapshotId'] as String); + Enum$RestoreStrategy get strategy => + (_$data['strategy'] as Enum$RestoreStrategy); Map toJson() { final result$data = {}; final l$snapshotId = snapshotId; result$data['snapshotId'] = l$snapshotId; + final l$strategy = strategy; + result$data['strategy'] = toJson$Enum$RestoreStrategy(l$strategy); return result$data; } @@ -5025,13 +5036,22 @@ class Variables$Mutation$RestoreBackup { if (l$snapshotId != lOther$snapshotId) { return false; } + final l$strategy = strategy; + final lOther$strategy = other.strategy; + if (l$strategy != lOther$strategy) { + return false; + } return true; } @override int get hashCode { final l$snapshotId = snapshotId; - return Object.hashAll([l$snapshotId]); + final l$strategy = strategy; + return Object.hashAll([ + l$snapshotId, + l$strategy, + ]); } } @@ -5044,7 +5064,10 @@ abstract class CopyWith$Variables$Mutation$RestoreBackup { factory CopyWith$Variables$Mutation$RestoreBackup.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RestoreBackup; - TRes call({String? snapshotId}); + TRes call({ + String? snapshotId, + Enum$RestoreStrategy? strategy, + }); } class _CopyWithImpl$Variables$Mutation$RestoreBackup @@ -5060,11 +5083,16 @@ class _CopyWithImpl$Variables$Mutation$RestoreBackup static const _undefined = {}; - TRes call({Object? snapshotId = _undefined}) => + TRes call({ + Object? snapshotId = _undefined, + Object? strategy = _undefined, + }) => _then(Variables$Mutation$RestoreBackup._({ ..._instance._$data, if (snapshotId != _undefined && snapshotId != null) 'snapshotId': (snapshotId as String), + if (strategy != _undefined && strategy != null) + 'strategy': (strategy as Enum$RestoreStrategy), })); } @@ -5074,7 +5102,11 @@ class _CopyWithStubImpl$Variables$Mutation$RestoreBackup TRes _res; - call({String? snapshotId}) => _res; + call({ + String? snapshotId, + Enum$RestoreStrategy? strategy, + }) => + _res; } class Mutation$RestoreBackup { @@ -5223,7 +5255,18 @@ const documentNodeMutationRestoreBackup = DocumentNode(definitions: [ ), defaultValue: DefaultValueNode(value: null), directives: [], - ) + ), + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'strategy')), + type: NamedTypeNode( + name: NameNode(value: 'RestoreStrategy'), + isNonNull: true, + ), + defaultValue: DefaultValueNode( + value: EnumValueNode( + name: NameNode(value: 'DOWNLOAD_VERIFY_OVERWRITE'))), + directives: [], + ), ], directives: [], selectionSet: SelectionSetNode(selections: [ @@ -5240,7 +5283,11 @@ const documentNodeMutationRestoreBackup = DocumentNode(definitions: [ ArgumentNode( name: NameNode(value: 'snapshotId'), value: VariableNode(name: NameNode(value: 'snapshotId')), - ) + ), + ArgumentNode( + name: NameNode(value: 'strategy'), + value: VariableNode(name: NameNode(value: 'strategy')), + ), ], directives: [], selectionSet: SelectionSetNode(selections: [ diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 1f57a51a..368c2b90 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -94,7 +94,8 @@ type BackupMutations { removeRepository: GenericBackupConfigReturn! setAutobackupPeriod(period: Int = null): GenericBackupConfigReturn! startBackup(serviceId: String!): GenericJobMutationReturn! - restoreBackup(snapshotId: String!): GenericJobMutationReturn! + restoreBackup(snapshotId: String!, strategy: RestoreStrategy! = DOWNLOAD_VERIFY_OVERWRITE): GenericJobMutationReturn! + forgetSnapshot(snapshotId: String!): GenericMutationReturn! forceSnapshotsReload: GenericMutationReturn! } @@ -241,6 +242,11 @@ input RecoveryKeyLimitsInput { uses: Int = null } +enum RestoreStrategy { + INPLACE + DOWNLOAD_VERIFY_OVERWRITE +} + enum ServerProvider { HETZNER DIGITALOCEAN diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index e92ecc5e..8a78a6f8 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -1338,6 +1338,30 @@ Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { } } +enum Enum$RestoreStrategy { INPLACE, DOWNLOAD_VERIFY_OVERWRITE, $unknown } + +String toJson$Enum$RestoreStrategy(Enum$RestoreStrategy e) { + switch (e) { + case Enum$RestoreStrategy.INPLACE: + return r'INPLACE'; + case Enum$RestoreStrategy.DOWNLOAD_VERIFY_OVERWRITE: + return r'DOWNLOAD_VERIFY_OVERWRITE'; + case Enum$RestoreStrategy.$unknown: + return r'$unknown'; + } +} + +Enum$RestoreStrategy fromJson$Enum$RestoreStrategy(String value) { + switch (value) { + case r'INPLACE': + return Enum$RestoreStrategy.INPLACE; + case r'DOWNLOAD_VERIFY_OVERWRITE': + return Enum$RestoreStrategy.DOWNLOAD_VERIFY_OVERWRITE; + default: + return Enum$RestoreStrategy.$unknown; + } +} + enum Enum$ServerProvider { HETZNER, DIGITALOCEAN, $unknown } String toJson$Enum$ServerProvider(Enum$ServerProvider e) { diff --git a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart index b652db03..3d629cb7 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart @@ -209,14 +209,17 @@ mixin BackupsApi on GraphQLApiMap { Future> restoreBackup( final String snapshotId, + final BackupRestoreStrategy strategy, ) async { QueryResult response; GenericResult? result; try { final GraphQLClient client = await getClient(); - final variables = - Variables$Mutation$RestoreBackup(snapshotId: snapshotId); + final variables = Variables$Mutation$RestoreBackup( + snapshotId: snapshotId, + strategy: strategy.toGraphQL, + ); final options = Options$Mutation$RestoreBackup(variables: variables); response = await client.mutate$RestoreBackup(options); if (response.hasException) { diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index ef3cec4d..300a898b 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -185,9 +185,12 @@ class BackupsCubit extends ServerInstallationDependendCubit { emit(state.copyWith(preventActions: false)); } - Future restoreBackup(final String backupId) async { + Future restoreBackup( + final String backupId, + final BackupRestoreStrategy strategy, + ) async { emit(state.copyWith(preventActions: true)); - await api.restoreBackup(backupId); + await api.restoreBackup(backupId, strategy); emit(state.copyWith(preventActions: false)); } diff --git a/lib/logic/models/backup.dart b/lib/logic/models/backup.dart index fda68375..2199e223 100644 --- a/lib/logic/models/backup.dart +++ b/lib/logic/models/backup.dart @@ -1,5 +1,6 @@ import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/backups.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; class Backup { @@ -58,3 +59,26 @@ class BackupConfiguration { final String? locationName; final BackupsProviderType provider; } + +enum BackupRestoreStrategy { + inplace, + downloadVerifyOverwrite, + unknown; + + factory BackupRestoreStrategy.fromGraphQL( + final Enum$RestoreStrategy strategy, + ) => + switch (strategy) { + Enum$RestoreStrategy.INPLACE => inplace, + Enum$RestoreStrategy.DOWNLOAD_VERIFY_OVERWRITE => + downloadVerifyOverwrite, + Enum$RestoreStrategy.$unknown => unknown, + }; + + Enum$RestoreStrategy get toGraphQL => switch (this) { + inplace => Enum$RestoreStrategy.INPLACE, + downloadVerifyOverwrite => + Enum$RestoreStrategy.DOWNLOAD_VERIFY_OVERWRITE, + unknown => Enum$RestoreStrategy.$unknown, + }; +} diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 44995577..00ca8df2 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -240,9 +240,10 @@ class BackupDetailsPage extends StatelessWidget { ), actionButtonTitle: 'modals.yes'.tr(), actionButtonOnPressed: () => { - context - .read() - .restoreBackup(backup.id) + context.read().restoreBackup( + backup.id, // TODO: inex + BackupRestoreStrategy.unknown, + ) }, ); }, diff --git a/lib/ui/pages/backups/backups_list.dart b/lib/ui/pages/backups/backups_list.dart index 5241693a..af652a9b 100644 --- a/lib/ui/pages/backups/backups_list.dart +++ b/lib/ui/pages/backups/backups_list.dart @@ -54,7 +54,10 @@ class BackupsListPage extends StatelessWidget { ), actionButtonTitle: 'modals.yes'.tr(), actionButtonOnPressed: () => { - context.read().restoreBackup(backup.id) + context.read().restoreBackup( + backup.id, // TODO: inex + BackupRestoreStrategy.unknown, + ) }, ); }, From 80b83980ce278536e32db989a886efdeb2bd1ee0 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 7 Aug 2023 09:44:26 -0300 Subject: [PATCH 676/732] feat(backup): Implement forget snapshot method --- assets/translations/en.json | 3 +- assets/translations/ru.json | 3 +- .../graphql_maps/schema/backups.graphql | 8 + .../graphql_maps/schema/backups.graphql.dart | 699 ++++++++++++++++++ .../graphql_maps/server_api/backups_api.dart | 38 + lib/logic/cubit/backups/backups_cubit.dart | 14 + 6 files changed, 763 insertions(+), 2 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 51c47263..a5f2d6e2 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -204,7 +204,8 @@ "backups_encryption_key_show": "Show the encryption key", "backups_encryption_key_description": "This key is used to encrypt your backups. If you lose it, you will not be able to restore your backups. Keep it in a safe place, as it will be useful if you ever need to restore from backups manually.", "pending_jobs": "Currently running backup jobs", - "snapshots_title": "Snapshot list" + "snapshots_title": "Snapshot list", + "forget_snapshot_error": "Couldn't forget snapshot" }, "storage": { "card_title": "Server Storage", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index fdc276cd..6cd1b00a 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -199,7 +199,8 @@ "autobackup_set_period": "Установить период", "autobackup_period_set": "Период установлен", "backups_encryption_key": "Ключ шифрования", - "snapshots_title": "Список снимков" + "snapshots_title": "Список снимков", + "forget_snapshot_error": "Не удалось забыть снимок" }, "storage": { "card_title": "Хранилище", diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index 432678d0..9b60564c 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -90,4 +90,12 @@ mutation RestoreBackup($snapshotId: String!, $strategy: RestoreStrategy! = DOWNL } } } +} + +mutation ForgetSnapshot($snapshotId: String!) { + backup { + forgetSnapshot(snapshotId: $snapshotId) { + ...basicMutationReturnFields + } + } } \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 72399c2c..7a814aac 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -5774,3 +5774,702 @@ class _CopyWithStubImpl$Mutation$RestoreBackup$backup$restoreBackup CopyWith$Fragment$basicApiJobsFields get job => CopyWith$Fragment$basicApiJobsFields.stub(_res); } + +class Variables$Mutation$ForgetSnapshot { + factory Variables$Mutation$ForgetSnapshot({required String snapshotId}) => + Variables$Mutation$ForgetSnapshot._({ + r'snapshotId': snapshotId, + }); + + Variables$Mutation$ForgetSnapshot._(this._$data); + + factory Variables$Mutation$ForgetSnapshot.fromJson( + Map data) { + final result$data = {}; + final l$snapshotId = data['snapshotId']; + result$data['snapshotId'] = (l$snapshotId as String); + return Variables$Mutation$ForgetSnapshot._(result$data); + } + + Map _$data; + + String get snapshotId => (_$data['snapshotId'] as String); + Map toJson() { + final result$data = {}; + final l$snapshotId = snapshotId; + result$data['snapshotId'] = l$snapshotId; + return result$data; + } + + CopyWith$Variables$Mutation$ForgetSnapshot + get copyWith => CopyWith$Variables$Mutation$ForgetSnapshot( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$ForgetSnapshot) || + runtimeType != other.runtimeType) { + return false; + } + final l$snapshotId = snapshotId; + final lOther$snapshotId = other.snapshotId; + if (l$snapshotId != lOther$snapshotId) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$snapshotId = snapshotId; + return Object.hashAll([l$snapshotId]); + } +} + +abstract class CopyWith$Variables$Mutation$ForgetSnapshot { + factory CopyWith$Variables$Mutation$ForgetSnapshot( + Variables$Mutation$ForgetSnapshot instance, + TRes Function(Variables$Mutation$ForgetSnapshot) then, + ) = _CopyWithImpl$Variables$Mutation$ForgetSnapshot; + + factory CopyWith$Variables$Mutation$ForgetSnapshot.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$ForgetSnapshot; + + TRes call({String? snapshotId}); +} + +class _CopyWithImpl$Variables$Mutation$ForgetSnapshot + implements CopyWith$Variables$Mutation$ForgetSnapshot { + _CopyWithImpl$Variables$Mutation$ForgetSnapshot( + this._instance, + this._then, + ); + + final Variables$Mutation$ForgetSnapshot _instance; + + final TRes Function(Variables$Mutation$ForgetSnapshot) _then; + + static const _undefined = {}; + + TRes call({Object? snapshotId = _undefined}) => + _then(Variables$Mutation$ForgetSnapshot._({ + ..._instance._$data, + if (snapshotId != _undefined && snapshotId != null) + 'snapshotId': (snapshotId as String), + })); +} + +class _CopyWithStubImpl$Variables$Mutation$ForgetSnapshot + implements CopyWith$Variables$Mutation$ForgetSnapshot { + _CopyWithStubImpl$Variables$Mutation$ForgetSnapshot(this._res); + + TRes _res; + + call({String? snapshotId}) => _res; +} + +class Mutation$ForgetSnapshot { + Mutation$ForgetSnapshot({ + required this.backup, + this.$__typename = 'Mutation', + }); + + factory Mutation$ForgetSnapshot.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Mutation$ForgetSnapshot( + backup: Mutation$ForgetSnapshot$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$ForgetSnapshot$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ForgetSnapshot) || + runtimeType != other.runtimeType) { + return false; + } + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$ForgetSnapshot on Mutation$ForgetSnapshot { + CopyWith$Mutation$ForgetSnapshot get copyWith => + CopyWith$Mutation$ForgetSnapshot( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$ForgetSnapshot { + factory CopyWith$Mutation$ForgetSnapshot( + Mutation$ForgetSnapshot instance, + TRes Function(Mutation$ForgetSnapshot) then, + ) = _CopyWithImpl$Mutation$ForgetSnapshot; + + factory CopyWith$Mutation$ForgetSnapshot.stub(TRes res) = + _CopyWithStubImpl$Mutation$ForgetSnapshot; + + TRes call({ + Mutation$ForgetSnapshot$backup? backup, + String? $__typename, + }); + CopyWith$Mutation$ForgetSnapshot$backup get backup; +} + +class _CopyWithImpl$Mutation$ForgetSnapshot + implements CopyWith$Mutation$ForgetSnapshot { + _CopyWithImpl$Mutation$ForgetSnapshot( + this._instance, + this._then, + ); + + final Mutation$ForgetSnapshot _instance; + + final TRes Function(Mutation$ForgetSnapshot) _then; + + static const _undefined = {}; + + TRes call({ + Object? backup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$ForgetSnapshot( + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$ForgetSnapshot$backup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$ForgetSnapshot$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$ForgetSnapshot$backup( + local$backup, (e) => call(backup: e)); + } +} + +class _CopyWithStubImpl$Mutation$ForgetSnapshot + implements CopyWith$Mutation$ForgetSnapshot { + _CopyWithStubImpl$Mutation$ForgetSnapshot(this._res); + + TRes _res; + + call({ + Mutation$ForgetSnapshot$backup? backup, + String? $__typename, + }) => + _res; + CopyWith$Mutation$ForgetSnapshot$backup get backup => + CopyWith$Mutation$ForgetSnapshot$backup.stub(_res); +} + +const documentNodeMutationForgetSnapshot = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'ForgetSnapshot'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'snapshotId')), + type: NamedTypeNode( + name: NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'backup'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'forgetSnapshot'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'snapshotId'), + value: VariableNode(name: NameNode(value: 'snapshotId')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$ForgetSnapshot _parserFn$Mutation$ForgetSnapshot( + Map data) => + Mutation$ForgetSnapshot.fromJson(data); +typedef OnMutationCompleted$Mutation$ForgetSnapshot = FutureOr Function( + Map?, + Mutation$ForgetSnapshot?, +); + +class Options$Mutation$ForgetSnapshot + extends graphql.MutationOptions { + Options$Mutation$ForgetSnapshot({ + String? operationName, + required Variables$Mutation$ForgetSnapshot variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$ForgetSnapshot? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ForgetSnapshot? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$ForgetSnapshot(data), + ), + update: update, + onError: onError, + document: documentNodeMutationForgetSnapshot, + parserFn: _parserFn$Mutation$ForgetSnapshot, + ); + + final OnMutationCompleted$Mutation$ForgetSnapshot? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$ForgetSnapshot + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ForgetSnapshot({ + String? operationName, + required Variables$Mutation$ForgetSnapshot variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$ForgetSnapshot? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationForgetSnapshot, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ForgetSnapshot, + ); +} + +extension ClientExtension$Mutation$ForgetSnapshot on graphql.GraphQLClient { + Future> mutate$ForgetSnapshot( + Options$Mutation$ForgetSnapshot options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$ForgetSnapshot( + WatchOptions$Mutation$ForgetSnapshot options) => + this.watchMutation(options); +} + +class Mutation$ForgetSnapshot$backup { + Mutation$ForgetSnapshot$backup({ + required this.forgetSnapshot, + this.$__typename = 'BackupMutations', + }); + + factory Mutation$ForgetSnapshot$backup.fromJson(Map json) { + final l$forgetSnapshot = json['forgetSnapshot']; + final l$$__typename = json['__typename']; + return Mutation$ForgetSnapshot$backup( + forgetSnapshot: Mutation$ForgetSnapshot$backup$forgetSnapshot.fromJson( + (l$forgetSnapshot as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$ForgetSnapshot$backup$forgetSnapshot forgetSnapshot; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$forgetSnapshot = forgetSnapshot; + _resultData['forgetSnapshot'] = l$forgetSnapshot.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$forgetSnapshot = forgetSnapshot; + final l$$__typename = $__typename; + return Object.hashAll([ + l$forgetSnapshot, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ForgetSnapshot$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$forgetSnapshot = forgetSnapshot; + final lOther$forgetSnapshot = other.forgetSnapshot; + if (l$forgetSnapshot != lOther$forgetSnapshot) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$ForgetSnapshot$backup + on Mutation$ForgetSnapshot$backup { + CopyWith$Mutation$ForgetSnapshot$backup + get copyWith => CopyWith$Mutation$ForgetSnapshot$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$ForgetSnapshot$backup { + factory CopyWith$Mutation$ForgetSnapshot$backup( + Mutation$ForgetSnapshot$backup instance, + TRes Function(Mutation$ForgetSnapshot$backup) then, + ) = _CopyWithImpl$Mutation$ForgetSnapshot$backup; + + factory CopyWith$Mutation$ForgetSnapshot$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$ForgetSnapshot$backup; + + TRes call({ + Mutation$ForgetSnapshot$backup$forgetSnapshot? forgetSnapshot, + String? $__typename, + }); + CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot + get forgetSnapshot; +} + +class _CopyWithImpl$Mutation$ForgetSnapshot$backup + implements CopyWith$Mutation$ForgetSnapshot$backup { + _CopyWithImpl$Mutation$ForgetSnapshot$backup( + this._instance, + this._then, + ); + + final Mutation$ForgetSnapshot$backup _instance; + + final TRes Function(Mutation$ForgetSnapshot$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? forgetSnapshot = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$ForgetSnapshot$backup( + forgetSnapshot: forgetSnapshot == _undefined || forgetSnapshot == null + ? _instance.forgetSnapshot + : (forgetSnapshot as Mutation$ForgetSnapshot$backup$forgetSnapshot), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot + get forgetSnapshot { + final local$forgetSnapshot = _instance.forgetSnapshot; + return CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot( + local$forgetSnapshot, (e) => call(forgetSnapshot: e)); + } +} + +class _CopyWithStubImpl$Mutation$ForgetSnapshot$backup + implements CopyWith$Mutation$ForgetSnapshot$backup { + _CopyWithStubImpl$Mutation$ForgetSnapshot$backup(this._res); + + TRes _res; + + call({ + Mutation$ForgetSnapshot$backup$forgetSnapshot? forgetSnapshot, + String? $__typename, + }) => + _res; + CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot + get forgetSnapshot => + CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot.stub(_res); +} + +class Mutation$ForgetSnapshot$backup$forgetSnapshot + implements Fragment$basicMutationReturnFields$$GenericMutationReturn { + Mutation$ForgetSnapshot$backup$forgetSnapshot({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericMutationReturn', + }); + + factory Mutation$ForgetSnapshot$backup$forgetSnapshot.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Mutation$ForgetSnapshot$backup$forgetSnapshot( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$ForgetSnapshot$backup$forgetSnapshot) || + runtimeType != other.runtimeType) { + return false; + } + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) { + return false; + } + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) { + return false; + } + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$ForgetSnapshot$backup$forgetSnapshot + on Mutation$ForgetSnapshot$backup$forgetSnapshot { + CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot< + Mutation$ForgetSnapshot$backup$forgetSnapshot> + get copyWith => CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot { + factory CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot( + Mutation$ForgetSnapshot$backup$forgetSnapshot instance, + TRes Function(Mutation$ForgetSnapshot$backup$forgetSnapshot) then, + ) = _CopyWithImpl$Mutation$ForgetSnapshot$backup$forgetSnapshot; + + factory CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot.stub( + TRes res) = + _CopyWithStubImpl$Mutation$ForgetSnapshot$backup$forgetSnapshot; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Mutation$ForgetSnapshot$backup$forgetSnapshot + implements CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot { + _CopyWithImpl$Mutation$ForgetSnapshot$backup$forgetSnapshot( + this._instance, + this._then, + ); + + final Mutation$ForgetSnapshot$backup$forgetSnapshot _instance; + + final TRes Function(Mutation$ForgetSnapshot$backup$forgetSnapshot) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$ForgetSnapshot$backup$forgetSnapshot( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Mutation$ForgetSnapshot$backup$forgetSnapshot + implements CopyWith$Mutation$ForgetSnapshot$backup$forgetSnapshot { + _CopyWithStubImpl$Mutation$ForgetSnapshot$backup$forgetSnapshot(this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} diff --git a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart index 3d629cb7..ed54bd53 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart @@ -248,4 +248,42 @@ mixin BackupsApi on GraphQLApiMap { return result; } + + Future> forgetSnapshot( + final String snapshotId, + ) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$ForgetSnapshot( + snapshotId: snapshotId, + ); + final options = Options$Mutation$ForgetSnapshot(variables: variables); + response = await client.mutate$ForgetSnapshot(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: response.parsedData!.backup.forgetSnapshot.success, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } } diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 300a898b..1d416033 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -214,6 +214,20 @@ class BackupsCubit extends ServerInstallationDependendCubit { await updateBackups(); } + // TODO: inex + Future forgetSnapshot(final String snapshotId) async { + final result = await api.forgetSnapshot(snapshotId); + if (!result.success) { + getIt().showSnackBar('jobs.generic_error'.tr()); + return; + } + + if (result.data == false) { + getIt() + .showSnackBar('backup.forget_snapshot_error'.tr()); + } + } + @override void clear() async { emit(const BackupsState()); From 4ef83fc6bdf2c1d258561480e2bd22799e72ab80 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 7 Aug 2023 10:07:54 -0300 Subject: [PATCH 677/732] chore(router): Generate new build runner object for router class --- lib/ui/router/router.gr.dart | 914 +++++++++++++++++------------------ 1 file changed, 457 insertions(+), 457 deletions(-) diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index 5bbd9c47..dfc41363 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -15,12 +15,127 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), + ); + }, + BackupDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const BackupDetailsPage(), + ); + }, + BackupsListRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: BackupsListPage( + service: args.service, + key: args.key, + ), + ); + }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), + ); + }, + ProvidersRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ProvidersPage(), + ); + }, + ServerDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ServerDetailsScreen(), + ); + }, + ServicesMigrationRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServicesMigrationPage( + services: args.services, + diskStatus: args.diskStatus, + isMigration: args.isMigration, + key: args.key, + ), + ); + }, + ExtendingVolumeRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ExtendingVolumePage( + diskVolumeToResize: args.diskVolumeToResize, + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + ServerStorageRoute.name: (routeData) { + final args = routeData.argsAs(); + return AutoRoutePage( + routeData: routeData, + child: ServerStoragePage( + diskStatus: args.diskStatus, + key: args.key, + ), + ); + }, + DevicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DevicesScreen(), + ); + }, RootRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, child: WrappedRoute(child: const RootPage()), ); }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + AppSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AppSettingsPage(), + ); + }, + DeveloperSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DeveloperSettingsPage(), + ); + }, + DnsDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DnsDetailsPage(), + ); + }, ServiceRoute.name: (routeData) { final args = routeData.argsAs(); return AutoRoutePage( @@ -37,12 +152,6 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, - ServerDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ServerDetailsScreen(), - ); - }, UsersRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -65,52 +174,10 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - AppSettingsRoute.name: (routeData) { + InitializingRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const AppSettingsPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - MoreRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const MorePage(), - ); - }, - AboutApplicationRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AboutApplicationPage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - ProvidersRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ProvidersPage(), - ); - }, - RecoveryKeyRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryKeyPage(), - ); - }, - DnsDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DnsDetailsPage(), + child: const InitializingPage(), ); }, RecoveryRoute.name: (routeData) { @@ -119,76 +186,260 @@ abstract class _$RootRouter extends RootStackRouter { child: const RecoveryRouting(), ); }, - InitializingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const InitializingPage(), - ); - }, - ServerStorageRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServerStoragePage( - diskStatus: args.diskStatus, - key: args.key, - ), - ); - }, - ExtendingVolumeRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ExtendingVolumePage( - diskVolumeToResize: args.diskVolumeToResize, - diskStatus: args.diskStatus, - key: args.key, - ), - ); - }, - ServicesMigrationRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ServicesMigrationPage( - services: args.services, - diskStatus: args.diskStatus, - isMigration: args.isMigration, - key: args.key, - ), - ); - }, - DevicesRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DevicesScreen(), - ); - }, - BackupsListRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: BackupsListPage( - service: args.service, - key: args.key, - ), - ); - }, - BackupDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const BackupDetailsPage(), - ); - }, - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), - ); - }, }; } +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) + : super( + BackupDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'BackupDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [BackupsListPage] +class BackupsListRoute extends PageRouteInfo { + BackupsListRoute({ + required Service? service, + Key? key, + List? children, + }) : super( + BackupsListRoute.name, + args: BackupsListRouteArgs( + service: service, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'BackupsListRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class BackupsListRouteArgs { + const BackupsListRouteArgs({ + required this.service, + this.key, + }); + + final Service? service; + + final Key? key; + + @override + String toString() { + return 'BackupsListRouteArgs{service: $service, key: $key}'; + } +} + +/// generated route for +/// [RecoveryKeyPage] +class RecoveryKeyRoute extends PageRouteInfo { + const RecoveryKeyRoute({List? children}) + : super( + RecoveryKeyRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryKeyRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ProvidersPage] +class ProvidersRoute extends PageRouteInfo { + const ProvidersRoute({List? children}) + : super( + ProvidersRoute.name, + initialChildren: children, + ); + + static const String name = 'ProvidersRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ServerDetailsScreen] +class ServerDetailsRoute extends PageRouteInfo { + const ServerDetailsRoute({List? children}) + : super( + ServerDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'ServerDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ServicesMigrationPage] +class ServicesMigrationRoute extends PageRouteInfo { + ServicesMigrationRoute({ + required List services, + required DiskStatus diskStatus, + required bool isMigration, + Key? key, + List? children, + }) : super( + ServicesMigrationRoute.name, + args: ServicesMigrationRouteArgs( + services: services, + diskStatus: diskStatus, + isMigration: isMigration, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'ServicesMigrationRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServicesMigrationRouteArgs { + const ServicesMigrationRouteArgs({ + required this.services, + required this.diskStatus, + required this.isMigration, + this.key, + }); + + final List services; + + final DiskStatus diskStatus; + + final bool isMigration; + + final Key? key; + + @override + String toString() { + return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; + } +} + +/// generated route for +/// [ExtendingVolumePage] +class ExtendingVolumeRoute extends PageRouteInfo { + ExtendingVolumeRoute({ + required DiskVolume diskVolumeToResize, + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ExtendingVolumeRoute.name, + args: ExtendingVolumeRouteArgs( + diskVolumeToResize: diskVolumeToResize, + diskStatus: diskStatus, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'ExtendingVolumeRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ExtendingVolumeRouteArgs { + const ExtendingVolumeRouteArgs({ + required this.diskVolumeToResize, + required this.diskStatus, + this.key, + }); + + final DiskVolume diskVolumeToResize; + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; + } +} + +/// generated route for +/// [ServerStoragePage] +class ServerStorageRoute extends PageRouteInfo { + ServerStorageRoute({ + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ServerStorageRoute.name, + args: ServerStorageRouteArgs( + diskStatus: diskStatus, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'ServerStorageRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServerStorageRouteArgs { + const ServerStorageRouteArgs({ + required this.diskStatus, + this.key, + }); + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; + } +} + +/// generated route for +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) + : super( + DevicesRoute.name, + initialChildren: children, + ); + + static const String name = 'DevicesRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [RootPage] class RootRoute extends PageRouteInfo { @@ -203,6 +454,90 @@ class RootRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute({List? children}) + : super( + ConsoleRoute.name, + initialChildren: children, + ); + + static const String name = 'ConsoleRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute({List? children}) + : super( + MoreRoute.name, + initialChildren: children, + ); + + static const String name = 'MoreRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [AppSettingsPage] +class AppSettingsRoute extends PageRouteInfo { + const AppSettingsRoute({List? children}) + : super( + AppSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'AppSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DeveloperSettingsPage] +class DeveloperSettingsRoute extends PageRouteInfo { + const DeveloperSettingsRoute({List? children}) + : super( + DeveloperSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'DeveloperSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute({List? children}) + : super( + DnsDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'DnsDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [ServicePage] class ServiceRoute extends PageRouteInfo { @@ -255,20 +590,6 @@ class ServicesRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } -/// generated route for -/// [ServerDetailsScreen] -class ServerDetailsRoute extends PageRouteInfo { - const ServerDetailsRoute({List? children}) - : super( - ServerDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'ServerDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [UsersPage] class UsersRoute extends PageRouteInfo { @@ -336,113 +657,15 @@ class UserDetailsRouteArgs { } /// generated route for -/// [AppSettingsPage] -class AppSettingsRoute extends PageRouteInfo { - const AppSettingsRoute({List? children}) +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute({List? children}) : super( - AppSettingsRoute.name, + InitializingRoute.name, initialChildren: children, ); - static const String name = 'AppSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DeveloperSettingsPage] -class DeveloperSettingsRoute extends PageRouteInfo { - const DeveloperSettingsRoute({List? children}) - : super( - DeveloperSettingsRoute.name, - initialChildren: children, - ); - - static const String name = 'DeveloperSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [MorePage] -class MoreRoute extends PageRouteInfo { - const MoreRoute({List? children}) - : super( - MoreRoute.name, - initialChildren: children, - ); - - static const String name = 'MoreRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) - : super( - AboutApplicationRoute.name, - initialChildren: children, - ); - - static const String name = 'AboutApplicationRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ConsolePage] -class ConsoleRoute extends PageRouteInfo { - const ConsoleRoute({List? children}) - : super( - ConsoleRoute.name, - initialChildren: children, - ); - - static const String name = 'ConsoleRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ProvidersPage] -class ProvidersRoute extends PageRouteInfo { - const ProvidersRoute({List? children}) - : super( - ProvidersRoute.name, - initialChildren: children, - ); - - static const String name = 'ProvidersRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [RecoveryKeyPage] -class RecoveryKeyRoute extends PageRouteInfo { - const RecoveryKeyRoute({List? children}) - : super( - RecoveryKeyRoute.name, - initialChildren: children, - ); - - static const String name = 'RecoveryKeyRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DnsDetailsPage] -class DnsDetailsRoute extends PageRouteInfo { - const DnsDetailsRoute({List? children}) - : super( - DnsDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'DnsDetailsRoute'; + static const String name = 'InitializingRoute'; static const PageInfo page = PageInfo(name); } @@ -460,226 +683,3 @@ class RecoveryRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } - -/// generated route for -/// [InitializingPage] -class InitializingRoute extends PageRouteInfo { - const InitializingRoute({List? children}) - : super( - InitializingRoute.name, - initialChildren: children, - ); - - static const String name = 'InitializingRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ServerStoragePage] -class ServerStorageRoute extends PageRouteInfo { - ServerStorageRoute({ - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ServerStorageRoute.name, - args: ServerStorageRouteArgs( - diskStatus: diskStatus, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ServerStorageRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ServerStorageRouteArgs { - const ServerStorageRouteArgs({ - required this.diskStatus, - this.key, - }); - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; - } -} - -/// generated route for -/// [ExtendingVolumePage] -class ExtendingVolumeRoute extends PageRouteInfo { - ExtendingVolumeRoute({ - required DiskVolume diskVolumeToResize, - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ExtendingVolumeRoute.name, - args: ExtendingVolumeRouteArgs( - diskVolumeToResize: diskVolumeToResize, - diskStatus: diskStatus, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ExtendingVolumeRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ExtendingVolumeRouteArgs { - const ExtendingVolumeRouteArgs({ - required this.diskVolumeToResize, - required this.diskStatus, - this.key, - }); - - final DiskVolume diskVolumeToResize; - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ExtendingVolumeRouteArgs{diskVolumeToResize: $diskVolumeToResize, diskStatus: $diskStatus, key: $key}'; - } -} - -/// generated route for -/// [ServicesMigrationPage] -class ServicesMigrationRoute extends PageRouteInfo { - ServicesMigrationRoute({ - required List services, - required DiskStatus diskStatus, - required bool isMigration, - Key? key, - List? children, - }) : super( - ServicesMigrationRoute.name, - args: ServicesMigrationRouteArgs( - services: services, - diskStatus: diskStatus, - isMigration: isMigration, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ServicesMigrationRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ServicesMigrationRouteArgs { - const ServicesMigrationRouteArgs({ - required this.services, - required this.diskStatus, - required this.isMigration, - this.key, - }); - - final List services; - - final DiskStatus diskStatus; - - final bool isMigration; - - final Key? key; - - @override - String toString() { - return 'ServicesMigrationRouteArgs{services: $services, diskStatus: $diskStatus, isMigration: $isMigration, key: $key}'; - } -} - -/// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) - : super( - DevicesRoute.name, - initialChildren: children, - ); - - static const String name = 'DevicesRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [BackupsListPage] -class BackupsListRoute extends PageRouteInfo { - BackupsListRoute({ - required Service? service, - Key? key, - List? children, - }) : super( - BackupsListRoute.name, - args: BackupsListRouteArgs( - service: service, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'BackupsListRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class BackupsListRouteArgs { - const BackupsListRouteArgs({ - required this.service, - this.key, - }); - - final Service? service; - - final Key? key; - - @override - String toString() { - return 'BackupsListRouteArgs{service: $service, key: $key}'; - } -} - -/// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) - : super( - BackupDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'BackupDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) - : super( - OnboardingRoute.name, - initialChildren: children, - ); - - static const String name = 'OnboardingRoute'; - - static const PageInfo page = PageInfo(name); -} From e417088340b98ef084c9c5c5c42cbe08f7e1700e Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 7 Aug 2023 10:26:52 -0300 Subject: [PATCH 678/732] fix(i18l): Change broken validations string for superuser SSH --- lib/logic/cubit/forms/user/ssh_form_cubit.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/cubit/forms/user/ssh_form_cubit.dart b/lib/logic/cubit/forms/user/ssh_form_cubit.dart index 9ed389d2..707e54c3 100644 --- a/lib/logic/cubit/forms/user/ssh_form_cubit.dart +++ b/lib/logic/cubit/forms/user/ssh_form_cubit.dart @@ -21,7 +21,7 @@ class SshFormCubit extends FormCubit { ValidationModel( (final String newKey) => user.sshKeys.any((final String key) => key == newKey), - 'validations.already_exists'.tr(), + 'validations.already_exist'.tr(), ), RequiredStringValidation('validations.required'.tr()), ValidationModel( From 91dce222cc460d82f2f06817b1d744b946c8fb48 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 10 Aug 2023 23:07:03 -0300 Subject: [PATCH 679/732] fix: Don't let start service migration if the same volume was picked --- .../binds_migration/services_migration.dart | 80 +++++++++++-------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index f07c275e..26e9b82e 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -55,6 +55,20 @@ class _ServicesMigrationPageState extends State { }); } + bool get isTherePendingChange { + bool isChangeFound = false; + for (final Service service in widget.services) { + for (final String serviceId in serviceToDisk.keys) { + if (serviceId == service.id && + serviceToDisk[serviceId] != service.storageUsage.volume!) { + isChangeFound = true; + } + } + } + + return isChangeFound; + } + /// Check the services and if a service is moved (in a serviceToDisk entry) /// subtract the used storage from the old volume and add it to the new volume. /// The old volume is the volume the service is currently on, shown in services list. @@ -157,40 +171,42 @@ class _ServicesMigrationPageState extends State { ), ), const SizedBox(height: 16), - BrandButton.filled( - child: Text('storage.start_migration_button'.tr()), - onPressed: () { - if (widget.isMigration) { - context.read().migrateToBinds( - serviceToDisk, - ); - } else { - for (final service in widget.services) { - if (serviceToDisk[service.id] != null) { - context.read().moveService( - service.id, - serviceToDisk[service.id]!, - ); + if (widget.isMigration || + (!widget.isMigration && isTherePendingChange)) + BrandButton.filled( + child: Text('storage.start_migration_button'.tr()), + onPressed: () { + if (widget.isMigration) { + context.read().migrateToBinds( + serviceToDisk, + ); + } else { + for (final service in widget.services) { + if (serviceToDisk[service.id] != null) { + context.read().moveService( + service.id, + serviceToDisk[service.id]!, + ); + } } } - } - context.router.popUntilRoot(); - showModalBottomSheet( - context: context, - useRootNavigator: true, - isScrollControlled: true, - builder: (final BuildContext context) => - DraggableScrollableSheet( - expand: false, - maxChildSize: 0.9, - minChildSize: 0.4, - initialChildSize: 0.6, - builder: (final context, final scrollController) => - JobsContent(controller: scrollController), - ), - ); - }, - ), + context.router.popUntilRoot(); + showModalBottomSheet( + context: context, + useRootNavigator: true, + isScrollControlled: true, + builder: (final BuildContext context) => + DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.4, + initialChildSize: 0.6, + builder: (final context, final scrollController) => + JobsContent(controller: scrollController), + ), + ); + }, + ), const SizedBox(height: 32), ], ), From a94965ab0df9dd98763264d70a492e4008325ccd Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 10 Aug 2023 23:21:45 -0300 Subject: [PATCH 680/732] feat: Add autofocus to cubit text fields for keyboard displaying --- lib/ui/pages/setup/initializing/dns_provider_picker.dart | 1 + lib/ui/pages/setup/initializing/initializing.dart | 2 ++ lib/ui/pages/setup/initializing/server_provider_picker.dart | 1 + lib/ui/pages/setup/recovering/recover_by_new_device_key.dart | 1 + lib/ui/pages/setup/recovering/recover_by_old_token.dart | 1 + lib/ui/pages/setup/recovering/recover_by_recovery_key.dart | 1 + lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart | 1 + lib/ui/pages/setup/recovering/recovery_confirm_dns.dart | 1 + lib/ui/pages/setup/recovering/recovery_routing.dart | 1 + .../setup/recovering/recovery_server_provider_connected.dart | 1 + lib/ui/pages/users/new_user.dart | 1 + lib/ui/pages/users/reset_password.dart | 1 + lib/ui/pages/users/user_details.dart | 1 + 13 files changed, 14 insertions(+) diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index a05b1233..772c093e 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -109,6 +109,7 @@ class ProviderInputDataPage extends StatelessWidget { ), const SizedBox(height: 32), CubitFormTextField( + autofocus: true, formFieldCubit: providerCubit.apiKey, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index c74fa4a4..5d54935a 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -273,6 +273,7 @@ class InitializingPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().keyId, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), @@ -448,6 +449,7 @@ class InitializingPage extends StatelessWidget { ), const SizedBox(height: 32), CubitFormTextField( + autofocus: true, formFieldCubit: context.read().userName, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index bde1435c..41c4c9ea 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -116,6 +116,7 @@ class ProviderInputDataPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: providerCubit.apiKey, textAlign: TextAlign.center, scrollPadding: const EdgeInsets.only(bottom: 70), diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index 4f6cf352..d1dce974 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -65,6 +65,7 @@ class RecoverByNewDeviceKeyInput extends StatelessWidget { ignoreBreakpoints: true, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().tokenField, decoration: InputDecoration( diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index 42d60f34..1a777f83 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -76,6 +76,7 @@ class RecoverByOldToken extends StatelessWidget { ignoreBreakpoints: true, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().tokenField, decoration: InputDecoration( diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index b39dc2da..ad18bc95 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -36,6 +36,7 @@ class RecoverByRecoveryKey extends StatelessWidget { context.read().revertRecoveryStep, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().tokenField, decoration: InputDecoration( diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index a4d04aae..4b27e3ad 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -36,6 +36,7 @@ class RecoveryConfirmBackblaze extends StatelessWidget { hasFlashButton: false, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().keyId, decoration: const InputDecoration( border: OutlineInputBorder(), diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart index 02a2afeb..e49efe9e 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart @@ -39,6 +39,7 @@ class RecoveryConfirmDns extends StatelessWidget { context.read().revertRecoveryStep, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index be5eb2ea..3ab5109a 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -121,6 +121,7 @@ class SelectDomainToRecover extends StatelessWidget { }, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().serverDomainField, decoration: InputDecoration( diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index 86a1bf44..40f13eaa 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -38,6 +38,7 @@ class RecoveryServerProviderConnected extends StatelessWidget { }, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().apiKey, decoration: InputDecoration( border: const OutlineInputBorder(), diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index d7ed2aca..9212307a 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -55,6 +55,7 @@ class NewUserPage extends StatelessWidget { const SizedBox(width: 14), IntrinsicHeight( child: CubitFormTextField( + autofocus: true, formFieldCubit: context.read().login, decoration: InputDecoration( labelText: 'users.login'.tr(), diff --git a/lib/ui/pages/users/reset_password.dart b/lib/ui/pages/users/reset_password.dart index 64785d3a..12bb41ae 100644 --- a/lib/ui/pages/users/reset_password.dart +++ b/lib/ui/pages/users/reset_password.dart @@ -41,6 +41,7 @@ class ResetPassword extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ CubitFormTextField( + autofocus: true, formFieldCubit: context.read().password, decoration: InputDecoration( diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 72180e8c..7ee3a7bd 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -296,6 +296,7 @@ class NewSshKey extends StatelessWidget { children: [ IntrinsicHeight( child: CubitFormTextField( + autofocus: true, formFieldCubit: context.read().key, decoration: InputDecoration( labelText: 'ssh.input_label'.tr(), From e77a9403cac9333779ddbc44fa8c76eae9e8f44c Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 11 Aug 2023 02:03:29 -0300 Subject: [PATCH 681/732] fix(i18l): Add dot to the end of reset_config_description key for translations --- assets/translations/az.json | 2 +- assets/translations/be.json | 2 +- assets/translations/cs.json | 2 +- assets/translations/de.json | 2 +- assets/translations/en.json | 2 +- assets/translations/es.json | 4 ++-- assets/translations/fr.json | 2 +- assets/translations/lv.json | 4 ++-- assets/translations/pl.json | 2 +- assets/translations/ru.json | 2 +- assets/translations/sk.json | 2 +- assets/translations/sl.json | 3 +-- assets/translations/th.json | 2 +- assets/translations/uk.json | 2 +- 14 files changed, 16 insertions(+), 17 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index 81d678c7..aae7107a 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -60,7 +60,7 @@ "title": "Tətbiq parametrləri", "dark_theme_title": "Qaranlıq mövzu", "reset_config_title": "Tətbiq Sıfırlayın", - "reset_config_description": "API və Super İstifadəçi Açarlarını sıfırlayın", + "reset_config_description": "API və Super İstifadəçi Açarlarını sıfırlayın.", "delete_server_title": "Serveri silin", "dark_theme_description": "Rəng mövzusunu dəyişdirin", "delete_server_description": "Əməliyyat serveri siləcək. Bundan sonra o, əlçatmaz olacaq.", diff --git a/assets/translations/be.json b/assets/translations/be.json index 3a5e84a8..c6dbf7e9 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -259,7 +259,7 @@ "privacy_policy": "Палітыка прыватнасці" }, "application_settings": { - "reset_config_description": "Скінуць API ключы i суперкарыстальніка", + "reset_config_description": "Скінуць API ключы i суперкарыстальніка.", "delete_server_description": "Дзеянне прывядзе да выдалення сервера. Пасля гэтага ён будзе недаступны.", "title": "Налады праграмы", "dark_theme_title": "Цёмная тэма", diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 818cd320..5186b74e 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -60,7 +60,7 @@ "title": "Nastavení aplikace", "dark_theme_title": "Tmavé téma", "reset_config_title": "Obnovení konfigurace aplikace", - "reset_config_description": "Obnovení klíčů api a uživatele root", + "reset_config_description": "Obnovení klíčů API a uživatele root.", "delete_server_title": "Odstranit server", "dark_theme_description": "Přepnutí tématu aplikace", "delete_server_description": "Tím odstraníte svůj server. Nebude již přístupný.", diff --git a/assets/translations/de.json b/assets/translations/de.json index 9b8b1093..86cc3518 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -64,7 +64,7 @@ "dark_theme_title": "Dunkles Thema", "dark_theme_description": "Ihr Anwendungsdesign wechseln", "reset_config_title": "Anwendungseinstellungen zurücksetzen", - "reset_config_description": "API Sclüssel und root Benutzer zurücksetzen", + "reset_config_description": "API Sclüssel und root Benutzer zurücksetzen.", "delete_server_title": "Server löschen", "delete_server_description": "Das wird Ihren Server löschen. Es wird nicht mehr zugänglich sein.", "system_dark_theme_title": "Standard-Systemthema", diff --git a/assets/translations/en.json b/assets/translations/en.json index 51c47263..a20c76e2 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -68,7 +68,7 @@ "dark_theme_description": "Switch your application theme", "dangerous_settings": "Dangerous settings", "reset_config_title": "Reset application config", - "reset_config_description": "Reset api keys and root user", + "reset_config_description": "Resets API keys and root user.", "delete_server_title": "Delete server", "delete_server_description": "This removes your server. It will be no longer accessible." }, diff --git a/assets/translations/es.json b/assets/translations/es.json index e01f9167..2c240edd 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -38,7 +38,7 @@ "application_settings": { "reset_config_title": "Restablecer la configuración de la aplicación", "dark_theme_description": "Cambia el tema de tu aplicación", - "reset_config_description": "Restablecer claves api y usuario root", + "reset_config_description": "Restablecer claves API y usuario root.", "delete_server_title": "Eliminar servidor", "delete_server_description": "Esto elimina su servidor. Ya no será accesible.", "title": "Ajustes de la aplicación", @@ -89,4 +89,4 @@ "about_us_page": { "title": "Sobre nosotros" } -} +} \ No newline at end of file diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 945d1f5a..e015c782 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -64,7 +64,7 @@ "delete_server_title": "Supprimer le serveur", "delete_server_description": "Cela va supprimer votre serveur. Celui-ci ne sera plus accessible.", "dark_theme_title": "Thème sombre", - "reset_config_description": "Réinitialiser les clés API et l'utilisateur root" + "reset_config_description": "Réinitialiser les clés API et l'utilisateur root." }, "ssh": { "title": "Clés SSH", diff --git a/assets/translations/lv.json b/assets/translations/lv.json index b4a38c8e..7fbfb797 100644 --- a/assets/translations/lv.json +++ b/assets/translations/lv.json @@ -66,7 +66,7 @@ "dark_theme_description": "Lietojumprogrammas dizaina pārslēgšana", "dangerous_settings": "Bīstamie iestatījumi", "reset_config_title": "Atiestatīt lietojumprogrammas konfigurāciju", - "reset_config_description": "Atiestatīt API atslēgas un saknes lietotāju", + "reset_config_description": "Atiestatīt API atslēgas un saknes lietotāju.", "delete_server_title": "Izdzēst serveri", "delete_server_description": "Šis izdzēš jūsu serveri. Tas vairs nebūs pieejams." }, @@ -215,4 +215,4 @@ "not_ready_card": { "in_menu": "Serveris vēl nav iestatīts. Lūdzu, pabeidziet iestatīšanu, izmantojot iestatīšanas vedni, lai turpinātu darbu." } -} +} \ No newline at end of file diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 0f0acdb0..5a90cc86 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -64,7 +64,7 @@ "dark_theme_title": "Ciemny motyw aplikacji", "dark_theme_description": "Zmień kolor motywu aplikacji", "reset_config_title": "Resetowanie", - "reset_config_description": "Zresetuj klucze API i użytkownika root", + "reset_config_description": "Zresetuj klucze API i użytkownika root.", "delete_server_title": "Usuń serwer", "delete_server_description": "Ta czynność usunie serwer. Po tym będzie niedostępny.", "system_dark_theme_description": "Użyj jasnego lub ciemnego motywu w zależności od ustawień systemu", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index fdc276cd..169ffa34 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -65,7 +65,7 @@ "dark_theme_title": "Тёмная тема", "dark_theme_description": "Сменить цветовую тему", "reset_config_title": "Сброс настроек", - "reset_config_description": "Сбросить API ключи, а также root пользователя", + "reset_config_description": "Сбросить API ключи и root пользователя.", "delete_server_title": "Удалить сервер", "delete_server_description": "Действие приведёт к удалению сервера. После этого он будет недоступен.", "system_dark_theme_title": "Системная тема по-умолчанию", diff --git a/assets/translations/sk.json b/assets/translations/sk.json index c45523d4..c79d251e 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -114,7 +114,7 @@ "dark_theme_title": "Temná téma", "dark_theme_description": "Zmeniť tému aplikácie", "reset_config_title": "Resetovať nastavenia aplikácie", - "reset_config_description": "Resetovať kľúče API a užívateľa root", + "reset_config_description": "Resetovať kľúče API a užívateľa root.", "delete_server_title": "Zmazať server", "delete_server_description": "Tým sa odstráni váš server. Už nebude prístupným.", "system_dark_theme_description": "Použitie svetlej alebo tmavej témy v závislosti od nastavení systému", diff --git a/assets/translations/sl.json b/assets/translations/sl.json index c8bcd3b8..4cbf91d1 100644 --- a/assets/translations/sl.json +++ b/assets/translations/sl.json @@ -67,7 +67,6 @@ "dark_theme_description": "Spreminjanje barvne teme", "dangerous_settings": "Nevarne nastavitve", "reset_config_title": "Ponastavitev konfiguracije aplikacije", - "reset_config_description": "Сбросить API ключи, а также root пользователя", "delete_server_title": "Brisanje strežnika", "delete_server_description": "To dejanje povzroči izbris strežnika. Nato bo nedosegljiv." }, @@ -254,4 +253,4 @@ "title": "VPN Strežnik", "subtitle": "Zasebni strežnik VPN" } -} +} \ No newline at end of file diff --git a/assets/translations/th.json b/assets/translations/th.json index 3c314087..aa54a203 100644 --- a/assets/translations/th.json +++ b/assets/translations/th.json @@ -59,7 +59,7 @@ "title": "การตั้งค่าแอปพลิเคชัน", "dark_theme_title": "ธีมมืด", "reset_config_title": "รีเซ็ตค่าดั้งเดิมการตั้งค่าของแอปพลิเคชั่น", - "reset_config_description": "รีเซ็ต api key และผู้ใช้งาน root", + "reset_config_description": "รีเซ็ต API key และผู้ใช้งาน root", "delete_server_title": "ลบเซิฟเวอร์" }, "ssh": { diff --git a/assets/translations/uk.json b/assets/translations/uk.json index 0d5726bf..d3384ca5 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -41,7 +41,7 @@ "reset_config_title": "Скинути налаштування", "dark_theme_title": "Темна тема", "dark_theme_description": "Змінити тему додатка", - "reset_config_description": "Скинути API ключі та root користувача", + "reset_config_description": "Скинути API ключі та root користувача.", "delete_server_title": "Видалити сервер", "delete_server_description": "Це видалить ваш сервер. Він більше не буде доступний." }, From e4c5220fb40c0d292590e50a4734aec5cf92991d Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 11 Aug 2023 10:21:27 -0300 Subject: [PATCH 682/732] refactor: Rename isTherePendingChange to isVolumePicked on migration page --- .../server_storage/binds_migration/services_migration.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index 26e9b82e..edb7474e 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -55,7 +55,7 @@ class _ServicesMigrationPageState extends State { }); } - bool get isTherePendingChange { + bool get isVolumePicked { bool isChangeFound = false; for (final Service service in widget.services) { for (final String serviceId in serviceToDisk.keys) { @@ -171,8 +171,7 @@ class _ServicesMigrationPageState extends State { ), ), const SizedBox(height: 16), - if (widget.isMigration || - (!widget.isMigration && isTherePendingChange)) + if (widget.isMigration || (!widget.isMigration && isVolumePicked)) BrandButton.filled( child: Text('storage.start_migration_button'.tr()), onPressed: () { From 41702241193ef52c7da476aa2b92f16b37daf91b Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 14 Aug 2023 05:48:15 +0300 Subject: [PATCH 683/732] fix(ui): Add divider in backups screen --- lib/ui/pages/backups/backup_details.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 00ca8df2..d3bc0129 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -202,6 +202,7 @@ class BackupDetailsPage extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + const Divider(), ListTile( title: Text( 'backup.latest_snapshots'.tr(), From 7e1620be3c87838207444b78a2c36e556b86416f Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 14 Aug 2023 05:54:11 +0300 Subject: [PATCH 684/732] fix(ui): Add loading animation for backups screen Closes #309 --- lib/ui/pages/backups/backup_details.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index d3bc0129..aa2ba335 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -62,7 +62,14 @@ class BackupDetailsPage extends StatelessWidget { heroTitle: 'backup.card_title'.tr(), heroSubtitle: 'backup.description'.tr(), children: [ - BrandButton.rised( + if (preventActions) + const Center( + child: Padding( + padding: EdgeInsets.all(16.0), + child: CircularProgressIndicator(), + ), + ), + if (!preventActions) BrandButton.rised( onPressed: preventActions ? null : () async { From 03f7e7d8197e8f7ad938061fe093181a48c27c33 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 14 Aug 2023 07:09:06 +0300 Subject: [PATCH 685/732] fix(ui): Fix encryption key modal behaviour when no key found Closes #300 --- .../backups/copy_encryption_key_modal.dart | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart index 42bc1ba9..dca9d705 100644 --- a/lib/ui/pages/backups/copy_encryption_key_modal.dart +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -6,6 +6,7 @@ import 'package:flutter/services.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; class CopyEncryptionKeyModal extends StatefulWidget { const CopyEncryptionKeyModal({ @@ -32,8 +33,27 @@ class _CopyEncryptionKeyModalState extends State { @override Widget build(final BuildContext context) { - final String encryptionKey = - context.watch().state.backblazeBucket!.encryptionKey; + final String? encryptionKey = + context.watch().state.backblazeBucket?.encryptionKey; + if (encryptionKey == null) { + return ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.backups_encryption_key'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 8), + InfoBox( + text: 'backup.backups_encryption_key_not_found'.tr(), + isWarning: true, + ), + ], + ); + } return ListView( controller: widget.scrollController, padding: const EdgeInsets.all(16), From b01c61a47bcd90831b476d8cc429b30bb48475ee Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 14 Aug 2023 07:10:15 +0300 Subject: [PATCH 686/732] feat(backups): Add snapshot restore modal --- lib/logic/cubit/backups/backups_cubit.dart | 16 +- lib/ui/components/cards/outlined_card.dart | 7 +- lib/ui/pages/backups/backup_details.dart | 62 ++++-- lib/ui/pages/backups/backups_list.dart | 35 +++- lib/ui/pages/backups/snapshot_modal.dart | 232 +++++++++++++++++++++ 5 files changed, 320 insertions(+), 32 deletions(-) create mode 100644 lib/ui/pages/backups/snapshot_modal.dart diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 1d416033..938b606a 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -41,7 +41,6 @@ class BackupsCubit extends ServerInstallationDependendCubit { refreshing: false, ), ); - print(state); } } @@ -113,9 +112,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { final BackblazeBucket? bucket = getIt().backblazeBucket; if (bucket == null) { emit(state.copyWith(isInitialized: false)); - print('bucket is null'); } else { - print('bucket is not null'); final GenericResult result = await api.initializeRepository( InitializeRepositoryInput( provider: BackupsProviderType.backblaze, @@ -125,7 +122,6 @@ class BackupsCubit extends ServerInstallationDependendCubit { password: bucket.applicationKey, ), ); - print('result is $result'); if (result.success == false) { getIt() .showSnackBar(result.message ?? 'Unknown error'); @@ -214,7 +210,6 @@ class BackupsCubit extends ServerInstallationDependendCubit { await updateBackups(); } - // TODO: inex Future forgetSnapshot(final String snapshotId) async { final result = await api.forgetSnapshot(snapshotId); if (!result.success) { @@ -226,6 +221,17 @@ class BackupsCubit extends ServerInstallationDependendCubit { getIt() .showSnackBar('backup.forget_snapshot_error'.tr()); } + + // Optimistic update + final backups = state.backups; + final index = + backups.indexWhere((final snapshot) => snapshot.id == snapshotId); + if (index != -1) { + backups.removeAt(index); + emit(state.copyWith(backups: backups)); + } + + await updateBackups(); } @override diff --git a/lib/ui/components/cards/outlined_card.dart b/lib/ui/components/cards/outlined_card.dart index 91f13b44..d60fa9f0 100644 --- a/lib/ui/components/cards/outlined_card.dart +++ b/lib/ui/components/cards/outlined_card.dart @@ -3,17 +3,22 @@ import 'package:flutter/material.dart'; class OutlinedCard extends StatelessWidget { const OutlinedCard({ required this.child, + this.borderColor, + this.borderWidth, super.key, }); final Widget child; + final Color? borderColor; + final double? borderWidth; @override Widget build(final BuildContext context) => Card( elevation: 0.0, shape: RoundedRectangleBorder( borderRadius: const BorderRadius.all(Radius.circular(12)), side: BorderSide( - color: Theme.of(context).colorScheme.outline, + color: borderColor ?? Theme.of(context).colorScheme.outline, + width: borderWidth ?? 1.0, ), ), clipBehavior: Clip.antiAlias, diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index aa2ba335..1d08dfac 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -18,6 +18,7 @@ import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/backups/change_period_modal.dart'; import 'package:selfprivacy/ui/pages/backups/copy_encryption_key_modal.dart'; import 'package:selfprivacy/ui/pages/backups/create_backups_modal.dart'; +import 'package:selfprivacy/ui/pages/backups/snapshot_modal.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; @@ -69,14 +70,15 @@ class BackupDetailsPage extends StatelessWidget { child: CircularProgressIndicator(), ), ), - if (!preventActions) BrandButton.rised( - onPressed: preventActions - ? null - : () async { - await context.read().initializeBackups(); - }, - text: 'backup.initialize'.tr(), - ), + if (!preventActions) + BrandButton.rised( + onPressed: preventActions + ? null + : () async { + await context.read().initializeBackups(); + }, + text: 'backup.initialize'.tr(), + ), ], ); } @@ -183,7 +185,9 @@ class BackupDetailsPage extends StatelessWidget { 'backup.backups_encryption_key_subtitle'.tr(), ), ), - const SizedBox(height: 16), + const SizedBox(height: 8), + const Divider(), + const SizedBox(height: 8), if (backupJobs.isNotEmpty) Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -209,7 +213,6 @@ class BackupDetailsPage extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Divider(), ListTile( title: Text( 'backup.latest_snapshots'.tr(), @@ -241,16 +244,39 @@ class BackupDetailsPage extends StatelessWidget { onTap: preventActions ? null : () { - showPopUpAlert( - alertTitle: 'backup.restoring'.tr(), - description: 'backup.restore_alert'.tr( - args: [backup.time.toString()], + showModalBottomSheet( + useRootNavigator: true, + context: context, + isScrollControlled: true, + builder: (final BuildContext context) => + DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.5, + initialChildSize: 0.7, + builder: ( + final context, + final scrollController, + ) => + SnapshotModal( + snapshot: backup, + scrollController: scrollController, + ), ), - actionButtonTitle: 'modals.yes'.tr(), + ); + }, + onLongPress: preventActions + ? null + : () { + showPopUpAlert( + alertTitle: 'backup.forget_snapshot'.tr(), + description: + 'backup.forget_snapshot_alert'.tr(), + actionButtonTitle: + 'backup.forget_snapshot'.tr(), actionButtonOnPressed: () => { - context.read().restoreBackup( - backup.id, // TODO: inex - BackupRestoreStrategy.unknown, + context.read().forgetSnapshot( + backup.id, ) }, ); diff --git a/lib/ui/pages/backups/backups_list.dart b/lib/ui/pages/backups/backups_list.dart index af652a9b..4af870ef 100644 --- a/lib/ui/pages/backups/backups_list.dart +++ b/lib/ui/pages/backups/backups_list.dart @@ -9,6 +9,7 @@ import 'package:selfprivacy/logic/models/backup.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/pages/backups/snapshot_modal.dart'; @RoutePage() class BackupsListPage extends StatelessWidget { @@ -47,16 +48,34 @@ class BackupsListPage extends StatelessWidget { onTap: preventActions ? null : () { - showPopUpAlert( - alertTitle: 'backup.restoring'.tr(), - description: 'backup.restore_alert'.tr( - args: [backup.time.toString()], + showModalBottomSheet( + useRootNavigator: true, + context: context, + isScrollControlled: true, + builder: (final BuildContext context) => + DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.5, + initialChildSize: 0.7, + builder: (final context, final scrollController) => + SnapshotModal( + snapshot: backup, + scrollController: scrollController, + ), ), - actionButtonTitle: 'modals.yes'.tr(), + ); + }, + onLongPress: preventActions + ? null + : () { + showPopUpAlert( + alertTitle: 'backup.forget_snapshot'.tr(), + description: 'backup.forget_snapshot_alert'.tr(), + actionButtonTitle: 'backup.forget_snapshot'.tr(), actionButtonOnPressed: () => { - context.read().restoreBackup( - backup.id, // TODO: inex - BackupRestoreStrategy.unknown, + context.read().forgetSnapshot( + backup.id, ) }, ); diff --git a/lib/ui/pages/backups/snapshot_modal.dart b/lib/ui/pages/backups/snapshot_modal.dart new file mode 100644 index 00000000..147fe72a --- /dev/null +++ b/lib/ui/pages/backups/snapshot_modal.dart @@ -0,0 +1,232 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; +import 'package:selfprivacy/logic/models/backup.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; +import 'package:selfprivacy/logic/models/service.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/ui/components/info_box/info_box.dart'; + +class SnapshotModal extends StatefulWidget { + const SnapshotModal({ + required this.snapshot, + required this.scrollController, + super.key, + }); + + final Backup snapshot; + final ScrollController scrollController; + + @override + State createState() => _SnapshotModalState(); +} + +class _SnapshotModalState extends State { + BackupRestoreStrategy selectedStrategy = + BackupRestoreStrategy.downloadVerifyOverwrite; + + @override + Widget build(final BuildContext context) { + final List busyServices = context + .watch() + .state + .backupJobList + .where( + (final ServerJob job) => + job.status == JobStatusEnum.running || + job.status == JobStatusEnum.created, + ) + .map((final ServerJob job) => job.typeId.split('.')[1]) + .toList(); + + final bool isServiceBusy = busyServices.contains(widget.snapshot.serviceId); + + final Service? service = context + .read() + .state + .getServiceById(widget.snapshot.serviceId); + + return ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.snapshot_modal_heading'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 16), + ListTile( + leading: service != null + ? SvgPicture.string( + service.svgIcon, + height: 24, + width: 24, + colorFilter: ColorFilter.mode( + Theme.of(context).colorScheme.onSurface, + BlendMode.srcIn, + ), + ) + : const Icon( + Icons.question_mark_outlined, + ), + title: Text( + 'backup.snapshot_service_title'.tr(), + ), + subtitle: Text( + service?.displayName ?? widget.snapshot.fallbackServiceName, + ), + ), + ListTile( + leading: Icon( + Icons.access_time_outlined, + color: Theme.of(context).colorScheme.onSurface, + ), + title: Text( + 'backup.snapshot_creation_time_title'.tr(), + ), + subtitle: Text( + '${MaterialLocalizations.of(context).formatShortDate(widget.snapshot.time)} ${TimeOfDay.fromDateTime(widget.snapshot.time).format(context)}', + ), + ), + ListTile( + leading: Icon( + Icons.numbers_outlined, + color: Theme.of(context).colorScheme.onSurface, + ), + title: Text( + 'backup.snapshot_id_title'.tr(), + ), + subtitle: Text( + widget.snapshot.id, + ), + ), + if (service != null) + Column( + children: [ + const SizedBox(height: 8), + Text( + 'backup.snapshot_modal_select_strategy'.tr(), + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + _BackupStrategySelectionCard( + isSelected: selectedStrategy == + BackupRestoreStrategy.downloadVerifyOverwrite, + onTap: () { + setState(() { + selectedStrategy = + BackupRestoreStrategy.downloadVerifyOverwrite; + }); + }, + title: + 'backup.snapshot_modal_download_verify_option_title'.tr(), + subtitle: + 'backup.snapshot_modal_download_verify_option_description' + .tr(), + ), + const SizedBox(height: 8), + _BackupStrategySelectionCard( + isSelected: selectedStrategy == BackupRestoreStrategy.inplace, + onTap: () { + setState(() { + selectedStrategy = BackupRestoreStrategy.inplace; + }); + }, + title: 'backup.snapshot_modal_inplace_option_title'.tr(), + subtitle: + 'backup.snapshot_modal_inplace_option_description'.tr(), + ), + const SizedBox(height: 8), + // Restore backup button + BrandButton.filled( + onPressed: isServiceBusy + ? null + : () { + context.read().restoreBackup( + widget.snapshot.id, + selectedStrategy, + ); + Navigator.of(context).pop(); + getIt() + .showSnackBar('backup.restore_started'.tr()); + }, + text: 'backup.restore'.tr(), + ), + ], + ) + else + Padding( + padding: const EdgeInsets.all(16.0), + child: InfoBox( + isWarning: true, + text: 'backup.snapshot_modal_service_not_found'.tr(), + ), + ) + ], + ); + } +} + +class _BackupStrategySelectionCard extends StatelessWidget { + const _BackupStrategySelectionCard({ + required this.isSelected, + required this.title, + required this.subtitle, + required this.onTap, + }); + + final bool isSelected; + final String title; + final String subtitle; + final void Function() onTap; + + @override + Widget build(final BuildContext context) => OutlinedCard( + borderColor: isSelected ? Theme.of(context).colorScheme.primary : null, + borderWidth: isSelected ? 3 : 1, + child: InkResponse( + highlightShape: BoxShape.rectangle, + onTap: onTap, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + children: [ + if (isSelected) + Icon( + Icons.radio_button_on_outlined, + color: Theme.of(context).colorScheme.primary, + ) + else + Icon( + Icons.radio_button_off_outlined, + color: Theme.of(context).colorScheme.outline, + ), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + subtitle, + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + ), + ], + ), + ), + ), + ); +} From bc3cfa20bb8c00cfac0b139055e23bb1230a7b3c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 14 Aug 2023 07:21:42 +0300 Subject: [PATCH 687/732] feat(backups): Add backup-related strings --- assets/translations/en.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 32437e17..be15c159 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -203,9 +203,23 @@ "backups_encryption_key_copy": "Copy the encryption key", "backups_encryption_key_show": "Show the encryption key", "backups_encryption_key_description": "This key is used to encrypt your backups. If you lose it, you will not be able to restore your backups. Keep it in a safe place, as it will be useful if you ever need to restore from backups manually.", + "backups_encryption_key_not_found": "Encryption key not found yet, please try again later.", "pending_jobs": "Currently running backup jobs", "snapshots_title": "Snapshot list", - "forget_snapshot_error": "Couldn't forget snapshot" + "forget_snapshot": "Forget snapshot", + "forget_snapshot_alert": "You are about to delete this snapshot. Are you sure? This action usually cannot be undone.", + "forget_snapshot_error": "Couldn't forget snapshot", + "snapshot_modal_heading": "Snapshot details", + "snapshot_service_title": "Service", + "snapshot_creation_time_title": "Creation time", + "snapshot_id_title": "Snapshot ID", + "snapshot_modal_select_strategy": "Select the restore strategy", + "snapshot_modal_download_verify_option_title": "Download, verify and then replace", + "snapshot_modal_download_verify_option_description": "Less risk, but more free space needed. Downloads entire snapshot to the temporary storage, verifies it and then replaces the current data.", + "snapshot_modal_inplace_option_title": "Replace in place", + "snapshot_modal_inplace_option_description": "Less free space needed, but more risk. Replaces current data with the snapshot data during the download.", + "snapshot_modal_service_not_found": "This is a snapshot of a service you don't have on your server anymore. Usually this shouldn't happen, and we cannot do the automatic restore. You can still download the snapshot and restore it manually. Contact SelfPrivacy support if you need help.", + "restore_started": "Restore started, check the jobs list for the current status" }, "storage": { "card_title": "Server Storage", @@ -540,4 +554,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} \ No newline at end of file +} From 8f7730575e19cd56ae5be5d88e71d5f28cca7edc Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 5 Sep 2023 08:34:01 -0300 Subject: [PATCH 688/732] fix: Wrap DNS check in catch to avoid runtime crash --- .../server_installation_repository.dart | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index c3fd6811..7f33d4f7 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -218,19 +218,23 @@ class ServerInstallationRepository { final Map skippedMatches, ) async { final Map matches = {}; - await InternetAddress.lookup(domainName!).then( - (final records) { - for (final record in records) { - if (skippedMatches[record.host] ?? false) { - matches[record.host] = true; - continue; + try { + await InternetAddress.lookup(domainName!).then( + (final records) { + for (final record in records) { + if (skippedMatches[record.host] ?? false) { + matches[record.host] = true; + continue; + } + if (record.address == ip4!) { + matches[record.host] = true; + } } - if (record.address == ip4!) { - matches[record.host] = true; - } - } - }, - ); + }, + ); + } catch (e) { + print(e); + } return matches; } From 85abd8f0fca2cc134809ea364940ab1bd93d6674 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 5 Sep 2023 08:45:09 -0300 Subject: [PATCH 689/732] refactor: Remove mentions of cloudflare from general variables --- .../server_installation/server_installation_repository.dart | 6 +++--- lib/ui/pages/setup/initializing/initializing.dart | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index c3fd6811..37e0cb95 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -155,7 +155,7 @@ class ServerInstallationRepository { RecoveryStep _getCurrentRecoveryStep( final String? serverProviderToken, - final String? cloudflareToken, + final String? dnsProviderToken, final ServerDomain serverDomain, final ServerHostingDetails? serverDetails, ) { @@ -235,7 +235,7 @@ class ServerInstallationRepository { return matches; } - Future createDkimRecord(final ServerDomain cloudFlareDomain) async { + Future createDkimRecord(final ServerDomain domain) async { final ServerApi api = ServerApi(); late DnsRecord record; @@ -248,7 +248,7 @@ class ServerInstallationRepository { await ProvidersController.currentDnsProvider!.setDnsRecord( record, - cloudFlareDomain, + domain, ); } diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 5d54935a..4e9b1a78 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -99,7 +99,7 @@ class InitializingPage extends StatelessWidget { steps: const [ 'Hosting', 'Server Type', - 'CloudFlare', + 'DNS Provider', 'Backblaze', 'Domain', 'User', From 82dfdf04f9f306f66e3bd2d52553ea862b4b4ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Wed, 6 Sep 2023 00:36:49 +0300 Subject: [PATCH 690/732] fix: Implement Backblaze bucket restoration on server recovery (#324) Resolves issue [320](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/320). Co-authored-by: NaiJi Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/324 Reviewed-by: Inex Code --- lib/logic/api_maps/rest_maps/backblaze.dart | 38 +++++++++++++++++++ lib/logic/cubit/backups/backups_cubit.dart | 25 ++++++++++-- .../server_installation_cubit.dart | 17 +++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/backblaze.dart b/lib/logic/api_maps/rest_maps/backblaze.dart index b9df76c2..d908cd26 100644 --- a/lib/logic/api_maps/rest_maps/backblaze.dart +++ b/lib/logic/api_maps/rest_maps/backblaze.dart @@ -2,6 +2,8 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/logic/models/backup.dart'; +import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/api_maps/generic_result.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart'; @@ -179,6 +181,42 @@ class BackblazeApi extends RestApiMap { } } + Future fetchBucket( + final BackupsCredential credentials, + final BackupConfiguration configuration, + ) async { + BackblazeBucket? bucket; + final BackblazeApiAuth auth = await getAuthorizationToken(); + final Dio client = await getClient(); + client.options.baseUrl = auth.apiUrl; + final Response response = await client.get( + '$apiPrefix/b2_list_buckets', + queryParameters: { + 'accountId': getIt().backblazeCredential!.keyId, + }, + options: Options( + headers: {'Authorization': auth.authorizationToken}, + ), + ); + close(client); + if (response.statusCode == HttpStatus.ok) { + for (final rawBucket in response.data['buckets']) { + if (rawBucket['bucketId'] == configuration.locationId) { + bucket = BackblazeBucket( + bucketId: rawBucket['bucketId'], + bucketName: rawBucket['bucketName'], + encryptionKey: configuration.encryptionKey, + applicationKeyId: '', + applicationKey: '', + ); + } + } + return bucket; + } else { + throw Exception('code: ${response.statusCode}'); + } + } + @override bool hasLogger; diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 938b606a..89470656 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -109,17 +109,34 @@ class BackupsCubit extends ServerInstallationDependendCubit { Future reuploadKey() async { emit(state.copyWith(preventActions: true)); - final BackblazeBucket? bucket = getIt().backblazeBucket; + BackblazeBucket? bucket = getIt().backblazeBucket; if (bucket == null) { emit(state.copyWith(isInitialized: false)); } else { + String login = bucket.applicationKeyId; + String password = bucket.applicationKey; + if (login.isEmpty || password.isEmpty) { + final BackblazeApplicationKey key = + await backblaze.createKey(bucket.bucketId); + login = key.applicationKeyId; + password = key.applicationKey; + bucket = BackblazeBucket( + bucketId: bucket.bucketId, + bucketName: bucket.bucketName, + encryptionKey: bucket.encryptionKey, + applicationKey: password, + applicationKeyId: login, + ); + await getIt().storeBackblazeBucket(bucket); + emit(state.copyWith(backblazeBucket: bucket)); + } final GenericResult result = await api.initializeRepository( InitializeRepositoryInput( provider: BackupsProviderType.backblaze, locationId: bucket.bucketId, locationName: bucket.bucketName, - login: bucket.applicationKeyId, - password: bucket.applicationKey, + login: login, + password: password, ), ); if (result.success == false) { @@ -129,7 +146,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { return; } else { emit(state.copyWith(preventActions: false)); - getIt().showSnackBar('backup.reuploaded_key'); + getIt().showSnackBar('backup.reuploaded_key'.tr()); await updateBackups(); } } diff --git a/lib/logic/cubit/server_installation/server_installation_cubit.dart b/lib/logic/cubit/server_installation/server_installation_cubit.dart index a10532ef..195c5ded 100644 --- a/lib/logic/cubit/server_installation/server_installation_cubit.dart +++ b/lib/logic/cubit/server_installation/server_installation_cubit.dart @@ -5,7 +5,9 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server_api.dart'; +import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; import 'package:selfprivacy/logic/api_maps/tls_options.dart'; +import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/callback_dialogue_branching.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; @@ -199,8 +201,23 @@ class ServerInstallationCubit extends Cubit { applicationKey: applicationKey, provider: BackupsProviderType.backblaze, ); + final BackblazeBucket? bucket; await repository.saveBackblazeKey(backblazeCredential); if (state is ServerInstallationRecovery) { + final configuration = await ServerApi( + customToken: + (state as ServerInstallationRecovery).serverDetails!.apiToken, + isWithToken: true, + ).getBackupsConfiguration(); + if (configuration != null) { + try { + bucket = await BackblazeApi() + .fetchBucket(backblazeCredential, configuration); + await getIt().storeBackblazeBucket(bucket!); + } catch (e) { + print(e); + } + } finishRecoveryProcess(backblazeCredential); return; } From 5b363a9eb68fc8cc1db485c13a044a36113f45d3 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 7 Aug 2023 09:06:32 +0000 Subject: [PATCH 691/732] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ --- assets/translations/az.json | 3 +-- assets/translations/be.json | 3 +-- assets/translations/cs.json | 3 +-- assets/translations/de.json | 3 +-- assets/translations/fr.json | 3 +-- assets/translations/lv.json | 1 - assets/translations/pl.json | 3 +-- assets/translations/ru.json | 3 +-- assets/translations/sk.json | 3 +-- assets/translations/sl.json | 3 +-- assets/translations/th.json | 3 +-- assets/translations/uk.json | 3 +-- 12 files changed, 11 insertions(+), 23 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index aae7107a..efe09e29 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -123,7 +123,6 @@ "disk": "Disk", "monthly_cost": "Aylıq xərc", "location": "Yerləşdirmə", - "provider": "Provayder", "core_count": { "one": "{} nüvəs", "two": "{} nüvələr", @@ -500,4 +499,4 @@ "reset_onboarding_description": "Enerji ekranını yenidən göstərmək üçün güc açarının sıfırlanması", "cubit_statuses": "Yükləmə kubitlərinin cari vəziyyəti" } -} \ No newline at end of file +} diff --git a/assets/translations/be.json b/assets/translations/be.json index c6dbf7e9..3cbb05db 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -425,7 +425,6 @@ "disk": "Дыск", "monthly_cost": "Штомесячны кошт", "location": "Размяшчэнне", - "provider": "Правайдэр", "core_count": { "one": "{} ядро", "two": "{} ядра", @@ -510,4 +509,4 @@ "support": { "title": "Падтрымка SelfPrivacy" } -} \ No newline at end of file +} diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 5186b74e..0c9bcb1a 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -118,7 +118,6 @@ "disk": "Místní disk", "monthly_cost": "Měsíční náklady", "location": "Umístění", - "provider": "Poskytovatel", "core_count": { "two": "{} jádra", "few": "{} jádra", @@ -510,4 +509,4 @@ "ignore_tls": "Nekontrolujte certifikáty TLS", "ignore_tls_description": "Aplikace nebude při připojování k serveru ověřovat certifikáty TLS." } -} \ No newline at end of file +} diff --git a/assets/translations/de.json b/assets/translations/de.json index 86cc3518..0203a7a1 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -123,7 +123,6 @@ "disk": "Festplatte", "monthly_cost": "Monatliche Kosten", "location": "Standort", - "provider": "Provider", "core_count": { "one": "{} Kern", "two": "{} Kerne", @@ -510,4 +509,4 @@ "ignore_tls": "Überprüfen Sie keine TLS-Zertifikate", "ignore_tls_description": "Die Anwendung validiert TLS-Zertifikate nicht, wenn sie eine Verbindung zum Server herstellt." } -} \ No newline at end of file +} diff --git a/assets/translations/fr.json b/assets/translations/fr.json index e015c782..5fa6d1cc 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -111,7 +111,6 @@ "disk": "Disque local", "monthly_cost": "Coût mensuel", "location": "Localisation", - "provider": "Fournisseur", "core_count": { "one": "{} cœur", "two": "{} cœurs", @@ -286,4 +285,4 @@ "title": "Serveur VPN", "subtitle": "Serveur VPN privé" } -} \ No newline at end of file +} diff --git a/assets/translations/lv.json b/assets/translations/lv.json index 7fbfb797..bac9a852 100644 --- a/assets/translations/lv.json +++ b/assets/translations/lv.json @@ -121,7 +121,6 @@ "disk": "Disks lokāls", "monthly_cost": "Mēneša maksa", "location": "Vieta", - "provider": "Sniedzējs", "core_count": { "one": "{} kodols", "two": "{} kodoli", diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 5a90cc86..fcac7efd 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -118,7 +118,6 @@ "disk": "Dysk lokalny", "monthly_cost": "Koszt miesięczny", "location": "Lokalizacja danych", - "provider": "Dostawca", "core_count": { "one": "{} jądro", "two": "{} jądra", @@ -509,4 +508,4 @@ "cubit_statuses": "Aktualny stan qubitów ładujących", "ignore_tls": "Używane podczas konfigurowania nowego serwera." } -} \ No newline at end of file +} diff --git a/assets/translations/ru.json b/assets/translations/ru.json index ae4dac6b..e5c200a0 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -124,7 +124,6 @@ "disk": "Диск", "monthly_cost": "Ежемесячная стоимость", "location": "Размещение", - "provider": "Провайдер", "core_count": { "one": "{} ядро", "two": "{} ядра", @@ -535,4 +534,4 @@ "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", "ignore_tls": "Не проверять сертификаты TLS" } -} \ No newline at end of file +} diff --git a/assets/translations/sk.json b/assets/translations/sk.json index c79d251e..fe0a67e0 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -173,7 +173,6 @@ "disk": "Lokálny disk", "monthly_cost": "Mesačná cena", "location": "Lokalita", - "provider": "Poskytovateľ", "core_count": { "one": "{} jadro", "two": "{} jadrá", @@ -500,4 +499,4 @@ "reset_onboarding_description": "Resetovanie vypínača na opätovné zobrazenie obrazovky zapnutia", "cubit_statuses": "Aktuálny stav načítavania qubitov" } -} \ No newline at end of file +} diff --git a/assets/translations/sl.json b/assets/translations/sl.json index 4cbf91d1..f8250745 100644 --- a/assets/translations/sl.json +++ b/assets/translations/sl.json @@ -116,8 +116,7 @@ "ram": "Glavni pomnilnik", "disk": "Lokalni disk", "monthly_cost": "Mesečni stroški", - "location": "Lokacija", - "provider": "Ponudnik" + "location": "Lokacija" }, "ssh": { "root_subtitle": "Lastniki tukaj navedenih ključev imajo popoln dostop do podatkov in nastavitev strežnika. Dodajte samo svoje ključe.", diff --git a/assets/translations/th.json b/assets/translations/th.json index aa54a203..de7c5082 100644 --- a/assets/translations/th.json +++ b/assets/translations/th.json @@ -149,7 +149,6 @@ "ram": "หน่วยความจำ", "monthly_cost": "รายจ่ายต่อเดือน", "location": "สถานที่", - "provider": "ผู้ให้บริการ", "core_count": { "one": "{} core", "two": "{} จำนวนคอร์", @@ -293,4 +292,4 @@ "title": "เซิฟเวอร์ VPN", "subtitle": "เซิฟเวอร์ VPN ส่วนตัว" } -} \ No newline at end of file +} diff --git a/assets/translations/uk.json b/assets/translations/uk.json index d3384ca5..1c1e5a3a 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -210,7 +210,6 @@ "server_id": "Сервер ID", "cpu": "Процессор", "ram": "Пам'ять", - "provider": "Провайдер", "core_count": { "one": "{} ядро", "few": "{} ядра", @@ -469,4 +468,4 @@ "root_name": "Не може бути 'root'", "length_not_equal": "Довжина [], має бути {}" } -} \ No newline at end of file +} From 30fde19ce9c09eea8f4dfa6466d5e2b2dd101b8a Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 27 Aug 2023 10:57:41 +0000 Subject: [PATCH 692/732] Translated using Weblate (Russian) Currently translated at 100.0% (475 of 475 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index e5c200a0..fd8535f6 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -130,7 +130,9 @@ "few": "{} ядра", "many": "{} ядер", "other": "{} ядер" - } + }, + "server_provider": "Провайдер сервера", + "dns_provider": "Провайдер DNS" }, "record": { "root": "Корневой домен", @@ -199,7 +201,25 @@ "autobackup_period_set": "Период установлен", "backups_encryption_key": "Ключ шифрования", "snapshots_title": "Список снимков", - "forget_snapshot_error": "Не удалось забыть снимок" + "forget_snapshot_error": "Не удалось забыть снимок", + "backups_encryption_key_not_found": "Ключ шифрования пока не найден, повторите попытку позже.", + "forget_snapshot_alert": "Вы собираетесь удалить этот снимок. Вы уверены? Это действие обычно нельзя отменить.", + "snapshot_modal_select_strategy": "Выберите стратегию восстановления", + "snapshot_modal_download_verify_option_description": "Меньше риск, но требуется больше свободного места. Загрузка всего моментального снимка во временное хранилище, его проверка и последующая замена текущих данных.", + "snapshot_modal_service_not_found": "Это снимок службы, которой больше нет на вашем сервере. Обычно этого не должно происходить, и мы не можем выполнить автоматическое восстановление. Вы можете загрузить снимок и восстановить его вручную. Обратитесь в службу поддержки SelfPrivacy, если вам нужна помощь.", + "backups_encryption_key_subtitle": "Храните его в безопасном месте.", + "backups_encryption_key_copy": "Скопируйте ключ шифрования", + "backups_encryption_key_show": "Показать ключ шифрования", + "backups_encryption_key_description": "Этот ключ используется для шифрования резервных копий. Если вы его потеряете, то не сможете восстановить резервные копии. Храните его в надежном месте, так как он может пригодиться в случае необходимости восстановления из резервных копий вручную.", + "forget_snapshot": "Забудьте о моментальном снимке", + "snapshot_modal_heading": "Сведения о снимке", + "snapshot_service_title": "Сервис", + "snapshot_creation_time_title": "Время создания", + "snapshot_id_title": "ID снимка", + "snapshot_modal_download_verify_option_title": "Загрузите, проверьте и затем замените", + "snapshot_modal_inplace_option_title": "Заменить на месте", + "snapshot_modal_inplace_option_description": "Требуется меньше свободного места, но риск выше. При загрузке текущие данные заменяются данными моментального снимка.", + "restore_started": "Восстановление началось, проверьте текущий статус в списке заданий" }, "storage": { "card_title": "Хранилище", From 9d7bb26ab8e156aa23b9ee89ae48cbc60def37bf Mon Sep 17 00:00:00 2001 From: Mithras Date: Sun, 27 Aug 2023 11:30:33 +0000 Subject: [PATCH 693/732] Translated using Weblate (Ukrainian) Currently translated at 88.2% (419 of 475 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/uk/ --- assets/translations/uk.json | 38 ++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/assets/translations/uk.json b/assets/translations/uk.json index 1c1e5a3a..7d9400a9 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -33,7 +33,8 @@ "delete": "Видалити", "close": "Закрити", "connect": "Підключіться", - "app_name": "SelfPrivacy" + "app_name": "SelfPrivacy", + "copied_to_clipboard": "Скопійовано в буфер обміну!" }, "locale": "ua", "application_settings": { @@ -43,7 +44,10 @@ "dark_theme_description": "Змінити тему додатка", "reset_config_description": "Скинути API ключі та root користувача.", "delete_server_title": "Видалити сервер", - "delete_server_description": "Це видалить ваш сервер. Він більше не буде доступний." + "delete_server_description": "Це видалить ваш сервер. Він більше не буде доступний.", + "system_dark_theme_title": "Системна тема за замовчуванням", + "system_dark_theme_description": "Використовуйте світлу або темну теми залежно від системних налаштувань", + "dangerous_settings": "Небезпечні налаштування" }, "ssh": { "delete_confirm_question": "Ви впевнені, що хочете видалити SSH-ключ?", @@ -223,7 +227,9 @@ "server_timezone": "Часовий пояс сервера", "timezone_search_bar": "Ім'я часового поясу або значення зсуву часу", "monthly_cost": "Щомісячна вартість", - "location": "Місцезнаходження" + "location": "Місцезнаходження", + "server_provider": "Провайдер сервера", + "dns_provider": "Провайдер DNS" }, "record": { "api": "SelfPrivacy API", @@ -250,7 +256,7 @@ "email_title": "Електронна пошта", "email_subtitle": "Записи, необхідні для безпечного обміну електронною поштою.", "update_list": "Лист оновлень", - "error_subtitle": "Нажміть сюди, щоб виправити їх", + "error_subtitle": "Натисніть тут, щоб виправити їх. При цьому також буде видалено користувацькі записи.", "services_subtitle": "Введіть \"А\" записи, необхідні для кожної служби." }, "backup": { @@ -269,7 +275,29 @@ "description": "Врятує ваш день у разі аварії: хакерська атака, видаленя серверу, тощо.", "waiting_for_rebuild": "Ви зможете створити свою першу резервну копію через кілька хвилин.", "restoring": "Відновлення з резервної копії", - "restore_alert": "Ви збираєтеся відновити з резервної копії. створеної на {}. Усі поточні дані будуть втрачені. Ви згодні?" + "restore_alert": "Ви збираєтеся відновити з резервної копії. створеної на {}. Усі поточні дані будуть втрачені. Ви згодні?", + "refetch_backups_subtitle": "Скинути кеш і запросити дані у провайдера. Може спричинити додаткові витрати.", + "reupload_key_subtitle": "Ще раз проініціалізує сховище резервних копій. Використовуйте, якщо щось зламалося.", + "create_new_select_heading": "Вибрати сервіси для копіювання", + "start": "Почати створення копій", + "service_busy": "Зараз створюються інші резервні копії", + "latest_snapshots": "Останні знімки", + "latest_snapshots_subtitle": "Останні 15 знімків", + "show_more": "Показати ще", + "autobackup_period_title": "Період автоматичного копіювання", + "autobackup_period_subtitle": "Створення копій раз на {period}", + "autobackup_period_never": "Автоматичне копіювання вимкнено", + "autobackup_period_every": "Раз у {period}", + "autobackup_period_disable": "Вимкнути автоматичні копіювання", + "autobackup_custom": "Інше", + "autobackup_custom_hint": "Введіть період у хвилинах", + "autobackup_set_period": "Встановити період", + "autobackup_period_set": "Період встановлено", + "backups_encryption_key": "Ключ шифрування", + "backups_encryption_key_subtitle": "Зберігайте його в безпечному місці.", + "backups_encryption_key_copy": "Скопіюйте ключ шифрування", + "card_subtitle": "Керуйте резервними копіями", + "select_all": "Копіювати все" }, "storage": { "card_title": "Серверне сховище", From 0984892a014be76b36955015e41e67968d0715d0 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 6 Sep 2023 20:01:56 +0300 Subject: [PATCH 694/732] feat: UI tweaks for server costs --- assets/translations/en.json | 4 +- .../initializing/server_type_picker.dart | 138 +++++++++++++++--- 2 files changed, 116 insertions(+), 26 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 0a25ff43..4ba733ac 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -358,9 +358,9 @@ "choose_server_type_ram": "{} GB of RAM", "choose_server_type_storage": "{} GB of system storage", "choose_server_type_payment_per_month": "{} per month", - "choose_server_type_payment_server": "{} for server", + "choose_server_type_payment_server": "{} for the server", "choose_server_type_payment_storage": "{} for additional storage", - "choose_server_type_payment_ip": "{} for public IPv4", + "choose_server_type_payment_ip": "{} for the public IPv4 address", "no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.", "dns_provider_bad_key_error": "API key is invalid", "backblaze_bad_key_error": "Backblaze storage information is invalid", diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index cb9b496a..3ce0f94b 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -338,32 +338,122 @@ class SelectTypePage extends StatelessWidget { ), ], ), - Text( - 'initializing.choose_server_type_payment_server' - .tr( - args: [type.price.value.toString()], + IntrinsicHeight( + child: Row( + children: [ + VerticalDivider( + width: 24.0, + indent: 4.0, + endIndent: 4.0, + color: Theme.of(context) + .colorScheme + .onSurface + .withAlpha(128), + ), + const SizedBox(width: 8), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + Icons.memory_outlined, + color: Theme.of(context) + .colorScheme + .onSurface + .withAlpha(128), + size: 16, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_payment_server' + .tr( + args: [ + type.price.value + .toString() + ], + ), + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: Theme.of(context) + .colorScheme + .onSurface + .withAlpha(128), + ), + ), + ], + ), + Row( + children: [ + Icon( + Icons.sd_card_outlined, + color: Theme.of(context) + .colorScheme + .onSurface + .withAlpha(128), + size: 16, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_payment_storage' + .tr( + args: [ + storagePrice.toString() + ], + ), + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: Theme.of(context) + .colorScheme + .onSurface + .withAlpha(128), + ), + ), + ], + ), + if (publicIpPrice != 0) + Row( + children: [ + Icon( + Icons.lan_outlined, + color: Theme.of(context) + .colorScheme + .onSurface + .withAlpha(128), + size: 16, + ), + const SizedBox(width: 8), + Text( + 'initializing.choose_server_type_payment_ip' + .tr( + args: [ + publicIpPrice.toString() + ], + ), + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: Theme.of( + context, + ) + .colorScheme + .onSurface + .withAlpha(128), + ), + ), + ], + ), + ], + ), + ], ), - style: - Theme.of(context).textTheme.bodyMedium, ), - Text( - 'initializing.choose_server_type_payment_storage' - .tr( - args: [storagePrice.toString()], - ), - style: - Theme.of(context).textTheme.bodyMedium, - ), - if (publicIpPrice != 0) - Text( - 'initializing.choose_server_type_payment_ip' - .tr( - args: [publicIpPrice.toString()], - ), - style: Theme.of(context) - .textTheme - .bodyMedium, - ), ], ), ), From ffa985aba23b98c4374efb0b2d10d74c88aa3319 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 6 Sep 2023 23:03:06 -0300 Subject: [PATCH 695/732] feat: Implement copying to clipboard for snapshot id of backups --- .../pages/backups/snapshot_id_list_tile.dart | 52 +++++++++++++++++++ lib/ui/pages/backups/snapshot_modal.dart | 14 +---- 2 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 lib/ui/pages/backups/snapshot_id_list_tile.dart diff --git a/lib/ui/pages/backups/snapshot_id_list_tile.dart b/lib/ui/pages/backups/snapshot_id_list_tile.dart new file mode 100644 index 00000000..dc821264 --- /dev/null +++ b/lib/ui/pages/backups/snapshot_id_list_tile.dart @@ -0,0 +1,52 @@ +import 'dart:async'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class SnapshotIdListTile extends StatefulWidget { + const SnapshotIdListTile({ + required this.snapshotId, + super.key, + }); + + final String snapshotId; + + @override + State createState() => _SnapshotIdListTileState(); +} + +class _SnapshotIdListTileState extends State { + bool copiedToClipboard = false; + + void handleTimeout() { + setState(() { + copiedToClipboard = false; + }); + } + + @override + Widget build(final BuildContext context) => ListTile( + onLongPress: () { + if (copiedToClipboard == false) { + Clipboard.setData(ClipboardData(text: widget.snapshotId)); + Timer(const Duration(seconds: 2), handleTimeout); + setState(() { + copiedToClipboard = true; + }); + } + }, + leading: Icon( + Icons.numbers_outlined, + color: Theme.of(context).colorScheme.onSurface, + ), + title: Text( + copiedToClipboard + ? 'basis.copied_to_clipboard'.tr() + : 'backup.snapshot_id_title'.tr(), + ), + subtitle: Text( + copiedToClipboard ? '' : widget.snapshotId, + ), + ); +} diff --git a/lib/ui/pages/backups/snapshot_modal.dart b/lib/ui/pages/backups/snapshot_modal.dart index 147fe72a..af9269e5 100644 --- a/lib/ui/pages/backups/snapshot_modal.dart +++ b/lib/ui/pages/backups/snapshot_modal.dart @@ -11,6 +11,7 @@ import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/pages/backups/snapshot_id_list_tile.dart'; class SnapshotModal extends StatefulWidget { const SnapshotModal({ @@ -95,18 +96,7 @@ class _SnapshotModalState extends State { '${MaterialLocalizations.of(context).formatShortDate(widget.snapshot.time)} ${TimeOfDay.fromDateTime(widget.snapshot.time).format(context)}', ), ), - ListTile( - leading: Icon( - Icons.numbers_outlined, - color: Theme.of(context).colorScheme.onSurface, - ), - title: Text( - 'backup.snapshot_id_title'.tr(), - ), - subtitle: Text( - widget.snapshot.id, - ), - ), + SnapshotIdListTile(snapshotId: widget.snapshot.id), if (service != null) Column( children: [ From e07394e8b1899dfa0520f8730ff4c41852a0115b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 6 Sep 2023 23:31:47 -0300 Subject: [PATCH 696/732] feat: Implement visible accent when backup modal buttons are disabled --- lib/ui/pages/backups/backup_details.dart | 69 ++++++++++++++++++++---- 1 file changed, 60 insertions(+), 9 deletions(-) diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 1d08dfac..02838eda 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -83,6 +83,9 @@ class BackupDetailsPage extends StatelessWidget { ); } + Color? getOverrideColor() => + preventActions ? Theme.of(context).colorScheme.secondary : null; + return BrandHeroScreen( heroIcon: BrandIcons.save, heroTitle: 'backup.card_title'.tr(), @@ -110,11 +113,15 @@ class BackupDetailsPage extends StatelessWidget { ), ); }, - leading: const Icon( + leading: Icon( Icons.add_circle_outline_rounded, + color: getOverrideColor(), ), title: Text( 'backup.create_new'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), ), ListTile( @@ -138,13 +145,20 @@ class BackupDetailsPage extends StatelessWidget { ), ); }, - leading: const Icon( + leading: Icon( Icons.manage_history_outlined, + color: getOverrideColor(), ), title: Text( 'backup.autobackup_period_title'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), subtitle: Text( + style: TextStyle( + color: getOverrideColor(), + ), autobackupPeriod != null ? 'backup.autobackup_period_subtitle'.tr( namedArgs: { @@ -175,14 +189,21 @@ class BackupDetailsPage extends StatelessWidget { ), ); }, - leading: const Icon( + leading: Icon( Icons.key_outlined, + color: getOverrideColor(), ), title: Text( 'backup.backups_encryption_key'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), subtitle: Text( 'backup.backups_encryption_key_subtitle'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), ), const SizedBox(height: 8), @@ -227,10 +248,16 @@ class BackupDetailsPage extends StatelessWidget { ), if (backups.isEmpty) ListTile( - leading: const Icon( + leading: Icon( Icons.error_outline, + color: getOverrideColor(), + ), + title: Text( + 'backup.no_backups'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), - title: Text('backup.no_backups'.tr()), ), if (backups.isNotEmpty) Column( @@ -282,9 +309,15 @@ class BackupDetailsPage extends StatelessWidget { ); }, title: Text( + style: TextStyle( + color: getOverrideColor(), + ), '${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}', ), subtitle: Text( + style: TextStyle( + color: getOverrideColor(), + ), service?.displayName ?? backup.fallbackServiceName, ), leading: service != null @@ -293,12 +326,16 @@ class BackupDetailsPage extends StatelessWidget { height: 24, width: 24, colorFilter: ColorFilter.mode( - Theme.of(context).colorScheme.onBackground, + getOverrideColor() ?? + Theme.of(context) + .colorScheme + .onBackground, BlendMode.srcIn, ), ) - : const Icon( + : Icon( Icons.question_mark_outlined, + color: getOverrideColor(), ), ); }, @@ -339,12 +376,19 @@ class BackupDetailsPage extends StatelessWidget { ListTile( title: Text( 'backup.refetch_backups'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), subtitle: Text( 'backup.refetch_backups_subtitle'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), - leading: const Icon( + leading: Icon( Icons.cached_outlined, + color: getOverrideColor(), ), onTap: preventActions ? null @@ -356,12 +400,19 @@ class BackupDetailsPage extends StatelessWidget { ListTile( title: Text( 'backup.reupload_key'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), subtitle: Text( 'backup.reupload_key_subtitle'.tr(), + style: TextStyle( + color: getOverrideColor(), + ), ), - leading: const Icon( + leading: Icon( Icons.warning_amber_outlined, + color: getOverrideColor(), ), onTap: preventActions ? null From 7b8d9ddca911677ae67c34f5100322c422d6acea Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 6 Sep 2023 23:41:34 -0300 Subject: [PATCH 697/732] fix: Change 'mailserver' string id to 'email' in loginInfo switch --- lib/logic/models/service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index d79615e8..b7fee609 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -56,7 +56,7 @@ class Service { /// TODO Turn loginInfo into dynamic data, not static! String get loginInfo { switch (id) { - case 'mailserver': + case 'email': return 'mail.login_info'.tr(); case 'bitwarden': return 'password_manager.login_info'.tr(); From fe93360870ad5e3417c9568883148085554c6bb2 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 7 Sep 2023 14:35:42 +0300 Subject: [PATCH 698/732] refactor: Use snackbar to show snapshot id copy notification --- lib/logic/get_it/navigation.dart | 3 +- .../pages/backups/snapshot_id_list_tile.dart | 40 +--- lib/ui/pages/backups/snapshot_modal.dart | 215 +++++++++--------- 3 files changed, 120 insertions(+), 138 deletions(-) diff --git a/lib/logic/get_it/navigation.dart b/lib/logic/get_it/navigation.dart index 90f67203..dac1dc8d 100644 --- a/lib/logic/get_it/navigation.dart +++ b/lib/logic/get_it/navigation.dart @@ -21,11 +21,12 @@ class NavigationService { ); } - void showSnackBar(final String text) { + void showSnackBar(final String text, {final SnackBarBehavior? behavior}) { final ScaffoldMessengerState state = scaffoldMessengerKey.currentState!; final SnackBar snack = SnackBar( content: Text(text), duration: const Duration(seconds: 2), + behavior: behavior, ); state.showSnackBar(snack); } diff --git a/lib/ui/pages/backups/snapshot_id_list_tile.dart b/lib/ui/pages/backups/snapshot_id_list_tile.dart index dc821264..e159d888 100644 --- a/lib/ui/pages/backups/snapshot_id_list_tile.dart +++ b/lib/ui/pages/backups/snapshot_id_list_tile.dart @@ -1,10 +1,9 @@ -import 'dart:async'; - import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; -class SnapshotIdListTile extends StatefulWidget { +class SnapshotIdListTile extends StatelessWidget { const SnapshotIdListTile({ required this.snapshotId, super.key, @@ -12,41 +11,20 @@ class SnapshotIdListTile extends StatefulWidget { final String snapshotId; - @override - State createState() => _SnapshotIdListTileState(); -} - -class _SnapshotIdListTileState extends State { - bool copiedToClipboard = false; - - void handleTimeout() { - setState(() { - copiedToClipboard = false; - }); - } - @override Widget build(final BuildContext context) => ListTile( onLongPress: () { - if (copiedToClipboard == false) { - Clipboard.setData(ClipboardData(text: widget.snapshotId)); - Timer(const Duration(seconds: 2), handleTimeout); - setState(() { - copiedToClipboard = true; - }); - } + Clipboard.setData(ClipboardData(text: snapshotId)); + getIt().showSnackBar( + 'basis.copied_to_clipboard'.tr(), + behavior: SnackBarBehavior.floating, + ); }, leading: Icon( Icons.numbers_outlined, color: Theme.of(context).colorScheme.onSurface, ), - title: Text( - copiedToClipboard - ? 'basis.copied_to_clipboard'.tr() - : 'backup.snapshot_id_title'.tr(), - ), - subtitle: Text( - copiedToClipboard ? '' : widget.snapshotId, - ), + title: Text('backup.snapshot_id_title'.tr()), + subtitle: Text(snapshotId), ); } diff --git a/lib/ui/pages/backups/snapshot_modal.dart b/lib/ui/pages/backups/snapshot_modal.dart index af9269e5..0f1bac3d 100644 --- a/lib/ui/pages/backups/snapshot_modal.dart +++ b/lib/ui/pages/backups/snapshot_modal.dart @@ -52,114 +52,117 @@ class _SnapshotModalState extends State { .state .getServiceById(widget.snapshot.serviceId); - return ListView( - controller: widget.scrollController, - padding: const EdgeInsets.all(16), - children: [ - const SizedBox(height: 16), - Text( - 'backup.snapshot_modal_heading'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - textAlign: TextAlign.center, - ), - const SizedBox(height: 16), - ListTile( - leading: service != null - ? SvgPicture.string( - service.svgIcon, - height: 24, - width: 24, - colorFilter: ColorFilter.mode( - Theme.of(context).colorScheme.onSurface, - BlendMode.srcIn, + return Scaffold( + backgroundColor: Colors.transparent, + body: ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.snapshot_modal_heading'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 16), + ListTile( + leading: service != null + ? SvgPicture.string( + service.svgIcon, + height: 24, + width: 24, + colorFilter: ColorFilter.mode( + Theme.of(context).colorScheme.onSurface, + BlendMode.srcIn, + ), + ) + : const Icon( + Icons.question_mark_outlined, ), - ) - : const Icon( - Icons.question_mark_outlined, - ), - title: Text( - 'backup.snapshot_service_title'.tr(), - ), - subtitle: Text( - service?.displayName ?? widget.snapshot.fallbackServiceName, - ), - ), - ListTile( - leading: Icon( - Icons.access_time_outlined, - color: Theme.of(context).colorScheme.onSurface, - ), - title: Text( - 'backup.snapshot_creation_time_title'.tr(), - ), - subtitle: Text( - '${MaterialLocalizations.of(context).formatShortDate(widget.snapshot.time)} ${TimeOfDay.fromDateTime(widget.snapshot.time).format(context)}', - ), - ), - SnapshotIdListTile(snapshotId: widget.snapshot.id), - if (service != null) - Column( - children: [ - const SizedBox(height: 8), - Text( - 'backup.snapshot_modal_select_strategy'.tr(), - style: Theme.of(context).textTheme.titleMedium, - ), - const SizedBox(height: 8), - _BackupStrategySelectionCard( - isSelected: selectedStrategy == - BackupRestoreStrategy.downloadVerifyOverwrite, - onTap: () { - setState(() { - selectedStrategy = - BackupRestoreStrategy.downloadVerifyOverwrite; - }); - }, - title: - 'backup.snapshot_modal_download_verify_option_title'.tr(), - subtitle: - 'backup.snapshot_modal_download_verify_option_description' - .tr(), - ), - const SizedBox(height: 8), - _BackupStrategySelectionCard( - isSelected: selectedStrategy == BackupRestoreStrategy.inplace, - onTap: () { - setState(() { - selectedStrategy = BackupRestoreStrategy.inplace; - }); - }, - title: 'backup.snapshot_modal_inplace_option_title'.tr(), - subtitle: - 'backup.snapshot_modal_inplace_option_description'.tr(), - ), - const SizedBox(height: 8), - // Restore backup button - BrandButton.filled( - onPressed: isServiceBusy - ? null - : () { - context.read().restoreBackup( - widget.snapshot.id, - selectedStrategy, - ); - Navigator.of(context).pop(); - getIt() - .showSnackBar('backup.restore_started'.tr()); - }, - text: 'backup.restore'.tr(), - ), - ], - ) - else - Padding( - padding: const EdgeInsets.all(16.0), - child: InfoBox( - isWarning: true, - text: 'backup.snapshot_modal_service_not_found'.tr(), + title: Text( + 'backup.snapshot_service_title'.tr(), ), - ) - ], + subtitle: Text( + service?.displayName ?? widget.snapshot.fallbackServiceName, + ), + ), + ListTile( + leading: Icon( + Icons.access_time_outlined, + color: Theme.of(context).colorScheme.onSurface, + ), + title: Text( + 'backup.snapshot_creation_time_title'.tr(), + ), + subtitle: Text( + '${MaterialLocalizations.of(context).formatShortDate(widget.snapshot.time)} ${TimeOfDay.fromDateTime(widget.snapshot.time).format(context)}', + ), + ), + SnapshotIdListTile(snapshotId: widget.snapshot.id), + if (service != null) + Column( + children: [ + const SizedBox(height: 8), + Text( + 'backup.snapshot_modal_select_strategy'.tr(), + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + _BackupStrategySelectionCard( + isSelected: selectedStrategy == + BackupRestoreStrategy.downloadVerifyOverwrite, + onTap: () { + setState(() { + selectedStrategy = + BackupRestoreStrategy.downloadVerifyOverwrite; + }); + }, + title: + 'backup.snapshot_modal_download_verify_option_title'.tr(), + subtitle: + 'backup.snapshot_modal_download_verify_option_description' + .tr(), + ), + const SizedBox(height: 8), + _BackupStrategySelectionCard( + isSelected: selectedStrategy == BackupRestoreStrategy.inplace, + onTap: () { + setState(() { + selectedStrategy = BackupRestoreStrategy.inplace; + }); + }, + title: 'backup.snapshot_modal_inplace_option_title'.tr(), + subtitle: + 'backup.snapshot_modal_inplace_option_description'.tr(), + ), + const SizedBox(height: 8), + // Restore backup button + BrandButton.filled( + onPressed: isServiceBusy + ? null + : () { + context.read().restoreBackup( + widget.snapshot.id, + selectedStrategy, + ); + Navigator.of(context).pop(); + getIt() + .showSnackBar('backup.restore_started'.tr()); + }, + text: 'backup.restore'.tr(), + ), + ], + ) + else + Padding( + padding: const EdgeInsets.all(16.0), + child: InfoBox( + isWarning: true, + text: 'backup.snapshot_modal_service_not_found'.tr(), + ), + ) + ], + ), ); } } From cd452d5f26b8ccc70fb39248b73ba2bccc41fd07 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 7 Sep 2023 18:04:26 -0300 Subject: [PATCH 699/732] refactor: Change getOverrideColor lambda to simple variable in backup page --- lib/ui/pages/backups/backup_details.dart | 42 ++++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 02838eda..31f07e9d 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -83,7 +83,7 @@ class BackupDetailsPage extends StatelessWidget { ); } - Color? getOverrideColor() => + final Color? overrideColor = preventActions ? Theme.of(context).colorScheme.secondary : null; return BrandHeroScreen( @@ -115,12 +115,12 @@ class BackupDetailsPage extends StatelessWidget { }, leading: Icon( Icons.add_circle_outline_rounded, - color: getOverrideColor(), + color: overrideColor, ), title: Text( 'backup.create_new'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), ), @@ -147,17 +147,17 @@ class BackupDetailsPage extends StatelessWidget { }, leading: Icon( Icons.manage_history_outlined, - color: getOverrideColor(), + color: overrideColor, ), title: Text( 'backup.autobackup_period_title'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), subtitle: Text( style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), autobackupPeriod != null ? 'backup.autobackup_period_subtitle'.tr( @@ -191,18 +191,18 @@ class BackupDetailsPage extends StatelessWidget { }, leading: Icon( Icons.key_outlined, - color: getOverrideColor(), + color: overrideColor, ), title: Text( 'backup.backups_encryption_key'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), subtitle: Text( 'backup.backups_encryption_key_subtitle'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), ), @@ -250,12 +250,12 @@ class BackupDetailsPage extends StatelessWidget { ListTile( leading: Icon( Icons.error_outline, - color: getOverrideColor(), + color: overrideColor, ), title: Text( 'backup.no_backups'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), ), @@ -310,13 +310,13 @@ class BackupDetailsPage extends StatelessWidget { }, title: Text( style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), '${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}', ), subtitle: Text( style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), service?.displayName ?? backup.fallbackServiceName, ), @@ -326,7 +326,7 @@ class BackupDetailsPage extends StatelessWidget { height: 24, width: 24, colorFilter: ColorFilter.mode( - getOverrideColor() ?? + overrideColor ?? Theme.of(context) .colorScheme .onBackground, @@ -335,7 +335,7 @@ class BackupDetailsPage extends StatelessWidget { ) : Icon( Icons.question_mark_outlined, - color: getOverrideColor(), + color: overrideColor, ), ); }, @@ -377,18 +377,18 @@ class BackupDetailsPage extends StatelessWidget { title: Text( 'backup.refetch_backups'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), subtitle: Text( 'backup.refetch_backups_subtitle'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), leading: Icon( Icons.cached_outlined, - color: getOverrideColor(), + color: overrideColor, ), onTap: preventActions ? null @@ -401,18 +401,18 @@ class BackupDetailsPage extends StatelessWidget { title: Text( 'backup.reupload_key'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), subtitle: Text( 'backup.reupload_key_subtitle'.tr(), style: TextStyle( - color: getOverrideColor(), + color: overrideColor, ), ), leading: Icon( Icons.warning_amber_outlined, - color: getOverrideColor(), + color: overrideColor, ), onTap: preventActions ? null From 3c548e5aa991f631774ee8a6fc1353133cbd2823 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 7 Sep 2023 18:25:13 -0300 Subject: [PATCH 700/732] feat: Add copy-to-clipboard for email on user page - Implement setClipboard adapter and encapsulate platform dependency on clipboard service --- .../components/list_tiles/log_list_tile.dart | 10 +++--- .../backups/copy_encryption_key_modal.dart | 8 ++--- .../pages/backups/snapshot_id_list_tile.dart | 4 +-- lib/ui/pages/users/user_details.dart | 32 ++++++++++++------- lib/ui/pages/users/users.dart | 2 ++ lib/utils/platform_adapter.dart | 5 +++ 6 files changed, 37 insertions(+), 24 deletions(-) diff --git a/lib/ui/components/list_tiles/log_list_tile.dart b/lib/ui/components/list_tiles/log_list_tile.dart index 76bc6150..e83765e9 100644 --- a/lib/ui/components/list_tiles/log_list_tile.dart +++ b/lib/ui/components/list_tiles/log_list_tile.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:selfprivacy/logic/models/message.dart'; +import 'package:selfprivacy/utils/platform_adapter.dart'; class LogListItem extends StatelessWidget { const LogListItem({ @@ -71,7 +71,7 @@ class _RestApiRequestMessageItem extends StatelessWidget { if (message.text != null) TextButton( onPressed: () { - Clipboard.setData(ClipboardData(text: message.text ?? '')); + PlatformAdapter.setClipboard(message.text ?? ''); }, child: Text('console_page.copy'.tr()), ), @@ -121,7 +121,7 @@ class _RestApiResponseMessageItem extends StatelessWidget { if (message.text != null) TextButton( onPressed: () { - Clipboard.setData(ClipboardData(text: message.text ?? '')); + PlatformAdapter.setClipboard(message.text ?? ''); }, child: Text('console_page.copy'.tr()), ), @@ -195,7 +195,7 @@ class _GraphQlResponseMessageItem extends StatelessWidget { if (message.text != null) TextButton( onPressed: () { - Clipboard.setData(ClipboardData(text: message.text ?? '')); + PlatformAdapter.setClipboard(message.text ?? ''); }, child: Text('console_page.copy'.tr()), ), @@ -264,7 +264,7 @@ class _GraphQlRequestMessageItem extends StatelessWidget { if (message.text != null) TextButton( onPressed: () { - Clipboard.setData(ClipboardData(text: message.text ?? '')); + PlatformAdapter.setClipboard(message.text ?? ''); }, child: Text('console_page.copy'.tr()), ), diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart index dca9d705..fc16c356 100644 --- a/lib/ui/pages/backups/copy_encryption_key_modal.dart +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -2,11 +2,11 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/utils/platform_adapter.dart'; class CopyEncryptionKeyModal extends StatefulWidget { const CopyEncryptionKeyModal({ @@ -144,11 +144,7 @@ class _CopyEncryptionKeyModalState extends State { }, ); }); - Clipboard.setData( - ClipboardData( - text: encryptionKey, - ), - ); + PlatformAdapter.setClipboard(encryptionKey); }, icon: const Icon(Icons.copy_all_outlined), label: Text( diff --git a/lib/ui/pages/backups/snapshot_id_list_tile.dart b/lib/ui/pages/backups/snapshot_id_list_tile.dart index e159d888..802b90ee 100644 --- a/lib/ui/pages/backups/snapshot_id_list_tile.dart +++ b/lib/ui/pages/backups/snapshot_id_list_tile.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:selfprivacy/config/get_it_config.dart'; +import 'package:selfprivacy/utils/platform_adapter.dart'; class SnapshotIdListTile extends StatelessWidget { const SnapshotIdListTile({ @@ -14,7 +14,7 @@ class SnapshotIdListTile extends StatelessWidget { @override Widget build(final BuildContext context) => ListTile( onLongPress: () { - Clipboard.setData(ClipboardData(text: snapshotId)); + PlatformAdapter.setClipboard(snapshotId); getIt().showSnackBar( 'basis.copied_to_clipboard'.tr(), behavior: SnackBarBehavior.floating, diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index 7ee3a7bd..90ab1603 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -143,17 +143,27 @@ class _UserLogins extends StatelessWidget { final String domainName; @override - Widget build(final BuildContext context) => FilledCard( - child: Column( - children: [ - ListTileOnSurfaceVariant( - title: '${user.login}@$domainName', - subtitle: 'users.email_login'.tr(), - leadingIcon: Icons.alternate_email_outlined, - ), - ], - ), - ); + Widget build(final BuildContext context) { + final email = '${user.login}@$domainName'; + return FilledCard( + child: Column( + children: [ + ListTileOnSurfaceVariant( + onTap: () { + PlatformAdapter.setClipboard(email); + getIt().showSnackBar( + 'basis.copied_to_clipboard'.tr(), + behavior: SnackBarBehavior.floating, + ); + }, + title: email, + subtitle: 'users.email_login'.tr(), + leadingIcon: Icons.alternate_email_outlined, + ), + ], + ), + ); + } } class _SshKeysCard extends StatelessWidget { diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 58cb3b7d..75d89fde 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -3,6 +3,7 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; +import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/forms/user/ssh_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; @@ -22,6 +23,7 @@ import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_varian import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; +import 'package:selfprivacy/utils/platform_adapter.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; part 'empty.dart'; diff --git a/lib/utils/platform_adapter.dart b/lib/utils/platform_adapter.dart index fa40d7d9..7e010dd4 100644 --- a/lib/utils/platform_adapter.dart +++ b/lib/utils/platform_adapter.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/foundation.dart'; +import 'package:flutter/services.dart'; /// SelfPrivacy wrapper for Platform information provider. class PlatformAdapter { @@ -56,4 +57,8 @@ class PlatformAdapter { return 'Unidentified'; } + + static void setClipboard(final String clipboardData) { + Clipboard.setData(ClipboardData(text: clipboardData)); + } } From 14dbdbbc737003f2d01803c8e8b33afd21d5d571 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 8 Sep 2023 02:54:28 -0300 Subject: [PATCH 701/732] feat: Implement dialogue to choose an domain from several during installation --- .../initializing/domain_setup_cubit.dart | 11 ++--- .../server_installation_repository.dart | 2 +- .../dns_providers/digital_ocean_dns.dart | 11 +++-- .../setup/initializing/initializing.dart | 41 ++++++++++++++++--- 4 files changed, 50 insertions(+), 15 deletions(-) diff --git a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart index f4597439..bccbc551 100644 --- a/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart @@ -18,13 +18,11 @@ class DomainSetupCubit extends Cubit { } else if (result.data.length == 1) { emit(Loaded(result.data.first)); } else { - emit(MoreThenOne()); + emit(MoreThenOne(result.data)); } } - Future saveDomain() async { - assert(state is Loaded, 'wrong state'); - final String domainName = (state as Loaded).domain; + Future saveDomain(final String domainName) async { emit(Loading(LoadingTypes.saving)); final dnsProvider = ProvidersController.currentDnsProvider!; @@ -45,7 +43,10 @@ class Initial extends DomainSetupState {} class Empty extends DomainSetupState {} -class MoreThenOne extends DomainSetupState {} +class MoreThenOne extends DomainSetupState { + MoreThenOne(this.domains); + final List domains; +} class Loading extends DomainSetupState { Loading(this.type); diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 4018c7b9..30bccfd5 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -209,7 +209,7 @@ class ServerInstallationRepository { return false; } - return domain == domainResult.data[0]; + return domainResult.data.contains(domain); } Future> isDnsAddressesMatch( diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index 4fac4b65..f4dd23bd 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -59,10 +59,13 @@ class DigitalOceanDnsProvider extends DnsProvider { } domains = result.data - .map( - (final el) => el.name, - ) - .toList(); + .map( + (final el) => el.name, + ) + .toList() + + + /// TODO: OH MY GOD DON"T YOU DARE NOT REMOVING IT NAIJI NAIJIIII DON'T FORGET PLEASE I BET YOU + ['stub.test']; return GenericResult( success: true, diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 4e9b1a78..db6f9af2 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -354,9 +354,39 @@ class InitializingPage extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium, ), if (state is MoreThenOne) - Text( - 'initializing.found_more_domains'.tr(), - style: Theme.of(context).textTheme.bodyMedium, + ...state.domains.map( + (final domain) => Column( + children: [ + SizedBox( + width: double.infinity, + child: Card( + clipBehavior: Clip.antiAlias, + child: InkResponse( + highlightShape: BoxShape.rectangle, + onTap: () => context + .read() + .saveDomain(domain), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + domain, + style: Theme.of(context) + .textTheme + .headlineMedium, + ), + ], + ), + ), + ), + ), + ), + const SizedBox(height: 8), + ], + ), ), if (state is Loaded) ...[ Row( @@ -401,8 +431,9 @@ class InitializingPage extends StatelessWidget { if (state is Loaded) ...[ const SizedBox(height: 32), BrandButton.filled( - onPressed: () => - context.read().saveDomain(), + onPressed: () => context + .read() + .saveDomain(state.domain), text: 'initializing.save_domain'.tr(), ), ], From afa83f0d29a3a971a6025d8eb6b78d5982d1c2ac Mon Sep 17 00:00:00 2001 From: NaiJi Date: Fri, 8 Sep 2023 03:08:02 -0300 Subject: [PATCH 702/732] chore: I embarrassed myself... --- .../providers/dns_providers/digital_ocean_dns.dart | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/logic/providers/dns_providers/digital_ocean_dns.dart b/lib/logic/providers/dns_providers/digital_ocean_dns.dart index f4dd23bd..4fac4b65 100644 --- a/lib/logic/providers/dns_providers/digital_ocean_dns.dart +++ b/lib/logic/providers/dns_providers/digital_ocean_dns.dart @@ -59,13 +59,10 @@ class DigitalOceanDnsProvider extends DnsProvider { } domains = result.data - .map( - (final el) => el.name, - ) - .toList() + - - /// TODO: OH MY GOD DON"T YOU DARE NOT REMOVING IT NAIJI NAIJIIII DON'T FORGET PLEASE I BET YOU - ['stub.test']; + .map( + (final el) => el.name, + ) + .toList(); return GenericResult( success: true, From 062fa725c43b316b54d014bbf85e1466449af71d Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 8 Sep 2023 09:38:08 +0300 Subject: [PATCH 703/732] fix(ui): DNS API key support page was using old code --- lib/ui/components/drawers/support_drawer.dart | 4 ++-- .../initializing/dns_provider_picker.dart | 21 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/lib/ui/components/drawers/support_drawer.dart b/lib/ui/components/drawers/support_drawer.dart index 7b4c5c2b..01fc292d 100644 --- a/lib/ui/components/drawers/support_drawer.dart +++ b/lib/ui/components/drawers/support_drawer.dart @@ -16,8 +16,8 @@ class SupportDrawer extends StatelessWidget { return Drawer( width: 440, child: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(8.0), + child: SafeArea( + minimum: const EdgeInsets.all(8.0), child: Column( children: [ Row( diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 772c093e..69560f5c 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -2,11 +2,10 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; +import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; @@ -125,22 +124,10 @@ class ProviderInputDataPage extends StatelessWidget { const SizedBox(height: 10), BrandOutlinedButton( child: Text('initializing.how'.tr()), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (final BuildContext context) => Padding( - padding: paddingH15V0, - child: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: [ - BrandMarkdown( - fileName: providerInfo.pathToHow, - ), - ], + onPressed: () => context.read().showArticle( + article: providerInfo.pathToHow, + context: context, ), - ), - ), ), ], ); From d5fa841747cf229fa82f82263299d91f3f40add5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 8 Sep 2023 09:57:57 +0300 Subject: [PATCH 704/732] chore: Remove unused 'cloudflare_api_token' translation string --- assets/translations/az.json | 3 +-- assets/translations/be.json | 3 +-- assets/translations/cs.json | 3 +-- assets/translations/de.json | 3 +-- assets/translations/en.json | 1 - assets/translations/pl.json | 3 +-- assets/translations/ru.json | 3 +-- assets/translations/sk.json | 3 +-- assets/translations/uk.json | 3 +-- 9 files changed, 8 insertions(+), 17 deletions(-) diff --git a/assets/translations/az.json b/assets/translations/az.json index aae7107a..14551e57 100644 --- a/assets/translations/az.json +++ b/assets/translations/az.json @@ -300,7 +300,6 @@ "manage_domain_dns": "Domeninizin DNS-ni idarə etmək üçün", "use_this_domain": "Biz bu domendən istifadə edirik?", "use_this_domain_text": "Göstərdiyiniz token bu domen üzərində nəzarəti təmin edir", - "cloudflare_api_token": "CloudFlare API Açarı", "connect_backblaze_storage": "Backblaze bulud yaddaşınızı birləşdirin", "no_connected_domains": "Hazırda heç bir bağlı domen yoxdur", "loading_domain_list": "Domenlərin siyahısı yüklənir", @@ -500,4 +499,4 @@ "reset_onboarding_description": "Enerji ekranını yenidən göstərmək üçün güc açarının sıfırlanması", "cubit_statuses": "Yükləmə kubitlərinin cari vəziyyəti" } -} \ No newline at end of file +} diff --git a/assets/translations/be.json b/assets/translations/be.json index c6dbf7e9..453ba2d9 100644 --- a/assets/translations/be.json +++ b/assets/translations/be.json @@ -32,7 +32,6 @@ "manage_domain_dns": "Для кіравання DNS вашага дамена", "use_this_domain": "Ужываем гэты дамен?", "use_this_domain_text": "Указаны вамі токен дае кантроль над гэтым даменам", - "cloudflare_api_token": "API ключ DNS правайдэра", "connect_backblaze_storage": "Падлучыце хмарнае сховішча Backblaze", "no_connected_domains": "У дадзены момант падлучаных даменаў няма", "loading_domain_list": "Загружаем спіс даменаў", @@ -510,4 +509,4 @@ "support": { "title": "Падтрымка SelfPrivacy" } -} \ No newline at end of file +} diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 5186b74e..edb3c13f 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -144,7 +144,6 @@ "found_more_domains": "Nalezeno více než jedna doména. V zájmu vlastní bezpečnosti vás prosíme o odstranění nepotřebných domén", "server_created": "Vytvořený server. Probíhá kontrola DNS a spouštění serveru…", "choose_server_type_notice": "Důležité je zaměřit se na procesor a paměť RAM. Data vašich služeb budou uložena na připojeném svazku, který lze snadno rozšířit a za který se platí zvlášť.", - "cloudflare_api_token": "Klíč API poskytovatele DNS", "connect_backblaze_storage": "Připojení úložiště Backblaze", "save_domain": "Uložit doménu", "final": "Závěrečný krok", @@ -510,4 +509,4 @@ "ignore_tls": "Nekontrolujte certifikáty TLS", "ignore_tls_description": "Aplikace nebude při připojování k serveru ověřovat certifikáty TLS." } -} \ No newline at end of file +} diff --git a/assets/translations/de.json b/assets/translations/de.json index 86cc3518..f5505d8e 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -278,7 +278,6 @@ "manage_domain_dns": "Zum Verwalten des DNS Ihrer Domain", "use_this_domain": "Diese Domäne verwenden?", "use_this_domain_text": "Das von Ihnen bereitgestellte Token gewährt Zugriff auf die folgende Domäne", - "cloudflare_api_token": "API-Schlüssel des DNS-Anbieters", "connect_backblaze_storage": "Backblaze-Speicher verbinden", "no_connected_domains": "Derzeit keine verbundenen Domains", "loading_domain_list": "Domänenliste wird geladen", @@ -510,4 +509,4 @@ "ignore_tls": "Überprüfen Sie keine TLS-Zertifikate", "ignore_tls_description": "Die Anwendung validiert TLS-Zertifikate nicht, wenn sie eine Verbindung zum Server herstellt." } -} \ No newline at end of file +} diff --git a/assets/translations/en.json b/assets/translations/en.json index 4ba733ac..cb2ccc3b 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -370,7 +370,6 @@ "manage_domain_dns": "To manage your domain's DNS", "use_this_domain": "Use this domain?", "use_this_domain_text": "The token you provided gives access to the following domain", - "cloudflare_api_token": "DNS Provider API Token", "connect_backblaze_storage": "Connect Backblaze storage", "no_connected_domains": "No connected domains at the moment", "loading_domain_list": "Loading domain list", diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 5a90cc86..45c48293 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -321,7 +321,6 @@ "choose_server_type_payment_per_month": "{} miesięcznie", "no_server_types_found": "Nie znaleziono dostępnych typów serwerów! Proszę upewnić się, że masz dostęp do dostawcy serwera...", "use_this_domain": "Kto używa ten domen?", - "cloudflare_api_token": "Klucz API dostawcy DNS", "connect_backblaze_storage": "Dodajcie Blackblaze", "no_connected_domains": "Niema podłączonych domenów", "what": "Co to znaczy?", @@ -509,4 +508,4 @@ "cubit_statuses": "Aktualny stan qubitów ładujących", "ignore_tls": "Używane podczas konfigurowania nowego serwera." } -} \ No newline at end of file +} diff --git a/assets/translations/ru.json b/assets/translations/ru.json index d5c27d86..052b76c9 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -350,7 +350,6 @@ "manage_domain_dns": "Для управления DNS вашего домена", "use_this_domain": "Используем этот домен?", "use_this_domain_text": "Указанный вами токен даёт контроль над этим доменом", - "cloudflare_api_token": "API ключ DNS провайдера", "connect_backblaze_storage": "Подключите облачное хранилище Backblaze", "no_connected_domains": "На данный момент подлюченных доменов нет", "loading_domain_list": "Загружаем список доменов", @@ -540,4 +539,4 @@ "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", "ignore_tls": "Не проверять сертификаты TLS" } -} \ No newline at end of file +} diff --git a/assets/translations/sk.json b/assets/translations/sk.json index c79d251e..7b447173 100644 --- a/assets/translations/sk.json +++ b/assets/translations/sk.json @@ -280,7 +280,6 @@ "enter_username_and_password": "Zadajte používateľské meno a zložité heslo", "finish": "Všetko je inicializované", "use_this_domain_text": "Token, ktorý ste poskytli, poskytuje prístup k nasledujúcej doméne", - "cloudflare_api_token": "CloudFlare API Token", "connect_backblaze_storage": "Pripojte svoje cloudové úložisko Backblaze", "no_connected_domains": "Momentálne nie sú pripojené žiadne domény", "loading_domain_list": "Načítava sa zoznam domén", @@ -500,4 +499,4 @@ "reset_onboarding_description": "Resetovanie vypínača na opätovné zobrazenie obrazovky zapnutia", "cubit_statuses": "Aktuálny stav načítavania qubitov" } -} \ No newline at end of file +} diff --git a/assets/translations/uk.json b/assets/translations/uk.json index d3384ca5..af472df4 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -134,7 +134,6 @@ "select_dns": "Тепер давайте оберемо DNS-провайдера", "manage_domain_dns": "Для управління DNS домену", "use_this_domain": "Скористатися цим доменом?", - "cloudflare_api_token": "CloudFlare API токен", "connect_backblaze_storage": "Підключити Backblaze сховище", "no_connected_domains": "Наразі немає пов'язаних доменів", "save_domain": "Зберегти домен", @@ -469,4 +468,4 @@ "root_name": "Не може бути 'root'", "length_not_equal": "Довжина [], має бути {}" } -} \ No newline at end of file +} From 031ad474172b1c23273f471860bb35124de3f865 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 8 Sep 2023 15:41:12 +0300 Subject: [PATCH 705/732] refactor(ui): Domain selection refresh --- assets/translations/en.json | 2 + .../setup/initializing/domain_picker.dart | 163 ++++++++++++++++++ .../setup/initializing/initializing.dart | 125 +------------- 3 files changed, 167 insertions(+), 123 deletions(-) create mode 100644 lib/ui/pages/setup/initializing/domain_picker.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index cb2ccc3b..99c8d209 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -370,6 +370,8 @@ "manage_domain_dns": "To manage your domain's DNS", "use_this_domain": "Use this domain?", "use_this_domain_text": "The token you provided gives access to the following domain", + "multiple_domains_found": "Multiple domains found", + "multiple_domains_found_text": "The token you provided gives access to the following domains. Please select the one you want to use. For the security of your other domains, you should restrict this token's access to only the domain you want to use with SelfPrivacy.", "connect_backblaze_storage": "Connect Backblaze storage", "no_connected_domains": "No connected domains at the moment", "loading_domain_list": "Loading domain list", diff --git a/lib/ui/pages/setup/initializing/domain_picker.dart b/lib/ui/pages/setup/initializing/domain_picker.dart new file mode 100644 index 00000000..1d64349c --- /dev/null +++ b/lib/ui/pages/setup/initializing/domain_picker.dart @@ -0,0 +1,163 @@ +import 'package:cubit_form/cubit_form.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart'; +import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; + +class DomainPicker extends StatefulWidget { + const DomainPicker({ + super.key, + }); + + @override + State createState() => _DomainPickerState(); +} + +class _DomainPickerState extends State { + String? selectedDomain; + + @override + Widget build(final BuildContext context) { + final DomainSetupState state = context.watch().state; + + return ResponsiveLayoutWithInfobox( + topChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + (state is MoreThenOne) + ? 'initializing.multiple_domains_found'.tr() + : 'initializing.use_this_domain'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 16), + Text( + (state is MoreThenOne) + ? 'initializing.multiple_domains_found_text'.tr() + : 'initializing.use_this_domain_text'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + primaryColumn: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (state is Empty) + Text( + 'initializing.no_connected_domains'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + if (state is Loading) + Text( + state.type == LoadingTypes.loadingDomain + ? 'initializing.loading_domain_list'.tr() + : 'basis.saving'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + ), + if (state is MoreThenOne) + ...state.domains.map( + (final domain) => Column( + children: [ + SizedBox( + width: double.infinity, + child: OutlinedCard( + borderColor: domain == selectedDomain + ? Theme.of(context).colorScheme.primary + : null, + borderWidth: domain == selectedDomain ? 3 : 1, + child: InkResponse( + highlightShape: BoxShape.rectangle, + onTap: () => setState(() { + selectedDomain = domain; + }), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Radio( + value: domain, + groupValue: selectedDomain, + onChanged: (final String? value) { + setState(() { + selectedDomain = value; + }); + }, + ), + Text( + domain, + style: Theme.of(context).textTheme.bodyLarge, + ), + ], + ), + ), + ), + ), + ), + const SizedBox(height: 8), + // Button to select and save domain + ], + ), + ), + if (state is MoreThenOne) + BrandButton.filled( + onPressed: (selectedDomain != null && + state.domains.contains(selectedDomain)) + ? () => context + .read() + .saveDomain(selectedDomain!) + : null, + child: Text('initializing.use_this_domain'.tr()), + ), + if (state is Loaded) ...[ + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + state.domain, + style: Theme.of(context).textTheme.headlineMedium?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + textAlign: TextAlign.center, + ), + ], + ), + ], + if (state is Empty) ...[ + const SizedBox(height: 30), + BrandButton.filled( + onPressed: () => context.read().load(), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + Icons.refresh, + color: Colors.white, + ), + const SizedBox(width: 10), + Text( + 'domain.update_list'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + ], + ), + ), + ], + if (state is Loaded) ...[ + const SizedBox(height: 32), + BrandButton.filled( + onPressed: () => + context.read().saveDomain(state.domain), + text: 'initializing.save_domain'.tr(), + ), + ], + ], + ), + ); + } +} diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index db6f9af2..60088ea3 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -18,6 +18,7 @@ import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/dns_provider_picker.dart'; +import 'package:selfprivacy/ui/pages/setup/initializing/domain_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/server_type_picker.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; @@ -319,129 +320,7 @@ class InitializingPage extends StatelessWidget { Widget _stepDomain(final ServerInstallationCubit initializingCubit) => BlocProvider( create: (final context) => DomainSetupCubit(initializingCubit)..load(), - child: Builder( - builder: (final context) { - final DomainSetupState state = - context.watch().state; - return ResponsiveLayoutWithInfobox( - topChild: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'initializing.use_this_domain'.tr(), - style: Theme.of(context).textTheme.headlineSmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.use_this_domain_text'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - primaryColumn: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (state is Empty) - Text( - 'initializing.no_connected_domains'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - if (state is Loading) - Text( - state.type == LoadingTypes.loadingDomain - ? 'initializing.loading_domain_list'.tr() - : 'basis.saving'.tr(), - style: Theme.of(context).textTheme.bodyMedium, - ), - if (state is MoreThenOne) - ...state.domains.map( - (final domain) => Column( - children: [ - SizedBox( - width: double.infinity, - child: Card( - clipBehavior: Clip.antiAlias, - child: InkResponse( - highlightShape: BoxShape.rectangle, - onTap: () => context - .read() - .saveDomain(domain), - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - domain, - style: Theme.of(context) - .textTheme - .headlineMedium, - ), - ], - ), - ), - ), - ), - ), - const SizedBox(height: 8), - ], - ), - ), - if (state is Loaded) ...[ - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - state.domain, - style: Theme.of(context) - .textTheme - .headlineMedium - ?.copyWith( - color: - Theme.of(context).colorScheme.onBackground, - ), - textAlign: TextAlign.center, - ), - ], - ), - ], - if (state is Empty) ...[ - const SizedBox(height: 30), - BrandButton.filled( - onPressed: () => context.read().load(), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Icon( - Icons.refresh, - color: Colors.white, - ), - const SizedBox(width: 10), - Text( - 'domain.update_list'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - ], - ), - ), - ], - if (state is Loaded) ...[ - const SizedBox(height: 32), - BrandButton.filled( - onPressed: () => context - .read() - .saveDomain(state.domain), - text: 'initializing.save_domain'.tr(), - ), - ], - ], - ), - ); - }, - ), + child: DomainPicker(), ); Widget _stepUser(final ServerInstallationCubit initializingCubit) => From aac4b2773b965749b370a4eb446c460fcc3e65f3 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 9 Sep 2023 10:22:43 +0300 Subject: [PATCH 706/732] feat(backups): Show the snapshot creation reason --- assets/translations/en.json | 9 +- .../graphql_maps/schema/backups.graphql | 3 +- .../graphql_maps/schema/backups.graphql.dart | 27 +++ .../graphql_maps/schema/schema.graphql | 25 +++ .../graphql_maps/schema/schema.graphql.dart | 207 ++++++++++++++++++ lib/logic/models/backup.dart | 12 + lib/ui/pages/backups/snapshot_modal.dart | 12 + 7 files changed, 293 insertions(+), 2 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 99c8d209..1885fd73 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -220,7 +220,14 @@ "snapshot_modal_inplace_option_title": "Replace in place", "snapshot_modal_inplace_option_description": "Less free space needed, but more risk. Replaces current data with the snapshot data during the download.", "snapshot_modal_service_not_found": "This is a snapshot of a service you don't have on your server anymore. Usually this shouldn't happen, and we cannot do the automatic restore. You can still download the snapshot and restore it manually. Contact SelfPrivacy support if you need help.", - "restore_started": "Restore started, check the jobs list for the current status" + "restore_started": "Restore started, check the jobs list for the current status", + "snapshot_reason_title": "Creation reason", + "snapshot_reasons": { + "auto": "Created automatically", + "explicit": "Created by your explicit request", + "pre_restore": "Created as a precaution before risky restore", + "unknown": "Unknown" + } }, "storage": { "card_title": "Server Storage", diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index 9b60564c..410b7343 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -20,6 +20,7 @@ query AllBackupSnapshots { displayName id } + reason } } } @@ -98,4 +99,4 @@ mutation ForgetSnapshot($snapshotId: String!) { ...basicMutationReturnFields } } -} \ No newline at end of file +} diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 7a814aac..9dcd9e91 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -1486,6 +1486,13 @@ const documentNodeQueryAllBackupSnapshots = DocumentNode(definitions: [ ), ]), ), + FieldNode( + name: NameNode(value: 'reason'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -1801,6 +1808,7 @@ class Query$AllBackupSnapshots$backup$allSnapshots { required this.id, required this.createdAt, required this.service, + required this.reason, this.$__typename = 'SnapshotInfo', }); @@ -1809,12 +1817,14 @@ class Query$AllBackupSnapshots$backup$allSnapshots { final l$id = json['id']; final l$createdAt = json['createdAt']; final l$service = json['service']; + final l$reason = json['reason']; final l$$__typename = json['__typename']; return Query$AllBackupSnapshots$backup$allSnapshots( id: (l$id as String), createdAt: dateTimeFromJson(l$createdAt), service: Query$AllBackupSnapshots$backup$allSnapshots$service.fromJson( (l$service as Map)), + reason: fromJson$Enum$BackupReason((l$reason as String)), $__typename: (l$$__typename as String), ); } @@ -1825,6 +1835,8 @@ class Query$AllBackupSnapshots$backup$allSnapshots { final Query$AllBackupSnapshots$backup$allSnapshots$service service; + final Enum$BackupReason reason; + final String $__typename; Map toJson() { @@ -1835,6 +1847,8 @@ class Query$AllBackupSnapshots$backup$allSnapshots { _resultData['createdAt'] = dateTimeToJson(l$createdAt); final l$service = service; _resultData['service'] = l$service.toJson(); + final l$reason = reason; + _resultData['reason'] = toJson$Enum$BackupReason(l$reason); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -1845,11 +1859,13 @@ class Query$AllBackupSnapshots$backup$allSnapshots { final l$id = id; final l$createdAt = createdAt; final l$service = service; + final l$reason = reason; final l$$__typename = $__typename; return Object.hashAll([ l$id, l$createdAt, l$service, + l$reason, l$$__typename, ]); } @@ -1878,6 +1894,11 @@ class Query$AllBackupSnapshots$backup$allSnapshots { if (l$service != lOther$service) { return false; } + final l$reason = reason; + final lOther$reason = other.reason; + if (l$reason != lOther$reason) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { @@ -1910,6 +1931,7 @@ abstract class CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { String? id, DateTime? createdAt, Query$AllBackupSnapshots$backup$allSnapshots$service? service, + Enum$BackupReason? reason, String? $__typename, }); CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service @@ -1933,6 +1955,7 @@ class _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots Object? id = _undefined, Object? createdAt = _undefined, Object? service = _undefined, + Object? reason = _undefined, Object? $__typename = _undefined, }) => _then(Query$AllBackupSnapshots$backup$allSnapshots( @@ -1943,6 +1966,9 @@ class _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots service: service == _undefined || service == null ? _instance.service : (service as Query$AllBackupSnapshots$backup$allSnapshots$service), + reason: reason == _undefined || reason == null + ? _instance.reason + : (reason as Enum$BackupReason), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), @@ -1965,6 +1991,7 @@ class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots String? id, DateTime? createdAt, Query$AllBackupSnapshots$backup$allSnapshots$service? service, + Enum$BackupReason? reason, String? $__typename, }) => _res; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 368c2b90..cb154193 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -75,6 +75,22 @@ type AutoUpgradeSettingsMutationReturn implements MutationReturnInterface { allowReboot: Boolean! } +type AutobackupQuotas { + last: Int! + daily: Int! + weekly: Int! + monthly: Int! + yearly: Int! +} + +input AutobackupQuotasInput { + last: Int! + daily: Int! + weekly: Int! + monthly: Int! + yearly: Int! +} + type Backup { configuration: BackupConfiguration! allSnapshots: [SnapshotInfo!]! @@ -85,6 +101,7 @@ type BackupConfiguration { encryptionKey: String! isInitialized: Boolean! autobackupPeriod: Int + autobackupQuotas: AutobackupQuotas! locationName: String locationId: String } @@ -93,6 +110,7 @@ type BackupMutations { initializeRepository(repository: InitializeRepositoryInput!): GenericBackupConfigReturn! removeRepository: GenericBackupConfigReturn! setAutobackupPeriod(period: Int = null): GenericBackupConfigReturn! + setAutobackupQuotas(quotas: AutobackupQuotasInput!): GenericBackupConfigReturn! startBackup(serviceId: String!): GenericJobMutationReturn! restoreBackup(snapshotId: String!, strategy: RestoreStrategy! = DOWNLOAD_VERIFY_OVERWRITE): GenericJobMutationReturn! forgetSnapshot(snapshotId: String!): GenericMutationReturn! @@ -106,6 +124,12 @@ enum BackupProvider { FILE } +enum BackupReason { + EXPLICIT + AUTO + PRE_RESTORE +} + """Date with time (isoformat)""" scalar DateTime @@ -326,6 +350,7 @@ type SnapshotInfo { id: String! service: Service! createdAt: DateTime! + reason: BackupReason! } input SshMutationInput { diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 8a78a6f8..538a05ff 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -141,6 +141,185 @@ class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput _res; } +class Input$AutobackupQuotasInput { + factory Input$AutobackupQuotasInput({ + required int last, + required int daily, + required int weekly, + required int monthly, + required int yearly, + }) => + Input$AutobackupQuotasInput._({ + r'last': last, + r'daily': daily, + r'weekly': weekly, + r'monthly': monthly, + r'yearly': yearly, + }); + + Input$AutobackupQuotasInput._(this._$data); + + factory Input$AutobackupQuotasInput.fromJson(Map data) { + final result$data = {}; + final l$last = data['last']; + result$data['last'] = (l$last as int); + final l$daily = data['daily']; + result$data['daily'] = (l$daily as int); + final l$weekly = data['weekly']; + result$data['weekly'] = (l$weekly as int); + final l$monthly = data['monthly']; + result$data['monthly'] = (l$monthly as int); + final l$yearly = data['yearly']; + result$data['yearly'] = (l$yearly as int); + return Input$AutobackupQuotasInput._(result$data); + } + + Map _$data; + + int get last => (_$data['last'] as int); + int get daily => (_$data['daily'] as int); + int get weekly => (_$data['weekly'] as int); + int get monthly => (_$data['monthly'] as int); + int get yearly => (_$data['yearly'] as int); + Map toJson() { + final result$data = {}; + final l$last = last; + result$data['last'] = l$last; + final l$daily = daily; + result$data['daily'] = l$daily; + final l$weekly = weekly; + result$data['weekly'] = l$weekly; + final l$monthly = monthly; + result$data['monthly'] = l$monthly; + final l$yearly = yearly; + result$data['yearly'] = l$yearly; + return result$data; + } + + CopyWith$Input$AutobackupQuotasInput + get copyWith => CopyWith$Input$AutobackupQuotasInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$AutobackupQuotasInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$last = last; + final lOther$last = other.last; + if (l$last != lOther$last) { + return false; + } + final l$daily = daily; + final lOther$daily = other.daily; + if (l$daily != lOther$daily) { + return false; + } + final l$weekly = weekly; + final lOther$weekly = other.weekly; + if (l$weekly != lOther$weekly) { + return false; + } + final l$monthly = monthly; + final lOther$monthly = other.monthly; + if (l$monthly != lOther$monthly) { + return false; + } + final l$yearly = yearly; + final lOther$yearly = other.yearly; + if (l$yearly != lOther$yearly) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$last = last; + final l$daily = daily; + final l$weekly = weekly; + final l$monthly = monthly; + final l$yearly = yearly; + return Object.hashAll([ + l$last, + l$daily, + l$weekly, + l$monthly, + l$yearly, + ]); + } +} + +abstract class CopyWith$Input$AutobackupQuotasInput { + factory CopyWith$Input$AutobackupQuotasInput( + Input$AutobackupQuotasInput instance, + TRes Function(Input$AutobackupQuotasInput) then, + ) = _CopyWithImpl$Input$AutobackupQuotasInput; + + factory CopyWith$Input$AutobackupQuotasInput.stub(TRes res) = + _CopyWithStubImpl$Input$AutobackupQuotasInput; + + TRes call({ + int? last, + int? daily, + int? weekly, + int? monthly, + int? yearly, + }); +} + +class _CopyWithImpl$Input$AutobackupQuotasInput + implements CopyWith$Input$AutobackupQuotasInput { + _CopyWithImpl$Input$AutobackupQuotasInput( + this._instance, + this._then, + ); + + final Input$AutobackupQuotasInput _instance; + + final TRes Function(Input$AutobackupQuotasInput) _then; + + static const _undefined = {}; + + TRes call({ + Object? last = _undefined, + Object? daily = _undefined, + Object? weekly = _undefined, + Object? monthly = _undefined, + Object? yearly = _undefined, + }) => + _then(Input$AutobackupQuotasInput._({ + ..._instance._$data, + if (last != _undefined && last != null) 'last': (last as int), + if (daily != _undefined && daily != null) 'daily': (daily as int), + if (weekly != _undefined && weekly != null) 'weekly': (weekly as int), + if (monthly != _undefined && monthly != null) + 'monthly': (monthly as int), + if (yearly != _undefined && yearly != null) 'yearly': (yearly as int), + })); +} + +class _CopyWithStubImpl$Input$AutobackupQuotasInput + implements CopyWith$Input$AutobackupQuotasInput { + _CopyWithStubImpl$Input$AutobackupQuotasInput(this._res); + + TRes _res; + + call({ + int? last, + int? daily, + int? weekly, + int? monthly, + int? yearly, + }) => + _res; +} + class Input$InitializeRepositoryInput { factory Input$InitializeRepositoryInput({ required Enum$BackupProvider provider, @@ -1310,6 +1489,34 @@ Enum$BackupProvider fromJson$Enum$BackupProvider(String value) { } } +enum Enum$BackupReason { EXPLICIT, AUTO, PRE_RESTORE, $unknown } + +String toJson$Enum$BackupReason(Enum$BackupReason e) { + switch (e) { + case Enum$BackupReason.EXPLICIT: + return r'EXPLICIT'; + case Enum$BackupReason.AUTO: + return r'AUTO'; + case Enum$BackupReason.PRE_RESTORE: + return r'PRE_RESTORE'; + case Enum$BackupReason.$unknown: + return r'$unknown'; + } +} + +Enum$BackupReason fromJson$Enum$BackupReason(String value) { + switch (value) { + case r'EXPLICIT': + return Enum$BackupReason.EXPLICIT; + case r'AUTO': + return Enum$BackupReason.AUTO; + case r'PRE_RESTORE': + return Enum$BackupReason.PRE_RESTORE; + default: + return Enum$BackupReason.$unknown; + } +} + enum Enum$DnsProvider { CLOUDFLARE, DIGITALOCEAN, DESEC, $unknown } String toJson$Enum$DnsProvider(Enum$DnsProvider e) { diff --git a/lib/logic/models/backup.dart b/lib/logic/models/backup.dart index 2199e223..de5f9b44 100644 --- a/lib/logic/models/backup.dart +++ b/lib/logic/models/backup.dart @@ -11,6 +11,7 @@ class Backup { time: snapshot.createdAt, serviceId: snapshot.service.id, fallbackServiceName: snapshot.service.displayName, + reason: snapshot.reason, ); Backup({ @@ -18,6 +19,7 @@ class Backup { required this.id, required this.serviceId, required this.fallbackServiceName, + required this.reason, }); // Time of the backup @@ -26,6 +28,16 @@ class Backup { final String id; final String serviceId; final String fallbackServiceName; + final Enum$BackupReason reason; +} + +extension BackupReasonExtension on Enum$BackupReason { + String get displayName => switch (this) { + Enum$BackupReason.AUTO => 'backup.snapshot_reasons.auto', + Enum$BackupReason.EXPLICIT => 'backup.snapshot_reasons.explicit', + Enum$BackupReason.PRE_RESTORE => 'backup.snapshot_reasons.pre_restore', + Enum$BackupReason.$unknown => 'backup.snapshot_reasons.unknown', + }; } class BackupConfiguration { diff --git a/lib/ui/pages/backups/snapshot_modal.dart b/lib/ui/pages/backups/snapshot_modal.dart index 0f1bac3d..9d714c25 100644 --- a/lib/ui/pages/backups/snapshot_modal.dart +++ b/lib/ui/pages/backups/snapshot_modal.dart @@ -99,6 +99,18 @@ class _SnapshotModalState extends State { ), ), SnapshotIdListTile(snapshotId: widget.snapshot.id), + ListTile( + leading: Icon( + Icons.info_outline, + color: Theme.of(context).colorScheme.onSurface, + ), + title: Text( + 'backup.snapshot_reason_title'.tr(), + ), + subtitle: Text( + widget.snapshot.reason.displayName.tr(), + ), + ), if (service != null) Column( children: [ From 1b26f2cf2907ab955378804e0cdec12655a3108c Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 9 Sep 2023 21:13:27 +0300 Subject: [PATCH 707/732] feat(backups): Allow to change snapshot rotation settings --- assets/translations/en.json | 58 + flake.nix | 55 +- .../graphql_maps/schema/backups.graphql | 22 + .../graphql_maps/schema/backups.graphql.dart | 1161 +++++++++++++++++ .../graphql_maps/server_api/backups_api.dart | 45 + lib/logic/cubit/backups/backups_cubit.dart | 21 + lib/logic/cubit/backups/backups_state.dart | 4 + lib/logic/models/backup.dart | 47 + lib/ui/pages/backups/backup_details.dart | 33 + .../backups/change_rotation_quotas_modal.dart | 244 ++++ .../setup/initializing/initializing.dart | 2 +- lib/ui/router/router.gr.dart | 584 ++++----- 12 files changed, 1970 insertions(+), 306 deletions(-) create mode 100644 lib/ui/pages/backups/change_rotation_quotas_modal.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 1885fd73..8571b1c0 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -227,6 +227,64 @@ "explicit": "Created by your explicit request", "pre_restore": "Created as a precaution before risky restore", "unknown": "Unknown" + }, + "rotation_quotas_title": "Snapshot rotation settings", + "set_rotation_quotas": "Set new rotation quotas", + "quotas_set": "New backup rotation quotas set", + "quota_titles": { + "last": "How many latest backups to keep", + "daily": "How many daily backups to keep", + "weekly": "How many weekly backups to keep", + "monthly": "How many monthly backups to keep", + "yearly": "How many yearly backups to keep" + }, + "quota_subtitles": { + "no_effect": "This rule has no effect because another rule will keep more backups", + "last": { + "zero": "Rule is disabled", + "one": "Last {} backup will be kept regardless of its age", + "two": "Last {} backups will be kept regardless of their age", + "few": "Last {} backups will be kept regardless of their age", + "many": "Last {} backups will be kept regardless of their age", + "other": "Last {} backups will be kept regardless of their age" + }, + "last_infinite": "All backups will be kept", + "daily": { + "zero": "Rule is disabled", + "one": "Last {} daily backup will be kept", + "two": "Last {} daily backups will be kept", + "few": "Last {} daily backups will be kept", + "many": "Last {} daily backups will be kept", + "other": "Last {} daily backups will be kept" + }, + "daily_infinite": "All daily backups will be kept", + "weekly": { + "zero": "Rule is disabled", + "one": "Last {} weekly backup will be kept", + "two": "Last {} weekly backups will be kept", + "few": "Last {} weekly backups will be kept", + "many": "Last {} weekly backups will be kept", + "other": "Last {} weekly backups will be kept" + }, + "weekly_infinite": "All weekly backups will be kept", + "monthly": { + "zero": "Rule is disabled", + "one": "Last {} monthly backup will be kept", + "two": "Last {} monthly backups will be kept", + "few": "Last {} monthly backups will be kept", + "many": "Last {} monthly backups will be kept", + "other": "Last {} monthly backups will be kept" + }, + "monthly_infinite": "All monthly backups will be kept", + "yearly": { + "zero": "Rule is disabled", + "one": "Last {} yearly backup will be kept", + "two": "Last {} yearly backups will be kept", + "few": "Last {} yearly backups will be kept", + "many": "Last {} yearly backups will be kept", + "other": "Last {} yearly backups will be kept" + }, + "yearly_infinite": "All yearly backups will be kept" } }, "storage": { diff --git a/flake.nix b/flake.nix index d1895b0a..a124dc2c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { nixConfig.bash-prompt = "\[selfprivacy\]$ "; - inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable"; + inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.nixgl.url = "github:guibou/nixGL"; @@ -9,19 +9,48 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { + inherit system; config.allowUnfree = true; config.android_sdk.accept_license = true; - system = "x86_64-linux"; overlays = [ nixgl.overlay ]; }; androidComposition = pkgs.androidenv.composeAndroidPackages { - toolsVersion = "26.1.1"; - platformToolsVersion = "33.0.2"; - buildToolsVersions = [ "30.0.3" ]; - platformVersions = [ "31" "30" "29" ]; + platformToolsVersion = "34.0.4"; + buildToolsVersions = [ "34.0.0" ]; + platformVersions = [ "34" "33" "32" "31" "30" ]; }; + spAndroidStudio = pkgs.symlinkJoin { + name = "spAndroidStudio"; + paths = with pkgs; [ + android-studio + flutter.unwrapped + # dart + gnumake + check + pkg-config + glibc + android-tools + jdk + git + ]; + + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/flutter \ + --prefix ANDROID_SDK_ROOT=${androidComposition.androidsdk}/libexec/android-sdk \ + --prefix ANDROID_HOME=${androidComposition.androidsdk}/libexec/android-sdk \ + --prefix ANDROID_JAVA_HOME=${pkgs.jdk.home} + + wrapProgram $out/bin/android-studio \ + --prefix FLUTTER_SDK=${pkgs.flutter.unwrapped} \ + --prefix ANDROID_SDKz_ROOT=${androidComposition.androidsdk}/libexec/android-sdk \ + --prefix ANDROID_HOME=${androidComposition.androidsdk}/libexec/android-sdk \ + --prefix ANDROID_JAVA_HOME=${pkgs.jdk.home} + ''; + }; + buildDeps = with pkgs; [ gtk3 glib @@ -62,23 +91,23 @@ openjdk11_headless clang ]; - + releaseDerivation = pkgs.flutter.mkFlutterApp rec { pname = "selfprivacy"; version = "0.6.0"; - + vendorHash = "sha256-7cbiAyIlaz3HqEsZN/nZxaLZjseJv5CmiIHqsoGa4ZI="; - + nativeBuildInputs = [ pkgs.nixgl.auto.nixGLDefault ]; - + src = ./.; - + desktopItem = pkgs.makeDesktopItem { name = "${pname}"; exec = "@out@/bin/${pname}"; desktopName = "SelfPrivacy"; }; - + postInstall = '' rm $out/bin/$pname @@ -86,7 +115,7 @@ patchShebangs $out/bin/$pname chmod +x $out/bin/$pname wrapProgram $out/bin/$pname --set PATH ${pkgs.lib.makeBinPath [ pkgs.xdg-user-dirs ]} - + mkdir -p $out/share/applications cp $desktopItem/share/applications/*.desktop $out/share/applications substituteInPlace $out/share/applications/*.desktop --subst-var out diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql index 410b7343..16930940 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -7,6 +7,13 @@ query BackupConfiguration { locationId locationName provider + autobackupQuotas { + last + daily + weekly + monthly + yearly + } } } } @@ -36,6 +43,13 @@ fragment genericBackupConfigReturn on GenericBackupConfigReturn { autobackupPeriod locationName locationId + autobackupQuotas { + last + daily + weekly + monthly + yearly + } } } @@ -66,6 +80,14 @@ mutation SetAutobackupPeriod($period: Int = null) { } } +mutation setAutobackupQuotas($quotas: AutobackupQuotasInput!) { + backup { + setAutobackupQuotas(quotas: $quotas) { + ...genericBackupConfigReturn + } + } +} + mutation RemoveRepository { backup { removeRepository { diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart index 9dcd9e91..1df1e8ac 100644 --- a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -287,6 +287,56 @@ const fragmentDefinitiongenericBackupConfigReturn = FragmentDefinitionNode( directives: [], selectionSet: null, ), + FieldNode( + name: NameNode(value: 'autobackupQuotas'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'last'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'daily'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'weekly'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'monthly'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'yearly'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -356,6 +406,7 @@ class Fragment$genericBackupConfigReturn$configuration { this.autobackupPeriod, this.locationName, this.locationId, + required this.autobackupQuotas, this.$__typename = 'BackupConfiguration', }); @@ -367,6 +418,7 @@ class Fragment$genericBackupConfigReturn$configuration { final l$autobackupPeriod = json['autobackupPeriod']; final l$locationName = json['locationName']; final l$locationId = json['locationId']; + final l$autobackupQuotas = json['autobackupQuotas']; final l$$__typename = json['__typename']; return Fragment$genericBackupConfigReturn$configuration( provider: fromJson$Enum$BackupProvider((l$provider as String)), @@ -375,6 +427,9 @@ class Fragment$genericBackupConfigReturn$configuration { autobackupPeriod: (l$autobackupPeriod as int?), locationName: (l$locationName as String?), locationId: (l$locationId as String?), + autobackupQuotas: + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas + .fromJson((l$autobackupQuotas as Map)), $__typename: (l$$__typename as String), ); } @@ -391,6 +446,9 @@ class Fragment$genericBackupConfigReturn$configuration { final String? locationId; + final Fragment$genericBackupConfigReturn$configuration$autobackupQuotas + autobackupQuotas; + final String $__typename; Map toJson() { @@ -407,6 +465,8 @@ class Fragment$genericBackupConfigReturn$configuration { _resultData['locationName'] = l$locationName; final l$locationId = locationId; _resultData['locationId'] = l$locationId; + final l$autobackupQuotas = autobackupQuotas; + _resultData['autobackupQuotas'] = l$autobackupQuotas.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -420,6 +480,7 @@ class Fragment$genericBackupConfigReturn$configuration { final l$autobackupPeriod = autobackupPeriod; final l$locationName = locationName; final l$locationId = locationId; + final l$autobackupQuotas = autobackupQuotas; final l$$__typename = $__typename; return Object.hashAll([ l$provider, @@ -428,6 +489,7 @@ class Fragment$genericBackupConfigReturn$configuration { l$autobackupPeriod, l$locationName, l$locationId, + l$autobackupQuotas, l$$__typename, ]); } @@ -471,6 +533,11 @@ class Fragment$genericBackupConfigReturn$configuration { if (l$locationId != lOther$locationId) { return false; } + final l$autobackupQuotas = autobackupQuotas; + final lOther$autobackupQuotas = other.autobackupQuotas; + if (l$autobackupQuotas != lOther$autobackupQuotas) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { @@ -507,8 +574,12 @@ abstract class CopyWith$Fragment$genericBackupConfigReturn$configuration { int? autobackupPeriod, String? locationName, String? locationId, + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas? + autobackupQuotas, String? $__typename, }); + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> get autobackupQuotas; } class _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration @@ -531,6 +602,7 @@ class _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration Object? autobackupPeriod = _undefined, Object? locationName = _undefined, Object? locationId = _undefined, + Object? autobackupQuotas = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$genericBackupConfigReturn$configuration( @@ -552,10 +624,21 @@ class _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration locationId: locationId == _undefined ? _instance.locationId : (locationId as String?), + autobackupQuotas: autobackupQuotas == _undefined || + autobackupQuotas == null + ? _instance.autobackupQuotas + : (autobackupQuotas + as Fragment$genericBackupConfigReturn$configuration$autobackupQuotas), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> get autobackupQuotas { + final local$autobackupQuotas = _instance.autobackupQuotas; + return CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas( + local$autobackupQuotas, (e) => call(autobackupQuotas: e)); + } } class _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration @@ -571,6 +654,234 @@ class _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration int? autobackupPeriod, String? locationName, String? locationId, + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas? + autobackupQuotas, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> + get autobackupQuotas => + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas + .stub(_res); +} + +class Fragment$genericBackupConfigReturn$configuration$autobackupQuotas { + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas({ + required this.last, + required this.daily, + required this.weekly, + required this.monthly, + required this.yearly, + this.$__typename = 'AutobackupQuotas', + }); + + factory Fragment$genericBackupConfigReturn$configuration$autobackupQuotas.fromJson( + Map json) { + final l$last = json['last']; + final l$daily = json['daily']; + final l$weekly = json['weekly']; + final l$monthly = json['monthly']; + final l$yearly = json['yearly']; + final l$$__typename = json['__typename']; + return Fragment$genericBackupConfigReturn$configuration$autobackupQuotas( + last: (l$last as int), + daily: (l$daily as int), + weekly: (l$weekly as int), + monthly: (l$monthly as int), + yearly: (l$yearly as int), + $__typename: (l$$__typename as String), + ); + } + + final int last; + + final int daily; + + final int weekly; + + final int monthly; + + final int yearly; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$last = last; + _resultData['last'] = l$last; + final l$daily = daily; + _resultData['daily'] = l$daily; + final l$weekly = weekly; + _resultData['weekly'] = l$weekly; + final l$monthly = monthly; + _resultData['monthly'] = l$monthly; + final l$yearly = yearly; + _resultData['yearly'] = l$yearly; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$last = last; + final l$daily = daily; + final l$weekly = weekly; + final l$monthly = monthly; + final l$yearly = yearly; + final l$$__typename = $__typename; + return Object.hashAll([ + l$last, + l$daily, + l$weekly, + l$monthly, + l$yearly, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Fragment$genericBackupConfigReturn$configuration$autobackupQuotas) || + runtimeType != other.runtimeType) { + return false; + } + final l$last = last; + final lOther$last = other.last; + if (l$last != lOther$last) { + return false; + } + final l$daily = daily; + final lOther$daily = other.daily; + if (l$daily != lOther$daily) { + return false; + } + final l$weekly = weekly; + final lOther$weekly = other.weekly; + if (l$weekly != lOther$weekly) { + return false; + } + final l$monthly = monthly; + final lOther$monthly = other.monthly; + if (l$monthly != lOther$monthly) { + return false; + } + final l$yearly = yearly; + final lOther$yearly = other.yearly; + if (l$yearly != lOther$yearly) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas + on Fragment$genericBackupConfigReturn$configuration$autobackupQuotas { + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas> + get copyWith => + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> { + factory CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas( + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas instance, + TRes Function( + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas) + then, + ) = _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas; + + factory CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas.stub( + TRes res) = + _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas; + + TRes call({ + int? last, + int? daily, + int? weekly, + int? monthly, + int? yearly, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> + implements + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> { + _CopyWithImpl$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas( + this._instance, + this._then, + ); + + final Fragment$genericBackupConfigReturn$configuration$autobackupQuotas + _instance; + + final TRes Function( + Fragment$genericBackupConfigReturn$configuration$autobackupQuotas) _then; + + static const _undefined = {}; + + TRes call({ + Object? last = _undefined, + Object? daily = _undefined, + Object? weekly = _undefined, + Object? monthly = _undefined, + Object? yearly = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$genericBackupConfigReturn$configuration$autobackupQuotas( + last: + last == _undefined || last == null ? _instance.last : (last as int), + daily: daily == _undefined || daily == null + ? _instance.daily + : (daily as int), + weekly: weekly == _undefined || weekly == null + ? _instance.weekly + : (weekly as int), + monthly: monthly == _undefined || monthly == null + ? _instance.monthly + : (monthly as int), + yearly: yearly == _undefined || yearly == null + ? _instance.yearly + : (yearly as int), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> + implements + CopyWith$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas< + TRes> { + _CopyWithStubImpl$Fragment$genericBackupConfigReturn$configuration$autobackupQuotas( + this._res); + + TRes _res; + + call({ + int? last, + int? daily, + int? weekly, + int? monthly, + int? yearly, String? $__typename, }) => _res; @@ -771,6 +1082,56 @@ const documentNodeQueryBackupConfiguration = DocumentNode(definitions: [ directives: [], selectionSet: null, ), + FieldNode( + name: NameNode(value: 'autobackupQuotas'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'last'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'daily'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'weekly'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'monthly'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'yearly'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -1070,6 +1431,7 @@ class Query$BackupConfiguration$backup$configuration { this.locationId, this.locationName, required this.provider, + required this.autobackupQuotas, this.$__typename = 'BackupConfiguration', }); @@ -1081,6 +1443,7 @@ class Query$BackupConfiguration$backup$configuration { final l$locationId = json['locationId']; final l$locationName = json['locationName']; final l$provider = json['provider']; + final l$autobackupQuotas = json['autobackupQuotas']; final l$$__typename = json['__typename']; return Query$BackupConfiguration$backup$configuration( autobackupPeriod: (l$autobackupPeriod as int?), @@ -1089,6 +1452,9 @@ class Query$BackupConfiguration$backup$configuration { locationId: (l$locationId as String?), locationName: (l$locationName as String?), provider: fromJson$Enum$BackupProvider((l$provider as String)), + autobackupQuotas: + Query$BackupConfiguration$backup$configuration$autobackupQuotas + .fromJson((l$autobackupQuotas as Map)), $__typename: (l$$__typename as String), ); } @@ -1105,6 +1471,9 @@ class Query$BackupConfiguration$backup$configuration { final Enum$BackupProvider provider; + final Query$BackupConfiguration$backup$configuration$autobackupQuotas + autobackupQuotas; + final String $__typename; Map toJson() { @@ -1121,6 +1490,8 @@ class Query$BackupConfiguration$backup$configuration { _resultData['locationName'] = l$locationName; final l$provider = provider; _resultData['provider'] = toJson$Enum$BackupProvider(l$provider); + final l$autobackupQuotas = autobackupQuotas; + _resultData['autobackupQuotas'] = l$autobackupQuotas.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; @@ -1134,6 +1505,7 @@ class Query$BackupConfiguration$backup$configuration { final l$locationId = locationId; final l$locationName = locationName; final l$provider = provider; + final l$autobackupQuotas = autobackupQuotas; final l$$__typename = $__typename; return Object.hashAll([ l$autobackupPeriod, @@ -1142,6 +1514,7 @@ class Query$BackupConfiguration$backup$configuration { l$locationId, l$locationName, l$provider, + l$autobackupQuotas, l$$__typename, ]); } @@ -1185,6 +1558,11 @@ class Query$BackupConfiguration$backup$configuration { if (l$provider != lOther$provider) { return false; } + final l$autobackupQuotas = autobackupQuotas; + final lOther$autobackupQuotas = other.autobackupQuotas; + if (l$autobackupQuotas != lOther$autobackupQuotas) { + return false; + } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { @@ -1221,8 +1599,12 @@ abstract class CopyWith$Query$BackupConfiguration$backup$configuration { String? locationId, String? locationName, Enum$BackupProvider? provider, + Query$BackupConfiguration$backup$configuration$autobackupQuotas? + autobackupQuotas, String? $__typename, }); + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas + get autobackupQuotas; } class _CopyWithImpl$Query$BackupConfiguration$backup$configuration @@ -1245,6 +1627,7 @@ class _CopyWithImpl$Query$BackupConfiguration$backup$configuration Object? locationId = _undefined, Object? locationName = _undefined, Object? provider = _undefined, + Object? autobackupQuotas = _undefined, Object? $__typename = _undefined, }) => _then(Query$BackupConfiguration$backup$configuration( @@ -1266,10 +1649,21 @@ class _CopyWithImpl$Query$BackupConfiguration$backup$configuration provider: provider == _undefined || provider == null ? _instance.provider : (provider as Enum$BackupProvider), + autobackupQuotas: autobackupQuotas == _undefined || + autobackupQuotas == null + ? _instance.autobackupQuotas + : (autobackupQuotas + as Query$BackupConfiguration$backup$configuration$autobackupQuotas), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas + get autobackupQuotas { + final local$autobackupQuotas = _instance.autobackupQuotas; + return CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas( + local$autobackupQuotas, (e) => call(autobackupQuotas: e)); + } } class _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration @@ -1285,6 +1679,233 @@ class _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration String? locationId, String? locationName, Enum$BackupProvider? provider, + Query$BackupConfiguration$backup$configuration$autobackupQuotas? + autobackupQuotas, + String? $__typename, + }) => + _res; + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas + get autobackupQuotas => + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas + .stub(_res); +} + +class Query$BackupConfiguration$backup$configuration$autobackupQuotas { + Query$BackupConfiguration$backup$configuration$autobackupQuotas({ + required this.last, + required this.daily, + required this.weekly, + required this.monthly, + required this.yearly, + this.$__typename = 'AutobackupQuotas', + }); + + factory Query$BackupConfiguration$backup$configuration$autobackupQuotas.fromJson( + Map json) { + final l$last = json['last']; + final l$daily = json['daily']; + final l$weekly = json['weekly']; + final l$monthly = json['monthly']; + final l$yearly = json['yearly']; + final l$$__typename = json['__typename']; + return Query$BackupConfiguration$backup$configuration$autobackupQuotas( + last: (l$last as int), + daily: (l$daily as int), + weekly: (l$weekly as int), + monthly: (l$monthly as int), + yearly: (l$yearly as int), + $__typename: (l$$__typename as String), + ); + } + + final int last; + + final int daily; + + final int weekly; + + final int monthly; + + final int yearly; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$last = last; + _resultData['last'] = l$last; + final l$daily = daily; + _resultData['daily'] = l$daily; + final l$weekly = weekly; + _resultData['weekly'] = l$weekly; + final l$monthly = monthly; + _resultData['monthly'] = l$monthly; + final l$yearly = yearly; + _resultData['yearly'] = l$yearly; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$last = last; + final l$daily = daily; + final l$weekly = weekly; + final l$monthly = monthly; + final l$yearly = yearly; + final l$$__typename = $__typename; + return Object.hashAll([ + l$last, + l$daily, + l$weekly, + l$monthly, + l$yearly, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other + is Query$BackupConfiguration$backup$configuration$autobackupQuotas) || + runtimeType != other.runtimeType) { + return false; + } + final l$last = last; + final lOther$last = other.last; + if (l$last != lOther$last) { + return false; + } + final l$daily = daily; + final lOther$daily = other.daily; + if (l$daily != lOther$daily) { + return false; + } + final l$weekly = weekly; + final lOther$weekly = other.weekly; + if (l$weekly != lOther$weekly) { + return false; + } + final l$monthly = monthly; + final lOther$monthly = other.monthly; + if (l$monthly != lOther$monthly) { + return false; + } + final l$yearly = yearly; + final lOther$yearly = other.yearly; + if (l$yearly != lOther$yearly) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$BackupConfiguration$backup$configuration$autobackupQuotas + on Query$BackupConfiguration$backup$configuration$autobackupQuotas { + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas< + Query$BackupConfiguration$backup$configuration$autobackupQuotas> + get copyWith => + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas< + TRes> { + factory CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas( + Query$BackupConfiguration$backup$configuration$autobackupQuotas instance, + TRes Function( + Query$BackupConfiguration$backup$configuration$autobackupQuotas) + then, + ) = _CopyWithImpl$Query$BackupConfiguration$backup$configuration$autobackupQuotas; + + factory CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas.stub( + TRes res) = + _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration$autobackupQuotas; + + TRes call({ + int? last, + int? daily, + int? weekly, + int? monthly, + int? yearly, + String? $__typename, + }); +} + +class _CopyWithImpl$Query$BackupConfiguration$backup$configuration$autobackupQuotas< + TRes> + implements + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas< + TRes> { + _CopyWithImpl$Query$BackupConfiguration$backup$configuration$autobackupQuotas( + this._instance, + this._then, + ); + + final Query$BackupConfiguration$backup$configuration$autobackupQuotas + _instance; + + final TRes Function( + Query$BackupConfiguration$backup$configuration$autobackupQuotas) _then; + + static const _undefined = {}; + + TRes call({ + Object? last = _undefined, + Object? daily = _undefined, + Object? weekly = _undefined, + Object? monthly = _undefined, + Object? yearly = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$BackupConfiguration$backup$configuration$autobackupQuotas( + last: + last == _undefined || last == null ? _instance.last : (last as int), + daily: daily == _undefined || daily == null + ? _instance.daily + : (daily as int), + weekly: weekly == _undefined || weekly == null + ? _instance.weekly + : (weekly as int), + monthly: monthly == _undefined || monthly == null + ? _instance.monthly + : (monthly as int), + yearly: yearly == _undefined || yearly == null + ? _instance.yearly + : (yearly as int), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration$autobackupQuotas< + TRes> + implements + CopyWith$Query$BackupConfiguration$backup$configuration$autobackupQuotas< + TRes> { + _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration$autobackupQuotas( + this._res); + + TRes _res; + + call({ + int? last, + int? daily, + int? weekly, + int? monthly, + int? yearly, String? $__typename, }) => _res; @@ -4051,6 +4672,546 @@ class _CopyWithStubImpl$Mutation$SetAutobackupPeriod$backup CopyWith$Fragment$genericBackupConfigReturn.stub(_res); } +class Variables$Mutation$setAutobackupQuotas { + factory Variables$Mutation$setAutobackupQuotas( + {required Input$AutobackupQuotasInput quotas}) => + Variables$Mutation$setAutobackupQuotas._({ + r'quotas': quotas, + }); + + Variables$Mutation$setAutobackupQuotas._(this._$data); + + factory Variables$Mutation$setAutobackupQuotas.fromJson( + Map data) { + final result$data = {}; + final l$quotas = data['quotas']; + result$data['quotas'] = Input$AutobackupQuotasInput.fromJson( + (l$quotas as Map)); + return Variables$Mutation$setAutobackupQuotas._(result$data); + } + + Map _$data; + + Input$AutobackupQuotasInput get quotas => + (_$data['quotas'] as Input$AutobackupQuotasInput); + Map toJson() { + final result$data = {}; + final l$quotas = quotas; + result$data['quotas'] = l$quotas.toJson(); + return result$data; + } + + CopyWith$Variables$Mutation$setAutobackupQuotas< + Variables$Mutation$setAutobackupQuotas> + get copyWith => CopyWith$Variables$Mutation$setAutobackupQuotas( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Variables$Mutation$setAutobackupQuotas) || + runtimeType != other.runtimeType) { + return false; + } + final l$quotas = quotas; + final lOther$quotas = other.quotas; + if (l$quotas != lOther$quotas) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$quotas = quotas; + return Object.hashAll([l$quotas]); + } +} + +abstract class CopyWith$Variables$Mutation$setAutobackupQuotas { + factory CopyWith$Variables$Mutation$setAutobackupQuotas( + Variables$Mutation$setAutobackupQuotas instance, + TRes Function(Variables$Mutation$setAutobackupQuotas) then, + ) = _CopyWithImpl$Variables$Mutation$setAutobackupQuotas; + + factory CopyWith$Variables$Mutation$setAutobackupQuotas.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$setAutobackupQuotas; + + TRes call({Input$AutobackupQuotasInput? quotas}); +} + +class _CopyWithImpl$Variables$Mutation$setAutobackupQuotas + implements CopyWith$Variables$Mutation$setAutobackupQuotas { + _CopyWithImpl$Variables$Mutation$setAutobackupQuotas( + this._instance, + this._then, + ); + + final Variables$Mutation$setAutobackupQuotas _instance; + + final TRes Function(Variables$Mutation$setAutobackupQuotas) _then; + + static const _undefined = {}; + + TRes call({Object? quotas = _undefined}) => + _then(Variables$Mutation$setAutobackupQuotas._({ + ..._instance._$data, + if (quotas != _undefined && quotas != null) + 'quotas': (quotas as Input$AutobackupQuotasInput), + })); +} + +class _CopyWithStubImpl$Variables$Mutation$setAutobackupQuotas + implements CopyWith$Variables$Mutation$setAutobackupQuotas { + _CopyWithStubImpl$Variables$Mutation$setAutobackupQuotas(this._res); + + TRes _res; + + call({Input$AutobackupQuotasInput? quotas}) => _res; +} + +class Mutation$setAutobackupQuotas { + Mutation$setAutobackupQuotas({ + required this.backup, + this.$__typename = 'Mutation', + }); + + factory Mutation$setAutobackupQuotas.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Mutation$setAutobackupQuotas( + backup: Mutation$setAutobackupQuotas$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Mutation$setAutobackupQuotas$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$setAutobackupQuotas) || + runtimeType != other.runtimeType) { + return false; + } + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$setAutobackupQuotas + on Mutation$setAutobackupQuotas { + CopyWith$Mutation$setAutobackupQuotas + get copyWith => CopyWith$Mutation$setAutobackupQuotas( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$setAutobackupQuotas { + factory CopyWith$Mutation$setAutobackupQuotas( + Mutation$setAutobackupQuotas instance, + TRes Function(Mutation$setAutobackupQuotas) then, + ) = _CopyWithImpl$Mutation$setAutobackupQuotas; + + factory CopyWith$Mutation$setAutobackupQuotas.stub(TRes res) = + _CopyWithStubImpl$Mutation$setAutobackupQuotas; + + TRes call({ + Mutation$setAutobackupQuotas$backup? backup, + String? $__typename, + }); + CopyWith$Mutation$setAutobackupQuotas$backup get backup; +} + +class _CopyWithImpl$Mutation$setAutobackupQuotas + implements CopyWith$Mutation$setAutobackupQuotas { + _CopyWithImpl$Mutation$setAutobackupQuotas( + this._instance, + this._then, + ); + + final Mutation$setAutobackupQuotas _instance; + + final TRes Function(Mutation$setAutobackupQuotas) _then; + + static const _undefined = {}; + + TRes call({ + Object? backup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$setAutobackupQuotas( + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Mutation$setAutobackupQuotas$backup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Mutation$setAutobackupQuotas$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Mutation$setAutobackupQuotas$backup( + local$backup, (e) => call(backup: e)); + } +} + +class _CopyWithStubImpl$Mutation$setAutobackupQuotas + implements CopyWith$Mutation$setAutobackupQuotas { + _CopyWithStubImpl$Mutation$setAutobackupQuotas(this._res); + + TRes _res; + + call({ + Mutation$setAutobackupQuotas$backup? backup, + String? $__typename, + }) => + _res; + CopyWith$Mutation$setAutobackupQuotas$backup get backup => + CopyWith$Mutation$setAutobackupQuotas$backup.stub(_res); +} + +const documentNodeMutationsetAutobackupQuotas = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'setAutobackupQuotas'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'quotas')), + type: NamedTypeNode( + name: NameNode(value: 'AutobackupQuotasInput'), + isNonNull: true, + ), + defaultValue: DefaultValueNode(value: null), + directives: [], + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'backup'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'setAutobackupQuotas'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'quotas'), + value: VariableNode(name: NameNode(value: 'quotas')), + ) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'genericBackupConfigReturn'), + directives: [], + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitiongenericBackupConfigReturn, +]); +Mutation$setAutobackupQuotas _parserFn$Mutation$setAutobackupQuotas( + Map data) => + Mutation$setAutobackupQuotas.fromJson(data); +typedef OnMutationCompleted$Mutation$setAutobackupQuotas = FutureOr + Function( + Map?, + Mutation$setAutobackupQuotas?, +); + +class Options$Mutation$setAutobackupQuotas + extends graphql.MutationOptions { + Options$Mutation$setAutobackupQuotas({ + String? operationName, + required Variables$Mutation$setAutobackupQuotas variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$setAutobackupQuotas? typedOptimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$setAutobackupQuotas? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError, + }) : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$setAutobackupQuotas(data), + ), + update: update, + onError: onError, + document: documentNodeMutationsetAutobackupQuotas, + parserFn: _parserFn$Mutation$setAutobackupQuotas, + ); + + final OnMutationCompleted$Mutation$setAutobackupQuotas? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed, + ]; +} + +class WatchOptions$Mutation$setAutobackupQuotas + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$setAutobackupQuotas({ + String? operationName, + required Variables$Mutation$setAutobackupQuotas variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Mutation$setAutobackupQuotas? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeMutationsetAutobackupQuotas, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$setAutobackupQuotas, + ); +} + +extension ClientExtension$Mutation$setAutobackupQuotas + on graphql.GraphQLClient { + Future> + mutate$setAutobackupQuotas( + Options$Mutation$setAutobackupQuotas options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$setAutobackupQuotas( + WatchOptions$Mutation$setAutobackupQuotas options) => + this.watchMutation(options); +} + +class Mutation$setAutobackupQuotas$backup { + Mutation$setAutobackupQuotas$backup({ + required this.setAutobackupQuotas, + this.$__typename = 'BackupMutations', + }); + + factory Mutation$setAutobackupQuotas$backup.fromJson( + Map json) { + final l$setAutobackupQuotas = json['setAutobackupQuotas']; + final l$$__typename = json['__typename']; + return Mutation$setAutobackupQuotas$backup( + setAutobackupQuotas: Fragment$genericBackupConfigReturn.fromJson( + (l$setAutobackupQuotas as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Fragment$genericBackupConfigReturn setAutobackupQuotas; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$setAutobackupQuotas = setAutobackupQuotas; + _resultData['setAutobackupQuotas'] = l$setAutobackupQuotas.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$setAutobackupQuotas = setAutobackupQuotas; + final l$$__typename = $__typename; + return Object.hashAll([ + l$setAutobackupQuotas, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Mutation$setAutobackupQuotas$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$setAutobackupQuotas = setAutobackupQuotas; + final lOther$setAutobackupQuotas = other.setAutobackupQuotas; + if (l$setAutobackupQuotas != lOther$setAutobackupQuotas) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Mutation$setAutobackupQuotas$backup + on Mutation$setAutobackupQuotas$backup { + CopyWith$Mutation$setAutobackupQuotas$backup< + Mutation$setAutobackupQuotas$backup> + get copyWith => CopyWith$Mutation$setAutobackupQuotas$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Mutation$setAutobackupQuotas$backup { + factory CopyWith$Mutation$setAutobackupQuotas$backup( + Mutation$setAutobackupQuotas$backup instance, + TRes Function(Mutation$setAutobackupQuotas$backup) then, + ) = _CopyWithImpl$Mutation$setAutobackupQuotas$backup; + + factory CopyWith$Mutation$setAutobackupQuotas$backup.stub(TRes res) = + _CopyWithStubImpl$Mutation$setAutobackupQuotas$backup; + + TRes call({ + Fragment$genericBackupConfigReturn? setAutobackupQuotas, + String? $__typename, + }); + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupQuotas; +} + +class _CopyWithImpl$Mutation$setAutobackupQuotas$backup + implements CopyWith$Mutation$setAutobackupQuotas$backup { + _CopyWithImpl$Mutation$setAutobackupQuotas$backup( + this._instance, + this._then, + ); + + final Mutation$setAutobackupQuotas$backup _instance; + + final TRes Function(Mutation$setAutobackupQuotas$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? setAutobackupQuotas = _undefined, + Object? $__typename = _undefined, + }) => + _then(Mutation$setAutobackupQuotas$backup( + setAutobackupQuotas: + setAutobackupQuotas == _undefined || setAutobackupQuotas == null + ? _instance.setAutobackupQuotas + : (setAutobackupQuotas as Fragment$genericBackupConfigReturn), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupQuotas { + final local$setAutobackupQuotas = _instance.setAutobackupQuotas; + return CopyWith$Fragment$genericBackupConfigReturn( + local$setAutobackupQuotas, (e) => call(setAutobackupQuotas: e)); + } +} + +class _CopyWithStubImpl$Mutation$setAutobackupQuotas$backup + implements CopyWith$Mutation$setAutobackupQuotas$backup { + _CopyWithStubImpl$Mutation$setAutobackupQuotas$backup(this._res); + + TRes _res; + + call({ + Fragment$genericBackupConfigReturn? setAutobackupQuotas, + String? $__typename, + }) => + _res; + CopyWith$Fragment$genericBackupConfigReturn get setAutobackupQuotas => + CopyWith$Fragment$genericBackupConfigReturn.stub(_res); +} + class Mutation$RemoveRepository { Mutation$RemoveRepository({ required this.backup, diff --git a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart index ed54bd53..8e77d452 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/backups_api.dart @@ -143,6 +143,51 @@ mixin BackupsApi on GraphQLApiMap { return result; } + Future setAutobackupQuotas( + final AutobackupQuotas quotas, + ) async { + QueryResult response; + GenericResult? result; + + try { + final GraphQLClient client = await getClient(); + final variables = Variables$Mutation$setAutobackupQuotas( + quotas: Input$AutobackupQuotasInput( + last: quotas.last, + daily: quotas.daily, + weekly: quotas.weekly, + monthly: quotas.monthly, + yearly: quotas.yearly, + ), + ); + final options = + Options$Mutation$setAutobackupQuotas(variables: variables); + response = await client.mutate$setAutobackupQuotas(options); + if (response.hasException) { + final message = response.exception.toString(); + print(message); + result = GenericResult( + success: false, + data: null, + message: message, + ); + } + result = GenericResult( + success: true, + data: null, + ); + } catch (e) { + print(e); + result = GenericResult( + success: false, + data: null, + message: e.toString(), + ); + } + + return result; + } + Future removeRepository() async { try { final GraphQLClient client = await getClient(); diff --git a/lib/logic/cubit/backups/backups_cubit.dart b/lib/logic/cubit/backups/backups_cubit.dart index 89470656..ca7e0a50 100644 --- a/lib/logic/cubit/backups/backups_cubit.dart +++ b/lib/logic/cubit/backups/backups_cubit.dart @@ -36,6 +36,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { backblazeBucket: bucket, isInitialized: backupConfig?.isInitialized, autobackupPeriod: backupConfig?.autobackupPeriod ?? Duration.zero, + autobackupQuotas: backupConfig?.autobackupQuotas, backups: backups, preventActions: false, refreshing: false, @@ -168,6 +169,7 @@ class BackupsCubit extends ServerInstallationDependendCubit { refreshing: false, isInitialized: backupConfig?.isInitialized ?? false, autobackupPeriod: backupConfig?.autobackupPeriod, + autobackupQuotas: backupConfig?.autobackupQuotas, ), ); if (useTimer) { @@ -227,6 +229,25 @@ class BackupsCubit extends ServerInstallationDependendCubit { await updateBackups(); } + Future setAutobackupQuotas(final AutobackupQuotas quotas) async { + emit(state.copyWith(preventActions: true)); + final result = await api.setAutobackupQuotas(quotas); + if (result.success == false) { + getIt() + .showSnackBar(result.message ?? 'Unknown error'); + emit(state.copyWith(preventActions: false)); + } else { + getIt().showSnackBar('backup.quotas_set'.tr()); + emit( + state.copyWith( + preventActions: false, + autobackupQuotas: quotas, + ), + ); + } + await updateBackups(); + } + Future forgetSnapshot(final String snapshotId) async { final result = await api.forgetSnapshot(snapshotId); if (!result.success) { diff --git a/lib/logic/cubit/backups/backups_state.dart b/lib/logic/cubit/backups/backups_state.dart index 52b9b106..887396d7 100644 --- a/lib/logic/cubit/backups/backups_state.dart +++ b/lib/logic/cubit/backups/backups_state.dart @@ -9,6 +9,7 @@ class BackupsState extends ServerInstallationDependendState { this.refreshing = true, this.autobackupPeriod, this.backblazeBucket, + this.autobackupQuotas, }); final bool isInitialized; @@ -18,6 +19,7 @@ class BackupsState extends ServerInstallationDependendState { final bool refreshing; final Duration? autobackupPeriod; final BackblazeBucket? backblazeBucket; + final AutobackupQuotas? autobackupQuotas; List serviceBackups(final String serviceId) => backups .where((final backup) => backup.serviceId == serviceId) @@ -40,6 +42,7 @@ class BackupsState extends ServerInstallationDependendState { final bool? refreshing, final Duration? autobackupPeriod, final BackblazeBucket? backblazeBucket, + final AutobackupQuotas? autobackupQuotas, }) => BackupsState( isInitialized: isInitialized ?? this.isInitialized, @@ -53,5 +56,6 @@ class BackupsState extends ServerInstallationDependendState { ? null : autobackupPeriod ?? this.autobackupPeriod, backblazeBucket: backblazeBucket ?? this.backblazeBucket, + autobackupQuotas: autobackupQuotas ?? this.autobackupQuotas, ); } diff --git a/lib/logic/models/backup.dart b/lib/logic/models/backup.dart index de5f9b44..1dcf9129 100644 --- a/lib/logic/models/backup.dart +++ b/lib/logic/models/backup.dart @@ -53,6 +53,9 @@ class BackupConfiguration { locationId: configuration.locationId, locationName: configuration.locationName, provider: BackupsProviderType.fromGraphQL(configuration.provider), + autobackupQuotas: AutobackupQuotas.fromGraphQL( + configuration.autobackupQuotas, + ), ); BackupConfiguration({ @@ -62,6 +65,7 @@ class BackupConfiguration { required this.locationId, required this.locationName, required this.provider, + required this.autobackupQuotas, }); final Duration? autobackupPeriod; @@ -70,6 +74,49 @@ class BackupConfiguration { final String? locationId; final String? locationName; final BackupsProviderType provider; + final AutobackupQuotas autobackupQuotas; +} + +class AutobackupQuotas { + AutobackupQuotas.fromGraphQL( + final Query$BackupConfiguration$backup$configuration$autobackupQuotas + autobackupQuotas, + ) : this( + last: autobackupQuotas.last, + daily: autobackupQuotas.daily, + weekly: autobackupQuotas.weekly, + monthly: autobackupQuotas.monthly, + yearly: autobackupQuotas.yearly, + ); + + AutobackupQuotas({ + required this.last, + required this.daily, + required this.weekly, + required this.monthly, + required this.yearly, + }); + + final int last; + final int daily; + final int weekly; + final int monthly; + final int yearly; + + AutobackupQuotas copyWith({ + final int? last, + final int? daily, + final int? weekly, + final int? monthly, + final int? yearly, + }) => + AutobackupQuotas( + last: last ?? this.last, + daily: daily ?? this.daily, + weekly: weekly ?? this.weekly, + monthly: monthly ?? this.monthly, + yearly: yearly ?? this.yearly, + ); } enum BackupRestoreStrategy { diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 31f07e9d..344876b1 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -16,6 +16,7 @@ import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/pages/backups/change_period_modal.dart'; +import 'package:selfprivacy/ui/pages/backups/change_rotation_quotas_modal.dart'; import 'package:selfprivacy/ui/pages/backups/copy_encryption_key_modal.dart'; import 'package:selfprivacy/ui/pages/backups/create_backups_modal.dart'; import 'package:selfprivacy/ui/pages/backups/snapshot_modal.dart'; @@ -168,6 +169,38 @@ class BackupDetailsPage extends StatelessWidget { : 'backup.autobackup_period_never'.tr(), ), ), + ListTile( + onTap: preventActions + ? null + : () { + showModalBottomSheet( + useRootNavigator: true, + context: context, + isScrollControlled: true, + builder: (final BuildContext context) => + DraggableScrollableSheet( + expand: false, + maxChildSize: 0.9, + minChildSize: 0.4, + initialChildSize: 0.6, + builder: (final context, final scrollController) => + ChangeRotationQuotasModal( + scrollController: scrollController, + ), + ), + ); + }, + leading: Icon( + Icons.auto_delete_outlined, + color: overrideColor, + ), + title: Text( + 'backup.rotation_quotas_title'.tr(), + style: TextStyle( + color: overrideColor, + ), + ), + ), ListTile( onTap: preventActions ? null diff --git a/lib/ui/pages/backups/change_rotation_quotas_modal.dart b/lib/ui/pages/backups/change_rotation_quotas_modal.dart new file mode 100644 index 00000000..6d9cba8a --- /dev/null +++ b/lib/ui/pages/backups/change_rotation_quotas_modal.dart @@ -0,0 +1,244 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; +import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart'; +import 'package:selfprivacy/logic/models/backup.dart'; + +class ChangeRotationQuotasModal extends StatefulWidget { + const ChangeRotationQuotasModal({ + required this.scrollController, + super.key, + }); + + final ScrollController scrollController; + + @override + State createState() => + _ChangeRotationQuotasModalState(); +} + +enum QuotaUnits { + last, + daily, + weekly, + monthly, + yearly, +} + +class _ChangeRotationQuotasModalState extends State { + AutobackupQuotas selectedQuotas = AutobackupQuotas( + last: 3, + daily: 7, + weekly: 4, + monthly: 6, + yearly: -1, + ); + + // Set initial period to the one currently set + @override + void initState() { + super.initState(); + selectedQuotas = + context.read().state.autobackupQuotas ?? selectedQuotas; + } + + String generateSubtitle(final int value, final QuotaUnits unit) { + switch (unit) { + case QuotaUnits.last: + return value == -1 + ? 'backup.quota_subtitles.last_infinite'.tr() + : 'backup.quota_subtitles.last'.plural(value); + case QuotaUnits.daily: + if (selectedQuotas.last == -1) { + return 'backup.quota_subtitles.no_effect'.tr(); + } + return value == -1 + ? 'backup.quota_subtitles.daily_infinite'.tr() + : 'backup.quota_subtitles.daily'.plural(value); + case QuotaUnits.weekly: + if (selectedQuotas.last == -1 || selectedQuotas.daily == -1) { + return 'backup.quota_subtitles.no_effect'.tr(); + } + return value == -1 + ? 'backup.quota_subtitles.weekly_infinite'.tr() + : 'backup.quota_subtitles.weekly'.plural(value); + case QuotaUnits.monthly: + if (selectedQuotas.last == -1 || selectedQuotas.daily == -1) { + return 'backup.quota_subtitles.no_effect'.tr(); + } + return value == -1 + ? 'backup.quota_subtitles.monthly_infinite'.tr() + : 'backup.quota_subtitles.monthly'.plural(value); + case QuotaUnits.yearly: + if (selectedQuotas.last == -1 || selectedQuotas.daily == -1) { + return 'backup.quota_subtitles.no_effect'.tr(); + } + return value == -1 + ? 'backup.quota_subtitles.yearly_infinite'.tr() + : 'backup.quota_subtitles.yearly'.plural(value); + } + } + + @override + Widget build(final BuildContext context) { + final AutobackupQuotas? initialAutobackupQuotas = + context.watch().state.autobackupQuotas; + return ListView( + controller: widget.scrollController, + padding: const EdgeInsets.all(16), + children: [ + const SizedBox(height: 16), + Text( + 'backup.rotation_quotas_title'.tr(), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + const SizedBox(height: 16), + // Accordions for each quota type. When tapped allows to enter a new int value + // for the quota. + QuotaSelectionTile( + title: 'backup.quota_titles.last'.tr(), + subtitle: generateSubtitle(selectedQuotas.last, QuotaUnits.last), + value: selectedQuotas.last, + min: 1, + max: 30, + callback: (final double value) { + setState(() { + if (value == 31) { + selectedQuotas = selectedQuotas.copyWith(last: -1); + return; + } + selectedQuotas = selectedQuotas.copyWith(last: value.toInt()); + }); + }, + ), + QuotaSelectionTile( + title: 'backup.quota_titles.daily'.tr(), + subtitle: generateSubtitle(selectedQuotas.daily, QuotaUnits.daily), + value: selectedQuotas.daily, + min: 0, + max: 30, + callback: (final double value) { + setState(() { + if (value == 31) { + selectedQuotas = selectedQuotas.copyWith(daily: -1); + return; + } + selectedQuotas = selectedQuotas.copyWith(daily: value.toInt()); + }); + }, + ), + QuotaSelectionTile( + title: 'backup.quota_titles.weekly'.tr(), + subtitle: generateSubtitle(selectedQuotas.weekly, QuotaUnits.weekly), + value: selectedQuotas.weekly, + min: 0, + max: 15, + callback: (final double value) { + setState(() { + if (value == 16) { + selectedQuotas = selectedQuotas.copyWith(weekly: -1); + return; + } + selectedQuotas = selectedQuotas.copyWith(weekly: value.toInt()); + }); + }, + ), + QuotaSelectionTile( + title: 'backup.quota_titles.monthly'.tr(), + subtitle: + generateSubtitle(selectedQuotas.monthly, QuotaUnits.monthly), + value: selectedQuotas.monthly, + min: 0, + max: 24, + callback: (final double value) { + setState(() { + if (value == 25) { + selectedQuotas = selectedQuotas.copyWith(monthly: -1); + return; + } + selectedQuotas = selectedQuotas.copyWith(monthly: value.toInt()); + }); + }, + ), + QuotaSelectionTile( + title: 'backup.quota_titles.yearly'.tr(), + subtitle: generateSubtitle(selectedQuotas.yearly, QuotaUnits.yearly), + value: selectedQuotas.yearly, + min: 0, + max: 5, + callback: (final double value) { + setState(() { + if (value == 6) { + selectedQuotas = selectedQuotas.copyWith(yearly: -1); + return; + } + selectedQuotas = selectedQuotas.copyWith(yearly: value.toInt()); + }); + }, + ), + const SizedBox(height: 16), + FilledButton( + onPressed: selectedQuotas == initialAutobackupQuotas + ? null + : () { + context + .read() + .setAutobackupQuotas(selectedQuotas); + Navigator.of(context).pop(); + }, + child: Text( + 'backup.set_rotation_quotas'.tr(), + ), + ), + ], + ); + } +} + +class QuotaSelectionTile extends StatelessWidget { + const QuotaSelectionTile({ + required this.title, + required this.subtitle, + required this.value, + required this.min, + required this.max, + required this.callback, + super.key, + }); + + final String title; + final String subtitle; + final int value; + final int min; + final int max; + final void Function(double) callback; + + @override + Widget build(final BuildContext context) => ExpansionTile( + title: Text(title), + subtitle: Text(subtitle), + trailing: Text( + value == -1 ? '∞' : value.toString(), + style: Theme.of(context).textTheme.headlineMedium, + ), + children: [ + // Discrete slider to select the new value + if (value >= -1 && value <= max) + Slider( + value: value == -1 ? max + 1 : value.toDouble(), + min: min.toDouble(), + max: (max + 1).toDouble(), + divisions: max - min + 1, + label: value == -1 ? '∞' : value.toString(), + onChanged: callback, + ), + if (value < -1 || value > max) + Text( + 'Manually set to $value', + style: Theme.of(context).textTheme.headlineSmall, + ), + ], + ); +} diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index 60088ea3..a681c07a 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -320,7 +320,7 @@ class InitializingPage extends StatelessWidget { Widget _stepDomain(final ServerInstallationCubit initializingCubit) => BlocProvider( create: (final context) => DomainSetupCubit(initializingCubit)..load(), - child: DomainPicker(), + child: const DomainPicker(), ); Widget _stepUser(final ServerInstallationCubit initializingCubit) => diff --git a/lib/ui/router/router.gr.dart b/lib/ui/router/router.gr.dart index dfc41363..a9d401f3 100644 --- a/lib/ui/router/router.gr.dart +++ b/lib/ui/router/router.gr.dart @@ -15,18 +15,6 @@ abstract class _$RootRouter extends RootStackRouter { @override final Map pagesMap = { - OnboardingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const OnboardingPage(), - ); - }, - BackupDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const BackupDetailsPage(), - ); - }, BackupsListRoute.name: (routeData) { final args = routeData.argsAs(); return AutoRoutePage( @@ -37,10 +25,58 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - RecoveryKeyRoute.name: (routeData) { + BackupDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, - child: const RecoveryKeyPage(), + child: const BackupDetailsPage(), + ); + }, + DevicesRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DevicesScreen(), + ); + }, + DnsDetailsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DnsDetailsPage(), + ); + }, + AboutApplicationRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AboutApplicationPage(), + ); + }, + AppSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const AppSettingsPage(), + ); + }, + DeveloperSettingsRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const DeveloperSettingsPage(), + ); + }, + ConsoleRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const ConsolePage(), + ); + }, + MoreRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const MorePage(), + ); + }, + OnboardingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const OnboardingPage(), ); }, ProvidersRoute.name: (routeData) { @@ -49,6 +85,18 @@ abstract class _$RootRouter extends RootStackRouter { child: const ProvidersPage(), ); }, + RecoveryKeyRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryKeyPage(), + ); + }, + RootRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: WrappedRoute(child: const RootPage()), + ); + }, ServerDetailsRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -67,17 +115,6 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - ExtendingVolumeRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ExtendingVolumePage( - diskVolumeToResize: args.diskVolumeToResize, - diskStatus: args.diskStatus, - key: args.key, - ), - ); - }, ServerStorageRoute.name: (routeData) { final args = routeData.argsAs(); return AutoRoutePage( @@ -88,52 +125,15 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - DevicesRoute.name: (routeData) { + ExtendingVolumeRoute.name: (routeData) { + final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: const DevicesScreen(), - ); - }, - RootRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: WrappedRoute(child: const RootPage()), - ); - }, - AboutApplicationRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AboutApplicationPage(), - ); - }, - ConsoleRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ConsolePage(), - ); - }, - MoreRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const MorePage(), - ); - }, - AppSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const AppSettingsPage(), - ); - }, - DeveloperSettingsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DeveloperSettingsPage(), - ); - }, - DnsDetailsRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const DnsDetailsPage(), + child: ExtendingVolumePage( + diskVolumeToResize: args.diskVolumeToResize, + diskStatus: args.diskStatus, + key: args.key, + ), ); }, ServiceRoute.name: (routeData) { @@ -152,6 +152,18 @@ abstract class _$RootRouter extends RootStackRouter { child: const ServicesPage(), ); }, + InitializingRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const InitializingPage(), + ); + }, + RecoveryRoute.name: (routeData) { + return AutoRoutePage( + routeData: routeData, + child: const RecoveryRouting(), + ); + }, UsersRoute.name: (routeData) { return AutoRoutePage( routeData: routeData, @@ -174,49 +186,9 @@ abstract class _$RootRouter extends RootStackRouter { ), ); }, - InitializingRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const InitializingPage(), - ); - }, - RecoveryRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const RecoveryRouting(), - ); - }, }; } -/// generated route for -/// [OnboardingPage] -class OnboardingRoute extends PageRouteInfo { - const OnboardingRoute({List? children}) - : super( - OnboardingRoute.name, - initialChildren: children, - ); - - static const String name = 'OnboardingRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [BackupDetailsPage] -class BackupDetailsRoute extends PageRouteInfo { - const BackupDetailsRoute({List? children}) - : super( - BackupDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'BackupDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [BackupsListPage] class BackupsListRoute extends PageRouteInfo { @@ -256,15 +228,127 @@ class BackupsListRouteArgs { } /// generated route for -/// [RecoveryKeyPage] -class RecoveryKeyRoute extends PageRouteInfo { - const RecoveryKeyRoute({List? children}) +/// [BackupDetailsPage] +class BackupDetailsRoute extends PageRouteInfo { + const BackupDetailsRoute({List? children}) : super( - RecoveryKeyRoute.name, + BackupDetailsRoute.name, initialChildren: children, ); - static const String name = 'RecoveryKeyRoute'; + static const String name = 'BackupDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DevicesScreen] +class DevicesRoute extends PageRouteInfo { + const DevicesRoute({List? children}) + : super( + DevicesRoute.name, + initialChildren: children, + ); + + static const String name = 'DevicesRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DnsDetailsPage] +class DnsDetailsRoute extends PageRouteInfo { + const DnsDetailsRoute({List? children}) + : super( + DnsDetailsRoute.name, + initialChildren: children, + ); + + static const String name = 'DnsDetailsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [AboutApplicationPage] +class AboutApplicationRoute extends PageRouteInfo { + const AboutApplicationRoute({List? children}) + : super( + AboutApplicationRoute.name, + initialChildren: children, + ); + + static const String name = 'AboutApplicationRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [AppSettingsPage] +class AppSettingsRoute extends PageRouteInfo { + const AppSettingsRoute({List? children}) + : super( + AppSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'AppSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [DeveloperSettingsPage] +class DeveloperSettingsRoute extends PageRouteInfo { + const DeveloperSettingsRoute({List? children}) + : super( + DeveloperSettingsRoute.name, + initialChildren: children, + ); + + static const String name = 'DeveloperSettingsRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [ConsolePage] +class ConsoleRoute extends PageRouteInfo { + const ConsoleRoute({List? children}) + : super( + ConsoleRoute.name, + initialChildren: children, + ); + + static const String name = 'ConsoleRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [MorePage] +class MoreRoute extends PageRouteInfo { + const MoreRoute({List? children}) + : super( + MoreRoute.name, + initialChildren: children, + ); + + static const String name = 'MoreRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [OnboardingPage] +class OnboardingRoute extends PageRouteInfo { + const OnboardingRoute({List? children}) + : super( + OnboardingRoute.name, + initialChildren: children, + ); + + static const String name = 'OnboardingRoute'; static const PageInfo page = PageInfo(name); } @@ -283,6 +367,34 @@ class ProvidersRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [RecoveryKeyPage] +class RecoveryKeyRoute extends PageRouteInfo { + const RecoveryKeyRoute({List? children}) + : super( + RecoveryKeyRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryKeyRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [RootPage] +class RootRoute extends PageRouteInfo { + const RootRoute({List? children}) + : super( + RootRoute.name, + initialChildren: children, + ); + + static const String name = 'RootRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [ServerDetailsScreen] class ServerDetailsRoute extends PageRouteInfo { @@ -345,6 +457,44 @@ class ServicesMigrationRouteArgs { } } +/// generated route for +/// [ServerStoragePage] +class ServerStorageRoute extends PageRouteInfo { + ServerStorageRoute({ + required DiskStatus diskStatus, + Key? key, + List? children, + }) : super( + ServerStorageRoute.name, + args: ServerStorageRouteArgs( + diskStatus: diskStatus, + key: key, + ), + initialChildren: children, + ); + + static const String name = 'ServerStorageRoute'; + + static const PageInfo page = + PageInfo(name); +} + +class ServerStorageRouteArgs { + const ServerStorageRouteArgs({ + required this.diskStatus, + this.key, + }); + + final DiskStatus diskStatus; + + final Key? key; + + @override + String toString() { + return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; + } +} + /// generated route for /// [ExtendingVolumePage] class ExtendingVolumeRoute extends PageRouteInfo { @@ -388,156 +538,6 @@ class ExtendingVolumeRouteArgs { } } -/// generated route for -/// [ServerStoragePage] -class ServerStorageRoute extends PageRouteInfo { - ServerStorageRoute({ - required DiskStatus diskStatus, - Key? key, - List? children, - }) : super( - ServerStorageRoute.name, - args: ServerStorageRouteArgs( - diskStatus: diskStatus, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'ServerStorageRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ServerStorageRouteArgs { - const ServerStorageRouteArgs({ - required this.diskStatus, - this.key, - }); - - final DiskStatus diskStatus; - - final Key? key; - - @override - String toString() { - return 'ServerStorageRouteArgs{diskStatus: $diskStatus, key: $key}'; - } -} - -/// generated route for -/// [DevicesScreen] -class DevicesRoute extends PageRouteInfo { - const DevicesRoute({List? children}) - : super( - DevicesRoute.name, - initialChildren: children, - ); - - static const String name = 'DevicesRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [RootPage] -class RootRoute extends PageRouteInfo { - const RootRoute({List? children}) - : super( - RootRoute.name, - initialChildren: children, - ); - - static const String name = 'RootRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [AboutApplicationPage] -class AboutApplicationRoute extends PageRouteInfo { - const AboutApplicationRoute({List? children}) - : super( - AboutApplicationRoute.name, - initialChildren: children, - ); - - static const String name = 'AboutApplicationRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ConsolePage] -class ConsoleRoute extends PageRouteInfo { - const ConsoleRoute({List? children}) - : super( - ConsoleRoute.name, - initialChildren: children, - ); - - static const String name = 'ConsoleRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [MorePage] -class MoreRoute extends PageRouteInfo { - const MoreRoute({List? children}) - : super( - MoreRoute.name, - initialChildren: children, - ); - - static const String name = 'MoreRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [AppSettingsPage] -class AppSettingsRoute extends PageRouteInfo { - const AppSettingsRoute({List? children}) - : super( - AppSettingsRoute.name, - initialChildren: children, - ); - - static const String name = 'AppSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DeveloperSettingsPage] -class DeveloperSettingsRoute extends PageRouteInfo { - const DeveloperSettingsRoute({List? children}) - : super( - DeveloperSettingsRoute.name, - initialChildren: children, - ); - - static const String name = 'DeveloperSettingsRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [DnsDetailsPage] -class DnsDetailsRoute extends PageRouteInfo { - const DnsDetailsRoute({List? children}) - : super( - DnsDetailsRoute.name, - initialChildren: children, - ); - - static const String name = 'DnsDetailsRoute'; - - static const PageInfo page = PageInfo(name); -} - /// generated route for /// [ServicePage] class ServiceRoute extends PageRouteInfo { @@ -590,6 +590,34 @@ class ServicesRoute extends PageRouteInfo { static const PageInfo page = PageInfo(name); } +/// generated route for +/// [InitializingPage] +class InitializingRoute extends PageRouteInfo { + const InitializingRoute({List? children}) + : super( + InitializingRoute.name, + initialChildren: children, + ); + + static const String name = 'InitializingRoute'; + + static const PageInfo page = PageInfo(name); +} + +/// generated route for +/// [RecoveryRouting] +class RecoveryRoute extends PageRouteInfo { + const RecoveryRoute({List? children}) + : super( + RecoveryRoute.name, + initialChildren: children, + ); + + static const String name = 'RecoveryRoute'; + + static const PageInfo page = PageInfo(name); +} + /// generated route for /// [UsersPage] class UsersRoute extends PageRouteInfo { @@ -655,31 +683,3 @@ class UserDetailsRouteArgs { return 'UserDetailsRouteArgs{login: $login, key: $key}'; } } - -/// generated route for -/// [InitializingPage] -class InitializingRoute extends PageRouteInfo { - const InitializingRoute({List? children}) - : super( - InitializingRoute.name, - initialChildren: children, - ); - - static const String name = 'InitializingRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [RecoveryRouting] -class RecoveryRoute extends PageRouteInfo { - const RecoveryRoute({List? children}) - : super( - RecoveryRoute.name, - initialChildren: children, - ); - - static const String name = 'RecoveryRoute'; - - static const PageInfo page = PageInfo(name); -} From 0ffd7e61d69314274feb4b12991c663676e7ec75 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 9 Sep 2023 21:20:21 +0300 Subject: [PATCH 708/732] feat(backups): Add note about the scope of backup rotation --- flake.lock | 8 ++++---- lib/ui/pages/backups/change_rotation_quotas_modal.dart | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index cfd8ecfe..14cdcc98 100644 --- a/flake.lock +++ b/flake.lock @@ -66,16 +66,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1662096612, - "narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=", + "lastModified": 1693250523, + "narHash": "sha256-y3up5gXMTbnCsXrNEB5j+7TVantDLUYyQLu/ueiXuyg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "21de2b973f9fee595a7a1ac4693efff791245c34", + "rev": "3efb0f6f404ec8dae31bdb1a9b17705ce0d6986e", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "type": "indirect" } }, diff --git a/lib/ui/pages/backups/change_rotation_quotas_modal.dart b/lib/ui/pages/backups/change_rotation_quotas_modal.dart index 6d9cba8a..0ce97eee 100644 --- a/lib/ui/pages/backups/change_rotation_quotas_modal.dart +++ b/lib/ui/pages/backups/change_rotation_quotas_modal.dart @@ -94,6 +94,12 @@ class _ChangeRotationQuotasModalState extends State { style: Theme.of(context).textTheme.headlineSmall, textAlign: TextAlign.center, ), + const SizedBox(height: 8), + Text( + 'backup.quotas_only_applied_to_autobackups'.tr(), + style: Theme.of(context).textTheme.bodyMedium, + textAlign: TextAlign.center, + ), const SizedBox(height: 16), // Accordions for each quota type. When tapped allows to enter a new int value // for the quota. From beb526a63552afb9e808fd5378a4d8b341b9386a Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 10 Sep 2023 12:46:55 +0300 Subject: [PATCH 709/732] chore(i18l): Add missing translation --- assets/translations/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/translations/en.json b/assets/translations/en.json index 8571b1c0..5fb1ce5c 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -231,6 +231,7 @@ "rotation_quotas_title": "Snapshot rotation settings", "set_rotation_quotas": "Set new rotation quotas", "quotas_set": "New backup rotation quotas set", + "quotas_only_applied_to_autobackups": "These settings are only applied to automatic backups. Manual backups won't get deleted.", "quota_titles": { "last": "How many latest backups to keep", "daily": "How many daily backups to keep", From d812066355feb1d1ca837d8d7bd587cf56c1a9c9 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 10 Sep 2023 09:34:50 +0000 Subject: [PATCH 710/732] Translated using Weblate (Russian) Currently translated at 100.0% (529 of 529 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 71 +++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 1836c4f4..e6b7397d 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -220,7 +220,72 @@ "snapshot_modal_download_verify_option_title": "Загрузите, проверьте и затем замените", "snapshot_modal_inplace_option_title": "Заменить на месте", "snapshot_modal_inplace_option_description": "Требуется меньше свободного места, но риск выше. При загрузке текущие данные заменяются данными моментального снимка.", - "restore_started": "Восстановление началось, проверьте текущий статус в списке заданий" + "restore_started": "Восстановление началось, проверьте текущий статус в списке заданий", + "quota_subtitles": { + "no_effect": "Это правило не имеет эффекта, так ак перекрыто другим правилом", + "last": { + "two": "Последние {} снимка будут сохраняться вне зависимости от даты создания", + "many": "Последние {} снимков будут сохраняться вне зависимости от даты создания", + "other": "Последние {} снимков будут сохраняться вне зависимости от даты создания", + "zero": "Правило отключено", + "one": "Последний {} снимок будет сохраняться вне зависимости от даты создания", + "few": "Последние {} снимка будут сохраняться вне зависимости от даты создания" + }, + "daily": { + "two": "Последние {} ежедневных снимка будут сохраняться", + "other": "Последние {} ежедневных снимков будут сохраняться", + "zero": "Правило отключено", + "one": "Последний {} ежедневный снимок будет сохраняться", + "few": "Последние {} ежедневных снимка будут сохраняться", + "many": "Последние {} ежедневных снимков будут сохраняться" + }, + "weekly": { + "two": "Последние {} еженедельных снимка будут сохраняться", + "other": "Последние {} еженедельных снимков будут сохраняться", + "zero": "Правило отключено", + "one": "Последний {} еженедельный снимок будет сохраняться", + "few": "Последние {} еженедельных снимка будут сохраняться", + "many": "Последние {} еженедельных снимков будут сохраняться" + }, + "monthly": { + "two": "Последние {} ежемесячных снимка будут сохраняться", + "other": "Последние {} ежемесячных снимков будут сохраняться", + "zero": "Правило отключено", + "one": "Последний {} ежемесячный снимок будет сохраняться", + "few": "Последние {} ежемесячных снимка будут сохраняться", + "many": "Последние {} ежемесячных снимков будут сохраняться" + }, + "yearly": { + "two": "Последние {} ежегодных снимка будут сохраняться", + "many": "Последние {} ежегодных снимков будут сохраняться", + "zero": "Правило отключено", + "one": "Последний {} ежегодный снимок будет сохраняться", + "few": "Последние {} ежегодных снимка будут сохраняться", + "other": "Последние {} ежегодных снимков будут сохраняться" + }, + "last_infinite": "Все снимки будут сохранены", + "daily_infinite": "Все ежедневные снимки будут сохраняться", + "weekly_infinite": "Все еженедельные снимки будут сохраняться", + "monthly_infinite": "Все ежемесячные снимки будут сохраняться", + "yearly_infinite": "Все ежегодные снимки будут сохраняться" + }, + "snapshot_reason_title": "Причина создания", + "snapshot_reasons": { + "auto": "Создано автоматически", + "explicit": "Создано по вашему явному запросу", + "pre_restore": "Создано в качестве меры предосторожности перед рискованным восстановлением", + "unknown": "Неизвестно" + }, + "rotation_quotas_title": "Настройки ротации снимков", + "set_rotation_quotas": "Задать новые квоты ротации", + "quotas_set": "Новые квоты ротации резервных копий заданы", + "quota_titles": { + "last": "Сколько последних снимков сохранять", + "daily": "Сколько ежедневных снимков сохранять", + "weekly": "Сколько еженедельных снимков сохранять", + "monthly": "Сколько ежемесячных снимков сохранять", + "yearly": "Сколько ежегодных снимков сохранять" + } }, "storage": { "card_title": "Хранилище", @@ -400,7 +465,9 @@ "server_reboot": "Перезагрузка сервера", "final_checks": "Финальные проверки" }, - "server_provider_description": "Место, где будут находиться ваши данные и службы SelfPrivacy:" + "server_provider_description": "Место, где будут находиться ваши данные и службы SelfPrivacy:", + "multiple_domains_found": "Найдено несколько доменов", + "multiple_domains_found_text": "Предоставленный токен дает доступ к следующим доменам. Пожалуйста, выберите тот, который вы хотите использовать. Для обеспечения безопасности других доменов следует ограничить доступ этого токена только тем доменом, который вы хотите использовать с SelfPrivacy." }, "recovering": { "generic_error": "Ошибка проведения операции, попробуйте ещё раз.", From dd7436b2fd469aeebc0c22035dcb9768a4889ab7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 10 Sep 2023 09:49:21 +0000 Subject: [PATCH 711/732] Translated using Weblate (Russian) Currently translated at 100.0% (530 of 530 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index e6b7397d..48c81ca9 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -285,7 +285,8 @@ "weekly": "Сколько еженедельных снимков сохранять", "monthly": "Сколько ежемесячных снимков сохранять", "yearly": "Сколько ежегодных снимков сохранять" - } + }, + "quotas_only_applied_to_autobackups": "Эти настройки применяются только к резервным копиям, созданным автоматически. Созданные вручную резервные копии не будут удалены этими правилами." }, "storage": { "card_title": "Хранилище", From 580a68fd7cf07e076dd934758d7bf6c78a233836 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 10 Sep 2023 11:34:17 +0000 Subject: [PATCH 712/732] Translated using Weblate (Russian) Currently translated at 100.0% (530 of 530 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 48c81ca9..ced77198 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -68,8 +68,8 @@ "reset_config_description": "Сбросить API ключи и root пользователя.", "delete_server_title": "Удалить сервер", "delete_server_description": "Действие приведёт к удалению сервера. После этого он будет недоступен.", - "system_dark_theme_title": "Системная тема по-умолчанию", - "system_dark_theme_description": "Используйте светлую или темную темы в зависимости от системных настроек", + "system_dark_theme_title": "Системная тема", + "system_dark_theme_description": "Будет использована светлая или тёмная тема в зависимости от системных настроек", "dangerous_settings": "Опасные настройки" }, "ssh": { @@ -183,7 +183,7 @@ "reupload_key_subtitle": "Ещё раз проинициализирует хранилище резервных копий. Используйте, если что-то сломалось.", "service_busy": "Сейчас создаются другие резервные копии", "autobackup_period_never": "Автоматическое копирование отключено", - "pending_jobs": "Активные задачи на копирование", + "pending_jobs": "Активные задачи резервного копирования", "card_subtitle": "Управляйте резервными копиями", "refetch_backups_subtitle": "Сбросить кэш и запросить данные у провайдера. Может повлечь дополнительные расходы.", "select_all": "Копировать всё", @@ -204,22 +204,22 @@ "snapshots_title": "Список снимков", "forget_snapshot_error": "Не удалось забыть снимок", "backups_encryption_key_not_found": "Ключ шифрования пока не найден, повторите попытку позже.", - "forget_snapshot_alert": "Вы собираетесь удалить этот снимок. Вы уверены? Это действие обычно нельзя отменить.", + "forget_snapshot_alert": "Вы уверены что хотите удалить этот снимок? Это действие обычно нельзя отменить.", "snapshot_modal_select_strategy": "Выберите стратегию восстановления", - "snapshot_modal_download_verify_option_description": "Меньше риск, но требуется больше свободного места. Загрузка всего моментального снимка во временное хранилище, его проверка и последующая замена текущих данных.", - "snapshot_modal_service_not_found": "Это снимок службы, которой больше нет на вашем сервере. Обычно этого не должно происходить, и мы не можем выполнить автоматическое восстановление. Вы можете загрузить снимок и восстановить его вручную. Обратитесь в службу поддержки SelfPrivacy, если вам нужна помощь.", + "snapshot_modal_download_verify_option_description": "Меньше риск, но требуется больше свободного места. Загрузка всей резервной копии во временное хранилище, проверка целостности копии, и последующая замена текущих данных.", + "snapshot_modal_service_not_found": "Это снимок сервиса, которого больше нет на вашем сервере. Обычно этого не должно происходить, и мы не сможем выполнить автоматическое восстановление. Вы можете загрузить снимок и восстановить его вручную. Обратитесь в службу поддержки SelfPrivacy, если вам нужна помощь.", "backups_encryption_key_subtitle": "Храните его в безопасном месте.", "backups_encryption_key_copy": "Скопируйте ключ шифрования", "backups_encryption_key_show": "Показать ключ шифрования", - "backups_encryption_key_description": "Этот ключ используется для шифрования резервных копий. Если вы его потеряете, то не сможете восстановить резервные копии. Храните его в надежном месте, так как он может пригодиться в случае необходимости восстановления из резервных копий вручную.", + "backups_encryption_key_description": "Этот ключ используется для шифрования резервных копий. Если вы его потеряете, то не сможете восстановить данные из резервной копии. Храните его в надежном месте. Он может пригодиться, если придётся восстанавливать данные вручную.", "forget_snapshot": "Забудьте о моментальном снимке", "snapshot_modal_heading": "Сведения о снимке", "snapshot_service_title": "Сервис", "snapshot_creation_time_title": "Время создания", "snapshot_id_title": "ID снимка", - "snapshot_modal_download_verify_option_title": "Загрузите, проверьте и затем замените", + "snapshot_modal_download_verify_option_title": "Загрузить, проверить, и затем заменить", "snapshot_modal_inplace_option_title": "Заменить на месте", - "snapshot_modal_inplace_option_description": "Требуется меньше свободного места, но риск выше. При загрузке текущие данные заменяются данными моментального снимка.", + "snapshot_modal_inplace_option_description": "Требуется меньше свободного места, но выше риск. При загрузке данных из резервной копии заменяют текущие данные сразу.", "restore_started": "Восстановление началось, проверьте текущий статус в списке заданий", "quota_subtitles": { "no_effect": "Это правило не имеет эффекта, так ак перекрыто другим правилом", @@ -386,7 +386,7 @@ "username_rule": "Имя может содержать только маленькие латинские буквы, цифры, подчёркивания, не может начинаться с цифр", "email_login": "Авторизация по Email", "no_ssh_notice": "Для этого пользователя созданы только SSH и Email аккаунт. Единая авторизация для всех сервисов ещё не реализована.", - "details_title": "Пользовательские данные" + "details_title": "Пользователь" }, "initializing": { "dns_provider_description": "Это позволит связать ваш домен с IP адресом:", @@ -458,9 +458,9 @@ "server_type": "Тип сервера", "nixos_installation": "Установка NixOS", "dns_provider": "DNS провайдер", - "backups_provider": "Резервные копии", + "backups_provider": "Резервное копирование", "domain": "Домен", - "master_account": "Мастер аккаунт", + "master_account": "Главная учетная запись", "server": "Сервер", "dns_setup": "Установка DNS", "server_reboot": "Перезагрузка сервера", @@ -618,7 +618,7 @@ "server_setup": "Мастер установки сервера", "use_staging_acme": "Использование тестового ACME сервера", "use_staging_acme_description": "Применяется при настройке нового сервера.", - "routing": "Маршрутизация приложений", + "routing": "Роутинг приложения", "reset_onboarding": "Сбросить флаг посещения приветствия", "cubit_statuses": "Текущий статут кубитов загрузки", "reset_onboarding_description": "Сброс переключателя включения для повторного отображения экрана включения", From 096338cef7b47243b414d2550314705d29408109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaiJi=20=E2=9C=A8?= Date: Sun, 10 Sep 2023 11:30:43 +0000 Subject: [PATCH 713/732] Translated using Weblate (Russian) Currently translated at 100.0% (530 of 530 strings) Translation: SelfPrivacy/SelfPrivacy App Translate-URL: http://weblate.selfprivacy.org/projects/selfprivacy/selfprivacy-app/ru/ --- assets/translations/ru.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/translations/ru.json b/assets/translations/ru.json index ced77198..2371da85 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -466,7 +466,7 @@ "server_reboot": "Перезагрузка сервера", "final_checks": "Финальные проверки" }, - "server_provider_description": "Место, где будут находиться ваши данные и службы SelfPrivacy:", + "server_provider_description": "Место, где будут находиться ваши данные и сервисы SelfPrivacy:", "multiple_domains_found": "Найдено несколько доменов", "multiple_domains_found_text": "Предоставленный токен дает доступ к следующим доменам. Пожалуйста, выберите тот, который вы хотите использовать. Для обеспечения безопасности других доменов следует ограничить доступ этого токена только тем доменом, который вы хотите использовать с SelfPrivacy." }, @@ -571,7 +571,7 @@ "you_cant_use_this_api": "Нельзя использовать этот API для доменом с подобным TLD.", "yes": "Да", "no": "Нет", - "volume_creation_error": "Не удалось создать том." + "volume_creation_error": "Не удалось создать хранилище." }, "timer": { "sec": "{} сек" @@ -621,7 +621,7 @@ "routing": "Роутинг приложения", "reset_onboarding": "Сбросить флаг посещения приветствия", "cubit_statuses": "Текущий статут кубитов загрузки", - "reset_onboarding_description": "Сброс переключателя включения для повторного отображения экрана включения", + "reset_onboarding_description": "Принудить показ приветственного экрана", "ignore_tls_description": "Приложение не будет проверять сертификаты TLS при подключении к серверу.", "ignore_tls": "Не проверять сертификаты TLS" } From da85253268b1dc6890277fc40aae705aca13c8e5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 10 Sep 2023 14:53:43 +0300 Subject: [PATCH 714/732] chore: Bump app version --- .../android/en-US/changelogs/0.9.0.txt | 145 ++++++++++++++++++ pubspec.yaml | 2 +- 2 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/0.9.0.txt diff --git a/fastlane/metadata/android/en-US/changelogs/0.9.0.txt b/fastlane/metadata/android/en-US/changelogs/0.9.0.txt new file mode 100644 index 00000000..29ac8043 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/0.9.0.txt @@ -0,0 +1,145 @@ +### Features + +- New backups implementation ([#228](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/228), [#274](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/274), [#324](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/324), [#325](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/325), [#326](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/326), [#331](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/331), [#332](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/332)) +- DigitalOcean as a DNS provider ([#213](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/213)) +- DeSEC as a DNS provider ([#211](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/211)) +- Support drawer and basic support documentation logic unit ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Automatic day/night theme ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- New router and adaptive layouts ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- New Material 3 animation curves ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Jobs button to the app bar of more screens ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Refreshed UI of modal sheets ([#228](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/228)) +- Support for `XDG_DATA_HOME` storage path on Linux for app data ([#240](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/240)) +- Accept-Language header for the server API ([#243](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/243), resolves [#205](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/205)) +- Visible providers names during server recovery ([#264](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/264), resolves [#249](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/249)) +- Visible volume and IPv4 cost added to overall monthly cost of the server ([#270](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/270), resolves [#115](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/115)) +- Support for autofocus on text fields for keyboard displaying ([#294](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/294), resolves [#292](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/292)) +- New dialogue to choose a domain if user DNS token provides access to several ([#330](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/330), resolves [#328](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/328)) + +### Bug Fixes + +- Fix opening URLs from the app ([#213](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/213)) +- Fix parsing of RAM size with DigitalOcean ([#200](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/200), resolves [#199](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/199)) +- Devices and Recovery Key cubits couldn't initialize right after server installation ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Fix BottomBar showing incorrect animation when navigating from sibling routes ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- PopUpDialogs couldn't find the context. ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Update recovery flow to use new support drawer ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- New app log console ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Improve installation failure dialogues ([#213](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/213)) +- Privacy policy link pointed at wrong domain ([#207](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/207)) +- Remove price lists for DNS ([#211](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/211)) +- Implement better domain id check on DNS restoration ([#211](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/211)) +- Add forced JSON content type to REST APIs ([#212](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/212)) +- Remove unneded DNS check depending on CLOUDFLARE ([#212](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/212)) +- Add background for dialogue pop ups and move them to root navigator ([#233](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/233), resolves [#231](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/231)) +- Make currency be properly shown again via shortcode ([#234](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/234), related to [#223](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/223)) +- Add proper server type value loading ([#236](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/236), resolves [#215](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/215)) +- Implement proper load functions for DNS and Server providers ([#237](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/237), resolves [#220](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/220)) +- Prevent moving a service if volume is null for some reason ([#245](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/245)) +- Replace hard reset from server provider with direct server reboot ([#269](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/269), resolves [#266](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/266)) +- Normalize Hetzner CPU usage percentage by cached amount of cores ([#272](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/272), resolves [#156](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/156)) +- Change broken validations string for superuser SSH ([#276](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/27)) +- Don't let service migration to start bif the same volume was picked ([#297](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/297), resolves [#289](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/289)) +- Wrap DNS check in catch to avoid runtime crash ([#322](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/322)) +- Implement Backblaze bucket restoration on server recovery ([#324](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/324)) + +### Refactor + +- Migrate to Flutter 3.10 and Dart 3.0 +- Migrate to AutoRouter v6 ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Get rid of BrandText and restructure the buttons ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Remove brand alert dialogs and bottom sheet ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Remove unused UI components ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Remove BrandCards ([#203](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/203)) +- Allow changing values for TLS settings +- Replace String shortcode with Currency class ([#226](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/226)) +- Rearrange Server Provider interface ([#227](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/227)) +- Remove unused service state getters ([#228](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/228)) +- Remove unused utils, add duration formatter ([#228](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/228)) +- Move rest api methods according to their business logic files positions ([#235](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/235), partially resolves [#217](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/217) and [#219](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/219)) +- Make flag getter a part of server provider location object ([#238](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/238), resolves [#222](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/222)) + + +### Translation contributions + +* Ukrainian + + * FoxMeste (3) + * Mithras (31) + +* Latvian + + * Not Telling Lol (183) + + +* German + + * Mithras (41) + * FoxMeste (213) + + +* Thai + + * FoxMeste (77) + + +* Polish + + * Mithras (41) + * Thary (43) + * FoxMeste (163) + + +* Slovenian + + * Mithras (212) + + +* Czech + + * NaiJi ✨ (2) + * Mithras (109) + * FoxMeste (308) + + +* Russian + + * FoxMeste (4) + * Revertron (8) + * NaiJi ✨ (23) + * Mithras (54) + * Inex Code (59) + + +* Slovak + + * Mithras (29) + * Revertron (396) + + +* Macedonian + + * FoxMeste (7) + + +* Belarusian + + * Thary (1) + * FoxMeste (3) + * Mithras (47) + + +* French + + * Côme (211) + + +* Spanish + + * FoxMeste (7) + + +* Azerbaijani + + * Mithras (28) + * Ortibexon (403) diff --git a/pubspec.yaml b/pubspec.yaml index 4fc007e8..23ddac1e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: selfprivacy description: selfprivacy.org publish_to: 'none' -version: 0.8.0+17 +version: 0.9.0+18 environment: sdk: '>=3.0.2 <4.0.0' From 3370ae2867e65e26bcf1d38b1e72b88addf4f76b Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sun, 10 Sep 2023 15:22:40 +0300 Subject: [PATCH 715/732] ci: Fix appimage version tag --- appimage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appimage.yml b/appimage.yml index ce7bab35..9e783283 100644 --- a/appimage.yml +++ b/appimage.yml @@ -10,7 +10,7 @@ AppDir: id: org.selfprivacy.app name: SelfPrivacy icon: org.selfprivacy.app - version: 0.8.0 + version: 0.9.0 exec: selfprivacy exec_args: $@ apt: From d2ed9f3a752307bcbb57062e5cf524152aef3bae Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 16 Sep 2023 00:45:15 -0300 Subject: [PATCH 716/732] refactor(ui): Move service descriptions above login info for service cards - Resolves https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/341 --- lib/ui/pages/services/services.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 99bb848e..08446e78 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -160,13 +160,15 @@ class _Card extends StatelessWidget { ], ), Text( - service.loginInfo, + service.description, style: Theme.of(context).textTheme.bodyMedium, ), const SizedBox(height: 10), Text( - service.description, - style: Theme.of(context).textTheme.bodyMedium, + service.loginInfo, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: Theme.of(context).colorScheme.secondary, + ), ), const SizedBox(height: 10), ], From 887302f93656ff7a787e7bfe83dfef53115c31e3 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 16 Sep 2023 01:41:02 -0300 Subject: [PATCH 717/732] refactor(ui): Add measure units to 'Extending volume' page - Resolves https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/301 --- assets/translations/en.json | 3 ++- lib/ui/pages/server_storage/extending_volume.dart | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 5fb1ce5c..07ffe375 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -304,6 +304,7 @@ "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by your server provider. Server will be rebooted after resizing.", "extending_volume_error": "Couldn't initialize volume extending.", "size": "Size", + "price": "Price", "data_migration_title": "Data migration", "data_migration_notice": "During migration all services will be turned off.", "start_migration_button": "Start migration", @@ -625,4 +626,4 @@ "reset_onboarding_description": "Reset onboarding switch to show onboarding screen again", "cubit_statuses": "Cubit loading statuses" } -} +} \ No newline at end of file diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 95325d0c..81414bdb 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -79,10 +79,12 @@ class _ExtendingVolumePageState extends State { } final price = snapshot.data as Price; _pricePerGb = price.value; - _sizeController.text = _currentSliderGbValue.truncate().toString(); + final currentSizeValue = _currentSliderGbValue.truncate().toString(); + _sizeController.text = 'storage.gb'.tr(args: [currentSizeValue]); _priceController.text = - (_pricePerGb * double.parse(_sizeController.text)) - .toStringAsFixed(2); + '${(_pricePerGb * double.parse(currentSizeValue)).toStringAsFixed(2)}' + ' ' + '${price.currency.shortcode}'; minSize = widget.diskVolumeToResize.sizeTotal + DiskSize.fromGibibyte(3); if (_currentSliderGbValue < 0) { @@ -130,7 +132,7 @@ class _ExtendingVolumePageState extends State { decoration: InputDecoration( border: const OutlineInputBorder(), errorText: _isError ? ' ' : null, - labelText: price.currency.shortcode, + labelText: 'storage.price'.tr(), ), ), ), From 5c329d47c1c9e9f023c3053fe1b80d4c0645e450 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 16 Sep 2023 01:18:37 -0300 Subject: [PATCH 718/732] refactor(ui): Make users be ordered properly on users page - Resolves https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/340 --- lib/logic/cubit/users/users_state.dart | 26 ++++++++++++++++++++++++++ lib/ui/pages/users/user.dart | 6 +++--- lib/ui/pages/users/users.dart | 12 ++---------- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/lib/logic/cubit/users/users_state.dart b/lib/logic/cubit/users/users_state.dart index dbd931d7..4e2ed42e 100644 --- a/lib/logic/cubit/users/users_state.dart +++ b/lib/logic/cubit/users/users_state.dart @@ -18,6 +18,32 @@ class UsersState extends ServerInstallationDependendState { @override List get props => [users, isLoading]; + /// Makes a copy of existing users list, but places 'primary' + /// to the beginning and sorts the rest alphabetically + /// + /// If found a 'root' user, it doesn't get copied into the result + List get orderedUsers { + User? primaryUser; + final List normalUsers = []; + for (final User user in users) { + if (user.type == UserType.primary) { + primaryUser = user; + continue; + } + if (user.type == UserType.root) { + continue; + } + normalUsers.add(user); + } + + normalUsers.sort( + (final User a, final User b) => + a.login.toLowerCase().compareTo(b.login.toLowerCase()), + ); + + return primaryUser == null ? normalUsers : [primaryUser] + normalUsers; + } + UsersState copyWith({ final List? users, final bool? isLoading, diff --git a/lib/ui/pages/users/user.dart b/lib/ui/pages/users/user.dart index bbc01012..a40599e0 100644 --- a/lib/ui/pages/users/user.dart +++ b/lib/ui/pages/users/user.dart @@ -3,11 +3,11 @@ part of 'users.dart'; class _User extends StatelessWidget { const _User({ required this.user, - required this.isRootUser, + required this.isUserPrimary, }); final User user; - final bool isRootUser; + final bool isUserPrimary; @override Widget build(final BuildContext context) => InkWell( onTap: () { @@ -32,7 +32,7 @@ class _User extends StatelessWidget { user.login, style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Theme.of(context).colorScheme.onBackground, - decoration: isRootUser + decoration: isUserPrimary ? TextDecoration.underline : user.isFoundOnServer ? TextDecoration.none diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 58cb3b7d..4e939f20 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -45,15 +45,7 @@ class UsersPage extends StatelessWidget { } else { child = BlocBuilder( builder: (final BuildContext context, final UsersState state) { - final List users = state.users - .where((final user) => user.type != UserType.root) - .toList(); - // final List users = []; - users.sort( - (final User a, final User b) => - a.login.toLowerCase().compareTo(b.login.toLowerCase()), - ); - + final users = state.orderedUsers; if (users.isEmpty) { if (state.isLoading) { return const Center( @@ -115,7 +107,7 @@ class UsersPage extends StatelessWidget { itemBuilder: (final BuildContext context, final int index) => _User( user: users[index], - isRootUser: users[index].type == UserType.primary, + isUserPrimary: users[index].type == UserType.primary, ), ), ), From 40568925e1d8a0c710541887ae356b80b3e8c677 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 18 Sep 2023 12:22:37 -0300 Subject: [PATCH 719/732] refactor(ui): Move service card name to its icon row - Resolves https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/350 --- lib/ui/pages/services/services.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 99bb848e..f6a0e00a 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -129,17 +129,17 @@ class _Card extends StatelessWidget { ), ), ), + const SizedBox(width: 10), + Text( + service.displayName, + style: Theme.of(context).textTheme.headlineMedium, + ), ], ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 12), - Text( - service.displayName, - style: Theme.of(context).textTheme.headlineMedium, - ), - const SizedBox(height: 8), + const SizedBox(height: 10), if (service.url != '' && service.url != null) Column( children: [ From 7aa3305d237d3c8183b49e4394d7182de201f16b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 18 Sep 2023 12:28:41 -0300 Subject: [PATCH 720/732] refactor: Rename isUserPrimary to isPrimaryUser for User --- lib/ui/pages/users/user.dart | 6 +++--- lib/ui/pages/users/users.dart | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ui/pages/users/user.dart b/lib/ui/pages/users/user.dart index a40599e0..9a90857b 100644 --- a/lib/ui/pages/users/user.dart +++ b/lib/ui/pages/users/user.dart @@ -3,11 +3,11 @@ part of 'users.dart'; class _User extends StatelessWidget { const _User({ required this.user, - required this.isUserPrimary, + required this.isPrimaryUser, }); final User user; - final bool isUserPrimary; + final bool isPrimaryUser; @override Widget build(final BuildContext context) => InkWell( onTap: () { @@ -32,7 +32,7 @@ class _User extends StatelessWidget { user.login, style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Theme.of(context).colorScheme.onBackground, - decoration: isUserPrimary + decoration: isPrimaryUser ? TextDecoration.underline : user.isFoundOnServer ? TextDecoration.none diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 4e939f20..22b9e451 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -107,7 +107,7 @@ class UsersPage extends StatelessWidget { itemBuilder: (final BuildContext context, final int index) => _User( user: users[index], - isUserPrimary: users[index].type == UserType.primary, + isPrimaryUser: users[index].type == UserType.primary, ), ), ), From c64c6e11d7ae59bc7d4a53582bf5fa5da3d4582a Mon Sep 17 00:00:00 2001 From: NaiJi Date: Mon, 18 Sep 2023 12:42:40 -0300 Subject: [PATCH 721/732] refactor(ui): Change SizedBox dimension hardcode from 10 to 8 for service cards --- lib/ui/pages/services/services.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 17e947b5..dd2b3701 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -129,7 +129,7 @@ class _Card extends StatelessWidget { ), ), ), - const SizedBox(width: 10), + const SizedBox(width: 8), Text( service.displayName, style: Theme.of(context).textTheme.headlineMedium, @@ -139,14 +139,14 @@ class _Card extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 10), + const SizedBox(height: 8), if (service.url != '' && service.url != null) Column( children: [ _ServiceLink( url: service.url ?? '', ), - const SizedBox(height: 10), + const SizedBox(height: 8), ], ), if (service.id == 'mailserver') @@ -156,21 +156,21 @@ class _Card extends StatelessWidget { url: domainName, isActive: false, ), - const SizedBox(height: 10), + const SizedBox(height: 8), ], ), Text( service.description, style: Theme.of(context).textTheme.bodyMedium, ), - const SizedBox(height: 10), + const SizedBox(height: 8), Text( service.loginInfo, style: Theme.of(context).textTheme.bodyMedium?.copyWith( color: Theme.of(context).colorScheme.secondary, ), ), - const SizedBox(height: 10), + const SizedBox(height: 8), ], ) ], From aa4429cc79f30a55a8fedde6af35893a91a67700 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 23 Sep 2023 22:17:54 -0300 Subject: [PATCH 722/732] refactor(ui): Reorganize placeholders for empty pages - Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/348 - Make 'Data Center' cards unclickable when uninitialized --- assets/translations/en.json | 5 +- .../cubit/dns_records/dns_records_cubit.dart | 2 +- lib/ui/helpers/empty_page_placeholder.dart | 67 +++++++++++++++++ lib/ui/pages/providers/providers.dart | 14 +++- lib/ui/pages/services/services.dart | 55 ++++++++------ lib/ui/pages/users/empty.dart | 73 ------------------- lib/ui/pages/users/users.dart | 36 +++------ 7 files changed, 124 insertions(+), 128 deletions(-) create mode 100644 lib/ui/helpers/empty_page_placeholder.dart delete mode 100644 lib/ui/pages/users/empty.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 07ffe375..82f682ba 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -35,7 +35,8 @@ "done": "Done", "continue": "Continue", "alert": "Alert", - "copied_to_clipboard": "Copied to clipboard!" + "copied_to_clipboard": "Copied to clipboard!", + "please_connect": "Please connect your server, domain and DNS provider to dive in!" }, "more_page": { "configuration_wizard": "Setup wizard", @@ -315,6 +316,7 @@ "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." }, "service_page": { + "nothing_here": "Nothing here", "open_in_browser": "Open in browser", "restart": "Restart service", "disable": "Disable service", @@ -371,7 +373,6 @@ "add_new_user": "Add a first user", "new_user": "New user", "delete_user": "Delete user", - "not_ready": "Please connect server, domain and DNS in the Providers tab, to be able to add a first user", "nobody_here": "Nobody here", "login": "Login", "new_user_info_note": "New user will automatically be granted an access to all of the services", diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 3fc2d199..6f295274 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -75,7 +75,7 @@ class DnsRecordsCubit @override Future clear() async { - emit(const DnsRecordsState(dnsState: DnsRecordsStatus.error)); + emit(const DnsRecordsState(dnsState: DnsRecordsStatus.uninitialized)); } Future refresh() async { diff --git a/lib/ui/helpers/empty_page_placeholder.dart b/lib/ui/helpers/empty_page_placeholder.dart new file mode 100644 index 00000000..e1bb0d7b --- /dev/null +++ b/lib/ui/helpers/empty_page_placeholder.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; + +class EmptyPagePlaceholder extends StatelessWidget { + const EmptyPagePlaceholder({ + required this.title, + required this.iconData, + required this.description, + this.showReadyCard = false, + super.key, + }); + + final String title; + final String description; + final IconData iconData; + final bool showReadyCard; + + @override + Widget build(final BuildContext context) => !showReadyCard + ? _expandedContent(context) + : Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const Padding( + padding: EdgeInsets.symmetric(horizontal: 15), + child: NotReadyCard(), + ), + Expanded( + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 15), + child: Center( + child: _expandedContent(context), + ), + ), + ) + ], + ); + + Widget _expandedContent(final BuildContext context) => Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + iconData, + size: 50, + color: Theme.of(context).colorScheme.onBackground, + ), + const SizedBox(height: 16), + Text( + title, + style: Theme.of(context).textTheme.headlineMedium?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + const SizedBox(height: 8), + Text( + description, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.titleSmall?.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + ], + ), + ); +} diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 64b87d34..5b2285f3 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -49,6 +49,8 @@ class _ProvidersPageState extends State { return StateType.stable; } + bool isClickable() => getServerStatus() != StateType.uninitialized; + StateType getDnsStatus() { if (dnsStatus == DnsRecordsStatus.uninitialized || dnsStatus == DnsRecordsStatus.refreshing) { @@ -83,7 +85,9 @@ class _ProvidersPageState extends State { subtitle: diskStatus.isDiskOkay ? 'storage.status_ok'.tr() : 'storage.status_error'.tr(), - onTap: () => context.pushRoute(const ServerDetailsRoute()), + onTap: isClickable() + ? () => context.pushRoute(const ServerDetailsRoute()) + : null, ), const SizedBox(height: 16), _Card( @@ -93,7 +97,9 @@ class _ProvidersPageState extends State { subtitle: appConfig.isDomainSelected ? appConfig.serverDomain!.domainName : '', - onTap: () => context.pushRoute(const DnsDetailsRoute()), + onTap: isClickable() + ? () => context.pushRoute(const DnsDetailsRoute()) + : null, ), const SizedBox(height: 16), _Card( @@ -103,7 +109,9 @@ class _ProvidersPageState extends State { icon: BrandIcons.save, title: 'backup.card_title'.tr(), subtitle: isBackupInitialized ? 'backup.card_subtitle'.tr() : '', - onTap: () => context.pushRoute(const BackupDetailsRoute()), + onTap: isClickable() + ? () => context.pushRoute(const BackupDetailsRoute()) + : null, ), ], ), diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 08446e78..62bb1321 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -7,9 +7,10 @@ import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; -import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:selfprivacy/ui/helpers/empty_page_placeholder.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/launch_url.dart'; @@ -42,30 +43,36 @@ class _ServicesPageState extends State { ), ) : null, - body: RefreshIndicator( - onRefresh: () async { - await context.read().reload(); - }, - child: ListView( - padding: paddingH15V0, - children: [ - Text( - 'basis.services_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - const SizedBox(height: 24), - if (!isReady) ...[const NotReadyCard(), const SizedBox(height: 24)], - ...services.map( - (final service) => Padding( - padding: const EdgeInsets.only( - bottom: 30, - ), - child: _Card(service: service), - ), + body: !isReady + ? EmptyPagePlaceholder( + showReadyCard: true, + title: 'service_page.nothing_here'.tr(), + description: 'basis.please_connect'.tr(), + iconData: BrandIcons.social, ) - ], - ), - ), + : RefreshIndicator( + onRefresh: () async { + await context.read().reload(); + }, + child: ListView( + padding: paddingH15V0, + children: [ + Text( + 'basis.services_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + const SizedBox(height: 24), + ...services.map( + (final service) => Padding( + padding: const EdgeInsets.only( + bottom: 30, + ), + child: _Card(service: service), + ), + ) + ], + ), + ), ); } } diff --git a/lib/ui/pages/users/empty.dart b/lib/ui/pages/users/empty.dart deleted file mode 100644 index f58dc740..00000000 --- a/lib/ui/pages/users/empty.dart +++ /dev/null @@ -1,73 +0,0 @@ -part of 'users.dart'; - -class _NoUsers extends StatelessWidget { - const _NoUsers({required this.text}); - - final String text; - - @override - Widget build(final BuildContext context) => Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - BrandIcons.users, - size: 50, - color: Theme.of(context).colorScheme.onBackground, - ), - const SizedBox(height: 20), - Text( - 'users.nobody_here'.tr(), - style: Theme.of(context).textTheme.headlineMedium?.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - const SizedBox(height: 10), - Text( - text, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.titleSmall?.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - ], - ), - ); -} - -class _CouldNotLoadUsers extends StatelessWidget { - const _CouldNotLoadUsers({required this.text}); - - final String text; - - @override - Widget build(final BuildContext context) => Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - BrandIcons.users, - size: 50, - color: Theme.of(context).colorScheme.onBackground, - ), - const SizedBox(height: 20), - Text( - 'users.could_not_fetch_users'.tr(), - style: Theme.of(context).textTheme.headlineMedium?.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - const SizedBox(height: 10), - Text( - text, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.titleSmall?.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - ], - ), - ); -} diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 1ea9d76c..a3c0d319 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -16,17 +16,16 @@ import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/ui/helpers/empty_page_placeholder.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; -import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/platform_adapter.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; -part 'empty.dart'; part 'new_user.dart'; part 'user.dart'; part 'user_details.dart'; @@ -43,7 +42,12 @@ class UsersPage extends StatelessWidget { Widget child; if (!isReady) { - child = isNotReady(); + child = EmptyPagePlaceholder( + showReadyCard: true, + title: 'users.nobody_here'.tr(), + description: 'basis.please_connect'.tr(), + iconData: BrandIcons.users, + ); } else { child = BlocBuilder( builder: (final BuildContext context, final UsersState state) { @@ -64,8 +68,10 @@ class UsersPage extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - _CouldNotLoadUsers( - text: 'users.could_not_fetch_description'.tr(), + EmptyPagePlaceholder( + title: 'users.could_not_fetch_users'.tr(), + description: 'users.could_not_fetch_description'.tr(), + iconData: BrandIcons.users, ), const SizedBox(height: 18), BrandOutlinedButton( @@ -132,24 +138,4 @@ class UsersPage extends StatelessWidget { body: child, ); } - - Widget isNotReady() => Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Padding( - padding: EdgeInsets.symmetric(horizontal: 15), - child: NotReadyCard(), - ), - Expanded( - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 15), - child: Center( - child: _NoUsers( - text: 'users.not_ready'.tr(), - ), - ), - ), - ) - ], - ); } From 914775ac48545b7ea1e61ae5423a1a01fc07a741 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 26 Sep 2023 20:20:13 +0300 Subject: [PATCH 723/732] chore(ui): Change icon of the Services placeholder --- lib/ui/pages/services/services.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index af5123c3..36af585f 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -48,7 +48,7 @@ class _ServicesPageState extends State { showReadyCard: true, title: 'service_page.nothing_here'.tr(), description: 'basis.please_connect'.tr(), - iconData: BrandIcons.social, + iconData: BrandIcons.box, ) : RefreshIndicator( onRefresh: () async { From fca04f89ada46182cf325075ba074642a4444d58 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 26 Sep 2023 20:05:17 +0300 Subject: [PATCH 724/732] docs: Add issue templates --- .gitea/ISSUE_TEMPLATE/bug.yaml | 68 ++++++++++++++++++++++++++ .gitea/ISSUE_TEMPLATE/feature.yaml | 23 +++++++++ .gitea/ISSUE_TEMPLATE/translation.yaml | 29 +++++++++++ 3 files changed, 120 insertions(+) create mode 100644 .gitea/ISSUE_TEMPLATE/bug.yaml create mode 100644 .gitea/ISSUE_TEMPLATE/feature.yaml create mode 100644 .gitea/ISSUE_TEMPLATE/translation.yaml diff --git a/.gitea/ISSUE_TEMPLATE/bug.yaml b/.gitea/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 00000000..f9aed2ab --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,68 @@ +name: Bug report +about: File a bug report +labels: + - Bug +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! Please provide a short, but a descriptive title for your issue. + - type: textarea + id: expected-behaviour + attributes: + label: Expected Behavior + description: What did you expect to happen? + validations: + required: true + - type: textarea + id: actual-behaviour + attributes: + label: Actual Behavior + description: What actually happened? + validations: + required: true + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to Reproduce + description: What steps can we follow to reproduce this issue? + placeholder: | + 1. First step + 2. Second step + 3. and so on... + validations: + required: true + - type: textarea + id: context + attributes: + label: Context and notes + description: Additional information about environment or what were you trying to do. If you have an idea how to fix this issue, please describe it here too. + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output, if you have any. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: input + id: app-version + attributes: + label: App Version + description: What version of SelfPrivacy app are you running? You can find it in the "About" section of the app. + validations: + required: true + - type: input + id: api-version + attributes: + label: Server API Version + description: What version of SelfPrivacy API are you running? You can find it in the "About" section of the app. Leave it empty, if your app is not connected to the server yet. + - type: dropdown + id: os + attributes: + label: Operating System + description: What operating system are you using? + options: + - Android + - iOS + - Linux + - macOS + - Windows diff --git a/.gitea/ISSUE_TEMPLATE/feature.yaml b/.gitea/ISSUE_TEMPLATE/feature.yaml new file mode 100644 index 00000000..0d3fa085 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/feature.yaml @@ -0,0 +1,23 @@ +name: Feature request +about: Suggest an idea for this project +label: + - Feature request +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! Please provide a short, but a descriptive title for your issue. + - type: textarea + id: description + attributes: + label: Description + description: Describe the feature you'd like to see. + placeholder: | + As a user, I want to be able to... + validations: + required: true + - type: textarea + id: context + attributes: + label: Context and notes + description: Additional information about environment and what were you trying to do. If you have an idea how to implement this feature, please describe it here too. diff --git a/.gitea/ISSUE_TEMPLATE/translation.yaml b/.gitea/ISSUE_TEMPLATE/translation.yaml new file mode 100644 index 00000000..c7348b94 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/translation.yaml @@ -0,0 +1,29 @@ +name: Translation issue +about: File a translation (localization) issue +labels: + - Translations +body: + - type: markdown + attributes: + value: | + Translations can be modified and discussed on [Weblate](https://weblate.selfprivacy.org/projects/selfprivacy/). You can fix the mistranslation issue yourself there. Using the search, you can also find the string ID of the mistranslated string. If your issue is more complex, please file it here + + If you are a member of SelfPrivacy core team, you **must** fix the issue yourself on Weblate. + - type: input + id: language + attributes: + label: Language + description: What language is affected? + placeholder: | + English + validations: + required: true + - type: textarea + id: description + attributes: + label: Description + description: Describe the issue in detail. If you have an idea how to fix this issue, please describe it here too. Include the string ID of the mistranslated string, if possible. + placeholder: | + The string `string.id` is translated as "foo", but it should be "bar". + validations: + required: true From 5ff615bb8b0e3336835e0c4ccdb85107a67debc2 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 26 Sep 2023 20:24:04 +0300 Subject: [PATCH 725/732] docs: Fix grammar of issue templates --- .gitea/ISSUE_TEMPLATE/bug.yaml | 4 ++-- .gitea/ISSUE_TEMPLATE/feature.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/ISSUE_TEMPLATE/bug.yaml b/.gitea/ISSUE_TEMPLATE/bug.yaml index f9aed2ab..f9441722 100644 --- a/.gitea/ISSUE_TEMPLATE/bug.yaml +++ b/.gitea/ISSUE_TEMPLATE/bug.yaml @@ -6,7 +6,7 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this bug report! Please provide a short, but a descriptive title for your issue. + Thanks for taking the time to fill out this bug report! Please provide a short but a descriptive title for your issue. - type: textarea id: expected-behaviour attributes: @@ -54,7 +54,7 @@ body: id: api-version attributes: label: Server API Version - description: What version of SelfPrivacy API are you running? You can find it in the "About" section of the app. Leave it empty, if your app is not connected to the server yet. + description: What version of SelfPrivacy API are you running? You can find it in the "About" section of the app. Leave it empty if your app is not connected to the server yet. - type: dropdown id: os attributes: diff --git a/.gitea/ISSUE_TEMPLATE/feature.yaml b/.gitea/ISSUE_TEMPLATE/feature.yaml index 0d3fa085..8ff40a0f 100644 --- a/.gitea/ISSUE_TEMPLATE/feature.yaml +++ b/.gitea/ISSUE_TEMPLATE/feature.yaml @@ -6,7 +6,7 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this feature request! Please provide a short, but a descriptive title for your issue. + Thanks for taking the time to fill out this feature request! Please provide a short but a descriptive title for your issue. - type: textarea id: description attributes: From 172253902dbb096dfdbab9779aaf61eb2abd4902 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 26 Sep 2023 16:18:06 -0300 Subject: [PATCH 726/732] feat(ssh): Add support for ECDSA SSH keys - Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/319 --- assets/translations/en.json | 2 +- lib/logic/cubit/forms/user/ssh_form_cubit.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 82f682ba..d6c03a87 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -83,7 +83,7 @@ "no_key_name": "Unnamed key", "root_title": "These are superuser keys", "root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.", - "input_label": "Public ED25519 or RSA key" + "input_label": "Public ED25519, ECDSA or RSA key" }, "onboarding": { "page1_title": "Digital independence, available to all of us", diff --git a/lib/logic/cubit/forms/user/ssh_form_cubit.dart b/lib/logic/cubit/forms/user/ssh_form_cubit.dart index 707e54c3..3305d647 100644 --- a/lib/logic/cubit/forms/user/ssh_form_cubit.dart +++ b/lib/logic/cubit/forms/user/ssh_form_cubit.dart @@ -12,7 +12,7 @@ class SshFormCubit extends FormCubit { required this.user, }) { final RegExp keyRegExp = RegExp( - r'^(ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$', + r'^(ecdsa-sha2-nistp256 AAAAE2VjZH|ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$', ); key = FieldCubit( From fbacb5969d7d04a1b3b18e536abf502e905ad6d3 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 30 Sep 2023 21:02:53 -0300 Subject: [PATCH 727/732] fix: Force size value truncation for digital ocean, change query url - Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/367 --- .../server_providers/digital_ocean/digital_ocean_api.dart | 7 +++---- lib/logic/providers/server_providers/digital_ocean.dart | 2 +- lib/ui/pages/server_storage/extending_volume.dart | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index aa1481a0..319ff062 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -455,7 +455,7 @@ class DigitalOceanApi extends RestApiMap { } Future> resizeVolume( - final String name, + final String uuid, final DiskSize size, ) async { bool success = false; @@ -464,11 +464,10 @@ class DigitalOceanApi extends RestApiMap { final Dio client = await getClient(); try { resizeVolumeResponse = await client.post( - '/volumes/actions', + '/volumes/$uuid/actions', data: { 'type': 'resize', - 'volume_name': name, - 'size_gigabytes': size.gibibyte, + 'size_gigabytes': size.gibibyte.toInt(), 'region': region, }, ); diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index 4b6ee838..ce444169 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -698,7 +698,7 @@ class DigitalOceanServerProvider extends ServerProvider { final DiskSize size, ) async => _adapter.api().resizeVolume( - volume.name, + volume.uuid!, size, ); diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 81414bdb..9c40e9ee 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -157,7 +157,9 @@ class _ExtendingVolumePageState extends State { : () { context.read().resizeVolume( widget.diskVolumeToResize, - DiskSize.fromGibibyte(_currentSliderGbValue), + DiskSize.fromGibibyte( + _currentSliderGbValue.truncate().toDouble(), + ), context.read().reload, ); context.router.popUntilRoot(); From 043d29538c92d76993b1e98e32f25a46db60fe3f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 30 Sep 2023 21:35:58 -0300 Subject: [PATCH 728/732] refactor: Conventionally reduce DiskSize to only 'int gb' for resize digital ocean volume --- .../server_providers/digital_ocean/digital_ocean_api.dart | 4 ++-- lib/logic/providers/server_providers/digital_ocean.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart index 319ff062..9ffdb666 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/digital_ocean/digital_ocean_api.dart @@ -456,7 +456,7 @@ class DigitalOceanApi extends RestApiMap { Future> resizeVolume( final String uuid, - final DiskSize size, + final int gb, ) async { bool success = false; @@ -467,7 +467,7 @@ class DigitalOceanApi extends RestApiMap { '/volumes/$uuid/actions', data: { 'type': 'resize', - 'size_gigabytes': size.gibibyte.toInt(), + 'size_gigabytes': gb, 'region': region, }, ); diff --git a/lib/logic/providers/server_providers/digital_ocean.dart b/lib/logic/providers/server_providers/digital_ocean.dart index ce444169..6e699723 100644 --- a/lib/logic/providers/server_providers/digital_ocean.dart +++ b/lib/logic/providers/server_providers/digital_ocean.dart @@ -699,7 +699,7 @@ class DigitalOceanServerProvider extends ServerProvider { ) async => _adapter.api().resizeVolume( volume.uuid!, - size, + size.gibibyte.toInt(), ); @override From 97a9793f9d3912d6d0810d4cf70def09c22991f8 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 30 Sep 2023 21:50:38 -0300 Subject: [PATCH 729/732] fix(ui): Disable storage card while volume information is being fetched - Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/317 --- lib/ui/pages/server_storage/storage_card.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index ac633463..fbda9bee 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -45,8 +45,11 @@ class StorageCard extends StatelessWidget { clipBehavior: Clip.antiAlias, child: InkResponse( highlightShape: BoxShape.rectangle, - onTap: () => - context.pushRoute(ServerStorageRoute(diskStatus: diskStatus)), + + /// TODO: when 'isEmpty' replace with a skeleton + onTap: () => diskStatus.diskVolumes.isEmpty + ? null + : context.pushRoute(ServerStorageRoute(diskStatus: diskStatus)), child: Padding( padding: const EdgeInsets.all(16.0), child: Column( From c2ae9623224526878c84201f6a5cb6019ecdce90 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 5 Oct 2023 19:42:29 -0300 Subject: [PATCH 730/732] refactor: Remove redundant zone id cache for Cloudflare --- lib/logic/providers/dns_providers/cloudflare.dart | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/logic/providers/dns_providers/cloudflare.dart b/lib/logic/providers/dns_providers/cloudflare.dart index 4a8062f1..6cf4a494 100644 --- a/lib/logic/providers/dns_providers/cloudflare.dart +++ b/lib/logic/providers/dns_providers/cloudflare.dart @@ -69,13 +69,6 @@ class CloudflareDnsProvider extends DnsProvider { ) .toList(); - /// TODO: Remove when domain selection for more than one domain on account is implemented, move cachedZoneId writing to domain saving method - _adapter = ApiAdapter( - isWithToken: true, - cachedDomain: result.data[0].name, - cachedZoneId: result.data[0].id, - ); - return GenericResult( success: true, data: domains, From 87b58ec6d8f4a437146e0136cdb953b6987eb604 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 7 Oct 2023 18:49:55 -0300 Subject: [PATCH 731/732] feat: Implement confirmation modal for volume resizing - Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/308 --- assets/translations/en.json | 1 + .../server_storage/extending_volume.dart | 28 +++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index d6c03a87..95a22f58 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -304,6 +304,7 @@ "extending_volume_description": "Resizing volume will allow you to store more data on your server without extending the server itself. Volume can only be extended: shrinking is not possible.", "extending_volume_price_info": "Price includes VAT and is estimated from pricing data provided by your server provider. Server will be rebooted after resizing.", "extending_volume_error": "Couldn't initialize volume extending.", + "extending_volume_modal_description": "Upgrade to {} for {} plan per month.", "size": "Size", "price": "Price", "data_migration_title": "Data migration", diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 9c40e9ee..fd8213b1 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -8,6 +8,7 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; @@ -46,7 +47,6 @@ class _ExtendingVolumePageState extends State { late double _currentSliderGbValue; double _pricePerGb = 1.0; - // TODO: Wtfff hardcode?!?!? final DiskSize maxSize = const DiskSize(byte: 500000000000); late DiskSize minSize; @@ -155,14 +155,24 @@ class _ExtendingVolumePageState extends State { onPressed: _isError || isAlreadyResizing ? null : () { - context.read().resizeVolume( - widget.diskVolumeToResize, - DiskSize.fromGibibyte( - _currentSliderGbValue.truncate().toDouble(), - ), - context.read().reload, - ); - context.router.popUntilRoot(); + showPopUpAlert( + alertTitle: 'storage.extending_volume_title'.tr(), + description: + 'storage.extending_volume_modal_description'.tr( + args: [_sizeController.text, _priceController.text], + ), + actionButtonTitle: 'basis.continue'.tr(), + actionButtonOnPressed: () { + context.read().resizeVolume( + widget.diskVolumeToResize, + DiskSize.fromGibibyte( + _currentSliderGbValue.truncate().toDouble(), + ), + context.read().reload, + ); + context.router.popUntilRoot(); + }, + ); }, child: Text('storage.extend_volume_button.title'.tr()), ), From f8dfa4e95453c97578f56d7bfa311b314c31a39e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 9 Oct 2023 12:40:48 +0300 Subject: [PATCH 732/732] chore: Remove redundant metadata and bump version --- appimage.yml | 2 +- .../android/en-US/changelogs/0.9.1.txt | 20 +++++++++++++++ .../en-US/full_description.txt | 1 - .../en-US/images/icon.png | Bin 12964 -> 0 bytes .../en-US/short_description.txt | 1 - .../en-US/title.txt | 1 - .../en-US/full_description.txt | 23 ------------------ .../org.selfprivacy.app/en-US/images/icon.png | Bin 8284 -> 0 bytes .../en-US/images/phoneScreenshots/1.png | Bin 61120 -> 0 bytes .../en-US/images/phoneScreenshots/2.png | Bin 79651 -> 0 bytes .../en-US/images/phoneScreenshots/3.png | Bin 52977 -> 0 bytes .../en-US/images/phoneScreenshots/4.png | Bin 44320 -> 0 bytes .../en-US/short_description.txt | 1 - metadata/org.selfprivacy.app/en-US/title.txt | 1 - pubspec.yaml | 2 +- 15 files changed, 22 insertions(+), 30 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/0.9.1.txt delete mode 100644 metadata/org.selfprivacy.app.nightly/en-US/full_description.txt delete mode 100644 metadata/org.selfprivacy.app.nightly/en-US/images/icon.png delete mode 100644 metadata/org.selfprivacy.app.nightly/en-US/short_description.txt delete mode 100644 metadata/org.selfprivacy.app.nightly/en-US/title.txt delete mode 100644 metadata/org.selfprivacy.app/en-US/full_description.txt delete mode 100644 metadata/org.selfprivacy.app/en-US/images/icon.png delete mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/1.png delete mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/2.png delete mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/3.png delete mode 100644 metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/4.png delete mode 100644 metadata/org.selfprivacy.app/en-US/short_description.txt delete mode 100644 metadata/org.selfprivacy.app/en-US/title.txt diff --git a/appimage.yml b/appimage.yml index 9e783283..40bcc3c3 100644 --- a/appimage.yml +++ b/appimage.yml @@ -10,7 +10,7 @@ AppDir: id: org.selfprivacy.app name: SelfPrivacy icon: org.selfprivacy.app - version: 0.9.0 + version: 0.9.1 exec: selfprivacy exec_args: $@ apt: diff --git a/fastlane/metadata/android/en-US/changelogs/0.9.1.txt b/fastlane/metadata/android/en-US/changelogs/0.9.1.txt new file mode 100644 index 00000000..59b28862 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/0.9.1.txt @@ -0,0 +1,20 @@ +### Bug Fixes + +- Fix volume resizing on Digital Ocean ([#368](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/368), resolves [#367](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/367)) +- Disable the storage card while volume information is being fetched ([#369](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/369), resolves [#317](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/317)) + + +### Features + +- Add copy-to-clipboard for email on user page ([#329](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/329), resolves [#287](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/287)) +- Add support for ECDSA SSH keys ([#362](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/362), resolves [#319](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/319)) +- Implement confirmation modal for the volume resize ([#372](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/372), resolves [#308](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/308)) + +### Other changes + +- Move service descriptions above login info for service cards ([#342](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/342), resolves [#341](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/341)) +- Add measure units to 'Extending volume' page ([#344](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/344), resolves [#301](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/301)) +- Make users to be ordered properly on users page ([#343](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/343), resolves [#340](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/340)) +- Move service card name to its icon row ([#352](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/352), resolves [#350](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/350)) +- Reorganize placeholders for empty pages ([#359](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/359), resolves [#348](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/348)) +- Remove redundant zone id cache for Cloudflare ([#371](https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/371)) diff --git a/metadata/org.selfprivacy.app.nightly/en-US/full_description.txt b/metadata/org.selfprivacy.app.nightly/en-US/full_description.txt deleted file mode 100644 index 018c94ca..00000000 --- a/metadata/org.selfprivacy.app.nightly/en-US/full_description.txt +++ /dev/null @@ -1 +0,0 @@ -Nightly builds of SelfPrivacy app. diff --git a/metadata/org.selfprivacy.app.nightly/en-US/images/icon.png b/metadata/org.selfprivacy.app.nightly/en-US/images/icon.png deleted file mode 100644 index bceb02539a76812a809152a37cd55dce2e4c507a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12964 zcmb`tXIN8P5Gc9<0Rw#Nd$_ zx=058?D`HJLlDtF_VV)Ds`B#euI?_j_Kr3X#1$PBEv3>bd*g?>UM>$E`TKVdtUqfS zDk!$87Ha=Pk!kq%@V7t5mo%7SXz7)|RsR0nVLANm$1@{xBRQHA$j#GT*E9MmK9Tl$ zo3HCsl+OXH4;IQav@94GBm4ZxhQm@vDBg^Yq-0rv4bB+R)iboj!F>g_czt^F&f>2pAK4$v zkt)W$xcRtHDLm`~Mp^2Fre8D2Qr>ce``QoMPL=czk)Nu<0u|ui~ za{9g#m}&dc)KSFj!K`1xOufs2sVnx!j~`0JQ;IrSv>NMf^I@1WG}ANICuw7`pWN@1 zb-U?uBfCC0+%;hAj;Gg5{S(5ARyQ>2nj9)s%lYhNtszSFjF#vlBuB#@7SxEF2{@=g zlX8W}T%=jvpxhlq9qecl*Nra)r?nqRAyE&be$gBs<4?#JlIu|jH=N&@hY}Ixcucan-CL@XTK-~PFgoOn|_p5u80R8yD1FX3@&+}{I8 zIzok^3&Q3|W+JG@Tq)VaZ)+p?wttmXO7PBJ3I3IoCsB*=r<`j<(6R+pB_iP6r9}bH zyCrA6nUqj;L?$Izze6-N`O(=Lc7Qr<434S(%m6`Q!m$oY<~M=9J_<(f(q94(90Ej- zw7_3>zq{vOwUWUX+3lwnz@L~Th>Hk<2#>Ph^Z)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A75e$PI*2`g5STV@27c$JlvdH!L=`~R8RiXz6!yuWb( z58Jh49eS&UZWqos`H=};IUPf@`y*u@_-*Gb@f`EU^y%IOdcO*BtQ>AF7#PnPaTMwD z{I}8;cFjoRvw7lBrU|GHI3Se)V;7cy(^kx@zwUrq?k16JjAoygi{i*lk_LYSZ?ss zH-WC_c3au(hg+x8Xi(%3=*D^X1oN#h+#!Y79}>yBG;Aq#hre#-TamB6wTXcKhh!itlz-qqq3`k!(&*rWFi*+FXn#;*GRXlGl`T6Z)!fShi^HpSW zPR{omw!3(ntQ5`la(q^RJN-{>4!4W|ZT4UOPj@R;9mUV0_Z(tAd4jh$E?ol3T1=6F z=?MqR>niyCXL+1j4O_3XmVH*P06et7D*mK&;Oo^bZsmYC69^KZW$eyW29Hk(uJM2H zxBtb3;DiJJmn%d71&H~C;Q4?3@c%UKsCYu}a^Uxfpp3Udq8GCd`yhph4Db?mO|V&g z@&_kqS+uI;R|v?U2bVo39Y(LTi9s`&n1==iA89?u{?%%c=9&u)MP3?K^|E1h1A~r^7-4NtL zBuO6D#~4=M1k=vEa26afWX-tr_k*L2#9Z`|V=p!B4Ip!&s=ef2 z=C{rgru!J5=Wkl^n!^W((XjigLh<7l Gum1;?=KLc7 diff --git a/metadata/org.selfprivacy.app.nightly/en-US/short_description.txt b/metadata/org.selfprivacy.app.nightly/en-US/short_description.txt deleted file mode 100644 index 18bbf5ab..00000000 --- a/metadata/org.selfprivacy.app.nightly/en-US/short_description.txt +++ /dev/null @@ -1 +0,0 @@ -Self-hosted services without pain diff --git a/metadata/org.selfprivacy.app.nightly/en-US/title.txt b/metadata/org.selfprivacy.app.nightly/en-US/title.txt deleted file mode 100644 index 7eb10ccc..00000000 --- a/metadata/org.selfprivacy.app.nightly/en-US/title.txt +++ /dev/null @@ -1 +0,0 @@ -SelfPrivacy (Nightly) diff --git a/metadata/org.selfprivacy.app/en-US/full_description.txt b/metadata/org.selfprivacy.app/en-US/full_description.txt deleted file mode 100644 index f5ba9142..00000000 --- a/metadata/org.selfprivacy.app/en-US/full_description.txt +++ /dev/null @@ -1,23 +0,0 @@ -

SelfPrivacy — is a platform on your cloud hosting, that allows to deploy your own private services and control them using mobile application.

- -

To use this application, you'll be required to create accounts of different service providers. Please reffer to this manual: https://selfprivacy.org/en/second

- -

Application will do the following things for you:

- -
    -
  1. Create your personal server
  2. -
  3. Setup NixOS
  4. -
  5. Bring all services to the ready-to-use state. Services include:
  6. -
- -
    -
  • E-mail, ready to use with DeltaChat
  • -
  • NextCloud — your personal cloud storage
  • -
  • Bitwarden — secure and private password manager
  • -
  • Pleroma — your private fediverse space for blogging
  • -
  • Jitsi — awesome Zoom alternative
  • -
  • Gitea — your own Git server
  • -
  • OpenConnect — Personal VPN server
  • -
- -

Project is currently in open beta state. Feel free to try it. It would be much appreciated if you would provide us with some feedback.

diff --git a/metadata/org.selfprivacy.app/en-US/images/icon.png b/metadata/org.selfprivacy.app/en-US/images/icon.png deleted file mode 100644 index fee217d6b49efbef66fac02000f93eeedd48682a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8284 zcmb7J2{e>#`+v}ik`O|KP(q@Vz3d^CkXWZWnTxd0jzns5uV3$*aG?Sa$fR%9-MmlKli2?t*raIm$GE&x*=#Y~p0}p8%6cVH?vnCL zxKvi5_$;C5Q%vpGlg3jLnG=2EZWI-soh4OCif7c_D4xCKJQcrTbex6yW`?u-LcB9W6z_VWYRK>HHtLj5o&9;`Um_uFs<_B! zh$x`V^6mX9{PL4=*9_pf!_*z;9dR$4-S`bN-NPVb}Hfx1w=#82@_~)mII7CV-=%t&XvkXvN8ik;!qCLmHV3L|J=O)NY|s zU|f#a>T0P2RNCL$=J)X+<+z)+DGUrDn)Xk3TP)odBp&tD(bqUScbtP$hI`p(c@6;1 zJ0T+5 zZHG4N5p@` z9t`{qhAO~C_n)EhuWb8Qw0{g}jV#`)%to|dYxlU4je=2EUxk16N;(|WAZZP^GaLT$ z*x=OLmlveqJ5mK5fTE!qx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xm=(-Dh zDbPd*K@ zaROJ_!Eh?nKBHI&uR3Tl1Kf-t7I^dP)||0{pHmKu2#IGa3Q`h;cNNkJDA1i!SZ--7 zzjvR~6XrWq|F;e}kuTiBf}54BdGbI9K3#4(Osq*+aINESig_Ky@N75fHQ(P_T`^p& z2&at$*9x=mk^8l0tfTm8!#-Fz(a}#5Zke|#qzm4~(Ly9)Uc2$TcRC{MhAa00#;f1v zzJ_`@5k^?0Z7%)=`?GQKxL_PMD(t(*L1x;LM)m8o(t^HufR{x=7Ym-;L@J<7j7(E( zOo6G5sNc@SO=7>9Z-h$LT*RM0hKq_`a2yKeyw!h zPgnn^p21TFK>t=dFSbq?a67^XnZI!|IPWtfed|0AUup5#IyyIx`kgly4h0XRUY_y(AyrVNEr=NkvoILg8=IXK9WQ!n*4X1Alo(s!Ee`g|$_Rcw?ou8;-V{YqLAhnU zvN{b8!08L3>7}&1nG&ShXOumX8F&)Ztn}dFKuNqXq3$x^HdIFa{GoNxLC`e12dVu4X3RXRr-#ay_WGm&i|M6UOu53cZE$o`2Qk@4L`Q9E-c ztW}&wvWOzF6mRvYN7n#fIy5D0eE05FQy>8ndRKWSo1>16MY8dVL>|AcAo;K^_?c7k zwXbaW#%_U80Kqp&jEn!Sivj|Y(C#cay(Y$PuN9{k8OGSl1Xk32Z9%i_mJgF;oiqxH iX1Rf6BgwQ5O+`@rmhx))WO~7b0(3O)s+ZlidGS9YWpRiA diff --git a/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/1.png b/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/1.png deleted file mode 100644 index 3ffd726f9a8048521889f905557e2c16194c31c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61120 zcmeFYXH=6-*C-r&K~$tkvrr`n+#mq~u|Yt^I)Mz z{|N{F4LklP{Q7Sghp^P=mHEJfFFpD<*zw=s0Kdn6yfO`cmv?%M`y1}(!Ph)J@PGI9 zclaCQ6E0pzI4{1>dnG}>AWM)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maTqI=HoA@c=sJ~KR_iU*fZG+ z%uu~w5{}UOBx%Otmy}B*i2v1f8KPtfgDop`qT3;anvHiM>stZuK?cRd|29MRjSuht Lg^s-R+sK~*ye5E< diff --git a/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/3.png b/metadata/org.selfprivacy.app/en-US/images/phoneScreenshots/3.png deleted file mode 100644 index e2024cbda144abb625b31a127c58a33696b8f67c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52977 zcmeFZ2UJt*wkRA$EFdZ(9n?)HG${e;7D6vV5&|KB(g^|*no?~bMPLV|Ly#6yC{h9h z1hz^?Kmwtcjr0tg#Z}7m;_tD?*|KQ5VcW2;N?f^ia%zqI6|M%#ele4cQBhq)q;fH1rXB5_nfnRa` zH~jH0+~MEw*S~Ny)Z#89&N~J!;rb7_!$07GevkYZaoT>xcYK8Yg^w|C4bO-Ezi9n} zUnM^8>;;1`u2zgg0N@L-0O$ekFz|mV{JlQCa{+*x+W-L5?|*;hkOlx$M*sjkBY%G; z@(uvF_!0o9>Us14{ot>{oMN0$y0`!U8-)M>n>7Hy@f84IvH4p;|DN{mZSgx>C?=o&zw1ZmgN!) z%eiwbS1w#Ue~J4F4-fYhE-pSn(QADC!U9}e*QKuui-}7DC3&yO+>nvDAu1s$@hg)P zXU?2qIm^Pq!onfJ$Hgb{Uxwp90PJU(D^7l8Iw1r&$$o-~{lsw-K=4h;VL5T;?AcSNnE)qFGM!>(KYjVkZyZ7p0fG5E!z8}t5>~n6fG+!}1EJh!|;1f&eDq)vSobqrYNxvTTy%_qzJK1SC3 z44O;~!v8?|udGj>VFcb}XB3O+#II^Qd4h@gSJ4=O?58gOCU1e^xWakcJcn86fzPwk zAA7%-O(_UJUl&ngP(2<2oM$@0;EstMpbc1hbmIE2l>d9+MEtU+>-}D?1*vUtxOsj$ z^tsBGf>Fwp?Q3~recU~T>!{LWz$K*oG2k%c7_bFwJO-o%_kBQoO^+d}d066d5_7?y zg;M-31nmjw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deleted file mode 100644 index 3d3b2b379aed7793ece27dffb5a68c427ea7f276..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44320 zcmeFZ2UL^IwlEy@wSnl1G^JSR1Ob&^Ef9JOBm_cJnh=^K0VIGOqzDKINN5^b3M2vs z2oO*ZqzDKk^dd?PMd=CxUwqFx_dWmp&RySk&pF>(_h0MmXC=>`J$=ufJu`b|p1py+ zPk`S|42%r`92@`u2m1l+ecmTytf%KC-YzF$nW8X;t8}|JU0QmW%k=BOS&f3|- z&;FwQ6>hkpZv7SiJ8yQn8-2f02LO8I|BnCviFCx>1LejJ^o{*PBiWg=3+v9t`ELFN zzx@k${R{r&7mkEj>#@VUVB<13{|0yc8$1Mk3(XGG@+-XCE#xnJgpF(a`3C*U>lgeg z@lg+ds15sV$Nq@`PylOyA>bMt|Chp_{0zVW0P5=i!2YLy(p)nDfXYY!;N;MsG>I1g z!0|@_KtWusad6^56GO{wi65%*> z=n&^&PF_wu3FpP zNa7c`qy%*hy#MTFes@prHE}g0I=Qr5HRwS~+1ry6(kkjUsE4@M4U)?GpuCB1ZmG+V z;75(0**TnI=lu)*nmhabM-FT+F`mEpaQwFaul^i7C-&{G#FxF56VNz0*``5!4so%5A<~x{C$Ra= zbbNRtz)w}wGIv+*)0$HiY!5Kuh`ou-NhEmGeW3)*mN_d@!f@d+UnEQxXuBm#GixgJ zA`$#YYWH&7TO|cc|7`4R>fGtO4`0G&wju-^)^M_{1jWuBjkok`6}Fp|nBla;Cls7` zZ#`KKyTF`U;~*mvX5$YPE%gld;VQnIx3o3dItgAbZSBj0S-R`)fM{kQ^q zgE|P234`MN#8$BoH*9V1c6tknJjEqio$`>u-)+;ts(F@DR|rDLWmmv13Xull5lGfF zy)eDeOT1UK4_o-&1EGf?-0uoMI@wHoFH)P*`dFhSJDPYe*j(pbyUKQSdc-M1^IIN0 z{lb%2dpFl>lRnRxL-=*%Dkg}kod*xR)RC{^@zBzdKt9nomhX=KS`?oUA3MhrLx;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ZfW>8IF119eE^Wu%Md(jG4X<|FtFgZ9&TGj5zf}-(3@}L z?5EUi=jH;bf_FCVD!#a#6gx;X)2OA4B^Ae^eIpd}D_CNs3claua#9_|s-Xqe0vxmK z8_MS%tYsB_Q6-f@6mZK(ktqXpBYLXafl3BDFaHL<8YRDn4l(z5`I_BJs&(CM0&*P@ z!f5jgm*R{X8?5zESGY9@5eTe=`NjILpS?#t)yG7Ws^fUf;&OB9$c&?J%_OXHc?H$Y z&`vZ&B$sOFS(`1auvg8I~+M zSL9r8imQggnXVNsEx{d~sqY)$5kTMk0#6fsMoJklmrp>;bTh!pMWI z{rP1e@eiit?_d+Qm%dSCv^r)E-nG?*S~Dyt(xk}Eq3g{Ult-^DtwQTT&Nb?8?#hs{CTmmK;!(YPUc1F`!e}XnWaPV+{w~Ta-7rsG;FDf~4m}pT zba%Ai*>TX`%GDQ}^qI@Q0fN0{5qZ&LA(}}4wQm*t!?S?px*Y{VeHU-FA z8t;5iiwd01%v$wASGO2@<9m&x51eaDpV+|S_td5h0*g68No_7=!_yU}4#rFk0;0~5 zSXTBDAOT)uhNjNao8g{D ziik*E*1yIcSCX8Hrw}+Dh+8ZkWPzR$q4AhP^lNamz4@;?_zn^=3#U2k^zzA2MOJjq zAc6>KF-BCwAfVC?m>b$-1H*wX8ZWs)&lR69(9dBKs{Yv6zEayzO!|g@7$p?c+m$TR zT@=2<>wluxZW+v{6QDDDPLbC<()jEAQ>eo63)L!;BFB(hHEe`EWJ uiuM=2U-k2|UlksfPA`Wm#|55A-~Pb)XW>85__J;N;~n&$9gUddk^cgC2RL>B diff --git a/metadata/org.selfprivacy.app/en-US/short_description.txt b/metadata/org.selfprivacy.app/en-US/short_description.txt deleted file mode 100644 index 18bbf5ab..00000000 --- a/metadata/org.selfprivacy.app/en-US/short_description.txt +++ /dev/null @@ -1 +0,0 @@ -Self-hosted services without pain diff --git a/metadata/org.selfprivacy.app/en-US/title.txt b/metadata/org.selfprivacy.app/en-US/title.txt deleted file mode 100644 index adc138c5..00000000 --- a/metadata/org.selfprivacy.app/en-US/title.txt +++ /dev/null @@ -1 +0,0 @@ -SelfPrivacy diff --git a/pubspec.yaml b/pubspec.yaml index 23ddac1e..1d58f581 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: selfprivacy description: selfprivacy.org publish_to: 'none' -version: 0.9.0+18 +version: 0.9.1+19 environment: sdk: '>=3.0.2 <4.0.0'